/* Avenzo customer app - one shell and one set of primitives for every customer page.
   Colours, type and radii come only from the design system tokens (/assets/ui/avenzo-tokens.css). */

:root {
  --cx-header-h: 60px;
  --cx-tabbar-h: 64px;
  /* v4: cards are lifted by a soft two-layer shadow instead of an outline. */
  --cx-shadow-card: 0 1px 2px rgba(23, 23, 23, 0.05), 0 6px 20px rgba(23, 23, 23, 0.07);
  --cx-tabbar-gap: 10px;
  --cx-width: 720px;
  --cx-width-wide: 1120px;
  --cx-gutter: 16px;
  /* Stacking order for the customer app, lowest to highest. Nothing else sets a z-index
     except inside its own component. */
  --cx-z-sticky: 40;    /* menu category rail */
  --cx-z-header: 60;    /* top header */
  --cx-z-tabbar: 65;    /* bottom navigation */
  --cx-z-cart: 70;      /* floating cart pill */
  --cx-z-sheet: 100;    /* sheet backdrop + panel (one stacking context) */
  --cx-z-toast: 120;
}

/* ---------- base ---------- */
body.cx {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font-ui); font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--bg);
}
.cx *, .cx *::before, .cx *::after { box-sizing: border-box; }
.cx a { color: inherit; }
.cx button { font: inherit; color: inherit; }
.cx h1, .cx h2, .cx h3, .cx p { margin: 0; }
.cx img { max-width: 100%; }
.cx-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cx-skip {
  position: absolute; left: 12px; top: -60px; z-index: var(--cx-z-toast); padding: 10px 14px;
  border-radius: 10px; background: var(--text); color: var(--bg) !important; text-decoration: none;
}
.cx-skip:focus { top: 12px; }
.cx-icon { width: 20px; height: 20px; flex: none; display: block; }

/* Access and shell, decided before paint by customer-boot.js:
   data-cx-auth    - "redirect": leaving before paint (nothing is shown);
                     "pending": first page of a tab, no session snapshot yet - the header and tab
                     bar render, the page content waits behind a skeleton until the session is
                     confirmed (never a blank screen, never private content before the check)
   data-cx-shell   - "authenticated" (the Avenzo customer app) or "guest" (table ordering only)
   data-cx-access  - "signed-in" pages (finishing an account) show no app navigation either */
html[data-cx-auth="redirect"] body { visibility: hidden; }
html[data-cx-auth="pending"] .cx-main { position: relative; }
html[data-cx-auth="pending"] .cx-main > * { visibility: hidden; }
html[data-cx-auth="pending"] .cx-main::before {
  content: ""; position: absolute; inset: 16px 16px auto; height: 260px; border-radius: 14px;
  animation: cx-skel-show 1ms linear 150ms both;
  background:
    linear-gradient(var(--surface-subtle), var(--surface-subtle)) 0 0 / 60% 32px no-repeat,
    linear-gradient(var(--surface-subtle), var(--surface-subtle)) 0 48px / 40% 18px no-repeat,
    linear-gradient(var(--surface-subtle), var(--surface-subtle)) 0 96px / 100% 72px no-repeat,
    linear-gradient(var(--surface-subtle), var(--surface-subtle)) 0 184px / 100% 72px no-repeat;
}
html[data-cx-shell="guest"] [data-cx-app],
html[data-cx-access="signed-in"] [data-cx-app] { display: none !important; }

/* Pages with the bottom tab bar leave room for it. */
body.cx--tabs { padding-bottom: calc(var(--cx-tabbar-h) + env(safe-area-inset-bottom)); }
html[data-cx-shell="guest"] body.cx--tabs, html[data-cx-access="signed-in"] body.cx--tabs { padding-bottom: 0; }
@media (min-width: 901px) { body.cx--tabs { padding-bottom: 0; } }

/* ---------- header ---------- */
.cx-header {
  position: sticky; top: 0; z-index: var(--cx-z-header);
  background: var(--bg); /* solid: scrolled content (orange controls) must never show through */
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.cx-header__in {
  display: flex; align-items: center; gap: 8px;
  max-width: var(--cx-width-wide); min-height: var(--cx-header-h); margin: 0 auto;
  padding: 0 max(var(--cx-gutter), env(safe-area-inset-right)) 0 max(var(--cx-gutter), env(safe-area-inset-left));
}
.cx-header__context {
  min-width: 0; overflow: hidden; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
  padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-2);
}
.cx-header__context[hidden] { display: none; }
.cx-back { margin-left: -10px; }
.cx-header__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.cx-nav { display: none; gap: 2px; margin-left: 16px; }
.cx-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-2); text-decoration: none;
}
.cx-nav a:hover { color: var(--text); background: var(--surface-subtle); }
.cx-nav a[aria-current="page"] { color: var(--text); background: var(--surface-subtle); }
@media (min-width: 901px) { .cx-nav { display: flex; } }

.cx-iconbtn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none;
}
.cx-iconbtn:hover { color: var(--text); background: var(--surface-subtle); }
.cx-scan-desktop { display: none !important; }
@media (min-width: 901px) {
  .cx-scan-desktop {
    display: inline-flex !important; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px;
    border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface);
    font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); text-decoration: none;
  }
  .cx-scan-desktop:hover { border-color: var(--brand); }
  .cx-scan-desktop .cx-icon { width: 18px; height: 18px; color: var(--brand-ink); }
}
.cx-account {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 6px;
  border-radius: 12px; text-decoration: none; color: var(--text); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.cx-account:hover { background: var(--surface-subtle); }
.cx-avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700;
}
.cx-signin { padding: 0 12px; color: var(--brand-ink); }

/* ---------- bottom tab bar (phones and tablets) ---------- */
.cx-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--cx-z-tabbar);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--cx-tabbar-h) + env(safe-area-inset-bottom));
  padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--border);
}
.cx-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--cx-tabbar-h); min-width: 44px; padding: 6px 2px 8px;
  font-size: 11.5px; font-weight: var(--fw-semibold); letter-spacing: 0.01em;
  color: var(--text-3); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.cx-tab .cx-icon { width: 22px; height: 22px; }
.cx-tab[aria-current="page"] { color: var(--text); }
.cx-tab[aria-current="page"] .cx-icon { color: var(--brand-ink); }
/* Scan QR: the primary action, centred, a solid mark that stays calm. */
.cx-tab--scan { justify-content: flex-start; padding-top: 0; color: var(--text-2); }
.cx-tab--scan .cx-scan-btn {
  display: grid; place-items: center; width: 52px; height: 52px; margin-top: -14px; margin-bottom: 1px;
  border-radius: 18px; background: var(--brand-fill); color: var(--text-on-brand);
  box-shadow: var(--shadow-md); border: 3px solid var(--surface);
}
.cx-tab--scan .cx-scan-btn .cx-icon { color: inherit; width: 22px; height: 22px; }
.cx-tab--scan[aria-current="page"] .cx-scan-btn { background: var(--brand-fill-hover); }
@media (min-width: 901px) { .cx-tabbar { display: none; } }

/* ---------- layout ---------- */
.cx-main {
  width: 100%; max-width: var(--cx-width); margin: 0 auto;
  padding: 20px max(var(--cx-gutter), env(safe-area-inset-right)) 40px max(var(--cx-gutter), env(safe-area-inset-left));
}
.cx-main--wide { max-width: var(--cx-width-wide); }
.cx-stack { display: flex; flex-direction: column; gap: 16px; }
.cx-stack--lg { gap: 28px; }
.cx-section { display: flex; flex-direction: column; gap: 12px; }
.cx-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cx-h1 { font-family: var(--font-display); font-size: clamp(26px, 6.4vw, 32px); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.cx-h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.cx-h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.cx-lead { font-size: 15.5px; color: var(--text-2); }
.cx-muted { color: var(--text-2); }
.cx-faint { color: var(--text-3); }
.cx-small { font-size: 14px; }
.cx-xs { font-size: 12.5px; }
.cx-link { color: var(--brand-ink) !important; font-weight: 600; text-decoration: none; }
.cx-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cx-dot { display: inline-block; width: 3px; height: 3px; margin: 0 6px 2px; border-radius: 50%; background: currentColor; opacity: 0.6; vertical-align: middle; }
.cx-num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-sm); padding: 0 18px; border: 1px solid transparent; border-radius: var(--r);
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.1; text-decoration: none !important; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background var(--fast) ease, border-color var(--fast) ease, transform var(--fast) ease;
}
.cx-btn:active:not(:disabled) { transform: scale(0.985); }
.cx-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.cx-btn--primary { color: var(--text-on-brand) !important; background: var(--brand-fill); }
.cx-btn--primary:hover:not(:disabled) { background: var(--brand-fill-hover); }
.cx-btn--secondary { color: var(--text) !important; background: var(--surface); border-color: var(--border-strong); }
.cx-btn--secondary:hover:not(:disabled) { background: var(--surface-subtle); }
.cx-btn--quiet { color: var(--text-2) !important; background: transparent; padding: 0 12px; }
.cx-btn--quiet:hover:not(:disabled) { color: var(--text) !important; background: var(--surface-subtle); }
.cx-btn--danger { color: var(--danger) !important; background: transparent; border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.cx-btn--lg { min-height: var(--control); font-size: 16px; padding: 0 20px; }
.cx-btn--block { width: 100%; }
.cx-btn .cx-icon { width: 18px; height: 18px; }
.cx-btn[aria-busy="true"] { cursor: progress; }
.cx-spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: cx-spin 0.7s linear infinite; flex: none;
}
@keyframes cx-spin { to { transform: rotate(360deg); } }

/* ---------- cards & rows ---------- */
.cx-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.cx-card--pad { padding: 16px; }
.cx-card--link { display: block; text-decoration: none; transition: border-color var(--fast) ease; }
.cx-card--link:hover { border-color: var(--border-strong); }
.cx-rows { display: flex; flex-direction: column; }
.cx-row {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 16px;
  text-decoration: none; background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.cx-row + .cx-row { border-top: 1px solid var(--border); }
button.cx-row:hover, a.cx-row:hover { background: var(--surface-subtle); }
.cx-row__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-subtle); color: var(--text-2); flex: none; }
.cx-row__body { flex: 1; min-width: 0; }
.cx-row__title { font-size: 15px; font-weight: 600; }
.cx-row__sub { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.cx-row__end { flex: none; color: var(--text-3); display: flex; align-items: center; gap: 6px; font-size: 14px; }

/* ---------- continue card (active context on Home) ---------- */
.cx-continue {
  display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--radius-lg);
}
.cx-continue:hover { border-color: var(--border-strong); border-left-color: var(--brand); }
.cx-continue__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.cx-continue__body { flex: 1; min-width: 0; }
.cx-continue__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-ink); }
.cx-continue__title { font-size: 16px; font-weight: 600; margin-top: 2px; }
.cx-continue__sub { font-size: 14px; color: var(--text-2); }

