/* Eats BMU — the only stylesheet. Tokens come from docs/DESIGN.md §1; use only these. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-400.503e7cbdb484.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-600.79e62f3332cd.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-700.5b629bd8abb4.woff2") format("woff2");
}

/* ---------- Tokens ----------
   Colour names match docs/THEME_BRIEF.md: a designer's palette replaces the two colour blocks below as-is. */
:root {
  /* colour (light): designer palette "Spiced Saffron + Playful Purple", 28 Oct 2026 */
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F5F5F4;
  --surface-3: #E7E5E4;
  --line: #E7E5E4;
  --ink: #1C1917;
  --ink-2: #57534E;
  --ink-3: #78716C;
  --brand: #C2410C;
  --brand-hover: #9A3412;
  --brand-soft: #FFF7ED;
  --brand-text: #C2410C;   /* brand colour used as text/links */
  --on-brand: #FFFFFF;
  --accent: #6D28D9;
  --accent-soft: #F3E8FF;
  --on-accent: #FFFFFF;
  --ok: #15803D;   --ok-soft: #DCFCE7;
  --warn: #B45309; --warn-soft: #FEF3C7;
  --danger: #DC2626; --danger-soft: #FEE2E2;
  --info: #0369A1; --info-soft: #E0F2FE;
  --veg: #16A34A;  --nonveg: #78350F;
  --on-status: #FFFFFF;  /* text on ok/danger fills */
  --hero: linear-gradient(135deg, #FFEDD5 0%, #FED7AA 100%);
  --hero-ink: #1C1917;
  --backdrop: rgba(28, 25, 23, 0.5);
  --tint-1: #FFEDD5; --tint-2: #DCFCE7; --tint-3: #FEE2E2; --tint-4: #FEF3C7; --tint-5: #E0F2FE; --tint-6: #F3E8FF;
  --confetti-1: #C2410C; --confetti-2: #10B981; --confetti-3: #F59E0B; --confetti-4: #8B5CF6; --confetti-5: #06B6D4;
  --board-new-bg: #E0F2FE; --board-new-text: #0369A1;
  --board-prep-bg: #FEF3C7; --board-prep-text: #92400E;
  --board-ready-bg: #DCFCE7; --board-ready-text: #15803D;
  --board-out-bg: #F3E8FF; --board-out-text: #6B21A8;

  /* type */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 34px;
  --fw-regular: 400; --fw-semi: 600; --fw-bold: 700;
  --lh: 1.45;

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

  /* shape */
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;
  --shadow-1: 0 1px 3px rgba(28, 25, 23, 0.08), 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-2: 0 10px 15px -3px rgba(28, 25, 23, 0.12), 0 4px 6px -2px rgba(28, 25, 23, 0.06);

  /* sizes */
  --tap: 48px;
  --nav-h: 64px;
  --max-w: 560px;

  /* component sizes (per surface; overridden below) */
  --btn-h: 52px;

  /* motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* colour (dark): placeholder values until the designer's palette arrives */
:root[data-theme="dark"] {
  --bg: #121110; --surface: #1C1A18; --surface-2: #292524; --surface-3: #3B3531; --line: #38322E;
  --ink: #F5F5F4; --ink-2: #A8A29E; --ink-3: #78716C;
  --brand: #C2410C; --brand-hover: #EA580C; --brand-soft: #381E14; --on-brand: #FFFFFF;
  --brand-text: #FB923C;  /* interim: lighter saffron for text on dark (designer to confirm) */
  --accent: #9333EA; --accent-soft: #2E1065; --on-accent: #FFFFFF;
  --ok: #22C55E; --ok-soft: #052E16; --warn: #F59E0B; --warn-soft: #451A03;
  --danger: #EF4444; --danger-soft: #450A0A; --info: #38BDF8; --info-soft: #082F49;
  --veg: #22C55E; --nonveg: #D97706; --on-status: #121110;
  --hero: linear-gradient(135deg, #2A1810 0%, #1C1A18 100%); --hero-ink: #F5F5F4;
  --backdrop: rgba(0, 0, 0, 0.7);
  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --tint-1: #341A08; --tint-2: #052E16; --tint-3: #3B0A0A; --tint-4: #332204; --tint-5: #082F49; --tint-6: #2E1065;
  /* interim: board colours for dark mode (designer to confirm) */
  --board-new-bg: #082F49; --board-new-text: #7DD3FC; --board-prep-bg: #451A03; --board-prep-text: #FCD34D;
  --board-ready-bg: #052E16; --board-ready-text: #86EFAC; --board-out-bg: #2E1065; --board-out-text: #D8B4FE;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110; --surface: #1C1A18; --surface-2: #292524; --surface-3: #3B3531; --line: #38322E;
    --ink: #F5F5F4; --ink-2: #A8A29E; --ink-3: #78716C;
    --brand: #C2410C; --brand-hover: #EA580C; --brand-soft: #381E14; --on-brand: #FFFFFF;
    --brand-text: #FB923C;  /* interim: lighter saffron for text on dark (designer to confirm) */
    --accent: #9333EA; --accent-soft: #2E1065; --on-accent: #FFFFFF;
    --ok: #22C55E; --ok-soft: #052E16; --warn: #F59E0B; --warn-soft: #451A03;
    --danger: #EF4444; --danger-soft: #450A0A; --info: #38BDF8; --info-soft: #082F49;
    --veg: #22C55E; --nonveg: #D97706; --on-status: #121110;
    --hero: linear-gradient(135deg, #2A1810 0%, #1C1A18 100%); --hero-ink: #F5F5F4;
    --backdrop: rgba(0, 0, 0, 0.7);
    --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
    --tint-1: #341A08; --tint-2: #052E16; --tint-3: #3B0A0A; --tint-4: #332204; --tint-5: #082F49; --tint-6: #2E1065;
    /* interim: board colours for dark mode (designer to confirm) */
    --board-new-bg: #082F49; --board-new-text: #7DD3FC; --board-prep-bg: #451A03; --board-prep-text: #FCD34D;
    --board-ready-bg: #052E16; --board-ready-text: #86EFAC; --board-out-bg: #2E1065; --board-out-text: #D8B4FE;
    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-text); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
[x-cloak] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, .h1 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1.2; }
h2, .h2 { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: 1.25; }
h3, .h3 { font-size: var(--fs-lg); font-weight: var(--fw-semi); line-height: 1.3; }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-3); font-size: var(--fs-sm); }
.semi { font-weight: var(--fw-semi); }
.bold { font-weight: var(--fw-bold); }
.price { font-weight: var(--fw-semi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount-xl { font-size: var(--fs-3xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--s4); }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s6); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.section { padding-block: var(--s6); }
.divider { border: 0; border-top: 1px solid var(--line); }

/* ---------- Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--btn-h); padding: 0 var(--s5);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-size: var(--fs-md); font-weight: var(--fw-semi); line-height: 1.2;
  text-decoration: none; text-align: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: var(--on-status); }
.btn-danger:hover { filter: brightness(.9); color: var(--on-status); }
.btn-ok { background: var(--ok); color: var(--on-status); }
.btn-ok:hover { filter: brightness(.9); color: var(--on-status); }
.btn-ghost { background: transparent; color: var(--brand-text); }
.btn-sm { min-height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-outline { background: var(--surface); border-color: var(--brand); color: var(--brand-text); }
.btn-outline:hover { background: var(--brand-soft); color: var(--brand-text); }
.btn-block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn .spinner { display: none; }
.btn.is-loading .spinner, .btn.htmx-request .spinner { display: inline-block; }
.btn.is-loading .btn-label, .btn.htmx-request .btn-label { display: none; }
.btn .btn-loading { display: none; }
.btn.is-loading .btn-loading, .btn.htmx-request .btn-loading { display: inline; }
@media (max-width: 599px) { .btn-primary.btn-mobile-block { display: flex; width: 100%; } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--s1); }
.field label, .label { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--ink); }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap); padding: var(--s3) var(--s4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 16px; /* 16px stops iPhone zoom */
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field-error { color: var(--danger); font-size: var(--fs-sm); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: var(--s3); min-height: var(--tap); padding-block: var(--s2); }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--brand); flex: none; }

