/* CHOCKERS design system. Spec: SPEC/design-system.md. Specimen: /design-system.html.
   Layer 1 = tokens (:root). Layer 2 = components, which read only tokens.
   Venue theme.css files override the LEGACY tokens (--bg --surface --fg --muted
   --accent --accent-fg --border --radius ...); every component reads those, so a
   venue re-skins the whole page by setting a few variables.
   Primary is cocoa red #9B271E: the wordmark colour (SPEC/style.md), warm like
   chocolate, 7.8:1 on white with white text. */

@font-face {
  font-family: 'Geologica';
  src: url('/shared/fonts/geologica-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light dark;

  /* ---- Colour: primitives ---- */
  --cocoa-700: #9b271e;   /* brand: wordmark, primary on light */
  --cocoa-300: #ff8a78;   /* primary on dark */
  --warm-50: #f7f2ef;
  --warm-100: #efe7e2;
  --warm-900: #1f1512;

  /* ---- Colour: roles (light) ---- */
  --bg: #ffffff;
  --surface: var(--warm-50);
  --surface-2: var(--warm-100);
  --fg: var(--warm-900);
  --muted: #6b5d57;
  --accent: var(--cocoa-700);
  --accent-fg: #ffffff;
  --border: #e4dad4;      /* decorative dividers only */
  --edge: #8a7b74;        /* control edges: 3:1 or more (WCAG 1.4.11) */
  --focus: var(--fg);
  --danger: #b3261e;
  --warning: #8a5a00;
  --success: #1b6e35;
  --status-new: #8a5a00;
  --status-claimed: #8f4a00;
  --status-ready: var(--success);
  --status-error: var(--danger);

  /* States, derived so a venue accent gets them for free */
  --accent-hover: color-mix(in srgb, var(--accent) 85%, #000);
  --accent-press: color-mix(in srgb, var(--accent) 70%, #000);
  --accent-wash: color-mix(in srgb, var(--accent) 12%, transparent);
  --disabled-bg: var(--surface-2);
  --disabled-fg: var(--muted);
  --hover-wash: color-mix(in srgb, var(--fg) 6%, transparent);

  /* ---- Type ---- */
  --font-display: 'Geologica', 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --fs-label: 0.75rem;   /* caps eyebrow only */
  --fs-meta: 0.875rem;
  --fs-body: 1rem;
  --fs-lead: 1.125rem;
  --fs-h3: 1.375rem;
  --fs-h2: 1.75rem;
  --fs-h1: 2.25rem;
  --fs-display: 3.25rem;
  --lh-tight: 1.1;
  --lh-body: 1.5;
  --track-tight: -0.03em;
  --track-label: 0.08em;

  /* ---- Space (4px base) ---- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --gutter: var(--sp-4);
  --page-max: 560px;

  /* ---- Shape and depth ---- */
  --radius: 0;         /* cards, buttons, fields, sheets */
  --radius-pill: 999px;  /* chips, tabs, bars */
  --control-h: 52px;     /* one touch target height */
  --chip-h: 40px;        /* not --control-h-s: that is the design system's name, and this unlayered :root outranks its layer on staff pages */
  --shadow-bar: none;
  --sheet-shadow: 0 -8px 30px rgba(31, 21, 18, 0.14);
  --card-shadow: none;
  --scrim: rgba(31, 21, 18, 0.5);
  /* Customer footer (item 46, F10): black, quiet, the same in light and dark. */
  --footer-bg: #000000;
  --footer-fg: #f5efeb;
  --footer-muted: #b3a59e;
  --focus-ring: 3px solid var(--focus);
  --focus-offset: 2px;
  --ease: cubic-bezier(.32, .72, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #151110;
    --surface-2: #221c1a;
    --fg: #faf4f0;
    --muted: #b3a59e;
    --accent: var(--cocoa-300);
    --accent-fg: #000000;
    --border: #2e2623;
    --edge: #91827b;
    --danger: #ff8a80;
    --warning: #f0b252;
    --success: #6fd38c;
    --status-new: #f0b252;
    --status-claimed: #ffa25c;
    --sheet-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
    --shadow-bar: none;
    --scrim: rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
/* LA-40: html needs its own background; iOS Safari paints the rubber-band
   area with html's background, not body's. */
html, body { min-height: 100dvh; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--fg);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}
/* Weight falls as size falls: 900 display, 800, 700, 600. */
h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: var(--track-tight);
  line-height: var(--lh-tight);
  margin-block: 0;
}
h1 { font-size: var(--fs-h1); font-weight: 900; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
.display { font-size: var(--fs-display); font-weight: 900; }
.eyebrow {
  font-size: var(--fs-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--track-label); color: var(--muted);
}
a { color: inherit; text-underline-offset: 0.2em; }
button { font-family: inherit; }
/* iOS zooms the page into a focused field whose text is under 16px (item 79).
   Browsers default a field to about 13px, so every field gets a 16px floor. */
input, select, textarea { font-size: max(16px, 1em); }
::selection { background: var(--accent); color: var(--accent-fg); }
:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

/* LA-44: bottom padding clears the floating cart bar. Item 47 (F43): the
   content takes at least the full viewport, so the footer is always below
   the fold, on any screen. Not inside the cart sheet's iframe. */
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 0 calc(96px + env(safe-area-inset-bottom)); min-height: 100vh; min-height: 100lvh; }
html.cart-page .page { min-height: 0; }
.page-pad { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---- Hero ---- */
.hero {
  background: var(--bg);
  color: var(--fg);
  /* One row on every width (item 56, F24): logo left; search and the
     cards/list switch side by side on the right. */
  display: flex; align-items: center; gap: var(--sp-3);
  padding: calc(var(--sp-2) + env(safe-area-inset-top)) var(--gutter) var(--sp-2);
  /* LA-40: sticky-but-never-stuck so iOS 26 tints the status strip with the
     header colour. Do not remove. */
  position: sticky; top: -100%;
}
.hero { flex-wrap: wrap; row-gap: var(--sp-2); }
.hero .hero-book { order: 2; margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--accent); border-radius: var(--radius-pill); color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.hero .hero-book[hidden] { display: none; }
.hero .view-switch { order: 4; }
@media (min-width: 720px) { .hero .hero-book { margin-left: 0; } }
.hero .brand { min-height: 44px; display: flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }
.hero .brand-mark { height: 34px; width: auto; }
/* Thai Baan's wordmark is white on transparent: black in light mode. */
.hero .brand-word { height: 26px; width: auto; filter: brightness(0); }
@media (prefers-color-scheme: dark) { .hero .brand-word { filter: none; } }
.hero h1 { font-size: var(--fs-h2); margin: 0; color: var(--fg); display: flex; }
/* Order-type chip: cart page, above the fulfilment fieldset. */
.order-type-chip {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  margin: var(--sp-3) var(--gutter); background: var(--accent-wash);
  color: var(--fg); padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-4);
  border-radius: var(--radius-pill); font-size: var(--fs-meta); font-weight: 700;
}
.hero .order-type-chip { margin: var(--sp-3) 0 0; }
.order-type-chip button {
  background: var(--accent); color: var(--accent-fg); border: none; border-radius: var(--radius-pill);
  padding: 0 var(--sp-4); font-size: var(--fs-meta); font-weight: 700; cursor: pointer;
  min-height: var(--chip-h);
}
.order-type-chip button:hover { background: var(--accent-hover); }
.order-type-chip button:active { background: var(--accent-press); }

/* The closed note: one calm line under the header. */
.prep-note { text-align: center; color: var(--muted); font-size: var(--fs-meta); margin: var(--sp-2) var(--gutter) 0; }

/* ---- Menu search ----
   Item 59 (F28): on a phone the search is a magnifier that opens to a
   field when tapped (and stays open while it holds a query); the logo's
   wordmark steps aside to make room. Wide screens show the field. */
.search-bar { padding: var(--sp-2) var(--gutter) 0; position: relative; }
.hero .search-bar { order: 3; flex: 1 1 200px; min-width: 0; max-width: 420px; padding: 0; margin-left: auto; }
.search-bar::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 44px; height: 20px; margin-top: -10px; pointer-events: none;
  background: var(--muted);
  --glass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E");
  -webkit-mask: var(--glass) center / 20px 20px no-repeat; mask: var(--glass) center / 20px 20px no-repeat;
}
.menu-search {
  width: 100%; padding: 0 var(--sp-3) 0 44px; font-size: var(--fs-body); min-height: 44px;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--fg);
  -webkit-appearance: none; appearance: none;
}
@media (max-width: 719px) {
  .hero { flex-wrap: nowrap; }
  .hero .search-bar { flex: 0 0 44px; transition: flex-basis 0.2s var(--ease); }
  .hero .menu-search { padding-right: 0; cursor: pointer; }
  .hero .menu-search::placeholder { color: transparent; }
  .hero .search-bar:focus-within, .hero .search-bar:has(.menu-search:not(:placeholder-shown)) { flex: 1 1 auto; }
  .hero .search-bar:focus-within .menu-search, .hero .search-bar:has(.menu-search:not(:placeholder-shown)) .menu-search { padding-right: var(--sp-3); cursor: text; }
  .hero .search-bar:focus-within .menu-search::placeholder { color: var(--muted); }
  .hero:has(.search-bar:focus-within) .brand-word, .hero:has(.menu-search:not(:placeholder-shown)) .brand-word,
  .hero:has(.hero-book:not([hidden])) .brand-word { display: none; }
}
.menu-search:hover { border-color: var(--edge); }
.menu-search:focus-visible { border-color: var(--fg); }
.menu-search::placeholder { color: var(--muted); }
.search-empty { color: var(--muted); padding: var(--sp-2) var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-meta); }
/* Search results replace the sections while a query is in (item 59). */
.search-results { display: contents; }
.search-results[hidden], .menu-grid.searching > :not(.search-results) { display: none; }
.menu-grid .search-empty { grid-column: 1 / -1; }
.food-card .opt-badge {
  align-self: flex-start; padding: 0 var(--sp-2); border-radius: var(--radius-pill);
  background: var(--accent-wash); color: var(--fg); font-size: var(--fs-meta); font-weight: 700; white-space: nowrap;
}
.food-card.added { animation: added 0.6s var(--ease); }
@keyframes added { from { background: var(--accent-wash); } }
.search-empty[hidden], .food-card[hidden], .category-heading[hidden] { display: none; }
.search-empty button { min-height: 44px; min-width: 44px; padding: 0 var(--sp-4); border-radius: var(--radius-pill); border: 2px solid var(--edge); background: transparent; color: var(--fg); font: inherit; cursor: pointer; }

