  /* ============ DESIGN TOKENS ============ */
  :root {
    /* Fraunces/DM Sans have no Chinese, so Noto Serif SC handles it.
       Don't put -apple-system first, on iOS it takes over the Chinese. */
    --font-display: 'Fraunces', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    --font-body: 'DM Sans', 'Noto Serif SC', 'Songti SC', 'STSong', sans-serif;
    /* paper grain, inline SVG */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    --ink: #1a1410;
    --ink-2: #2a211a;
    --paper: #f7f1e6;
    --paper-2: #efe6d2;
    --cream: #fdf9f0;
    --chili: #8B1A1A;          /* brand red */
    --chili-deep: #6d1414;
    --flame: #e8dcb8;          /* cream accent */
    --flame-deep: #cebd94;
    --jade: #4a6b3f;           /* scallion green */
    --soot: #6b5d4f;
    --line: rgba(26, 20, 16, 0.08);
    --line-strong: rgba(26, 20, 16, 0.16);
    --shadow-sm: 0 1px 2px rgba(26,20,16,.08), 0 2px 6px rgba(26,20,16,.04);
    --shadow-md: 0 4px 16px rgba(26,20,16,.10), 0 12px 32px rgba(26,20,16,.08);
    --shadow-lg: 0 20px 60px rgba(26,20,16,.25);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
  }

  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overscroll-behavior: none;
  }
  body {
    font-family: var(--font-body);
    color: var(--ink);
    /* behind the app column on wide screens */
    background: #e6dbc2;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    /* children scroll, the body doesn't */
    touch-action: pan-y;
  }
  button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
  button:active { transform: scale(0.97); }

  /* ============ APP SHELL ============ */
  .app {
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    max-width: 500px;
    margin: 0 auto;
    background: var(--cream);
    position: relative;
    overflow: hidden;
    /* edge + shadow for the column on wide screens, off-screen on phones */
    box-shadow: 0 0 0 1px rgba(26, 20, 16, 0.05), 0 8px 44px rgba(26, 20, 16, 0.16);
  }

  /* ============ HEADER ============ */
  .header {
    flex-shrink: 0;              /* don't squish the header */
    min-height: calc(var(--safe-t) + 56px);
    padding: calc(var(--safe-t) + 14px) 18px 14px;
    background: var(--chili);
    color: var(--cream);
    position: relative;
    z-index: 20;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(0,0,0,0.15);
  }
  .header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse at 85% 30%, rgba(232, 220, 184, 0.10) 0%, transparent 50%),
      radial-gradient(ellipse at 15% 80%, rgba(0, 0, 0, 0.15) 0%, transparent 50%);
    pointer-events: none;
  }
  .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
  .brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
    min-width: 0;                /* shrink instead of pushing the toggle off */
  }
  .brand-mark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(19px, 5.6vw, 24px);
    letter-spacing: -0.02em;
    color: var(--cream);
    white-space: nowrap;
  }
  /* long line, has to fit ~210px on an iPhone SE */
  .brand-sub {
    font-size: clamp(8.5px, 2.6vw, 11px);
    letter-spacing: 0.04em;
    color: var(--flame);
    margin-top: 5px;
    font-weight: 500;
    white-space: nowrap;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .table-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 8px;
    background: rgba(253, 249, 240, 0.14);
    border: 1px solid rgba(253, 249, 240, 0.22);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
  }
  .table-pill .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--flame);
    box-shadow: 0 0 8px var(--flame);
  }

  /* Language toggle */
  .lang-toggle {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(253, 249, 240, 0.20);
    border-radius: 999px;
    position: relative;
  }
  .lang-toggle button {
    position: relative;
    z-index: 2;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(253, 249, 240, 0.70);
    border-radius: 999px;
    transition: color 0.25s ease;
    line-height: 1;
    min-width: 28px;
  }
  .lang-toggle button.active {
    color: var(--chili-deep);
  }
  .lang-toggle .lang-thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    width: calc(50% - 3px);
    background: var(--flame);
    border-radius: 999px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    z-index: 1;
  }
  .lang-toggle[data-lang="zh"] .lang-thumb {
    transform: translateX(100%);
  }
  .lang-toggle button .zh-char {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
  }

  /* ============ MAIN LAYOUT ============ */
  .main {
    flex: 1;
    min-height: 0;         /* needed for the flex child to scroll */
    display: flex;
    overflow: hidden;
    position: relative;
    background: var(--cream) var(--grain);
  }

  /* ============ CATEGORY NAV ============ */
  .nav {
    width: 96px;
    flex-shrink: 0;
    background: var(--paper) var(--grain);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-right: 1px solid var(--line);
    padding: 8px 0 80px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item {
    display: block;
    width: 100%;
    padding: 16px 8px 16px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: var(--soot);
    position: relative;
    transition: color 0.15s ease;
    line-height: 1.25;
  }
  .nav-item .nav-zh {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
  }
  .nav-item.active {
    background: var(--cream);
    color: var(--ink);
  }
  .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--chili);
    border-radius: 0 3px 3px 0;
  }
  .nav-item .badge {
    position: absolute;
    top: 10px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--chili);
    color: var(--cream);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* ============ DISH LIST ============ */
  .list {
    flex: 1;
    min-height: 0;                          /* lets it shrink */
    overflow-y: auto;
    overscroll-behavior: contain;           /* no iOS rubber-banding the whole app */
    -webkit-overflow-scrolling: touch;
    padding: 0 0 0;
    scroll-behavior: smooth;
  }
  /* padding so the last section can scroll to the top */
  .list-tail {
    height: calc(70vh - 80px);
    pointer-events: none;
  }
  .section {
    padding: 14px 16px 4px;
    scroll-margin-top: 4px;
  }
  .section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
  }
  .section-head .zh {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.02em;
    color: var(--ink);
  }
  .section-head .en {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--chili);
    font-weight: 600;
  }
  .section-rule {
    height: 1px;
    background: linear-gradient(to right, var(--line-strong) 0%, var(--line-strong) 24px, transparent 24px);
    margin-bottom: 10px;
  }

  .dish {
    display: flex;
    gap: 12px;
    padding: 12px 14px 12px 16px;
    align-items: flex-start;
    position: relative;
    background: var(--cream);
    transition: background 0.15s ease;
  }
  .dish:active { background: var(--paper); }
  .dish-img {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    background: var(--paper-2);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
  }
  .dish-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .dish-img .tag {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    background: var(--chili);
    color: var(--flame);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    border: 0.5px solid var(--flame-deep);
  }
  .dish-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 84px;
  }
  .dish-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  .dish-desc {
    font-size: 12px;
    color: var(--soot);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .dish-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 10px;
    color: var(--soot);
  }
  .meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    background: var(--paper);
    border-radius: 999px;
    font-weight: 500;
  }
  .meta-chip.spicy { background: rgba(200, 50, 31, 0.1); color: var(--chili-deep); }
  /* non-spicy: green, text only */
  .meta-chip.mild { background: rgba(74, 107, 63, 0.12); color: var(--jade); }
  .dish-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .price {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  .price .currency {
    font-size: 12px;
    margin-right: 1px;
    color: var(--soot);
  }
  .price .unit {
    font-size: 11px;
    color: var(--soot);
    font-family: var(--font-body);
    font-weight: 400;
    margin-left: 2px;
  }

  /* ============ ADD BUTTON / STEPPER ============ */
  .add-wrap {
    position: relative;
    min-width: 60px;
    height: 32px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
  }
  .add-btn {
    height: 32px;
    padding: 0 11px;
    background: var(--chili);
    color: var(--cream);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
  }
  .add-btn:hover { background: var(--chili-deep); }
  .add-btn .plus {
    width: 13px; height: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--flame);
    color: var(--ink);
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
  }
  .add-btn.has-options::after {
    content: '›';
    font-size: 16px;
    line-height: 1;
    margin-left: -2px;
    margin-right: -4px;
  }

  .stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    height: 32px;
    background: var(--cream);
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    overflow: hidden;
    /* no mount animation, it replayed on every cart render (see reconcileCartRows) */
  }
  .stepper button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    transition: background 0.1s ease;
  }
  .stepper button:active { background: var(--paper); }
  .stepper .qty {
    min-width: 24px;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
  }
  .stepper button.plus-btn { color: var(--chili); }
  .stepper button.minus-btn { color: var(--soot); }
  /* menu card stepper, about the same width as the Add button */
  .add-wrap .stepper button { width: 26px; font-size: 15px; }
  .add-wrap .stepper .qty { min-width: 16px; }
  /* red flash on the qty that changed */
  .stepper .qty.qty-bump { animation: qty-flash 0.45s ease-out; }
  @keyframes qty-flash {
    0%   { color: var(--chili); }
    100% { color: var(--ink); }
  }

  /* ============ CART BAR ============ */
  .cart-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 14px calc(var(--safe-b) + 12px);
    z-index: 50;
    pointer-events: none;
  }
  .cart-bar-inner {
    pointer-events: auto;
    background: var(--chili);
    color: var(--cream);
    border-radius: 999px;
    padding: 10px 8px 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
  }
  .cart-bar-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.12) 100%);
    pointer-events: none;
  }
  .cart-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
  }
  .cart-icon-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    background: var(--chili-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .cart-icon-wrap svg { width: 18px; height: 18px; color: var(--cream); }
  .cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--flame);
    color: var(--chili-deep);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--chili);
  }
  .cart-total {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }
  .cart-total .num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
  }
  .cart-total .sub {
    font-size: 10px;
    color: rgba(253,249,240,0.75);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 2px;
  }
  .checkout-btn {
    height: 38px;
    padding: 0 18px;
    background: var(--flame);
    color: var(--chili-deep);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
  }
  .checkout-btn:disabled {
    background: rgba(253,249,240,0.16);
    color: rgba(253,249,240,0.5);
  }
  .cart-bar.empty .cart-icon-wrap { background: rgba(0,0,0,0.20); }
  .cart-bar.empty .cart-icon-wrap svg { color: rgba(253,249,240,0.55); }
  .cart-bar.empty .cart-count { display: none; }
  .cart-bar.empty .cart-total .num { color: rgba(253,249,240,0.6); }

  /* ============ CART DRAWER ============ */
  .scrim {
    position: absolute;
    inset: 0;
    background: rgba(26,20,16,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .scrim.open { opacity: 1; pointer-events: auto; }

  .drawer {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 70;
    background: var(--cream) var(--grain);
    border-radius: 20px 20px 0 0;
    max-height: 80%;
    flex-direction: column;
    transform: translate3d(0, 100%, 0);
    /* hidden completely until .open */
    display: none;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0.16, 1);
    box-shadow: 0 -20px 60px rgba(0,0,0,0.3);
    padding-bottom: var(--safe-b);
    will-change: transform;
  }
  .drawer.open {
    display: flex;
    transform: translate3d(0, 0, 0);
  }
  .drawer-handle {
    width: 36px;
    height: 4px;
    background: var(--line-strong);
    border-radius: 999px;
    margin: 8px auto 4px;
    flex-shrink: 0;
  }
  .drawer-head {
    padding: 12px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .drawer-head .title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
  }
  .drawer-clear {
    font-size: 12px;
    color: var(--soot);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .drawer-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
  }
  .cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .cart-item:last-child { border-bottom: none; }
  .cart-item-info {
    flex: 1;
    min-width: 0;
  }
  .cart-item-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  .cart-item-mods {
    font-size: 11px;
    color: var(--soot);
    margin-top: 3px;
    line-height: 1.4;
  }
  /* diner's note on a cart line */
  .cart-item-note {
    font-size: 11px;
    color: var(--chili);
    margin-top: 3px;
    line-height: 1.4;
    font-style: italic;
  }
  .cart-item-note::before { content: '“'; }
  .cart-item-note::after  { content: '”'; }
  .cart-item-price {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
    margin-top: 4px;
  }
  .cart-item .stepper {
    flex-shrink: 0;
  }
  .drawer-foot {
    padding: 14px 20px 16px;
    border-top: 1px solid var(--line);
    background: var(--paper);
    flex-shrink: 0;
  }
  .drawer-summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
  }
  .drawer-summary .label {
    font-size: 12px;
    color: var(--soot);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
  }
  .drawer-summary .total {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    color: var(--ink);
    letter-spacing: -0.02em;
  }
  .drawer-checkout {
    width: 100%;
    height: 52px;
    background: var(--chili);
    color: var(--cream);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  /* waiting for staff approval */
  .drawer-checkout:disabled {
    background: #e7ddca;
    color: #8a7a5c;
    cursor: default;
  }
  /* hint under the send button */
  .drawer-approve-hint {
    font-size: 12.5px;
    line-height: 1.45;
    color: #6d4a12;
    background: rgba(184, 121, 26, 0.10);
    border: 1px solid rgba(184, 121, 26, 0.22);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
  }

  /* boot error */
  .boot-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding: 64px 28px;
    animation: bootErrorIn .45s cubic-bezier(.2,.7,.3,1) both;
  }
  .boot-error-msg {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.4;
    color: var(--ink);
    max-width: 300px;
  }
  @keyframes bootErrorIn {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to   { opacity: 1; transform: none; }
  }

  /* ============ ORDERS BUTTON (header) ============ */
  .orders-btn {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(253, 249, 240, 0.20);
    border-radius: 50%;
    color: var(--cream);
    flex-shrink: 0;
    transition: background 0.15s ease;
  }
  .orders-btn:active { background: rgba(0, 0, 0, 0.32); }
  .orders-btn svg { width: 15px; height: 15px; }
  .orders-btn .orders-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--flame);
    color: var(--chili-deep);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--chili);
    line-height: 1;
  }
  .orders-btn .orders-count.empty { display: none; }

  /* ============ ORDER SUCCESS TOAST ============ */
  .order-toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    z-index: 200;
    background: var(--cream);
    color: var(--ink);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    padding: 22px 24px;
    min-width: 260px;
    max-width: 320px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 4px solid var(--chili);
  }
  .order-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
  }
  .order-toast-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--chili);
    color: var(--flame);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 26px;
    font-weight: 700;
  }
  .order-toast-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
  }
  .order-toast-sub {
    font-size: 12px;
    color: var(--soot);
    text-align: center;
    margin-bottom: 4px;
  }
  .order-toast-id {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--chili);
    text-align: center;
    letter-spacing: 0.06em;
    font-weight: 600;
  }
  .order-toast-scrim {
    position: fixed;
    inset: 0;
    background: rgba(26,20,16,0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .order-toast-scrim.show { opacity: 1; pointer-events: auto; }

  /* error version of the toast */
  .order-toast.error { border-top-color: #c2601a; }
  .order-toast.error .order-toast-icon {
    background: radial-gradient(120% 120% at 30% 20%, #e6a81f 0%, #c2601a 46%, var(--chili) 100%);
    color: var(--cream);
  }
  .order-toast.error .order-toast-icon svg { width: 26px; height: 26px; }

  /* ============ PAST ORDERS (in orders drawer) ============ */
  .past-order {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
  }
  .past-order:last-child { border-bottom: none; }
  .past-order-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .past-order-id {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--chili);
    letter-spacing: 0.04em;
  }
  .past-order-time {
    font-size: 11px;
    color: var(--soot);
    font-variant-numeric: tabular-nums;
  }
  .past-order-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    background: rgba(184, 121, 26, 0.14);
    color: #8a5a12;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .past-order-status .dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
  }
  /* kitchen marked it done */
  .past-order-status.delivered {
    background: rgba(74, 107, 63, 0.14);
    color: var(--jade);
  }
  .past-order-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
  }
  .past-order-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
  }
  .past-order-item-main {
    flex: 1;
    min-width: 0;
  }
  .past-order-item-name {
    font-size: 13px;
    color: var(--ink);
    font-weight: 500;
  }
  .past-order-item-name .qty {
    color: var(--soot);
    font-weight: 400;
    margin-left: 4px;
  }
  .past-order-item-opts {
    font-size: 11px;
    color: var(--soot);
    margin-top: 1px;
    line-height: 1.35;
  }
  .past-order-item-note {
    font-size: 11px;
    color: var(--chili);
    margin-top: 1px;
    line-height: 1.35;
    font-style: italic;
  }
  .past-order-item-note::before { content: '“'; }
  .past-order-item-note::after  { content: '”'; }
  .past-order-item-price {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--ink);
    white-space: nowrap;
  }
  .past-order-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 10px;
    border-top: 1px dashed var(--line-strong);
  }
  .past-order-total .label {
    font-size: 11px;
    color: var(--soot);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
  }
  .past-order-total .total {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  .grand-total {
    padding: 14px 20px 16px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
  .grand-total .label {
    font-size: 12px;
    color: var(--soot);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
  }
  .grand-total .total {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--chili);
    letter-spacing: -0.02em;
  }

  /* ============ DISH DETAIL MODAL ============ */
  .modal {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    top: 0;
    z-index: 80;
    pointer-events: none;
    /* display:none until .open, so nothing leaks through (iOS) */
    display: none;
  }
  .modal-scrim {
    position: absolute;
    inset: 0;
    background: rgba(26,20,16,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .modal.open {
    pointer-events: auto;
    display: block;
  }
  .modal.open .modal-scrim { opacity: 1; }
  .modal-sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: var(--cream) var(--grain);
    border-radius: 20px 20px 0 0;
    max-height: 88%;
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.16, 1);
    box-shadow: 0 -20px 60px rgba(0,0,0,0.3);
    padding-bottom: var(--safe-b);
    will-change: transform;
  }
  .modal.open .modal-sheet { transform: translate3d(0, 0, 0); }
  .modal-hero {
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
  }
  .modal-hero img {
    width: 100%; height: 100%;
    object-fit: cover;
  }
  .modal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(26,20,16,0.6) 100%);
  }
  .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(26,20,16,0.6);
    color: var(--cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
    font-size: 18px;
  }
  .modal-title {
    position: absolute;
    bottom: 14px;
    left: 18px;
    right: 18px;
    color: var(--cream);
    z-index: 2;
  }
  .modal-title .zh {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }
  .modal-title .desc {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
    line-height: 1.4;
  }
  .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 18px 20px 20px;
  }
  .option-group { margin-bottom: 18px; }
  .option-group:last-child { margin-bottom: 0; }
  .option-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .option-head .name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
  }
  .option-head .req {
    font-size: 10px;
    color: var(--chili);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
  }
  .option-head .opt {
    font-size: 10px;
    color: var(--soot);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
  }
  .option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .opt-chip {
    padding: 9px 14px;
    background: var(--cream);
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
  }
  .opt-chip .pp {
    font-size: 11px;
    color: var(--chili);
    font-weight: 600;
  }
  .opt-chip.selected {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
  }
  .opt-chip.selected .pp { color: var(--flame); }

  /* 不辣 badge */
  .opt-chip .np {
    font-size: 10px;
    font-weight: 600;
    color: var(--jade);
    background: rgba(74, 107, 63, 0.12);
    border-radius: 999px;
    padding: 1px 6px;
    letter-spacing: 0.02em;
  }
  .opt-chip.selected .np { color: var(--flame); background: rgba(253, 249, 240, 0.16); }
  /* locked by applyNonSpicyRule; greyed out, not removed, so nothing moves */
  .opt-chip.locked {
    opacity: 0.38;
    pointer-events: none;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
  }

  /* ---- kitchen note (allowNote dishes) ---- */
  .note-group { margin-top: 20px; }
  .note-input {
    width: 100%;
    min-height: 62px;
    padding: 11px 13px;
    background: var(--cream);
    border: 1.5px solid var(--line-strong);
    border-radius: 12px;
    font-family: inherit;
    /* under 16px and iOS zooms in on focus */
    font-size: 16px;
    line-height: 1.45;
    color: var(--ink);
    resize: none;
    /* body has user-select:none, undo it for the textarea */
    user-select: text;
    -webkit-user-select: text;
    transition: border-color 0.15s ease;
  }
  .note-input::placeholder { color: var(--soot); opacity: 0.6; }
  .note-input:focus {
    outline: none;
    border-color: var(--chili);
  }
  .note-foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 6px;
    font-size: 10px;
    color: var(--soot);
    letter-spacing: 0.04em;
  }
  .note-count { font-variant-numeric: tabular-nums; }

  .modal-foot {
    padding: 12px 20px calc(var(--safe-b) + 14px);
    background: var(--cream);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }
  .modal-stepper {
    height: 44px;
    background: var(--paper);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
  }
  .modal-stepper button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    border-radius: 50%;
  }
  .modal-stepper button:disabled { color: var(--line-strong); }
  .modal-stepper .qty {
    min-width: 28px;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
  }
  .modal-add {
    flex: 1;
    height: 44px;
    background: var(--chili);
    color: var(--cream);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .modal-add .total {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  /* ============ EMPTY STATE ============ */
  .empty-cart {
    padding: 40px 20px;
    text-align: center;
    color: var(--soot);
  }
  .empty-cart .icon {
    font-size: 40px;
    margin-bottom: 8px;
    opacity: 0.4;
  }
  .empty-cart .msg {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--ink);
  }
  .empty-cart .sub {
    font-size: 12px;
    margin-top: 4px;
  }

  /* ============ FLY-TO-CART ANIMATION ============ */
  .fly-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--chili);
    border-radius: 50%;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(200, 50, 31, 0.5);
  }

  @keyframes cart-bounce {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.15); }
    70% { transform: scale(0.95); }
  }
  .cart-bounce { animation: cart-bounce 0.4s ease; }

  /* ============ SOLD OUT ============ */
  /* still shown, greyed out, no add controls */
  .dish.sold-out { opacity: 0.66; }
  .dish.sold-out .dish-img img {
    filter: grayscale(1) contrast(0.9);
  }
  .dish-img .tag.sold {
    background: var(--soot);
    color: var(--cream);
  }
  .sold-out-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--soot);
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  /* sold out while in the cart; renderDrawer() blocks sending */
  .cart-item.unavailable { opacity: 0.7; }
  .cart-item-soldout {
    font-size: 11px;
    font-weight: 700;
    color: var(--chili);
    margin-top: 3px;
  }

  /* ============ CART ERROR TOAST ============ */
  /* small banner for failed cart writes */
  .cart-toast {
    position: fixed;
    top: calc(var(--safe-t) + 10px);
    left: 50%;
    z-index: 120;
    max-width: min(92vw, 420px);
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--chili);
    color: var(--cream);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -14px);
    transition: opacity .22s ease, transform .22s cubic-bezier(.4,0,.2,1);
  }
  .cart-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  @media (prefers-reduced-motion: reduce) {
    .cart-toast { transition: opacity .22s ease; transform: translate(-50%, 0); }
  }
