/* ═══════════════════════════════════════════════════════════
   SKIN DE REFERÊNCIA — "A Comanda" (cardápio Adriano Lanches)
   Cartaz de lanchonete + comanda de papel. Para um cliente novo,
   reescreva este arquivo inteiro com a identidade dele; as classes
   usadas pelo tela.js de referência estão todas aqui.
   ═══════════════════════════════════════════════════════════ */
:root {
  --red: #DA1018;
  --red-deep: #A50A11;
  --yellow: #FFD21F;
  --yellow-deep: #F2B705;
  --paper: #FFF4E0;
  --paper-2: #F8E6C6;
  --ink: #1B0F0C;
  --ink-2: #5E4A41;
  --ink-3: #9A8478;
  --line: rgba(27, 15, 12, .14);
  --green: #1E9E4A;

  --f-display: 'Anton', 'Impact', sans-serif;
  --f-body: 'Rubik', system-ui, sans-serif;
  --f-mono: 'Courier Prime', ui-monospace, monospace;

  --maxw: 560px;
  --gutter: 16px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --halftone: radial-gradient(circle, rgba(0, 0, 0, .16) 1.1px, transparent 1.5px) 0 0 / 9px 9px;
  --burst: polygon(50% 0%,56.4% 9.5%,65.5% 2.4%,68.6% 13.5%,79.4% 9.5%,79% 21%,90.5% 20.6%,86.5% 31.4%,97.6% 34.5%,90.5% 43.6%,100% 50%,90.5% 56.4%,97.6% 65.5%,86.5% 68.6%,90.5% 79.4%,79% 79%,79.4% 90.5%,68.6% 86.5%,65.5% 97.6%,56.4% 90.5%,50% 100%,43.6% 90.5%,34.5% 97.6%,31.4% 86.5%,20.6% 90.5%,21% 79%,9.5% 79.4%,13.5% 68.6%,2.4% 65.5%,9.5% 56.4%,0% 50%,9.5% 43.6%,2.4% 34.5%,13.5% 31.4%,9.5% 20.6%,21% 21%,20.6% 9.5%,31.4% 13.5%,34.5% 2.4%,43.6% 9.5%);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: 64px; overflow-x: hidden; }
@supports (overflow-x: clip) { html { overflow-x: clip; } }
body {
  position: relative;
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Papel com fibra leve */
body::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
}

/* ── TOPO ───────────────────────────────────────────────── */
.top {
  background: var(--halftone), var(--red);
  color: #fff;
  position: relative;
  z-index: 5;
}
.top-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.top-logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 3px #fff, 4px 6px 0 3px var(--ink); }
.top-status {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 999px;
}
.top-status .dot { width: 9px; height: 9px; border-radius: 50%; background: #3BE17A; box-shadow: 0 0 0 0 rgba(59,225,122,.7); animation: pulse 1.8s infinite; }
.top-status.closed .dot { background: #FF5A4E; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(59,225,122,0); } 100% { box-shadow: 0 0 0 0 rgba(59,225,122,0); } }

/* ── TICKER ─────────────────────────────────────────────── */
.ticker {
  background: var(--yellow); color: var(--ink);
  border-block: 3px solid var(--ink);
  overflow: hidden; white-space: nowrap;
  transform: rotate(-1.2deg) scale(1.03);
  margin: -6px 0 0; position: relative; z-index: 6;
}
.ticker-track { display: inline-flex; gap: 18px; padding: 9px 0; animation: marquee 26s linear infinite; font-family: var(--f-display); font-size: 1.05rem; letter-spacing: .04em; }
.ticker-track i { font-style: normal; color: var(--red); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── HERO ───────────────────────────────────────────────── */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 30px var(--gutter) 8px; position: relative; }
.kicker { font-family: var(--f-mono); font-size: .8rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.hero-title {
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3.6rem, 19vw, 6.4rem); line-height: .86; letter-spacing: -.01em;
  margin-top: 8px;
}
.hero-title em { font-style: normal; color: var(--red); position: relative; display: inline-block; }
.hero-title em::after {
  content: ''; position: absolute; left: -2%; right: -4%; bottom: .06em; height: .16em;
  background: var(--yellow); z-index: -1; transform: skewX(-12deg);
}
.hero-sub { margin-top: 14px; font-size: 1.02rem; line-height: 1.45; color: var(--ink-2); max-width: 30ch; }

.hero-photo {
  display: block; position: relative; width: 100%; margin-top: 22px;
  aspect-ratio: 4 / 3; border-radius: 22px;
  background: var(--halftone), var(--red);
  border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1.4deg);
  transition: transform .4s var(--spring);
}
.hero-photo:active { transform: rotate(0deg) scale(.98); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 19px; }
.burst {
  position: absolute; top: -26px; right: -10px;
  width: 104px; height: 104px; clip-path: var(--burst);
  background: var(--yellow); color: var(--ink);
  display: grid; place-items: center; text-align: center;
  font-family: var(--f-display); font-size: 1.7rem; line-height: .9;
  transform: rotate(10deg);
  animation: wobble 4s ease-in-out infinite;
}
.burst small { display: block; font-size: .7rem; font-family: var(--f-body); font-weight: 800; letter-spacing: .04em; }
@keyframes wobble { 50% { transform: rotate(-4deg) scale(1.05); } }
.hero-tag {
  position: absolute; left: 14px; bottom: 14px;
  background: var(--ink); color: #fff;
  font-family: var(--f-display); font-size: 1.15rem; letter-spacing: .03em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 10px; transform: rotate(-2deg);
}
.hero-facts {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 30px; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff;
}
.hero-facts li { padding: 12px 8px; text-align: center; }
.hero-facts li + li { border-left: 2px dashed var(--line); }
.hero-facts b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; }
.hero-facts span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; }