/* Segmented control (Pickup | Delivery, Cash | UPI) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s1);
  padding: var(--s1); background: var(--surface-2); border-radius: var(--r-md); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { display: flex; align-items: center; justify-content: center; min-height: 44px;
  border-radius: var(--r-sm); font-weight: var(--fw-semi); color: var(--ink-2); cursor: pointer; }
.segmented input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.segmented input:disabled + label { opacity: .4; cursor: not-allowed; }
.segmented input:focus-visible + label { outline: 3px solid var(--info); }

/* Switch (item available, delivery on/off) */
.switch { position: relative; display: inline-flex; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: var(--r-pill); transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--info); outline-offset: 2px; }

/* ---------- Chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s1);
  height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink); border: 1px solid transparent;
  font-size: var(--fs-sm); font-weight: var(--fw-semi); white-space: nowrap; text-decoration: none;
}
button.chip, a.chip { min-height: 36px; }
.chip.is-selected, .chip[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-text); }
.chip-row { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding-block: var(--s1); }
.chip-row::-webkit-scrollbar { display: none; }

/* Status chips (orders list, admin tables) */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s2);
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-semi); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--ink-2); }
.badge-brand { background: var(--brand-soft); color: var(--brand-text); }

/* ---------- Card ---------- */
.card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: var(--s4); }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); }
a.card { display: block; color: inherit; text-decoration: none; }

/* ---------- Store initials badge + store card ---------- */
.initials {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: 12px;
  color: #fff; font-weight: var(--fw-bold); font-size: var(--fs-lg); letter-spacing: .5px;
  background: var(--badge, var(--brand));
}
.initials-lg { width: 64px; height: 64px; font-size: var(--fs-xl); border-radius: 16px; }
.store-card, a.card.store-card { display: flex; gap: var(--s3); align-items: flex-start; }
.store-card .name { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.store-card .meta { font-size: var(--fs-sm); color: var(--ink-2); }
.store-card .meta .sep { color: var(--ink-3); padding-inline: 2px; }
.store-card .open { color: var(--ok); font-weight: var(--fw-semi); }
.store-card .closed { color: var(--ink-2); font-weight: var(--fw-semi); }
.store-card.is-closed { opacity: .6; }
.rating { white-space: nowrap; }
.rating .star { color: var(--warn); }

/* ---------- Food mark (FSSAI) ---------- */
.food-mark { display: inline-flex; align-items: center; gap: var(--s1); flex: none; vertical-align: middle; }
.food-mark svg { width: 14px; height: 14px; }
.food-mark .mark-label { font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--nonveg); }

/* ---------- Item row ---------- */
.item-row { display: flex; gap: var(--s3); padding-block: var(--s4); border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-row .name { font-weight: var(--fw-semi); }
.item-row .desc {
  font-size: var(--fs-sm); color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-row .photo { width: 88px; height: 88px; border-radius: var(--r-md); object-fit: cover; flex: none; background: var(--surface-2); }
.item-row.is-unavailable { opacity: .5; }
.stepper { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--brand);
  border-radius: var(--r-sm); background: var(--surface); }
.stepper button { width: 36px; height: 34px; border: 0; background: none; color: var(--brand-text);
  font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.stepper .qty { min-width: 24px; text-align: center; font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-height: 90vh; max-height: 90dvh; display: flex; flex-direction: column;
  max-width: var(--max-w); margin-inline: auto;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-2);
}
.sheet .handle { width: 40px; height: 4px; border-radius: var(--r-pill); background: var(--line); margin: var(--s2) auto; flex: none; }
.sheet .sheet-body { overflow-y: auto; padding: var(--s2) var(--s4) var(--s4); }
.sheet .sheet-footer { position: sticky; bottom: 0; padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); }
.sheet-enter { transition: transform .22s ease-out; }
.sheet-enter-start { transform: translateY(100%); }
.sheet-enter-end { transform: translateY(0); }
.fade-enter { transition: opacity .2s; }
.fade-start { opacity: 0; }
.fade-end { opacity: 1; }

/* ---------- Status stepper ---------- */
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; }
.steps li { position: relative; display: flex; gap: var(--s3); padding-bottom: var(--s5); color: var(--ink-3); }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .dot { position: relative; z-index: 1; width: 24px; height: 24px; flex: none; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.steps li.is-done { color: var(--ink-2); }
.steps li.is-done .dot { background: var(--ok); border-color: var(--ok); color: var(--on-status); }
.steps li.is-done::before { background: var(--ok); }
.steps li.is-current { color: var(--ink); font-weight: var(--fw-bold); }
.steps li.is-current .dot { border-color: var(--brand); }
.steps li.is-current .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.steps .dot svg { width: 14px; height: 14px; }

/* ---------- Code display ---------- */
.code-box { display: flex; flex-direction: column; align-items: center; gap: var(--s1);
  background: var(--surface-2); border-radius: var(--r-md); padding: var(--s4); }
.code-box .digits { font-size: 40px; font-weight: var(--fw-bold); letter-spacing: 8px; padding-left: 8px;
  font-variant-numeric: tabular-nums; line-height: 1.1; }

/* ---------- Countdown ---------- */
.countdown { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-width: 64px; height: 32px; padding: 0 var(--s3); border-radius: var(--r-pill);
  background: var(--surface-2); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.countdown.is-low { background: var(--danger-soft); color: var(--danger); }
.countdown-lg { height: auto; padding: var(--s3) var(--s6); font-size: var(--fs-3xl); }

/* ---------- Toast ---------- */
.toast-region { position: fixed; left: 0; right: 0; z-index: 60; pointer-events: none;
  bottom: calc(var(--s4) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding-inline: var(--s4); }
.surface-student .toast-region { bottom: calc(var(--nav-h) + var(--s3) + env(safe-area-inset-bottom)); }
/* Toasts sit above the cart bar, never on top of it. */
.surface-student:has(.cart-bar) .toast-region { bottom: calc(var(--nav-h) + 84px + env(safe-area-inset-bottom)); }
.toast { pointer-events: auto; max-width: var(--max-w); width: 100%;
  background: var(--ink); color: var(--bg); border-radius: var(--r-md); padding: var(--s3) var(--s4);
  box-shadow: var(--shadow-2); font-size: var(--fs-sm); animation: toast-in .2s ease-out; }
.toast.is-error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3);
  padding: var(--s10) var(--s4); color: var(--ink-2); }
.empty svg { width: 48px; height: 48px; color: var(--ink-3); }

/* ---------- Footer ---------- */
.site-footer { font-size: var(--fs-xs); color: var(--ink-2); padding: var(--s6) var(--s4); text-align: center; }
.site-footer a { color: var(--ink-2); }
.site-footer .links { display: flex; justify-content: center; gap: var(--s2); margin-top: var(--s1); }

/* ---------- Sticky cart bar (student) ---------- */
.cart-bar { position: fixed; left: 0; right: 0; z-index: 30;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: var(--s2) var(--s4); }
.cart-bar .btn { max-width: calc(var(--max-w) - 2 * var(--s4)); margin-inline: auto; box-shadow: var(--shadow-2); }

/* ---------- Tiles (store "Today", admin dashboard) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.tile { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: var(--s4); }
.tile .tile-label { font-size: var(--fs-sm); color: var(--ink-2); }
.tile .tile-value { font-size: var(--fs-2xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }

/* ---------- Banners ---------- */
.banner { border-radius: var(--r-md); padding: var(--s3) var(--s4); font-size: var(--fs-sm); }
.banner-info { background: var(--info-soft); color: var(--info); }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.banner-danger { background: var(--danger-soft); color: var(--danger); }
.banner-ok { background: var(--ok-soft); color: var(--ok); }
.demo-banner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: var(--fs-xs);
  font-weight: var(--fw-semi); padding: var(--s1) var(--s4); }

