/* Yonder — cart maker for Wonder.
   Soft-dark brushed-steel canvas, opaque content, glass ONLY in the floating
   layer (top bar + cart bar), one accent (Yonder steel-blue), concentric corners,
   calm spring motion. Real Wonder photos and logos are the colour. */

:root {
  --bg: #0d0e10;
  --bg-2: #111316;
  --surface: #181b1f;      /* opaque steel panel */
  --surface-2: #20242a;
  --surface-3: #2a2f36;
  --hair: rgba(255, 255, 255, .08);
  --hair-2: rgba(255, 255, 255, .15);
  --bevel-hi: rgba(255, 255, 255, .12);   /* top machined edge */
  --text: #f1f3f6;
  --muted: #a0a8b3;
  --muted-2: #6f7782;
  --accent: #86b0da;       /* Yonder steel-blue */
  --accent-hi: #a8c9e8;
  --accent-ink: #091420;
  --accent-soft: rgba(134, 176, 218, .14);
  --star: #f5b83d;
  --bad: #ff6b6b;
  --panel: linear-gradient(180deg, #1c2025 0%, #15181c 100%);
  --brush: repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, rgba(0,0,0,.02) 1px 2px);
  --glass: rgba(20, 23, 27, .68);
  --glass-line: rgba(255, 255, 255, .12);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .75);
  --r-card: 18px;
  --r-lg: 24px;
  --r-md: 14px;
  --r-pill: 980px;
  --gutter: 16px;
  --topbar-h: 60px;
  --spring: cubic-bezier(.22, .8, .25, 1);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 680px at 78% -14%, rgba(134, 176, 218, .07), transparent 60%),
    linear-gradient(180deg, #15181c 0%, var(--bg) 52%),
    var(--brush), var(--bg);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
body.modal-open { overflow: hidden; }
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:disabled { cursor: default; }
input { font-family: inherit; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
[hidden] { display: none !important; }
.i { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -0.25em; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.screen h1:focus, .screen h2:focus, .sheet:focus { outline: none; }
.yonder { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em; color: var(--accent); }

/* ── floating glass top bar ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  border-bottom: 1px solid var(--glass-line);
}
.topbar-in { max-width: 1160px; margin: 0 auto; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.brand-logo { height: 18px; width: auto; display: block; }
.brand .yonder { font-size: 21px; }
.brand-sub { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.addr-chip {
  margin-left: auto; min-width: 0; max-width: min(46vw, 420px);
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px 0 10px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--hair);
  font-size: 13px; font-weight: 550; color: var(--text);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.addr-chip .i { color: var(--accent); width: 16px; height: 16px; }
.addr-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 50%; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--hair);
  transition: transform .18s var(--spring), background .18s var(--ease);
}
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.9); background: var(--surface-3); }

/* ── layout ─────────────────────────────────────────────────────────── */
#app { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter) 120px; }
.start .hero, .menu { max-width: 760px; margin: 0 auto; }

/* ── start / hero ───────────────────────────────────────────────────── */
.start { min-height: 100dvh; display: grid; align-content: center; }
.hero { padding: 34px 2px; }
.hero-mark { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 30px; color: var(--muted); }
.hero-mark .yonder { font-size: 24px; }
.hero-mark-sep { width: 1px; height: 18px; background: var(--hair-2); }
.hero-mark-for { font-size: 12.5px; font-weight: 500; letter-spacing: 0; }
.wonder-logo { display: block; width: 100px; height: auto; }
.welcome { color: var(--accent-hi); font-size: 14px; margin: 0 0 12px; }
.hero-title { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(34px, 8.5vw, 50px); line-height: 1.02; font-weight: 750; letter-spacing: -0.04em; }
.hero-sub { margin: 0 0 26px; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 42ch; }

.start-card {
  background: var(--panel); border: 1px solid var(--hair); border-top-color: var(--bevel-hi);
  border-radius: var(--r-lg); padding: 16px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  padding: 4px; margin-bottom: 12px;
  background: var(--bg-2); border: 1px solid var(--hair); border-radius: var(--r-pill);
}
.seg-opt {
  position: relative; z-index: 1; padding: 10px 0; border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 650; color: var(--muted);
  transition: color .25s var(--ease);
}
.seg-opt.is-on { color: var(--text); }
.seg-thumb {
  position: absolute; z-index: 0; top: 4px; left: 4px;
  width: calc(50% - 4px); height: calc(100% - 8px);
  background: var(--surface-3); border: 1px solid var(--hair-2); border-radius: var(--r-pill);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.5);
  transition: transform .34s var(--spring);
}
.seg[data-on="PICKUP"] .seg-thumb { transform: translateX(100%); }

.field {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 54px; margin-bottom: 12px;
  background: var(--bg-2); border: 1px solid var(--hair); border-radius: var(--r-md);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-ico { color: var(--muted); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font-size: 16px; outline: none; }
.field input::placeholder { color: var(--muted-2); }
.pickup-note { margin: -4px 2px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pickup-note b { color: var(--accent-hi); font-weight: 600; }
.suggest { margin: -6px 0 12px; background: var(--surface-2); border: 1px solid var(--hair); border-radius: var(--r-md); overflow: hidden; }
.sug-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 13px; color: var(--text); border-bottom: 1px solid var(--hair); }
.sug-item:last-child { border-bottom: 0; }
.sug-item:hover, .sug-item:active { background: var(--surface-3); }
.sug-item > .i { color: var(--muted); width: 16px; height: 16px; }
.sug-txt { display: flex; flex-direction: column; min-width: 0; }
.sug-txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* one primary action per screen: solid steel-blue */
.cta {
  width: 100%; min-height: 52px; padding: 0 18px; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid rgba(255, 255, 255, .18); border-bottom-color: rgba(0, 0, 0, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 22px -12px rgba(134, 176, 218, .55);
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  transition: transform .16s var(--spring), filter .2s var(--ease), opacity .2s, background .2s var(--ease);
}
.cta:active { transform: scale(.975); }
.cta:disabled { opacity: .5; pointer-events: none; }
.cta.pending { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); border-color: var(--hair-2); }
.cta.loading { color: transparent; position: relative; }
.cta.loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
  border: 2.5px solid rgba(3, 20, 13, .25); border-top-color: var(--accent-ink);
  border-radius: 50%; animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ghost {
  width: 100%; height: 48px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--hair);
  color: var(--text); font-size: 15px; font-weight: 600;
  transition: background .18s var(--ease), transform .16s var(--spring);
}
.ghost:active { transform: scale(.98); background: var(--surface-3); }
.start-err { margin: 12px 2px 0; font-size: 13.5px; color: var(--bad); line-height: 1.45; }
.start-status { color: var(--accent-hi); font-size: 13px; line-height: 1.5; text-align: center; margin: 14px 0 0; }
.linkbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 14px auto 0; padding: 10px; background: none; color: var(--muted); font-size: 13.5px; font-weight: 550; }
.linkbtn .i { width: 17px; height: 17px; }
.linkbtn:hover, .linkbtn:active { color: var(--text); }
.how-it-works { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin: 24px 0 18px; padding-left: 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.how-it-works li::marker { color: var(--accent); font-weight: 700; }
.home-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.home-note button { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; vertical-align: middle; border-radius: 50%; color: var(--muted); }
.home-note button .i { width: 20px; height: 20px; }
.home-note button:hover { background: var(--accent-soft); color: var(--accent-hi); }
.fortune { max-width: 38ch; margin: 10px auto; text-align: center; font-size: 14px; color: var(--accent-hi); line-height: 1.5; }

/* ── browse ─────────────────────────────────────────────────────────── */
.browse-head { padding: 24px 0 18px; }
.browse-head h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: 28px; font-weight: 750; letter-spacing: -0.035em; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 48px;
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-pill);
  color: var(--muted); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search:focus-within { border-color: var(--hair-2); box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font-size: 15.5px; outline: none; }
.search input::placeholder { color: var(--muted-2); }
.browse-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.restaurant-filters { display: flex; gap: 8px; }
.filter-chip { height: 38px; padding: 0 15px; border: 1px solid var(--hair); border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 600; transition: background .18s, color .18s, border-color .18s; }
.filter-chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #0d0e10; }
.restaurant-count { margin: 0; color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 16px; }
.card { display: block; text-align: left; border-radius: var(--r-card); min-width: 0; transition: transform .2s var(--spring); }
.card-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-card);
  background: var(--panel); border: 1px solid var(--hair); overflow: visible;
}
.card-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: var(--surface-2); }
.card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); pointer-events: none; }
.card.not-open .card-cover { filter: saturate(.75) brightness(.72); }
.card-status {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: var(--r-pill); background: rgba(10, 12, 14, .74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text); font-size: 12px; font-weight: 600;
}
.card-status .i { width: 13px; height: 13px; color: var(--muted); }
.card-logo {
  position: absolute; left: 12px; bottom: -18px; z-index: 1;
  width: 48px; height: 48px; border-radius: 13px; overflow: hidden;
  display: grid; place-items: center; font-weight: 750; font-size: 16px;
  background: #fff; color: #1a1d21;
  box-shadow: 0 0 0 3px var(--bg), 0 6px 14px -6px rgba(0,0,0,.8);
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.card-body { padding: 26px 4px 0; }
.card-top { display: flex; align-items: baseline; gap: 10px; }
.card-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 680; letter-spacing: -0.02em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { margin-top: 3px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 13px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.rating .i { width: 13px; height: 13px; color: var(--star); vertical-align: 0; }
.rating small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }

.empty { padding: 40px 8px; text-align: center; }
.grid-empty { grid-column: 1 / -1; }
.empty-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--muted); border: 1px solid var(--hair-2); }
.empty-ico .i { width: 24px; height: 24px; }
.empty h3 { margin: 16px 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.empty p { margin: 0 auto; max-width: 34ch; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.empty .ghost { max-width: 260px; margin: 20px auto 0; display: block; }
.empty .linkbtn { max-width: 260px; }

/* ── menu: store header ─────────────────────────────────────────────── */
.store-hero { padding-top: 16px; }
.store-cover {
  position: relative; aspect-ratio: 21 / 8; border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(120% 140% at 20% 0%, #2a3038 0%, #16191d 60%);
  border: 1px solid var(--hair);
}
.store-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-cover.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(13, 14, 16, .55)); }
.store-id { position: relative; z-index: 1; margin: -38px 0 0 16px; }
.store-logo {
  width: 76px; height: 76px; flex: none; border-radius: 20px; overflow: hidden; background: #fff;
  display: grid; place-items: center; box-shadow: 0 0 0 4px var(--bg), 0 10px 24px -10px rgba(0,0,0,.9);
}
.store-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.store-logo.no-img::before { content: attr(data-i); font-weight: 800; font-size: 24px; color: #1a1d21; }
.store-id-text { min-width: 0; margin: 12px 0 0 -16px; }
.store-id h2 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 750; letter-spacing: -0.035em; line-height: 1.12; }
.store-meta { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.dot-sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); margin: 0 8px; }
.store-addr {
  display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-md);
}
.store-addr .i { color: var(--accent); width: 18px; height: 18px; margin-top: 1px; }
.store-addr span { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.store-addr b { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.store-addr small { font-size: 12.5px; color: var(--muted); }
.store-status { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 13px; color: var(--muted); }
.store-status .i { width: 15px; height: 15px; }

.menu-tools {
  position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top)); z-index: 6;
  margin: 18px calc(var(--gutter) * -1) 0; padding: 10px var(--gutter) 0;
  background: var(--bg); border-bottom: 1px solid var(--hair);
  box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax);   /* full-bleed band */
}
.cat-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 10px; scroll-padding: 0 16px; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav:empty { display: none; }
.cat-nav button { flex: none; height: 34px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background .18s, color .18s; }
.cat-nav button:hover { color: var(--text); }
.cat-nav button[aria-current] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair-2); }