/* ---- Category tabs ---- */
.tabs-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--sp-2);
  /* LA-40: stuck at top:0 it paints under the status bar. */
  padding: env(safe-area-inset-top) var(--gutter) 0 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.tabs-bar[hidden] { display: none; }
.tabs {
  flex: 1 1 auto; min-width: 0; display: flex; gap: var(--sp-2); overflow-x: auto;
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--gutter);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs[hidden] { display: none; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center;
  padding: 0 var(--sp-4); border-radius: var(--radius-pill);
  border: none; background: var(--surface-2);
  color: var(--fg); font-size: var(--fs-meta); font-weight: 600;
  white-space: nowrap; cursor: pointer; min-height: 44px;
}
.tab:hover { background: color-mix(in srgb, var(--fg) 14%, var(--surface-2)); }
.tab.active { background: var(--accent); color: var(--accent-fg); }
.tab.active:hover { background: var(--accent-hover); }
/* Cards / list switch: beside the category bar, never over the chips. */
.view-switch {
  flex: 0 0 auto; display: flex; align-self: center;
  background: var(--surface-2); border-radius: var(--radius-pill); padding: 2px;
}
.view-switch button {
  width: 44px; height: 44px; border: none; border-radius: var(--radius-pill); padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--muted); cursor: pointer;
}
.view-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }

