/* Slurp order page (order.html). Loaded after css/site.css and uses its tokens (--s-*).
   Every class here starts with op- (page), rc- (receipt body) or st- (stub), so none of the old o-/t- rules in
   site.css can match this markup. Paper white appears only on the receipt and its stub. */

.op-page {
  --o-col: clamp(340px, 27vw, 392px);
  --o-paper: oklch(0.965 0.009 88);
  --o-paper-ink: oklch(0.26 0.012 55);
  --o-paper-mute: oklch(0.47 0.014 60);
  --o-ink-red: oklch(0.5 0.19 27);
  --o-raise: oklch(0.225 0.015 55);
  --o-glass: oklch(0.19 0.012 55 / 0.78);
  --o-ring: 0 0 0 4px oklch(0.93 0.02 85 / 0.14);
  --o-sticky: 72px;
}
/* zero specificity, so a component's own padding (a track, a group) always wins over this reset */
:where(.op-page) :where(fieldset) { border: 0; margin: 0; padding: 0; min-width: 0; }
:where(.op-page) :where(legend) { padding: 0; }
.op-page :where(.op-add, .op-step, .op-x, .op-back, .op-select, .op-tick, .op-none, .op-pay-btn, .op-det-btn) svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.op-page input[type="radio"], .op-page input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

/* ================================================================ layout: two columns, the right one is the order / receipt */
.op-main {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--o-col); grid-template-rows: auto 1fr; column-gap: clamp(36px, 4.4vw, 72px);
  align-items: start; padding-top: clamp(24px, 3.4vw, 48px); isolation: isolate; position: relative;
}
.op-choose, .op-pay { grid-column: 1; grid-row: 1; min-width: 0; }
.op-order { grid-column: 2; grid-row: 1; position: sticky; top: 88px; }
.op-receipt-col { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.op-done { grid-column: 1; grid-row: 2; align-self: start; }

.op-title { font-size: clamp(2.4rem, 1.7rem + 2.8vw, 4.2rem); outline: none; }
.op-lede { margin-top: 12px; color: var(--s-mute); font-size: var(--s-t-lede); max-width: 34em; }

/* ================================================================ filters */
.op-filters {
  position: sticky; top: var(--o-sticky); z-index: 20; margin-top: clamp(28px, 3vw, 40px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 0 14px;
  background: oklch(0.17 0.012 55 / 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.op-filters::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none; background: linear-gradient(in oklch to bottom, oklch(0.17 0.012 55 / 0.92), oklch(0.17 0.012 55 / 0)); }
/* The section track. Its highlight is the checked option's own ::before (see slideSeg in js/order.js): it is laid
   out inside the option, so it always sits --pad inside the track; radius = track radius - pad (concentric). */
.op-seg-group { min-width: 0; max-width: 100%; }
.op-seg {
  --pad: 4px; --r: 13px;
  position: relative; display: flex; width: max-content; max-width: 100%; padding: var(--pad); border-radius: var(--r);
  background: var(--s-bg-1); box-shadow: inset 0 0 0 1px var(--s-line), var(--s-hi);
}
.op-seg-opt, .op-mini-seg label { position: relative; display: block; flex: none; }
.op-seg-opt span, .op-mini-seg span { position: relative; isolation: isolate; }
.op-seg-opt span::before, .op-mini-seg span::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transform-origin: 0 50%;
  background: oklch(0.3 0.017 55); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.1), inset 0 1px 0 oklch(1 0 0 / 0.09), 0 4px 10px -4px oklch(0.05 0.01 55 / 0.7);
}
:is(.op-seg-opt, .op-mini-seg label) input:checked + span::before { opacity: 1; }
.op-seg-opt span { display: flex; align-items: center; height: 40px; padding: 0 16px; border-radius: calc(var(--r) - var(--pad)); font-size: 0.92rem; font-weight: 500; color: var(--s-mute); cursor: pointer; white-space: nowrap; transition: color 160ms; }
.op-seg-opt span:hover { color: var(--s-ink); }
.op-seg-opt input:checked + span { color: var(--s-ink); }
.op-seg-opt input:focus-visible + span { outline: 2px solid var(--s-ink); outline-offset: -2px; }

.op-attrs { display: flex; flex-wrap: wrap; gap: 2px; }
.op-attr { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px 0 10px; border-radius: 10px; font-size: 0.92rem; color: var(--s-mute); cursor: pointer; transition: color 160ms, background-color 160ms; white-space: nowrap; }
.op-attr:hover { color: var(--s-ink); background: oklch(1 0 0 / 0.04); }
.op-attr:has(input:checked) { color: var(--s-ink); }
.op-attr:has(input:focus-visible) { outline: 2px solid var(--s-ink); outline-offset: 0; }
.op-tick { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--s-line-2); transition: background-color 150ms, box-shadow 150ms; }
.op-tick svg { width: 12px; height: 12px; stroke-width: 2.2; color: oklch(0.97 0.012 85); opacity: 0; transform: scale(0.6); transition: opacity 150ms, transform 180ms var(--s-ease-out); }
input:checked + .op-tick { background: var(--s-red-deep); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.16); }
input:checked + .op-tick svg { opacity: 1; transform: none; }
.op-count { margin-left: auto; font-size: var(--s-t-small); color: var(--s-mute); white-space: nowrap; }

/* ================================================================ the dishes */
.op-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 3.4vw, 52px) clamp(16px, 1.6vw, 24px); margin-top: 18px; }
.op-dish { position: relative; min-width: 0; }
.op-dish.is-out { display: none; }
.op-dish.is-leaving { position: absolute; pointer-events: none; z-index: 0; }
.op-dish.is-open, .op-dish.is-closing { z-index: 15; }

