/* Pedido pela mesa — mobile primeiro, mesma paleta clara do site */
:root {
  --petala: #f6ecf3; --lilas: #ebd6e4; --orquidea: #cc97c4; --rose: #c7a2b6;
  --malva: #a3728e; --ameixa: #7a4a67; --tinta: #4a2a40; --branco: #fff;
  --display: "Cormorant Garamond", "Cardo", Georgia, serif;
  --texto: "Cardo", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--petala); color: var(--tinta); font-family: var(--texto);
  font-size: 1.05rem; line-height: 1.5; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
body.lock { overflow: hidden; }
h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ameixa); outline-offset: 3px; border-radius: 4px; }

.demo { background: var(--tinta); color: var(--petala); text-align: center; font-size: 0.9rem; padding: 8px 16px; }

.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(16px, env(safe-area-inset-left, 0px)); background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(122, 74, 103, 0.15);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ameixa); text-decoration: none; }
.brand span { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.2em; }
.mesa-chip {
  min-height: 44px; padding: 6px 18px; border-radius: 999px; border: 1px solid var(--ameixa);
  background: transparent; color: var(--ameixa);
}
.mesa-chip b { font-family: var(--display); font-size: 1.3rem; font-weight: 600; margin-left: 4px; }

.tabs {
  position: sticky; top: 68px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 12px max(16px, env(safe-area-inset-left, 0px)); background: var(--petala);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; min-height: 44px; padding: 6px 18px; border-radius: 999px; border: 1px solid rgba(122, 74, 103, 0.45);
  background: transparent; color: var(--ameixa);
}
.tab[aria-selected="true"] { background: var(--ameixa); color: var(--petala); border-color: var(--ameixa); }

.items { padding: 4px max(16px, env(safe-area-inset-left, 0px)); max-width: 720px; margin: 0 auto; }
.item { display: grid; grid-template-columns: 68px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(74, 42, 64, 0.12); }
.item__img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; background: var(--rose); }
.item__img--mark { object-fit: contain; padding: 14px; }
.item h3 { font-family: var(--display); font-weight: 500; font-size: 1.25rem; line-height: 1.15; }
.item p { font-size: 0.88rem; color: #5c3f52; line-height: 1.35; margin-top: 3px; }
.item__price { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ameixa); margin-top: 4px; }
.item > div { min-width: 0; }

.add { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ameixa); color: var(--petala); font-size: 1.6rem; line-height: 1; }
.add:active { transform: scale(0.94); }
.stepper { display: inline-flex; align-items: center; border: 1px solid rgba(122, 74, 103, 0.5); border-radius: 999px; background: var(--branco); }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.4rem; color: var(--ameixa); border-radius: 50%; }
.stepper output { min-width: 1.6em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px max(16px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--petala) 30%); }
.bar__btn {
  width: 100%; max-width: 720px; margin: 0 auto; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 22px; border: 0; border-radius: 999px; background: var(--ameixa); color: var(--petala); font-size: 1.05rem;
  box-shadow: 0 16px 30px -14px rgba(74, 42, 64, 0.7);
}
.bar__go { font-weight: 700; }
.bar__btn b { font-family: var(--display); font-size: 1.3rem; }

.sheet { position: fixed; inset: 0; z-index: 60; background: var(--petala); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet[hidden] { display: none; }
.sheet__inner { max-width: 560px; margin: 0 auto; padding: 28px max(20px, env(safe-area-inset-left, 0px)) calc(36px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 18px; min-height: 100vh; min-height: 100dvh; align-content: start; }
.sheet__inner--center { align-content: center; justify-items: center; text-align: center; }
.sheet__logo { width: 180px; }
.sheet h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.05; }

.mesa-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; max-width: 360px; }
.mesa-picker button { min-height: 52px; border-radius: 14px; border: 1px solid rgba(122, 74, 103, 0.5); background: var(--branco); color: var(--ameixa); font-family: var(--display); font-size: 1.4rem; font-weight: 600; }
.mesa-picker button:active { background: var(--ameixa); color: var(--petala); }

.lines { display: grid; gap: 4px; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(74, 42, 64, 0.12); }
.lines .nm { font-family: var(--display); font-weight: 500; font-size: 1.2rem; line-height: 1.15; }
.lines .sub { color: var(--ameixa); font-weight: 700; }
.lines--ro li { grid-template-columns: 2.2em 1fr auto; }
.lines--ro .q { font-family: var(--display); font-weight: 700; color: var(--ameixa); }
.field { display: grid; gap: 6px; color: var(--ameixa); }
.field textarea { width: 100%; border: 1px solid rgba(122, 74, 103, 0.45); border-radius: 12px; padding: 10px 12px; background: var(--branco); color: var(--tinta); resize: vertical; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 1.6rem; border-top: 2px solid var(--ameixa); padding-top: 12px; }
.total b { color: var(--ameixa); font-weight: 600; }
.actions { display: grid; gap: 10px; margin-top: 4px; }
.btn { min-height: 54px; padding: 10px 26px; border-radius: 999px; border: 1px solid var(--ameixa); background: var(--ameixa); color: var(--petala); font-size: 1.1rem; }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ameixa); }

.bigmesa { font-family: var(--display); font-size: 1.4rem; text-align: center; background: var(--lilas); border-radius: 18px; padding: 14px; }
.bigmesa b { display: block; font-size: 4.2rem; line-height: 1; font-weight: 600; color: var(--ameixa); }
.ask { color: #5c3f52; text-align: center; }
.obs-ro { background: var(--branco); border-radius: 12px; padding: 10px 14px; color: #5c3f52; }
.error { background: #fbe4e8; color: #8a1f3a; border-radius: 12px; padding: 12px 14px; }

.done { text-align: center; justify-items: center; align-content: center; }
.done__check { width: 84px; height: 84px; }
.done__num { font-size: 1.2rem; }
.done__num b { font-family: var(--display); font-size: 1.6rem; color: var(--ameixa); }
.done__status { background: var(--lilas); padding: 10px 22px; border-radius: 999px; color: var(--ameixa); font-weight: 700; }
.done .actions { width: 100%; }

@media (min-width: 720px) { body { font-size: 1.1rem; } .tabs { top: 70px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.bar { display: grid; gap: 8px; }
.bar__btn--ghost { background: var(--branco); color: var(--ameixa); border: 1px solid var(--ameixa); box-shadow: none; }
.bar__btn[hidden] { display: none; }
.orders { display: grid; gap: 10px; }
.orders li { background: var(--branco); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.orders .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.95rem; color: #5c3f52; }
.orders .chip { border-radius: 999px; padding: 2px 12px; font-size: 0.88rem; background: var(--lilas); color: var(--ameixa); font-weight: 700; }
.orders .chip.pronto { background: #4f7a5a; color: #fff; }
.orders .chip.entregue, .orders .chip.cancelado { background: #e7e1e5; color: #6b5a66; }
.orders ul { display: grid; gap: 2px; }
.orders .sub { color: var(--ameixa); font-weight: 700; text-align: right; }