/* ---------- search & chips ---------- */
.cx-search { position: relative; }
.cx-search .cx-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.cx-search input {
  width: 100%; height: 48px; padding: 0 14px 0 44px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); outline: none;
  -webkit-appearance: none; appearance: none;
}
.cx-search input::placeholder { color: var(--text-3); }
.cx-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.cx-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.cx-chips::-webkit-scrollbar { display: none; }
.cx-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; text-decoration: none;
}
.cx-chip[aria-pressed="true"], .cx-chip[aria-current="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.cx-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* 36px chips sit in a 44px touch row. */
.cx-chip-row { min-height: 44px; display: flex; align-items: center; }

/* ---------- restaurant cards ---------- */
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cx-rcard { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cx-rcard:hover { border-color: var(--border-strong); }
.cx-rcard__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-subtle); display: grid; place-items: center; overflow: hidden; }
.cx-rcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-rcard__initial { font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--text-3); }
.cx-rcard__status { position: absolute; left: 10px; top: 10px; }
.cx-rcard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.cx-rcard__name { font-size: 16px; font-weight: 600; }
.cx-rcard__meta { font-size: 13.5px; color: var(--text-2); }
.cx-rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text); }
.cx-rating .cx-icon { width: 14px; height: 14px; color: var(--brand); }
.cx-status-open { background: var(--success-soft); color: var(--success); }
.cx-status-closed { background: var(--surface-subtle); color: var(--text-2); }

/* ---------- restaurant identity ---------- */
.cx-rhead { display: flex; flex-direction: column; gap: 8px; }
.cx-rhead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--text-2); }
.cx-veg { display: inline-flex; align-items: center; gap: 6px; }
.cx-foodmark { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; flex: none; }
.cx-foodmark::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cx-foodmark--veg { color: var(--success); }
.cx-foodmark--nonveg { color: var(--danger); }
.cx-foodmark--egg { color: var(--warning); }

/* ---------- service mode choice ---------- */
.cx-modes { display: flex; flex-direction: column; gap: 10px; }
.cx-mode {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 14px 16px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); text-decoration: none;
}
.cx-mode:hover { border-color: var(--text-3); }
.cx-mode:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cx-mode__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-subtle); color: var(--text); flex: none; }
/* A restaurant with one way to order: the mode and one prominent action (no choice screen). */
.cx-single-mode { display: flex; flex-direction: column; gap: 16px; }
.cx-single-mode__head { display: flex; align-items: center; gap: 14px; }
.cx-single-mode .cx-btn .cx-icon { margin-left: 4px; }
.cx-mode__body { flex: 1; min-width: 0; }
.cx-mode__title { font-size: 16px; font-weight: 600; }
.cx-mode__desc { font-size: 14px; color: var(--text-2); }
.cx-mode .cx-chev { color: var(--text-3); }

/* ---------- menu ---------- */
.cx-context { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.cx-context .cx-icon { width: 16px; height: 16px; color: var(--brand-ink); }
.cx-menu-tools { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
/* Food type is a filter, so it is a segmented control - visibly different from category navigation. */
.cx-seg { display: inline-flex; align-self: flex-start; max-width: 100%; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-sunken, var(--surface-subtle)); overflow-x: auto; scrollbar-width: none; }
.cx-seg::-webkit-scrollbar { display: none; }
.cx-seg button {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 9px; background: transparent; color: var(--text-2);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer;
}
.cx-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.cx-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
/* Categories: one quiet rail that stays under the app header while the menu scrolls. */
.cx-cats {
  position: sticky; top: calc(var(--cx-header-h) + env(safe-area-inset-top)); z-index: var(--cx-z-sticky);
  margin: 10px calc(-1 * var(--cx-gutter)) 0; padding: 8px var(--cx-gutter);
  background: var(--bg); border-bottom: 1px solid transparent;
}
.cx-cats[data-stuck="true"] { border-bottom-color: var(--border); }
.cx-cats .cx-chip { min-height: 36px; }
.cx-cat { scroll-margin-top: calc(var(--cx-header-h) + 64px); }
.cx-cat__title { font-family: var(--font-display); font-size: 18px; font-weight: 600; padding: 18px 0 6px; }
.cx-items { display: flex; flex-direction: column; }
.cx-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cx-item:last-child { border-bottom: 0; }
.cx-item__name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.cx-item__desc { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-item__price { font-size: 15px; font-weight: 600; margin-top: 2px; }
.cx-item__note { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.cx-item__side { flex: none; width: 104px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cx-item__open { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; border-radius: 8px; }
.cx-item__open:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.cx-item[data-unavailable="true"] .cx-item__name, .cx-item[data-unavailable="true"] .cx-item__price { color: var(--text-3); }
.cx-item[data-unavailable="true"] .cx-food img { opacity: 0.5; filter: grayscale(1); }

/* ---------- dish images ---------- */
/* Every dish shows its own photo, or a neutral plate - never another dish's picture. Fixed boxes
   (aspect-ratio) so images load without shifting the layout. */
.cx-food { display: block; flex: none; overflow: hidden; border-radius: 12px; background: var(--surface-subtle); }
.cx-food img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cx-food--none { display: grid; place-items: center; color: var(--text-3); }
.cx-food--none .cx-icon { width: 40%; height: 40%; max-width: 40px; max-height: 40px; opacity: 0.7; }
.cx-food--item { width: 104px; height: 88px; }
.cx-food--sheet { width: 100%; aspect-ratio: 16 / 10; border-radius: 14px; }
.cx-food--sheet.cx-food--none { aspect-ratio: 16 / 5; }
.cx-food--line { width: 52px; height: 52px; border-radius: 10px; }
@media (min-width: 700px) { .cx-food--item { width: 120px; height: 100px; } .cx-item__side { width: 120px; } }

/* ---------- special instructions ---------- */
.cx-instr { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); }
.cx-instr__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cx-instr__summary { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.cx-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: var(--fw-medium, 500); cursor: pointer;
}
.cx-toggle .cx-icon { width: 16px; height: 16px; display: none; }
.cx-toggle[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: var(--fw-semibold); }
.cx-toggle[aria-pressed="true"] .cx-icon { display: block; }
.cx-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- cart lines ---------- */
.cx-cline { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cx-cline:last-child { border-bottom: 0; }
.cx-cline__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-cline__name { font-weight: 600; font-size: 15px; }
.cx-cline__meta { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.cx-cline__price { font-weight: 600; text-align: right; }
.cx-cline__actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 4px 0 0 -8px; }
.cx-cline__actions .cx-qty { margin-left: auto; }
.cx .cx-linkbtn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; border: 0; border-radius: 8px;
  background: none; color: var(--brand-ink); font-size: 14px; font-weight: var(--fw-semibold); cursor: pointer;
}
.cx .cx-linkbtn:hover { background: var(--surface-subtle); }
.cx .cx-linkbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.cx .cx-linkbtn--quiet { color: var(--text-2); }
.cx-add {
  min-width: 96px; min-height: 40px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--brand-ink);
  font-size: 15px; font-weight: 700;
}
.cx-add:hover:not(:disabled) { border-color: var(--brand); }
.cx-add:disabled { color: var(--text-3); cursor: not-allowed; }
.cx-qty { display: inline-flex; align-items: center; height: 40px; border-radius: 10px; background: var(--brand-fill); color: var(--text-on-brand); overflow: hidden; }
.cx-qty button { width: 40px; height: 40px; border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.cx-qty button:hover { background: color-mix(in srgb, #000 12%, transparent); }
.cx-qty button .cx-icon { width: 16px; height: 16px; }
.cx-qty output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-qty--quiet { background: var(--surface-subtle); color: var(--text); }

/* ---------- sheets (bottom sheet on phones, centred dialog on wider screens) ---------- */
.cx-sheet { position: fixed; inset: 0; z-index: var(--cx-z-sheet); display: flex; align-items: flex-end; justify-content: center; }
.cx-sheet[hidden] { display: none; }
.cx-sheet__backdrop { position: absolute; inset: 0; background: var(--overlay); animation: cx-fade var(--med) var(--ease); }
.cx-sheet__panel {
  position: relative; width: 100%; max-width: 560px; max-height: min(92vh, 92dvh); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  padding-bottom: env(safe-area-inset-bottom); animation: cx-rise var(--med) var(--ease); outline: none;
}
.cx-sheet__head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 6px 20px; }
.cx-sheet__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; flex: 1; min-width: 0; }
.cx-sheet__body { overflow-y: auto; padding: 6px 20px 20px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cx-sheet__foot { padding: 12px 20px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) {
  .cx-sheet { align-items: center; padding: 24px; }
  .cx-sheet__panel { border-radius: 20px; padding-bottom: 0; }
}
@keyframes cx-fade { from { opacity: 0; } }
@keyframes cx-rise { from { transform: translateY(16px); opacity: 0; } }
body.cx-sheet-open { overflow: hidden; }

/* ---------- fields ---------- */
.cx-field { display: flex; flex-direction: column; gap: 8px; }
.cx-label { font-size: 14px; font-weight: 600; }
.cx-input, .cx-textarea {
  width: 100%; min-height: 50px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--field); border: 1px solid var(--border-strong); border-radius: var(--r); outline: none;
  -webkit-appearance: none; appearance: none;
}
.cx-textarea { min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.cx-input:focus, .cx-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); background: var(--surface); }
.cx-input[aria-invalid="true"] { border-color: var(--danger); }
.cx-input::placeholder, .cx-textarea::placeholder { color: var(--text-3); }
.cx-affix { position: relative; }
.cx-affix__prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.cx-affix .cx-input { padding-left: 50px; }
.cx-hint { font-size: 13px; color: var(--text-2); }
.cx-error { font-size: 13.5px; font-weight: 500; color: var(--danger); }
.cx-error:empty { display: none; }
.cx-alert { padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--danger); background: var(--danger-soft); }
.cx-alert:empty { display: none; }
.cx-alert[data-tone="info"] { color: var(--text); background: var(--surface-subtle); }
.cx-alert[data-tone="success"] { color: var(--success); background: var(--success-soft); }
.cx-hold { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 8px 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--text); background: var(--brand-soft, var(--surface-subtle)); }

/* ---------- modifiers ---------- */
.cx-group { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--border); }
.cx-group > legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; }
.cx-group > legend + * { clear: both; }
.cx-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cx-group__name { font-size: 15px; font-weight: 600; }
.cx-group__rule { font-size: 12.5px; color: var(--text-3); }
.cx-group__rule[data-required="true"] { color: var(--brand-ink); font-weight: 600; }
.cx-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; font-size: 15px; }
.cx-opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-fill); flex: none; }
.cx-opt__name { flex: 1; }
.cx-opt__price { color: var(--text-2); font-size: 14px; }

