/* V5 — Swipe Feed: customer web. Mobile = full-screen vertical reel + bottom sheets.
   Desktop (≥1024) = split screen: categories rail · reel · bag/checkout panel. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 400 16px/1.45 var(--font-body);
  overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.display { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: .9; letter-spacing: .02em; margin: 0; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.allergens { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.allergens b { color: var(--sun); font-weight: 700; margin-right: 6px; letter-spacing: .04em; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- Ambient light (colour of the dish on screen) ---------- */
.amb { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.amb i { position: absolute; border-radius: 50%; filter: blur(70px); background: var(--amb); opacity: .5; }
.amb i:first-child { width: 120vw; height: 70vh; left: -10vw; top: 6vh; }
.amb i:last-child { width: 70vw; height: 50vh; right: -30vw; bottom: -10vh; opacity: .28; }

/* ---------- App frame ---------- */
.app { position: fixed; inset: 0; z-index: 1; overflow: hidden; transform-origin: 50% 0; }
.app::before { content: ""; position: absolute; inset: 0 0 auto; height: calc(var(--top-h) + 10px); z-index: 4; pointer-events: none;
  background: linear-gradient(var(--bg) 40%, color-mix(in oklab, var(--bg) 70%, transparent) 75%, transparent); }
.top { position: absolute; z-index: 6; inset: 0 0 auto; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 8px var(--gutter) 0; }
.top__logo img { height: 30px; width: auto; }
.store-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 999px; background: var(--glass);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; backdrop-filter: blur(12px); white-space: nowrap; }
body.has-island .store-chip { opacity: 0; pointer-events: none; }
.store-chip { transition: opacity .3s; }
.store-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px color-mix(in oklab, var(--leaf) 25%, transparent); }
.store-chip small { color: var(--muted); font-weight: 500; }

/* Stories: one bubble per category; the ring fills as you move through that category */
.stories { position: absolute; z-index: 6; top: 56px; left: 0; right: 0; display: flex; gap: 14px; padding: 6px var(--gutter) 8px;
  overflow-x: auto; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { text-decoration: none; flex: none; width: 64px; display: grid; justify-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--muted); }
.story__ring { width: 60px; height: 60px; border-radius: 50%; padding: 3px; position: relative;
  background: conic-gradient(var(--leaf) calc(var(--p, 0) * 1turn), var(--line) 0); }
.story__ring > span { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--cream); border: 2px solid var(--bg); }
.story__ring img { width: 100%; height: 100%; object-fit: cover; scale: 1.5; }
.story[aria-current="true"] { color: var(--text); }
.story--dice .story__ring { background: conic-gradient(var(--sun), var(--clay), var(--leaf), var(--sun)); }
.story--dice .story__ring > span { display: grid; place-items: center; background: var(--forest-900); color: var(--sun); }
.story--dice svg { width: 28px; height: 28px; }
.story--crew .story__ring { background: var(--line); }
.story--crew .story__ring > span { display: grid; place-items: center; background: var(--forest-900); color: var(--leaf-300); }
.story--crew svg { width: 26px; height: 26px; }
.story__name { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Feed ---------- */
.feed { position: absolute; inset: 0; z-index: 2; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; outline: none; }
.feed::-webkit-scrollbar { display: none; }
.feed.free { scroll-snap-type: none; }
.slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; gap: 12px;
  padding: calc(var(--top-h) + 4px) var(--gutter) calc(var(--tabs-h) + 14px + env(safe-area-inset-bottom)); position: relative; }
