/* Phone ordering page. Mobile first, big touch targets, clean white cards with one bold accent colour.
   Colours are tokens so brand.css can repaint the whole page: --accent drives buttons, badges, prices and the
   promo banners; --brand-primary only the keyboard focus ring. Class names are shared with the scripts; change
   them together. */
:root {
  --accent: #f25c05; --accent-hover: #d94e00; --accent-deep: #b23d00; --accent-tint: #fff0e6; --accent-soft: #ffd9bf;
  --brand-primary: #0f6cbd; --brand-hover: #115ea3; --brand-pressed: #0f548c; --brand-on: #fff; --brand-tint-20: #ebf3fc;
  --bg: #f5f6f8; --card: #fff; --text: #1b1d21; --muted: #6b7078; --line: #eceef2; --chip: #eef0f4;
  --ok: #0d7a2f; --ok-bg: #e4f6e9; --warn: #8a5a00; --warn-bg: #fff4ce; --bad: #b3261e; --bad-bg: #fde7e9;
  --radius: 24px; --radius-sm: 16px;
  --shadow: 0 10px 30px rgba(20, 24, 40, .12); --shadow-sm: 0 2px 10px rgba(20, 24, 40, .07);
  --on-accent: #fff;
  --ink: #14161a; --lime: #c8f400;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101215; --card: #1b1e23; --text: #f2f3f5; --muted: #a2a8b1; --line: #2b2f36; --chip: #262a31;
    --accent-tint: #3a2214; --accent-soft: #5a3018; --warn: #f7d68b; --warn-bg: #3a2f10; --bad: #f2a29c; --bad-bg: #3d1a1a;
    --ok: #6fd36f; --ok-bg: #16301d;
    --shadow: 0 10px 30px rgba(0,0,0,.55); --shadow-sm: 0 2px 10px rgba(0,0,0,.45); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.locked { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
.pad { padding: 24px; text-align: center; }
main { max-width: 720px; margin: 0 auto; }

/* ── Header: logo, where you are ordering, and the order bag ─────────────── */
.top { background: var(--bg); padding: calc(12px + env(safe-area-inset-top)) 16px 6px; position: sticky; top: 0; z-index: 4; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px; pointer-events: none;
  background: linear-gradient(var(--bg), transparent); }
.top-bar { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-plate { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 14px; background: var(--card); border-radius: 16px;
  box-shadow: var(--shadow-sm); text-decoration: none; flex: none; max-width: 46%; }
.logo { display: block; height: 30px; width: auto; max-width: 100%; }
.logo-text { font-weight: 900; font-size: 1.1rem; letter-spacing: -.01em; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo[hidden], .logo-text[hidden] { display: none; }
.top-station { flex: 1; min-width: 0; text-align: left; }
.top-eyebrow { display: flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.top-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.top h1 { font-size: 1rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.bag { position: relative; flex: none; width: 48px; height: 48px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; cursor: pointer; color: var(--text); }
.bag svg { width: 22px; height: 22px; }
.bag .bag-n { position: absolute; right: -4px; top: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: .75rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.bag[hidden], .bag .bag-n[hidden] { display: none; }
.top-sub { display: none; }
.banner { padding: 10px 16px; background: var(--warn-bg); color: var(--warn); font-size: .9rem; text-align: center; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 18px; min-height: 54px; padding: 0 22px; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:active { background: var(--accent-hover); transform: translateY(1px); }
.btn.danger { color: var(--bad); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, .item-main:focus-visible, .cart-pill:focus-visible, .chip:focus-visible, .bag:focus-visible, .promo:focus-visible {
  outline: 3px solid var(--brand-primary); outline-offset: 2px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: var(--chip); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 50%; }

/* ── Promo banners: the ad strip at the top of the menu, built from the menu's own popular dishes ─────────── */
.promos { position: relative; margin: 8px 0 4px; }
.promo-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 10px; scrollbar-width: none; scroll-padding: 0 16px; }
.promo-track::-webkit-scrollbar { display: none; }
.promo { position: relative; flex: 0 0 min(88%, 430px); min-height: 176px; scroll-snap-align: start; border: 0; border-radius: 28px; padding: 20px 18px; text-align: left; cursor: pointer; overflow: hidden;
  color: #fff; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%); box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 30%, transparent); isolation: isolate; }
.promo.t1 { background: linear-gradient(135deg, #1d2127 0%, #0c0e11 100%); box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.promo.t2 { background: linear-gradient(135deg, #2f9e44 0%, #17692b 100%); box-shadow: 0 14px 30px rgba(47,158,68,.3); }
.promo::before { content: ""; position: absolute; z-index: -1; right: -40px; top: -50px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); }
.promo::after { content: ""; position: absolute; z-index: -1; right: 60px; bottom: -70px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.08); }
.promo-copy { max-width: 58%; display: grid; gap: 6px; position: relative; }
.promo-tag { justify-self: start; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.2); }
.promo.t1 .promo-tag { background: var(--lime); color: #141a00; }
.promo-title { font-size: 1.45rem; line-height: 1.08; font-weight: 900; letter-spacing: -.01em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.promo-price { font-size: .95rem; font-weight: 700; opacity: .95; }
.promo-go { justify-self: start; margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; color: #14161a; font-weight: 800; font-size: .88rem; }
.promo.t1 .promo-go { background: var(--lime); color: #141a00; }
.promo-art { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 42%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.18);
  box-shadow: 0 12px 28px rgba(0,0,0,.3), 0 0 0 6px rgba(255,255,255,.18); display: grid; place-items: center; }
.promo-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-art .ph { font-size: 2.6rem; font-weight: 900; opacity: .6; }
.promo-info { background: linear-gradient(135deg, var(--accent-soft), var(--accent-tint)); color: var(--text); box-shadow: var(--shadow-sm); cursor: default; }
.promo-info .promo-tag { background: var(--accent); color: var(--on-accent); }
.promo-info .promo-art { background: var(--card); box-shadow: 0 8px 20px rgba(0,0,0,.12); font-size: 3rem; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: width .2s, background .2s; }
.dots i.on { width: 20px; background: var(--accent); }

/* ── Search and category chips ─────────────────────────────────────────── */
.search { padding: 8px 16px 4px; position: relative; }
.search input { width: 100%; min-height: 52px; border-radius: 18px; border: 2px solid transparent; background: var(--card); box-shadow: var(--shadow-sm); padding: 0 18px 0 46px; }
.search input:focus { border-color: var(--accent); outline: 0; }
.search::before { content: ""; position: absolute; left: 32px; top: 50%; width: 16px; height: 16px; margin-top: -6px; border: 2px solid var(--muted); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 46px; top: 50%; width: 7px; height: 2px; margin-top: 7px; background: var(--muted); transform: rotate(45deg); border-radius: 2px; }
.chips-wrap { position: sticky; top: calc(72px + env(safe-area-inset-top)); z-index: 3; background: linear-gradient(var(--bg) 82%, transparent); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px 0 8px; border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.chip .ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--chip); font-size: 1.1rem; line-height: 1; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.chip[aria-pressed="true"] .ic { background: rgba(255,255,255,.25); }

/* ── Dish cards ────────────────────────────────────────────────────────── */
.shop { max-width: 760px; margin: 0 auto; }
.shop-main { min-width: 0; }
.menu { padding: 0 16px 16px; display: grid; gap: 8px; }
.section-title { margin: 18px 2px 6px; font-size: 1.25rem; font-weight: 900; letter-spacing: -.01em; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section-title small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 340px) { .grid { grid-template-columns: 1fr; } }

.item { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; padding: 8px; }
.item.off { opacity: .6; }
.item-main { display: flex; flex-direction: column; flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.item-main:disabled { cursor: default; }
.media { position: relative; aspect-ratio: 1 / 1; border-radius: 18px; background: var(--band, var(--accent-tint)); overflow: hidden; }
.media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; font-weight: 900; color: #333; opacity: .28; text-transform: uppercase; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.item:active .media img { transform: scale(1.04); }
.item-body { padding: 10px 6px 4px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.item-name { font-weight: 800; font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; }
.item-desc { color: var(--muted); font-size: .76rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 2px; }
.price { font-weight: 900; font-size: 1.05rem; color: var(--accent); margin-top: auto; padding-top: 6px; padding-right: 52px; min-height: 46px; display: flex; align-items: center; }
.allergy { font-size: .68rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--brand-tint-20); color: var(--text); }
.tag.off { background: var(--bad-bg); color: var(--bad); }
.badge { position: absolute; left: 8px; top: 8px; z-index: 1; background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 800;
  border-radius: 999px; padding: 3px 10px; box-shadow: var(--shadow-sm); }
.badge.off { background: #3b3735; }
.badge.hot { background: var(--ink); color: var(--lime); }
.badge.diet { background: #2f9e44; }
.fab { position: absolute; right: 12px; bottom: 12px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-size: 1.35rem; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper button.add { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 38%, transparent); }
.stepper button:disabled { opacity: .4; box-shadow: none; }
.stepper .n { min-width: 28px; text-align: center; font-weight: 800; }
.fab.stepper { background: var(--card); border-radius: 999px; box-shadow: var(--shadow); padding: 2px; }
.fab.stepper button { width: 40px; height: 40px; }
/* Already in the order: the stepper becomes a full-width bar under the price instead of covering it. */
.item.has-qty .item-body { padding-bottom: 54px; }
.item.has-qty .price { min-height: 0; }
.item.has-qty .fab { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; box-shadow: none; background: var(--accent-tint); }
.item.has-qty .fab .n { font-size: 1.05rem; }
.item.has-qty .price { padding-right: 0; }

/* ── Centered states (closed, error, loading) ──────────────────────────── */
.state { padding: 64px 24px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.state h2 { font-size: 1.4rem; font-weight: 900; }
.state p { color: var(--muted); max-width: 26rem; }
.spinner { width: 40px; height: 40px; border: 5px solid var(--accent-tint); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .btn.primary:active { transform: none; } }

/* ── Call-to-action bar: amount on the left, white pill on the right (cart bar, add to order, pay) ───────── */
.cta, .cart-pill { width: 100%; min-height: 62px; border: 0; border-radius: 22px; padding: 6px 6px 6px 22px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 1.05rem; box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 38%, transparent); }
.cta:active, .cart-pill:active { background: var(--accent-hover); }
.cta:disabled { opacity: .5; box-shadow: none; cursor: default; }
.cta-l { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.foot-row .cta-r { padding: 0 18px; }
.cta-r { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; border-radius: 17px; background: #fff; color: var(--accent-deep); font-weight: 800; font-size: .98rem; white-space: nowrap; }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 18px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 45%); z-index: 5; }
.cart-pill { max-width: 688px; margin: 0 auto; }
.cart-pill .count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.25); color: #fff; font-weight: 900; font-size: .92rem; }

.sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden], .banner[hidden], .cartbar[hidden], .toast[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 18, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s ease-out; }
.sheet-panel { position: relative; width: 100%; max-width: 720px; max-height: 92vh; max-height: 92dvh; background: var(--card); border-radius: 32px 32px 0 0; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: rise .25s ease-out; overflow: hidden; }
.sheet-panel::before { content: ""; width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 10px 22px; }
.sheet-head h2 { font-size: 1.3rem; font-weight: 900; letter-spacing: -.01em; }
.sheet-body { overflow-y: auto; padding: 4px 22px 16px; flex: 1; overscroll-behavior: contain; outline: 0; }
.sheet-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sheet-foot[hidden] { display: none; }
.sheet.has-hero .sheet-panel::before, .sheet.has-hero .sheet-head { display: none; }
.sheet.has-hero .sheet-body { padding: 0; }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.foot-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.foot-row .cta { flex: 1; }
.err { color: var(--bad); background: var(--bad-bg); border-radius: 14px; padding: 10px 14px; font-size: .9rem; }
.hint { color: var(--muted); font-size: .85rem; }
.hint.center { text-align: center; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(112px + env(safe-area-inset-bottom)); z-index: 20; max-width: 600px; margin: 0 auto; padding: 14px 18px;
  border-radius: 16px; background: var(--ink); color: #fff; text-align: center; box-shadow: var(--shadow); font-weight: 600; animation: rise .2s ease-out; }
@media (prefers-reduced-motion: reduce) { .sheet-panel, .sheet-backdrop, .toast { animation: none; } html { scroll-behavior: auto; } }

/* ── Dish detail: photo on top, a card that overlaps it ─────────────────── */
.hero { position: relative; aspect-ratio: 4 / 3; background: var(--band, var(--accent-tint)); overflow: hidden; }
.hero .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4.5rem; font-weight: 900; color: #333; opacity: .25; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-close { position: absolute; left: 14px; top: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #14161a; font-size: 1.7rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); }
.detail-card { position: relative; margin-top: -26px; background: var(--card); border-radius: 28px 28px 0 0; padding: 22px 22px 8px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.detail-name { font-size: 1.45rem; font-weight: 900; letter-spacing: -.01em; line-height: 1.15; overflow-wrap: anywhere; }
.detail-price { font-size: 1.3rem; font-weight: 900; color: var(--accent); white-space: nowrap; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.detail-tags .tag { background: var(--chip); padding: 5px 12px; font-size: .78rem; }
.detail-tags .tag.hot { background: var(--ink); color: var(--lime); }
.detail-tags .tag.diet { background: #e1f4e6; color: #17692b; }
.detail-desc { color: var(--muted); margin: 10px 0 4px; }
.detail-allergy { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 4px 0 8px; }

/* ── Options ───────────────────────────────────────────────────────────── */
.group { margin: 18px 0 8px; padding: 14px 16px 6px; background: var(--bg); border-radius: 20px; }
.group h3 { font-size: 1.02rem; font-weight: 800; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.group .hint { margin-bottom: 6px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 4px 0; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.group > .opt:last-child, .group > .row-opt:last-child { border-bottom: 0; }
.opt .mark { width: 26px; height: 26px; border: 2px solid var(--muted); flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.opt .mark.box { border-radius: 8px; }
.opt[aria-checked="true"] .mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.opt .grow { flex: 1; }
.opt:disabled { opacity: .45; cursor: default; }
.row-opt { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.row-opt .grow { flex: 1; }

/* ── Order bag lines ───────────────────────────────────────────────────── */
.cart-line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line .grow { flex: 1; min-width: 0; }
.cart-line .item-name { font-size: 1rem; }
.cart-price { font-weight: 900; color: var(--accent); margin-top: 2px; }
.thumb { position: relative; width: 68px; height: 68px; border-radius: 18px; flex: none; background: var(--accent-tint); overflow: hidden; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; opacity: .3; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.summary { display: grid; gap: 6px; padding: 12px 16px; background: var(--bg); border-radius: 18px; }
.total-row { font-size: 1.15rem; font-weight: 900; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 2px; }
.total { display: flex; justify-content: space-between; font-size: 1.25rem; font-weight: 900; }

/* ── Checkout and receipt ──────────────────────────────────────────────── */
.panel { margin: 16px; padding: 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: grid; gap: 14px; }
.panel h2 { font-size: 1.25rem; font-weight: 900; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.sum-line .hint { display: block; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input { width: 100%; min-height: 56px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); padding: 0 16px; font-size: 1.25rem; letter-spacing: .02em; }
.field input:focus { border-color: var(--accent); outline: 0; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; min-height: 44px; cursor: pointer; }

/* ── Welcome: dark, glassy first screen with the dishes floating in ────────────────────────────────────── */
body.welcome { padding-bottom: 0; background: var(--ink); }
body.welcome .top, body.welcome .cartbar { display: none; }
body.welcome main { max-width: none; }
.welcome-screen { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--accent) 55%, transparent) 0%, transparent 60%), radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 65%), var(--ink); }
.w-top { padding: calc(18px + env(safe-area-inset-top)) 20px 0; max-width: 560px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.w-top .logo-plate { background: rgba(255,255,255,.95); }
.w-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .8rem; font-weight: 700; max-width: 56%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; box-shadow: 0 0 0 3px rgba(200,244,0,.25); }
.w-hero { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 18px 22px 8px; max-width: 560px; width: 100%; margin: 0 auto; }
.w-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--lime); }
.w-title { font-size: clamp(2.7rem, 15vw, 4.6rem); font-weight: 300; line-height: .98; letter-spacing: -.03em; }
.w-title b { font-weight: 900; display: block; }
.w-title em { font-style: normal; color: var(--lime); }
.w-sub { font-size: 1rem; max-width: 21rem; color: rgba(255,255,255,.78); }
.w-photos { position: relative; height: 150px; margin: 6px 0 0; }
.w-photo { position: absolute; width: 104px; height: 104px; border-radius: 50%; overflow: hidden; border: 4px solid rgba(255,255,255,.9); box-shadow: 0 14px 30px rgba(0,0,0,.45); background: var(--accent-soft); animation: float 6s ease-in-out infinite; }
.w-photo:nth-child(1) { left: 0; top: 24px; }
.w-photo:nth-child(2) { left: 28%; top: 0; width: 128px; height: 128px; animation-delay: -2s; z-index: 1; }
.w-photo:nth-child(3) { left: 62%; top: 30px; animation-delay: -4s; }
.w-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.w-card { position: relative; margin: 0 14px calc(14px + env(safe-area-inset-bottom)); max-width: 532px; width: calc(100% - 28px); align-self: center; padding: 18px; display: grid; gap: 14px; border-radius: 30px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.w-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.w-step { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .74rem; font-weight: 700; color: rgba(255,255,255,.85); }
.w-step i { font-style: normal; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 1.2rem; }
.w-go { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; padding: 6px 6px 6px 22px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--lime); color: #141a00; font-weight: 900; font-size: 1.1rem; text-align: left; box-shadow: 0 10px 28px rgba(200,244,0,.28); }
.w-go small { display: block; font-size: .74rem; font-weight: 700; opacity: .7; }
.w-go .arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 17px; background: #141a00; color: var(--lime); font-size: 1.4rem; flex: none; }
.w-go:active { transform: translateY(1px); }
.w-go:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.w-card .hint { text-align: center; color: rgba(255,255,255,.65); }
@media (prefers-reduced-motion: reduce) { .w-photo { animation: none; } .w-go:active { transform: none; } }


/* ── Payment screens: progress, checkout, waiting, receipt, ended ─────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li { display: grid; justify-items: center; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--muted); position: relative; }
.steps li::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li i { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-weight: 800; background: var(--chip); }
.steps li.now { color: var(--text); } .steps li.now i { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.steps li.done i, .steps li.done::before, .steps li.now::before { background: var(--ok); color: #fff; }
.steps li.now::before { background: var(--ok); }
.thumb.sm { width: 52px; height: 52px; border-radius: 14px; }
.sum-list { display: grid; gap: 10px; }
.sum-line { align-items: center; }
.sum-line .grow { flex: 1; min-width: 0; }
.sum-line .item-name { font-size: .95rem; }
.sum-price { font-weight: 800; white-space: nowrap; }
.field-box { position: relative; }
.field-box input { padding-right: 48px; }
.field-mark { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 900; font-size: 1.2rem; }
.field.ok input { border-color: var(--ok); } .field.ok .field-mark { color: var(--ok); }
.field.bad input { border-color: var(--bad); }
.alert-card { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: var(--bad-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.alert-card[hidden], .help-card[hidden] { display: none; }
.alert-card p { color: var(--text); margin-top: 2px; font-size: .92rem; }
.alert-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bad); color: #fff; font-weight: 900; }
.timebar { height: 6px; border-radius: 6px; background: var(--chip); overflow: hidden; }
.timebar i { display: block; height: 100%; width: 100%; background: var(--ok); border-radius: 6px; transition: width 1s linear, background .4s; }
.timebar.amber i { background: #e8a200; } .timebar.red i { background: var(--bad); }

.waiting { text-align: center; }
.wait-head { display: grid; gap: 6px; justify-items: center; }
.wait-head p { color: var(--muted); }
.phone-anim { position: relative; width: 120px; height: 150px; margin: 6px auto 0; display: grid; place-items: center; }
.phone { position: relative; z-index: 1; width: 64px; height: 112px; border-radius: 16px; border: 4px solid var(--text); background: var(--card); display: grid; align-content: center; justify-items: center; gap: 6px; animation: buzz 2.4s ease-in-out infinite; }
.phone i { width: 18px; height: 4px; border-radius: 4px; background: var(--line); position: absolute; top: 6px; }
.phone b { width: 36px; height: 8px; border-radius: 6px; background: var(--accent); opacity: .85; }
.phone b:nth-of-type(2) { width: 28px; opacity: .5; } .phone b:nth-of-type(3) { width: 20px; opacity: .3; }
.ring { position: absolute; inset: 10px 14px; border-radius: 24px; border: 3px solid var(--accent); opacity: 0; animation: ping 2.4s ease-out infinite; }
.ring.r2 { animation-delay: 1.2s; }
@keyframes ping { 0% { transform: scale(.8); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes buzz { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-4deg); } 88% { transform: rotate(4deg); } 92% { transform: rotate(-3deg); } 96% { transform: rotate(3deg); } }
.wait-steps, .track { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.wait-steps li, .track li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.wait-steps li i, .track li i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); font-style: normal; font-size: .8rem; font-weight: 900; }
.wait-steps li.done, .track li.done { color: var(--text); } .wait-steps li.done i, .track li.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.wait-steps li.now, .track li.now { color: var(--text); } .wait-steps li.now i, .track li.now i { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.track li.ready.now i { animation: none; background: var(--ok); border-color: var(--ok); color: #fff; }
.elapsed { font-variant-numeric: tabular-nums; font-weight: 700; }
.help-card { text-align: left; display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: var(--warn-bg); color: var(--warn); }
.help-card p { color: var(--text); font-size: .92rem; }
.link-btn.armed { color: var(--bad); font-weight: 700; }

.big-ok { text-align: center; color: var(--ok); font-weight: 800; font-size: 1.05rem; }
.ticket { border-radius: 22px; background: var(--accent-tint); border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); overflow: hidden; }
.ticket-top { padding: 16px 12px 8px; text-align: center; display: grid; gap: 2px; }
.order-number { font-size: 3.6rem; font-weight: 900; letter-spacing: .04em; line-height: 1.1; color: var(--accent); overflow-wrap: anywhere; }
.ticket-tear { height: 0; border-top: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); position: relative; margin: 6px 0; }
.ticket-tear::before, .ticket-tear::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); }
.ticket-tear::before { left: -12px; } .ticket-tear::after { right: -12px; }
.ticket-bottom { padding: 8px 16px 16px; display: grid; gap: 8px; text-align: center; }
.mp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.mp-code { font-weight: 900; font-size: 1.15rem; letter-spacing: .06em; overflow-wrap: anywhere; }
.copy-btn { flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--card); font-weight: 800; cursor: pointer; box-shadow: var(--shadow-sm); }
.ready-box { text-align: center; border-radius: 16px; padding: 14px; background: var(--brand-tint-20); font-weight: 700; }
.ready-box[hidden] { display: none; }
.ready-box.now { background: var(--ok); color: #fff; font-size: 1.15rem; }
.ended { display: grid; justify-items: center; }
.ended-ic { margin-top: 36px; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--chip); font-size: 2rem; }
.ended .state { padding-top: 20px; }
@media (prefers-reduced-motion: reduce) { .phone, .ring, .wait-steps li.now i, .track li.now i { animation: none; } .ring { display: none; } .timebar i { transition: none; } }

.payer-row { display: grid; gap: 2px; text-align: left; }
.payer-row[hidden] { display: none; }
.payer-name { font-weight: 800; font-size: 1.05rem; overflow-wrap: anywhere; }