.op-media { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--s-bg-1); }
.op-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.07); pointer-events: none; }
.op-media > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; transition: transform 700ms var(--s-ease-out), filter 300ms; }
/* ramen: the top-down bowl under a lamp, on the same counter tone as the photos */
.op-dish.is-ramen .op-media { background: radial-gradient(in oklch 80% 64% at 50% 44%, oklch(0.27 0.02 60), oklch(0.19 0.013 55) 62%, oklch(0.16 0.012 55)); }
.op-pool { position: absolute; left: 50%; top: 44%; width: 78%; aspect-ratio: 1; translate: -46% -46%; border-radius: 50%; background: oklch(0.06 0.01 55 / 0.75); filter: blur(18px); }
.op-media > .op-bowl { position: absolute; left: 6%; top: 44%; width: 88%; height: auto; aspect-ratio: 1; translate: 0 -50%; object-fit: contain; transition: rotate 900ms var(--s-ease-out), scale 700ms var(--s-ease-out); }
@media (hover: hover) and (pointer: fine) {
  .op-dish:hover .op-media > img:not(.op-bowl) { transform: scale(1.04); }
  .op-dish:hover .op-bowl { rotate: 14deg; scale: 1.025; }
}
.op-dish.is-open .op-media > img:not(.op-bowl) { transform: scale(1.04); }
.op-dish.is-open .op-bowl { rotate: 14deg; scale: 1.025; }

.op-info { margin-top: 14px; }
.op-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-family: var(--s-serif); font-weight: 600; font-size: clamp(1.15rem, 1rem + 0.4vw, 1.38rem); line-height: 1.2; }
.op-name .s-price { font-family: var(--s-sans); font-size: 1rem; font-weight: 500; flex: none; }
.op-desc { margin-top: 6px; color: var(--s-mute); font-size: 0.9rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.8rem; color: var(--s-mute); }
.op-have { display: contents; }
.op-have-n { color: var(--s-red-ink); font-weight: 500; }
.op-dot { width: 3px; height: 3px; border-radius: 50%; background: oklch(1 0 0 / 0.28); }
.op-heat { display: inline-flex; gap: 1px; }
.op-heat svg { width: 9px; height: 12px; }
.op-heat svg path:first-child { fill: oklch(1 0 0 / 0.16); }
.op-heat svg path:last-child { fill: none; stroke: oklch(1 0 0 / 0.22); stroke-width: 1.3; stroke-linecap: round; }
.op-heat[data-heat="1"] svg:nth-child(-n+1) path:first-child, .op-heat[data-heat="2"] svg:nth-child(-n+2) path:first-child, .op-heat[data-heat="3"] svg path:first-child { fill: var(--s-red-ink); }
.op-heat[data-heat="1"] svg:nth-child(-n+1) path:last-child, .op-heat[data-heat="2"] svg:nth-child(-n+2) path:last-child, .op-heat[data-heat="3"] svg path:last-child { stroke: oklch(0.72 0.12 140); }

.op-hit { position: absolute; inset: 0; z-index: 1; border-radius: 16px; cursor: pointer; }
.op-hit:focus-visible { outline-offset: 5px; border-radius: 18px; }
.op-ctl { position: absolute; right: 12px; bottom: 12px; z-index: 2; }

/* round add button and the stepper it opens into (floating on the photo) */
.op-add {
  height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 22px;
  background: var(--o-glass); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.16), inset 0 1px 0 oklch(1 0 0 / 0.1), 0 8px 18px -8px oklch(0.05 0.01 55 / 0.8);
  color: var(--s-ink); transition: transform 150ms var(--s-ease-out), background-color 160ms;
}
.op-add svg { width: 16px; height: 16px; }
.op-add:hover { background: var(--s-red-deep); }
.op-add:active { transform: scale(0.97); }
.op-add-wide { padding: 0 16px 0 13px; font-size: 0.875rem; font-weight: 600; }

.op-step { display: inline-flex; align-items: center; border-radius: 22px; background: var(--s-bg-2); box-shadow: inset 0 0 0 1px var(--s-line-2), var(--s-hi); }
.op-step button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--s-ink); transition: transform 150ms var(--s-ease-out), background-color 150ms; }
.op-step button:hover:not(:disabled) { background: oklch(1 0 0 / 0.08); }
.op-step button:active:not(:disabled) { transform: scale(0.94); }
.op-step button:disabled { opacity: 0.35; cursor: not-allowed; }
.op-step svg { width: 14px; height: 14px; }
.op-step output { min-width: 22px; text-align: center; font-weight: 600; font-size: 0.92rem; }
.op-step-sm button { width: 30px; height: 30px; }
.op-step-sm svg { width: 12px; height: 12px; }
.op-step-lg button { width: 44px; height: 44px; }
.op-step-lg output { min-width: 28px; font-size: 1rem; }
.op-step-float { background: var(--o-glass); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.16), inset 0 1px 0 oklch(1 0 0 / 0.1), 0 8px 18px -8px oklch(0.05 0.01 55 / 0.8); }
.op-step-float button { width: 42px; height: 44px; }

/* empty result */
.op-none { margin-top: 24px; padding: clamp(40px, 6vw, 72px) 0; display: grid; justify-items: start; gap: 10px; }
.op-none svg { width: 96px; height: 64px; stroke: var(--s-line-2); stroke-width: 2.4; margin-bottom: 10px; }
.op-none-h { font-family: var(--s-serif); font-weight: 600; font-size: var(--s-t-h3); }
.op-none-p { color: var(--s-mute); max-width: 32em; }
.op-none .s-btn { margin-top: 12px; min-height: 46px; }