.stage { flex: 1 1 auto; min-height: 0; position: relative; border-radius: var(--r-card); background: var(--cream); color: var(--forest-800);
  box-shadow: 0 30px 80px -34px var(--amb), 0 0 0 1px #F1E8D91a; overflow: hidden; isolation: isolate; }
.pager { height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pager::-webkit-scrollbar { display: none; }
.pane { flex: none; width: 100%; height: 100%; scroll-snap-align: start; position: relative; }
.pane--photo { display: grid; place-items: center; overflow: hidden; cursor: pointer; touch-action: pan-x pan-y; user-select: none; }
.pane--photo img { width: 100%; height: 100%; object-fit: cover; scale: 1.28; pointer-events: none; -webkit-user-drag: none; }
.noimg { width: 70%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--c) 30%, var(--cream)); color: var(--c); }
.noimg svg { width: 42%; height: auto; }
.noimg--sm svg { width: 55%; }
.segs { position: absolute; z-index: 3; top: 12px; left: 16px; right: 16px; display: flex; gap: 4px; pointer-events: none; }
.segs i { flex: 1; height: 3px; border-radius: 3px; background: #1B2A2322; }
.segs i.on { background: var(--forest-800); }
.flag { position: absolute; z-index: 3; top: 26px; left: 16px; display: flex; gap: 6px; }
.flag span { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--forest-800); color: var(--cream); }
.flag .new { background: var(--sun); color: var(--forest-800); }
.flag .hot { background: var(--clay); color: var(--forest-950); }
.dots { position: absolute; z-index: 3; bottom: 14px; left: 50%; translate: -50% 0; display: flex; gap: 6px; padding: 5px 8px; border-radius: 999px; background: #1B2A2314; }
.dots i { width: 6px; height: 6px; border-radius: 6px; background: #1B2A2344; transition: width .3s var(--ease-out), background .3s; }
.dots i.on { width: 18px; background: var(--forest-800); }
.rail { position: absolute; z-index: 4; right: 12px; bottom: 44px; display: grid; gap: 10px; justify-items: center; }
.rail button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--forest-950) 80%, transparent);
  color: var(--cream); backdrop-filter: blur(10px); scale: 1; transition: scale .2s var(--spring); }
.rail button:hover { scale: 1.08; }
.rail button svg { width: 22px; height: 22px; }
.rail > div { display: grid; justify-items: center; gap: 4px; }
.rail small { display: block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--cream); background: color-mix(in oklab, var(--forest-950) 80%, transparent); }
.rail button[aria-pressed="true"] { color: var(--clay); }
.rail button[aria-pressed="true"] svg path { fill: currentColor; }
.soldover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: #F1E8D9b3; backdrop-filter: grayscale(1); }
.soldover span { font-family: var(--font-display); font-size: 44px; color: var(--forest-800); rotate: -6deg; border: 3px solid; padding: 2px 18px 6px; border-radius: 14px; }
.burst { position: absolute; z-index: 5; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px; display: grid; place-items: center; pointer-events: none;
  border-radius: 50%; background: var(--leaf); color: var(--forest-950); box-shadow: 0 0 0 10px #91B05455; }
.burst svg { width: 54px; height: 54px; }
.spark { position: absolute; z-index: 5; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--leaf)); pointer-events: none; }