/* ---------- order lines & totals ---------- */
.cx-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cx-line:last-child { border-bottom: 0; }
.cx-line__body { flex: 1; min-width: 0; }
.cx-line__name { font-weight: 600; font-size: 15px; }
.cx-line__meta { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.cx-line__end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cx-totals { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.cx-totals div { display: flex; justify-content: space-between; gap: 12px; }
.cx-totals .cx-total { font-size: 17px; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }

/* ---------- status ---------- */
.cx-status-hero { display: flex; flex-direction: column; gap: 6px; }
/* Status: the order number is what customers and staff refer to, so it leads. */
.cx-order-no { font-family: var(--font-display); font-size: clamp(28px, 7vw, 34px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cx-status-hero__state { font-size: 18px; font-weight: 600; color: var(--brand-ink); }
/* Collection / pickup code: secondary, masked until asked for. */
.cx-codebox { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cx-codebox__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-codebox__label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.cx-codebox__value { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: 0.12em; line-height: 1.2; }
.cx-codebox__value[data-masked="true"] { color: var(--text-3); letter-spacing: 0.2em; }
/* Order lines on the status page. */
.cx-oline { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cx-oline:last-of-type { border-bottom: 0; }
.cx-oline__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-code { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; text-align: center; }
.cx-code__label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.cx-code__value { font-family: var(--font-display); font-size: 48px; font-weight: 600; letter-spacing: 0.08em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cx-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cx-kv dt { font-size: 12.5px; color: var(--text-2); }
.cx-kv dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.cx-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-actions > :only-child { grid-column: 1 / -1; }

/* ---------- empty, skeleton, toast ---------- */
.cx-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; text-align: center; }
.cx-empty__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-subtle); color: var(--text-2); }
.cx-empty__icon .cx-icon { width: 24px; height: 24px; }
/* Skeletons stay invisible for their first 150 ms: content that arrives quickly replaces them
   without a skeleton ever flashing; slower content shows a layout-matched placeholder. */
.cx-skel { background: linear-gradient(90deg, var(--surface-subtle), var(--surface-sunken), var(--surface-subtle)); background-size: 200% 100%; animation: cx-skel-show 1ms linear 150ms both, cx-shimmer 1.4s linear infinite; border-radius: 10px; }
@keyframes cx-shimmer { to { background-position: -200% 0; } }
@keyframes cx-skel-show { from { opacity: 0; } to { opacity: 1; } }
.cx-toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--cx-toast-offset, 0px) + env(safe-area-inset-bottom)); z-index: var(--cx-z-toast);
  transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--text); color: var(--bg); font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lg);
}
body.cx--tabs .cx-toast { --cx-toast-offset: calc(var(--cx-tabbar-h) + var(--cx-tabbar-gap)); }
@media (min-width: 901px) { body.cx--tabs .cx-toast { --cx-toast-offset: 0px; } }

/* ---------- scan ---------- */
.cx-scan-view { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 420px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #0D0D0D; }
.cx-scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-scan-frame { position: absolute; inset: 18%; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 20px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); pointer-events: none; }
.cx-scan-idle { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #F6F4F1; }

/* ---------- print (bill) ---------- */
@media print {
  .cx-header, .cx-tabbar, .cx-no-print { display: none !important; }
  body.cx { background: #fff; padding: 0 !important; }
  .cx-main { padding: 0; max-width: none; }
  .cx-card { border: 0; }
}

/* ---------- bill ---------- */
.cx-bill { display: flex; flex-direction: column; gap: 18px; }
.cx-bill__head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; border-bottom: 1px dashed var(--border-strong); }
.cx-bill__doc { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.cx-bill__foot { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px dashed var(--border-strong); text-align: center; }
@media print { .cx-bill { gap: 12px; } }
.cx-bill__items--collapsed .cx-line[data-extra] { display: none; }
@media print { .cx-bill__items--collapsed .cx-line[data-extra] { display: flex; } }
/* ---------- page transitions (same-origin MPA navigations) ----------
   The header and tab bar keep stable names, so they stay put between pages; only the main content
   moves: the old page fades out quickly, the new one fades in with a small rise. The root crossfade
   is off, so there is never a white/black flash or both pages at once. No motion when reduced. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .cx-header { view-transition-name: cx-header; }
  .cx-tabbar { view-transition-name: cx-tabbar; }
  .cx-main { view-transition-name: cx-main; }
  ::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  ::view-transition-group(cx-header), ::view-transition-group(cx-tabbar), ::view-transition-group(cx-main) { animation: none; }
  /* Old and new shell stay still and stacked (the new, opaque one on top): never a gap. */
  ::view-transition-old(cx-header), ::view-transition-old(cx-tabbar),
  ::view-transition-new(cx-header), ::view-transition-new(cx-tabbar) { animation: none; }
  ::view-transition-old(cx-main) { animation: cx-vt-out 80ms ease-out both; }
  ::view-transition-new(cx-main) { animation: cx-vt-in 170ms cubic-bezier(0.2, 0.7, 0.2, 1) 50ms both; }
  ::view-transition-image-pair(cx-main) { isolation: auto; }
}
@keyframes cx-vt-out { to { opacity: 0; } }
@keyframes cx-vt-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- floating cart pill (the only cart affordance outside the cart sheet) ---------- */
.cx .cx-cartpill {
  position: fixed; z-index: var(--cx-z-cart);
  left: max(16px, env(safe-area-inset-left)); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 56px; padding: 12px 18px;
  border: 1px solid var(--brand-fill); border-radius: var(--radius-md); cursor: pointer;
  background: var(--brand-fill); color: var(--text-on-brand); box-shadow: var(--shadow-lg);
  font: inherit; font-weight: var(--fw-semibold); -webkit-tap-highlight-color: transparent;
}
.cx .cx-cartpill[hidden] { display: none; }
.cx .cx-cartpill .cx-icon { width: 22px; height: 22px; color: currentColor; }
.cx-cartpill__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--brand-fill); color: var(--text-on-brand); font-size: 13px; font-weight: 700; }
.cx-cartpill__total { font-size: 15.5px; }
.cx .cx-cartpill:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 900px) {
  html:not([data-cx-shell="guest"]):not([data-cx-access="signed-in"]) body.cx--tabs .cx-cartpill { bottom: calc(var(--cx-tabbar-h) + var(--cx-tabbar-gap) + env(safe-area-inset-bottom) + 14px); }
  html:not([data-cx-shell="guest"]):not([data-cx-access="signed-in"]) body.cx--tabs.cx--has-cart .cx-toast { --cx-toast-offset: calc(var(--cx-tabbar-h) + var(--cx-tabbar-gap) + 66px); }
}
body.cx--has-cart .cx-main { padding-bottom: 96px; }
body.cx-sheet-open .cx-cartpill { visibility: hidden; }

/* ---------- Orders tab: a small dot on the icon, never a tile ---------- */
.cx-tab.cx-has-dot, .cx-nav a.cx-has-dot { position: relative; }
.cx-active-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-fill); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.cx-tab .cx-active-dot { top: 11px; left: calc(50% + 7px); }
.cx-nav .cx-active-dot { top: 6px; right: 2px; box-shadow: none; }