/* ================================================================ details: the panel that grows out of a dish */
.op-pop {
  position: absolute; z-index: 20; padding: 22px; border-radius: 20px; background: var(--o-raise);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.12), inset 0 1px 0 oklch(1 0 0 / 0.09),
    0 34px 60px -18px oklch(0.04 0.01 55 / 0.92), 0 12px 24px -12px oklch(0.04 0.01 55 / 0.7);
}
/* an invisible bridge over the gap to the dish, so the pointer can cross without the panel closing */
.op-pop::before { content: ""; position: absolute; top: var(--bridge-top, 0); bottom: 0; width: 16px; }
.op-pop[data-side="right"]::before { right: 100%; }
.op-pop[data-side="left"]::before { left: 100%; }
.op-pop[data-side="over"]::before { display: none; }
.op-pop .op-det-photo { display: none; }

.op-det { display: grid; grid-template-columns: minmax(0, 1fr); }
.op-det.is-ramen { grid-template-columns: 124px minmax(0, 1fr); column-gap: 18px; }
.op-det.is-ramen > :not(.op-det-bowl, .op-det-head, .op-det-more) { grid-column: 1 / -1; }
.op-det-bowl { grid-row: 1 / span 2; align-self: start; }
.op-det-bowl .m-bowl { width: 124px; }
.op-det-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.op-det-name { font-family: var(--s-serif); font-weight: 600; font-size: 1.45rem; line-height: 1.15; }
.op-det-price { font-weight: 500; }
.op-det-more { margin-top: 8px; color: var(--s-mute); font-size: 0.9rem; line-height: 1.6; }
.op-facts { margin-top: 18px; display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 0.86rem; }
.op-facts > div { display: contents; }
.op-facts dt { color: var(--s-mute); }
.op-facts dd { margin: 0; color: var(--s-ink); display: flex; align-items: center; gap: 8px; }
.op-facts .op-heat svg { width: 10px; height: 14px; }

.op-opts { margin-top: 20px; display: grid; gap: 16px; }
.op-opt legend { font-size: 0.86rem; font-weight: 600; margin-bottom: 8px; }
.op-mini-seg { --pad: 3px; --r: 11px; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: var(--pad); border-radius: var(--r); background: oklch(0.19 0.013 55); box-shadow: inset 0 0 0 1px var(--s-line); }
.op-mini-seg label { min-width: 0; }
.op-mini-seg span { display: flex; align-items: center; justify-content: center; height: 36px; padding: 0 6px; font-size: 0.84rem; font-weight: 500; color: var(--s-mute); cursor: pointer; border-radius: calc(var(--r) - var(--pad)); white-space: nowrap; transition: color 150ms; }
.op-mini-seg span:hover, .op-mini-seg input:checked + span { color: var(--s-ink); }
.op-mini-seg input:focus-visible + span { outline: 2px solid var(--s-ink); outline-offset: -1px; }
.op-extras { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.op-extra { position: relative; display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 8px; margin: 0 -8px; border-radius: 9px; font-size: 0.86rem; cursor: pointer; transition: background-color 150ms; }
.op-extra:hover { background: oklch(1 0 0 / 0.04); }
.op-extra:has(input:focus-visible) { outline: 2px solid var(--s-ink); }
.op-extra-n { flex: 1; }
.op-extra .s-price { color: var(--s-mute); }

.op-det-add { margin-top: 22px; display: flex; align-items: center; gap: 12px; }
.op-det-btn { flex: 1; justify-content: space-between; min-height: 48px; padding: 0 20px; }
.op-det-btn.is-done { background: oklch(0.46 0.15 28); }
.op-det-in { color: var(--s-mute); font-size: 0.86rem; }

/* ================================================================ the running order: the paper receipt, printed as you add
   The same paper (.op-receipt, .op-paper, .rc-*) as the pay step. Only what is particular to step 1 is here: the
   lines scroll inside the paper between the head and the totals, the quiet ink controls, the Checkout on the stub. */
.op-order-panel { display: flex; flex-direction: column; align-items: center; }
.op-order-head { display: none; }
.op-x { display: none; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--s-bg-2); box-shadow: inset 0 0 0 1px var(--s-line); color: var(--s-ink); transition: transform 150ms var(--s-ease-out); }
.op-x:active { transform: scale(0.94); }
.op-x svg { width: 14px; height: 14px; }
.op-grab { display: none; }