/* What's inside (second pane) */
.inside { padding: 64px 74px 22px 22px; height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.inside h3 { font-family: var(--font-display); font-size: 34px; line-height: .9; margin: 0; text-transform: uppercase; }
.parts { display: flex; flex-wrap: wrap; gap: 6px; }
.parts span { padding: 6px 11px; border-radius: 999px; background: #1B2A230f; font-size: 13px; font-weight: 500; }
.macros { display: grid; gap: 7px; }
.macro { display: grid; grid-template-columns: 62px 1fr 48px; align-items: center; gap: 10px; font-size: 13px; }
.macro i { height: 8px; border-radius: 8px; background: #1B2A2314; overflow: hidden; }
.macro i b { display: block; height: 100%; width: var(--w); border-radius: 8px; background: var(--leaf-700); transform-origin: 0 50%; }
.macro em { font-style: normal; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.inside .note { font-size: 12px; color: #1B2A23a0; margin: 0; }
.plantcount { display: flex; align-items: baseline; gap: 8px; }
.plantcount b { font-family: var(--font-display); font-size: 56px; line-height: .8; color: var(--leaf-700); }

/* Caption under the stage */
.cap { flex: none; display: grid; gap: 6px; padding: 0 4px; }
.cap__name { font-size: clamp(40px, 11vw, 54px); overflow: hidden; padding-top: .1em; margin-top: -.1em; }
.cap__name > span { display: block; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.meta .money { color: var(--text); font-size: 17px; }
.diet { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--leaf-300); }
.cta { flex: none; display: flex; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: var(--primary); color: var(--on-primary); text-decoration: none; scale: 1; transition: scale .2s var(--spring), background .2s; white-space: nowrap; }
.btn:hover { scale: 1.03; }
.btn:active { scale: .97; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { background: #F1E8D90d; }
.btn--cream { background: var(--cream); color: var(--forest-800); }
.btn--grow { flex: 1; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.coach { position: absolute; z-index: 7; left: 50%; top: 212px; translate: -50% 0; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); font-size: 13px; font-weight: 600; pointer-events: none; white-space: nowrap; }
.coach svg { width: 18px; height: 18px; color: var(--leaf); }

/* ---------- Tab bar ---------- */
.tabs { position: absolute; z-index: 8; inset: auto 0 0; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.tabs button { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); position: relative; padding: 4px 0; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--text); }
.tabs__dot { position: absolute; top: 2px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.tabs__bowl { width: 52px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--leaf); color: var(--forest-950); position: relative; }
.tabs__bowl svg { width: 22px !important; height: 22px !important; }
.tabs__bowl b { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--cream); color: var(--forest-950);
  font-size: 12px; line-height: 22px; text-align: center; box-shadow: 0 0 0 3px var(--bg); }
.tabs__bag[data-empty="true"] .tabs__bowl { background: var(--raised); color: var(--muted); }
.tabs__bag[data-empty="true"] .tabs__bowl b { display: none; }
.tabs__bag #bagTotal { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Live activity pill ---------- */
.island { position: fixed; z-index: 45; top: 9px; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 6px;
  border-radius: 999px; background: #000; color: var(--cream); font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px -8px #000, 0 0 0 1px #F1E8D91f; white-space: nowrap; overflow: hidden; }
.island svg { width: 30px; height: 30px; flex: none; rotate: -90deg; }
.island svg circle { fill: none; stroke-width: 4; }
.island .bg { stroke: #F1E8D926; }
.island .fg { stroke: var(--leaf); stroke-linecap: round; }
.island b { font-family: var(--font-display); font-size: 22px; letter-spacing: .04em; line-height: 1; }
.island em { font-style: normal; color: var(--leaf-300); }
.island[data-st="2"] .fg { stroke: var(--sun); }

/* ---------- Scrim + sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: #000; opacity: 0; pointer-events: none; }
.scrim.open { pointer-events: auto; }
.sheet { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 92svh; display: flex; flex-direction: column; visibility: hidden;
  background: var(--surface); border-radius: 30px 30px 0 0; box-shadow: 0 -20px 60px -20px #000, inset 0 1px 0 #F1E8D914; }
.sheet__grab { flex: none; height: 30px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet__grab i { width: 44px; height: 5px; border-radius: 5px; background: var(--faint); }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px calc(22px + env(safe-area-inset-bottom)); }
.sh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; touch-action: none; }
.sh-head h2 { font-size: 46px; }
.sh-x { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); flex: none; }
.sh-x svg { width: 20px; height: 20px; }
.sec-t { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 20px 0 10px; display: flex; justify-content: space-between; gap: 10px; }
.sec-t small { letter-spacing: 0; text-transform: none; font-weight: 500; }

/* Customizer */
.cz-head { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; margin-bottom: 6px; }
.cz-photo { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--cream); display: grid; place-items: center; }
.cz-photo img { width: 100%; height: 100%; object-fit: cover; scale: 1.35; }
.cz-head h2 { font-size: 40px; }
.cz-head p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 999px; background: var(--raised); font-size: 14px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line); scale: 1; transition: scale .2s var(--spring), background .2s, color .2s; }
.chip:active { scale: .95; }
.chip small { color: var(--muted); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--leaf); color: var(--forest-950); box-shadow: none; }
.chip[aria-pressed="true"] small { color: var(--forest-800); }
.chip--out[aria-pressed="true"] { background: var(--clay); }
.chip--out[aria-pressed="true"] span { text-decoration: line-through; }
.chip .q { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: var(--forest-950); color: var(--leaf); font-size: 12px; font-weight: 800; }
.al-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.al-chips span { padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; background: color-mix(in oklab, var(--sun) 16%, transparent); color: var(--sun); }
.al-chips span.added { background: var(--clay); color: var(--forest-950); }
.al-chips span.none { background: color-mix(in oklab, var(--leaf) 18%, transparent); color: var(--leaf-300); }
.sheet__body:has(.cz-foot) { padding-bottom: 0; }
.cz-foot { position: sticky; bottom: 0; z-index: 2; margin: 18px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 10px; background: var(--surface); box-shadow: 0 -14px 18px -6px var(--surface); }
.qty { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--raised); }
.qty button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.qty button:hover { background: #F1E8D914; }
.qty svg { width: 18px; height: 18px; }
.qty output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Bag + checkout (sheet on mobile, side panel on desktop) */
.bagwrap { display: grid; gap: 0; }
.lines { display: grid; gap: 10px; }
.line { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--danger); }
.line__del { position: absolute; inset: 0 0 0 auto; width: 96px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.line__del svg { width: 22px; height: 22px; margin: 0 auto 2px; }
.line__fg { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; padding: 12px; background: var(--raised); touch-action: pan-y; user-select: none; cursor: grab; }
.line__ph { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--cream); display: grid; place-items: center; }
.line__ph img { width: 100%; height: 100%; object-fit: cover; scale: 1.4; }
.line__name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.line__mods { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.line__mods .out { text-decoration: line-through; color: var(--clay); }
.line__r { display: grid; justify-items: end; gap: 6px; }
.line__r .qty { padding: 2px; }
.line__r .qty button { width: 30px; height: 30px; }
.line__r .qty svg { width: 15px; height: 15px; }
.who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--raised); }
.who .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: var(--forest-950); font-weight: 800; font-size: 14px; flex: none; }
.who div { flex: 1; min-width: 0; font-size: 14px; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.who button { font-size: 13px; font-weight: 700; color: var(--leaf-300); }
.slots { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 2px; }
.slots::-webkit-scrollbar { display: none; }
.slot { flex: none; min-width: 78px; padding: 10px 12px; border-radius: 16px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.slot b { display: block; font-size: 15px; }
.slot small { font-size: 12px; color: var(--muted); }
.slot[aria-pressed="true"] { background: var(--leaf); color: var(--forest-950); box-shadow: none; }
.slot[aria-pressed="true"] small { color: var(--forest-800); }
.slot[disabled] { opacity: .4; }
.paym { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paym button { min-height: 54px; border-radius: 16px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.paym button svg { width: 18px; height: 18px; }
.paym button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--leaf); background: color-mix(in oklab, var(--leaf) 14%, var(--raised)); }
.sum { display: grid; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; }
.sum div { display: flex; justify-content: space-between; color: var(--muted); }
.sum .tot { color: var(--text); font-size: 18px; font-weight: 800; }
.pts { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 16px; background: color-mix(in oklab, var(--sun) 12%, transparent); font-size: 13px; color: var(--sun); }
.pts b { font-family: var(--font-display); font-size: 26px; line-height: 1; }
.confirm { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; }

/* Slide to pay */
.slidepay { position: relative; height: 64px; margin-top: 16px; border-radius: 999px; background: var(--forest-950); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--leaf) 45%, transparent); overflow: hidden; user-select: none; touch-action: none; }
.slidepay__fill { position: absolute; inset: 0 auto 0 0; width: 64px; background: color-mix(in oklab, var(--leaf) 30%, transparent); border-radius: 999px; }
.slidepay__txt { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 50px; font-weight: 700; font-size: 15px; pointer-events: none;
  background: linear-gradient(90deg, var(--muted) 30%, var(--cream) 50%, var(--muted) 70%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.6s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.slidepay__knob { position: absolute; left: 4px; top: 4px; width: 56px; height: 56px; border-radius: 50%; background: var(--leaf); color: var(--forest-950); display: grid; place-items: center; cursor: grab; }
.slidepay__knob svg { width: 24px; height: 24px; }
.slidepay.done .slidepay__txt { animation: none; color: var(--cream); background: none; }

.empty { text-align: center; padding: 26px 0 10px; color: var(--muted); }
.empty .display { font-size: 44px; color: var(--text); margin: 12px 0 6px; }
.empty svg { width: 64px; height: 64px; color: var(--leaf); }

/* Find */
.searchbox { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 999px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.searchbox svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.chip--al[aria-pressed="true"] { background: var(--clay); color: var(--forest-950); }
.res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.res button { text-align: left; display: grid; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.2; }
.res .ph { aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--cream); display: grid; place-items: center; }
.res .ph img { width: 100%; height: 100%; object-fit: cover; scale: 1.35; }
.res small { color: var(--muted); font-weight: 500; }
.hidden-note { font-size: 13px; color: var(--sun); margin: 12px 0 0; }

/* Me */
.loy { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; padding: 18px; border-radius: var(--r-lg);
  background: radial-gradient(120% 140% at 0 0, color-mix(in oklab, var(--leaf) 30%, transparent), transparent 60%), var(--raised); }
.loy h3 { font-family: var(--font-display); font-size: 36px; line-height: .9; margin: 0 0 6px; text-transform: uppercase; }
.loy p { margin: 0; font-size: 13px; color: var(--muted); }
.pring { position: relative; display: grid; place-items: center; }
.pring svg { position: absolute; inset: 0; rotate: -90deg; }
.pring circle { fill: none; stroke-width: 10; }
.pring .bg { stroke: #F1E8D91c; }
.pring .fg { stroke: var(--leaf); stroke-linecap: round; }
.pring b { font-family: var(--font-display); font-size: 40px; line-height: .8; text-align: center; }
.pring small { display: block; font-family: var(--font-body); font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.rows { display: grid; gap: 2px; border-radius: var(--r-md); overflow: hidden; }
.rows > * { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--raised); text-align: left; width: 100%; font-size: 14px; }
.rows .grow { flex: 1; min-width: 0; }
.rows small { display: block; color: var(--muted); font-size: 12px; }
.rows svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.rows .thumb { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--cream); flex: none; display: grid; place-items: center; }
.rows .thumb img { width: 100%; height: 100%; object-fit: cover; scale: 1.4; }
.tag { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in oklab, var(--leaf) 20%, transparent); color: var(--leaf-300); white-space: nowrap; }
.tag--sun { background: color-mix(in oklab, var(--sun) 18%, transparent); color: var(--sun); }

/* Crew (group order) */
.crewlink { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--forest-950); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.crewlink span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.crewlink .btn { min-height: 40px; padding: 0 16px; font-size: 13px; }
.mate { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--raised); }
.mate .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--forest-950); background: var(--c); }
.mate b { display: block; font-size: 15px; }
.mate small { color: var(--muted); font-size: 13px; }
.typing { display: inline-flex; gap: 3px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.stack { display: grid; gap: 8px; }

/* Store sheet */
.store { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; width: 100%; padding: 14px; border-radius: var(--r-md); background: var(--raised); text-align: left; }
.store[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--leaf); }
.store__walk { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--forest-950); line-height: 1; text-align: center; }
.store__walk b { font-family: var(--font-display); font-size: 28px; color: var(--leaf); }
.store__walk small { display: block; font-size: 9px; color: var(--muted); font-weight: 700; letter-spacing: .08em; }
.store__n { font-weight: 700; }
.store__m { font-size: 13px; color: var(--muted); }
.busy { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.busy--quiet { background: color-mix(in oklab, var(--leaf) 20%, transparent); color: var(--leaf-300); }
.busy--steady { background: color-mix(in oklab, var(--sun) 18%, transparent); color: var(--sun); }
.busy--busy { background: color-mix(in oklab, var(--clay) 20%, transparent); color: var(--clay); }

/* ---------- Tracking: full-screen map + draggable sheet ---------- */
.trackview { position: fixed; inset: 0; z-index: 30; background: var(--bg); }
.map { position: absolute; inset: 0; }
.map__svg { width: 100%; height: 100%; display: block; }
.map__bg { fill: #0E1913; }
.map__parks { fill: #1A3324; }
.map__bld { fill: #15231B; stroke: #1E3027; stroke-width: .6; }
.map__minor { fill: none; stroke: #263A2F; stroke-width: 5; stroke-linecap: round; }
.map__ped { fill: none; stroke: #22352A; stroke-width: 2; stroke-dasharray: 3 4; }
.map__major { fill: none; stroke: #33493D; stroke-width: 9; stroke-linecap: round; }
.map__labels text { fill: #F1E8D966; font: 600 9px var(--font-body); letter-spacing: .1em; text-transform: uppercase; text-anchor: middle; }
.map__route-base { fill: none; stroke: #91B05440; stroke-width: 7; stroke-linecap: round; }
.map__route { fill: none; stroke: var(--leaf); stroke-width: 7; stroke-linecap: round; }
.map__pin--store circle { fill: var(--leaf); stroke: var(--bg); stroke-width: 4; }
.map__pin .chev path { fill: none; stroke: var(--forest-950); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.map__pin--dest path { fill: var(--sun); } .map__pin--dest circle { fill: var(--bg); }
.map__dot { fill: var(--cream); stroke: var(--bg); stroke-width: 4; }
.map__pulse { fill: var(--cream); opacity: .4; }
.map__bike { color: var(--forest-950); }
.tr-top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 60px var(--gutter) 0; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.seg button { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--cream); color: var(--forest-950); }
.tsheet { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 30px 30px 0 0; padding: 0 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px -10px #000; }
.tsheet .sheet__grab { margin: 0 -20px; }
.tno { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tno .display { font-size: 76px; color: var(--leaf); }
.eta { text-align: right; }
.eta b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.eta small { color: var(--muted); font-size: 13px; }
.tstage { margin: 6px 0 4px; font-size: 15px; }
.tstage b { color: var(--text); }
.bars { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; margin: 14px 0 6px; }
.bars i { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bars i b { display: block; height: 100%; width: 100%; background: var(--leaf); transform-origin: 0 50%; }
.bars-l { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; font-size: 12px; color: var(--faint); font-weight: 600; }
.bars-l span.on { color: var(--text); }
.mapcard { position: absolute; z-index: 3; left: var(--gutter); top: 116px; display: flex; gap: 10px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); font-size: 13px; }
.mapcard .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: var(--forest-950); font-size: 11px; font-weight: 800; }
.mapcard small { display: block; color: var(--muted); font-size: 12px; }
.tmore { display: grid; gap: 10px; margin-top: 16px; }

/* ---------- Kitchen intro slide (top of the reel on a kitchen link) ---------- */
.intro { gap: 14px; }
.intro__ph { flex: 1 1 auto; min-height: 0; position: relative; border-radius: var(--r-card); overflow: hidden; background: var(--forest-900); box-shadow: 0 30px 80px -34px var(--amb); }
.intro__ph img { width: 100%; height: 100%; object-fit: cover; }
.intro__ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, #08110Cb3); }
.intro__ph .busy { position: absolute; z-index: 1; top: 14px; left: 14px; background: var(--forest-950); }
.intro__txt { flex: none; display: grid; gap: 8px; }
.intro__txt h1 { font-size: clamp(54px, 15vw, 76px); overflow: hidden; padding-top: .08em; margin-top: -.08em; }
.intro__txt h1 span { display: block; }
.intro__txt p { margin: 0; color: var(--muted); font-size: 14px; }
.intro__picks { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.intro__picks > div { display: flex; }
.intro__picks button { width: 46px; height: 46px; margin-left: -10px; border-radius: 50%; overflow: hidden; background: var(--cream); box-shadow: 0 0 0 3px var(--bg); display: grid; place-items: center; }
.intro__picks button img { width: 100%; height: 100%; object-fit: cover; scale: 1.4; }
.intro .cta .btn--ghost { padding: 0; width: 52px; flex: none; }

/* ---------- Kitchens page ---------- */
.page { position: fixed; inset: 0; z-index: 30; overflow-y: auto; background: radial-gradient(90% 50% at 50% 0, color-mix(in oklab, var(--amb) 30%, transparent), transparent 70%), var(--bg); }
.kp { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.kp__top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 12px 0; background: linear-gradient(var(--bg) 60%, transparent); }
.kp__top img { height: 28px; width: auto; }
.kp__head { margin: 8px 0 22px; }
.kp__head h1 { font-size: clamp(64px, 18vw, 120px); overflow: hidden; padding-top: .08em; margin: 4px 0 8px; }
.kp__head h1 span { display: block; }
.kp__head p { margin: 0; color: var(--muted); max-width: 520px; }
.kgrid { display: grid; gap: 16px; }
.kc { border-radius: var(--r-card); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.kc--on { box-shadow: inset 0 0 0 2px var(--leaf); }
.kc__ph { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.kc__ph img { width: 100%; height: 100%; object-fit: cover; }
.kc__ph .busy { position: absolute; top: 14px; left: 14px; background: var(--forest-950); }
.kc__cur { position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px; background: var(--leaf); color: var(--ink); font-size: 12px; font-weight: 800; }
.kc__b { padding: 16px 18px 18px; display: grid; gap: 8px; }
.kc__b h2 { font-size: 52px; }
.kc__m { margin: 0; color: var(--muted); font-size: 14px; }
.kc__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0; }
.kc__facts span { padding: 10px 12px; border-radius: 16px; background: var(--raised); font-size: 12px; color: var(--muted); display: grid; }
.kc__facts b { font-family: var(--font-display); font-size: 32px; line-height: .9; color: var(--leaf); }
.kc__a { display: flex; gap: 10px; }
.kc__a .btn--ghost { padding: 0; width: 52px; flex: none; }
.kp__foot { margin: 22px 0 0; text-align: center; color: var(--faint); font-size: 13px; }
@media (min-width: 768px) { .kgrid { grid-template-columns: 1fr 1fr; } }

/* ---------- Toast + flyer ---------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabs-h) + 18px + env(safe-area-inset-bottom)); translate: -50% 0; opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 999px; background: var(--cream); color: var(--forest-950); font-size: 14px; box-shadow: 0 14px 40px -10px #000; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.fly { position: fixed; z-index: 70; border-radius: 50%; overflow: hidden; background: var(--cream); pointer-events: none; }
.fly img { width: 100%; height: 100%; object-fit: cover; scale: 1.3; }

.side { display: none; }

/* ---------- Desktop: split screen ---------- */
@media (min-width: 1024px) {
  :root { --rail-w: 264px; --side-w: 420px; --top-h: 28px; --tabs-h: 0px; }
  .app::before { display: none; }
  .top { width: var(--rail-w); height: 84px; padding: 22px 24px 0; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 14px; }
  .top__logo img { height: 34px; }
  .stories { top: 142px; bottom: 210px; width: var(--rail-w); right: auto; flex-direction: column; gap: 4px; padding: 4px 14px; overflow-y: auto; }
  .story { width: auto; grid-template-columns: 46px 1fr; justify-items: start; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 16px; font-size: 14px; }
  .story:hover { background: #F1E8D90a; }
  .story[aria-current="true"] { background: var(--raised); }
  .story__ring { width: 46px; height: 46px; }
  .story__name { max-width: none; }
  .story--dice svg, .story--crew svg { width: 22px; height: 22px; }
  .feed { left: var(--rail-w); right: var(--side-w); }
  .slide { padding: 28px max(28px, calc((100% - 500px) / 2)) 58px; }
  .cap__name { font-size: 58px; }
  .tabs { inset: auto auto 0 0; width: var(--rail-w); height: auto; padding: 14px; grid-template-columns: 1fr; gap: 2px; background: none; backdrop-filter: none; border: 0; border-top: 1px solid var(--line); }
  .tabs button { grid-template-columns: 24px 1fr; justify-items: start; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; font-size: 14px; }
  .tabs button:hover { background: #F1E8D90a; }
  .tabs__bag, .tabs [data-tab="feed"] { display: none !important; }
  .tabs__dot { right: auto; left: 30px; top: 8px; }
  .side { display: block; position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: var(--side-w); overflow-y: auto; padding: 26px 26px 30px; background: color-mix(in oklab, var(--forest-950) 88%, transparent);
    border-left: 1px solid var(--line); backdrop-filter: blur(20px); scrollbar-width: thin; }
  .side .slots { margin: 0 -26px; padding: 0 26px 2px; }
  .sheet { left: calc(var(--rail-w) + (100vw - var(--rail-w) - var(--side-w)) / 2 - 290px); right: auto; width: 580px; max-height: 88vh; }
  body.has-island .store-chip { opacity: 1; pointer-events: auto; }
  .island { left: calc(var(--rail-w) + (100vw - var(--rail-w) - var(--side-w)) / 2); top: 16px; }
  .toast { left: calc(var(--rail-w) + (100vw - var(--rail-w) - var(--side-w)) / 2); bottom: 28px; }
  .coach { top: 110px; left: calc(var(--rail-w) + (100% - var(--rail-w) - var(--side-w)) / 2); }
  .kbd { display: flex !important; }
  .trackview { left: 0; }
  .tsheet { left: auto; right: 24px; bottom: 24px; width: 420px; border-radius: 30px; }
  .tr-top { padding-top: 24px; }
  .mapcard { top: 84px; }
}
.kbd { display: none; position: absolute; z-index: 4; left: calc(var(--rail-w, 0px) + 20px); bottom: 18px; gap: 14px; font-size: 12px; color: var(--faint); pointer-events: none; }
.kbd kbd { font: 700 11px var(--font-body); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); margin-right: 4px; }

@media (prefers-reduced-motion: reduce) {
  .slidepay__txt, .typing i { animation: none; }
  .btn, .chip, .rail button { transition: none; }
}