/* ---- Menu list ---- */
.category-heading {
  font-size: var(--fs-lead); font-weight: 800;
  margin: var(--sp-4) var(--gutter) var(--sp-2); scroll-margin-top: 56px;
}
/* LA-69: the photo is the card's full height, flush to its left edge. */
.food-card {
  position: relative;
  display: flex; gap: var(--sp-3); align-items: stretch;
  margin: 0 var(--gutter) var(--sp-2); padding: 0 var(--sp-3) 0 0; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--card-shadow);
  border: none; cursor: pointer; text-align: left;
  width: calc(100% - 2 * var(--gutter)); color: inherit; font: inherit;
}
.food-card:hover { background: var(--surface-2); }
.food-card:active { background: var(--accent-wash); }
.food-card img, .ph {
  width: 96px; height: auto; aspect-ratio: 1; object-fit: cover;
  flex: 0 0 auto; align-self: stretch; background: var(--surface-2);
  border-radius: var(--radius) 0 0 var(--radius);
}
.food-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3) 0; }
.faves { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); padding: var(--sp-2) var(--gutter) 0; }
.faves[hidden] { display: none; }
/* Items 57, 58: a category's best sellers open its section, tagged. */
.food-card.featured .name::before,
.food-card.popular .name::before { content: "Popular"; display: block; font-size: var(--fs-meta); font-weight: 700; color: var(--accent); }
.food-card.featured .name::before { content: "Featured"; }
.faves-label { grid-column: 1 / -1; margin: 0; font-size: var(--fs-meta); color: var(--muted); }
.faves-label a { margin-left: var(--sp-2); color: var(--muted); }
.faves .food-card { min-width: 0; flex-direction: column; gap: 0; margin: 0; padding: 0 0 var(--sp-3); width: auto; }
.faves .food-card img, .faves .ph { width: 100%; align-self: auto; aspect-ratio: 4 / 3; border-radius: var(--radius) var(--radius) 0 0; }
.faves .food-card .info { padding: var(--sp-2) var(--sp-3) 0; }
.faves .food-card .desc { display: none; }
/* Two lines before a name is cut, so it stays readable (F42). */
.faves .food-card .name { font-size: var(--fs-meta); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) {
  .faves { display: none; }
  .menu-grid {
    max-width: none; padding-left: var(--gutter); padding-right: var(--gutter);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4);
  }
  .menu-grid .category-heading { grid-column: 1 / -1; margin: var(--sp-5) 0 0; }
  .menu-grid .food-card { flex-direction: column; gap: 0; margin: 0; padding: 0 0 var(--sp-3); width: auto; }
  .menu-grid .food-card img, .menu-grid .ph { width: 100%; align-self: auto; aspect-ratio: 4 / 3; border-radius: var(--radius) var(--radius) 0 0; }
  .menu-grid .food-card .info { flex: 1; padding: var(--sp-3) var(--sp-3) 0; }
}
.food-card .name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lead); letter-spacing: -0.015em; line-height: 1.2; }
.food-card .desc {
  color: var(--muted); font-size: var(--fs-meta); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.food-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--sp-1); }
.food-card .price { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.food-card.sold-out { cursor: not-allowed; }
.food-card.sold-out img, .food-card.sold-out .name, .food-card.sold-out .price { filter: grayscale(1); }
.food-card.sold-out .name, .food-card.sold-out .price { color: var(--muted); }
.food-card .sold-out-badge {
  background: var(--surface-2); color: var(--fg); font-size: var(--fs-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--track-label);
  padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-pill);
}

/* Placeholder tile for an item with no photo (or one that fails to load):
   a quiet tinted tile with a plate-and-cutlery mark, themed by the venue
   tokens, never a broken or blank image. */
.ph {
  display: block; position: relative; flex: 0 0 auto; background: var(--surface-2);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--fg) 6%, transparent), transparent 60%);
  border-radius: var(--radius) 0 0 var(--radius);
}
.ph::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 38%; height: 38%; max-width: 64px; max-height: 64px;
  background: var(--muted); opacity: 0.7;
  --plate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='6.5'/%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M2.5 4v6M5 4v6M3.75 10v10M21.5 4c-1.5 1-2.2 3-2.2 5.5h2.2V20'/%3E%3C/svg%3E");
  -webkit-mask: var(--plate) center / contain no-repeat; mask: var(--plate) center / contain no-repeat;
}

.ph[hidden], .sheet img[hidden] { display: none; }

/* ---- List view: short rows, one line each, no description ---- */
.menu-grid.list-view { display: block; max-width: var(--page-max); padding-left: 0; padding-right: 0; }
.list-view .category-heading { margin: var(--sp-3) var(--gutter) 0; }
.list-view > .food-card {
  flex-direction: row; align-items: center; gap: var(--sp-3); min-height: 56px;
  margin: 0 var(--gutter); width: calc(100% - 2 * var(--gutter)); padding: 0;
  background: transparent; border-radius: 0; border-bottom: 1px solid var(--border);
}
/* Item 55 (F23): the hover runs past the row's side margin, out to the
   screen edge on a phone; the price keeps the margin as its breathing room. */
