/* BRWN table service, guest app.
   Apple HIG: SF stack, iOS type scale, 8pt grid, 44pt targets, concentric radii,
   system greys, light and dark, safe areas, reduced motion.
   One tint only, BRWN espresso, standing in for system blue.
   Breakpoints: phone < 760, tablet 760 to 1023, desktop >= 1024. */

:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;

  /* iOS type scale */
  --t-caption2: 11px;
  --t-caption1: 12px;
  --t-footnote: 13px;
  --t-subhead: 15px;
  --t-body: 17px;
  --t-title3: 20px;
  --t-title2: 22px;
  --t-title1: 28px;
  --t-large: 34px;

  /* 8pt grid */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;

  /* radii, concentric: inner + padding = outer */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-full: 9999px;

  /* the single tint, BRWN espresso */
  --tint: #7a4a38;
  --tint-press: #653c2d;

  /* the filled primary. Espresso on light, cream on dark, see the dark block. */
  --fill: #7a4a38;
  --fill-press: #653c2d;
  --on-fill: #ffffff;
  --on-tint: #ffffff;   /* ink that sits ON the tint */
  --tint-soft: rgba(122, 74, 56, 0.1);
  --tint-line: rgba(122, 74, 56, 0.24);

  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;

  --gray: #8e8e93;
  --gray3: #c7c7cc;
  --gray5: #e5e5ea;
  --gray6: #f2f2f7;

  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.75);
  --label-3: rgba(60, 60, 67, 0.45);

  --bg: #f2f2f7;
  --surface: #ffffff;
  --sep: rgba(60, 60, 67, 0.29);
  --sep-soft: rgba(60, 60, 67, 0.12);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.58, 1);
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --d-fast: 200ms;
  --d-norm: 300ms;

  --shell: 100%;
  --gut: var(--s4);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* Dark is designed, not inverted. Pure black under mid grey cards reads cheap on a
   monitor, so the ground is a warm near black and surfaces lift off it. The filled
   primary goes cream on dark: a tan capsule on black is the thing that looks cheap. */
@media (prefers-color-scheme: dark) {
  :root {
    --tint: #e3a87f;
    --tint-press: #d0946b;
    --tint-soft: rgba(227, 168, 127, 0.14);
    --tint-line: rgba(227, 168, 127, 0.28);
    --green: #30d158; --orange: #ff9f0a; --red: #ff6961;
    --gray: #8e8e93; --gray3: #4a4a4d; --gray5: #232326; --gray6: #17171a;
    --label: #f5f4f2;
    --label-2: rgba(235, 233, 228, 0.72);
    --label-3: rgba(235, 233, 228, 0.45);
    --bg: #0b0b0d;
    --surface: #17171a;
    --sep: rgba(120, 118, 112, 0.34);
    --sep-soft: rgba(120, 118, 112, 0.18);

    --fill: #f0ebe4;        /* the filled primary */
    --fill-press: #ded7ce;
    --on-fill: #14120f;
    --on-tint: #241a13;
  }
  .shell { background: var(--bg); }
  /* surfaces lift with a hairline instead of a shadow, which does nothing on dark */
  .group, .list, .thumb, .searchbox { box-shadow: inset 0 0 0 0.5px var(--sep-soft); }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.35;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.022em; }

.shell { width: var(--shell); margin: 0 auto; min-height: 100dvh; position: relative; }

/* ---------- shared bits ------------------------------------------------- */

.ico {
  width: 20px; height: 20px; flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  display: block;
}
.ico-arrow { -webkit-mask-image: url('/img/icons/arrow.svg'); mask-image: url('/img/icons/arrow.svg'); }
.ico-check { -webkit-mask-image: url('/img/icons/check.svg'); mask-image: url('/img/icons/check.svg'); }
.ico-wifi  { -webkit-mask-image: url('/img/icons/wifi.svg');  mask-image: url('/img/icons/wifi.svg'); }
.ico-phone { -webkit-mask-image: url('/img/icons/phone.svg'); mask-image: url('/img/icons/phone.svg'); }
.ico-key   { -webkit-mask-image: url('/img/icons/key.svg');   mask-image: url('/img/icons/key.svg'); }
.ico-back  { -webkit-mask-image: url('/img/icons/back.svg');  mask-image: url('/img/icons/back.svg'); }
.ico-close { -webkit-mask-image: url('/img/icons/close.svg'); mask-image: url('/img/icons/close.svg'); }
.ico-copy  { -webkit-mask-image: url('/img/icons/copy.svg');  mask-image: url('/img/icons/copy.svg'); }
.ico-search{ -webkit-mask-image: url('/img/icons/search.svg');mask-image: url('/img/icons/search.svg'); }
.ico-cup   { -webkit-mask-image: url('/img/icons/cup.svg');   mask-image: url('/img/icons/cup.svg'); }

