/* order page: one dish lit on the stage, the section's other dishes in a rail, checkout slides over */
html, body { height: 100%; }
body { overflow-x: hidden; }
.app { min-height: 100svh; display: flex; flex-direction: column; background: radial-gradient(ellipse 55% 65% at 52% 55%, var(--bg-2) 0%, #fff 70%); transition: filter .4s var(--ease); }
.app.dim { filter: blur(6px) brightness(.9); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.o-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) clamp(12px, 3vw, 36px) 10px; background: var(--red); color: #fff; margin-bottom: 10px; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: inherit; display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: rgb(255 255 255 / .15); }
.o-cats { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); padding: 0 12px; }
.o-cats::-webkit-scrollbar { display: none; }
.o-cats button { flex: none; border: 0; background: transparent; color: rgb(255 255 255 / .85); padding: 10px 12px; border-radius: 999px; font: 500 14px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.o-cats button[aria-current="true"] { color: var(--red); background: #fff; font-weight: 600; }
.bag-btn { position: relative; flex: none; height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1.5px solid rgb(255 255 255 / .6); background: transparent; color: #fff; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bag-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--yellow); color: var(--yellow-ink); font: 600 12px/1 var(--sans); }
.bag-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.18); } }
.paused, .table-note { margin: 0 clamp(12px, 3vw, 36px) 6px; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.paused { background: rgb(216 64 42 / .16); border: 1px solid rgb(216 64 42 / .4); }
.table-note { background: var(--yellow); color: var(--yellow-ink); font-weight: 500; }

.o-stage { flex: 1; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.25fr) minmax(220px, .8fr); align-items: center; gap: clamp(16px, 3vw, 48px); padding: 28px clamp(12px, 3vw, 36px) 18px; min-height: 0; }
.o-info { max-width: 460px; }
.o-cat { display: inline-block; background: var(--yellow); color: var(--yellow-ink); font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; margin: 0 0 12px; }
.o-name { font: 400 clamp(56px, 6vw, 96px)/.9 var(--serif); margin: 0 0 16px; text-wrap: balance; outline: none; }
.o-desc { color: var(--muted); margin: 0 0 12px; max-width: 40ch; }
.o-tags { margin: 0 0 16px; font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.o-tags .hot { color: var(--red); font-weight: 600; }
.o-tags .pick { color: var(--red); }
.o-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.o-opts button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; }
.o-opts button[aria-checked="true"] { border-color: var(--red); background: var(--red); color: #fff; }
.o-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#dish-price .price { font: 400 64px/1 var(--serif); color: var(--red); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 48px; }
.stepper button { width: 44px; height: 46px; border: 0; background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; border-radius: 999px; }
.stepper output { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.o-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; min-height: 1.4em; }

.o-center { display: grid; justify-items: center; gap: 14px; }
.o-plate { width: min(100% - 40px, 520px, 58vh); touch-action: pan-y; cursor: grab; }
.o-plate img { will-change: transform; }
/* what's on the plate */
.anat { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.anat svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: none; }
.anat-line { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 0 1.5px rgb(255 255 255 / .9)); }
.anat-dot { fill: var(--red); stroke: #fff; stroke-width: 2; }
.anat-tag { position: absolute; white-space: nowrap; background: #fff; color: var(--ink); font: 600 13px/1 var(--sans); padding: 7px 11px; border-radius: 999px;
  box-shadow: 0 0 0 1.5px var(--red), 0 8px 18px -8px rgb(60 20 10 / .45); }
@media (max-width: 960px) { .anat-tag { font-size: 11.5px; padding: 6px 9px; } }
.o-arrows { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.o-pos { min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }

.o-rail { align-self: stretch; overflow: hidden; display: flex; align-items: center; }
.o-rail ol { list-style: none; margin: 0; padding: 0; width: 100%; max-height: min(66vh, 620px); overflow-y: auto; scrollbar-width: none; mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.o-rail ol::-webkit-scrollbar { display: none; }
.o-rail button { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.o-rail button[aria-current="true"] { background: rgb(27 19 16 / .08); color: var(--ink); }
.o-rail button.sold { opacity: .5; }
.r-thumb { width: 52px; height: 52px; border-radius: 50%; background: var(--yellow); overflow: hidden; display: grid; place-items: center; }
.r-thumb img { width: 100%; height: 100%; object-fit: cover; }
.r-thumb img.cut { object-fit: contain; width: 86%; height: 86%; }
.r-name { font-size: 14px; line-height: 1.25; display: block; }
.r-price { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }

.ticker { min-width: 0; overflow: hidden; background: var(--yellow); color: var(--yellow-ink); font-weight: 500; font-size: 12px; white-space: nowrap; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
.ticker-run { display: inline-block; padding-left: 100%; animation: tick 40s linear infinite; }
.ticker-run span { margin: 0 28px; }
@keyframes tick { to { transform: translateX(-100%); } }

.mbar { display: none; }

/* tablet / phone */
@media (max-width: 960px) {
  .app { grid-template-rows: auto auto auto auto auto; padding-bottom: 92px; }
  .o-stage { grid-template-columns: 1fr; gap: 10px; }
  .o-center { order: 1; }
  .o-plate { width: min(84vw, 420px); }
  .o-rail { order: 3; }
  .o-rail ol { display: flex; gap: 6px; overflow-x: auto; max-height: none; mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); padding: 4px 8px; }
  .o-rail li { flex: none; }
  .o-rail button { grid-template-columns: 1fr; justify-items: center; width: 84px; padding: 6px; text-align: center; gap: 6px; }
  .o-rail .r-name { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .o-rail .r-price { display: none; }
  .o-info { order: 2; max-width: none; padding-bottom: 4px; }
  .o-buy #dish-price, .o-buy .stepper { display: none; }
  .o-name { font-size: clamp(46px, 13vw, 64px); margin-bottom: 8px; }
  .o-buy #add { display: none; }
  .ticker { display: none; }
  .mbar { display: flex; gap: 10px; position: fixed; inset: auto 0 0 0; z-index: 20; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 30%); }
  .mbar .cta { flex: 1; }
  .mbar .ghost { background: var(--bg-2); }
}

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer-scrim { position: absolute; inset: 0; background: rgb(10 7 5 / .35); }
.drawer-panel { position: absolute; inset: 0 0 0 auto; width: min(460px, 100%); background: #fff; box-shadow: -30px 0 60px rgb(60 20 10 / .25); display: flex; flex-direction: column; }
.d-head { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px 22px; background: var(--red); color: #fff; margin-bottom: 14px; }
.d-head h2 { font: 400 44px/1 var(--serif); margin: 0; }
.d-body { flex: 1; overflow-y: auto; padding: 4px 22px calc(28px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.line .l-name { font-size: 15px; line-height: 1.25; }
.line .l-opt { font-size: 12px; color: var(--muted); }
.line .stepper { height: 38px; } .line .stepper button { width: 34px; height: 36px; font-size: 17px; }
.line .l-price { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); }
.pairs { margin: 22px 0 6px; padding: 14px; border-radius: 16px; background: var(--bg-2); border: 2px solid var(--yellow); }
.pairs h3 { margin: 0 0 10px; font: 600 15px/1.3 var(--sans); }
.pair-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.pair-item .r-thumb { width: 44px; height: 44px; }
.pair-item button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--red); background: transparent; color: var(--red); cursor: pointer; font-weight: 600; font-size: 13px; }
#checkout { display: grid; gap: 14px; margin-top: 22px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; padding: 0; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg legend, .chips legend { width: 100%; }
.seg label, .chips label { position: relative; }
.seg input, .chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span, .chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.seg input:checked + span, .chips input:checked + span { background: var(--red); color: #fff; border-color: var(--red); }
.seg input:focus-visible + span, .chips input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select { min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 400 16px/1.4 var(--sans); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red); outline: none; }
.hp { position: absolute; left: -9999px; }
.remember { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.sub-rows { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sub-rows > div { display: flex; justify-content: space-between; }
.sub-rows + .nudge + .totals, .sub-rows:not([hidden]) ~ .totals { border-top: 0; padding-top: 4px; }
.nudge { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--yellow); color: var(--yellow-ink); font-size: 14px; font-weight: 600; }
.totals { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
#total .price { font: 400 48px/1 var(--serif); color: var(--red); }
.fine { font-size: 12px; color: var(--muted); margin: 0; }
.err { color: var(--red-deep); background: rgb(224 42 31 / .08); border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 14px; }
.cta.wide { width: 100%; }

/* confirmation */
.done { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px 16px; background: rgb(255 255 255 / .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow-y: auto; }
.done-inner { width: min(520px, 100%); text-align: center; display: grid; justify-items: center; gap: 10px; }
.tick { width: 76px; height: 76px; stroke: var(--red); stroke-width: 2.4; }
.tick circle { stroke-dasharray: 183; stroke-dashoffset: 183; animation: draw .9s var(--ease) forwards; }
.tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .7s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-code { color: var(--red); margin: 6px 0 0; font-size: 14px; letter-spacing: .04em; }
.done h2 { font: 400 clamp(60px, 12vw, 88px)/.9 var(--serif); color: var(--red); margin: 0; }
.done-sub { color: var(--muted); margin: 0 0 8px; }
.track { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; width: 100%; margin: 10px 0; padding: 0; counter-reset: s; }
.track li { position: relative; padding-top: 22px; font-size: 13px; color: var(--muted); }
.track li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--bg-3); }
.track li::after { content: ""; position: absolute; top: 9px; left: calc(50% + 10px); right: calc(-50% + 10px); height: 2px; background: var(--bg-3); }
.track li:last-child::after { display: none; }
.track li.on { color: var(--ink); }
.track li.on::before { background: var(--red); box-shadow: 0 0 0 5px rgb(224 42 31 / .18); }
.track li.past::after { background: var(--red); }
.done-lines { list-style: none; padding: 0; margin: 6px 0; width: 100%; display: grid; gap: 6px; font-size: 14px; }
.done-lines li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 8px 0; }

/* search */
.search { position: fixed; inset: 0; z-index: 45; background: rgb(255 255 255 / .98); padding: calc(16px + env(safe-area-inset-top, 0px)) clamp(12px, 4vw, 48px) 16px; overflow-y: auto; }
.search-box { display: flex; gap: 10px; max-width: 760px; margin: 0 auto 16px; }
.search-box input { flex: 1; min-width: 0; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: 400 17px var(--sans); }
.results { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 4px; }
.results button { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.results button:hover, .results button:focus-visible { background: rgb(27 19 16 / .07); }
.results small { color: var(--muted); display: block; font-size: 12px; }