/* =====================================================================
   Student surface: phone first, bottom nav
   ===================================================================== */
.surface-student main { padding-bottom: calc(var(--nav-h) + var(--s6) + env(safe-area-inset-bottom)); }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--tap); color: var(--ink-2); text-decoration: none; font-size: var(--fs-xs); font-weight: var(--fw-semi); }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--brand-text); }
.page-header { padding: var(--s4) 0 var(--s2); }

/* =====================================================================
   Store surface: tablet + phone, bigger text and buttons
   ===================================================================== */
.surface-store { --btn-h: 56px; --tap: 56px; font-size: var(--fs-lg); }
.surface-store .container { max-width: 1280px; }
.store-topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: var(--s3) var(--s4); display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.store-topbar .store-name { font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.store-topbar nav { display: flex; gap: var(--s2); flex-wrap: wrap; }
.store-topbar nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3);
  border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: var(--fw-semi); font-size: var(--fs-md); }
.store-topbar nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); }
.store-topbar .clock { margin-left: auto; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.surface-store main { padding-block: var(--s4); }

/* =====================================================================
   Admin surface: laptop, left sidebar, dense tables
   ===================================================================== */
.surface-admin { font-size: var(--fs-sm); --btn-h: 40px; }
.surface-admin .btn { font-size: var(--fs-sm); }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: var(--s4) var(--s3);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .brand { font-size: var(--fs-lg); font-weight: var(--fw-bold); padding: 0 var(--s2) var(--s4); }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar nav a { display: block; padding: var(--s2) var(--s3); border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-weight: var(--fw-semi); }
.admin-sidebar nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-sidebar nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); }
.admin-main { padding: var(--s6); min-width: 0; }
.admin-main .container { max-width: 1200px; padding: 0; }
@media (max-width: 799px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: var(--s4); }
}
.table-wrap { overflow: auto; max-height: 70vh; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: var(--s2) var(--s3); text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { position: sticky; top: 0; background: var(--surface-2); font-weight: var(--fw-semi); color: var(--ink-2); z-index: 1; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-bottom: var(--s3); }

/* ---------- Style guide page ---------- */
.sg-section { padding-block: var(--s6); border-bottom: 1px solid var(--line); }
.sg-section > h2 { margin-bottom: var(--s3); }
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s2); }
.sg-swatch { border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; font-size: var(--fs-xs); }
.sg-swatch .chip-colour { height: 48px; background: var(--c); }
.sg-swatch div:last-child { padding: var(--s1) var(--s2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Small structural classes used by components ---------- */
.store-card-body { display: flex; flex-direction: column; gap: 2px; }
.item-row-body { display: flex; flex-direction: column; gap: 2px; }
.item-row-title { gap: 6px; }
.item-row-side { display: flex; flex-direction: column; align-items: center; gap: var(--s2); flex: none; }

/* ---------- Sign-in pages ---------- */
.auth { max-width: 440px; padding-block: var(--s8) var(--s6); display: flex; flex-direction: column; gap: var(--s5); }
.auth-brand { display: flex; align-items: center; gap: var(--s3); }
.auth-links { padding-inline: var(--s2); }
.code-input { font-size: var(--fs-xl); letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

.legal-text p { margin-bottom: var(--s3); }

/* ---------- Browse (Step 04) ---------- */
.sheet-scroll { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sheet-scroll form { display: flex; flex-direction: column; min-height: 0; }
.hostel-pill { display: inline-flex; align-items: center; gap: var(--s1); min-height: 36px; padding: 0 var(--s3);
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-semi); text-decoration: none; }
.search-bar { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.search-bar svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search-bar input { flex: 1; min-width: 0; border: 0; background: none; font-size: 16px; padding: var(--s3) 0; }
.search-bar input:focus { outline: none; }
.search-bar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.veg-toggle { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s3);
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
  font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--ink-2); }
.veg-toggle[aria-pressed="true"] { border-color: var(--veg); color: var(--veg); background: var(--ok-soft); }
.popular-row { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: var(--s3);
  overflow-x: auto; scrollbar-width: none; padding-bottom: var(--s1); }
.popular-row::-webkit-scrollbar { display: none; }
.popular-card { display: flex; flex-direction: column; gap: 2px; padding: var(--s3); color: inherit; text-decoration: none; }
.demo-tag { margin-left: var(--s1); }
.store-head { display: flex; gap: var(--s3); align-items: flex-start; }
.info-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.details summary { cursor: pointer; font-weight: var(--fw-semi); min-height: var(--tap); display: flex; align-items: center; }
.details dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); font-size: var(--fs-sm); }
.details dt { color: var(--ink-2); }
.cat-tabs { position: sticky; top: 0; z-index: 20; background: var(--bg); margin-inline: calc(-1 * var(--s4));
  padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); }
.cat-section { scroll-margin-top: 64px; }
.cat-section > h2 { padding-top: var(--s5); }
.opt-group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s1); }
.opt-group legend { display: flex; align-items: center; gap: var(--s2); font-weight: var(--fw-semi); margin-bottom: var(--s1); }
.opt-row { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: 0 var(--s1);
  border-bottom: 1px solid var(--line); cursor: pointer; }