.list-view > .food-card:hover { background: var(--hover-wash); box-shadow: calc(-1 * var(--gutter)) 0 0 var(--hover-wash), var(--gutter) 0 0 var(--hover-wash); }
.list-view > .food-card img, .list-view > .food-card .ph {
  width: 44px; height: 44px; aspect-ratio: 1; align-self: center; flex: 0 0 auto; border-radius: var(--radius);
}
.list-view > .food-card .info { flex-direction: row; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; }
.list-view > .food-card .name { flex: 1; min-width: 0; font-size: var(--fs-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-view > .food-card .desc { display: none; }
.list-view > .food-card .row { margin: 0; padding: 0; gap: var(--sp-2); flex: 0 0 auto; }
/* Item 54 (F22): anchored to the photo's top-right corner, inside the
   photo, so it never covers the name whatever its length. */
.list-view > .food-card .qty-pill { top: 50%; right: auto; left: 24px; margin-top: -28px; }

/* ---- Bottom sheet ---- */
.sheet-backdrop {
  position: fixed; inset: 0; background: var(--scrim);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 20; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
/* No drop shadow: the scrim already sets the sheet apart, and a closed
   sheet's shadow drew over the bottom bar (items 50; F11, F12). Closed,
   it is hidden once it has slid away, so nothing of it leaks or takes focus. */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  background: var(--bg); border-radius: 0;
  box-shadow: none; max-width: var(--page-max); margin: 0 auto;
  transform: translateY(100%); visibility: hidden;
  transition: transform 0.25s var(--ease), visibility 0s 0.25s;
  /* LA-21: grows to fit its content, scrolls inside past this cap (F32: 95%). */
  max-height: 95vh; max-height: 95dvh; overflow-y: auto;
}
.sheet.open { transform: translateY(0); visibility: visible; transition: transform 0.25s var(--ease); }
.sheet.dragging { transition: none; }
.sheet .grabber { position: relative; width: 100%; height: 48px; margin: 0; touch-action: none; cursor: grab; }
/* The visible bar sits in a 48px-tall drag strip. */
.sheet .grabber::after { content: ''; position: absolute; left: 50%; top: 12px; width: 40px; height: 4px; margin-left: -20px; background: var(--edge); border-radius: var(--radius-pill); }
/* Item sheet: the photo runs to the top edge and the handle sits on it. */
.sheet-top { position: relative; height: 220px; overflow: hidden; border-radius: inherit; background: var(--surface-2); }
.sheet .sheet-top img, .sheet .sheet-top .ph { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: center; border-radius: 0; }
.sheet-top .grabber { position: absolute; top: 0; left: 0; right: 0; z-index: 1; }
.sheet-top .grabber::after { background: rgba(255, 255, 255, 0.92); }
/* LA-42: the cart page in an iframe. Item 60 (F32): as tall as the
   order, up to 95% of the screen (the menu page sets the height from
   the cart's own); short orders stay short. */
.cart-sheet { height: 60dvh; max-height: 95dvh; padding: 0; overflow: hidden; }
.cart-sheet .grabber { height: 40px; }
.cart-sheet iframe { width: 100%; height: calc(100% - 40px); border: 0; display: block; }
/* Item 53 (F19): flush to the sheet's corner, the handle's colour, no box.
   On the item photo it keeps a dark box so it reads (.on-photo). */
.sheet-close {
  position: absolute; top: 0; right: 0; z-index: 2;
  width: 48px; height: 48px; border: none; border-radius: 0;
  background: transparent; color: var(--edge); padding: 0;
  font-size: 0; cursor: pointer; /* the x is drawn below: a font glyph never centres exactly */
}
.sheet-close::before, .sheet-close::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px;
  background: currentColor; border-radius: 0; transform: rotate(45deg);
}
.sheet-close::after { transform: rotate(-45deg); }
.sheet-close:hover { color: var(--fg); }
.sheet-close.on-photo { background: rgba(0, 0, 0, 0.6); color: #fff; }
.sheet-close.on-photo:hover { background: rgba(0, 0, 0, 0.8); }
.sheet-close.on-photo:focus-visible { outline-color: #fff; }
/* Order-type sheet (items 42, 43; F2, F3): three equal cards in a row (or
   stacked, a venue setting), the icon scaled with the card, the label
   centred under it. The current choice is filled with the accent and
   ticked, so it reads at a glance. It sits above any open sheet (F14). */
.order-type-backdrop { z-index: 30; }
.order-type-sheet { z-index: 31; }
.order-type-sheet h2 { padding-right: var(--sp-7); }
.order-type-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--sp-3); margin: var(--sp-4) 0 0; }
.order-type-options.vertical { grid-template-columns: 1fr; }
.order-type-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-2); min-height: var(--control-h); min-width: 0;
  border-radius: var(--radius); border: none; background: var(--surface);
  color: var(--fg); font: inherit; text-align: center; cursor: pointer;
}
.order-type-btn:hover { background: var(--surface-2); }
.order-type-btn:active { background: var(--accent-wash); }
.order-type-btn .ot-icon { font-size: clamp(2.5rem, 13vw, 4rem); line-height: 1.1; }
.order-type-options.vertical .order-type-btn { flex-direction: row; justify-content: flex-start; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); }
.order-type-options.vertical .ot-icon { font-size: 2.5rem; }
.order-type-options.vertical .ot-when { margin-left: auto; }
.order-type-btn .ot-name { font-family: var(--font-display); font-size: var(--fs-lead); font-weight: 700; line-height: var(--lh-tight); }
.order-type-btn .ot-when { font-size: var(--fs-meta); color: var(--muted); font-variant-numeric: tabular-nums; }
.order-type-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.order-type-btn[aria-pressed="true"] .ot-when { color: inherit; }
.order-type-btn[aria-pressed="true"] .ot-name::before { content: "✓ "; }
.table-picker { margin-top: var(--sp-4); }
.table-picker label { display: block; font-size: var(--fs-meta); font-weight: 600; margin-bottom: var(--sp-2); }
.table-picker select, .table-picker input {
  width: 100%; padding: 0 var(--sp-3); font-size: var(--fs-body); min-height: var(--control-h); margin-bottom: var(--sp-3);
  border: 2px solid var(--edge); border-radius: var(--radius); background: var(--bg); color: var(--fg);
}
.sheet img { width: 100%; height: 200px; object-fit: cover; display: block; }
/* LA-62: one shell for every sheet. */
.sheet .sheet-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.sheet h2, .cart-header h1 { font-size: var(--fs-h2); margin: 0 0 var(--sp-2); }
.sheet .desc { color: var(--muted); font-size: var(--fs-body); white-space: pre-line; }
.sheet .price { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); margin: var(--sp-3) 0; font-variant-numeric: tabular-nums; }
/* Item 53 (F21): no tint behind an option group (it ran flush with no padding). */
.option-group { border: none; padding: 0; margin: 0 0 var(--sp-5); background: none; }
.option-group legend { float: left; width: 100%; font-weight: 700; font-size: var(--fs-body); padding: var(--sp-2) 0; } /* floated so it sits inside the card, not on its top edge */
.option-group legend + * { clear: both; }
.option-group .req { color: var(--muted); font-weight: 600; font-size: var(--fs-meta); }
.option-row {
  /* LA-20: full-width tappable row, 48px minimum hit area. */
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0;
  min-height: 48px; border-bottom: 1px solid var(--border); font-size: var(--fs-body); cursor: pointer;
}
.option-row:last-of-type { border-bottom: none; }
.option-row input { flex: 0 0 auto; }
.option-row span:first-of-type { flex: 1; }