.cat { margin-top: 18px; scroll-margin-top: calc(var(--topbar-h) + 124px); }
.cat-title { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; padding: 6px 2px; font-family: var(--font-display); font-size: 20px; font-weight: 720; letter-spacing: -0.03em; }
.cat-title small { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; }
.rows { display: grid; grid-template-columns: 1fr; }
.row {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left;
  padding: 16px 2px; border-bottom: 1px solid var(--hair); border-radius: 0;
  transition: background .16s ease, opacity .16s ease;
}
.row:active { opacity: .7; }
.row-main { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.row-name { font-size: 15.5px; font-weight: 640; letter-spacing: -0.015em; line-height: 1.3; }
.row-desc { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 10px; }
.row-price { font-size: 14px; color: var(--text); font-weight: 620; font-variant-numeric: tabular-nums; }
.from { font-weight: 500; color: var(--muted); font-size: .92em; }
.cz { font-size: 11.5px; font-weight: 550; color: var(--muted-2); }
.row-media { position: relative; flex: none; }
.row-img { display: block; width: 104px; height: 104px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.row-add {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--hair-2); color: var(--text);
  font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums;
  transition: transform .16s var(--spring), background .18s;
}
.row-add .i { width: 19px; height: 19px; }
.row.has-img .row-add { position: absolute; right: -6px; bottom: -6px; background: #f1f3f6; color: #0d0e10; border-color: transparent; box-shadow: 0 0 0 3px var(--bg), 0 4px 10px -4px rgba(0,0,0,.7); }
.row .row-add.in-cart { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.row:active .row-add { transform: scale(.88); }

/* ── floating glass cart bar ────────────────────────────────────────── */
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45;
  width: min(92vw, 520px);
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px 0 12px; height: 58px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .8), 0 8px 24px -12px rgba(134, 176, 218, .6), inset 0 1px 0 rgba(255,255,255,.25);
  transition: box-shadow .2s ease, transform .16s var(--spring);
}
.cartbar:active { transform: translateX(-50%) scale(.98); }
.cartbar-count {
  display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px;
  background: rgba(3, 20, 13, .9); color: var(--accent-hi); border-radius: var(--r-pill);
  font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.cartbar-label { flex: 1; text-align: left; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.cartbar-total { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── sheets (options / cart / code) ─────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet {
  position: relative; width: min(560px, 100%);
  max-height: 90dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--hair); border-bottom: 0;
  border-radius: 26px 26px 0 0; padding: 12px 20px 0;
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .85);
}
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--hair-2); margin: 0 auto 14px; }
.sheet-close { position: absolute; right: 12px; top: 12px; z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text); background: rgba(32, 36, 42, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .16s, transform .16s; }
.sheet-close .i { width: 18px; height: 18px; }
.sheet-close:active { transform: scale(.92); }
.sheet-head { padding-right: 36px; }
.sheet-head h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 22px; font-weight: 740; letter-spacing: -0.03em; line-height: 1.2; }
.sheet-head p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.sheet-head .sheet-price { margin: 0 0 8px; font-size: 16px; font-weight: 650; color: var(--text); }
.sheet-head .sheet-price:empty { display: none; }
.item-sheet.has-photo { padding-top: 0; }
.item-sheet.has-photo .sheet-grip { display: none; }
.item-sheet.has-photo .sheet-head { padding-right: 0; }
.sheet-photo { margin: 0 -20px 16px; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-body { padding: 4px 0 12px; }
.opt-group { padding: 14px 0 6px; border-top: 1px solid var(--hair); border-radius: 4px; }
.opt-group.flag { animation: flag .9s var(--ease); }
@keyframes flag { 0%, 100% { background: transparent; } 25% { background: var(--accent-soft); } }
.opt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.opt-group h4 { margin: 0; font-size: 15.5px; font-weight: 680; letter-spacing: -0.015em; }
.opt-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.req { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 650; color: var(--text); background: var(--surface-3); flex: none; }
.req.done { color: var(--accent-hi); background: var(--accent-soft); }
.req .i { width: 13px; height: 13px; }
.opt-hint { font-size: 12px; color: var(--muted); font-weight: 550; flex: none; }
.opt {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 12px; margin-top: 8px; width: 100%; text-align: left;
  border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--hair);
  font-size: 14.5px; transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--hair-2); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--hair-2); flex: none; display: grid; place-items: center; transition: border-color .15s; }
