/* Street Cuizine "Street Fire" design system (S10, decision 23023ec7).
   Tokens first (light, then a designed dark), then base, chrome, components, pages, and motion last.
   Every animation lives in the prefers-reduced-motion: no-preference block or the @supports block, so a page is
   complete with zero motion (Firefox, reduced motion). Only transform and opacity are animated. */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("/fonts/bricolage-display-latin.woff2") format("woff2");
    font-weight: 600 800;
    font-style: normal;
    font-display: optional;
}

/* S16a Night Market faces (customer pages). Anton is preloaded; Space Grotesk is variable 300–700. */
@font-face {
    font-family: "Anton";
    src: url("/fonts/anton-latin.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

/* S16c Editorial desk faces (operator, sign-in and admin pages). Instrument Serif ships weight 400 only. */
@font-face {
    font-family: "Instrument Serif";
    src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Instrument Serif";
    src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Inter Tight";
    src: url("/fonts/inter-tight-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --sc-paper: #FFF7EC;
    --sc-surface: #FFFFFF;
    --sc-sunk: #F6EADA;
    --sc-ink: #17120F;
    --sc-ink-2: #5C4E44;
    --sc-chili: #C42E17;
    --sc-chili-ink: #FFFFFF;
    --sc-chili-soft: #FBE3DC;
    --sc-saffron: #F4A51C;
    --sc-basil: #17704A;
    --sc-line: #E8DCCB;
    --sc-field: #8A7D73;
    --sc-focus: #1F4FD8;
    --sc-error: #B3261E;
    --sc-hue-0: #B42318;
    --sc-hue-1: #8A5A00;
    --sc-hue-2: #146C43;
    --sc-hue-3: #7A2E6E;
    --sc-hue-4: #1F4FB8;
    --sc-hue-5: #0F6E74;
    --sc-hue-6: #A13D1A;
    --sc-hue-7: #2B2522;
    --sc-shadow: 0 1px 2px rgb(23 18 15 / 0.06), 0 8px 24px -8px rgb(23 18 15 / 0.18);
    --sc-shadow-lift: 0 2px 4px rgb(23 18 15 / 0.08), 0 24px 48px -16px rgb(23 18 15 / 0.28);
    --sc-glass: rgb(255 247 236 / 0.78);
    --sc-display: "Bricolage Grotesque", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --sc-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --sc-radius: 20px;
    --sc-radius-sm: 14px;
    --sc-ease-out: cubic-bezier(.22, 1, .36, 1);
    --sc-ease-spring: cubic-bezier(.34, 1.36, .64, 1);
    --sc-spring: cubic-bezier(.32, .72, 0, 1);
    --sc-fast: 160ms;
    --sc-mid: 240ms;
    --sc-slow: 420ms;
    --sc-gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
    :root {
        --sc-paper: #120D0A;
        --sc-surface: #1E1713;
        --sc-sunk: #19120F;
        --sc-ink: #FBF3E8;
        --sc-ink-2: #CDBFB1;
        --sc-chili: #FF6A4A;
        --sc-chili-ink: #1A0F0B;
        --sc-chili-soft: #3A1C14;
        --sc-saffron: #FFC24D;
        --sc-basil: #4FD18B;
        --sc-line: #3A2E27;
        --sc-field: #8C7D71;
        --sc-focus: #8AB4FF;
        --sc-error: #FFB4A8;
        --sc-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -8px rgb(0 0 0 / 0.6);
        --sc-shadow-lift: 0 2px 4px rgb(0 0 0 / 0.4), 0 24px 48px -16px rgb(0 0 0 / 0.7);
        --sc-glass: rgb(18 13 10 / 0.74);
    }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--sc-paper);
    color: var(--sc-ink);
    font: 1.0625rem/1.55 var(--sc-text);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "kern";
}
h1, h2, h3 { font-family: var(--sc-display); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 .75rem; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 9vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.625rem, 6vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; text-wrap: pretty; }
a { color: var(--sc-chili); text-underline-offset: .18em; }
img, svg { max-width: 100%; height: auto; }
.tagline { font-size: 1.25rem; color: var(--sc-ink-2); margin: 0 0 1.5rem; }
.status, .muted { color: var(--sc-ink-2); }
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 3px; border-radius: 6px; }
.skip-link {
    position: absolute; left: var(--sc-gutter); top: .5rem; z-index: 100;
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 1rem;
    background: var(--sc-ink); color: var(--sc-paper); border-radius: 999px; font-weight: 700; text-decoration: none;
    transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus {
    left: var(--sc-gutter); top: .75rem; z-index: 20; display: inline-flex; align-items: center; min-height: 48px; padding: 0 1rem;
    background: var(--sc-ink); color: var(--sc-paper); border-radius: 999px; font-weight: 700; text-decoration: none;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
main { flex: 1; width: 100%; max-width: 44rem; margin: 0 auto; padding: 2rem var(--sc-gutter) 3rem; outline: none; }
main:has(.landing) { max-width: none; padding: 0; }

/* ---------- Chrome ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .375rem var(--sc-gutter); padding-top: max(.375rem, env(safe-area-inset-top));
    background: var(--sc-glass);
    -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    border-bottom: 1px solid var(--sc-line);
}
.wordmark {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 48px;
    font: 800 1.1875rem/1 var(--sc-display); letter-spacing: -0.03em; color: var(--sc-ink); text-decoration: none;
}
.wordmark-z { color: var(--sc-chili); }
.wordmark-glyph {
    width: 1.5rem; height: 1.5rem; border-radius: 7px; background: var(--sc-chili);
    box-shadow: inset 0 -.45rem 0 rgb(0 0 0 / 0.18);
}
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 .75rem; border-radius: 999px;
    color: var(--sc-ink); font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.site-nav a:hover { background: var(--sc-sunk); }
.site-nav .nav-cta { background: var(--sc-ink); color: var(--sc-paper); }
.site-nav .nav-cta:hover { background: var(--sc-chili); color: var(--sc-chili-ink); }
@media (max-width: 30rem) { .site-nav a:not(.nav-cta):not([href="/map"]) { display: none; } }
.site-footer {
    padding: 2.5rem var(--sc-gutter) max(2.5rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--sc-line); color: var(--sc-ink-2); font-size: .9375rem; text-align: center;
}
.site-footer p { margin: 0 0 .25rem; }
.footer-mark { font: 700 1rem/1.4 var(--sc-display); color: var(--sc-ink); }
.footer-lang { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.footer-lang a {
    display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; padding: 0 1rem; border-radius: 999px;
    color: var(--sc-ink); text-decoration: none; border: 1px solid var(--sc-line);
}
.footer-lang a:hover { background: var(--sc-sunk); }
.footer-lang a[aria-current="true"] { background: var(--sc-ink); color: var(--sc-paper); border-color: var(--sc-ink); }

/* S19: Privacy and Terms links (footer and standalone truck/order/status pages), the legal pages and the sign-up box. */
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 1rem; margin: .75rem 0 0; }
.legal-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 .25rem; color: inherit; text-underline-offset: 3px; }
.legal { max-width: 42rem; margin: 0 auto; overflow-wrap: anywhere; }
.legal h2 { margin: 2rem 0 .5rem; scroll-margin-top: 5rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin: 0 0 .375rem; }
.legal-effective { font-weight: 700; }
.legal-contents { border: 1px solid var(--sc-line); border-radius: var(--sc-radius-sm); padding: .5rem 1rem; margin: 1.25rem 0; }
.legal-contents ol { margin: 0; padding-left: 1.25rem; }
.legal-contents a { display: inline-block; padding: .5rem 0; min-height: 24px; }
.field-check { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 0 .75rem; }
.field-check input[type="checkbox"] { width: 24px; height: 24px; min-height: 0; margin: 12px 0; padding: 0; accent-color: var(--sc-ink); }
.field-check label { display: block; font-weight: 400; margin: 0; padding: 12px 0; min-height: 48px; line-height: 1.5; }
.field-check .field-error { grid-column: 1 / -1; }

/* S20: soft email-confirmation reminder on the dashboard. */
.email-confirm {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
    margin: 0 0 1.25rem; padding: .875rem 1rem; border: 1.5px solid var(--sc-line); border-radius: var(--sc-radius-sm);
    background: var(--sc-surface);
}
.email-confirm p { margin: 0; flex: 1 1 14rem; }
.email-confirm form { margin: 0; }
.email-confirm button { min-height: 48px; }

/* ---------- Controls ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 2rem; }
.cta, button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 52px; min-width: 48px; padding: .75rem 1.375rem;
    border: 0; border-radius: var(--sc-radius-sm);
    background: var(--sc-chili); color: var(--sc-chili-ink);
    font: 700 1.0625rem/1.2 var(--sc-text); letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.25) inset, 0 6px 18px -8px rgb(196 46 23 / 0.7);
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.cta.secondary, button.secondary { background: var(--sc-surface); color: var(--sc-ink); box-shadow: inset 0 0 0 1.5px var(--sc-field); }
.cta.ghost { background: transparent; color: var(--sc-ink); box-shadow: none; text-decoration: underline; }
button:disabled { opacity: .55; cursor: not-allowed; }
.field { margin: 0 0 1.25rem; }
.field label, .filter label { display: block; font-weight: 700; margin: 0 0 .375rem; }
.field input, .field textarea, .field select, .filter select {
    width: 100%; min-height: 52px; padding: .75rem .875rem;
    border: 1.5px solid var(--sc-field); border-radius: var(--sc-radius-sm);
    background: var(--sc-surface); color: var(--sc-ink); font: inherit;
}
.filter select { width: auto; }
.field textarea { min-height: 7rem; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--sc-error); }
.field-error, .form-error { color: var(--sc-error); font-weight: 700; margin: .375rem 0 0; }
.error-summary { border: 2px solid var(--sc-error); border-radius: var(--sc-radius-sm); padding: .75rem 1rem; margin: 0 0 1.5rem; background: var(--sc-surface); }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 1rem; }
.choices { border: 1.5px solid var(--sc-field); border-radius: var(--sc-radius-sm); padding: .75rem 1rem; margin: 0 0 1.25rem; }
.choices legend { font-weight: 700; padding: 0 .25rem; }
.check { display: flex; align-items: center; gap: .75rem; min-height: 48px; }
.check input { width: 1.5rem; height: 1.5rem; accent-color: var(--sc-chili); }
.danger { margin: 2rem 0 0; }
.danger summary, .spot summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.danger summary { color: var(--sc-error); }

/* ---------- Surfaces and components ---------- */
.card, .share, .spot, .queue-order {
    background: var(--sc-surface); border-radius: var(--sc-radius); padding: 1.25rem; margin: 0 0 1.25rem;
    box-shadow: var(--sc-shadow); border: 1px solid var(--sc-line);
}
.share { word-break: break-all; }
.share a { color: var(--sc-ink); font-weight: 700; }
.spot details { margin: 1rem 0 0; }
.live { margin: 1rem 0 0; }
.live-gps { border-top: 1px solid var(--sc-line); padding: 1rem 0 0; margin: 0 0 1rem; }
.live-gps h3 { margin: 0 0 .5rem; font-size: 1.125rem; }
.live-gps form { margin: .5rem 0 0; }
.live-label { color: var(--sc-ink); font-weight: 700; }
.truck-mark {
    display: inline-grid; place-items: center; flex: none;
    width: 3rem; height: 3rem; border-radius: 14px;
    color: #FFFFFF; font: 800 1.125rem/1 var(--sc-display); letter-spacing: -0.02em;
    box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.2);
}
.truck-mark.mark-lg { width: 4.5rem; height: 4.5rem; border-radius: 20px; font-size: 1.75rem; }
.truck-mark.mark-sm { width: 2rem; height: 2rem; border-radius: 9px; font-size: .8125rem; }
.hue-0 { background: var(--sc-hue-0); } .hue-1 { background: var(--sc-hue-1); } .hue-2 { background: var(--sc-hue-2); } .hue-3 { background: var(--sc-hue-3); }
.hue-4 { background: var(--sc-hue-4); } .hue-5 { background: var(--sc-hue-5); } .hue-6 { background: var(--sc-hue-6); } .hue-7 { background: var(--sc-hue-7); }
.pill {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 1.75rem; padding: .125rem .7rem .125rem .5rem;
    border-radius: 999px; background: var(--sc-sunk); color: var(--sc-ink); font-size: .875rem; font-weight: 700; white-space: nowrap;
}
.pill-icon { width: .625rem; height: .625rem; border-radius: 50%; background: var(--sc-ink-2); }
.pill-live, .pill-open { color: var(--sc-basil); }
.pill-live .pill-icon, .pill-open .pill-icon { background: var(--sc-basil); }
.pill-scheduled .pill-icon { background: transparent; box-shadow: inset 0 0 0 2px var(--sc-ink-2); }
.pill-closed { color: var(--sc-ink-2); }