/* ---- Checkboxes and radios (LA-20): hand-styled so a venue accent themes them. */
input[type="radio"], input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 24px; height: 24px; flex: 0 0 auto;
  border: 2px solid var(--edge); background: var(--bg); cursor: pointer;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"] { border-radius: var(--radius); }
input[type="radio"]:hover, input[type="checkbox"]:hover { border-color: var(--fg); }
input[type="radio"]:checked, input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: radial-gradient(var(--accent) 0 42%, transparent 46%) center/100% 100% no-repeat, var(--bg);
}
input[type="checkbox"]:checked {
  background: linear-gradient(var(--accent), var(--accent)) center/60% 60% no-repeat, var(--bg);
}
input:disabled { cursor: not-allowed; border-color: var(--border); background: var(--disabled-bg); }
.opt-price { color: var(--muted); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
.sheet-body .qty { justify-content: center; gap: var(--sp-5); margin: var(--sp-5) 0; }

/* ---- Buttons ---- */
button.primary {
  background: var(--accent); color: var(--accent-fg); border: none;
  width: 100%; padding: 0 var(--sp-4); border-radius: var(--radius);
  font-weight: 700; font-size: var(--fs-lead); min-height: var(--control-h); cursor: pointer;
}
button.primary:hover { background: var(--accent-hover); }
/* Pressed stays vivid (accent, inset ring, tiny shrink): the darkened mix read as disabled. */
button.primary:active { background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-fg); transform: scale(0.98); text-decoration: none; }
button.primary:disabled, button.primary[aria-disabled="true"] {
  background: var(--disabled-bg); color: var(--disabled-fg); cursor: not-allowed; text-decoration: line-through;
}
:is(button, a).secondary {
  background: transparent; color: var(--accent); border: 2px solid var(--accent);
  width: 100%; padding: 0 var(--sp-4); border-radius: var(--radius); font-weight: 700; font-size: var(--fs-body);
  min-height: var(--control-h); cursor: pointer;
}
:is(button, a).secondary:hover { background: var(--accent-wash); }
:is(button, a).secondary:active { background: var(--accent); color: var(--accent-fg); }
:is(button, a).secondary:disabled { color: var(--disabled-fg); border-color: var(--border); background: var(--disabled-bg); cursor: not-allowed; }

a.secondary { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }

/* ---- Choice chips (booking day and time): a pill you press, pressed = accent ---- */
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px 0 var(--sp-2); scroll-snap-type: x proximity; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips.days, .chips.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); overflow: visible; }  /* days and times: equal cells in order, 3 or 4 a row on a phone */
.chips.days .chip, .chips.times .chip { padding-inline: var(--sp-1); }
.chips.times .none { grid-column: 1 / -1; }
.chip { flex: 0 0 auto; min-height: var(--control-h); padding: 6px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--edge); background: var(--surface); color: var(--fg); font-size: 1rem; cursor: pointer; scroll-snap-align: start; line-height: 1.15; text-align: center; }
.chip small { display: block; font-size: .72rem; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chip[aria-pressed="true"] small { color: inherit; }
.chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: none; }

/* ---- Floating bottom bar (LA-22): order-type pill and cart button,
   both always shown. ---- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: var(--sp-3) var(--gutter) calc(var(--sp-3) + env(safe-area-inset-bottom));
  /* Depth by blur: the cards blur through the bar. */
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.cart-bar-row {
  max-width: calc(var(--page-max) - 2 * var(--gutter)); margin: 0 auto;
  display: flex; align-items: center; gap: var(--sp-3);
}
.order-type-pill {
  flex: 1 1 auto; min-width: 0;
  background: var(--surface-2); color: var(--fg); border: none;
  border-radius: var(--radius-pill); padding: 0 var(--sp-4); min-height: var(--control-h);
  font-size: var(--fs-meta); font-weight: 700; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-type-pill:hover { background: color-mix(in srgb, var(--fg) 14%, var(--surface-2)); }
.cart-bar-inner {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--accent); color: var(--accent-fg); border-radius: var(--radius-pill);
  min-height: var(--control-h); padding: 0 var(--sp-5);
  border: none; font: inherit; cursor: pointer;
  box-shadow: var(--shadow-bar);
}
/* Item 49: always shown, empty or not. */
.cart-bar-inner:hover { background: var(--accent-hover); }
.cart-bar-inner:active { background: var(--accent-press); }
.cart-bar-inner [hidden] { display: none; }
/* Venue closed (open.js). */
.cart-bar-inner.disabled { background: var(--disabled-bg); color: var(--disabled-fg); box-shadow: none; pointer-events: none; }
/* The cart pill's corner badge and a card's selected-qty badge share one
   round chip (LA-45/46/58). */
