  :root {
    --bg:          #e6e6e6;
    --bg-dark:     #d8d8d8;
    --bg-card:     #f4f4f4;
    --bg-panel:    #ebebeb;
    --border:      #c0c0c0;
    --border-mid:  #adadad;
    --border-top:  #909090;
    --red:         #AF2226;
    --red-dark:    #7a1220;
    --red-dim:     #a8323f;
    --muted:       #6a6a6a;
    --muted-dark:  #505050;
    --muted-deep:  #888888;
    --muted-text:  #5e5e5e;
    --green:       #1f6e1f;
    --orange:      #a84e00;
    --danger:      #b91c1c;
    --body-text:   #1a1a1a;
    --desc-text:   #444444;
    --font-sans:   'Inter', system-ui, sans-serif;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: var(--font-sans); background: var(--bg); color: var(--body-text); min-height: 100vh; }

  header {
    background: #000;
    border-bottom: 1px solid var(--border-top);
    text-align: center; padding: 20px 20px 14px;
  }
  header h1 { line-height: 0; }
  .header-logo { height: clamp(96px, 24vw, 132px); width: auto; }

  /* Language toggle — sits centered below the logo in normal flow, not
     pinned to a corner, so it never competes with the header title for
     horizontal space (that fight was pushing the title off-center). */
  .lang-toggle { display: flex; gap: 4px; justify-content: center; margin: 4px auto 0; width: fit-content; }
  .lang-btn {
    padding: 5px 12px; border-radius: 20px; border: 1.5px solid #555;
    background: transparent; color: #b0b0b0; font-family: var(--font-sans);
    font-size: 0.72rem; font-weight: 500; cursor: pointer; transition: all 0.15s;
  }
  .lang-btn.active { background: var(--red); color: white; border-color: var(--red); font-weight: 600; }

  .screen { display: none; }
  .screen.active { display: block; }

  #info-screen { max-width: 480px; margin: 36px auto; padding: 0 20px; }
  .card { background: var(--bg-card); border-radius: 10px; padding: 28px; border: 1px solid var(--border); }
  .card h2 { font-family: var(--font-sans); font-size: 1.45rem; margin-bottom: 6px; color: var(--red-dark); }
  .card > p { color: var(--muted-text); font-size: 0.88rem; line-height: 1.6; margin-bottom: 22px; }
  .text-danger { color: var(--danger); font-weight: 700; }
  .info-notice-icon { font-size: 9rem; line-height: 1; text-align: center; margin: 4px 0 16px; }
  .info-wait-text { font-size: 1.3rem; }
  .text-center { text-align: center; }
  label { display: block; font-size: 0.72rem; font-weight: 500; color: var(--red); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.1em; }
  input, textarea, select {
    width: 100%; padding: 11px 13px; border: 1.5px solid var(--border-mid); border-radius: 8px;
    font-family: var(--font-sans); font-size: 16px; color: var(--body-text);
    background: var(--bg-card); outline: none; transition: border 0.2s; margin-bottom: 16px;
  }
  input:focus, textarea:focus, select:focus { border-color: var(--red); }
  textarea { resize: vertical; min-height: 70px; }

  .phone-row { display: flex; gap: 8px; margin-bottom: 16px; }
  .phone-row select, .phone-row input { margin-bottom: 0; }
  .phone-row select { width: auto; flex-shrink: 0; }
  .phone-row input { flex: 1; }

  .name-row { display: flex; gap: 8px; }
  .name-row .name-col { flex: 1; min-width: 0; }

  .btn {
    display: inline-block; padding: 12px 26px; border-radius: 24px; border: 2px solid;
    font-family: var(--font-sans); font-size: 0.93rem; font-weight: 500;
    cursor: pointer; transition: all 0.18s; text-align: center; width: 100%;
  }
  .btn-primary { background: var(--red); color: white; border-color: var(--red); }
  .btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
  .btn-secondary { background: transparent; color: var(--muted-dark); border-color: var(--border-mid); }
  .btn-secondary:hover { border-color: var(--border-top); color: var(--body-text); }

  .maps-link {
    display: inline-block; padding: 8px 18px; border-radius: 20px; border: 1.5px solid var(--red);
    color: var(--red); font-family: var(--font-sans); font-size: 0.85rem; font-weight: 500;
    text-decoration: none; transition: all 0.18s;
  }
  .maps-link:hover { background: var(--red); color: white; }

  /* Payment method picker */
  .payment-options { display: flex; gap: 10px; margin-bottom: 18px; }
  .pay-btn {
    flex: 1; padding: 14px 10px; border-radius: 10px; border: 2px solid var(--border-mid);
    background: var(--bg-panel); cursor: pointer; transition: all 0.18s; text-align: center;
    font-family: var(--font-sans);
  }
  .pay-btn .pay-icon { font-size: 1.6rem; display: block; margin-bottom: 5px; }
  .pay-btn .pay-label { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
  .pay-btn:hover { border-color: var(--red); }
  .pay-btn.selected { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--bg-panel)); }
  .pay-btn.selected .pay-label { color: var(--red-dark); font-weight: 600; }

  #menu-screen { max-width: 640px; margin: 0 auto; padding: 16px 16px 90px; }
  .section-title {
    font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; color: var(--red);
    letter-spacing: 0.05em; border-bottom: 2px solid var(--red);
    padding-bottom: 7px; margin: 28px 0 14px;
    display: flex; align-items: baseline; gap: 9px;
  }
  .section-title span { font-size: 0.78rem; color: var(--muted-text); font-style: italic; font-weight: 300; }

  .menu-item {
    background: var(--bg-card); border-radius: 0 8px 8px 0; padding: 14px 16px; margin-bottom: 9px;
    display: flex; align-items: flex-start; gap: 12px;
    border-left: 4px solid var(--border-mid); transition: border-left-color 0.15s;
  }
  .menu-item:hover { border-left-color: var(--red); }
  .item-info { flex: 1; }
  .item-name { font-weight: 500; font-size: 0.97rem; color: var(--body-text); margin-bottom: 2px; }
  .item-name-zh { font-weight: 400; font-size: 0.85rem; color: var(--muted-text); }
  .item-desc { font-size: 0.8rem; color: var(--desc-text); line-height: 1.4; }
  .item-tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
  .tag { font-size: 0.68rem; padding: 2px 8px; border-radius: 12px; font-weight: 500; border: 1.5px solid; }
  .tag-sig { border-color: var(--red-dim); color: var(--red-dim); }
  .tag-veg { border-color: var(--green); color: var(--green); }
  .tag-vegan { border-color: var(--green); color: var(--green); }
  .tag-spicy { border-color: var(--orange); color: var(--orange); }
  .tag-weekend { border-color: var(--red-dim); color: var(--red-dim); }
  .tag-gf { border-color: var(--muted-dark); color: var(--muted-dark); }
  .item-allergens { font-size: 0.72rem; color: var(--muted-deep); margin-top: 4px; font-style: italic; }
  .menu-loading, .menu-error { text-align: center; padding: 50px 20px; color: var(--muted-text); }
  .menu-error button { margin-top: 14px; }
  .item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 86px; }
  .item-price { font-weight: 600; font-size: 0.97rem; color: var(--body-text); }
  .qty-ctrl { display: flex; align-items: center; gap: 7px; }
  .qty-btn {
    width: 27px; height: 27px; border-radius: 50%; border: 1.5px solid var(--red);
    background: transparent; color: var(--red); font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s; font-weight: 700; line-height: 1;
  }
  .qty-btn:hover { background: var(--red); color: white; }
  .qty-num { font-weight: 600; font-size: 0.97rem; min-width: 18px; text-align: center; }
  .add-to-cart-btn {
    padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--red);
    background: transparent; color: var(--red); font-family: var(--font-sans);
    font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap;
  }
  .add-to-cart-btn:hover { background: var(--red); color: white; }
  .add-ons { background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--border); padding: 10px 12px; margin: 6px 0 16px; font-size: 0.8rem; color: var(--muted-text); line-height: 1.5; }
  .add-ons strong { color: var(--body-text); }

  /* Cart bar */
  #cart-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--red-dark); color: white;
    padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.18); transform: translateY(100%);
    transition: transform 0.3s ease; z-index: 200;
  }
  #cart-bar.visible { transform: translateY(0); }
  #cart-bar.hidden { display: none !important; }
  #cart-bar .cart-info { display: flex; flex-direction: column; }
  #cart-bar .cart-count { font-size: 0.78rem; color: rgba(255,255,255,0.65); }
  #cart-bar .cart-total { font-size: 1.05rem; font-weight: 600; color: white; }
  #cart-bar .cbtn { padding: 10px 20px; border-radius: 20px; border: 2px solid rgba(255,255,255,0.7); background: transparent; color: white; font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.18s; }
  #cart-bar .cbtn:hover { background: white; color: var(--red-dark); }

  #cart-screen { max-width: 560px; margin: 0 auto; padding: 20px 20px 100px; }
  #cart-screen h2 { font-family: var(--font-sans); font-size: 1.55rem; margin-bottom: 18px; color: var(--red-dark); }
  .cart-line { background: var(--bg-card); border-radius: 8px; padding: 13px 15px; margin-bottom: 7px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); }
  .cart-line-name { font-weight: 500; font-size: 0.93rem; }
  .cart-line-qty { color: var(--muted); font-size: 0.82rem; }
  .cart-line-price { font-weight: 600; color: var(--body-text); white-space: nowrap; }
  .cart-line-remove { color: var(--border-mid); cursor: pointer; font-size: 1.2rem; margin-left: 10px; transition: color 0.15s; }
  .cart-line-remove:hover { color: var(--danger); }
  .cart-total-row { background: var(--red-dark); color: white; border-radius: 8px; padding: 14px 16px; display: flex; justify-content: space-between; margin: 18px 0; font-size: 1.05rem; font-weight: 600; }
  .cart-total-row span:last-child { color: rgba(255,255,255,0.8); }

  /* Payment summary badge in cart */
  .payment-summary {
    background: color-mix(in srgb, var(--red) 8%, var(--bg-card));
    border: 1.5px solid var(--red-dim); border-radius: 8px;
    padding: 11px 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; color: var(--body-text);
  }
  .payment-summary .pay-icon { font-size: 1.2rem; }
  .payment-summary .change-pay { margin-left: auto; font-size: 0.8rem; color: var(--muted); cursor: pointer; text-decoration: underline; }

  #wait-screen { max-width: 480px; margin: 36px auto; padding: 0 20px; text-align: center; }
  .wait-card { background: var(--bg-card); border-radius: 10px; padding: 36px 28px; border: 1px solid var(--border); }
  .wait-icon { font-size: 2.8rem; margin-bottom: 14px; animation: pulse 2s ease-in-out infinite; display: block; }
  @keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
  .wait-card h2 { font-family: var(--font-sans); font-size: 1.7rem; margin-bottom: 8px; color: var(--red-dark); }
  .order-num { font-size: 2.2rem; font-weight: 700; color: var(--red); font-family: var(--font-sans); margin: 10px 0; letter-spacing: 0.06em; }
  .wait-card > p { color: var(--muted-text); font-size: 0.92rem; line-height: 1.6; }
  .wait-warning { color: var(--danger); font-weight: 700; font-size: 0.88rem; margin-bottom: 4px; }
  .wait-warning.hidden { display: none; }

  /* Stay-on-page banner */
  .stay-banner {
    background: var(--bg-dark); color: var(--body-text); border-radius: 8px; border: 1px solid var(--border-mid);
    padding: 14px 18px; margin: 16px 0 20px; display: flex; align-items: center; gap: 12px;
    text-align: left; font-size: 0.88rem; line-height: 1.5;
  }
  .stay-banner .stay-icon { font-size: 1.4rem; flex-shrink: 0; }
  .stay-banner strong { display: block; font-size: 0.92rem; color: var(--red); margin-bottom: 2px; }
  .stay-banner.hidden { display: none; }

  /* Countdown ring */
  .countdown-wrap { position: relative; width: 90px; height: 90px; margin: 0 auto 6px; }
  .countdown-wrap svg { transform: rotate(-90deg); }
  .countdown-track { fill: none; stroke: var(--border); stroke-width: 6; }
  .countdown-ring { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round;
    stroke-dasharray: 245; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke 0.3s; }
  .countdown-ring.urgent { stroke: var(--danger); }
  .countdown-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-sans); font-size: 1.6rem; font-weight: 700; color: var(--body-text); }
  .countdown-num.urgent { color: var(--danger); }
  .countdown-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }

  .status-steps { display: flex; flex-direction: column; gap: 8px; margin: 22px 0; text-align: left; }
  .step { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 8px; font-size: 0.88rem; border: 1.5px solid; }
  .step.done { background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green); border-color: color-mix(in srgb, var(--green) 28%, transparent); }
  .step.active { background: color-mix(in srgb, var(--orange) 10%, transparent); color: var(--orange); border-color: color-mix(in srgb, var(--orange) 28%, transparent); }
  .step.pending { background: var(--bg-panel); color: var(--muted-deep); border-color: var(--border); }
  .step-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
  .step.done .step-dot { background: var(--green); }
  .step.active .step-dot { background: var(--orange); animation: blink 1s ease-in-out infinite; }
  .step.pending .step-dot { background: var(--border-mid); }
  @keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

  .live-indicator { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; font-size: 0.76rem; color: var(--muted-text); }
  .live-indicator.hidden { display: none; }
  .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px color-mix(in srgb, var(--green) 55%, transparent); animation: live-glow 1.6s ease-in-out infinite; }
  @keyframes live-glow { 0%,100% { opacity: 0.5; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }

  .wait-time-badge { display: inline-block; background: var(--green); color: white; padding: 9px 22px; border-radius: 24px; font-weight: 600; font-size: 1.05rem; margin: 8px 0; }
  .wait-time-badge.ready-soon { background: var(--orange); }
  .pickup-updated-note { font-size: 0.78rem; color: var(--red); font-style: italic; margin-top: 6px; }
  .rejection-card { background: color-mix(in srgb, var(--danger) 6%, transparent); border: 1.5px solid color-mix(in srgb, var(--danger) 22%, transparent); border-radius: 8px; padding: 18px; margin: 14px 0; text-align: left; }
  .rejection-card h3 { color: var(--danger); font-size: 0.97rem; margin-bottom: 5px; }
  .rejection-card p { color: var(--muted-text); font-size: 0.88rem; }

  /* "Start New Order" confirmation popup */
  .confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
  .confirm-dialog { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 26px 24px; max-width: 340px; width: 100%; text-align: center; }
  .confirm-dialog p { color: var(--body-text); font-size: 1rem; margin-bottom: 18px; }
  .confirm-actions { display: flex; gap: 10px; justify-content: center; }
  .confirm-actions .btn { margin: 0; flex: 1; }

  /* Gate screens */
  #gate-screen { max-width: 480px; margin: 60px auto; padding: 0 20px; text-align: center; }
  .gate-card { background: var(--bg-card); border-radius: 10px; padding: 44px 32px; border: 1px solid var(--border); }
  .gate-icon { font-size: 3.2rem; margin-bottom: 18px; display: block; }
  .gate-card h2 { font-family: var(--font-sans); font-size: 1.8rem; margin-bottom: 10px; color: var(--red-dark); }
  .gate-card p { color: var(--muted-text); font-size: 0.95rem; line-height: 1.7; margin-bottom: 6px; }
  .gate-offline-note { font-weight: 700; color: var(--danger); }
  .gate-hours { background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--border); padding: 16px 20px; margin: 20px 0 0; font-size: 0.88rem; color: var(--muted-text); line-height: 1.8; }
  .gate-hours strong { color: var(--red); display: block; margin-bottom: 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
  .config-notice { background: color-mix(in srgb, var(--red) 8%, transparent); border: 1px solid var(--red-dim); border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: 0.82rem; color: var(--red-dark); line-height: 1.5; }
  .config-notice strong { display: block; margin-bottom: 3px; }
  .empty-cart { text-align: center; padding: 36px 20px; color: var(--muted); }

  /* Protein add-on selector */
  .protein-panel {
    background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--border); padding: 12px 14px;
    margin-top: 8px; display: none;
  }
  .protein-panel.open { display: block; }
  .protein-panel-title { font-size: 0.7rem; font-weight: 600; color: var(--red);
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
  .protein-row { display: flex; align-items: center; gap: 8px;
    padding: 7px 0; border-bottom: 1px solid var(--border); }
  .protein-row:last-child { border-bottom: none; }
  .protein-info { font-size: 0.88rem; color: var(--body-text); flex: 1; min-width: 0; }
  .protein-info span { color: var(--muted); font-size: 0.8rem; }
  .protein-price { font-size: 0.82rem; color: var(--muted); white-space: nowrap; min-width: 36px; text-align: right; }
  .protein-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .protein-qty-btn { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--red);
    background: transparent; color: var(--red); font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s;
    font-weight: 700; line-height: 1; flex-shrink: 0; }
  .protein-qty-btn:hover { background: var(--red); color: white; }
  .protein-qty-num { font-size: 0.88rem; font-weight: 600; min-width: 16px; text-align: center; }

  /* Spice level selector */
  .spice-section { margin-top: 10px; }
  .spice-label { font-size: 0.7rem; font-weight: 600; color: var(--red);
    text-transform: uppercase; letter-spacing: 0.1em; margin-top: 5px; margin-bottom: 5px; display: block; }
  .spice-options { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 25px; }
  .spice-pill {
    padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--border-mid);
    background: transparent; color: var(--muted); font-family: var(--font-sans);
    font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
  }
  .spice-pill:hover { border-color: var(--red); color: var(--red); }
  .spice-pill.selected { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 10%, transparent); color: var(--orange); font-weight: 600; }
  .spice-pill.selected.mild { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green); }
  .spice-note { font-size: 0.74rem; color: var(--muted-deep); font-style: italic; line-height: 1.4; margin-bottom: 7px; }

  /* Gluten-free / vegan accommodation toggle */
  .diet-toggle { margin-top: 10px; }
  .diet-toggle-label { font-size: 0.7rem; font-weight: 600; color: var(--red);
    text-transform: uppercase; letter-spacing: 0.1em; margin-top: 5px; margin-bottom: 5px; display: block; }
  .diet-toggle-options { display: flex; gap: 6px; margin-bottom: 25px; }
  .diet-toggle-pill {
    padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--border-mid);
    background: transparent; color: var(--muted); font-family: var(--font-sans);
    font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
  }
  .diet-toggle-pill:hover { border-color: var(--red); color: var(--red); }
  .diet-toggle-pill.selected { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green); font-weight: 600; }
  .diet-toggle-note { font-size: 0.74rem; color: var(--muted-deep); font-style: italic; line-height: 1.4; margin-bottom: 7px; }

  /* Per-item note */
  .item-note-wrap { margin-top: 10px; }
  .item-note-input {
    width: 100%; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--border-mid);
    font-family: var(--font-sans); font-size: 16px; color: var(--body-text);
    background: var(--bg-card); outline: none; resize: none; transition: border 0.2s;
    min-height: 56px;
  }
  .item-note-input:focus { border-color: var(--red); }

  /* Unavailable item */
  .menu-item.unavailable { opacity: 0.45; pointer-events: none; }
  .unavailable-badge {
    display: inline-block; font-size: 0.72rem; padding: 2px 8px; border-radius: 6px;
    background: var(--bg-panel); color: var(--muted); font-weight: 500; margin-left: 6px; border: 1px solid var(--border);
  }
  .section-note { font-size: 0.8rem; color: var(--muted-deep); font-style: italic; margin: -6px 0 12px; }

  /* Footer — matches allergens.cantopv.com's footer treatment (centered,
     muted, top border), scaled down to this site's smaller base font size.
     Extra bottom padding (90px, matching the clearance used elsewhere in
     this file) keeps it clear of the fixed cart bar when the cart has items. */
  footer {
    border-top: 1px solid var(--border);
    padding: 24px 20px 90px;
    text-align: center;
    color: var(--muted-deep);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    line-height: 1.8;
  }

  @media (max-width: 480px) {
    #menu-screen, #cart-screen, #info-screen, #wait-screen { padding-left: 12px; padding-right: 12px; }
  }