/* iOS primary button, capsule, 44pt floor, press scale */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  width: 100%; min-height: 50px; padding: 0 var(--s5);
  border-radius: var(--r-full);
  background: var(--fill); color: var(--on-fill);
  font-size: var(--t-body); font-weight: 600;
  transition: transform var(--d-fast) var(--ease-out), background var(--d-fast) var(--ease), opacity var(--d-fast) var(--ease);
}
.btn:active { transform: scale(0.98); background: var(--fill-press); }
.btn[disabled] { opacity: 0.35; pointer-events: none; }

.btn.tinted { background: var(--tint-soft); color: var(--tint); }
.btn.plain { background: none; color: var(--tint); min-height: 44px; font-weight: 500; }

.linkback {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 44px; padding-right: var(--s2);
  color: var(--tint); font-size: var(--t-body);
}
.linkback .ico { width: 17px; height: 17px; }

/* grouped list, the iOS settings shape */
.group { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.group + .group { margin-top: var(--s4); }
.row { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: var(--s3) var(--s4); }
.row + .row { box-shadow: inset 0 0.5px 0 var(--sep-soft); }
.row .grow { flex: 1; min-width: 0; }
.row .k { font-size: var(--t-body); }
.row .v { color: var(--label-2); font-size: var(--t-body); }
.hdr { font-size: var(--t-footnote); color: var(--label-2); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 var(--s4) var(--s2); }

.err { color: var(--red); font-size: var(--t-footnote); min-height: 18px; padding: var(--s2) var(--s1) 0; }
.note { color: var(--label-2); font-size: var(--t-footnote); line-height: 1.45; }

/* ---------- views ------------------------------------------------------- */

.view { display: none; flex-direction: column; min-height: 100dvh; }
.view.on { display: flex; }

.pad { padding: 0 var(--gut); }

.fade > * { opacity: 0; transform: translateY(10px); animation: fade var(--d-norm) var(--ease-out) forwards; }
.fade > *:nth-child(1) { animation-delay: 20ms; }
.fade > *:nth-child(2) { animation-delay: 70ms; }
.fade > *:nth-child(3) { animation-delay: 120ms; }
.fade > *:nth-child(4) { animation-delay: 170ms; }
.fade > *:nth-child(5) { animation-delay: 220ms; }
@keyframes fade { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .fade > * { animation: none; opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- onboarding, wifi portal ------------------------------------- */

.onb { justify-content: center; padding: calc(var(--safe-t) + var(--s8)) var(--gut) calc(var(--safe-b) + var(--s6)); gap: var(--s6); }
.onb .top { display: grid; gap: var(--s6); }

.brandmark { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.brandmark .logo {
  width: 68px; height: 68px; border-radius: var(--r-xl);
  background: var(--tint); color: var(--on-tint);
  display: grid; place-items: center;
  font-size: 30px; font-weight: 700; letter-spacing: 0.04em;
  box-shadow: 0 10px 24px -12px rgba(122, 74, 56, 0.7);
}
.brandmark .wd { font-size: var(--t-title2); font-weight: 700; letter-spacing: 0.12em; }

.tablepill {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 6px var(--s3); border-radius: var(--r-full);
  background: var(--tint-soft); color: var(--tint);
  font-size: var(--t-footnote); font-weight: 600;
}

h1.big { font-size: var(--t-title1); line-height: 1.14; text-align: center; }
h1.large { font-size: var(--t-large); line-height: 1.1; }
p.sub { margin: var(--s2) 0 0; color: var(--label-2); font-size: var(--t-subhead); line-height: 1.4; text-align: center; }

.steps { display: grid; gap: 0; }
.steps li { list-style: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 60px; }
.steps li + li { box-shadow: inset 0 0.5px 0 var(--sep-soft); }
.steps ol { margin: 0; padding: 0; }
.steps .badge {
  width: 30px; height: 30px; border-radius: var(--r-full);
  background: var(--tint-soft); color: var(--tint);
  display: grid; place-items: center;
}
.steps .badge .ico { width: 16px; height: 16px; }
.steps .tt { font-size: var(--t-subhead); font-weight: 600; }
.steps .ss { font-size: var(--t-footnote); color: var(--label-2); margin-top: 1px; }

.field {
  display: flex; align-items: center; gap: var(--s2);
  min-height: 50px; padding: 0 var(--s4);
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow var(--d-fast) var(--ease);
}
.field:focus-within { box-shadow: inset 0 0 0 2px var(--tint); }
.field .pfx { color: var(--label-2); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: var(--t-body); letter-spacing: 0.02em; }

.otp { display: flex; gap: var(--s2); }
.otp input {
  flex: 1 1 0; min-width: 0; width: 100%;
  height: 62px; text-align: center;
  font-size: var(--t-title1); font-weight: 600;
  background: var(--surface); border: 0; border-radius: var(--r-md); outline: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow var(--d-fast) var(--ease), transform var(--d-fast) var(--spring);
}
.otp input:focus { box-shadow: inset 0 0 0 2px var(--tint); transform: translateY(-2px); }

.demoflag {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4); border-radius: var(--r-md);
  background: var(--tint-soft); color: var(--tint);
  font-size: var(--t-footnote);
}
.demoflag b { font-size: var(--t-title3); letter-spacing: 0.16em; font-weight: 700; }

/* ---------- navigation bar ---------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-t);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow var(--d-fast) var(--ease);
}
.nav.stuck { box-shadow: 0 0.5px 0 var(--sep); }
.nav .inline {
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 44px; padding: 0 var(--gut);
  font-size: var(--t-body); font-weight: 600;
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
  pointer-events: none;
}
.nav.stuck .inline { opacity: 1; transform: none; }
.nav .title { padding: var(--s1) var(--gut) var(--s2); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); }
.nav .title h1 { font-size: var(--t-large); }
.nav.stuck .title { display: none; }

/* the category rail, Chaayos style underline, iOS weights */
.rail { display: flex; gap: var(--s5); overflow-x: auto; scrollbar-width: none; padding: 0 var(--gut); }
.rail::-webkit-scrollbar { display: none; }
.rail button {
  flex: 0 0 auto; position: relative;
  min-height: 44px; padding: 0 0 var(--s2);
  color: var(--label-2); font-size: var(--t-subhead); font-weight: 600; white-space: nowrap;
  transition: color var(--d-fast) var(--ease);
}
.rail button::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--tint);
  transform: scaleX(0); transform-origin: center;
  transition: transform var(--d-norm) var(--ease-out);
}
.rail button[aria-current='true'] { color: var(--label); }
.rail button[aria-current='true']::after { transform: scaleX(1); }

/* ---------- search ------------------------------------------------------ */

.searchbar { padding: var(--s2) var(--gut) var(--s3); }
.searchbox {
  display: flex; align-items: center; gap: var(--s2);
  height: 36px; padding: 0 var(--s2);
  background: var(--gray5); border-radius: var(--r-sm);
  color: var(--label-2);
}
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: var(--t-subhead); color: var(--label); }
.searchbox .ico { width: 16px; height: 16px; }
.searchbox button { color: var(--label-2); display: grid; place-items: center; width: 22px; height: 22px; }