.opt-row:last-child { border-bottom: 0; }
.opt-row input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.opt-row .extra { margin-left: auto; color: var(--ink-2); font-size: var(--fs-sm); }
.opt-row.is-off { opacity: .45; cursor: not-allowed; }
.qty-stepper { height: var(--tap); }
.qty-stepper button { width: var(--tap); height: calc(var(--tap) - 2px); }
.search-group > h2 { margin: var(--s5) 0 var(--s2); }
.search-item-link { display: block; color: inherit; text-decoration: none; }
.sheet-photo { width: 100%; height: 200px; object-fit: cover; border-radius: var(--r-md); }

/* ---------- Cart, tracking, orders (Step 05) ---------- */
.surface-student main:has(.cart-bar) { padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }
.cart-line { display: flex; gap: var(--s3); padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.cart-line:last-of-type { border-bottom: 0; }
.cart-line.has-problem { background: var(--danger-soft); margin-inline: calc(-1 * var(--s2)); padding-inline: var(--s2); border-radius: var(--r-sm); }
.cart-line-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2); flex: none; }
.center-stack { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; }
.seg-btn { min-height: 44px; border: 0; border-radius: var(--r-sm); background: none; font-weight: var(--fw-semi); color: var(--ink-2); }
.seg-btn[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
a.card.order-row { display: flex; gap: var(--s3); align-items: center; }
.cart-bar .btn { justify-content: space-between; }

/* ---------- Store board (Step 06) ---------- */
.topbar-logout { order: 9; }
.shift-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(28,25,23,.6); display: flex;
  align-items: center; justify-content: center; padding: var(--s4); }
.shift-card { max-width: 440px; width: 100%; text-align: center; }
.shift-btn { min-height: 72px; font-size: var(--fs-xl); }
.new-order-banner { position: sticky; top: 0; z-index: 40; background: var(--danger); color: var(--on-status); text-align: center;
  font-weight: var(--fw-bold); font-size: var(--fs-xl); padding: var(--s3); border-radius: var(--r-md);
  animation: pulse-bg 1s ease-in-out infinite; margin-bottom: var(--s3); }
@keyframes pulse-bg { 50% { filter: brightness(.8); } }
.store-controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s4); }
.state-pill { height: 36px; font-size: var(--fs-sm); padding: 0 var(--s3); }
.override { grid-auto-columns: minmax(80px, auto); }
.override .seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.pause-menu { position: relative; }
.pause-menu summary { list-style: none; }
.pause-menu summary::-webkit-details-marker { display: none; }
.pause-options { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 220px;
  display: flex; flex-direction: column; gap: var(--s2); box-shadow: var(--shadow-2); }
.board-columns { display: grid; gap: var(--s4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .board-columns { grid-template-columns: repeat(3, 1fr); } }
.board-col { display: flex; flex-direction: column; gap: var(--s3); background: var(--surface-2);
  border-radius: var(--r-lg); padding: var(--s3); min-height: 120px; }
.board-col > h2 { display: flex; align-items: center; gap: var(--s2); }
.order-card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1);
  padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); border: 2px solid transparent; }
.order-card.is-new { border-color: var(--brand); animation: pulse-border 1.2s ease-in-out infinite; }
@keyframes pulse-border { 50% { border-color: var(--brand-soft); } }
.order-code { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.order-lines { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.order-card .note { background: var(--warn-soft); color: var(--warn); border-radius: var(--r-sm); padding: var(--s1) var(--s2); }
.order-actions { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s1); }
.reject summary { list-style: none; }
.reject summary::-webkit-details-marker { display: none; }
.reject[open] summary { margin-bottom: var(--s2); }
.code-pad .code-input { max-width: 160px; }
.menu-row { min-height: 64px; border-bottom: 1px solid var(--line); }
.menu-row:last-child { border-bottom: 0; }
.switch-lg { width: 64px; height: 38px; }
.switch-lg .track::after { width: 32px; height: 32px; }
.switch-lg input:checked + .track::after { transform: translateX(26px); }

/* ---------- Admin sign-in (Step 07) ---------- */
.qr { align-self: center; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
.secret-key { font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-lg); letter-spacing: 1px; word-break: break-all; }
.setup-steps { padding-left: var(--s5); }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: var(--s2) var(--s6);
  font-size: var(--fs-xl); padding-left: var(--s6); }
.backup-codes code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 1px; }
@media print { .admin-sidebar, .site-footer, .backup-page .row { display: none; } }
.checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.checklist .is-ok { color: var(--ok); }
.checklist .is-missing { color: var(--danger); font-weight: var(--fw-semi); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 799px) { .form-grid { grid-template-columns: 1fr; } }
.admin-sidebar .logout { margin-top: var(--s6); padding: 0 var(--s2); }

/* ---------- Admin orders (Step 08) ---------- */
.filter-input { width: auto; min-width: 160px; min-height: 40px; padding: var(--s2) var(--s3); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
@media (max-width: 899px) { .admin-grid { grid-template-columns: 1fr; } }
.timeline { list-style: none; padding: 0 0 0 var(--s4); border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: var(--s3); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--s4) - 6px); top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); font-size: var(--fs-sm); }
.kv dt { color: var(--ink-2); }
/* Any HTMX button shows it's busy and can't be double-tapped. */
.btn.htmx-request { opacity: .6; pointer-events: none; }

/* ---------- Payments (Step 09) ---------- */
.awaiting-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); background: var(--warn-soft);
  border-radius: var(--r-md); padding: var(--s3); margin-bottom: var(--s3); }
.board-note { display: block; text-decoration: none; margin-bottom: var(--s3); }
.upi-id { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; justify-content: center; }
.pay-page .qr { align-self: center; }
.refund-row { display: flex; flex-direction: column; gap: var(--s2); padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.refund-row:last-child { border-bottom: 0; }
.refund-row.is-overdue { border-left: 4px solid var(--danger); padding-left: var(--s3); }
.row-overdue td { background: var(--danger-soft); }
@media (min-width: 1100px) { .board-columns { grid-template-columns: repeat(4, 1fr); } }
.gate-line { padding: var(--s2) var(--s3); }
.delivery-fields { border: 0; padding: 0; margin: 0; }

/* ---------- Store tools (Step 11) ---------- */
.narrow { max-width: 760px; }
.menu-link { color: inherit; text-decoration: none; flex: 1; min-height: 48px; }
.menu-thumb { width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; }
.cat-tools { gap: var(--s1); }
.edit-photo { width: 100%; max-width: 400px; height: auto; border-radius: var(--r-md); }
.option-group-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); }
.price-input { width: 90px; }
.hours-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: var(--s2) var(--s3); }
.hours-row .field-error { grid-column: 2; }
.tile-warn { background: var(--warn-soft); }

/* ---------- Push + PWA (Step 12) ---------- */
.push-row { gap: var(--s3); }
.push-text { gap: 2px; }
.ios-steps { padding-left: var(--s5); }