/* ---------- Home ---------- */
.cx-home-hero { display: flex; flex-direction: column; gap: 6px; }
.cx-again { display: flex; flex-direction: column; gap: 10px; }
.cx-again__item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; }
.cx-again__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cx-again__dishes { font-size: 14.5px; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cx-again__cta { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: 14px; font-weight: var(--fw-semibold); color: var(--brand-ink); }
.cx-again__cta .cx-icon { width: 16px; height: 16px; }
.cx-usuals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-usual { display: flex; flex-direction: column; gap: 4px; min-height: 76px; padding: 14px 16px; text-decoration: none; }
.cx-usual__name { font-weight: 600; overflow-wrap: anywhere; }
.cx-usual__meta { font-size: 13px; color: var(--text-2); }
@media (min-width: 700px) { .cx-usuals { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cx-welcome {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 28px 22px 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border);
}
.cx-welcome[hidden] { display: none; }
.cx-welcome__mark { width: 44px; height: auto; margin-bottom: 6px; }
.cx-welcome .cx-btn { margin-top: 8px; }

/* ---------- cart sheet ---------- */
.cx-sheet__sub { font-size: 14px; color: var(--text-2); margin: -2px 0 6px; }
.cx-cline > .cx-food { grid-row: span 2; }
.cx-cline__qtyrow { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.cx-cline__links { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 0 4px; margin: 2px 0 0 -8px; }
.cx .cx-cline .cx-linkbtn { min-height: 44px; }
.cx-cline__instr { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; padding: 14px; border-radius: 14px; background: var(--surface-subtle); }
.cx-cline__instr[hidden] { display: none; }
.cx-instr__label { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.cx-cline__instr { container-type: inline-size; }
.cx-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@container (min-width: 380px) { .cx-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cx-choice {
  min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 14px; font-weight: var(--fw-medium, 500);
}
.cx-choice[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: var(--fw-semibold); }
.cx-choice:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cx-cline__instr .cx-toggle { min-height: 44px; }
.cx-cline__instr .cx-textarea { min-height: 72px; background: var(--surface); }
.cx-cline__instr .cx-btn { align-self: flex-end; }

/* ---------- payment step ---------- */
.cx-paysum { display: flex; flex-direction: column; gap: 4px; }
.cx-paysum__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cx-paysum__total { font-family: var(--font-display); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-paymethods { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cx-paymethods legend { padding: 0; margin-bottom: 10px; }
.cx-paymethod { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); cursor: pointer; }
.cx-paymethod:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.cx-paymethod input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-fill); flex: none; }
.cx-paymethod__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-subtle); color: var(--text-2); flex: none; }
.cx-paymethod__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cx-paymethod__title { font-weight: 600; }
.cx-paymethod__sub { font-size: 13.5px; color: var(--text-2); }
.cx-paybar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; padding-top: 8px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (max-width: 900px) {
  html:not([data-cx-shell="guest"]):not([data-cx-access="signed-in"]) body.cx--tabs .cx-paybar { bottom: calc(var(--cx-tabbar-h) + var(--cx-tabbar-gap) + env(safe-area-inset-bottom) + 12px); }
}

/* ---------- order status (track) ---------- */
.cx-track-top { display: flex; flex-direction: column; gap: 4px; }
.cx-track-top__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cx-track-top__row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.cx-track-top__when, .cx-track-top__total { flex: none; font-variant-numeric: tabular-nums; }
.cx-track-top__when { font-size: 14px; color: var(--text-2); }
.cx-track-top__total { font-weight: 700; font-size: 17px; }
.cx-track-top__where { font-size: 15px; color: var(--text-2); }
.cx-hero { display: flex; align-items: center; gap: 16px; }
.cx-hero__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cx-hero__state { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.2; }
.cx-hero__line { color: var(--text-2); font-size: 15px; }
.cx-hero__progress { height: 3px; border-radius: 3px; background: var(--border); margin-top: 16px; overflow: hidden; }
.cx-hero__progress span { display: block; height: 100%; background: var(--brand-fill); border-radius: inherit; transition: width var(--med) var(--ease); }
.cx-orb { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; }
.cx-orb::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-fill); }
.cx-orb::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; }
.cx-orb[data-tone="done"] { background: var(--success-soft); }
.cx-orb[data-tone="done"]::after { background: var(--success); }
.cx-orb[data-tone="off"] { background: var(--surface-subtle); }
.cx-orb[data-tone="off"]::after { background: var(--text-3); }
@media (prefers-reduced-motion: no-preference) {
  .cx-orb[data-tone="live"]::before { animation: cx-orb 2.2s var(--ease) infinite; }
  .cx-orb[data-tone="live"]::after { animation: cx-orb-core 2.2s ease-in-out infinite; }
}
@keyframes cx-orb { 0% { transform: scale(0.7); opacity: 0.55; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes cx-orb-core { 50% { transform: scale(0.85); } }
.cx-hero__pay { font-size: 14px; font-weight: 600; margin-top: 2px; }
.cx .cx-linkbtn[data-items-toggle] { margin: 4px 0 0 -8px; }
.cx-item--spot { animation: cx-spot 1.6s var(--ease) 1; border-radius: 12px; }
@keyframes cx-spot { 0%, 40% { box-shadow: 0 0 0 3px var(--ring); background: var(--brand-soft); } 100% { box-shadow: 0 0 0 0 transparent; background: transparent; } }
@media (prefers-reduced-motion: reduce) { .cx-item--spot { animation: none; box-shadow: 0 0 0 2px var(--ring); } }

/* ---------- Customer Experience v3: price promise, table bar, easy mode (theme tokens only) ---------- */
.avz-promise { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); background: var(--success-soft); color: var(--text); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.avz-promise > svg { flex: none; width: 20px; height: 20px; color: var(--success); margin-top: 1px; }
.avz-promise strong { display: block; font-weight: var(--fw-semibold); }
.avz-promise span { color: var(--text-2); }
.avz-tablebar { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: var(--radius-md); background: var(--text); color: var(--bg) !important; text-decoration: none !important; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.avz-tablebar__dot { flex: none; width: 8px; height: 8px; border-radius: 99px; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.avz-tablebar__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avz-tablebar__total { font-variant-numeric: tabular-nums; font-weight: var(--fw-bold); }
:root[data-easy="1"] body { zoom: 1.15; }

/* ---------- Home (v3): now, quick start, open now, how it works ---------- */
.cx-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cx-now { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--text); color: var(--bg) !important; text-decoration: none; }
.cx-now__dot { flex: none; width: 10px; height: 10px; border-radius: 99px; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.cx-now__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cx-now__title { font-weight: 700; }
.cx-now__sub { font-size: 14px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cx-quick a { text-decoration: none; color: var(--text) !important; border-radius: var(--radius-lg); }
.cx-quick__main { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--brand-fill); color: #fff !important; min-height: 84px; }
.cx-quick__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.18); }
.cx-quick__icon .cx-icon { width: 28px; height: 28px; }
.cx-quick__text { display: flex; flex-direction: column; gap: 2px; }
.cx-quick__text strong { font-size: 19px; }
.cx-quick__text span { font-size: 14px; opacity: .92; }
.cx-quick__alt { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; min-height: 72px; background: var(--surface); border: 1px solid var(--border); }
.cx-quick__alt strong { font-size: 16px; }
.cx-quick__alt span { font-size: 13px; color: var(--text-2); }
.cx-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.cx-place { flex: 0 0 74%; max-width: 280px; scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--text) !important; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--cx-shadow-card); }
.cx-place__media { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: var(--surface-subtle); }
.cx-place__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cx-place__initial { font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--text-3); }
.cx-place__badge, .cx-rcard__status .avz-badge { background: var(--surface) !important; box-shadow: var(--shadow-sm); }
.cx-place__badge { position: absolute; left: 10px; top: 10px; }
.cx-place__body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.cx-place__name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-place__meta { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: how; }
.cx-how li { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; counter-increment: how; }
.cx-how li::before { content: counter(how); grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.cx-how span { color: var(--text-2); font-size: 14px; }


/* Profile hub (v3): short main screen, sections open their own view. */
.cx-profile-id { display: flex; align-items: center; gap: 16px; }
.cx-subhead { display: flex; align-items: center; gap: 8px; margin-left: -8px; }
.cx-row--danger { width: 100%; background: var(--surface); border: 0; font: inherit; text-align: left; cursor: pointer; }
.cx-row--danger .cx-row__title { color: var(--danger); }
.cx-switch { flex: none; width: 22px; height: 22px; accent-color: var(--brand-fill); }

/* ---------- v3: segmented control, step list (customer pages only) ---------- */
.avz-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-subtle); }
.avz-seg button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-2); cursor: pointer; }
.avz-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-strong); }
.avz-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.avz-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.avz-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-sm); color: var(--text-2); }
.avz-steps li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 99px; background: var(--surface-sunken); }
.avz-steps li[data-state="done"] { color: var(--text); }
.avz-steps li { position: relative; }
.avz-steps li[data-state="done"]::before { background: var(--success); }
.avz-steps li[data-state="done"]::after { content: ""; position: absolute; left: 8px; top: 5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.avz-steps li[data-state="now"] { color: var(--text); font-weight: var(--fw-semibold); }
.avz-steps li[data-state="now"]::before { background: var(--surface); border: 3px solid var(--brand-fill); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ---------- v4 visual layer ----------
   Shadow cards (outline only in dark mode, where shadows do not read), softer chips, a home
   search bar, Veg mode switch and a floating tab bar. Layout and behaviour are unchanged. */
.cx-card, .cx-rcard, .cx-continue, .cx-quick__alt { border-color: transparent; box-shadow: var(--cx-shadow-card); }
.cx-continue { border-left: 3px solid var(--brand); }
.cx-card--link:hover, .cx-rcard:hover { border-color: transparent; box-shadow: var(--cx-shadow-card), 0 0 0 1px var(--border-strong); }
.cx-rcard { border-radius: var(--radius-xl); }
.cx-rcard__media { aspect-ratio: 16 / 10; }
.cx-rcard__name { font-size: 17px; font-weight: 700; }
:root[data-theme="dark"] .cx-card, :root[data-theme="dark"] .cx-rcard, :root[data-theme="dark"] .cx-place,
:root[data-theme="dark"] .cx-quick__alt, :root[data-theme="dark"] .cx-continue { box-shadow: none; border: 1px solid var(--border); }
:root[data-theme="dark"] .cx-continue { border-left: 3px solid var(--brand); }

.cx-chip { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.cx-chip[aria-pressed="true"], .cx-chip[aria-current="true"] { box-shadow: none; }

.cx-searchbar {
  display: flex; align-items: center; gap: 10px; height: 52px; margin-top: 14px; padding: 0 16px;
  border-radius: var(--radius-pill); background: var(--surface); box-shadow: var(--cx-shadow-card);
  color: var(--text-3) !important; font-size: 15.5px; text-decoration: none;
}
.cx-searchbar .cx-icon { color: var(--text-2); }
:root[data-theme="dark"] .cx-searchbar { box-shadow: none; border: 1px solid var(--border-strong); }

.cx-vegmode { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-top: 10px; padding: 8px 4px; cursor: pointer; }
.cx-vegmode__text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.cx-vegmode__text strong { font-size: 15px; }
.cx-vegmode__text span { font-size: 13px; color: var(--text-2); }
.cx-vegmode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cx-switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--border-strong); transition: background var(--fast) ease; }
.cx-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--fast) ease; }
.cx-vegmode input:checked + .cx-switch { background: var(--success); }
.cx-vegmode input:checked + .cx-switch::after { transform: translateX(18px); }
.cx-vegmode input:focus-visible + .cx-switch { outline: 2px solid var(--brand); outline-offset: 2px; }

/* No dish photos yet: a short warm panel with the initial, never a tall empty box. */
.cx-place__media.cx-media--none, .cx-rcard__media.cx-media--none { aspect-ratio: 2 / 1; background: linear-gradient(135deg, var(--brand-soft), var(--surface-subtle)); }
.cx-media--none .cx-place__initial, .cx-media--none .cx-rcard__initial { font-size: 40px; color: var(--brand-ink); opacity: 0.85; }
.cx-rail { padding: 4px 4px 18px; margin: -4px -4px -14px; scroll-padding-left: 4px; }

/* ---------- v4: restaurant, menu, sheets ---------- */
.cx-cover { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 6px; border-radius: var(--radius-xl); background: var(--surface-subtle); box-shadow: var(--cx-shadow-card); }
.cx-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cx-cover.cx-media--none { aspect-ratio: 3 / 1; box-shadow: none; background: linear-gradient(135deg, var(--brand-soft), var(--surface-subtle)); }
.cx-cover__initial { font-family: var(--font-display); font-size: 44px; font-weight: 600; color: var(--brand-ink); opacity: 0.85; }
.cx-mode { border-color: transparent; box-shadow: var(--cx-shadow-card); }
.cx-mode:hover { border-color: var(--border-strong); }
.cx-mode__icon { background: var(--brand-soft); color: var(--brand-ink); }
:root[data-theme="dark"] .cx-mode { box-shadow: none; border-color: var(--border); }

.cx-item { padding: 18px 0; border-bottom-style: dashed; }
.cx-item__name { font-size: 16.5px; }
.cx-item__price { margin-top: 0; }
.cx-item__desc { margin-top: 2px; }
.cx-item__tag { align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--brand-ink); background: var(--brand-soft); }
.cx-food--item { width: 116px; height: 104px; border-radius: 16px; }
.cx-item__side { width: 116px; gap: 0; }
/* The Add button sits on the photo's lower edge, the familiar place to find it. */
.cx-item__side [data-control] { position: relative; margin-top: -20px; }
.cx-item__side .cx-food--none + [data-control], .cx-item__side--plain [data-control] { margin-top: 0; }
.cx-item__side--plain { width: auto; align-self: center; }
@media (min-width: 700px) { .cx-item__side--plain { width: auto; } }
.cx-add { min-width: 92px; border-color: var(--border); box-shadow: 0 2px 8px rgba(23, 23, 23, 0.12); text-transform: uppercase; letter-spacing: 0.04em; font-size: 14px; }
.cx-qty { box-shadow: 0 2px 8px rgba(23, 23, 23, 0.16); }
@media (min-width: 700px) { .cx-food--item { width: 132px; height: 116px; } .cx-item__side { width: 132px; } }