/* Item 54 (F22): one smaller badge; the number fills more of it. */
.count-badge, .food-card .qty-pill {
  background: var(--accent); color: var(--accent-fg); border-radius: 50%;
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: var(--fs-meta); font-weight: 800; line-height: 1; flex: 0 0 auto;
}
.food-card .qty-pill[hidden] { display: none; }
.cart-bar-inner .count-badge, .food-card .qty-pill {
  position: absolute; top: -10px; right: -10px; outline: 3px solid var(--bg);
}
/* On the accent pill the badge flips to the ink colours so it still reads. */
.cart-bar-inner .count-badge { background: var(--fg); color: var(--bg); }
.food-card .qty-pill { top: -8px; right: -8px; z-index: 1; outline: 3px solid var(--bg); }
.cart-bar-inner .count-badge { top: -8px; right: -12px; }
.cart-bar-inner .go { font-weight: 700; font-size: var(--fs-lead); display: flex; align-items: center; gap: var(--sp-1); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- Cart page (the cart sheet's iframe) ----
   Items 60, 51 (F33, F35, F15): one rhythm. Every block below the item
   rows sits --sp-4 below the one before and on the same --sp-5 side edge
   as the rows. The page is as tall as its content: the menu page sizes
   the sheet to it. */
.cart-header { padding: var(--sp-2) var(--sp-7) 0 var(--sp-5); }
html.cart-page, html.cart-page body { background: var(--bg); min-height: 0; }
html.cart-page .page { padding-bottom: 0; }
html.cart-page .order-type-chip {
  margin: var(--sp-4) var(--sp-5) 0; padding: 0; background: none; border-radius: 0;
  font-size: var(--fs-body);
}
html.cart-page .order-type-chip button { min-height: 44px; }
.total-row[hidden], .order-type-chip[hidden] { display: none; }
.cart-line {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border);
}
.cart-line .info { min-width: 0; }
.cart-line .name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lead); }
.cart-line .unit { color: var(--muted); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
.qty { display: flex; align-items: center; gap: var(--sp-3); }
/* LA-48/LA-60: the one stepper, 40px so the target is comfortable. */
/* Item 61 (F34): a 32px drawn circle, the 44px hit area and the sign stay. */
.qty button {
  width: 44px; height: 44px; border-radius: 50%; border: none; padding: 6px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 1.6rem; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; min-height: unset; min-width: unset; position: relative; font-size: 0; /* the sign is drawn below: a font glyph never centres exactly */
}
.qty button::before, .qty button::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 2.5px; margin: -1.25px 0 0 -8px; background: currentColor; border-radius: 0; }
.qty button:first-of-type::after { display: none; }
.qty button:last-of-type::after { transform: rotate(90deg); }
.qty button:hover { background: var(--accent-hover); }
.qty button:active { background: var(--accent-press); }
.qty button:disabled { background: var(--disabled-bg); color: var(--disabled-fg); cursor: not-allowed; }
.qty button, .qty button:hover, .qty button:active, .qty button:disabled { background-clip: content-box; }
.qty output { min-width: 1.5em; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lead); font-variant-numeric: tabular-nums; }
.empty-state { text-align: center; padding: var(--sp-6) var(--sp-5) var(--sp-2); color: var(--muted); }
.empty-state p { margin: 0; }