.op-live { display: flex; flex-direction: column; max-height: calc(100dvh - 144px); }
.op-live .op-paper-top { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; padding-bottom: 22px; }
.op-live .op-paper-top > * { flex: none; }
.op-live .op-stub { flex: none; touch-action: auto; user-select: auto; -webkit-user-select: auto; }
.rc-ready { margin-top: 4px; font-size: 0.74rem; color: var(--o-paper-mute); }
/* the lines: scroll inside the paper; the scrollbar sits in the paper's right margin so lines keep their width */
.rc-scroll {
  --fa: 0px; --fb: 0px;
  flex: 0 1 auto !important; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: -6px -16px -6px -8px; padding: 6px 16px 6px 8px;
  scrollbar-width: thin; scrollbar-color: oklch(0.26 0.012 55 / 0.28) transparent;
  -webkit-mask: linear-gradient(to bottom, #0000, #000 var(--fa), #000 calc(100% - var(--fb)), #0000);
  mask: linear-gradient(to bottom, #0000, #000 var(--fa), #000 calc(100% - var(--fb)), #0000);
}
.rc-scroll.is-above { --fa: 30px; }
.rc-scroll.is-below { --fb: 40px; }
.op-live .rc-line { border-radius: 4px; }
.rc-line.is-printing { overflow: hidden; }
.rc-line.is-leaving { overflow: hidden; pointer-events: none; }
/* struck through as it goes: a line of ink drawn across the row, left to right */
.rc-row { position: relative; }
.rc-row::after { content: ""; position: absolute; left: -2px; right: -2px; top: 0.8em; height: 1.5px; background: var(--o-paper-ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform 150ms var(--s-ease-out); }
.rc-line.is-struck .rc-row::after { transform: none; }
.rc-line.is-struck .rc-row { color: var(--o-paper-mute); }

/* the controls: small ink marks on the paper, each with a 44px target */
.rc-ctl { display: flex; align-items: center; gap: 16px; margin: 5px 0 3px 30px; }
.rc-b, .rc-rm { position: relative; color: var(--o-paper-ink); transition: transform 150ms var(--s-ease-out), background-color 150ms, color 150ms; }
.rc-b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; box-shadow: inset 0 0 0 1px oklch(0.26 0.012 55 / 0.24); }
.rc-b::before, .rc-rm::before { content: ""; position: absolute; inset: -8px; }
.rc-b svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.rc-b:hover:not(:disabled) { background: oklch(0.26 0.012 55 / 0.07); }
.rc-b:active:not(:disabled) { transform: scale(0.94); }
.rc-b:disabled { color: oklch(0.26 0.012 55 / 0.3); box-shadow: inset 0 0 0 1px oklch(0.26 0.012 55 / 0.12); cursor: not-allowed; }
.rc-rm { min-height: 28px; padding: 0 2px; font: inherit; font-size: 0.72rem; color: var(--o-paper-mute); text-decoration: underline dotted 1px; text-decoration-color: oklch(0.47 0.014 60 / 0.6); text-underline-offset: 3px; }
.rc-rm::before { inset: -8px -6px; }
.rc-rm:hover { color: var(--o-ink-red); text-decoration-style: solid; text-decoration-color: currentColor; }
/* focus on paper: a dark ring, not the light one the dark page uses */
.op-live :is(.rc-b, .rc-rm):focus-visible { outline: 2px solid var(--o-paper-ink); outline-offset: 2px; }
.op-live .rc-rm:focus-visible { border-radius: 3px; }

/* nothing printed yet */
.rc-nothing-live { display: grid; justify-items: center; gap: 10px; padding: 16px 0 10px; text-align: center; font-size: 0.76rem; }
.rc-nothing-live[hidden] { display: none; }
.rc-nothing-live svg { width: 56px; height: 38px; fill: none; stroke: oklch(0.47 0.014 60 / 0.5); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* the stub: Checkout is the one strong thing on it */
.op-stub-live .op-stub-in { padding: 20px 24px 26px; text-align: center; }
.op-checkout { width: 100%; min-height: 50px; padding: 0 20px; justify-content: space-between; font-family: var(--s-sans); }
.op-live .op-checkout:not(:disabled) { box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.16), 0 1px 1px oklch(0.3 0.06 30 / 0.3), 0 4px 10px -6px oklch(0.3 0.08 30 / 0.45); }
.op-checkout .s-price { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; }
.op-live .op-checkout:focus-visible { outline: 2px solid var(--o-paper-ink); outline-offset: 3px; }
.op-checkout:disabled { background: transparent; color: var(--o-paper-mute) !important; box-shadow: inset 0 0 0 1px oklch(0.26 0.012 55 / 0.22); cursor: not-allowed; justify-content: center; }
.op-checkout:disabled:hover { background: transparent; }
.op-checkout:disabled:active { transform: none; }
.op-stub-live .st-keep { margin-top: 10px; }

/* phones: a bar at the bottom opens the order as a sheet */
.op-bar {
  position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 35;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; height: 58px; padding: 0 18px 0 12px; border-radius: 16px;
  background: var(--s-red-deep); color: oklch(0.97 0.012 85); font-weight: 600; text-align: left;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.16), 0 16px 30px -12px oklch(0.05 0.01 55 / 0.9);
  transition: transform 150ms var(--s-ease-out);
}
.op-bar:active { transform: scale(0.97); }
.op-bar-n { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; display: grid; place-items: center; background: oklch(1 0 0 / 0.16); font-size: 0.86rem; }
.op-scrim { position: fixed; inset: 0; z-index: 39; background: oklch(0.1 0.01 55 / 0.6); }
@media (min-width: 980px) { .op-bar, .op-scrim { display: none !important; } }

/* ================================================================ step 2: pay */
.op-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -6px 0 8px -4px; padding-right: 8px; color: var(--s-mute); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 150ms; }
.op-back:hover { color: var(--s-ink); }
.op-back svg { width: 16px; height: 16px; transition: transform 200ms var(--s-ease-out); }
.op-back:hover svg { transform: translateX(-2px); }
.op-pay-empty { margin-top: 28px; display: grid; justify-items: start; gap: 20px; color: var(--s-mute); font-size: var(--s-t-lede); }

.op-form { max-width: 820px; }
.op-errsum { margin-top: 28px; padding: 18px 20px; border-radius: 14px; background: oklch(0.58 0.19 28 / 0.1); box-shadow: inset 0 0 0 1px oklch(0.58 0.19 28 / 0.38); outline: none; }
.op-errsum:focus-visible { box-shadow: inset 0 0 0 2px var(--s-red-ink); }
.op-errsum-h { font-weight: 600; }
.op-errsum ul { margin-top: 8px; display: grid; gap: 4px; }
.op-errsum a { display: inline-block; padding: 3px 0; font-size: 0.9rem; color: var(--s-ink); text-decoration: underline; text-decoration-color: oklch(0.93 0.02 85 / 0.35); text-underline-offset: 0.22em; }
.op-errsum a b { font-weight: 600; margin-right: 4px; }
.op-errsum a:hover { text-decoration-color: currentColor; }

.op-group { margin-top: clamp(26px, 2.8vw, 36px); }
.op-pay > .op-title { font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3.6rem); }
.op-group-h { font-family: var(--s-serif); font-weight: 600; font-size: 1.4rem; line-height: 1.2; }
.op-group > .op-group-h { margin-bottom: 16px; }
.op-group-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.op-honest { margin-top: 6px; font-size: 0.9rem; color: var(--s-mute); }
.op-test {
  min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 0.875rem; font-weight: 500; color: var(--s-ink); white-space: nowrap;
  background: var(--s-bg-2); box-shadow: inset 0 0 0 1px var(--s-line-2), var(--s-hi); transition: transform 150ms var(--s-ease-out), background-color 150ms;
}
.op-test:hover { background: oklch(0.28 0.017 55); }
.op-test:active { transform: scale(0.97); }
.op-test:disabled { opacity: 0.4; cursor: not-allowed; }