/* ---------- Ratings + complaints (Step 13) ---------- */
.star-input { display: flex; gap: var(--s1); }
.star-input label { cursor: pointer; min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; }
.star-input span[aria-hidden], .stars span { font-size: 32px; color: var(--line); line-height: 1; }
.star-input span.on, .stars span.on { color: var(--warn); }
.stars span { font-size: var(--fs-lg); }
.rate-link { color: var(--brand-text); font-weight: var(--fw-semi); }
.chip-due { display: inline-flex; height: 24px; padding: 0 var(--s2); border-radius: var(--r-pill); font-size: var(--fs-xs);
  font-weight: var(--fw-semi); align-items: center; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip-due.is-late { background: var(--danger-soft); color: var(--danger); }
.chip-due.is-done { background: var(--ok-soft); color: var(--ok); }
a.tile-link { color: inherit; text-decoration: none; }
a.tile-link:hover { box-shadow: var(--shadow-2); }
.tile-danger { background: var(--danger-soft); }
.banned-list { flex-wrap: wrap; }
.legal-text h1 { font-size: var(--fs-2xl); }
.legal-text ul { padding-left: var(--s5); display: flex; flex-direction: column; gap: var(--s1); }
.legal-text .sha { word-break: break-all; font-size: var(--fs-xs); }
.plain-list { padding-left: var(--s5); }
.danger-link { color: var(--danger); }

/* ---------- AI drafts (Step 17) ---------- */
.ai-card { border-left: 4px solid var(--info); }
.ai-draft { background: var(--info-soft); border-radius: var(--r-sm); padding: var(--s3); }

/* ---------- AI & ML metrics (Step 18) ---------- */
.demo-data-banner { background: var(--danger); color: var(--on-status); font-weight: var(--fw-bold); text-align: center;
  padding: var(--s3); border-radius: var(--r-md); letter-spacing: .3px; }
.mae-chart { max-width: 100%; height: auto; }
.mae-chart .bar-label, .mae-chart .bar-value { font: 600 14px var(--font); fill: var(--ink); }
.mae-chart .bar-rule { fill: var(--ink-3); }
.mae-chart .bar-ml { fill: var(--brand); }
.progress { height: 10px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); }
.text-lg { font-size: var(--fs-lg); }

/* =====================================================================
   UI v2 (docs/UI_V2_PLAN.md): livelier buttons, dish tiles, discovery, tracker, badges, store board
   ===================================================================== */

/* ---------- Shape + depth ---------- */
:root { --r-md: 14px; --r-lg: 22px; --r-xl: 28px; }
.card { border-radius: var(--r-lg); }
.card-tap { transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.card-tap:active { transform: scale(.98); }
@media (hover: hover) { .card-tap:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); } }

/* ---------- Buttons v2: weight, press feedback, accent, icon ---------- */
.btn { transition: background-color .15s ease, border-color .15s ease, transform .12s var(--ease-out), box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent; user-select: none; }
.btn:active { transform: scale(.96); }
.btn-primary { box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--brand) 75%, transparent); }
.btn-primary:hover { box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--brand) 85%, transparent); }
.btn-accent { background: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn-accent:hover { filter: brightness(1.05); color: var(--on-accent); }
.btn-soft { background: var(--brand-soft); color: var(--brand-text); }
.btn-soft:hover { background: var(--surface-3); color: var(--brand-text); }
.btn-lg { min-height: 58px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-pill { border-radius: var(--r-pill); }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: var(--r-pill); flex: none; }
.btn-icon svg { width: 22px; height: 22px; }
.btn-add { min-height: 38px; min-width: 76px; padding: 0 var(--s4); border-radius: var(--r-pill);
  background: var(--surface); color: var(--brand-text); border: 1.5px solid var(--brand);
  font-weight: var(--fw-bold); letter-spacing: .3px; box-shadow: var(--shadow-1); }
.btn-add:hover { background: var(--brand); color: var(--on-brand); }

/* ---------- Dish tile (emoji on a tint until a store uploads a photo) ---------- */
.dish-tile { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 92px; height: 92px; border-radius: var(--r-lg); font-size: 44px; line-height: 1;
  background: var(--tint-1); overflow: hidden; position: relative; }
.dish-tile img { width: 100%; height: 100%; object-fit: cover; }
.dish-tile.sm { width: 56px; height: 56px; font-size: 28px; border-radius: var(--r-md); }
.dish-tile.lg { width: 100%; height: 180px; font-size: 84px; border-radius: var(--r-lg); }
.tint-1 { background: var(--tint-1); } .tint-2 { background: var(--tint-2); } .tint-3 { background: var(--tint-3); }
.tint-4 { background: var(--tint-4); } .tint-5 { background: var(--tint-5); } .tint-6 { background: var(--tint-6); }

/* Item row v2: tile on the right, Add button overlapping its bottom edge */
.item-row { align-items: center; }
.item-row .item-row-side { position: relative; padding-bottom: 16px; }
.item-row .item-row-side .btn-add, .item-row .item-row-side .qty-pill { position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%); }
.item-row .item-row-side .btn-add:active { transform: translateX(-50%) scale(.94); }
.item-row .item-row-side .badge { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); }
.qty-pill { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 var(--s3); border-radius: var(--r-pill);
  background: var(--brand); color: var(--on-brand); font-weight: var(--fw-bold); font-size: var(--fs-sm);
  white-space: nowrap; box-shadow: var(--shadow-1); border: 0; }

/* ---------- Dish card (rows and grids on Home: cravings, trending, favourites) ---------- */
.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 152px; gap: var(--s3);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px var(--s4) var(--s2);
  margin-inline: calc(-1 * var(--s4)); }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.dish-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: var(--s2);
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: inherit; text-decoration: none; }
.dish-card:hover { color: inherit; }
.dish-card .dish-tile { width: 100%; height: 108px; font-size: 54px; }
.dish-card .dish-name { font-weight: var(--fw-semi); font-size: var(--fs-sm); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.dish-card .dish-store { font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-card .dish-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); }
.dish-card .heart { position: absolute; top: 14px; right: 14px; }
.dish-card .meta-chip { position: absolute; top: 14px; left: 14px; }
.meta-chip { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); font-size: 11px; font-weight: var(--fw-bold);
  box-shadow: var(--shadow-1); }
.btn-plus { width: 34px; min-height: 34px; height: 34px; padding: 0; border-radius: var(--r-pill); font-size: 22px; line-height: 1;
  background: var(--brand); color: var(--on-brand); border: 0; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--brand) 80%, transparent); transition: transform .12s var(--ease-out); }
.btn-plus:active { transform: scale(.88); }
.btn-plus:disabled { opacity: .35; }

/* ---------- Heart (favourite) ---------- */
.heart { width: 36px; height: 36px; border-radius: var(--r-pill); border: 0; display: inline-flex; align-items: center;
  justify-content: center; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--ink-3);
  box-shadow: var(--shadow-1); flex: none; transition: transform .15s var(--ease-spring); padding: 0; }
.heart svg { width: 20px; height: 20px; }
.heart[aria-pressed="true"] { color: #E11D48; }
.heart[aria-pressed="true"] svg { fill: currentColor; animation: heart-pop .35s var(--ease-spring); }
.heart:active { transform: scale(.85); }
@keyframes heart-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- Home hero ---------- */
.hero { position: relative; margin-inline: calc(-1 * var(--s4)); padding: var(--s6) var(--s4) var(--s5);
  background: var(--hero); color: var(--hero-ink); border-radius: 0 0 var(--r-xl) var(--r-xl); overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 40%, transparent); pointer-events: none; }