/* ---------- Menus, schedules, lists (S6-S9 hooks kept) ---------- */
.menu-section, .menu-form, .menu-groups, .menu { margin: 0 0 2rem; }
.menu-items { list-style: none; padding: 0; margin: 0 0 1rem; }
.menu-item, .menu-group, .menu-option { padding: .875rem 0; border-bottom: 1px solid var(--sc-line); }
.menu-option { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.menu-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 700; }
.menu-price, .menu-rule { white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-item p, .menu-group p { margin: .25rem 0 0; }
.menu-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 0; }
.sold-out, .group-warning { color: var(--sc-error); }
.menu-choice { color: var(--sc-ink-2); }
.order-item { border: 0; border-bottom: 1px solid var(--sc-line); padding: .75rem 0 1rem; margin: 0 0 1rem; min-width: 0; }
.order-item > legend { font-weight: 700; font-size: 1.125rem; padding: 0; }
.order-item[disabled] > legend { color: var(--sc-ink-2); }
.quantity input { max-width: 8rem; }
.queue-order h3 { margin: 0 0 .5rem; }
.queue-order ul { margin: 0 0 .5rem; }
.queue-live { min-height: 1.5rem; margin: 0 0 1rem; }
.schedule-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.schedule-list li, .schedule-stop { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .625rem 0; border-bottom: 1px solid var(--sc-line); }
.schedule-list a { display: inline-flex; align-items: center; min-height: 48px; }
.here-now { font-weight: 700; color: var(--sc-basil); }
.schedule-times { display: flex; flex-wrap: wrap; gap: 0 1rem; font-variant-numeric: tabular-nums; }
.truck-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.truck-list li { display: flex; flex-wrap: wrap; gap: .25rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--sc-line); }
.truck-list a { color: var(--sc-ink); font-weight: 700; min-height: 48px; display: inline-flex; align-items: center; }
/* ---------- Map (S10 increment 2): full-bleed map behind a bottom sheet; side panel on wide screens ---------- */
main:has(.map-page) { max-width: none; padding: 0; }
.map-page { position: relative; height: calc(100dvh - 61px); min-height: 32rem; overflow: hidden; background: var(--sc-sunk); }
/* S17i: two classes so maplibre-gl.css (loaded later, .maplibregl-map { position: relative }) can't collapse the map to 0px. */
.map-page > .map { position: absolute; inset: 0; background: var(--sc-sunk); }
.sheet {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; height: 86%;
    display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 var(--sc-gutter) max(1.5rem, env(safe-area-inset-bottom));
    background: var(--sc-surface); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px -12px rgb(23 18 15 / 0.35);
    transform: translateY(52%);
}
.sheet[data-state="open"], .sheet:focus-within { transform: none; }
.sheet-grabber {
    position: sticky; top: 0; z-index: 1; align-self: stretch; min-height: 48px; margin: 0 calc(var(--sc-gutter) * -1);
    background: var(--sc-surface); box-shadow: none; border-radius: 26px 26px 0 0; color: var(--sc-ink);
}
.grabber-bar { width: 2.75rem; height: 5px; border-radius: 999px; background: var(--sc-field); }
.sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.sheet-head h1 { font-size: clamp(1.75rem, 7vw, 2.25rem); margin: 0; }
.sheet-count { margin: 0; color: var(--sc-ink-2); font-weight: 600; }
.sheet .filter { margin: 1rem 0; }
.sheet .filter label { width: 100%; margin: 0; }
.sheet .filter select { flex: 1; min-width: 10rem; }
@media (min-width: 60rem) {
    .map-page { display: grid; grid-template-columns: 26rem 1fr; }
    .map-page > .map { position: relative; inset: auto; grid-column: 2; grid-row: 1; }
    .sheet { position: relative; grid-column: 1; grid-row: 1; height: 100%; transform: none; border-radius: 0; box-shadow: 1px 0 0 var(--sc-line); }
    .sheet-grabber { display: none; }
}
.truck-list.cards { display: grid; gap: .625rem; margin: 0 0 1rem; }
.truck-list.cards .truck-card {
    position: relative; display: flex; align-items: center; gap: .875rem; padding: .875rem; border-radius: var(--sc-radius-sm);
    background: var(--sc-paper); border: 1px solid var(--sc-line);
}
.truck-card-body { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.truck-card-body > a { min-height: 32px; font: 800 1.125rem/1.2 var(--sc-display); letter-spacing: -0.015em; }
.truck-card-body > a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.truck-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .625rem; font-size: .875rem; }
.empty-state { padding: 1.5rem; border-radius: var(--sc-radius); background: var(--sc-paper); border: 1px dashed var(--sc-field); text-align: center; }
.empty-state p:first-child { font: 700 1.25rem/1.3 var(--sc-display); }
.map-pin {
    display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0;
    border-radius: 14px 14px 14px 4px; border: 2.5px solid #FFFFFF; color: #FFFFFF;
    font: 800 .875rem/1 var(--sc-display); box-shadow: 0 6px 16px -6px rgb(0 0 0 / 0.5);
}
.map-pin::before { content: attr(data-initials); }
.map-pin.live { outline: 3px solid var(--sc-basil); outline-offset: 2px; position: relative; }
.map-pin.scheduled { border-style: dashed; }
.maplibregl-popup-content { color: #17120F; font: inherit; border-radius: var(--sc-radius-sm) !important; }
.maplibregl-popup-content a { color: #17120F; font-weight: 700; }

/* ---------- Truck page, order and status (S10 increment 3) ---------- */
.truck-hero { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.25rem; }
.truck-hero-text { min-width: 0; }
.truck-hero h1 { font-size: clamp(2.25rem, 10vw, 3.5rem); letter-spacing: -0.035em; margin: 0 0 .25rem; }
.truck-hero .tagline { margin: 0 0 .5rem; font-size: 1.125rem; }
.truck-hero.compact { gap: .875rem; }
.truck-hero.compact h1 { font-size: clamp(1.625rem, 7vw, 2.25rem); margin: 0; }

/* S17e: the customer's live order page. The Ready card is the one thing to see from arm's length; the track says
   where the order is in words (done steps carry a check, the current one is bold), never by colour alone. */
.order-ready {
    box-sizing: border-box; width: 100%; margin: 0 0 1.25rem; padding: 1.25rem 1.25rem 1.375rem;
    background: var(--sc-basil); color: var(--sc-paper); border-radius: var(--sc-radius); box-shadow: var(--sc-shadow);
}
.order-ready h2 { margin: 0 0 .25rem; font-size: clamp(1.75rem, 8vw, 2.5rem); letter-spacing: -0.02em; color: inherit; }
.order-ready p { margin: 0; font-size: 1.25rem; font-weight: 700; color: inherit; }
.order-track {
    list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .375rem; margin: 0 0 1rem; padding: 0;
}
.order-track li {
    padding: .625rem .5rem 0; border-top: 4px solid var(--sc-line); color: var(--sc-ink-2); font-size: 1rem;
}
.order-track .is-done { border-top-color: var(--sc-basil); color: var(--sc-ink); }
.order-track .is-done::before { content: "✓ "; color: var(--sc-basil); }
.order-track [aria-current="step"] { font-weight: 800; color: var(--sc-ink); border-top-color: var(--sc-chili); }
/* S17g: the alert switch (order page and board). Pressed reads as a quiet "on" state; the text says it too. */
.push-switch { margin: 0 0 1.25rem; }
.push-switch[hidden], .push-switch [hidden] { display: none; }
.push-switch button { width: 100%; min-height: 48px; }
.push-switch button[aria-pressed="true"] { background: var(--sc-sunk); color: var(--sc-ink); }
.push-switch #push-status:empty { display: none; }
.push-install { padding: .875rem 1rem; border-radius: var(--sc-radius); background: var(--sc-sunk); }
.push-install-title { margin: 0 0 .375rem; font-weight: 800; }
.push-install ol { margin: 0; padding-left: 1.25rem; }
.truck-story { font-size: 1.125rem; max-width: 36rem; }
.truck-page .status { margin: 0 0 1rem; }
.action-bar {
    position: sticky; bottom: 0; z-index: 30; margin: 0 calc(var(--sc-gutter) * -1) 2rem;
    padding: .75rem var(--sc-gutter) max(.75rem, env(safe-area-inset-bottom));
    background: var(--sc-glass); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--sc-line);
}
.action-bar .cta { flex: 1 1 8rem; }
@media (min-width: 48rem) {
    .action-bar { position: static; margin: 0 0 2rem; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .action-bar .cta { flex: 0 1 auto; }
}
.truck-page .this-week, .truck-page .menu { background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: var(--sc-radius); padding: 1.25rem; box-shadow: var(--sc-shadow); }
.truck-page .this-week h2, .truck-page .menu h2 { font-size: 1.5rem; }
.truck-page .menu h3 { margin: 1.25rem 0 .25rem; font-size: 1.125rem; color: var(--sc-chili); letter-spacing: 0; }
.truck-page .menu-item:last-child { border-bottom: 0; }
.menu-name { font-weight: 700; }
.menu-price { font-weight: 800; }
#order-lines { background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: var(--sc-radius); padding: 0 1.25rem; }
#order-lines .menu-item:last-child { border-bottom: 0; }
#order-status { font-size: clamp(1.75rem, 7.5vw, 2.5rem); }
.order-form h2 { margin: 2rem 0 .75rem; color: var(--sc-chili); font-size: 1.25rem; letter-spacing: 0; }
.order-item { background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: var(--sc-radius); padding: 1rem 1.25rem; }
.order-form #order-pay { width: 100%; }

/* ---------- Operator: auth, dashboard, queue (S10 increment 4) ---------- */
.auth { max-width: 28rem; margin: clamp(1rem, 6vw, 3rem) auto 0; padding: clamp(1.25rem, 5vw, 2rem); background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 28px; box-shadow: var(--sc-shadow-lift); }
.auth h1 { font-size: clamp(2rem, 8vw, 2.75rem); }
.auth button[type="submit"] { width: 100%; }
main:has(.dashboard) { max-width: 72rem; }
.dash-head { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; }
.dash-head h1 { margin: 0 0 .125rem; }
.dash-head p { margin: 0 0 .375rem; }
.dash-grid { display: grid; gap: 1.25rem; align-items: start; }
.dash-grid > section { margin: 0; }
.dash-grid > section h2 { font-size: 1.375rem; }
@media (min-width: 64rem) {
    .dash-grid { grid-template-columns: 1fr 1fr; }
    .dash-grid > #spot { grid-row: span 2; }
}
#spot { border-top: 4px solid var(--sc-chili); }
#go-live { width: 100%; min-height: 60px; font-size: 1.1875rem; }
.share-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; }
.share-qr { width: 9rem; flex: none; padding: .5rem; background: #FFFFFF; border-radius: var(--sc-radius-sm); border: 1px solid var(--sc-line); }
.share-qr svg { display: block; width: 100%; height: auto; }
.queue-column h2 { font-size: 1.25rem; }
.queue-ticket-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.queue-wait { flex: none; padding: .25rem .625rem; border-radius: 999px; background: var(--sc-sunk); font-weight: 800; font-variant-numeric: tabular-nums; }
.queue-order { border-left: 6px solid var(--sc-basil); }
.queue-order.age-warm { border-left-color: var(--sc-saffron); }
.queue-order.age-late { border-left-color: var(--sc-chili); }
.queue-order.age-late .queue-wait { background: var(--sc-chili); color: var(--sc-chili-ink); }
.queue-order.is-new { outline: 3px solid var(--sc-saffron); outline-offset: 2px; }
.queue-order .menu-actions button { flex: 1 1 10rem; }

/* ---------- Landing ---------- */
.landing { overflow-x: clip; }
.band { padding: clamp(3.5rem, 10vw, 7rem) var(--sc-gutter); }
.band-inner { max-width: 72rem; margin: 0 auto; }
.hero { position: relative; padding-top: clamp(2rem, 8vw, 5rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.hero .band-inner { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
@media (min-width: 60rem) { .hero .band-inner { grid-template-columns: 1.15fr .85fr; } }
.hero::before {
    content: ""; position: absolute; inset: -20% -10% auto auto; width: min(70vw, 42rem); aspect-ratio: 1;
    background: radial-gradient(closest-side, rgb(244 165 28 / 0.32), transparent 70%); pointer-events: none; z-index: -1;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.25rem; padding: .375rem .875rem .375rem .625rem;
    border-radius: 999px; background: var(--sc-surface); box-shadow: var(--sc-shadow); font-weight: 700; font-size: .9375rem;
}
.live-dot { position: relative; width: .625rem; height: .625rem; border-radius: 50%; background: var(--sc-basil); }
.display {
    font-size: clamp(3rem, 13.5vw, 7rem); line-height: .92; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 1.25rem;
}
.display em { font-style: normal; color: var(--sc-chili); }
.lead { font-size: clamp(1.125rem, 3.6vw, 1.375rem); color: var(--sc-ink-2); max-width: 34rem; margin: 0 0 2rem; }
.card-head { display: flex; align-items: center; gap: .875rem; margin: 0 0 1rem; }
.card-title { font: 800 1.375rem/1.1 var(--sc-display); letter-spacing: -0.02em; margin: 0 0 .125rem; }
.card-sub { color: var(--sc-ink-2); margin: 0; font-size: .9375rem; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 1rem; color: var(--sc-ink-2); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.card-menu { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sc-line); }
.card-menu li { display: flex; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-bottom: 1px solid var(--sc-line); font-weight: 600; }
.card-menu li:last-child { border-bottom: 0; }
.price { font-variant-numeric: tabular-nums; }
.section-head { max-width: 40rem; margin: 0 0 2.5rem; }
.kicker { color: var(--sc-chili); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8125rem; margin: 0 0 .75rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 1.5rem; border-radius: var(--sc-radius); background: var(--sc-surface); box-shadow: var(--sc-shadow); border: 1px solid var(--sc-line); }
.step-num {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: 0 0 1rem; border-radius: 50%;
    background: var(--sc-chili-soft); color: var(--sc-chili); font: 800 1.25rem/1 var(--sc-display);
}
.step p { color: var(--sc-ink-2); margin: 0; }
.owners { background: var(--sc-ink); color: var(--sc-paper); }
.owners .band-inner > * { max-width: 72rem; }
.owners h2, .owners h3 { color: var(--sc-paper); }
.owners .kicker { color: var(--sc-saffron); }
.owners .lead { color: var(--sc-line); }
@media (prefers-color-scheme: dark) { .owners { background: var(--sc-surface); color: var(--sc-ink); } .owners h2, .owners h3 { color: var(--sc-ink); } .owners .lead { color: var(--sc-ink-2); } }
.offers { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 48rem) { .offers { grid-template-columns: repeat(3, 1fr); } }
.offer { padding: 1.5rem; border-radius: var(--sc-radius); background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.14); }
.offer h3 { font-size: clamp(1.5rem, 4.5vw, 1.875rem); letter-spacing: -0.03em; }
.offer p { margin: 0; color: var(--sc-line); }
.offer:last-child { background: var(--sc-chili); border-color: var(--sc-chili); color: var(--sc-chili-ink); }
.offer:last-child h3, .offer:last-child p { color: var(--sc-chili-ink); }
@media (prefers-color-scheme: dark) { .offer { background: var(--sc-sunk); border-color: var(--sc-line); } .offer p { color: var(--sc-ink-2); } }
.math { font: 700 clamp(1.125rem, 3.4vw, 1.5rem)/1.35 var(--sc-display); letter-spacing: -0.01em; max-width: 44rem; margin: 0 0 2rem; }
.owners .cta { background: var(--sc-paper); color: var(--sc-ink); box-shadow: none; }
@media (prefers-color-scheme: dark) { .owners .cta { background: var(--sc-chili); color: var(--sc-chili-ink); } }
.final { text-align: center; }
.final h2 { font-size: clamp(2.25rem, 9vw, 4.5rem); letter-spacing: -0.04em; }

/* ---------- S16a Night Market (customer pages opt in with class "night") ---------- */
body:has(.night) {
    --nm-ink: #07070A;
    --nm-panel: #14121C;
    --nm-line: #2A2638;
    --nm-text: #F4F1EA;
    --nm-muted: #C9C3B8;
    --nm-yellow: #FFE14D;
    --nm-pink: #FF4FA3;
    --nm-cyan: #5CE1E6;
    --nm-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
    --nm-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
    background: var(--nm-ink);
    color: var(--nm-text);
    font-family: var(--nm-body);
}
/* The Night chrome is shared by the landing (.night) and, since S16b, every customer page after it (main.nm). */
body:is(:has(.night), :has(main.nm)) :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible { outline-color: var(--nm-yellow); }
body:is(:has(.night), :has(main.nm)) .skip-link { background: var(--nm-yellow); color: var(--nm-ink); }
body:is(:has(.night), :has(main.nm)) .site-header { background: rgb(7 7 10 / 0.8); border-bottom-color: var(--nm-line); }
body:is(:has(.night), :has(main.nm)) .wordmark { font: 400 1.375rem/1 var(--nm-display); letter-spacing: .02em; text-transform: uppercase; color: var(--nm-text); }
body:is(:has(.night), :has(main.nm)) .wordmark-z { color: var(--nm-yellow); }
body:is(:has(.night), :has(main.nm)) .wordmark-glyph { background: var(--nm-yellow); box-shadow: 0 0 18px rgb(255 225 77 / 0.6); }
body:is(:has(.night), :has(main.nm)) .site-nav a { color: var(--nm-text); }
body:is(:has(.night), :has(main.nm)) .site-nav a:hover { background: var(--nm-panel); }
body:is(:has(.night), :has(main.nm)) .site-nav .nav-cta { background: var(--nm-yellow); color: var(--nm-ink); }
body:is(:has(.night), :has(main.nm)) .site-footer { border-top-color: var(--nm-line); color: var(--nm-muted); }
body:is(:has(.night), :has(main.nm)) .customer-tabs { background: rgb(7 7 10 / 0.82); border-color: var(--nm-line); box-shadow: 0 8px 26px rgb(0 0 0 / 0.5); }
body:is(:has(.night), :has(main.nm)) .customer-tabs a { color: var(--nm-text); }
body:is(:has(.night), :has(main.nm)) .customer-tabs a[aria-current="page"] { color: var(--nm-yellow); background: rgb(255 225 77 / 0.12); }
body:is(:has(.night), :has(main.nm)) .footer-mark { font: 400 1.25rem/1.4 var(--nm-display); text-transform: uppercase; color: var(--nm-text); }
body:is(:has(.night), :has(main.nm)) .footer-lang a { color: var(--nm-text); border-color: var(--nm-line); }
body:is(:has(.night), :has(main.nm)) .footer-lang a:hover { background: var(--nm-panel); }
body:is(:has(.night), :has(main.nm)) .footer-lang a[aria-current="true"] { background: var(--nm-yellow); color: var(--nm-ink); border-color: var(--nm-yellow); }

/* ---------- S16b Night Market journey: every customer page after the home page (main.nm) ----------
   One token layer turns the Street Fire components Night without new markup: the --sc-* colours become the Night
   Market's (each text pair 4.5:1 and UI pair 3:1, tested), headings move to Anton and body to Space Grotesk, and native
   controls go dark whatever the phone prefers. Truck colours are bright with dark text so pins glow on the dark map. */
body:has(main.nm) {
    --nm-ink: #07070A;
    --nm-panel: #14121C;
    --nm-line: #2A2638;
    --nm-text: #F4F1EA;
    --nm-muted: #C9C3B8;
    --nm-yellow: #FFE14D;
    --nm-pink: #FF4FA3;
    --nm-cyan: #5CE1E6;
    --nm-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
    --nm-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --sc-paper: #07070A;
    --sc-surface: #14121C;
    --sc-sunk: #1E1B29;
    --sc-ink: #F4F1EA;
    --sc-ink-2: #C9C3B8;
    --sc-chili: #FFE14D;
    --sc-chili-ink: #07070A;
    --sc-chili-soft: #2B2612;
    --sc-saffron: #FF4FA3;
    --sc-basil: #5BE38E;
    --sc-line: #2A2638;
    --sc-field: #7D7693;
    --sc-focus: #5CE1E6;
    --sc-error: #FF8F85;
    --sc-hue-0: #FF6B5B;
    --sc-hue-1: #FFC94D;
    --sc-hue-2: #5BE38E;
    --sc-hue-3: #FF7FD1;
    --sc-hue-4: #8AB0FF;
    --sc-hue-5: #5CE1E6;
    --sc-hue-6: #FF9A57;
    --sc-hue-7: #D9D4CC;
    --sc-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 10px 28px -10px rgb(0 0 0 / 0.8);
    --sc-shadow-lift: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 48px -16px rgb(0 0 0 / 0.85);
    --sc-glass: rgb(7 7 10 / 0.8);
    --sc-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
    --sc-text: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
}
:root:has(main.nm) { color-scheme: dark; }
/* Anton ships one weight: headings and display labels are set at 400 so the browser never fakes a bold. */
body:has(main.nm) :is(h1, h2) { font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }
body:has(main.nm) h3 { font-family: var(--sc-text); font-weight: 700; letter-spacing: 0; }
body:has(main.nm) :is(.truck-card-body > a, .recent-order-title, .empty-state p:first-child, .truck-mark, .map-pin, .wordmark) { font-weight: 400; }
body:has(main.nm) :is(.truck-card-body > a, .recent-order-title) { text-transform: uppercase; letter-spacing: .02em; font-size: 1.25rem; }
body:has(main.nm) .truck-mark { color: #07070A; box-shadow: 0 0 18px -4px rgb(255 255 255 / 0.35); }
/* Primary actions (links styled as buttons, form submits) are the brightest thing on the page. */
body:has(main.nm) :is(.cta:not(.secondary):not(.ghost), main button[type=submit]:not(.secondary)) { box-shadow: 0 0 28px -6px rgb(255 225 77 / 0.55); }
body:has(main.nm) .empty-state { border-color: var(--sc-line); }
/* The dark map: pins glow in their truck colour with dark initials; MapLibre's own light popups and controls go dark. */
body:has(main.nm) .map-pin { color: #07070A; border: 2px solid #07070A; box-shadow: 0 0 0 2px rgb(255 255 255 / 0.18), 0 0 22px 2px rgb(255 255 255 / 0.28); }
body:has(main.nm) .maplibregl-popup-content { background: var(--sc-surface); color: var(--sc-ink); border: 1px solid var(--sc-line); }
body:has(main.nm) .maplibregl-popup-content a { color: var(--sc-chili); }
body:has(main.nm) .maplibregl-popup-tip { border-top-color: var(--sc-surface) !important; border-bottom-color: var(--sc-surface) !important; }
body:has(main.nm) .maplibregl-popup-close-button { color: var(--sc-ink); background: transparent; box-shadow: none; min-height: 0; padding: 0 .375rem; }
body:has(main.nm) .maplibregl-ctrl-group { background: var(--sc-surface); border: 1px solid var(--sc-line); }
body:has(main.nm) .maplibregl-ctrl-group button { background: transparent; box-shadow: none; }
body:has(main.nm) .maplibregl-ctrl-group button + button { border-top-color: var(--sc-line); }
body:has(main.nm) .maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1); }
body:has(main.nm) .maplibregl-ctrl-attrib { background: rgb(20 18 28 / 0.85); color: var(--sc-ink-2); }
body:has(main.nm) .maplibregl-ctrl-attrib a { color: var(--sc-ink); }
/* S16b increment 2: the pages customers linger on, after the S17 prototype. The truck name is the poster headline,
   menu headings glow pink over dark item panels, and the order track and Ready card light up as the order advances. */
body:has(main.nm) .truck-hero h1 { font-size: clamp(2.75rem, 14vw, 5rem); line-height: .9; }
body:has(main.nm) .action-bar .cta:not(.secondary) { box-shadow: 0 0 36px -4px rgb(255 225 77 / 0.6); }
body:has(main.nm) :is(.order-form h2, .truck-page .menu h3) { color: var(--nm-pink); }
body:has(main.nm) .order-item > legend { font-family: var(--sc-display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: 1.375rem; }
body:has(main.nm) .menu-price { color: var(--nm-yellow); }
body:has(main.nm) .order-track .is-done { box-shadow: 0 -6px 14px -8px var(--sc-basil); }
body:has(main.nm) .order-track [aria-current="step"] { box-shadow: 0 -6px 16px -6px var(--sc-chili); }
body:has(main.nm) .order-ready { box-shadow: 0 0 44px -6px rgb(91 227 142 / 0.6); }
body:has(main.nm) .order-ready h2 { font-size: clamp(2.5rem, 12vw, 4rem); }

.night h1 {
    margin: 0; font-family: var(--nm-display); font-weight: 400; text-transform: uppercase;
    font-size: clamp(4rem, 15vw, 14.5rem); line-height: .86; letter-spacing: -0.01em; overflow-wrap: anywhere; text-wrap: balance;
}
.night h1 em, .night h2 em { font-style: normal; color: var(--nm-yellow); text-shadow: 0 0 40px rgb(255 225 77 / 0.35); }
.night h2 { font-family: var(--nm-display); font-weight: 400; text-transform: uppercase; font-size: clamp(3rem, 8vw, 7rem); line-height: .9; letter-spacing: 0; overflow-wrap: anywhere; }
.night h2 em { color: var(--nm-cyan); text-shadow: 0 0 40px rgb(92 225 230 / 0.3); }
.night h3 { font-family: var(--nm-body); font-weight: 700; font-size: 1.25rem; letter-spacing: 0; }
.night .band-inner { max-width: 82rem; }
.night .hero { padding-top: clamp(1.5rem, 6vw, 4rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.night .hero::before { content: none; }
.night .hero .band-inner { display: block; }
.night .eyebrow {
    display: inline-flex; align-items: center; gap: .625rem; margin: 0 0 1rem; padding: 0; background: none; box-shadow: none;
    color: var(--nm-pink); font-weight: 700; font-size: .8125rem; letter-spacing: .2em; text-transform: uppercase;
}
.night .live-dot { background: var(--nm-pink); box-shadow: 0 0 16px var(--nm-pink); }
.night .lead { font-size: clamp(1.125rem, 2.4vw, 1.375rem); color: var(--nm-muted); max-width: 36rem; margin: 1.75rem 0 2rem; }
.night .cta { border-radius: 999px; background: var(--nm-yellow); color: var(--nm-ink); box-shadow: 0 0 36px rgb(255 225 77 / 0.3); }
.night .cta.secondary { background: transparent; color: var(--nm-text); box-shadow: inset 0 0 0 1.5px var(--nm-line); }

.night-map-wrap { padding: 0 var(--sc-gutter); }
.night-map {
    position: relative; display: block; max-width: 82rem; margin: 0 auto; height: clamp(26rem, 55vw, 42rem);
    border-radius: 28px; overflow: hidden; border: 1px solid var(--nm-line); color: var(--nm-text); text-decoration: none;
    background: radial-gradient(circle at 30% 40%, #1B1630 0, #0B0B12 60%);
}
.night-streets { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.night-streets path { fill: none; stroke: var(--nm-line); stroke-width: 2; }
.night-streets .river { stroke: #3B3550; stroke-width: 7; }
.night-map .example-label {
    position: absolute; top: 1rem; left: 1rem; padding: .25rem .625rem; border-radius: 999px; background: var(--nm-panel);
    border: 1px solid var(--nm-line); color: var(--nm-muted); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.night-pin {
    position: absolute; display: flex; flex-direction: column; align-items: center; gap: .5rem;
    font-weight: 700; font-size: .875rem; transform: translate(-50%, -100%);
}
.pin-label { padding: .375rem .75rem; border-radius: 999px; background: var(--pin); color: var(--nm-ink); box-shadow: 0 0 32px var(--pin); }
.pin-dot {
    width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--pin);
    box-shadow: 0 0 0 10px rgb(255 255 255 / 0.06), 0 0 28px var(--pin);
}
.pin-1 { --pin: var(--nm-yellow); left: 24%; top: 42%; }
.pin-2 { --pin: var(--nm-pink); left: 62%; top: 58%; }
.pin-3 { --pin: var(--nm-cyan); left: 82%; top: 30%; }
.pin-4 { --pin: var(--nm-yellow); left: 44%; top: 86%; }
.night-map-card {
    position: absolute; right: 1rem; bottom: 1rem; width: min(22rem, calc(100% - 2rem)); padding: 1.25rem; border-radius: 22px;
    background: rgb(20 18 28 / 0.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--nm-line);
}
.night-map-card { display: block; }
.night-map-card strong { display: block; font: 400 2rem/1 var(--nm-display); text-transform: uppercase; }
.night-map-body { display: block; margin: .5rem 0 0; color: var(--nm-muted); }
.night-map-go { display: inline-flex; margin-top: 1rem; padding: .75rem 1rem; border-radius: 14px; background: var(--nm-yellow); color: var(--nm-ink); font-weight: 700; }
@media (max-width: 40rem) { .pin-4 { display: none; } .night-map-card { left: 1rem; width: auto; } }

.marquee { overflow: hidden; margin-top: clamp(3rem, 8vw, 5rem); padding: 1.25rem 0; border-block: 1px solid var(--nm-line); }
.marquee-track {
    display: flex; gap: 2rem; width: max-content; white-space: nowrap;
    font: 400 clamp(2.5rem, 7vw, 4.5rem)/1 var(--nm-display); text-transform: uppercase;
}
.marquee-star { color: var(--nm-yellow); }
.marquee-track .marquee-star:nth-of-type(3n+2) { color: var(--nm-pink); }
.marquee-track .marquee-star:nth-of-type(3n) { color: var(--nm-cyan); }

.night .section-head { max-width: 52rem; margin: 0 0 2.5rem; }
.night .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.night .step { padding: 1.75rem; border-radius: 24px; background: var(--nm-panel); border: 1px solid var(--nm-line); box-shadow: none; }
.night .step-num { display: block; width: auto; height: auto; margin: 0 0 .75rem; background: none; font: 400 4rem/1 var(--nm-display); color: var(--nm-yellow); }
.night .step:nth-child(2) .step-num { color: var(--nm-pink); }
.night .step:nth-child(3) .step-num { color: var(--nm-cyan); }
.night .step p { color: var(--nm-muted); }
.night .owners { background: transparent; color: var(--nm-text); }
.night .owners h2, .night .owners h3 { color: var(--nm-text); }
.night .owners .lead { color: var(--nm-muted); }
.night .offers { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1rem; }
.night .offer {
    display: flex; flex-direction: column; min-height: 16rem; padding: 2rem; border-radius: 24px;
    background: var(--nm-panel); border: 1px solid var(--nm-line); color: var(--nm-text);
}
.offer-big { margin: 0 0 auto; padding-bottom: 1.5rem; font: 400 clamp(4rem, 9vw, 6.5rem)/1 var(--nm-display); color: var(--nm-yellow); }
.night .offer:nth-child(2) .offer-big { color: var(--nm-pink); }
.night .offer p { color: var(--nm-muted); }
.night .offer:last-child { background: var(--nm-yellow); border-color: var(--nm-yellow); color: var(--nm-ink); }
.night .offer:last-child .offer-big, .night .offer:last-child h3, .night .offer:last-child p { color: var(--nm-ink); }
.night .math { font: 700 clamp(1.125rem, 2.6vw, 1.5rem)/1.4 var(--nm-body); color: var(--nm-text); }
.night .owners .cta { background: var(--nm-yellow); color: var(--nm-ink); }
@media (min-width: 48rem) { .night .steps, .night .offers { grid-template-columns: repeat(3, 1fr); } }

/* ---------- S16c Editorial desk (MainLayout marks operator, sign-in and admin pages main.desk) ----------
   The S10 components are token-driven, so the desk redefines the tokens on body (closer than :root, so the S10 dark
   theme never recolours it) and adds only what tokens can't: serif weights, the header rule, pill buttons, tabs. */
body:has(.desk) {
    --sc-paper: #F3EEE6;
    --sc-surface: #FBF8F3;
    --sc-sunk: #EAE3D8;
    --sc-ink: #141210;
    --sc-ink-2: #4A433C;
    --sc-chili: #B8361A;
    --sc-chili-ink: #FFFFFF;
    --sc-chili-soft: #F6DED6;
    --sc-saffron: #A86B00;
    --sc-basil: #1D6B44;
    --sc-line: #D9CFC1;
    --sc-field: #6B6157;
    --sc-focus: #1F4FD8;
    --sc-error: #A3261E;
    --sc-shadow: none;
    --sc-shadow-lift: none;
    --sc-glass: rgb(243 238 230 / 0.96);
    --sc-display: "Instrument Serif", Georgia, "Times New Roman", serif;
    --sc-text: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
    --sc-radius: 10px;
    --sc-radius-sm: 10px;
    color-scheme: light;
}
body:has(.desk) :is(h1, h2) { font-weight: 400; letter-spacing: -0.015em; line-height: 1; }
body:has(.desk) h1 { font-size: clamp(2.75rem, 10vw, 4.5rem); }
body:has(.desk) h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
body:has(.desk) h3 { font-family: var(--sc-text); font-weight: 600; letter-spacing: 0; }
body:has(.desk) .site-header { background: var(--sc-paper); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid var(--sc-ink); }
body:has(.desk) .wordmark { font: 400 1.625rem/1 var(--sc-display); letter-spacing: -0.01em; }
body:has(.desk) .wordmark-glyph { width: .75rem; height: .75rem; border-radius: 50%; box-shadow: none; }
body:has(.desk) .footer-mark, body:has(.desk) .empty-state p:first-child { font-weight: 400; font-size: 1.375rem; }
body:has(.desk) .truck-mark { font-family: var(--sc-text); box-shadow: none; }
body:has(.desk) :is(.cta, button) { border-radius: 999px; font-weight: 600; }
body:has(.desk) :is(.cta, button):not(.secondary, .ghost) { box-shadow: none; }
body:has(.desk) .auth { border-top: 2px solid var(--sc-ink); }
body:has(.desk) #spot { border-top: 2px solid var(--sc-ink); }
body:has(.desk) #go-live { min-height: 72px; border-radius: 14px; background: var(--sc-ink); color: var(--sc-paper); font: 400 1.875rem/1 var(--sc-display); }

.admin-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 0 2rem; padding: 1rem 0; border-block: 1px solid var(--sc-ink); }
.admin-counts dt { color: var(--sc-ink-2); font-size: .875rem; }
.admin-counts dd { margin: 0; font: 400 clamp(2.5rem, 9vw, 3.5rem)/1 var(--sc-display); font-variant-numeric: tabular-nums; }
.admin-counts > div { display: flex; flex-direction: column-reverse; gap: .25rem; }
.admin-counts > div:nth-child(2) dd { color: var(--sc-chili); font-style: italic; }
.dash-head .admin-link { margin-left: auto; }
/* S17f: each truck is a tappable row that opens its sheet; the chip says its state in words, not colour alone. */
.admin-rows { list-style: none; padding: 0 1rem; background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 14px; }
.admin-rows li + li { border-top: 1px solid var(--sc-line); }
#admin-found { margin: 0 0 2rem; padding: 0 1rem; background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 14px; }
.admin-row {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 56px; padding: .5rem 0;
    color: var(--sc-ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.admin-row-text { display: flex; flex-direction: column; min-width: 0; }
.admin-row-text small { color: var(--sc-ink-2); overflow-wrap: anywhere; }
.admin-chip {
    flex: none; padding: .25rem .625rem; border-radius: 999px; font-size: .8125rem; font-weight: 700;
    background: var(--sc-sunk); color: var(--sc-ink-2);
}
.admin-chip.on {
    background: var(--sc-chili); color: var(--sc-chili-ink);
}
.admin-truck form { display: grid; gap: .75rem; margin-top: 1rem; }
body:has(.desk) .admin-action {
    width: 100%; min-height: 50px; font-size: 1.0625rem;
}
.sheet-body .admin-back { display: none; }
/* S17a: the tab bar floats above the home indicator as a blurred pill with an icon over each label.
   S17h: customers get the same bar (Home, Map, Orders) in the Night Market colours. */
.desk-tabs, .customer-tabs {
    position: fixed; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 40;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .375rem;
    background: rgb(251 248 243 / 0.82); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    border: 1px solid var(--sc-line); border-radius: 26px; box-shadow: 0 8px 26px rgb(20 18 16 / 0.14);
}
.customer-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); background: color-mix(in srgb, var(--sc-surface) 84%, transparent); }
.desk-tabs a, .customer-tabs a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .125rem; min-height: 52px;
    border-radius: 20px; color: var(--sc-ink-2); font-weight: 600; font-size: .75rem; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.desk-tabs svg, .customer-tabs svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.desk-tabs a[aria-current="page"], .customer-tabs a[aria-current="page"] { color: var(--sc-chili); background: rgb(184 54 26 / 0.09); }
body:has(.desk-tabs) main { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }
/* The footer is the page's last content, so it is what has to clear the floating bar. */
body:has(.customer-tabs) .site-footer { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }
/* The map fills the screen under the bar: its sheet scrolls its last row clear of the bar instead. */
body:has(.customer-tabs) main:has(.map-page) { padding-bottom: 0; }
body:has(.customer-tabs) .sheet { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
/* S17d: the Orders tab's waiting count, a red pill on the icon's shoulder (white on the desk tomato, 5.9:1). */
.desk-tabs a, .customer-tabs a { position: relative; }
.tab-badge {
    position: absolute; top: .125rem; left: calc(50% + .25rem); min-width: 1.25rem; height: 1.25rem; padding: 0 .375rem;
    border-radius: 999px; background: var(--sc-chili); color: #fff; font: 700 .75rem/1.25rem var(--sc-text);
    text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--sc-paper);
}
.tab-badge[hidden] { display: none; }
@media (min-width: 48rem) {
    .desk-tabs, .customer-tabs {
        position: static; padding: 0 var(--sc-gutter); border: 0; border-bottom: 1px solid var(--sc-line); border-radius: 0;
        background: var(--sc-paper); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
        grid-template-columns: repeat(4, max-content); gap: 1.5rem;
    }
    .customer-tabs { grid-template-columns: repeat(3, max-content); background: var(--sc-surface); }
    .desk-tabs a, .customer-tabs a { flex-direction: row; gap: .5rem; border-radius: 0; font-size: .9375rem; color: var(--sc-ink); }
    .desk-tabs svg, .customer-tabs svg { width: 1.125rem; height: 1.125rem; }
    .desk-tabs a[aria-current="page"], .customer-tabs a[aria-current="page"] { background: none; box-shadow: inset 0 -3px 0 var(--sc-chili); }
    .tab-badge { position: static; }
    body:has(.desk-tabs) main { padding-bottom: 3rem; }
    body:has(.customer-tabs) .site-footer { padding-bottom: max(2.5rem, env(safe-area-inset-bottom)); }
    body:has(.customer-tabs) .sheet { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
    /* The row under the header takes 53px of the screen the map would otherwise fill. */
    body:has(.customer-tabs) .map-page { height: calc(100dvh - 61px - 53px); }
}

/* ---------- S17h: the customer's Orders tab ---------- */
.recent-orders { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .625rem; }
.recent-order {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "mark title" "mark status"; align-items: center;
    gap: .125rem .875rem; min-height: 64px; padding: .875rem; border-radius: var(--sc-radius-sm);
    background: var(--sc-paper); border: 1px solid var(--sc-line); color: var(--sc-ink); text-decoration: none;
}
.recent-order .truck-mark { grid-area: mark; }
.recent-order.is-active { border-color: var(--sc-chili); }
.recent-order-title { grid-area: title; font: 800 1.125rem/1.2 var(--sc-display); letter-spacing: -0.015em; }
.order-pill { grid-area: status; justify-self: start; font-weight: 700; font-size: .875rem; color: var(--sc-ink-2); }
.order-pill[data-status="Ready"] { color: var(--sc-basil); }
/* S17h: the kept-order note above the order form. */
.draft-note {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
    margin: 1rem 0; padding: .75rem 1rem; border-radius: var(--sc-radius-sm); background: var(--sc-paper);
    border: 1px solid var(--sc-line); font-weight: 600;
}
.draft-note button { min-height: 48px; }

/* S17a menu rows: an inset grouped list; the row opens the editor sheet and the switch marks it sold out. */
.menu-section .menu-items { background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 14px; padding: 0 1rem; }
.menu-section .menu-item { padding: .25rem 0 .5rem; }
.menu-section .menu-item:last-child { border-bottom: 0; }
.menu-row-wrap { display: flex; align-items: center; gap: .75rem; }
.menu-row {
    flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; justify-content: center;
    color: var(--sc-ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.menu-row .menu-name { overflow-wrap: anywhere; }
.menu-row .menu-price, .menu-row .sold-out { font-size: .9375rem; font-weight: 600; }
.menu-row .menu-price { color: var(--sc-ink-2); }
.menu-section .menu-actions { margin: 0; }
.menu-section .menu-actions button { min-height: 40px; min-width: 44px; padding: .25rem .75rem; }
.switch {
    position: relative; flex: none; width: 3.25rem; min-width: 3.25rem; min-height: 44px; padding: 0;
    background: none; box-shadow: none; border-radius: 999px; cursor: pointer;
}
.switch::before {
    content: ""; position: absolute; left: 1px; right: 1px; top: 50%; height: 31px; margin-top: -15.5px; border-radius: 999px;
    background: var(--sc-basil);
}
.switch::after {
    content: ""; position: absolute; top: 50%; left: 3px; width: 27px; height: 27px; margin-top: -13.5px;
    border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 5px rgb(0 0 0 / 0.22); transform: translateX(20px);
}
.switch[aria-checked="false"]::before { background: var(--sc-sunk); box-shadow: inset 0 0 0 1px var(--sc-line); }
.switch[aria-checked="false"]::after { transform: none; }
body:has(.desk) .switch:hover:not(:disabled), body:has(.desk) .switch:active:not(:disabled) { transform: none; }

/* S17a bottom sheet (dialog#sheet): full-width from the bottom on phones, a centred card on wide screens. */
.sheet-dialog {
    position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; height: calc(100dvh - 3.5rem); max-height: none; margin: 0;
    padding: 0 0 env(safe-area-inset-bottom); border: 0; border-radius: 22px 22px 0 0; overflow: hidden;
    display: none; flex-direction: column; background: var(--sc-surface); color: var(--sc-ink);
    box-shadow: 0 -10px 40px rgb(20 18 16 / 0.25); transform: translateY(100%);
}
.sheet-dialog[open] { display: flex; }
.sheet-dialog[data-detent="large"] { transform: none; }
.sheet-dialog[data-detent="medium"] { transform: translateY(45%); }
.sheet-dialog::backdrop { background: rgb(20 18 16 / 0.4); }
.sheet-grabber {
    flex: none; align-self: center; width: 100%; min-height: 28px; padding: 0; background: none; box-shadow: none; border-radius: 0;
    color: var(--sc-field); cursor: grab; touch-action: none;
}
.sheet-grabber .grabber-bar { width: 2.5rem; height: 5px; border-radius: 999px; background: currentColor; opacity: .5; }
.sheet-bar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; padding: 0 .75rem .5rem; border-bottom: 1px solid var(--sc-line); }
.sheet-title { margin: 0; font: 600 1.0625rem/1.2 var(--sc-text); letter-spacing: 0; text-align: center; }
body:has(.desk) .sheet-action { min-height: 44px; padding: 0 .5rem; background: none; box-shadow: none; color: var(--sc-chili); font-weight: 500; }
.sheet-action.strong { font-weight: 700; justify-self: end; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem var(--sc-gutter) 2rem; }
/* S17c: the truck card over the map; the map is already behind it, and the bar sticks to the sheet's bottom. */
.sheet-body .truck-see-map { display: none; }
.sheet-body .truck-page .action-bar { margin-bottom: 0; }
/* At the medium detent the bottom 45% of the sheet is below the screen, so the scroll area fills only the visible part
   and its sticky Order/Directions bar stays in view. */
.sheet-dialog[data-detent="medium"] .sheet-body { flex: none; height: calc(55% - 5rem); }
@media (min-width: 48rem) {
    .sheet-dialog { inset: 0; margin: auto; width: min(34rem, calc(100% - 2rem)); height: min(44rem, calc(100dvh - 4rem)); border-radius: 22px; transform: translateY(100dvh); }
    .sheet-dialog[data-detent="large"], .sheet-dialog[data-detent="medium"] { transform: none; }
    .sheet-grabber { display: none; }
}

/* S17a Undo toast: always in the DOM (a polite live region); slides up above the tab bar when it has a message. */
.toast {
    position: fixed; left: 1rem; right: 1rem; bottom: calc(6.25rem + env(safe-area-inset-bottom)); z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; max-width: 30rem; margin: 0 auto;
    padding: .5rem .5rem .5rem 1.125rem; border-radius: 16px; background: var(--sc-ink); color: var(--sc-paper);
    font-size: .9375rem; transform: translateY(calc(100% + 10rem)); pointer-events: none;
}
.toast[data-state="shown"] { transform: none; pointer-events: auto; }
body:has(.desk) .toast-undo { min-height: 44px; padding: 0 .75rem; background: none; box-shadow: none; color: #F08A5D; font-weight: 700; }
@media (min-width: 48rem) { .toast { bottom: 2rem; } }

/* ---------- Motion (only when welcome) ---------- */
@keyframes sc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sc-pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes nm-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes nm-pulse { from { transform: scale(1); } to { transform: scale(1.3); } }
@keyframes sc-arrive { 0% { transform: translateY(-14px) scale(.98); } 60% { transform: translateY(2px); } 100% { transform: none; } }

@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--sc-mid); animation-timing-function: var(--sc-ease-out); }
    html { scroll-behavior: smooth; }
    .cta, button, .site-nav a, .step, .offer, .card {
        transition: transform var(--sc-fast) var(--sc-ease-spring), background-color var(--sc-fast) ease, color var(--sc-fast) ease, box-shadow var(--sc-mid) var(--sc-ease-out);
    }
    .cta:hover, button:hover:not(:disabled) { transform: translateY(-1px); }
    .cta:active, button:active:not(:disabled), .site-nav a:active { transform: scale(.97); }
    .step:hover, .card:hover { transform: translateY(-3px); box-shadow: var(--sc-shadow-lift); }
    .skip-link { transition: transform var(--sc-fast) var(--sc-ease-out); }
    .live-dot::after, .map-pin.live::after {
        content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--sc-basil); z-index: -1;
        animation: sc-pulse 1.8s var(--sc-ease-out) infinite;
    }
    .sheet { transition: transform var(--sc-slow) var(--sc-ease-spring); }
    .truck-card { transition: transform var(--sc-fast) var(--sc-ease-spring), box-shadow var(--sc-mid) var(--sc-ease-out); }
    .truck-card:hover { transform: translateY(-2px); box-shadow: var(--sc-shadow); }
    .queue-order.is-new { animation: sc-arrive 900ms var(--sc-ease-spring) both; }
    .order-ready { animation: sc-rise var(--sc-slow) var(--sc-ease-spring) both; }
    .order-track li { transition: border-color var(--sc-mid) var(--sc-ease-out), color var(--sc-mid) ease; }
    .sheet-dialog { transition: transform 450ms var(--sc-spring); }
    .sheet-dialog.dragging { transition: none; }
    .toast { transition: transform 450ms var(--sc-spring); }
    .switch::before { transition: background-color 250ms ease; }
    .switch::after { transition: transform 300ms var(--sc-spring); }
    .desk-tabs a { transition: color var(--sc-fast) ease, background-color var(--sc-fast) ease, transform var(--sc-fast) var(--sc-spring); }
    .desk-tabs a:active, .menu-row:active { transform: scale(.97); }
    .admin-row { transition: transform var(--sc-fast) var(--sc-spring); }
    .admin-row:active { transform: scale(.98); }
    .admin-chip { transition: background-color 250ms ease, color 250ms ease; }
    .hero-copy > * { animation: sc-rise var(--sc-slow) var(--sc-ease-out) both; }
    .hero-copy > :nth-child(2) { animation-delay: 60ms; }
    .hero-copy > :nth-child(3) { animation-delay: 120ms; }
    .hero-copy > :nth-child(4) { animation-delay: 180ms; }
    .marquee-track { animation: nm-marquee 45s linear infinite; }
    .pin-dot { animation: nm-pulse 1.6s ease-in-out infinite alternate; }
}

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal { animation: sc-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