/* ---------- menu list --------------------------------------------------- */

.section { padding: var(--s5) 0 0; scroll-margin-top: 128px; }
.section h2 { font-size: var(--t-title3); padding: 0 var(--gut) var(--s1); }
.section .cap { padding: 0 var(--gut) var(--s3); color: var(--label-2); font-size: var(--t-footnote); }

.list { background: var(--surface); }
.item {
  display: flex; gap: var(--s4); align-items: flex-start;
  width: 100%; text-align: left; padding: var(--s4) var(--gut);
  transition: background var(--d-fast) var(--ease);
}
.item + .item { box-shadow: inset 0 0.5px 0 var(--sep-soft); }
.item:active { background: var(--gray6); }
.item .info { flex: 1; min-width: 0; }
.item .nm { font-size: var(--t-body); font-weight: 600; line-height: 1.25; }
.item .ds { margin-top: var(--s1); font-size: var(--t-footnote); color: var(--label-2); line-height: 1.4; }
.item .pr { margin-top: var(--s2); font-size: var(--t-subhead); font-weight: 600; font-variant-numeric: tabular-nums; }
.item .tag {
  display: inline-block; margin-left: var(--s2); vertical-align: 2px;
  padding: 2px 7px; border-radius: var(--r-full);
  background: var(--tint-soft); color: var(--tint);
  font-size: var(--t-caption2); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

/* photo tile plus the ADD control that overlaps it, the food app convention */
.item .shot { position: relative; width: 104px; flex: 0 0 auto; }
.thumb {
  width: 104px; height: 104px; border-radius: var(--r-md);
  background: var(--gray6); overflow: hidden; position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--tint-soft); color: var(--tint);
}
.thumb .ph .ico { width: 30px; height: 30px; opacity: 0.55; }