.op-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.op-field { min-width: 0; }
.op-field label { display: block; margin-bottom: 8px; font-size: 0.875rem; font-weight: 500; }
.op-page :is(.op-field input, .op-select select) {
  width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--s-bg-1); color: var(--s-ink); font-size: 1rem;
  box-shadow: inset 0 0 0 1px var(--s-line-2), var(--s-hi); transition: box-shadow 150ms, background-color 150ms; outline: none;
}
.op-field input::placeholder { color: oklch(0.76 0.025 75 / 0.55); }
.op-field input:hover, .op-select select:hover { box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.28), var(--s-hi); }
.op-page :is(.op-field input, .op-select select):focus-visible { box-shadow: inset 0 0 0 1.5px var(--s-ink), var(--o-ring); background: oklch(0.215 0.015 55); }
.op-field input[readonly] { color: var(--s-mute); }
.op-field-num input, #pay-exp, #pay-cvc { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.op-field.is-bad input { box-shadow: inset 0 0 0 1.5px var(--s-red-ink), var(--s-hi); }
.op-field.is-bad input:focus-visible { box-shadow: inset 0 0 0 1.5px var(--s-red-ink), 0 0 0 4px oklch(0.58 0.19 28 / 0.2); }
.op-err { min-height: 0; margin-top: 6px; font-size: 0.84rem; color: var(--s-red-ink); line-height: 1.45; }
.op-err:empty { margin-top: 0; }
.op-field { padding-bottom: 12px; }
.op-note { margin-top: 6px; font-size: 0.84rem; color: var(--s-mute); }
.op-select { position: relative; }
.op-select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.op-select select:disabled { opacity: 0.6; cursor: default; }
.op-select option { background: oklch(0.22 0.015 55); color: var(--s-ink); }
.op-select svg { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; translate: 0 -50%; pointer-events: none; color: var(--s-mute); }
.op-input-wrap { position: relative; }
.op-input-wrap input { padding-right: 66px; }
.op-brand { position: absolute; right: 12px; top: 50%; translate: 0 -50%; width: 40px; height: 26px; pointer-events: none; }
.op-mark { display: block; width: 100%; height: 100%; color: var(--s-ink); }
.op-mark rect { fill: oklch(1 0 0 / 0.07); stroke: oklch(1 0 0 / 0.3); stroke-width: 1; }
.op-mark .mk-l { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.op-mark text { font: 600 8.5px var(--s-sans); fill: currentColor; text-anchor: middle; }

/* the card that mirrors the fields, and turns over for the security code */
.op-card-wrap { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.op-card { perspective: 1100px; aspect-ratio: 1.586; width: 100%; margin-top: 28px; }
.op-card-in { position: relative; height: 100%; transform-style: preserve-3d; transition: transform 640ms var(--s-ease-io); }
.op-card.is-flipped .op-card-in { transform: rotateY(180deg); }
.op-card-face {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; color: oklch(0.95 0.015 85);
  background:
    radial-gradient(in oklch 120% 90% at 0% 0%, oklch(0.42 0.1 34 / 0.9), oklch(0.42 0.1 34 / 0) 60%),
    linear-gradient(in oklch 150deg, oklch(0.27 0.05 38), oklch(0.17 0.018 50));
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.12), inset 0 1px 0 oklch(1 0 0 / 0.16), 0 24px 40px -20px oklch(0.04 0.01 55 / 0.95);
}
.op-card-face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, oklch(1 0 0 / 0) 40%, oklch(1 0 0 / 0.06) 50%, oklch(1 0 0 / 0) 60%); pointer-events: none; }
.op-card-front { display: grid; grid-template: "logo mark" auto "chip ." 1fr "num num" auto "name exp" auto / 1fr auto; padding: 18px 20px; row-gap: 6px; }
.op-card-logo { grid-area: logo; font-family: var(--s-logo); font-size: 20px; line-height: 1; letter-spacing: 0.02em; }
.op-card-mark { grid-area: mark; width: 46px; height: 30px; }
.op-card-mark .op-mark rect { fill: oklch(1 0 0 / 0.1); stroke: oklch(1 0 0 / 0.35); }
.op-card-chip { grid-area: chip; align-self: center; width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(in oklch 135deg, oklch(0.84 0.07 85), oklch(0.66 0.07 70)); box-shadow: inset 0 0 0 1px oklch(0.4 0.05 60 / 0.4);
  background-image: linear-gradient(oklch(0.45 0.05 60 / 0.35) 0 0), linear-gradient(oklch(0.45 0.05 60 / 0.35) 0 0), linear-gradient(in oklch 135deg, oklch(0.84 0.07 85), oklch(0.66 0.07 70));
  background-size: 100% 1px, 1px 100%, auto; background-position: 0 50%, 40% 0, 0 0; background-repeat: no-repeat; }