.opt.sel .dot { border-color: var(--accent); }
.opt.sel .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.opt-name { flex: 1; min-width: 0; }
.opt-price { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.opt.sel .opt-price { color: var(--text); }
.opt.multi { cursor: default; }
.opt-step { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 2px; }
.opt-step button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--text); }
.opt-step button .i { width: 16px; height: 16px; }
.opt-step button:disabled { color: var(--muted-2); }
.opt-step button:active:not(:disabled) { background: var(--surface-3); }
.opt-step b { min-width: 20px; text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet-loading { display: flex; align-items: center; gap: 10px; padding: 24px 4px; color: var(--muted); font-size: 14px; }
.sheet-loading .spin { width: 18px; height: 18px; border: 2.5px solid var(--hair-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .85s linear infinite; }
.sheet-note { color: var(--muted); font-size: 13.5px; padding: 10px 0; }

.sheet-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  margin: 0 -20px; padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(24, 27, 31, .9), var(--surface) 30%); border-top: 1px solid var(--hair);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sheet-foot.col { flex-direction: column; gap: 8px; }
.sheet-foot .cta { flex: 1; }
.qty { display: flex; align-items: center; gap: 2px; background: var(--bg-2); border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 4px; flex: none; }
.qty button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text); }
.qty button .i { width: 18px; height: 18px; }
.qty button:hover { background: var(--surface-2); }
.qty button:active { background: var(--surface-3); }
.qty span { min-width: 24px; text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty.sm { padding: 2px; }
.qty.sm button { width: 34px; height: 34px; }
.qty.sm button .i { width: 16px; height: 16px; }
.qty.sm span { min-width: 20px; font-size: 14px; }

/* cart */
.cart-store { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; padding: 12px; background: var(--bg-2); border: 1px solid var(--hair); border-radius: var(--r-md); }
.cart-store:empty { display: none; }
.cart-store > div:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-store b { font-size: 15px; font-weight: 680; }
.cart-store small { display: flex; align-items: flex-start; gap: 5px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.cart-store small .i { width: 14px; height: 14px; color: var(--accent); margin-top: 1px; }
.cart-store-logo { width: 44px; height: 44px; flex: none; border-radius: 12px; overflow: hidden; background: #fff; color: #1a1d21; display: grid; place-items: center; font-weight: 800; }
.cart-store-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ── store location: see WHERE the order comes from, change it in one tap ─ */
.cart-store { flex-direction: column; align-items: stretch; gap: 10px; }
.cart-store-row { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.cart-store-id { flex: 1 1 auto; min-width: 0; }
.cart-store-id b { font-size: 15px; font-weight: 680; }
.change-store {
  flex: none; font: inherit; font-size: 12.5px; font-weight: 650; line-height: 1;
  color: var(--accent-hi); background: var(--accent-soft);
  border: 1px solid rgba(134, 176, 218, .32); border-radius: 999px;
  padding: 7px 13px; cursor: pointer; transition: background .15s ease, transform .1s ease;
}
.change-store:hover { background: rgba(134, 176, 218, .22); }
.change-store:active { transform: scale(.97); }
.menu-change { display: inline-flex; margin: 10px 0 0; }

.store-loc {
  display: flex; align-items: flex-start; gap: 9px; text-align: left;
  padding: 11px 12px; background: var(--bg-2);
  border: 1px solid var(--hair); border-radius: var(--r-md);
}
.store-loc .i { flex: none; width: 17px; height: 17px; color: var(--accent); margin-top: 1px; }
.store-loc-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.store-loc-t b { font-size: 14px; font-weight: 640; letter-spacing: -.01em; line-height: 1.38; }
.store-loc-t small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.store-loc.far { border-color: rgba(240, 180, 41, .5); background: rgba(240, 180, 41, .09); }
.store-loc.far .i { color: #f0b429; }
.loc-warn { color: #f5c451 !important; font-weight: 650 !important; }

.code-loc { margin: -4px auto 16px; max-width: 320px; }
.cart-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hair); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.cart-line-img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.cart-line-main { flex: 1; min-width: 0; }
.cart-line-name { font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.cart-line-opt { margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cart-line-price { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.cart-sum { padding: 4px 0 14px; }
.cart-sum:empty { display: none; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 15px; }
.sum-row span { color: var(--muted); }
.sum-row b { font-size: 17px; font-weight: 720; font-variant-numeric: tabular-nums; }
.price-note { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted-2); }
.cart-empty { padding: 10px 0 20px; text-align: center; }

/* code result */
.sheet.code { text-align: center; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.code-check { width: 60px; height: 60px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center;
  color: var(--accent-hi); background: var(--accent-soft); animation: pop .5s var(--spring) both; }
.code-check svg path { stroke-dasharray: 24; stroke-dashoffset: 0; animation: draw-check .45s .15s both; }
@keyframes draw-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.code-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 23px; font-weight: 740; letter-spacing: -0.03em; }
.code-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.code-box {
  width: 100%; padding: 20px; border-radius: var(--r-card);
  background: var(--bg-2); border: 1px dashed var(--hair-2);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  transition: transform .16s var(--spring), border-color .2s;
}
.code-box:active { transform: scale(.98); }
.code-box span { font-size: 36px; font-weight: 800; letter-spacing: .18em; color: var(--text); font-variant-numeric: tabular-nums; }
.code-box small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.code-box small .i { width: 14px; height: 14px; }
.code-hint { margin: 16px 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 80; padding: 11px 18px; border-radius: var(--r-pill);
  max-width: calc(100vw - 32px); width: max-content; text-align: center;
  background: var(--surface-3); border: 1px solid var(--hair-2); color: var(--text);
  font-size: 14px; font-weight: 550; box-shadow: var(--shadow);
}
body.has-cartbar .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }

/* lookup */
.lookup-field { margin: 6px 0 12px; }
.lookup-field input { letter-spacing: .14em; text-transform: uppercase; font-size: 17px; }
.lookup-field input::placeholder { letter-spacing: normal; }
#lookupSheet .sheet { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.lk-card { margin-top: 16px; background: var(--bg-2); border: 1px solid var(--hair); border-radius: var(--r-md); overflow: hidden; }
.lk-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--hair); font-size: 14px; }
.lk-row:last-child { border-bottom: 0; }
.lk-row > span { color: var(--muted); flex: none; }
.lk-row b { text-align: right; font-weight: 600; min-width: 0; }
.lk-row b.cap { text-transform: capitalize; }
.lk-items { margin-top: 12px; }
.lk-item { display: flex; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--hair); font-size: 14px; }
.lk-item:last-child { border-bottom: 0; }
.lk-item .q { color: var(--accent-hi); font-weight: 700; min-width: 26px; flex: none; }

/* celebration: a few quiet confetti bits, not emoji */
.snack-party { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 90; }
.snack-party span { position: absolute; left: var(--x); top: -20px; width: 8px; height: 14px; border-radius: 2px; background: var(--accent); animation: snack-fall 1.8s var(--delay) cubic-bezier(.3,.1,.6,1) forwards; }
.snack-party span[data-tone="1"] { background: #f1f3f6; width: 7px; height: 7px; border-radius: 50%; }
.snack-party span[data-tone="2"] { background: var(--star); height: 10px; }
@keyframes snack-fall { to { transform: translateY(105vh) rotate(var(--spin)); opacity: .2; } }

/* skeletons */
.menu-skeleton { padding-top: 18px; }
.skeleton-row { display: flex; gap: 24px; align-items: center; padding: 18px 2px; border-bottom: 1px solid var(--hair); }
.skeleton-row > div { flex: 1; }
.skeleton { display: block; border-radius: 6px; background: var(--surface-2); animation: skeleton-breathe 1.6s ease-in-out infinite alternate; }
.sk-cat { width: 120px; height: 20px; margin: 4px 2px 8px; }
.sk-title { height: 16px; width: 60%; margin-bottom: 10px; }
.sk-description { height: 12px; width: 88%; margin-bottom: 14px; }
.sk-price { height: 12px; width: 52px; }
.sk-picture { width: 104px; height: 104px; border-radius: 14px; }
@keyframes skeleton-breathe { from { opacity: .45; } to { opacity: .85; } }

/* ── pointer + wide screens ─────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); }
  .card:hover .card-media { border-color: var(--hair-2); }
  .card:active { transform: scale(.985); }
  .row:hover { background: rgba(255, 255, 255, .025); }
  .cta:hover { filter: brightness(1.07); }
  .addr-chip:hover { background: var(--surface-3); }
  .filter-chip:hover:not([aria-pressed="true"]) { color: var(--text); border-color: var(--hair-2); }
  .sheet-close:hover { background: var(--surface-3); }
  .code-box:hover { border-color: var(--accent); }
  .cartbar:hover { filter: brightness(1.05); }
}
@media (min-width: 700px) {
  :root { --gutter: 24px; }
  .sheet-wrap { align-items: center; padding: 28px; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--hair); max-height: min(86dvh, 800px); }
  .sheet-grip { display: none; }
  .sheet { padding-top: 20px; }
  .item-sheet.has-photo { padding-top: 0; }
  .sheet-foot { padding-bottom: 16px; }
  .browse-head { padding-top: 34px; }
  .browse-head h2 { font-size: 34px; }
  .browse-head .search { max-width: 560px; }
  .store-hero { padding-top: 22px; }
  .store-id h2 { font-size: 32px; }
  .store-logo { width: 88px; height: 88px; border-radius: 22px; }
  .store-id { margin-left: 22px; margin-top: -44px; }
  .store-id-text { margin-left: -22px; }
}
@media (min-width: 1000px) {
  .menu { max-width: 1000px; }
  .rows { grid-template-columns: 1fr 1fr; column-gap: 28px; }
}
@media (max-width: 420px) {
  .brand-sub { display: none; }
  .how-it-works { grid-template-columns: 1fr; gap: 8px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .row-img { width: 92px; height: 92px; }
  .store-cover { aspect-ratio: 16 / 8; }
  .store-id h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .skeleton { opacity: .65; }
  .card:hover, .cta:hover { transform: none; }
  .snack-party { display: none; }
}

/* while a sheet is open the bottom belongs to its primary action */
body.modal-open .toast { bottom: auto; top: calc(14px + env(safe-area-inset-top)); }
.sheet-head .cart-store { margin-right: -36px; }