.hero h1 { font-size: var(--fs-2xl); color: var(--hero-ink); }
.hero .hero-sub { color: var(--hero-ink); opacity: .8; font-size: var(--fs-sm); }
.hero .hostel-pill { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: transparent; color: var(--ink); }
.hero .search-bar { border: 0; box-shadow: var(--shadow-2); margin-top: var(--s4); position: relative; z-index: 1; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); position: relative; z-index: 1; }
.streak-pill { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 var(--s3); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font-weight: var(--fw-bold); font-size: var(--fs-sm); text-decoration: none; flex: none; box-shadow: var(--shadow-1); }
.streak-pill:hover { color: var(--ink); }

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.section-head h2 { font-size: var(--fs-lg); }
.section-head a, .section-head .hint { font-size: var(--fs-sm); font-weight: var(--fw-semi); text-decoration: none; }

/* ---------- Cravings + budget ---------- */
.cravings { display: grid; grid-auto-flow: column; grid-auto-columns: 76px; gap: var(--s2); overflow-x: auto;
  scrollbar-width: none; padding: 4px var(--s4) var(--s1); margin-inline: calc(-1 * var(--s4)); }
.cravings::-webkit-scrollbar { display: none; }
.craving { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s2) 0; border-radius: var(--r-lg);
  border: 1.5px solid transparent; background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink);
  font-size: var(--fs-xs); font-weight: var(--fw-semi); transition: transform .15s var(--ease-spring), border-color .15s; }
.craving .em { font-size: 30px; line-height: 1.1; transition: transform .25s var(--ease-spring); }
.craving[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.craving[aria-pressed="true"] .em { transform: scale(1.15) rotate(-6deg); }
.craving:active { transform: scale(.94); }
.budget { display: flex; flex-direction: column; gap: var(--s1); }
.budget .row-between { font-size: var(--fs-sm); }
.budget output { font-weight: var(--fw-bold); color: var(--brand-text); font-variant-numeric: tabular-nums; }
.range { width: 100%; accent-color: var(--brand); height: 32px; }

/* ---------- Surprise Me ---------- */
.surprise-card { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--accent-soft), var(--brand-soft));
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.surprise-card .big { font-size: 40px; line-height: 1; }
.slot { position: relative; min-height: 96px; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--s3) var(--s4); }
.slot .reel { font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.slot.is-spinning .reel { animation: reel .09s linear infinite; }
@keyframes reel { 0% { transform: translateY(-10px); opacity: .5; } 100% { transform: translateY(10px); opacity: .5; } }
.slot.is-done .reel { animation: pop .4s var(--ease-spring); }

/* ---------- Motion helpers ---------- */
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fade-up { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: calc(200px + 100%) 0; } }
.fade-up { animation: fade-up .35s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.pop-in { animation: pop .35s var(--ease-spring) both; }
.cart-bar .btn { animation: bump .35s var(--ease-spring); }
.skeleton { border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-2) 0, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200px 100%; background-repeat: no-repeat; background-color: var(--surface-2); animation: shimmer 1.2s infinite linear; }

/* ---------- Bottom nav v2 ---------- */
.bottom-nav { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.bottom-nav a { position: relative; isolation: isolate; transition: color .15s; }
.bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 7px; width: 54px; height: 30px;
  border-radius: var(--r-pill); background: var(--brand-soft); z-index: -1; }
.bottom-nav a[aria-current="page"] svg { animation: pop .3s var(--ease-spring); }

/* ---------- Store page v2 ---------- */
.store-hero { position: relative; margin-inline: calc(-1 * var(--s4)); padding: var(--s4) var(--s4) var(--s5);
  background: linear-gradient(180deg, color-mix(in srgb, var(--badge, var(--brand)) 20%, var(--bg)) 0%, var(--bg) 100%);
  display: flex; flex-direction: column; gap: var(--s4); }
.store-hero .back { display: inline-flex; align-items: center; gap: 4px; font-weight: var(--fw-semi); text-decoration: none; color: var(--ink); }
.store-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.store-stat { background: var(--surface); border-radius: var(--r-md); padding: var(--s2) var(--s3); box-shadow: var(--shadow-1); }
.store-stat .v { font-weight: var(--fw-bold); font-size: var(--fs-md); white-space: nowrap; }
.store-stat .k { font-size: var(--fs-xs); color: var(--ink-2); }
.menu-tools { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px); margin-inline: calc(-1 * var(--s4)); padding: var(--s2) var(--s4);
  border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s2); }
.menu-tools .search-bar { min-height: 44px; }
.menu-tools .chip-row { padding-block: 0; }
.cat-section { scroll-margin-top: 124px; }
.cat-section > h2 { display: flex; align-items: center; gap: var(--s2); }
.cat-count { font-size: var(--fs-xs); color: var(--ink-3); font-weight: var(--fw-semi); }

/* ---------- Chips + segmented polish ---------- */
.chip { transition: background-color .15s, color .15s, transform .12s var(--ease-out); }
.chip:active { transform: scale(.95); }
.segmented label { transition: background-color .15s, color .15s, box-shadow .15s; }

/* ---------- Sticky action bar (cart: Place order) ---------- */
.action-bar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 25;
  margin-inline: calc(-1 * var(--s4)); padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.surface-student main { padding-bottom: calc(var(--nav-h) + var(--s10) + env(safe-area-inset-bottom)); }

/* ---------- Live tracker ---------- */
.tracker { position: relative; padding: var(--s5) var(--s4) var(--s4); border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--brand-soft), var(--surface)); box-shadow: var(--shadow-1); }
.tracker .road { position: relative; height: 10px; border-radius: var(--r-pill); background: var(--surface-3); margin: 44px 8px var(--s3); }
.tracker .road .done { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .8s var(--ease-out); }
.tracker .rider { position: absolute; top: -40px; left: var(--p, 0%); transform: translateX(-50%) scaleX(-1); font-size: 32px;
  line-height: 1; transition: left .8s var(--ease-out); }
.tracker .rider.is-moving { animation: ride 1.1s ease-in-out infinite; }
@keyframes ride { 50% { transform: translateX(-50%) scaleX(-1) translateY(-3px); } }
.tracker .ends { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-2); font-weight: var(--fw-semi); }
.tracker .headline { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: 1.25; }
.pulse-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.4s ease-out infinite; }
@keyframes ping { to { transform: scale(2.6); opacity: 0; } }
.steps li.is-current .dot { box-shadow: 0 0 0 6px var(--brand-soft); }

/* ---------- Confetti ---------- */
.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

/* ---------- Emoji rating ---------- */
.emoji-rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s1); }
.emoji-rate input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-rate label { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s2) 0; border-radius: var(--r-md);
  cursor: pointer; font-size: 11px; color: var(--ink-2); font-weight: var(--fw-semi); min-height: var(--tap);
  transition: transform .15s var(--ease-spring), background .15s; }