.cx-sheet__panel { border-radius: 24px 24px 0 0; }
.cx-sheet__panel::before { content: ""; display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 99px; background: var(--border-strong); }
.cx-food--sheet { border-radius: 18px; }
@media (min-width: 640px) { .cx-sheet__panel { border-radius: 24px; } .cx-sheet__panel::before { display: none; } }
.cx-food--sheet.cx-food--none { display: none; }

/* ---------- v3 B2: dish facts and table fit ---------- */
.cx-spice { display: inline-flex; gap: 2px; vertical-align: middle; }
.cx-spice__dot { width: 6px; height: 10px; border-radius: 3px; background: var(--border-strong); }
.cx-spice__dot.is-on { background: var(--danger); }
.cx-item__facts { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.cx-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; color: var(--text-2); }
.cx-facts .cx-spice { margin-right: 4px; }
.cx-factbox { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; margin-top: 6px; border-radius: 14px; background: var(--surface-subtle); }
.cx-fit { align-self: flex-start; font-size: 12.5px; font-weight: 700; }
.cx-fit--no { color: var(--danger); }
.cx-factbox .cx-fit { font-size: 14px; }
.cx-prefs-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- table welcome (guest starts the table) ---------- */
.cx-welcome-table { display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin: clamp(16px, 6vh, 64px) auto 0; padding: 24px 20px; border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--cx-shadow-card); }
.cx-welcome-table__eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13px; font-weight: 700; }
.cx-welcome-table__eyebrow .cx-icon { width: 16px; height: 16px; }
.cx-prefs-chips .cx-chip[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.cx-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
:root[data-theme="dark"] .cx-welcome-table { box-shadow: none; border: 1px solid var(--border); }
.cx-tablepick { flex-direction: column; gap: 0; line-height: 1.2; }
.cx-tablepick small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.cx-tablepick.is-in-use { background: var(--surface-subtle); }

/* ---------- responsive pass (phones, tablets, laptops, wide screens) ---------- */
/* The header lines up with the page under it: a reading column on most pages, wide on lists. */
@media (min-width: 901px) {
  .cx-header__in { max-width: calc(var(--cx-width) + 160px); }
  body:has(.cx-main--wide) .cx-header__in, body:has(.cx-main--menu) .cx-header__in { max-width: var(--cx-width-wide); }
  .cx-back { margin-left: -10px; }
}
/* Large screens: a slightly wider reading column. */
@media (min-width: 1200px) { :root { --cx-width: 760px; } }

/* Tablets: a little more room at the sides. */
@media (min-width: 600px) and (max-width: 900px) { .cx-main { padding-left: 32px; padding-right: 32px; } }

/* Very small phones (320-359px): tighter gutters and tab labels that fit. */
@media (max-width: 359px) {
  :root { --cx-gutter: 12px; --cx-tabbar-gap: 6px; }
  .cx-tab { font-size: 10.5px; }
  .cx-actions { grid-template-columns: minmax(0, 1fr); }
  .cx-add { min-width: 80px; }
}

/* The cart pill keeps phone proportions on tablets and desktops, centred over the page. */
@media (min-width: 600px) {
  .cx .cx-cartpill { left: 50%; right: auto; width: min(480px, calc(100vw - 32px)); transform: translateX(-50%); border-radius: var(--radius-pill); }
}
@media (min-width: 901px) { .cx .cx-cartpill { bottom: 24px; } }

/* Narrow phones: two action buttons per row still fit on one line each. */
@media (max-width: 400px) {
  .cx-actions .cx-btn { padding-left: 10px; padding-right: 10px; font-size: 14.5px; gap: 6px; white-space: nowrap; }
}

/* Long words and names never push a page sideways. */
.cx-h1, .cx-h2, .cx-h3, .cx-item__name, .cx-row__title, .cx-line__name { overflow-wrap: anywhere; }

/* Menu on laptops and desktops: categories in a column on the left, dishes in two columns. */
@media (min-width: 1100px) {
  .cx-main--menu {
    max-width: var(--cx-width-wide);
    display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 48px; align-items: start;
  }
  .cx-main--menu > * { grid-column: 1 / -1; }
  .cx-main--menu > .cx-cats:not([hidden]) {
    grid-column: 1; position: sticky; top: calc(var(--cx-header-h) + 20px);
    margin: 0; padding: 4px 0; border: 0; background: transparent;
  }
  .cx-main--menu > .cx-cats:not([hidden]) ~ #menu { grid-column: 2; }
  .cx-main--menu .cx-cats .cx-chips { flex-direction: column; flex-wrap: nowrap; overflow: visible; gap: 2px; padding: 0; mask-image: none; -webkit-mask-image: none; }
  .cx-main--menu .cx-cats .cx-chip { justify-content: flex-start; width: 100%; min-height: 40px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; text-align: left; white-space: normal; }
  .cx-main--menu > .cx-cats:not([hidden]), .cx-main--menu > .cx-cats:not([hidden]) ~ #menu { margin-top: 18px; }
  .cx-main--menu .cx-cats .cx-chip:hover { background: var(--surface-subtle); }
  .cx-main--menu .cx-cats .cx-chip[aria-pressed="true"], .cx-main--menu .cx-cats .cx-chip[aria-current="true"] { color: var(--text); background: var(--surface); box-shadow: var(--cx-shadow-card); }
  .cx-main--menu .cx-menu-tools { flex-direction: row; align-items: center; gap: 16px; }
  .cx-main--menu .cx-menu-tools .cx-search { flex: 1; }
  .cx-main--menu .cx-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .cx-main--menu .cx-items .cx-item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

/* Notifications: the bell in the header and its list (join requests first). */
.cx-bell { position: relative; }
.cx-bell__badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--brand-fill); color: var(--text-on-brand); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--surface); }
.cx-bell__badge[hidden] { display: none; }
.cx-notes { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); margin-top: 8px; }
.cx-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; color: var(--text); text-decoration: none; background: var(--surface); }
.cx-note + .cx-note { border-top: 1px solid var(--border); }
a.cx-note:hover { background: var(--surface-subtle); }
.cx-note__icon { flex: none; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-subtle); color: var(--text-2); }
.cx-note__icon svg { width: 18px; height: 18px; }
.cx-note--action .cx-note__icon { background: var(--brand-soft); color: var(--brand-ink); }
.cx-note__body { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 14.5px; }
.cx-note__body strong { font-size: 15px; font-weight: 600; }
.cx-note__meta { font-size: 12.5px; color: var(--text-3); }
.cx-note__actions { display: flex; gap: 8px; margin-top: 10px; }
.cx-note__actions .cx-btn { flex: 1; }
.cx-note__dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 999px; background: var(--brand-fill); }

/* ==========================================================================================
   v5 design rules (owner, 2026-11-10): one look for every surface, clear sections, one orange.
   - Every box is a white card: 1px border, 16px corners, no shadow, no coloured edges.
   - Every section starts with a small grey capital label; 28px between sections, 10px under a label.
   - Orange is kept for the page's one main action, the active tab and things that need you.
   - Status is a quiet chip: green when done/open, neutral while waiting, grey when closed.
   ========================================================================================== */
.cx-card, .cx-rcard, .cx-continue, .cx-quick__alt, .cx-mode, .cx-place { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: none; }
.cx-continue { border-left: 1px solid var(--border); }
:root[data-theme="dark"] .cx-continue { border-left: 1px solid var(--border); }
.cx-card--link:hover, .cx-rcard:hover, .cx-mode:hover, .cx-continue:hover { border-color: var(--border-strong); box-shadow: none; }
.cx-cover { box-shadow: none; border: 1px solid var(--border); }
.cx-chip { box-shadow: none; }
.cx-searchbar { box-shadow: none; border: 1px solid var(--border); }
:root[data-theme="dark"] .cx-searchbar { border-color: var(--border-strong); }

/* Section labels: the same small grey capitals everywhere (home, orders, profile, table...). */
.cx-seclabel, .cx-section > .cx-h2, .cx-section__head > .cx-h2, .cx-section > .cx-section__head .cx-h2 {
  margin: 0; font-family: var(--font-ui); font-size: 13px; font-weight: 600; line-height: 1.3;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
}
.cx-section { gap: 10px; }
.cx-block { display: flex; flex-direction: column; gap: 10px; }
.cx-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cx-block__aside { font-size: 13px; color: var(--text-3); }
.cx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cx-pair > .cx-btn { min-height: 48px; }

/* Status chip */
.cx-chip-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--text); background: var(--surface-subtle); }
.cx-chip-status > span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.cx-chip-status[data-tone="ok"] { color: var(--success); background: var(--success-soft); }
.cx-chip-status[data-tone="ok"] > span { background: var(--success); }
.cx-chip-status[data-tone="info"] { color: var(--brand-ink); background: var(--brand-soft); }
.cx-chip-status[data-tone="info"] > span { background: var(--brand); }
.cx-chip-status[data-tone="off"] { color: var(--text-2); }

/* Table summary card */
.cx-tablecard { padding: 0; overflow: hidden; }
.cx-tablecard__top { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.cx-tablecard__title { margin: 8px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.cx-tablecard__sub { margin: 0; font-size: 15px; color: var(--text-2); }
.cx-tablecard__note { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.cx-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cx-stats > div { padding: 12px 16px; min-width: 0; }
.cx-stats > div + div { border-left: 1px solid var(--border); }
.cx-stats dt { font-size: 12px; color: var(--text-3); }
.cx-stats dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Grouped quick asks */
.cx-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--border); }
.cx-tile { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 16px; border: 0; background: var(--surface); color: var(--text); font: 500 15px/1.2 var(--font-ui); text-align: left; cursor: pointer; }
.cx-tile:hover { background: var(--surface-subtle); }
.cx-tile:disabled { color: var(--text-3); cursor: default; }
.cx-tile .cx-icon { width: 20px; height: 20px; color: var(--text-2); flex: none; }
.cx-tile--wide { grid-column: 1 / -1; min-height: 56px; }
.cx-tile--wide > span { flex: 1; }
.cx-tiles > .cx-tile:nth-last-child(1):nth-child(odd):not(.cx-tile--wide) { grid-column: 1 / -1; }
.cx-helplist { list-style: none; margin: 0; padding: 4px 14px; border-radius: 12px; background: var(--surface-subtle); }
.cx-helplist > li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; font-size: 14px; }
.cx-helplist > li + li { border-top: 1px solid var(--border); }
.cx-helplist__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); transform: translateY(-1px); }
.cx-helplist__dot[data-tone="ok"] { background: var(--success); }
.cx-helplist__reply { display: block; margin-top: 4px; }