fieldset { border: none; border-radius: var(--radius); margin: var(--sp-4) var(--gutter); padding: var(--sp-2) var(--sp-4) var(--sp-4); background: var(--surface); }
legend { padding: 0 var(--sp-2); font-weight: 700; font-size: var(--fs-body); }
.fulfil-option {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0;
  min-height: 48px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.fulfil-option:last-of-type { border-bottom: none; }
input[type="text"], textarea {
  width: 100%; padding: 0 var(--sp-3); font-size: var(--fs-body); min-height: var(--control-h);
  border: 2px solid var(--edge); border-radius: var(--radius); background: var(--bg); color: var(--fg);
  margin-top: var(--sp-2);
}
textarea { padding: var(--sp-3); min-height: calc(3 * var(--lh-body) * 1em + 2 * var(--sp-3)); font-family: inherit; line-height: var(--lh-body); resize: none; field-sizing: content; }
input[type="text"]:hover, textarea:hover { border-color: var(--fg); }
input[type="text"]:focus-visible, textarea:focus-visible { border-color: var(--fg); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type="text"]:read-only { background: var(--surface-2); border-color: transparent; }
input[type="text"]:disabled, textarea:disabled { background: var(--disabled-bg); color: var(--disabled-fg); border-color: var(--border); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: var(--sp-4) var(--sp-5) 0; }
.total-row .label { color: var(--muted); font-size: var(--fs-body); font-weight: 600; }
.total-row .amount { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 900; letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.error { color: var(--status-error); margin: var(--sp-2) var(--gutter); font-size: var(--fs-meta); font-weight: 600; }
.pay-buttons { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
/* LA-64: Pay is the one big action. */
.pay-buttons .primary { min-height: 64px; font-size: var(--fs-h3); font-weight: 800; font-family: var(--font-display); }
.gateway-line { text-align: center; color: var(--muted); font-size: var(--fs-meta); margin: var(--sp-1) 0 var(--sp-3); }
/* Cart: Pay with Stripe (main, with card marks) and Pay at the till (secondary). */
/* Item 63 (F16): card marks on the same line as "Pay with Stripe" (Tamm's pick); they wrap below on a very narrow screen. */
.pay-buttons .pay-stripe { display: flex; flex-flow: row wrap; align-items: center; justify-content: center; gap: var(--sp-1) var(--sp-3); padding: var(--sp-2) var(--sp-4); }
.pay-buttons .pay-stripe:disabled { text-decoration: none; }
.card-brands { display: inline-flex; gap: 6px; }
.card-brands svg { height: 20px; width: auto; display: block; }
.pay-buttons .pay-till { min-height: 48px; font-size: var(--fs-body); font-weight: 700; }
/* Busy button (cart pay buttons): the design system's loading look, three square blocks and no motion
   (chockers.css .ck-btn[aria-busy]). It stays disabled but keeps its live colours, so it never reads as dead. */
button[aria-busy="true"] { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); cursor: progress; text-decoration: none; }
button[aria-busy="true"]::before { content: ""; flex: none; box-sizing: content-box; width: var(--sp-2); height: var(--sp-2); padding: 0 var(--sp-2); border: 0 solid currentColor; border-inline-width: var(--sp-2); background: currentColor; background-clip: content-box; }
button[aria-busy="true"] .card-brands { display: none; }
button.primary[aria-busy="true"] { background: var(--accent); color: var(--accent-fg); }
:is(button, a).secondary[aria-busy="true"] { background: transparent; color: var(--accent); border-color: var(--accent); }
.pay-note { margin: 0; text-align: center; color: var(--muted); font-size: var(--fs-meta); }
.pay-note[hidden], .pay-till[hidden] { display: none; }
#pay-note:not([hidden]) { color: var(--status-error); font-weight: 600; }
/* Demo mode only (cart page): banner and the test-card step. */
.demo-banner { background: var(--surface-2); color: var(--fg); text-align: center; font-weight: 700; font-size: 0.85rem; padding: 8px 16px; margin-top: 0; }
.pay-buttons[hidden], .test-card[hidden] { display: none; }
.test-card { padding: 0 16px 16px; }
.test-card h2 { font-size: 1.1rem; margin: 0 0 4px; }
.test-card .hint { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }
.test-card label { display: block; font-size: 0.85rem; margin-top: 10px; }
.test-card input { width: 100%; box-sizing: border-box; padding: 11px 12px; font-size: 1rem; min-height: 44px; margin-top: 4px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--bg); color: var(--fg); }
.test-card .row { display: flex; gap: 10px; }
.test-card .row > div { flex: 1; }
.test-card .primary { margin-top: 16px; width: 100%; min-height: 56px; }
.test-card .back { background: none; border: 0; color: var(--muted); text-decoration: underline; margin-top: 8px; padding: 12px; width: 100%; min-height: 44px; }
.test-card [role="alert"] { color: var(--status-error); margin: 10px 0 0; font-size: 0.9rem; }
.gateway-line button {
  background: none; border: none; color: inherit; text-decoration: underline;
  text-decoration-color: var(--edge); cursor: pointer; font: inherit; padding: 0;
}
.gateway-line svg { height: 1.1em; width: auto; vertical-align: middle; fill: currentColor; }
.gateway-line svg[hidden] { display: none; }

/* ---- Order status page ---- */
.status-page { text-align: center; padding: calc(var(--sp-7) + env(safe-area-inset-top)) var(--sp-5) var(--sp-8); }
.order-number { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 900; letter-spacing: var(--track-tight); color: var(--accent); margin: 0 0 var(--sp-2); line-height: 1; }
.status-page .venue { color: var(--muted); margin: 0 0 var(--sp-6); }
/* Order progress: one thin line, three points, labels under. Done points and the
   line up to the current one take the accent; later points stay quiet. */
.progress { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 auto var(--sp-5); max-width: 420px; padding: 0; list-style: none; }
.progress .step { position: relative; text-align: center; }
.progress .dot { display: block; width: 12px; height: 12px; margin: 0 auto var(--sp-2); border-radius: 50%; position: relative; z-index: 1;
  background: var(--bg); border: 2px solid var(--edge); transition: background .3s, border-color .3s; }
.progress .step::before { content: ''; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.progress .step:first-child::before { display: none; }
.progress .step.done .dot { background: var(--accent); border-color: var(--accent); }
.progress .step.active .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.progress .step.done::before, .progress .step.active::before { background: var(--accent); }
.progress .label { font-size: var(--fs-meta); color: var(--muted); }
.progress .step.active .label { color: var(--fg); font-weight: 700; }
.status-headline { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.status-sub { color: var(--muted); margin-top: var(--sp-2); }
.status-ready-banner { color: var(--status-ready); }
.suggestions { text-align: left; margin-top: var(--sp-6); }
.suggestions h2 { font-size: var(--fs-lead); font-weight: 700; margin: 0 0 var(--sp-3); }
.order-back-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-width: var(--page-max); margin: 0 auto; text-align: center;
  padding: var(--sp-7) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
  pointer-events: none;
}
.order-back-bar a {
  pointer-events: auto; display: inline-flex; align-items: center; min-height: var(--control-h);
  padding: 0 var(--sp-5); border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-fg);
  font-weight: 700; text-decoration: none;
}
.order-back-bar a:hover { background: var(--accent-hover); }

/* ---- Customer footer (items 46, 47; /shared/venue-footer.js) ----
   Columns of venue facts and links on black, one spacing step (--sp-5)
   between every block, the bottom clear of the floating bar. */
.mega-footer {
  background: var(--footer-bg); color: var(--footer-fg);
  padding: var(--sp-6) var(--gutter) calc(var(--control-h) + var(--sp-6) + env(safe-area-inset-bottom));
  font-size: var(--fs-meta);
}
.mega-footer:empty { min-height: 50vh; }
.mf-grid { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--sp-5) var(--sp-6); }
.mf-grid > * { flex: 1 1 140px; }
.mf-grid > .mf-brand, .mf-grid > .mf-open { flex: 0 0 auto; }
.mf-grid > .mf-menu { flex: 2 1 260px; }
.mf-brand { display: flex; flex-direction: column; gap: var(--sp-2); }
.mf-logo { display: inline-flex; min-height: 44px; }
.mf-logo img { width: 56px; height: 56px; }
.mf-name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lead); }
.mf-col h2 { font-size: var(--fs-label); font-weight: 600; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--footer-muted); margin: 0 0 var(--sp-2); }
.mf-col ul { list-style: none; margin: 0; padding: 0; }
.mega-footer a, .mega-footer .help-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  color: var(--footer-fg); font: inherit; text-decoration: underline; text-decoration-color: var(--footer-muted);
  background: none; border: none; cursor: pointer; text-align: left;
}
.mf-hours { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-1) var(--sp-3); margin: 0; font-variant-numeric: tabular-nums; }
.mf-hours dt, .mf-hours dd { margin: 0; color: var(--footer-muted); white-space: nowrap; }
.mf-hours .today { color: var(--footer-fg); font-weight: 700; }
.mf-today { font-weight: 400; }
.mf-menu ul { columns: 2; column-gap: var(--sp-5); }
.mf-menu li { break-inside: avoid; }
@media (min-width: 720px) { .mf-menu ul { columns: 3; } }
.mega-footer .venue-qr { margin: var(--sp-2) 0 0; padding: 0; text-align: left; color: var(--footer-muted); }
.mega-footer .venue-qr .qr-thumb { margin: 0 0 var(--sp-1); }
.mf-base {
  max-width: 1200px; margin: var(--sp-5) auto 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-5);
  color: var(--footer-muted);
}
.mf-base p { margin: 0; }
.mega-footer .chockers-foot { padding: 0; gap: var(--sp-2); align-items: center; }
.mega-footer a.chockers-logo { --logo-c: #ff5045; }

/* ---- Need help dialog (item 221) ---- */
.help-dialog {
  position: fixed; margin: auto; border: none; border-radius: var(--radius);
  padding: var(--sp-5); width: calc(100% - 2 * var(--gutter)); max-width: 400px;
  background: var(--bg); color: var(--fg); box-shadow: var(--sheet-shadow);
}
.help-dialog::backdrop { background: var(--scrim); }
.help-dialog h2 { margin: 0 0 var(--sp-3); font-size: var(--fs-h3); }
.help-dialog-close {
  position: absolute; top: var(--sp-2); right: var(--sp-2); border: none; background: none;
  color: var(--muted); font-size: 1.8rem; line-height: 1; padding: var(--sp-1) var(--sp-2); cursor: pointer;
}
.help-links { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.help-links[hidden] { display: none; }
.help-links a {
  display: flex; align-items: center; justify-content: center; min-height: var(--control-h); text-align: center;
  border-radius: var(--radius); background: var(--accent); color: var(--accent-fg);
  font-weight: 700; text-decoration: none;
}
.help-links a:hover { background: var(--accent-hover); }
.help-staff-note { color: var(--muted); font-size: var(--fs-meta); margin: 0; }

/* ---- Order summary (order page) ---- */
.order-summary { border: none; border-radius: var(--radius); padding: var(--sp-1) var(--sp-4); margin-bottom: var(--sp-4); background: var(--surface); }
.summary-line { display: flex; justify-content: space-between; padding: var(--sp-2) 0; font-size: var(--fs-meta); color: var(--muted); border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.summary-line:last-child { border-bottom: none; }

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

/* Cart page: the cutlery opt-in is a full-height tappable row. */
.cutlery-opt { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; cursor: pointer; }
/* Item 11: delivery contact, shown only for a delivery. */
.delivery-fields { display: grid; gap: var(--sp-4); }
.delivery-fields[hidden] { display: none; }
.delivery-fields label { font-weight: 600; }
/* One optional note: the order-type row, then the text area once opened. */
html.cart-page .note-field .order-type-chip { margin: 0; }   /* the form already has the gutters */
.note-field .order-type-chip button { white-space: nowrap; }
.note-field .opt { opacity: .7; }
.note-field textarea[hidden], .note-field button[hidden] { display: none; }
/* A note on one cart line: the same row under the item, full width. */
.cart-line { flex-wrap: wrap; }
.cart-line .line-note { flex: 1 1 100%; min-width: 0; }
.line-note textarea { width: 100%; box-sizing: border-box; }


/* The CHOCKERS logo: /shared/chockers-logo.svg (the word in outlines, Geologica 900,
   tracking -.09em, brand red #9B271E; SPEC/style.md). Drawn as a mask so the colour
   follows the theme (brand-dark #ff5045 on dark pages). One class on every page:
   <a class="chockers-logo" href="https://chocke.rs/" aria-label="CHOCKERS">CHOCKERS</a>.
   The text is the fallback name only; it never shows. */
.chockers-foot a.chockers-logo, a.chockers-logo { --logo-h: 18px; --logo-c: #9b271e; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0; font-size: 0; color: transparent; text-decoration: none; }
.chockers-logo::before { content: ""; display: block; height: var(--logo-h); width: calc(var(--logo-h) * 6.96); background: var(--logo-c); -webkit-mask: url(/shared/chockers-logo.svg) center / contain no-repeat; mask: url(/shared/chockers-logo.svg) center / contain no-repeat; }
@media (prefers-color-scheme: dark) { a.chockers-logo { --logo-c: #ff5045; } }
a.chockers-logo.chockers-logo-head { --logo-h: 24px; }
.chockers-foot { display: flex; justify-content: center; padding: var(--sp-5) var(--sp-4) var(--sp-4); }
.chockers-foot a { opacity: .9; }
.chockers-foot a:hover, .chockers-foot a:focus-visible { opacity: 1; }

/* Nothing looks broken: a text block with no text never renders (SPEC/order-mode.md). */
.page-footer p:empty, .demo-note:empty, .photo-credit:empty, .prep-note:empty { display: none; }

/* A note on one order line (kitchen board, waiter, order detail, and the customer status page): heavy bar and heavy type, the screen twin of the docket's note. */
.item-note { display: inline-block; margin-top: 2px; padding-left: 8px; border-left: 6px solid currentColor; font-weight: 900; white-space: pre-line; overflow-wrap: anywhere; }