.emoji-rate label .em { font-size: 34px; line-height: 1.1; filter: grayscale(.8); opacity: .75; transition: filter .15s, opacity .15s, transform .2s var(--ease-spring); }
.emoji-rate input:checked + label { background: var(--brand-soft); color: var(--brand-text); }
.emoji-rate input:checked + label .em { filter: none; opacity: 1; transform: scale(1.2); }
.emoji-rate input:focus-visible + label { outline: 3px solid var(--info); }

/* ---------- Split the bill ---------- */
.split-people { display: flex; align-items: center; justify-content: center; gap: var(--s4); }
.split-people .count { font-size: var(--fs-3xl); font-weight: var(--fw-bold); min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.split-row { display: flex; justify-content: space-between; padding: var(--s2) 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.split-row:last-child { border-bottom: 0; }

/* ---------- Profile: badges + streak ---------- */
.profile-head { display: flex; align-items: center; gap: var(--s4); }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: inline-flex;
  align-items: center; justify-content: center; font-size: var(--fs-xl); font-weight: var(--fw-bold); flex: none; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.stat { background: var(--surface); border-radius: var(--r-md); padding: var(--s3); text-align: center; box-shadow: var(--shadow-1); }
.stat .v { font-size: var(--fs-xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.stat .k { font-size: var(--fs-xs); color: var(--ink-2); }
.achv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.achv { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: var(--s3) var(--s2);
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.achv .em { font-size: 34px; line-height: 1.1; }
.achv .t { font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.achv .d { font-size: 11px; color: var(--ink-2); line-height: 1.3; }
.achv.is-locked .em { filter: grayscale(1); opacity: .35; }
.achv.is-locked .t { color: var(--ink-3); }
.menu-list a { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap);
  color: var(--ink); text-decoration: none; font-weight: var(--fw-semi); border-bottom: 1px solid var(--line); }
.menu-list a:last-child { border-bottom: 0; }
.menu-list a.danger-link { color: var(--danger); }

/* ---------- Orders list v2 ---------- */
.order-tile { display: flex; gap: var(--s3); align-items: center; }
.order-tile .grow { min-width: 0; }

/* =====================================================================
   Store board v2: built for a rush at the counter
   ===================================================================== */
.board-columns { grid-template-columns: repeat(4, minmax(250px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: var(--s3); }
.board-col { scroll-snap-align: start; padding: 0 0 var(--s3); gap: var(--s3); background: var(--surface-2); overflow: hidden; }
.board-col > h2 { padding: var(--s3) var(--s4); margin: 0; font-size: var(--fs-lg); background: var(--col-bg, var(--surface-3));
  color: var(--col-ink, var(--ink)); justify-content: space-between; }
.board-col > h2 .badge { font-size: var(--fs-md); height: 30px; min-width: 30px; justify-content: center; background: var(--surface); color: var(--ink); }
.board-col > :not(h2) { margin-inline: var(--s3); }
.board-col.col-new { --col-bg: var(--board-new-bg); --col-ink: var(--board-new-text); }
.board-col.col-preparing { --col-bg: var(--board-prep-bg); --col-ink: var(--board-prep-text); }
.board-col.col-ready { --col-bg: var(--board-ready-bg); --col-ink: var(--board-ready-text); }
.board-col.col-out { --col-bg: var(--board-out-bg); --col-ink: var(--board-out-text); }
.order-card { border-radius: var(--r-lg); gap: var(--s3); animation: fade-up .3s var(--ease-out) both; }
.order-card .order-code { font-size: 34px; letter-spacing: 3px; }
.order-card .order-lines { font-size: var(--fs-lg); gap: var(--s2); }
.order-card .order-lines strong { color: var(--brand-text); }
.order-card .order-actions .btn { min-height: 60px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.order-card .code-pad .code-input { max-width: none; font-size: 28px; min-height: 60px; }
.wait-pill { display: inline-flex; align-items: center; height: 30px; padding: 0 var(--s3); border-radius: var(--r-pill);
  background: var(--surface-2); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.wait-pill.is-warn { background: var(--warn-soft); color: var(--warn); }
.wait-pill.is-late { background: var(--danger-soft); color: var(--danger); }
.store-topbar { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); }
.store-topbar nav a { min-height: 48px; padding: 0 var(--s4); font-size: var(--fs-md); border-radius: var(--r-pill); }
.menu-filter { position: sticky; top: 76px; z-index: 15; background: var(--bg); padding-block: var(--s2); }

@media (prefers-reduced-motion: reduce) {
  .tracker .rider.is-moving { animation: none; }
}
.hero-tools { margin-top: var(--s3); }
.skeleton-card { height: 200px; }
.span-all { grid-column: 1 / -1; }
.empty-emoji { font-size: 48px; line-height: 1; }
.center-text { text-align: center; }
.action-bar .hint { margin-top: var(--s1); }
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { color: inherit; }
.order-actions-row { margin: calc(-1 * var(--s1)) var(--s1) var(--s2); gap: var(--s2); }
.emoji-big { font-size: 34px; line-height: 1; }
.sheet-hero { position: relative; }
.sheet-hero .heart { position: absolute; top: var(--s3); right: var(--s3); }
.surprise-card .btn { white-space: nowrap; flex: none; }
.dish-card .dish-name { color: var(--ink); text-decoration: none; }
.dish-card .dish-name:hover { color: var(--brand-text); }
.budget-toggle { align-self: flex-start; background: var(--surface); }
.budget-toggle[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.surprise-card.stack { align-items: stretch; }

/* =====================================================================
   UI v2.1: bold look, Momo the mascot, Food Swipe, spin wheel, motion everywhere
   ===================================================================== */

/* ---------- Page transitions (Chrome/Edge/Android: smooth cross-fade between pages) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s ease-in both; }
::view-transition-new(root) { animation: vt-in .28s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
.bottom-nav { view-transition-name: bottom-nav; }
main#main > .container > * { animation: fade-up .4s var(--ease-out) both; }

/* Scroll reveal (app.js adds .is-in when the element scrolls into view) */
.reveal { opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Bold hero ---------- */
.hero { padding-top: var(--s8); padding-bottom: var(--s6); }
.hero-title { font-size: 32px; line-height: 1.08; letter-spacing: -.5px; font-weight: var(--fw-bold); color: var(--hero-ink); }
.hero-main { align-items: flex-end; }
.hero .streak-pill { align-self: flex-start; margin-top: var(--s1); }
.hero-float { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-float span { position: absolute; font-size: 28px; opacity: .22; animation: float 7s ease-in-out infinite; }
.hero-float span:nth-child(1) { left: 6%; top: 12%; animation-delay: 0s; }
.hero-float span:nth-child(2) { left: 46%; top: 6%; animation-delay: -1.5s; font-size: 22px; }
.hero-float span:nth-child(3) { left: 70%; top: 42%; animation-delay: -3s; }
.hero-float span:nth-child(4) { left: 30%; top: 58%; animation-delay: -4.2s; font-size: 20px; }
.hero-float span:nth-child(5) { left: 88%; top: 8%; animation-delay: -2.2s; font-size: 24px; }
.hero-float span:nth-child(6) { left: 58%; top: 74%; animation-delay: -5.4s; font-size: 22px; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(8deg); } }

/* ---------- Momo the mascot ---------- */
.momo { position: relative; flex: none; width: 104px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column; align-items: center; outline-offset: 4px; }
.momo-svg { width: 92px; height: 92px; overflow: visible; animation: momo-bob 3.2s ease-in-out infinite; }
.momo-svg.is-poked { animation: momo-wiggle .5s var(--ease-spring); }
.momo-eyes { transform-origin: 60px 76px; animation: blink 4.5s infinite; }
@keyframes momo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes momo-wiggle { 0% { transform: rotate(0) scale(1); } 25% { transform: rotate(-12deg) scale(1.08); }
  50% { transform: rotate(10deg) scale(1.1); } 75% { transform: rotate(-6deg) scale(1.04); } 100% { transform: rotate(0) scale(1); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.momo-bubble { position: absolute; bottom: calc(100% - 4px); right: 4px; width: max-content; max-width: 170px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-semi); line-height: 1.35;
  padding: 7px 11px; border-radius: 14px 14px 4px 14px; box-shadow: var(--shadow-2); animation: pop .35s var(--ease-spring); z-index: 2; }

/* ---------- Food Swipe promo (Home) ---------- */
.swipe-promo { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--brand)) 100%);
  color: var(--on-accent); text-decoration: none; box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 80%, transparent);
  position: relative; overflow: hidden; }
.swipe-promo:hover { color: var(--on-accent); }
.swipe-promo:active { transform: scale(.98); }
.swipe-promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(-100%); animation: shine 3.5s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.swipe-title { display: block; font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.swipe-sub { display: block; font-size: var(--fs-sm); opacity: .92; }
.swipe-go { font-size: 28px; font-weight: var(--fw-bold); }
.swipe-stack { position: relative; width: 58px; height: 64px; flex: none; }
.swipe-stack span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-2); }
.swipe-stack span:nth-child(1) { transform: rotate(-14deg) translateX(-6px); }
.swipe-stack span:nth-child(2) { transform: rotate(8deg) translateX(6px); }
.swipe-stack span:nth-child(3) { animation: wobble 2.6s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg) translateX(-3px); } 60% { transform: rotate(6deg) translateX(3px); } }

/* ---------- Food Swipe page ---------- */
.saved-pill { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 var(--s3); border-radius: var(--r-pill);
  background: var(--brand-soft); color: var(--brand-text); font-weight: var(--fw-bold); text-decoration: none; }
.deck { position: relative; height: min(58vh, 460px); touch-action: none; user-select: none; }
.swipe-card { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-2); overflow: hidden; will-change: transform; transition: transform .35s var(--ease-out), opacity .35s;
  touch-action: none; }
.swipe-card.is-dragging { transition: none; cursor: grabbing; }
.swipe-art { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0; }
.swipe-art img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.swipe-emoji { font-size: 130px; line-height: 1; filter: drop-shadow(0 12px 18px rgba(0,0,0,.15)); }
.swipe-info { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s1); }
.swipe-price { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--brand-text); }
.stamp { position: absolute; top: 28px; z-index: 2; padding: 6px 14px; border: 4px solid; border-radius: 12px; font-size: 26px;
  font-weight: var(--fw-bold); letter-spacing: 2px; opacity: 0; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.stamp-save { left: 22px; color: var(--ok); border-color: var(--ok); transform: rotate(-14deg); opacity: var(--save, 0); }
.stamp-skip { right: 22px; color: var(--danger); border-color: var(--danger); transform: rotate(14deg); opacity: var(--skip, 0); }
.stamp-add { left: 50%; top: auto; bottom: 40%; color: var(--accent); border-color: var(--accent); transform: translateX(-50%); opacity: var(--add, 0); }
.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); text-align: center; }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: var(--s6); }
.swipe-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow-2);
  font-size: 26px; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s var(--ease-spring); }