/* Order card: header, dishes, footer */
.cx-ordercard { padding: 0; overflow: hidden; }
.cx-ordercard__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cx-ordercard__title { margin: 0; font-size: 16px; font-weight: 600; }
.cx-ordercard__by { margin: 2px 0 0; font-size: 13px; color: var(--text-3); }
.cx-ordercard__items { list-style: none; margin: 0; padding: 2px 16px; }
.cx-ordercard__foot { padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-subtle); font-size: 13px; color: var(--text-2); }
.cx-ordercard .cx-hold { margin: 12px 16px 0; }
.cx-oitem { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; }
.cx-oitem + .cx-oitem { border-top: 1px solid var(--border); }
.cx-oitem__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cx-oitem__name { font-size: 15px; }
.cx-oitem__qty { color: var(--text-3); }
.cx-oitem__meta { font-size: 13px; color: var(--text-2); }
.cx-oitem__end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 15px; }
.cx-oitem__state { font-size: 12px; font-weight: 600; color: var(--text-2); }
.cx-oitem__state[data-tone="ok"] { color: var(--success); }
.cx-oitem__state[data-tone="info"] { color: var(--brand-ink); }
.cx-oitem__state[data-tone="off"] { color: var(--text-3); text-decoration: line-through; }
.cx-linkbtn { align-self: flex-start; padding: 6px 0; border: 0; background: none; color: var(--brand-ink); font: 600 13.5px/1.2 var(--font-ui); cursor: pointer; }
.cx-linkbtn:hover { text-decoration: underline; }

/* Tab bar: flat and white, a thin line on top; the current tab in orange. */
.cx-tab[aria-current="page"] { color: var(--brand-ink); }
.cx-tab--scan { justify-content: center; padding-top: 6px; color: var(--text-3); }
.cx-tab--scan .cx-scan-btn { width: auto; height: auto; margin: 0; border: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; }
.cx-tab--scan[aria-current="page"] .cx-scan-btn { background: none; }
.cx-tab--scan[aria-current="page"] { color: var(--brand-ink); }

/* Home: the open table and the scan card are cards like every other, not dark or orange slabs. */
.cx-now { background: var(--surface); color: var(--text) !important; border: 1px solid var(--border); }
.cx-now__sub { color: var(--text-2); opacity: 1; }
.cx-now:hover { border-color: var(--border-strong); }
.cx-quick__main { background: var(--surface); color: var(--text) !important; border: 1px solid var(--border); }
.cx-quick__main:hover { border-color: var(--border-strong); }
.cx-quick__icon { background: var(--brand-soft); color: var(--brand-ink); }
.cx-quick__text span { color: var(--text-2); opacity: 1; }
button.cx-card { background: var(--surface); color: var(--text); font: inherit; width: 100%; }
/* The bell joins the header: on the narrowest phones the theme switch steps aside (it is also in
   Profile) and the restaurant name gives way first. */
.cx-header__context { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-header__actions { flex: none; }
@media (max-width: 379px) {
  .cx-header .avz-theme { display: none; }
  .cx-header__actions { gap: 2px; }
}

/* v6: a dish that ran out is a quiet notice with a status label, never a coloured frame. */
.cx-ranout { display: grid; gap: 8px; }
.cx-ranout > .avz-badge { justify-self: start; }
/* v6: on phones the page itself names the restaurant, so the header context only shows when it fits
   (an ellipsis of two letters helps nobody). */
@media (max-width: 559px) {
  /* v7: on phones a page with a way back shows its own title in place of the logo (mockup). */
  .cx-header__context { display: none !important; }
  .cx-header__in:has(.cx-back:not([hidden])):has(.cx-header__context:not([hidden]):not(:empty)) .avz-lockup { display: none; }
  .cx-header__in:has(.cx-back:not([hidden])) .cx-header__context:not([hidden]):not(:empty) { display: block !important; -webkit-line-clamp: 1; padding-left: 0; margin-left: 0; border-left: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); }
  .cx-header .cx-back { width: 42px; height: 42px; margin-left: 0; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(29, 20, 16, 0.08), 0 0 0 1px rgba(29, 20, 16, 0.06); }
}
/* v6: a checkbox used as a switch (Profile: dark theme, bigger text, offers) is drawn as a real
   switch; before, it inherited the span switch's box and showed as an empty square. */
input.cx-switch[type="checkbox"] { -webkit-appearance: none; appearance: none; margin: 0; cursor: pointer; width: 46px; height: 28px; border: 0; border-radius: 99px; background: var(--border-strong); position: relative; flex: none; transition: background var(--fast) ease; }
input.cx-switch[type="checkbox"]::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--fast) ease; }
input.cx-switch[type="checkbox"]:checked { background: var(--brand-fill); }
input.cx-switch[type="checkbox"]:checked::after { transform: translateX(18px); }
input.cx-switch[type="checkbox"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; }