.addwrap { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); }
.add {
  min-width: 82px; height: 32px; padding: 0 var(--s4);
  border-radius: var(--r-sm);
  background: var(--surface); color: var(--tint);
  box-shadow: 0 0 0 1px var(--tint-line), 0 4px 10px -6px rgba(0, 0, 0, 0.4);
  font-size: var(--t-footnote); font-weight: 700; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--d-fast) var(--ease-out);
}
.add:active { transform: scale(0.95); }
.stepper {
  min-width: 82px; height: 32px; border-radius: var(--r-sm);
  background: var(--tint); color: var(--on-tint);
  display: inline-flex; align-items: center; justify-content: space-between;
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.stepper button { width: 28px; height: 32px; display: grid; place-items: center; font-size: var(--t-body); font-weight: 600; }
.stepper .n { font-size: var(--t-footnote); font-weight: 700; font-variant-numeric: tabular-nums; }

.item.out { opacity: 0.45; pointer-events: none; }
.item.out .add { color: var(--label-2); box-shadow: 0 0 0 1px var(--sep-soft); }

.empty { padding: var(--s10) var(--gut); text-align: center; color: var(--label-2); font-size: var(--t-subhead); }

/* ---------- sheet ------------------------------------------------------- */

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity var(--d-norm) var(--ease); }
.scrim.on { opacity: 1; }

.sheet {
  position: fixed; z-index: 41; left: 50%; bottom: 0;
  width: var(--shell); max-width: 560px;
  transform: translate(-50%, 100%);
  transition: transform 420ms var(--ease-out);
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  max-height: 92dvh; display: flex; flex-direction: column;
  overflow: hidden;
}
.sheet.on { transform: translate(-50%, 0); }
.grabber { width: 36px; height: 5px; border-radius: var(--r-full); background: var(--gray3); margin: var(--s2) auto var(--s1); flex: 0 0 auto; }
.sheet .scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 var(--gut) var(--s4); }
.sheet .foot {
  flex: 0 0 auto; padding: var(--s3) var(--gut) calc(var(--s3) + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--sep);
  display: flex; align-items: center; gap: var(--s3);
}

.hero { margin: 0 calc(var(--gut) * -1) var(--s4); aspect-ratio: 16 / 10; background: var(--gray6); position: relative; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .ph { position: absolute; inset: 0; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); }
.hero .ph .ico { width: 56px; height: 56px; opacity: 0.5; }

.sheet h2 { font-size: var(--t-title2); }
.sheet .price { margin-top: var(--s1); font-size: var(--t-title3); font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet .desc { margin: var(--s3) 0 0; color: var(--label-2); font-size: var(--t-subhead); line-height: 1.45; }

.optgroup { margin-top: var(--s6); }
.optgroup .lbl { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 0 var(--s1) var(--s2); }
.optgroup .lbl .t { font-size: var(--t-footnote); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--label-2); }
.optgroup .lbl .o { font-size: var(--t-caption1); color: var(--label-2); }