/* ── CLIENTE QUE VOLTA ──────────────────────────────────── */
.again {
  max-width: calc(var(--maxw) - 2 * var(--gutter)); margin: 22px auto 0;
  background: var(--ink); color: #fff; border-radius: 18px; padding: 16px;
  display: flex; gap: 14px; align-items: center;
  margin-inline: var(--gutter);
}
@media (min-width: 593px) { .again { margin-inline: auto; } }
.again-emoji { font-size: 2rem; }
.again-text { flex: 1; min-width: 0; }
.again-text b { display: block; font-size: 1rem; }
.again-text span { font-size: .82rem; color: rgba(255,255,255,.7); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.again-btn { background: var(--yellow); color: var(--ink); font-weight: 800; font-size: .85rem; padding: 10px 14px; border-radius: 12px; white-space: nowrap; }

/* ── PEDIDO AO VIVO ─────────────────────────────────────── */
.live-pill {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 40; background: var(--ink); color: #fff;
  border: 2px solid var(--yellow); border-radius: 999px;
  padding: 10px 16px; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  max-width: calc(100vw - 32px); white-space: nowrap;
}
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ── SEÇÕES ─────────────────────────────────────────────── */
.sec-head { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.sec-head h2 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 2.3rem; line-height: .9; }
.sec-head p { font-size: .82rem; color: var(--ink-2); text-align: right; max-width: 14ch; }

/* ── OS BRABOS ──────────────────────────────────────────── */
.brabos { padding: 44px 0 10px; }
.brabos-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 22px var(--gutter) 26px; scrollbar-width: none;
  max-width: var(--maxw); margin: 0 auto;
}
.brabos-track::-webkit-scrollbar { display: none; }
.brabo {
  flex: 0 0 74%; scroll-snap-align: start; text-align: left;
  background: #fff; border: 3px solid var(--ink); border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink); overflow: hidden; position: relative;
  transition: transform .3s var(--spring);
}
.brabo:nth-child(odd) { transform: rotate(-1.2deg); }
.brabo:nth-child(even) { transform: rotate(1.2deg); }
.brabo:active { transform: scale(.97); }
.brabo-img { aspect-ratio: 4 / 3; background: var(--halftone), var(--red); position: relative; }
.brabo-img img { width: 100%; height: 100%; object-fit: cover; }
.brabo-img .art { position: absolute; inset: 0; display: grid; place-items: center; }
.brabo-rank {
  position: absolute; top: 10px; left: 10px;
  background: var(--yellow); color: var(--ink); border: 2px solid var(--ink);
  font-family: var(--f-display); font-size: 1rem; padding: 3px 10px; border-radius: 8px;
}
.brabo-body { padding: 12px 14px 14px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.brabo-name { font-family: var(--f-display); font-size: 1.35rem; line-height: 1; text-transform: uppercase; }
.brabo-ing { font-size: .78rem; color: var(--ink-2); margin-top: 4px; }
.brabo-price { font-family: var(--f-display); font-size: 1.6rem; color: var(--red); white-space: nowrap; }
.brabo-price small { font-size: .8rem; }

/* ── ABAS ───────────────────────────────────────────────── */
.tabs {
  position: sticky; top: 0; z-index: 30;
  background: var(--paper); border-bottom: 3px solid var(--ink);
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
  padding-top: env(safe-area-inset-top);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs-inner { display: flex; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.tab {
  flex: 1 0 auto; padding: 16px 14px 13px;
  font-family: var(--f-display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink-3); position: relative; white-space: nowrap;
  transition: color .2s;
}
.tab.active { color: var(--ink); }
.tab.active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -3px; height: 6px;
  background: var(--red); border-radius: 6px 6px 0 0;
}
.tab sup { font-family: var(--f-mono); font-size: .65rem; color: var(--red); margin-left: 2px; }

/* ── CARDÁPIO (menu board) ──────────────────────────────── */
.menu { max-width: var(--maxw); margin: 0 auto; padding: 8px 0 140px; }
.cat { padding: 34px var(--gutter) 6px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cat-head h2 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 2.1rem; line-height: .95; }
.cat-head span { font-family: var(--f-mono); font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.cat-note { font-size: .85rem; color: var(--ink-2); margin-bottom: 8px; }

.row {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 4px 10px; align-items: start;
  padding: 16px 0; border-bottom: 2px dashed var(--line);
  cursor: pointer; position: relative;
}
.row:last-child { border-bottom: 0; }
.row-num { font-family: var(--f-mono); font-weight: 700; font-size: .82rem; color: var(--red); padding-top: 6px; }
.row-main { min-width: 0; }
.row-line { display: flex; align-items: baseline; gap: 6px; }
.row-name { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.32rem; line-height: 1.02; }
.row-leader { flex: 1; min-width: 14px; border-bottom: 3px dotted var(--ink-3); transform: translateY(-5px); }
.row-price { font-family: var(--f-display); font-size: 1.32rem; white-space: nowrap; }
.row-price small { font-size: .75rem; margin-right: 1px; }
.row-ing { font-size: .86rem; line-height: 1.45; color: var(--ink-2); margin-top: 5px; }
.row-ing b { color: var(--ink); font-weight: 700; background: linear-gradient(transparent 58%, color-mix(in srgb, var(--yellow) 75%, transparent) 58%); }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; border: 1.5px solid var(--ink);
}
.tag.hot { background: var(--red); color: #fff; border-color: var(--red); }
.tag.yel { background: var(--yellow); }
.tag.up { border-style: dashed; color: var(--ink-2); border-color: var(--ink-3); }
.row-side { display: flex; flex-direction: column; align-items: end; gap: 10px; }
.row-thumb {
  width: 78px; height: 62px; border-radius: 10px; object-fit: cover;
  border: 2px solid var(--ink); transform: rotate(3deg); box-shadow: 3px 3px 0 var(--ink);
}
.add {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 1.6rem; font-weight: 500; line-height: 1;
  display: grid; place-items: center;
  transition: transform .25s var(--spring), background .2s;
}
.add:active { transform: scale(.86); }
.add.in { background: var(--red); font-size: 1rem; font-weight: 800; }
.row.off { opacity: .45; pointer-events: none; }
.row.off .row-name::after { content: ' · esgotado'; font-family: var(--f-body); font-size: .7rem; color: var(--red); }

/* ── GELADEIRA (bebidas) ────────────────────────────────── */
.fridge {
  background: linear-gradient(180deg, #E9F4F7, #D3E7EE);
  border: 3px solid var(--ink); border-radius: 22px;
  padding: 14px 12px 6px; position: relative; box-shadow: inset 0 0 0 6px rgba(255,255,255,.6);
}
.shelf { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 0; scrollbar-width: none; border-bottom: 6px solid #9CB9C4; margin-bottom: 14px; align-items: end; }
.shelf::-webkit-scrollbar { display: none; }
.shelf-label { font-family: var(--f-mono); font-size: .72rem; font-weight: 700; text-transform: uppercase; color: #3B5A66; margin: 0 4px 2px; }
.bev { flex: 0 0 auto; width: 86px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 8px; position: relative; text-align: center; }
.bev-name { font-size: .7rem; font-weight: 600; line-height: 1.15; color: var(--ink); min-height: 2.3em; }
.bev-price { font-family: var(--f-display); font-size: 1rem; background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 1px 8px; }
.bev-qty {
  position: absolute; top: -4px; right: 6px; z-index: 2;
  min-width: 24px; height: 24px; border-radius: 12px; padding: 0 6px;
  background: var(--red); color: #fff; font-weight: 800; font-size: .78rem;
  display: grid; place-items: center; border: 2px solid #fff;
  animation: pop .35s var(--spring);
}
@keyframes pop { from { transform: scale(0); } }
.bev:active .can { transform: scale(.92) rotate(-3deg); }

/* Embalagens desenhadas em CSS */
.can {
  --c: #E41E2B; --c2: #fff;
  position: relative; width: 44px; height: 78px; border-radius: 9px 9px 7px 7px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.22), transparent 22%, rgba(255,255,255,.35) 38%, transparent 55%, rgba(0,0,0,.25)),
    var(--c);
  border: 2px solid var(--ink);
  transition: transform .25s var(--spring);
  display: grid; place-items: center;
}
.can::before { content: ''; position: absolute; top: -6px; left: 5px; right: 5px; height: 6px; background: #B9C2C6; border: 2px solid var(--ink); border-bottom: 0; border-radius: 4px 4px 0 0; }
.can span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-display); font-size: .72rem; color: var(--c2); letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; max-height: 64px;
}
.can.lata { width: 44px; height: 74px; }
.can.tall { width: 38px; height: 92px; }
.can.ks { width: 30px; height: 84px; border-radius: 40% 40% 6px 6px / 22% 22% 6px 6px; }
.can.ks::before { left: 9px; right: 9px; top: -9px; height: 10px; border-radius: 3px 3px 0 0; background: var(--c); }
.can.pet { width: 40px; height: 96px; border-radius: 45% 45% 8px 8px / 20% 20% 8px 8px; }
.can.pet::before { left: 12px; right: 12px; top: -10px; height: 10px; background: #F4F4F4; }
.can.pet2 { width: 52px; height: 116px; border-radius: 45% 45% 10px 10px / 18% 18% 10px 10px; }
.can.pet2::before { left: 16px; right: 16px; top: -11px; height: 11px; background: #F4F4F4; }
.can.box { width: 46px; height: 90px; border-radius: 4px; }
.can.box::before { left: 6px; right: 20px; top: -8px; height: 8px; border-radius: 2px 2px 0 0; background: #F4F4F4; }
.can.agua { --c: #CFEFFF !important; --c2: #1F6E9A !important; }

/* ── BARRA DA COMANDA ───────────────────────────────────── */
.ticket {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 50;
  width: min(calc(100% - 24px), calc(var(--maxw) - 24px));
  transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 12px;
  background: var(--red); color: #fff;
  border: 3px solid var(--ink); border-radius: 18px;
  padding: 12px 16px 12px 12px; box-shadow: 0 6px 0 var(--ink), 0 18px 40px rgba(0,0,0,.25);
  transition: transform .45s var(--spring);
}
.ticket.show { transform: translate(-50%, 0); }
.ticket.bump { animation: tbump .5s var(--spring); }
@keyframes tbump { 30% { transform: translate(-50%, 0) scale(1.06) rotate(-1deg); } }
.ticket-count {
  min-width: 38px; height: 38px; border-radius: 12px; padding: 0 8px;
  background: var(--yellow); color: var(--ink);
  font-family: var(--f-display); font-size: 1.25rem; display: grid; place-items: center;
}
.ticket-label { flex: 1; text-align: left; font-family: var(--f-display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: .02em; }
.ticket-total { font-family: var(--f-display); font-size: 1.25rem; }

/* ── SHEET ──────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(27, 15, 12, .6); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .3s, visibility 0s .3s; z-index: 60; }
.scrim.open { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .3s; }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 70;
  width: 100%; max-width: var(--maxw); max-height: 92vh; max-height: 92dvh;
  transform: translate(-50%, 105%);
  background: var(--paper); border-radius: 26px 26px 0 0;
  border: 3px solid var(--ink); border-bottom: 0;
  transition: transform .42s cubic-bezier(.2, .9, .25, 1);
  display: flex; flex-direction: column;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip { width: 48px; height: 5px; border-radius: 5px; background: var(--ink-3); margin: 10px auto 0; flex-shrink: 0; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
.sheet.paper { background: transparent; border: 0; }
.sheet.paper .sheet-grip { background: rgba(255,255,255,.7); }

/* Item */
.it-media { position: relative; margin: 12px var(--gutter) 0; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; border: 3px solid var(--ink); background: var(--halftone), var(--red); }
.it-media img { width: 100%; height: 100%; object-fit: cover; }
.it-media .art { position: absolute; inset: 0; display: grid; place-items: center; }
.it-media .burst { top: auto; bottom: 10px; right: 10px; width: 88px; height: 88px; font-size: 1.45rem; }
.it-close { position: absolute; top: 10px; left: 10px; width: 38px; height: 38px; border-radius: 12px; background: var(--paper); border: 2px solid var(--ink); font-weight: 800; z-index: 2; }
.it-body { padding: 16px var(--gutter) 0; }
.it-name { font-family: var(--f-display); font-weight: 400; font-size: 2.1rem; line-height: .95; text-transform: uppercase; }
.it-hint { font-size: .78rem; color: var(--ink-2); margin: 14px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 12px; border-radius: 999px; border: 2px solid var(--ink); background: #fff;
  font-size: .86rem; font-weight: 600; transition: all .2s;
}
.chip.removed { background: transparent; color: var(--ink-3); border-color: var(--ink-3); border-style: dashed; text-decoration: line-through; }
.chip.fixed { opacity: .55; pointer-events: none; }

.upgrade {
  margin-top: 18px; display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 18px; padding: 14px;
  box-shadow: 4px 4px 0 var(--ink); position: relative; transition: transform .25s var(--spring), background .2s;
}
.upgrade:active { transform: scale(.98); }
.upgrade-ico { font-size: 1.8rem; }
.upgrade-txt { flex: 1; min-width: 0; }
.upgrade-txt small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.upgrade-txt b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; line-height: 1.05; text-transform: uppercase; margin-top: 2px; }
.upgrade-txt span { font-size: .82rem; color: var(--ink-2); }
.upgrade-txt span em { font-style: normal; font-weight: 800; color: var(--red); }
.switch { width: 52px; height: 30px; border-radius: 15px; background: rgba(27,15,12,.25); border: 2px solid var(--ink); position: relative; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: transform .3s var(--spring); }
.upgrade.on { background: var(--ink); color: #fff; }
.upgrade.on .upgrade-txt span { color: rgba(255,255,255,.75); }
.upgrade.on .upgrade-txt span em { color: var(--yellow); }
.upgrade.on .switch { background: var(--green); border-color: #fff; }
.upgrade.on .switch::after { transform: translateX(22px); border-color: #fff; }

.obs-toggle { margin-top: 16px; font-size: .9rem; font-weight: 700; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.field {
  width: 100%; padding: 14px; border-radius: 14px; border: 2px solid var(--ink); background: #fff;
  font-size: 1rem; outline: none; transition: box-shadow .2s;
}
.field:focus { box-shadow: 4px 4px 0 var(--red); }
.field::placeholder { color: var(--ink-3); }
textarea.field { resize: vertical; min-height: 70px; }

.it-foot {
  position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--paper) 22%);
  margin-top: 10px;
}
.qty { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
.qty button { width: 42px; height: 52px; font-size: 1.4rem; font-weight: 700; }
.qty span { min-width: 22px; text-align: center; font-family: var(--f-display); font-size: 1.3rem; }
.btn {
  flex: 1; height: 56px; border-radius: 16px; padding: 0 18px;
  background: var(--red); color: #fff; border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink);
  font-family: var(--f-display); font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.center { justify-content: center; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border-style: dashed; font-size: 1rem; }
.btn.dark { background: var(--ink); }

/* Gelada (upsell de bebida) */
.up-head { padding: 18px var(--gutter) 6px; }
.up-head small { font-family: var(--f-mono); font-size: .78rem; color: var(--red); font-weight: 700; text-transform: uppercase; }
.up-head h3 { font-family: var(--f-display); font-weight: 400; font-size: 2.2rem; line-height: .92; text-transform: uppercase; margin-top: 4px; }
.up-head p { font-size: .9rem; color: var(--ink-2); margin-top: 6px; }
.up-fridge { margin: 12px var(--gutter) 0; }
.up-fridge .shelf { flex-wrap: wrap; justify-content: center; overflow: visible; }
.deal {
  margin: 14px var(--gutter) 0; padding: 14px; border-radius: 16px; border: 3px dashed var(--ink);
  display: flex; align-items: center; gap: 12px; background: #fff; text-align: left; width: calc(100% - 2 * var(--gutter));
}
.deal-txt { flex: 1; font-size: .86rem; line-height: 1.35; }
.deal-txt b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; text-transform: uppercase; }
.deal-txt em { font-style: normal; font-weight: 800; color: var(--green); }
.deal-add { background: var(--ink); color: #fff; font-weight: 800; padding: 10px 12px; border-radius: 12px; font-size: .85rem; white-space: nowrap; }
.deal.on { border-style: solid; background: var(--yellow); }

/* ── COMANDA (papel) ────────────────────────────────────── */
.receipt {
  position: relative; margin: 14px 10px 0; background: #FFFDF7;
  font-family: var(--f-mono); color: var(--ink);
  padding: 22px 18px 18px; box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.receipt::before, .receipt::after { content: ''; position: absolute; left: 0; right: 0; height: 12px; }
.receipt::before { top: -12px; background: conic-gradient(from 135deg at top, #FFFDF7 90deg, transparent 0) 0 0 / 24px 100%; }
.receipt::after  { bottom: -12px; background: conic-gradient(from -45deg at bottom, #FFFDF7 90deg, transparent 0) 0 0 / 24px 100%; }
.rc-head { text-align: center; border-bottom: 2px dashed var(--ink-3); padding-bottom: 12px; }
.rc-head b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; letter-spacing: .03em; }
.rc-head span { font-size: .78rem; color: var(--ink-2); }
.rc-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rc-name { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.rc-obs { grid-column: 1 / -1; font-size: .78rem; color: var(--red); }
.rc-price { font-weight: 700; white-space: nowrap; }
.rc-ctrl { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.rc-ctrl button { width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--ink); font-weight: 700; font-family: var(--f-body); background: #fff; }
.rc-ctrl span { font-weight: 700; min-width: 18px; text-align: center; }
.rc-ctrl .unit { margin-left: auto; color: var(--ink-3); font-size: .78rem; }
.rc-sug { margin: 14px 0 4px; padding: 12px; border: 2px dashed var(--red); border-radius: 12px; background: #FFF1EC; display: flex; gap: 10px; align-items: center; font-family: var(--f-body); }
.rc-sug-ico { font-size: 1.5rem; }
.rc-sug-txt { flex: 1; font-size: .84rem; line-height: 1.35; }
.rc-sug-txt b { display: block; font-size: .92rem; }
.rc-sug-btn { background: var(--red); color: #fff; font-weight: 800; font-size: .8rem; padding: 9px 11px; border-radius: 10px; white-space: nowrap; }
.rc-mini { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.rc-mini button { flex: 0 0 auto; border: 2px solid var(--ink); background: #fff; border-radius: 10px; padding: 7px 10px; font-size: .78rem; font-weight: 700; font-family: var(--f-body); }
.frete { margin-top: 14px; font-family: var(--f-body); }
.frete-txt { font-size: .86rem; margin-bottom: 6px; }
.frete-bar { height: 10px; border-radius: 6px; border: 2px solid var(--ink); background: #fff; overflow: hidden; }
.frete-bar i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--red) 0 8px, var(--red-deep) 8px 16px); transition: width .5s var(--spring); }
.ticket-label { font-size: 1.05rem; line-height: 1.05; }
.rc-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; font-family: var(--f-body); }
.seg {
  padding: 12px 8px; border-radius: 14px; border: 2px solid var(--ink); background: #fff;
  font-weight: 700; font-size: .92rem; text-align: center; line-height: 1.2;
}
.seg small { display: block; font-weight: 500; font-size: .74rem; color: var(--ink-2); margin-top: 2px; }
.seg.on { background: var(--ink); color: #fff; }
.seg.on small { color: rgba(255,255,255,.7); }
.rc-totals { margin-top: 16px; border-top: 2px dashed var(--ink-3); padding-top: 12px; }
.rc-row { display: flex; justify-content: space-between; font-size: .92rem; padding: 3px 0; }
.rc-row.total { font-size: 1.25rem; font-weight: 700; padding-top: 10px; }
.rc-row .free { color: var(--green); font-weight: 700; }
.rc-actions { padding: 26px var(--gutter) calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.empty { text-align: center; padding: 30px 10px; font-family: var(--f-body); }
.empty b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; text-transform: uppercase; }

/* Checkout */
.co { padding: 16px var(--gutter) 0; }
.co-back { font-weight: 700; font-size: .9rem; color: var(--ink-2); margin-bottom: 8px; }
.co h3 { font-family: var(--f-display); font-weight: 400; font-size: 2rem; text-transform: uppercase; line-height: .95; }
.co-sec { margin-top: 20px; display: grid; gap: 10px; }
.co-label { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.co-grid { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.co-note { font-size: .82rem; color: var(--ink-2); background: var(--paper-2); border-radius: 12px; padding: 10px 12px; line-height: 1.4; }
.co-err { color: var(--red); font-weight: 700; font-size: .9rem; min-height: 1.2em; }
.closed-banner { margin: 14px var(--gutter) 0; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: .9rem; }

/* Pedido confirmado / acompanhamento */
.track { padding: 18px var(--gutter) calc(20px + env(safe-area-inset-bottom)); text-align: center; }
.stamp {
  display: inline-block; margin: 18px auto 8px; padding: 10px 18px;
  border: 5px solid var(--red); border-radius: 12px; color: var(--red);
  font-family: var(--f-display); font-size: 2.6rem; line-height: .9; text-transform: uppercase;
  transform: rotate(-8deg); mix-blend-mode: multiply;
  animation: stamp .55s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp small { display: block; font-size: 1rem; letter-spacing: .1em; }
@keyframes stamp { from { transform: rotate(-8deg) scale(2.6); opacity: 0; } }
.track p { color: var(--ink-2); font-size: .95rem; margin-top: 10px; }
.steps { list-style: none; text-align: left; margin: 22px auto 0; max-width: 340px; position: relative; }
.steps::before { content: ''; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 3px; background: var(--line); }
.steps li { display: flex; align-items: center; gap: 14px; padding: 10px 0; position: relative; color: var(--ink-3); font-weight: 600; }
.steps li i { width: 33px; height: 33px; border-radius: 50%; border: 3px solid var(--line); background: var(--paper); display: grid; place-items: center; font-style: normal; font-size: .95rem; flex-shrink: 0; z-index: 1; }
.steps li.done { color: var(--ink); }
.steps li.done i { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps li.now { color: var(--ink); font-weight: 800; }
.steps li.now i { background: var(--yellow); border-color: var(--ink); animation: pulseY 1.4s infinite; }
@keyframes pulseY { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--yellow) 35%, transparent); } }
.track-items { margin: 18px auto 0; max-width: 340px; text-align: left; font-family: var(--f-mono); font-size: .85rem; color: var(--ink-2); border-top: 2px dashed var(--line); padding-top: 12px; }

/* ── RODAPÉ ─────────────────────────────────────────────── */
.foot { text-align: center; padding: 40px var(--gutter) 130px; background: var(--halftone), var(--red); color: #fff; position: relative; font-size: .9rem; }
.foot img { margin: 0 auto 14px; border-radius: 16px; box-shadow: 0 0 0 3px #fff; }
.foot p + p { margin-top: 4px; opacity: .85; }
.gear { position: absolute; right: 16px; bottom: 96px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.55); text-decoration: none; font-size: 1.1rem; }

/* ── TOAST / FLY / SKELETON ─────────────────────────────── */
.toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); z-index: 90;
  transform: translate(-50%, calc(-100% - 40px)); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: .9rem; visibility: hidden;
  transition: transform .4s var(--spring), visibility 0s .4s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .4s var(--spring); }
.fly { position: fixed; z-index: 95; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); pointer-events: none; opacity: 0; display: grid; place-items: center; font-weight: 900; }
.skeleton { height: 86px; margin: 18px var(--gutter); border-radius: 14px; background: linear-gradient(90deg, var(--paper-2), #fff, var(--paper-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── DESKTOP ────────────────────────────────────────────── */
@media (min-width: 900px) {
  body { background: var(--halftone), var(--red); }
  body > *:not(.scrim):not(.sheet):not(.toast):not(.fly):not(.ticket):not(.live-pill) { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
  .top, .foot { border-radius: 0; }
  .hero, .brabos, .menu, .tabs, .again { background: var(--paper); }
  .ticker { max-width: calc(var(--maxw) + 30px) !important; }
  .brabo { flex-basis: 62%; }
}

/* ── PIX (QR + comprovante) ── */
.pix { margin: 18px auto 0; max-width: 340px; background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 18px; text-align: center; box-shadow: 5px 5px 0 var(--ink); }
.pix h4 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; text-transform: uppercase; }
.pix p { font-size: .84rem; color: var(--ink-2); margin-top: 4px; }
.pix-qr { width: 200px; margin: 12px auto 8px; }
.pix-qr svg { width: 100%; height: auto; display: block; }
.pix-val { font-family: var(--f-display); font-size: 1.8rem; }
.pix .btn { margin-top: 10px; width: 100%; }
.btn.wa { background: #1FAF5A; }
.pix-to { font-size: .78rem !important; }
.pix-hint { font-size: .74rem !important; color: var(--ink-3) !important; }
.pix-ok { display: inline-flex; margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: .86rem; background: #E3F6EA; color: #13753A; }
.pix-wait { background: #FFF1C9; color: #7A5600; }
.pix-link { margin-top: 8px; font-size: .8rem; font-weight: 700; color: #13753A; text-decoration: underline; }
.pix-steps { list-style: none; display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; font-size: .7rem; font-weight: 700; color: var(--ink-3); }
.pix-steps li.now { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pix-steps li.ok { color: #13753A; }
.pix-steps li.ok::before { content: '✓ '; }

/* pedido em aberto */
.live-pill.alert { background: var(--red); border-color: #fff; animation: nudge 1.6s ease-in-out infinite; }
.live-pill.alert .dot { background: #fff; }
@keyframes nudge { 0%, 100% { transform: translateX(-50%); } 50% { transform: translateX(-50%) scale(1.05); } }
.dup { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #FFF1C9; border: 2px solid var(--ink); font-size: .88rem; line-height: 1.4; }
.dup button { display: block; margin-top: 8px; font-weight: 800; text-decoration: underline; }

/* ── Entrega por distância ── */
.geo { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--paper-2); border: 2px dashed var(--ink-3); }
.geo-st { font-size: .88rem; color: var(--ink-2); line-height: 1.4; }
.geo-st b { color: var(--ink); }
.geo-st.ok { color: var(--ink); }
.geo-st small { display: block; font-size: .76rem; color: var(--ink-3); margin-top: 2px; }
.geo-btn { justify-self: start; padding: 9px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: .84rem; }
.pix-attach { cursor: pointer; display: flex; }
.pix-attach.busy { opacity: .7; pointer-events: none; }
label.pix-link { display: inline-block; cursor: pointer; }

/* loja fechada (aberta e fechada só no manual, pelo painel) */
.closed-note { margin: 0; padding: 11px var(--gutter); background: var(--ink); color: #fff; font-size: .88rem; font-weight: 500; text-align: center; }
.closed-note b { color: var(--yellow); margin-right: 4px; }

/* ── adicionais e bebidas com foto (motor) ── */
.chip.add-on { background: transparent; border-style: dashed; }
.chip.add-on small { opacity: .7; margin-left: 4px; font-weight: 700; }
.chip.add-on.on { background: var(--ink); color: var(--paper); border-style: solid; }
.can.photo { background: none; border: 0; box-shadow: none; }
.can.photo::before, .can.photo::after { display: none; }
.can.photo img { width: 100%; height: 100%; object-fit: contain; }

/* ── opções do item: sabores, borda, complementos (motor) ── */
.it-desc { color: var(--ink-2); margin-top: 6px; font-size: .92rem; }
.ops { margin-top: 18px; }
.ops-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ops-head b { font-size: 1rem; }
.ops-head span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); white-space: nowrap; }
.ops-head span.req { color: var(--red); }
.ops-sec { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 12px 0 6px; }
.op { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; margin-bottom: 6px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, background .15s; }
.op img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.op-txt { flex: 1; min-width: 0; }
.op-txt b { display: block; font-size: .92rem; }
.op-txt small { display: block; font-size: .78rem; color: var(--ink-2); line-height: 1.3; }
.op-pr { font-size: .8rem; font-weight: 800; white-space: nowrap; }
.op-mark { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink-3); flex: none; }
.op-mark.radio { border-radius: 50%; }
.op.on { border-color: var(--ink); background: var(--paper-2, #f6ead2); }
.op.on .op-mark { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 3px #fff; }
.op.dim { opacity: .45; }
.btn.wait { filter: grayscale(.6); opacity: .85; }

.geo-st.warn { border-color: var(--red); color: var(--red); }

/* ── cupom (bloco gerado pelo motor) ── */
.cupom-campo { display: flex; gap: 8px; }
.cupom-campo .field { flex: 1; text-transform: uppercase; }
.cupom-btn, .cupom-tirar { border: 2px solid var(--ink); border-radius: 10px; padding: 0 14px; font-weight: 800; background: var(--yellow); color: var(--ink); min-height: 44px; text-transform: uppercase; }
.cupom-ok { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 2px dashed var(--green); border-radius: 10px; background: color-mix(in srgb, var(--green) 10%, transparent); }
.cupom-tirar { min-height: 34px; background: transparent; }
.cupom-erro { color: var(--red); font-weight: 700; font-size: .86rem; margin-top: 8px; }
.rc-row.desconto span:last-child { color: var(--green); font-weight: 700; }