.swipe-btn:active { transform: scale(.85); }
.swipe-btn.is-skip { color: var(--danger); }
.swipe-btn.is-save { color: #E11D48; width: 72px; height: 72px; font-size: 30px; }
.swipe-btn.is-add { width: 54px; height: 54px; font-size: 22px; }
.heart-burst { position: fixed; z-index: 90; pointer-events: none; font-size: 64px; animation: burst .7s var(--ease-out) forwards; }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -120%) scale(1.6); opacity: 0; } }

/* ---------- Spin wheel ---------- */
.wheel-wrap { position: relative; width: 270px; height: 270px; margin: var(--s2) auto 0; }
.wheel { position: absolute; inset: 0; border-radius: 50%; border: 8px solid var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 2px var(--line);
  transition: transform 4.2s cubic-bezier(.12, .78, .16, 1); }
.wheel-label { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: flex;
  align-items: center; justify-content: center; font-size: 30px; }
.wheel-pointer { position: absolute; left: 50%; top: -14px; z-index: 2; width: 0; height: 0; transform: translateX(-50%);
  border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 28px solid var(--brand);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.wheel-pointer.is-tick { animation: tick .12s ease-out; }
@keyframes tick { 50% { transform: translateX(-50%) rotate(-14deg); } }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow-2); display: flex; align-items: center; justify-content: center; font-size: 28px; z-index: 1; }
.wheel-status { text-align: center; font-weight: var(--fw-bold); font-size: var(--fs-lg); min-height: 1.5em; }

@media (prefers-reduced-motion: reduce) {
  .hero-float span, .momo-svg, .momo-eyes, .swipe-promo::after, .swipe-stack span:nth-child(3) { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .wheel { transition-duration: .6s; }
}
[hidden] { display: none !important; }

/* ---------- V2-02: store Staff screen ---------- */
.staff-code { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: 6px; font-variant-numeric: tabular-nums; }
.staff-row { min-height: 48px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.staff-row:last-child { border-bottom: 0; }
.perm-checks { border: 0; padding: 0; margin: 0; }
.perm-area { padding: var(--s2) 0; border-top: 1px solid var(--line); }
.perm-area .check { min-height: 48px; }

/* ---------- V2-03: Excel upload preview ---------- */
.table tr.row-error td { background: var(--danger-soft); }

/* ---------- V2-03: reports + board counts ---------- */
.report-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 900px) { .report-grid { grid-template-columns: 3fr 2fr; } }
.bar-chart { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.bar-chart li { display: grid; grid-template-columns: 64px 1fr 36px; align-items: center; gap: var(--s2); font-size: var(--fs-sm); }
.bar-track { height: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--p, 0%); background: var(--brand); }
.bar-count { text-align: right; font-variant-numeric: tabular-nums; }
.live-strip { display: flex; flex-wrap: wrap; gap: var(--s2); }
.live-strip .badge { font-size: var(--fs-sm); }

/* ---------- V2-05: sign-in options ---------- */
.link-button { background: none; border: 0; padding: 0; color: var(--brand-text); font: inherit; text-decoration: underline; cursor: pointer; min-height: 0; }

/* ---------- V2-06: saved spots ---------- */
.spot-form { padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