.seg { display: flex; padding: 2px; background: var(--gray5); border-radius: 10px; gap: 2px; }
.seg button {
  flex: 1; min-height: 40px; border-radius: var(--r-sm);
  font-size: var(--t-subhead); font-weight: 500; color: var(--label);
  transition: background var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
}
.seg button[aria-pressed='true'] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

.opt {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  min-height: 50px; padding: var(--s2) var(--s4);
  background: var(--surface);
  font-size: var(--t-body); text-align: left;
}
.opt + .opt { box-shadow: inset 0 0.5px 0 var(--sep-soft); }
.opt .grow { flex: 1; min-width: 0; }
.opt .plus { color: var(--label-2); font-size: var(--t-subhead); font-variant-numeric: tabular-nums; }
.opt .tick {
  width: 22px; height: 22px; border-radius: var(--r-full); flex: 0 0 auto;
  box-shadow: inset 0 0 0 1.5px var(--gray3);
  display: grid; place-items: center; color: transparent;
  transition: background var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.opt .tick .ico { width: 12px; height: 12px; }
.opt[aria-pressed='true'] .tick { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--tint); color: #fff; }

.qty { display: flex; align-items: center; gap: var(--s2); background: var(--gray5); border-radius: var(--r-full); padding: 3px; flex: 0 0 auto; }
.qty button { width: 44px; height: 44px; border-radius: var(--r-full); display: grid; place-items: center; font-size: var(--t-title3); font-weight: 500; }
.qty .n { min-width: 22px; text-align: center; font-size: var(--t-body); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- cart bar ---------------------------------------------------- */

.cartbar {
  position: fixed; z-index: 35; left: 50%; bottom: 0;
  width: var(--shell); max-width: 560px;
  padding: var(--s3) var(--gut) calc(var(--s3) + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--sep);
  transform: translate(-50%, 130%);
  transition: transform 420ms var(--ease-out);
}
.cartbar.on { transform: translate(-50%, 0); }
.cartbar .btn { justify-content: space-between; }
.cartbar .btn .c { display: flex; align-items: center; gap: var(--s2); font-weight: 600; }
.cartbar .btn .dot { width: 22px; height: 22px; border-radius: var(--r-full); background: rgba(127, 127, 127, 0.28); display: grid; place-items: center; font-size: var(--t-caption1); font-weight: 700; }

/* ---------- cart, checkout, status -------------------------------------- */

.line { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); }
.line + .line { box-shadow: inset 0 0.5px 0 var(--sep-soft); }
.line .q { min-width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--tint-soft); color: var(--tint); display: grid; place-items: center; font-size: var(--t-footnote); font-weight: 700; flex: 0 0 auto; }
.line .op { margin-top: 2px; }
.line .grow { flex: 1; min-width: 0; }
/* A .grow holding several stacked spans must be a column. As inline spans they
   concatenated: "House Blend 1HotRemove". */
.line .grow, .pay .grow, .steps .grow { display: flex; flex-direction: column; align-items: flex-start; }
.line .nm { font-size: var(--t-subhead); font-weight: 600; }
.line .op { font-size: var(--t-caption1); color: var(--label-2); margin-top: 2px; }
.line .right { display: flex; align-items: center; gap: var(--s3); flex: 0 0 auto; }
.stepper.sm { min-width: 76px; height: 30px; background: var(--gray5); color: var(--label); box-shadow: none; }
.stepper.sm button { width: 26px; height: 30px; color: var(--tint); }
.stepper.sm .n { color: var(--label); }
.line .pr { font-size: var(--t-subhead); font-weight: 600; font-variant-numeric: tabular-nums; }

.total { display: flex; align-items: baseline; justify-content: space-between; padding: var(--s4); }
.total .k { font-size: var(--t-body); font-weight: 600; }
.total .v { font-size: var(--t-title2); font-weight: 700; font-variant-numeric: tabular-nums; }

.pay { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 62px; padding: var(--s3) var(--s4); background: var(--surface); text-align: left; }
.pay + .pay { box-shadow: inset 0 0.5px 0 var(--sep-soft); }
.pay .grow { flex: 1; min-width: 0; }
.pay .s { max-width: 42ch; }
.pay .t { font-size: var(--t-body); font-weight: 600; }
.pay .s { font-size: var(--t-caption1); color: var(--label-2); margin-top: 2px; line-height: 1.35; }
.pay .tick { width: 22px; height: 22px; border-radius: var(--r-full); box-shadow: inset 0 0 0 1.5px var(--gray3); display: grid; place-items: center; color: transparent; flex: 0 0 auto; transition: all var(--d-fast) var(--ease); }
.pay .tick .ico { width: 12px; height: 12px; }
.pay[aria-pressed='true'] .tick { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--tint); color: #fff; }