.op-card-num { grid-area: num; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.15rem); font-weight: 500; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; }
.op-card-num b { font-weight: 500; width: 0.66em; text-align: center; }
.op-card-num b.is-dot { opacity: 0.4; }
.op-card-num i { width: 0.5em; }
.op-card-name, .op-card-exp { font-size: 0.78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-card-name { grid-area: name; }
.op-card-exp { grid-area: exp; font-variant-numeric: tabular-nums; }
.op-card-name.is-ph, .op-card-exp.is-ph { opacity: 0.5; }
.op-card-back { transform: rotateY(180deg); }
.op-card-stripe { position: absolute; left: 0; right: 0; top: 16%; height: 20%; background: oklch(0.1 0.01 55); }
.op-card-sig { position: absolute; left: 20px; right: 20px; top: 46%; height: 32px; border-radius: 4px; display: flex; align-items: center; justify-content: flex-end; padding: 0 12px;
  background: repeating-linear-gradient(-45deg, oklch(0.92 0.015 85), oklch(0.92 0.015 85) 4px, oklch(0.88 0.015 85) 4px 8px); color: oklch(0.25 0.01 55); font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: 0.12em; }
.op-card-back-note { position: absolute; left: 20px; bottom: 16px; font-size: 0.7rem; opacity: 0.6; }

.op-pay-row { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.op-pay-btn { min-width: min(100%, 300px); min-height: 58px; font-size: 1.05rem; }
.op-pay-label { display: inline-flex; align-items: center; gap: 10px; }
.op-pay-btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.op-pay-btn.is-busy { cursor: progress; background: oklch(0.45 0.15 28); }
.op-pay-btn.is-busy:active, .op-pay-btn.is-paid:active { transform: none; }
.op-pay-btn.is-paid { background: oklch(0.45 0.15 28); }
.op-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid oklch(1 0 0 / 0.3); border-top-color: oklch(0.97 0.012 85); animation: op-spin 700ms linear infinite; }
@keyframes op-spin { to { transform: rotate(1turn); } }
.op-pay-fine { font-size: 0.84rem; color: var(--s-mute); }

.op-after { margin-top: clamp(24px, 3vw, 36px); max-width: 36em; }
.op-after-h { font-family: var(--s-serif); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.2; outline: none; }
.op-after-p { margin-top: 12px; color: var(--s-mute); }
.op-tear-btn { margin-top: 24px; min-height: 48px; }

.op-done { padding-top: clamp(20px, 3vw, 36px); max-width: 36em; }
.op-done-h { font-family: var(--s-serif); font-weight: 600; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.12; text-wrap: balance; outline: none; }
.op-done-p { margin-top: 14px; color: var(--s-mute); }
.op-done-acts { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.op-done-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* warm light as the payment lands */
.op-main::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1600ms var(--s-ease-out);
  background: radial-gradient(in oklch 55% 60% at 74% 42%, oklch(0.62 0.12 62 / 0.13), oklch(0.62 0.12 62 / 0) 70%); }
body.op-warm .op-main::before { opacity: 1; }

/* ================================================================ the receipt (paper) */
.op-receipt-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 0 12px; }
.op-receipt-col.is-empty { display: none; }
.op-receipt {
  position: relative; width: min(100%, 360px); view-transition-name: op-sheet;
  filter: drop-shadow(0 1px 1px oklch(0.05 0.01 55 / 0.4)) drop-shadow(0 22px 26px oklch(0.05 0.01 55 / 0.5));
}
.op-receipt.is-torn { margin-bottom: 44px; }
.op-paper {
  --hole: 2.4px; --pitch: 9px; --notch: 9px; --zz: 6px;
  background-color: var(--o-paper); color: var(--o-paper-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .25 .1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(in oklch to bottom, oklch(0.975 0.008 88), oklch(0.95 0.011 85));
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 0.8rem; line-height: 1.55;
}
.op-paper-top {
  position: relative; padding: 30px 24px 24px;
  -webkit-mask:
    conic-gradient(from -45deg at 50% var(--zz), #0000 0 90deg, #000 0) 0 0 / calc(2 * var(--zz)) 100% repeat-x,
    radial-gradient(circle at 50% 100%, #0000 var(--hole), #000 calc(var(--hole) + 0.5px)) 0 0 / var(--pitch) 100% repeat-x,
    radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)),
    radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px));
  -webkit-mask-composite: source-in;
  mask:
    conic-gradient(from -45deg at 50% var(--zz), #0000 0 90deg, #000 0) 0 0 / calc(2 * var(--zz)) 100% repeat-x,
    radial-gradient(circle at 50% 100%, #0000 var(--hole), #000 calc(var(--hole) + 0.5px)) 0 0 / var(--pitch) 100% repeat-x,
    radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)),
    radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + 0.5px));
  mask-composite: intersect;
}
.op-stub { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.op-stub.is-ready { cursor: grab; }
.op-stub.is-held { cursor: grabbing; }
.op-stub-in {
  padding: 20px 24px 26px;
  -webkit-mask:
    radial-gradient(circle at 50% 0, #0000 var(--hole), #000 calc(var(--hole) + 0.5px)) 0 0 / var(--pitch) 100% repeat-x,
    radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)),
    radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)),
    conic-gradient(from 135deg at 50% calc(100% - var(--zz)), #0000 0 90deg, #000 0) 0 0 / calc(2 * var(--zz)) 100% repeat-x;
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle at 50% 0, #0000 var(--hole), #000 calc(var(--hole) + 0.5px)) 0 0 / var(--pitch) 100% repeat-x,
    radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)),
    radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + 0.5px)),
    conic-gradient(from 135deg at 50% calc(100% - var(--zz)), #0000 0 90deg, #000 0) 0 0 / calc(2 * var(--zz)) 100% repeat-x;
  mask-composite: intersect;
}
/* receipt body (both steps) */
.rc-head { text-align: center; }
.rc-logo { font-family: var(--s-logo); font-size: 34px; line-height: 1; letter-spacing: 0.02em; }
.rc-addr { margin-top: 8px; font-size: 0.72rem; color: var(--o-paper-mute); line-height: 1.5; }
.rc-date { margin-top: 14px; display: flex; justify-content: space-between; font-size: 0.74rem; }
.rc-rule { height: 1px; margin: 14px 0; background: repeating-linear-gradient(90deg, oklch(0.26 0.012 55 / 0.45) 0 4px, transparent 4px 8px); }
.rc-line { padding: 3.5px 0; }
.rc-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.rc-n small { display: block; font-size: 0.7rem; color: var(--o-paper-mute); line-height: 1.45; }
.rc-p, .rc-sums dd { text-align: right; }
.rc-nothing { color: var(--o-paper-mute); text-align: center; }
.rc-sums, .rc-meta { display: grid; gap: 4px; }
.rc-sums div, .rc-meta div { display: flex; justify-content: space-between; gap: 14px; }
.rc-sums dd, .rc-meta dd { margin: 0; }
.rc-total { margin-top: 6px; font-size: 1.02rem; font-weight: 600; }
.rc-meta { font-size: 0.75rem; }
.rc-meta dt { color: var(--o-paper-mute); flex: none; }
.rc-meta dd { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.rc-blank { display: inline-block; width: 92px; height: 0.9em; border-bottom: 1px dashed oklch(0.47 0.014 60 / 0.6); vertical-align: -2px; }
.rc-status.is-paid, .rc-status.is-torn { color: var(--o-ink-red); font-weight: 600; }
.rc-dots i { font-style: normal; animation: rc-blink 1.2s infinite; }
.rc-dots i:nth-child(2) { animation-delay: 0.2s; }
.rc-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes rc-blink { 0%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
.rc-thanks { margin-top: 16px; text-align: center; font-size: 0.7rem; color: var(--o-paper-mute); }

/* the stamp: red ink, multiplied into the paper */
.op-stamp { position: absolute; left: 24%; bottom: 46px; width: 128px; height: 128px; rotate: -13deg; color: var(--o-ink-red); mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
.op-stamp.is-on { opacity: 0.88; }
.op-stamp svg { width: 100%; height: 100%; overflow: visible; }
.op-stamp .st-arc { font: 600 13.5px var(--s-sans); letter-spacing: 0.14em; fill: currentColor; }
.op-stamp .st-big { font: 700 46px var(--s-serif); fill: currentColor; }
.op-stamp-shade { position: absolute; left: 24%; bottom: 46px; width: 128px; height: 128px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, oklch(0.2 0.01 55 / 0.5), oklch(0.2 0.01 55 / 0) 70%); filter: blur(6px); opacity: 0; }

/* the stub */
.st-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.st-l { font-size: 0.8rem; color: var(--o-paper-mute); }
.st-no { display: inline-flex; font-weight: 600; font-size: 3.4rem; line-height: 1; letter-spacing: 0.02em; }
.st-no span { display: inline-block; }
.st-blank { width: 0.56em; height: 0.82em; margin-left: 0.1em; border-bottom: 2px dashed oklch(0.47 0.014 60 / 0.5); }
.st-who { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; font-weight: 500; }
.st-who span:last-child { text-align: right; }
.st-keep { margin-top: 4px; font-size: 0.74rem; color: var(--o-paper-mute); }

.op-tear-hint { margin-top: 18px; font-size: 0.84rem; color: var(--s-mute); opacity: 0; transform: translateY(-4px); transition: opacity 300ms, transform 300ms var(--s-ease-out); pointer-events: none; }
.op-tear-hint.is-on { opacity: 1; transform: none; }
.op-receipt-stage.is-torn .op-tear-hint { display: none; }

/* ================================================================ step change (View Transitions)
   The receipt is one piece of paper in both steps: the paper (op-sheet), its head, each visible line (ol-N), the
   sums and the stub carry the same names, so they glide to their places in the pay step instead of cross-fading.
   The paper itself: the new one lies underneath, fully opaque, the old one fades off on top of it, and the group is
   clipped at its (animating) bottom edge, so the paper grows or shortens instead of being stretched. */
.rc-head { view-transition-name: rc-head; }
.rc-rule-a { view-transition-name: rc-rule-a; }
.rc-rule-b { view-transition-name: rc-rule-b; }
.rc-sums { view-transition-name: rc-sums; }
.rc-after { view-transition-name: rc-after; }
.rc-ready { view-transition-name: rc-ready; }
.op-stub { view-transition-name: op-stub; }
:root[data-vt]::view-transition-group(*) { animation-duration: 520ms; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
:root[data-vt]::view-transition-group(op-sheet) { clip-path: inset(-80px -80px 0 -80px); }
:root[data-vt]::view-transition-new(op-sheet), :root[data-vt]::view-transition-new(op-stub) { animation: none; opacity: 1; mix-blend-mode: normal; }
:root[data-vt]::view-transition-old(op-sheet), :root[data-vt]::view-transition-old(op-stub) { z-index: 1; mix-blend-mode: normal; animation: 300ms cubic-bezier(0.4, 0, 1, 1) both op-vt-fade; }
/* what only one step has: the pickup line leaves quickly, the pay step's details print in once the rest has landed */
:root[data-vt]::view-transition-old(rc-ready) { animation: 160ms cubic-bezier(0.4, 0, 1, 1) both op-vt-fade; }
:root[data-vt]::view-transition-new(rc-after) { animation: 260ms 300ms cubic-bezier(0.22, 1, 0.36, 1) both op-vt-print; }
:root[data-vt]::view-transition-old(rc-after) { animation: 200ms cubic-bezier(0.4, 0, 1, 1) both op-vt-fade; }
@keyframes op-vt-fade { to { opacity: 0; } }
@keyframes op-vt-print { from { opacity: 0; clip-path: inset(0 0 100% 0); } }
:root[data-vt]::view-transition-old(root) { animation: 260ms cubic-bezier(0.4, 0, 1, 1) both op-vt-out; }
:root[data-vt]::view-transition-new(root) { animation: 380ms 140ms cubic-bezier(0.22, 1, 0.36, 1) both op-vt-in; }
:root[data-vt="back"]::view-transition-old(root) { animation-name: op-vt-out-back; }
:root[data-vt="back"]::view-transition-new(root) { animation-name: op-vt-in-back; }
@keyframes op-vt-out { to { opacity: 0; transform: translateX(-24px); } }
@keyframes op-vt-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes op-vt-out-back { to { opacity: 0; transform: translateX(24px); } }
@keyframes op-vt-in-back { from { opacity: 0; transform: translateX(-24px); } }

/* ================================================================ phone sheet for a dish */
.op-sheet { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; display: flex; align-items: flex-end;
  background: oklch(0.1 0.01 55 / 0.6); color: var(--s-ink); font-family: var(--s-sans); overscroll-behavior: contain; }
.op-sheet:not([open]) { display: none; }
.op-sheet::backdrop { background: transparent; }
.op-sheet-in { position: relative; width: 100%; max-height: 92dvh; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: var(--o-raise);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.1), inset 0 0 0 1px oklch(1 0 0 / 0.08); }
.op-sheet .op-grab { display: block; padding: 10px 0 6px; touch-action: none; }
.op-grab span { display: block; width: 38px; height: 4px; margin: 0 auto; border-radius: 2px; background: oklch(1 0 0 / 0.22); }
.op-sheet-x { display: grid; position: absolute; top: 14px; right: 14px; z-index: 2; }
.op-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px calc(24px + env(safe-area-inset-bottom)); }
.op-det-photo { margin: 0 0 18px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--s-bg-1); }
.op-det-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.op-sheet .op-det-head { padding-right: 52px; }
.op-sheet .op-det.is-ramen .op-det-head { padding-right: 44px; }
.op-sheet .op-det-head, .op-sheet .op-det-bowl { touch-action: none; }
/* phone ramen: the bowl on top, big enough to spin with a thumb, the words full width under it */
.op-sheet .op-det.is-ramen { grid-template-columns: minmax(0, 1fr); }
.op-sheet .op-det.is-ramen .op-det-bowl { grid-row: auto; justify-self: center; margin: 4px 0 18px; }
.op-sheet .op-det.is-ramen .op-det-bowl .m-bowl { width: min(56vw, 220px); }

