/* Table & Thyme — fictional restaurant ordering demo
   Design tokens from the Claude consultation blueprint (17 Nov 2026) */

:root {
  --bg: #FBF7F0;
  --surface: #FFFFFF;
  --surface-alt: #F3ECE0;
  --ink: #1F1B16;
  --ink-muted: #5C5348;
  --line: #E3D9C8;
  --primary: #1F4D3A;
  --primary-hover: #173B2C;
  --accent: #C98A1B;
  --accent-text: #8A5A00;
  --danger: #B3261E;
  --veg: #1B8A3A;
  --nonveg: #8B3A1A;
  --shadow: 0 1px 2px rgba(31,27,22,.06), 0 8px 24px rgba(31,27,22,.06);
  --radius-input: 8px;
  --radius-card: 16px;
  --radius-sheet: 24px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { touch-action: manipulation; }
button, a, .dish-card, .chip, .opt-row, .pay-row, .address-card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-size: max(16px, 1em) !important; touch-action: manipulation; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  min-height: 44px;
}
input, select, textarea {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.price, .num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251,247,240,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .02em;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.brand .brand-mark {
  width: 30px; height: 30px;
  flex: 0 0 auto;
}
.header-nav { display: none; align-items: center; gap: 4px; margin-left: 16px; }
.header-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 120ms var(--ease), background 120ms var(--ease);
}
.header-nav a:hover { color: var(--ink); background: var(--surface-alt); }
.header-nav a.active { color: var(--primary); background: var(--surface-alt); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.open-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}
.open-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--veg); }
.open-pill.closed .dot { background: var(--danger); }
.demo-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 120px;
}
.layout-menu { display: block; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px 0 24px;
  align-items: center;
}
.hero-copy .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 12px;
}
.hero-copy h1 {
  font-size: clamp(34px, 6vw, 48px);
  margin-bottom: 14px;
}
.hero-copy p { color: var(--ink-muted); font-size: 18px; max-width: 46ch; margin-bottom: 22px; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-media { position: relative; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); }
.hero-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero-media .hero-tag {
  position: absolute;
  left: 14px; bottom: 14px;
  background: rgba(251,247,240,.94);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Fulfilment toggle ---------- */
.fulfilment {
  display: inline-flex;
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.fulfilment button {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: background 120ms var(--ease), color 120ms var(--ease);
}
.fulfilment button[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
}

/* ---------- Category chips ---------- */
.chips-wrap {
  position: sticky;
  top: 63px;
  z-index: 30;
  background: rgba(251,247,240,.94);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: background 120ms var(--ease), color 120ms var(--ease);
}
.chip.active { background: var(--primary); color: #fff; }

/* ---------- Closed / paused banner ---------- */
.closed-banner {
  margin: 16px 0 0;
  background: #FDF3E3;
  border: 1px solid #EBD6AC;
  border-radius: var(--radius-card);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
}
.closed-banner strong { display: block; margin-bottom: 2px; }
.closed-banner .banner-icon { color: var(--accent-text); flex: 0 0 auto; margin-top: 1px; }

/* ---------- Menu sections & cards ---------- */
.menu-section { padding-top: 28px; }
.menu-section h2 { font-size: 28px; margin-bottom: 4px; }
.menu-section .section-note { color: var(--ink-muted); font-size: 14px; margin-bottom: 16px; }
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

.dish-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
  display: flex;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform 120ms var(--ease), border-color 120ms var(--ease);
}
.dish-card:active { transform: scale(.995); }
.dish-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dish-name-row { display: flex; align-items: flex-start; gap: 8px; }
.dish-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.dish-desc {
  color: var(--ink-muted);
  font-size: 14px;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dish-price-row { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.dish-price { font-size: 16px; font-weight: 600; }
.dish-thumb {
  position: relative;
  flex: 0 0 118px;
  width: 118px;
  height: 118px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-alt);
}
.dish-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dish-thumb .add-btn {
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translate(-50%, 30%);
  min-width: 96px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: background 120ms var(--ease), transform 120ms var(--ease);
}
.dish-thumb .add-btn:hover { background: var(--primary-hover); }
.dish-thumb .add-btn:active { transform: translate(-50%, 30%) scale(.97); }
.dish-thumb .soldout-label {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(31,27,22,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px 4px;
}
.dish-card.soldout .dish-thumb img { filter: grayscale(.55); opacity: .75; }

.veg-mark {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  margin-top: 3px;
  border: 1.5px solid var(--veg);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.veg-mark::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--veg); }
.veg-mark.nonveg { border-color: var(--nonveg); }
.veg-mark.nonveg::after { background: var(--nonveg); border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 8px; height: 8px; }

.badge-sample {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.cat-rail { display: none; }
@media (max-width: 640px) {
  .open-pill .open-time { display: none; }
  .brand { font-size: 19px; }
}

/* ---------- Desktop 3-col ---------- */
@media (min-width: 1024px) {
  .header-nav { display: flex; }
  .layout-menu {
    display: grid;
    grid-template-columns: 180px 1fr 340px;
    gap: 32px;
    align-items: start;
  }
  .layout-menu .hero { grid-column: 1 / -1; }
  .cat-rail {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .chips-wrap { display: none; }
  .cat-rail .rail-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding: 8px 14px;
  }
  .cat-rail button {
    text-align: left;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-muted);
    min-height: 44px;
    transition: background 120ms var(--ease), color 120ms var(--ease);
  }
  .cat-rail button.active { background: var(--surface-alt); color: var(--primary); }
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .dish-card { flex-direction: column; }
  .dish-thumb { width: 100%; flex: 0 0 auto; height: 150px; }
  .chips-wrap { display: none; }
  .side-cart {
    position: sticky;
    top: 96px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .hero { grid-template-columns: 1fr 1fr; }
}

/* ---------- Side cart / cart panel ---------- */
.side-cart h3 { font-size: 22px; margin-bottom: 2px; }
.side-cart .cart-count-note { font-size: 13px; color: var(--ink-muted); margin-bottom: 14px; }
.cart-empty-note { color: var(--ink-muted); font-size: 14px; padding: 18px 0; text-align: center; }

.cart-line {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.cart-line:last-of-type { border-bottom: none; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 600; font-size: 14px; display: flex; gap: 7px; align-items: flex-start; }
.cart-line-name .veg-mark { width: 13px; height: 13px; margin-top: 2px; }
.cart-line-name .veg-mark::after { width: 5px; height: 5px; }
.cart-line-opts { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.cart-line-note { font-size: 13px; color: var(--accent-text); font-style: italic; margin-top: 2px; }
.cart-line-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.qty-stepper button {
  min-width: 36px;
  min-height: 36px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms var(--ease);
}
.qty-stepper button:hover { background: var(--surface-alt); }
.qty-stepper .qty-val { min-width: 26px; text-align: center; font-weight: 600; font-size: 14px; }
.remove-link { font-size: 13px; font-weight: 600; color: var(--danger); min-height: 36px; padding: 6px 8px; border-radius: 8px; }
.cart-line-price { font-weight: 600; font-size: 14px; white-space: nowrap; }

.summary-rows { padding: 14px 0 6px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--ink-muted); }
.summary-row.total { color: var(--ink); font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.summary-row .free { color: var(--veg); font-weight: 600; }
.free-delivery-hint { font-size: 12px; color: var(--accent-text); padding: 4px 0 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 120ms var(--ease), transform 120ms var(--ease), color 120ms var(--ease), border-color 120ms var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { background: #A9B4AE; cursor: not-allowed; transform: none; }
.btn-outline { border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-danger { background: #FBEAE8; color: var(--danger); }

/* ---------- Mobile cart bar + tab bar ---------- */
.cart-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: 76px;
  z-index: 45;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(31,77,58,.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  min-height: 52px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.cart-bar:hover { background: var(--primary-hover); }
.cart-bar .cart-bar-total { font-variant-numeric: tabular-nums; opacity: .92; }
.tab-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 44;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
}
.tab-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  min-height: 52px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  border-radius: 12px;
}
.tab-bar a.active { color: var(--primary); }
.tab-bar a svg { width: 22px; height: 22px; }
@media (min-width: 1024px) {
  .cart-bar, .tab-bar { display: none; }
}

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(31,27,22,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 61;
  background: var(--surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: 0 -12px 40px rgba(31,27,22,.18);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  transform: translateY(102%);
  transition: transform 200ms var(--ease);
}
.sheet.open { transform: translateY(0); }
@media (min-width: 768px) {
  .sheet {
    left: 50%; right: auto; bottom: 24px;
    width: min(560px, calc(100vw - 32px));
    transform: translate(-50%, 110%);
    border-radius: var(--radius-sheet);
  }
  .sheet.open { transform: translate(-50%, 0); }
}
.sheet-handle { padding: 10px 0 4px; display: flex; justify-content: center; }
.sheet-handle span { width: 40px; height: 4px; border-radius: 999px; background: var(--line); }
.sheet-body { overflow-y: auto; padding: 8px 20px 20px; }
.sheet-title-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 2px; }
.sheet-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; flex: 1; }
.sheet-close { min-width: 44px; color: var(--ink-muted); font-size: 22px; line-height: 1; border-radius: 999px; }
.sheet-price-line { color: var(--ink-muted); font-size: 14px; margin-bottom: 14px; }

.opt-group { margin-top: 16px; }
.opt-group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.opt-group-name { font-weight: 700; font-size: 15px; }
.opt-group-rule { font-size: 12px; color: var(--ink-muted); }
.opt-group-rule.required { color: var(--accent-text); font-weight: 600; }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  min-height: 48px;
  cursor: pointer;
  transition: border-color 120ms var(--ease), background 120ms var(--ease);
  background: var(--surface);
}
.opt-row:hover { border-color: #CDBFA5; }
.opt-row.selected { border-color: var(--primary); background: #F0F5F1; }
.opt-row.disabled { opacity: .55; cursor: not-allowed; }
.opt-row .opt-name { flex: 1; font-size: 14px; font-weight: 500; }
.opt-row .opt-price { font-size: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.opt-row .opt-box {
  width: 20px; height: 20px;
  border: 2px solid #C9BBA0;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 120ms var(--ease);
}
.opt-row.checkbox .opt-box { border-radius: 6px; }
.opt-row.selected .opt-box { border-color: var(--primary); background: var(--primary); }
.opt-row.selected .opt-box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt-row.checkbox.selected .opt-box::after { border-radius: 2px; }
.opt-unavailable-tag { font-size: 11px; font-weight: 700; color: var(--danger); text-transform: uppercase; letter-spacing: .05em; }
.opt-error { color: var(--danger); font-size: 13px; margin-top: 8px; font-weight: 500; }

.sheet-note-input {
  width: 100%;
  margin-top: 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--surface-alt);
  padding: 12px 14px;
  min-height: 48px;
  resize: vertical;
}
.sheet-note-count { text-align: right; font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.sheet-footer {
  border-top: 1px solid var(--line);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: 0 0 var(--radius-sheet) var(--radius-sheet);
}
.sheet-footer .btn { flex: 1; }

/* ---------- Views ---------- */
.view { display: none; }
.view.active { display: block; }
.view-head { padding: 28px 0 18px; }
.view-head h1 { font-size: 36px; margin-bottom: 6px; }
.view-head p { color: var(--ink-muted); }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) {
  .checkout-grid { grid-template-columns: 1fr 380px; align-items: start; }
}
.checkout-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.checkout-card h2 { font-size: 22px; margin-bottom: 4px; }
.checkout-card .card-note { font-size: 13px; color: var(--ink-muted); margin-bottom: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--surface-alt);
  padding: 12px 14px;
  min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  background: var(--surface);
}
.field .field-error { color: var(--danger); font-size: 13px; margin-top: 6px; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.address-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 120ms var(--ease), background 120ms var(--ease);
}
.address-card.selected { border-color: var(--primary); background: #F0F5F1; }
.address-card input[type="radio"] { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); }
.address-card .addr-name { display: block; font-weight: 700; font-size: 14px; }
.address-card .addr-line { display: block; font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.pay-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 120ms var(--ease), background 120ms var(--ease);
}
.pay-row.selected { border-color: var(--primary); background: #F0F5F1; }
.pay-row input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); }
.pay-row .pay-name { font-weight: 600; font-size: 14px; }
.pay-row .pay-sub { font-size: 12px; color: var(--ink-muted); }
.demo-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #FDF3E3;
  border: 1px solid #EBD6AC;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink);
  margin-top: 14px;
}
.demo-note .banner-icon { color: var(--accent-text); flex: 0 0 auto; margin-top: 1px; }
.form-error-banner {
  background: #FBEAE8;
  border: 1px solid #EFC5C1;
  color: var(--danger);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Order status ---------- */
.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}
.status-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 4px; }
.status-head h2 { font-size: 26px; }
.status-state-line { font-size: 15px; color: var(--ink-muted); margin-bottom: 20px; }
.status-state-line strong { color: var(--primary); }
.timeline { display: flex; flex-direction: column; gap: 0; margin: 6px 0 4px; }
.tl-step { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.tl-step:last-child { padding-bottom: 4px; }
.tl-step::before {
  content: "";
  position: absolute;
  left: 11px; top: 24px; bottom: 0;
  width: 2px;
  background: var(--line);
}
.tl-step:last-child::before { display: none; }
.tl-step.done::before { background: var(--primary); }
.tl-dot {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.tl-step.done .tl-dot { border-color: var(--primary); background: var(--primary); }
.tl-step.done .tl-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.tl-step.current .tl-dot { border-color: var(--primary); }
.tl-step.current .tl-dot::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.tl-name { font-weight: 600; font-size: 15px; }
.tl-desc { font-size: 13px; color: var(--ink-muted); margin-top: 1px; }
.order-lines { margin: 14px 0; }
.order-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.order-line:last-child { border-bottom: none; }
.order-line .ol-name { color: var(--ink); }
.order-line .ol-name .ol-opts { display: block; font-size: 12px; color: var(--ink-muted); }
.order-line .ol-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.order-card-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms var(--ease);
}
.order-card-row:hover { border-color: var(--primary); }
.order-card-row .oc-main { flex: 1; min-width: 0; }
.order-card-row .oc-id { font-weight: 700; font-size: 15px; }
.order-card-row .oc-sub { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.status-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink-muted);
  white-space: nowrap;
}
.status-chip.live { background: #E4F0E8; color: var(--primary); }
.status-chip.done { background: var(--surface-alt); color: var(--ink-muted); }
.status-chip.cancelled { background: #FBEAE8; color: var(--danger); }

/* ---------- Account ---------- */
.account-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.account-card h2 { font-size: 20px; margin-bottom: 10px; }
.account-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: none; }
.account-row .ar-label { color: var(--ink-muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 148px;
  transform: translate(-50%, 16px);
  z-index: 70;
  background: var(--ink);
  color: #FBF7F0;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { .toast { bottom: 32px; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 16px 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
@media (min-width: 1024px) { .footer-inner { padding-bottom: 40px; } }
.footer-inner a { color: var(--primary); font-weight: 600; text-decoration: none; }
.footer-inner .footer-brand { font-family: var(--font-display); font-size: 18px; color: var(--primary); font-weight: 600; }

/* ---------- Kitchen demo ---------- */
.kitchen-header {
  background: var(--primary);
  color: #fff;
}
.kitchen-header .header-inner { padding-top: 16px; padding-bottom: 16px; }
.kitchen-header .brand { color: #fff; }
.kitchen-header .sub { font-size: 13px; opacity: .8; }
.kitchen-cols { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 24px 0; }
@media (min-width: 900px) { .kitchen-cols { grid-template-columns: repeat(3, 1fr); } }
.k-col { background: var(--surface-alt); border-radius: var(--radius-card); padding: 14px; min-height: 200px; }
.k-col-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding: 4px 6px 12px; }
.k-col-head .k-count { background: var(--surface); border-radius: 999px; padding: 2px 10px; }
.k-ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.k-ticket .k-id { font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; }
.k-ticket .k-meta { font-size: 12px; color: var(--ink-muted); margin: 2px 0 8px; }
.k-ticket .k-items { font-size: 14px; margin-bottom: 12px; }
.k-ticket .k-items li { list-style: none; padding: 2px 0; }
.k-empty { text-align: center; color: var(--ink-muted); font-size: 13px; padding: 20px 0; }
.k-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 20px; margin-top: 8px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: #C9BBA0; transition: background 120ms var(--ease); position: relative; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 120ms var(--ease); }
.switch input:checked + .track { background: var(--danger); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Narrow phones (<=400px): keep header and cards inside the viewport ---------- */
@media (max-width: 400px) {
  .header-inner { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .brand { font-size: 16px; letter-spacing: 0; gap: 7px; min-width: 0; }
  .brand .brand-mark { width: 26px; height: 26px; }
  .header-right { gap: 6px; flex: 0 0 auto; }
  .open-pill { padding: 6px 9px; gap: 5px; }
  .demo-pill { padding: 6px 9px; letter-spacing: .02em; }
}
@media (max-width: 340px) {
  .dish-card { padding: 12px; gap: 10px; }
  .dish-thumb { flex-basis: 96px; width: 96px; height: 96px; }
}