/* v7 customer-only surfaces (the shared accents live in avenzo-tokens.css). */
:root { --cx-dark-text: #F3ECE6; --cx-bg: #FBF5EC; --brand-grad: linear-gradient(135deg, #FF7A3D 0%, #E0480F 60%, #B5360B 100%); --cx-shadow-soft: 0 1px 2px rgba(29, 20, 16, 0.06), 0 10px 26px -14px rgba(29, 20, 16, 0.28); }
:root[data-theme="dark"] { --cx-bg: #0F0C0A; --cx-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 26px -14px rgba(0, 0, 0, 0.8); }
/* ======================================================================================
   v7 "lively" (owner-approved mockups, 2026-11-10): warm cream ground, bold display type,
   soft-shadow cards without hard borders, photos everywhere, brand gradient for live things,
   accents with meaning (saffron = cooking/attention, leaf = open/veg/done, plum = sweets/allergens,
   teal = water/wait), and a dark floating tab bar with a raised Scan button.
   ====================================================================================== */
body.cx { background: var(--cx-bg); }
.cx-header { background: var(--cx-bg); border-bottom-color: transparent; }
.cx-h1 { font-weight: 800; letter-spacing: -0.025em; }
.cx-h2, .cx-section__head .cx-h2 { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }


/* Cards: lifted, no hard frame */
.cx-card, .cx-rcard, .cx-place, .cx-mode, .cx-usual { border-color: transparent !important; box-shadow: var(--cx-shadow-soft); border-radius: 20px; }
.cx-card--link:hover, .cx-rcard:hover, .cx-mode:hover { border-color: transparent !important; transform: translateY(-1px); }
.cx-card--link, .cx-rcard, .cx-mode { transition: transform var(--fast) ease, box-shadow var(--fast) ease; }

/* Buttons and chips */
.cx-btn--primary { background: linear-gradient(180deg, #FF6A2B, var(--brand-fill)); box-shadow: 0 8px 18px -8px rgba(224, 72, 15, 0.7); border-radius: 16px; font-family: var(--font-display); font-weight: 700; }
.cx-btn--primary:hover:not(:disabled) { background: linear-gradient(180deg, #FF7A3D, var(--brand-fill-hover)); }
.cx-chip { border-color: transparent !important; box-shadow: 0 0 0 1px var(--border); font-weight: 600; }
.cx-chip[aria-pressed="true"], .cx-chip[aria-current="true"], .cx-chip.is-active { background: var(--ink-deep) !important; color: #fff !important; box-shadow: none; }
:root[data-theme="dark"] .cx-chip[aria-pressed="true"], :root[data-theme="dark"] .cx-chip[aria-current="true"] { background: var(--text) !important; color: var(--bg) !important; }

/* Dark floating tab bar with a raised Scan button (phones and tablets) */
@media (max-width: 900px) {
  body.cx--tabs { padding-bottom: calc(var(--cx-tabbar-h) + 28px + env(safe-area-inset-bottom)); }
  .cx-tabbar {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); height: var(--cx-tabbar-h); padding: 0 4px;
    border: 0; border-radius: 24px; background: var(--ink-deep); align-items: center;
    box-shadow: 0 14px 30px -10px rgba(29, 20, 16, 0.6);
  }
  :root[data-theme="dark"] .cx-tabbar { background: #1E1814; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06); }
  .cx-tabbar .cx-tab { color: #C9BEB5; height: var(--cx-tabbar-h); }
  .cx-tabbar .cx-tab[aria-current="page"] { color: #FFFFFF; }
  .cx-tabbar .cx-tab[aria-current="page"] .cx-icon { color: #FF8A57; }
  .cx-tab--scan .cx-scan-btn { width: 56px; height: 56px; margin-top: -26px; border: 0; border-radius: 18px; background: var(--brand-grad); box-shadow: 0 10px 20px -6px rgba(224, 72, 15, 0.85); }
  .cx-tabbar .cx-tab--scan { color: #C9BEB5; }
}

/* Happening now: a live brand-gradient card */
.cx-now { position: relative; overflow: hidden; min-height: 76px; padding: 16px; border-radius: 22px; background: var(--brand-grad); color: #fff !important; box-shadow: 0 14px 28px -14px rgba(224, 72, 15, 0.8); }
.cx-now::after { content: ""; position: absolute; right: -36px; top: -36px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); pointer-events: none; }
.cx-now__title { font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.cx-now .cx-now__sub, .cx-now .cx-now__title, .cx-now .cx-icon { color: #FFFFFF !important; }
.cx-now .cx-now__sub { opacity: 0.9; }
.cx-now__dot { background: #7CFFB2 !important; box-shadow: 0 0 0 4px rgba(124, 255, 178, 0.25); }

/* Photo cards: restaurants and places */
.cx-place__media, .cx-rcard__media { background: var(--surface-subtle); }
.cx-place__media::after, .cx-rcard__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29, 20, 16, 0) 55%, rgba(29, 20, 16, 0.28)); pointer-events: none; }
.cx-place__name, .cx-rcard__name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.cx-place__badge, .cx-rcard__status .avz-badge { background: #fff !important; color: var(--leaf-ink) !important; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); z-index: 1; }
.cx-cover { border-radius: 24px; aspect-ratio: 16 / 10; }
.cx-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29, 20, 16, 0) 50%, rgba(29, 20, 16, 0.35)); pointer-events: none; }
.cx-rating { color: var(--saffron-ink); font-weight: 700; }

/* Ways to eat: colourful tiles */
.cx-mode { padding: 16px; }
.cx-mode__icon { border-radius: 14px !important; background: var(--saffron-soft) !important; color: var(--saffron-ink) !important; }
.cx-mode:first-of-type .cx-mode__icon { background: var(--brand-soft) !important; color: var(--brand-ink) !important; }
.cx-mode__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }

/* Menu: every dish is a card with its photo and a floating Add */
.cx-item { gap: 12px; margin: 0 0 12px; padding: 12px; border: 0 !important; border-radius: 18px; background: var(--surface); box-shadow: var(--cx-shadow-soft); }
.cx-item__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.25; }
.cx-item__price { font-family: var(--font-display); font-weight: 700; }
.cx-item__tag { align-self: flex-start; display: inline-flex; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 11px; font-weight: 700; }
.cx-food--item { width: 116px; height: 108px; border-radius: 16px; }
.cx-food--stock img, .cx-food img { filter: saturate(1.05); }
.cx-add { color: var(--brand-fill) !important; font-family: var(--font-display); font-weight: 800; border-radius: 12px; border-color: transparent !important; box-shadow: 0 4px 12px -4px rgba(29, 20, 16, 0.35), 0 0 0 1px rgba(224, 72, 15, 0.28); background: var(--surface); }
.cx-cartpill { background: var(--brand-grad) !important; border-radius: 20px !important; box-shadow: 0 14px 28px -10px rgba(224, 72, 15, 0.8) !important; }

/* Your table: dark, warm table card; colourful quick asks */
.cx-tablecard { background: linear-gradient(135deg, #1D1410, #3A2418) !important; color: #fff; position: relative; }
.cx-tablecard::after { content: ""; position: absolute; right: -24px; top: -24px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 61, 0.35), transparent 70%); pointer-events: none; }
.cx-tablecard__title { font-weight: 800; font-size: 30px; }
.cx-tablecard__sub, .cx-tablecard__note { color: rgba(255, 255, 255, 0.75) !important; }
.cx-tablecard .cx-stats, .cx-tablecard .cx-stats * { border-color: rgba(255, 255, 255, 0.12) !important; color: #fff; }
.cx-tablecard .cx-stats dt, .cx-tablecard .cx-stats .cx-small { color: rgba(255, 255, 255, 0.7) !important; }
.cx-tiles { gap: 10px; border: 0; background: transparent; border-radius: 0; }
.cx-tile { border-radius: 16px; box-shadow: var(--cx-shadow-soft); font-weight: 600; }
.cx-tile .cx-icon { width: 34px; height: 34px; padding: 7px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.cx-tiles > .cx-tile:nth-child(2) .cx-icon { background: var(--teal-soft); color: var(--teal-ink); }
.cx-tiles > .cx-tile:nth-child(3) .cx-icon { background: var(--saffron-soft); color: var(--saffron-ink); }
.cx-tiles > .cx-tile:nth-child(4) .cx-icon { background: var(--plum-soft); color: var(--plum-ink); }
.cx-tiles > .cx-tile--wide .cx-icon { background: var(--saffron-soft); color: var(--saffron-ink); }

/* Status chips with meaning */
.cx-status-open, .cx-oitem__state[data-tone="ok"] { color: var(--leaf-ink) !important; }
.avz-badge.cx-status-open { background: var(--leaf-soft) !important; }

/* Track: big ready time */
.cx-track-top__when { font-family: var(--font-display); font-weight: 800; }
/* Home: cravings as round food photos; order-again tiles with a photo */
.cx-craves { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; scroll-snap-type: x proximity; }
.cx-craves::-webkit-scrollbar { display: none; }
.cx-crave { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text) !important; scroll-snap-align: start; }
.cx-crave__img { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; box-shadow: 0 8px 16px -8px rgba(29, 20, 16, 0.5); }
.cx-crave__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-crave__name { font-size: 13px; font-weight: 700; text-align: center; line-height: 1.2; }
.cx-usual { padding: 0 0 12px; overflow: hidden; gap: 6px; }
.cx-usual__img { display: block; height: 84px; margin-bottom: 4px; }
.cx-usual__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-usual__name, .cx-usual__meta { padding: 0 14px; }
.cx-usual__name { font-family: var(--font-display); font-weight: 700; }
/* v7: section titles are bold display headings, not small grey capitals */
.cx-seclabel, .cx-section > .cx-h2, .cx-section__head > .cx-h2, .cx-section > .cx-section__head .cx-h2 {
  font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.015em; text-transform: none; color: var(--text);
}
:root[data-theme="dark"] .cx-place__badge, :root[data-theme="dark"] .cx-rcard__status .avz-badge { background: rgba(15, 12, 10, 0.85) !important; }

/* ---------- v7 exact: Home (owner-approved mockup) ---------- */
.v7-hero { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.v7-hero__hello { margin: 0; color: var(--text-2); font-weight: 600; font-size: 15px; }
.v7-hero__title { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 7.6vw, 34px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; max-width: 16ch; }
.v7-now { display: flex; flex-direction: column; gap: 12px; }
.v7-now:empty { display: none; }
.v7-live { position: relative; overflow: hidden; display: block; padding: 16px; border-radius: 22px; color: #fff !important; text-decoration: none; background: var(--brand-grad); box-shadow: 0 16px 30px -16px rgba(224, 72, 15, 0.85); }
.v7-live__glow { position: absolute; right: -32px; top: -32px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); pointer-events: none; }
.v7-live > *:not(.v7-live__glow) { position: relative; }
.v7-live__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v7-live__since { font-size: 13px; opacity: 0.85; }
.v7-live__main { display: flex; align-items: flex-end; gap: 12px; margin-top: 12px; }
.v7-live__text { flex: 1; min-width: 0; }
.v7-live__title { margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.v7-live__sub { margin: 4px 0 0; font-size: 15px; opacity: 0.92; }
.v7-live__dish { flex: none; width: 86px; height: 86px; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.4); }
.v7-live__dish .cx-food { width: 100%; height: 100%; border-radius: 0; }
.v7-faces { display: flex; align-items: center; margin-top: 10px; }
.v7-face { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 12px var(--font-display); color: #1D1410; border: 2px solid #E8561A; margin-left: -8px; }
.v7-face:first-child { margin-left: 0; }
.v7-face--0 { background: #FFD166; } .v7-face--1 { background: #BDE8C8; } .v7-face--2 { background: #F3D8F0; } .v7-face--3 { background: #CDE7FF; }
.v7-faces__n { margin-left: 8px; font-size: 13px; opacity: 0.92; }
.v7-live__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.v7-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 14px; font: 700 15px var(--font-display); text-decoration: none; }
.v7-btn--light { background: #fff; color: var(--ink-deep) !important; }
.v7-btn--dark { background: var(--ink-deep); color: #fff !important; }
.v7-live--scan, .v7-live--order { display: flex; align-items: center; gap: 14px; }
.v7-live--order { display: block; }
.v7-live__scanicon { flex: none; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); }
.v7-live__scanicon .cx-icon { width: 26px; height: 26px; }
.v7-live__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v7-live--scan .v7-live__title { font-size: 19px; }
.v7-live__go { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 12px; background: #fff; color: var(--brand-fill); font: 800 14px var(--font-display); }
.v7-live--order .v7-live__go { margin-top: 12px; }
.v7-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.v7-pill .cx-icon { width: 13px; height: 13px; }
.v7-pill--live { background: rgba(255, 255, 255, 0.2); color: #fff; }
.v7-pulse { width: 7px; height: 7px; border-radius: 50%; background: #7CFFB2; box-shadow: 0 0 0 0 rgba(124, 255, 178, 0.6); animation: v7-pulse 1.8s infinite; }
@keyframes v7-pulse { 70% { box-shadow: 0 0 0 7px rgba(124, 255, 178, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 255, 178, 0); } }
.v7-pill--open { position: absolute; left: 10px; top: 10px; background: #fff; color: var(--leaf-ink); z-index: 1; }
.v7-pill--veg { position: absolute; left: 10px; bottom: 10px; background: #fff; color: var(--leaf-ink); z-index: 1; }
:root[data-theme="dark"] .v7-pill--open, :root[data-theme="dark"] .v7-pill--veg { background: rgba(15, 12, 10, 0.88); }
.v7-pill--rating { background: var(--saffron-soft); color: var(--saffron-ink); }
.v7-rail { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 -2px; }
.v7-rail::-webkit-scrollbar { display: none; }
.v7-rcard { flex: 0 0 min(250px, 72vw); scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--surface); color: var(--text) !important; text-decoration: none; box-shadow: var(--cx-shadow-soft); }
.v7-rcard__media { position: relative; height: 130px; background: var(--surface-subtle); }
.v7-rcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v7-rcard__body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.v7-rcard__row { display: flex; align-items: center; gap: 8px; }
.v7-rcard__name { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7-rcard__meta { color: var(--text-2); font-size: 13px; }
@media (min-width: 901px) { .v7-live { padding: 20px; } .v7-rcard { flex-basis: 260px; } }
.cx-food--live { width: 100%; height: 100%; }
/* v7 header: bell in a white circle, orange avatar; Scan tab is the raised button alone */
.cx-header .cx-bell { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(29, 20, 16, 0.08), 0 0 0 1px rgba(29, 20, 16, 0.06); }
.cx-header .cx-bell .cx-bell__badge { top: -3px; right: -3px; border-color: var(--cx-bg); }
.cx-header .cx-avatar { width: 40px; height: 40px; background: var(--brand-grad); color: #fff; font-family: var(--font-display); font-size: 16px; }
.cx-header__actions { gap: 8px; }
@media (max-width: 900px) { .cx-tabbar .cx-tab--scan > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .cx-tab--scan .cx-scan-btn { margin-top: -8px; } }
.v7-live__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- v7 exact: Restaurant ---------- */
.cx-rhead { gap: 0 !important; }
.v7-cover { position: relative; height: 230px; margin: -20px calc(-1 * var(--cx-gutter)) 0; overflow: hidden; background: var(--surface-subtle); }
.v7-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v7-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29, 20, 16, 0.2), rgba(29, 20, 16, 0) 40%, rgba(29, 20, 16, 0.5)); }
@media (min-width: 640px) { .v7-cover { margin: 0; height: 300px; border-radius: 24px; } }
.v7-infocard { position: relative; margin-top: -40px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--cx-shadow-soft); display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) { .v7-infocard { margin: -56px 16px 0; } }
.v7-infocard__row { display: flex; align-items: center; gap: 10px; }
.v7-infocard__name { flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.v7-infocard__sub { margin: 0; color: var(--text-2); }
.v7-infocard__addr { margin: 0; color: var(--text-3); font-size: 13px; }
.v7-infocard__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.v7-fact { display: inline-flex; align-items: center; gap: 5px; }
.v7-fact .cx-icon { width: 16px; height: 16px; color: var(--text-2); }
.v7-fact--rating .cx-icon { color: var(--saffron); }
.v7-pill--openchip { background: var(--leaf-soft); color: var(--leaf-ink); }
.v7-pill--closed { background: var(--surface-subtle); color: var(--text-2); }
.v7-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cx-mode.v7-way { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 136px; padding: 14px; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--cx-shadow-soft); text-decoration: none; }
.cx-mode.v7-way:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.v7-way--wide { grid-column: 1 / -1; min-height: 0 !important; }
.v7-way__icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.v7-way__icon .cx-icon { width: 22px; height: 22px; }
.v7-way__title { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.v7-way__desc { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.v7-way__go { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-weight: 700; color: var(--brand-fill); }
.v7-way__go .cx-icon { width: 16px; height: 16px; }
.cx-mode.v7-way--hot { background: var(--brand-grad); color: #fff; box-shadow: 0 14px 28px -14px rgba(224, 72, 15, 0.85); }
.v7-way--hot .v7-way__icon { background: rgba(255, 255, 255, 0.2); color: #fff; }
.v7-way--hot .v7-way__desc { color: rgba(255, 255, 255, 0.92); }
.v7-way--saffron .v7-way__icon { background: var(--saffron-soft); color: var(--saffron-ink); }
.v7-way--teal .v7-way__icon { background: var(--teal-soft); color: var(--teal-ink); }
.v7-dcard { all: unset; box-sizing: border-box; cursor: pointer; flex: 0 0 160px; scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--cx-shadow-soft); text-decoration: none; }
.v7-dcard__media { position: relative; height: 112px; display: block; }
.cx-food--dcard { width: 100%; height: 100%; border-radius: 0; }
.v7-pill--hot { position: absolute; left: 8px; top: 8px; background: var(--ink-deep); color: #FFD166; height: 24px; font-size: 11px; }
.v7-dcard__body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.v7-dcard__name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; min-width: 0; }
.v7-dcard__name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7-dcard__row { display: flex; align-items: center; gap: 8px; }
.v7-dcard__price { flex: 1; font-family: var(--font-display); }
.v7-dcard__add { display: inline-grid; place-items: center; min-width: 56px; height: 30px; border-radius: 10px; color: var(--brand-fill); font: 800 12px var(--font-display); letter-spacing: 0.04em; box-shadow: 0 4px 12px -4px rgba(29, 20, 16, 0.35), 0 0 0 1px rgba(224, 72, 15, 0.28); }

/* ---------- v7 exact: Menu ---------- */
.cx-context:has(.v7-tstrip) { display: block; margin-bottom: 4px; }
.v7-tstrip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--ink-deep); color: #fff; }
:root[data-theme="dark"] .v7-tstrip { background: #1E1814; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.v7-tstrip__table { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: #2F241E; font-weight: 700; font-size: 13px; }
.v7-tstrip__table .cx-icon { width: 14px; height: 14px; }
.v7-tstrip__text { flex: 1; min-width: 0; font-size: 14px; color: rgba(255, 255, 255, 0.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7-tstrip__text b { color: #fff; }
.v7-tstrip__link { color: #FFB48F !important; font-weight: 700; font-size: 14px; text-decoration: none; }
/* The order bar: count, total and what happens next, then the action */
.cx .cx-cartpill { justify-content: flex-start; gap: 12px; min-height: 64px; padding: 10px 10px 10px 14px; border: 0; border-radius: 22px; background: var(--brand-grad); text-align: left; }
.cx .cx-cartpill .cx-cartpill__count { flex: none; min-width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, 0.2); color: #fff; font: 800 16px var(--font-display); }
.cx-cartpill__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cx-cartpill__text .cx-cartpill__total { font: 800 17px var(--font-display); }
.cx-cartpill__sub { font-size: 13px; font-weight: 500; opacity: 0.92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-cartpill__cta { flex: none; display: inline-grid; place-items: center; min-height: 44px; padding: 0 16px; border-radius: 14px; background: #fff; color: var(--brand-fill); font: 800 15px var(--font-display); }
@media (min-width: 640px) { .cx .cx-cartpill { border-radius: 22px; } }
/* v7 dish sheet: full-width photo, close button floating on it, the dish name big under it */
.cx-sheet--dish .cx-sheet__head { position: absolute; left: 0; right: 0; top: 0; z-index: 2; padding: 12px; background: transparent; border: 0; }
.cx-sheet--dish .cx-sheet__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cx-sheet--dish .cx-sheet__head .cx-iconbtn { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.cx-sheet--dish .cx-sheet__panel { position: relative; overflow: hidden; }
.cx-sheet--dish .cx-sheet__body { padding-top: 0; }
.cx-sheet--dish .cx-food--sheet { margin: 0 calc(-1 * var(--cx-sheet-pad, 20px)); width: calc(100% + 2 * var(--cx-sheet-pad, 20px)); aspect-ratio: 16 / 10; border-radius: 0; }
.v7-dish__name { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.cx-sheet--dish .cx-item__name { display: none; }

/* ---------- v7 exact: Your table ---------- */
.v7-tc__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v7-tc__role { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.cx-tablecard .cx-chip-status { background: var(--leaf) !important; color: #fff !important; }
.cx-tablecard .cx-chip-status > span { background: #fff !important; }
.cx-tablecard .cx-stats dd { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: #fff; }
.v7-tc__actions { display: flex; gap: 10px; }
.v7-tc__actions > .cx-btn--primary { flex: 1; }
.v7-tc__invite { flex: none; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.cx-tiles { grid-template-columns: repeat(4, 1fr) !important; }
.cx-tiles > .cx-tile:not(.cx-tile--wide) { flex-direction: column; justify-content: center; gap: 6px; min-height: 92px; padding: 10px 4px; text-align: center; font-size: 12px; line-height: 1.2; }
.cx-tiles > .cx-tile:not(.cx-tile--wide) .cx-icon { width: 40px; height: 40px; padding: 9px; border-radius: 14px; }
.cx-tiles > .cx-tile--wide { grid-column: 1 / -1; }
.cx-tiles:has(> .cx-tile:not(.cx-tile--wide):nth-child(2):last-child), .cx-tiles:has(> .cx-tile:nth-child(2) + .cx-tile--wide) { grid-template-columns: repeat(2, 1fr) !important; }
.cx-oitem { display: flex; align-items: flex-start; gap: 10px; }
.v7-oitem__img { flex: none; width: 46px; height: 46px; }
.v7-oitem__img .cx-food--line { width: 46px; height: 46px; border-radius: 12px; }
.cx-oitem .cx-oitem__main { flex: 1; min-width: 0; }
.v7-progress { height: 6px; margin: 2px 16px 6px; border-radius: 9px; background: var(--surface-subtle); overflow: hidden; }
.v7-progress > span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--saffron), var(--brand-fill)); }
.cx-chip-status[data-tone="wait"] { background: var(--saffron-soft) !important; color: var(--saffron-ink) !important; }

/* ---------- v7 exact: Track ---------- */
.v7-track { display: flex; flex-direction: column; align-items: center; text-align: center; background: radial-gradient(circle at 50% 0%, var(--brand-soft), var(--surface) 62%) !important; }
.v7-ring { width: 156px; height: 156px; border-radius: 50%; padding: 8px; background: conic-gradient(var(--brand-fill) 0 var(--p), var(--surface-subtle) var(--p) 100%); margin-bottom: 12px; }
.v7-ring__img { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 4px solid var(--surface); }
.cx-food--ring { width: 100%; height: 100%; border-radius: 50%; }
.v7-track .cx-orb { display: none; }
.v7-track .cx-hero { justify-content: center; }
.v7-track .cx-hero__state { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.v7-track .cx-hero__progress { display: none; }
/* Table bill as a receipt */

.cx-totals > div:last-child { font-family: var(--font-display); }

/* Theme choice: Light / Dark / Same as device (Profile, staff Account). */
.avz-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-subtle); }
.avz-seg__opt { flex: 1 1 0; position: relative; }
.avz-seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.avz-seg__opt span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); text-align: center; }
.avz-seg__opt input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.avz-seg__opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

/* v7 other pages (owner-approved mockups 2026-11-11) */
.cx-food--sm { width: 56px; height: 56px; border-radius: 14px; }
.v7-ocard .cx-row { align-items: center; gap: 12px; }
.v7-ocard__what { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7-ocard__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.v7-ocard__side .avz-badge { white-space: nowrap; }
.v7-pill--plum { background: var(--plum-soft); color: var(--plum-ink); }
/* Scan: a dark camera screen with a clear frame (mockup O4). */
body.cx:has(.cx-scan-view) { background: #14100D; }
body.cx:has(.cx-scan-view) .cx-header, body.cx:has(.cx-scan-view) .cx-main {
  background: #14100D; --text: var(--cx-dark-text); --text-2: #C9BEB5; --text-3: #8C7F76; --surface: #2A201A; --surface-subtle: #3A2E26; --border: rgba(255, 255, 255, .1); --field: #2A201A;
  color: var(--text);
}
body.cx:has(.cx-scan-view) .cx-card { background: #2A201A; box-shadow: none; }
.cx-scan-view { border-radius: 28px; background: radial-gradient(circle at 50% 40%, #3A2A20, #0B0806); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .85); }
.cx-scan-frame::after { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: #FF7A3D; box-shadow: 0 0 12px #FF7A3D; }
.cx-food--xs { width: 36px; height: 36px; border-radius: 10px; margin-right: 10px; }
.cx-bill .cx-line { align-items: center; }
.cx-bill__head { padding-bottom: 14px; border-bottom: 2px dashed var(--border); }
.cx-paymethod { border: 0; box-shadow: 0 0 0 1px var(--border); border-radius: 18px; min-height: 72px; }
.cx-paymethod:has(input:checked) { box-shadow: 0 0 0 2px var(--text); }
.cx-paymethod__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-subtle); }
.cx-paymethod:has(input:checked) .cx-paymethod__icon { background: var(--leaf-soft); color: var(--leaf-ink); }
/* Join a table (mockup O5): the restaurant photo with its name, the table as a dark chip. */
.v7-join { position: relative; overflow: hidden; border-radius: 22px; min-height: 180px; display: flex; align-items: flex-end; background: var(--ink-deep); }
.v7-join__cover, .v7-join__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v7-join__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .65)); }
.v7-join__over { position: relative; padding: 16px; color: #fff; }
.v7-join__over .cx-context, .v7-join__over .cx-h1 { color: #fff; }
.v7-join__table { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; }
.v7-join__chip { display: inline-grid; place-items: center; min-width: 56px; height: 56px; padding: 0 8px; border-radius: 16px; background: var(--ink-deep); color: #fff; font: 800 20px/1 var(--font-display); }
:root[data-theme="dark"] .v7-join__chip { background: #fff; color: #1D1410; }