/* ================================================================ responsive */
@media (max-width: 1180px) {
  .op-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-card-wrap { grid-template-columns: minmax(0, 1fr); }
  .op-card { max-width: 320px; margin-top: 0; }
}
@media (max-width: 979px) {
  .op-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .op-receipt { width: min(100% - 20px, 360px); }
  .op-choose, .op-pay, .op-receipt-col, .op-done { grid-column: 1; grid-row: auto; }
  .op-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.has-order[data-step="choose"] .op-main { padding-bottom: 88px; }
  .op-receipt-col { margin-top: 40px; }
  /* the order becomes a sheet behind the bar */
  .op-order { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; grid-row: auto; pointer-events: none; }
  .op-order-panel { pointer-events: auto; max-height: 90dvh; align-items: stretch; border-radius: 22px 22px 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--o-raise); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.1), inset 0 0 0 1px oklch(1 0 0 / 0.08); transform: translateY(105%); visibility: hidden; }
  .op-order.is-open .op-order-panel { transform: none; visibility: visible; }
  .op-order-head { display: block; position: relative; flex: none; height: 52px; touch-action: none; }
  .op-order .op-grab { display: block; padding: 10px 0; touch-action: none; }
  .op-order .op-x { display: grid; position: absolute; right: -4px; top: 6px; }
  .op-order .op-live { width: 100%; max-height: none; flex: 0 1 auto; min-height: 0;
    filter: drop-shadow(0 1px 1px oklch(0.05 0.01 55 / 0.4)) drop-shadow(0 12px 16px oklch(0.05 0.01 55 / 0.45)); }
  .op-order [data-live-head] { touch-action: none; }
  /* the sheet and the pay step's receipt are far apart on a phone: no shared names, the steps just slide */
  .op-order :is(.op-receipt, .rc-head, .rc-ready, .rc-rule, .rc-line, .rc-sums, .op-stub) { view-transition-name: none !important; }
}
@media (max-width: 760px) {
  .op-page { --o-sticky: 64px; }
  .op-filters { position: relative; top: 0; flex-direction: column; align-items: stretch; gap: 10px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding-bottom: 4px; }
  .op-filters::after { display: none; }
  /* the same track, scrolling sideways inside itself; the highlights live in the options, so they scroll with them */
  .op-seg { width: auto; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .op-seg::-webkit-scrollbar { display: none; }
  .op-seg-opt span { height: 38px; padding: 0 14px; }
  .op-attrs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--s-gutter)); padding-inline: calc(var(--s-gutter) - 10px); }
  .op-attrs::-webkit-scrollbar { display: none; }
  .op-count { margin-left: 0; }
  .op-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; margin-top: 12px; }
  .op-media, .op-hit { border-radius: 14px; }
  .op-name { font-size: 1.06rem; flex-direction: column; gap: 2px; }
  .op-name .s-price { font-size: 0.92rem; }
  .op-desc { font-size: 0.82rem; }
  .op-meta { font-size: 0.74rem; }
  .op-ctl { right: 8px; bottom: 8px; }
  .op-add { height: 40px; min-width: 40px; }
  .op-add-wide { padding: 0 13px 0 10px; }
  .op-step-float button { width: 36px; height: 40px; }
  .op-row { grid-template-columns: minmax(0, 1fr); }
  .op-row-tight { grid-template-columns: 1fr 1fr; }
  .op-card { max-width: 300px; }
  .op-pay-btn { width: 100%; }
  .op-group-top { align-items: center; }
}
@media (max-width: 380px) {
  .op-row-tight { grid-template-columns: minmax(0, 1fr); }
  .op-extras { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .op-media > img, .op-media > .op-bowl, .op-card-in, .op-tick svg, .op-tear-hint, .op-main::before { transition: none !important; }
  .op-spin { animation-duration: 2s; }
}