.ticket { text-align: center; padding: var(--s6) var(--s4) var(--s5); }
.ticket .code { font-size: var(--t-large); font-weight: 700; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.ticket .sub { margin-top: var(--s1); color: var(--label-2); font-size: var(--t-footnote); }

.track { padding: 0 var(--s4) var(--s5); display: grid; gap: 0; text-align: left; }
.step { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); }
.step .col { display: flex; flex-direction: column; align-items: center; }
.step .bead {
  width: 14px; height: 14px; border-radius: var(--r-full); margin-top: 4px; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1.5px var(--gray3); background: transparent;
  display: grid; place-items: center; color: transparent;
  transition: background var(--d-norm) var(--ease), box-shadow var(--d-norm) var(--ease), color var(--d-norm) var(--ease);
}
.step .bead .ico { width: 8px; height: 8px; }
.step .stem { width: 2px; flex: 1; background: var(--gray5); min-height: 22px; transition: background var(--d-norm) var(--ease); }
.step:last-child .stem { display: none; }
.step .t { font-size: var(--t-subhead); font-weight: 600; color: var(--label-2); transition: color var(--d-norm) var(--ease); }
.step .d { font-size: var(--t-caption1); color: var(--label-2); margin-top: 1px; padding-bottom: var(--s4); }
.step.done .bead { background: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); color: #fff; }
.step.done .stem { background: var(--green); }
.step.done .t { color: var(--label); }
/* the live step pulses, but a completed bead stays cleanly green */
.step.now .bead { animation: pulse 1.6s var(--ease) infinite; }
.step.now:not(.done) .bead { box-shadow: inset 0 0 0 2px var(--tint); }
.step.now .t { color: var(--label); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }

.livedot { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-caption1); color: var(--label-2); }
.livedot i { width: 7px; height: 7px; border-radius: var(--r-full); background: var(--green); display: block; animation: blink 2s var(--ease) infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.upibox { padding: var(--s5) var(--s4); text-align: center; }
.upibox .qr { width: 208px; height: 208px; margin: 0 auto; padding: var(--s3); background: #fff; border-radius: var(--r-lg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.upibox .qr canvas, .upibox .qr img { width: 100% !important; height: 100% !important; display: block; }
.upibox .amt { margin-top: var(--s4); font-size: var(--t-title1); font-weight: 700; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--safe-b) + 96px);
  transform: translate(-50%, 16px); opacity: 0;
  padding: var(--s3) var(--s5); border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.82); color: #fff; font-size: var(--t-footnote); font-weight: 600;
  transition: opacity var(--d-fast) var(--ease), transform var(--d-fast) var(--ease-out);
  pointer-events: none; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.high { bottom: calc(var(--safe-b) + 168px); }

/* ---------- tablet and desktop ------------------------------------------ */

@media (min-width: 760px) {
  :root { --shell: 560px; --gut: var(--s5); }
  body { background: color-mix(in srgb, var(--bg) 78%, #808080 22%); }
  .shell { background: var(--bg); box-shadow: 0 0 0 0.5px var(--sep); }
}
@media (min-width: 760px) and (prefers-color-scheme: dark) {
  body { background: #050506; }
  .shell { box-shadow: 0 0 0 0.5px var(--sep-soft); }
}

@media (min-width: 1024px) {
  .shell { box-shadow: 0 0 60px -20px rgba(0, 0, 0, 0.25), 0 0 0 0.5px var(--sep); }
}

/* A 20px glyph still needs a 44pt target, so the glyph sits inside a real button. */
.iconbtn {
  width: 44px; height: 44px; margin: -11px -12px -11px 0; flex: 0 0 auto;
  display: grid; place-items: center; color: var(--tint); border-radius: var(--r-sm);
  transition: background var(--d-fast) var(--ease);
}
.iconbtn:active { background: var(--tint-soft); }
