/* GENERATED จาก TaoKae-RestaurantOS@78708c5076 src/styles/tokens.generated.css + src/styles/theme.css (เฉพาะบล็อก token) โดย web/scripts/design-sync.mjs — ห้ามแก้มือ */
:root {
  --color-primary: #d71920;
  --color-primary-fg: #ffffff;
  --color-accent: #f5c34b;
  --color-accent-fg: #1a1300;
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-surface-2: #f0f0f2;
  --color-border: #e4e4e7;
  --color-text: #111111;
  --color-text-muted: #666666;
  --color-success: #16a34a;
  --color-success-text: #0f7a37;
  --color-warning: #e08e0b;
  --color-warning-text: #8a5a00;
  --color-danger: #c81018;
  --color-info: #0042d5;
  --color-rail: #141518;
  --color-rail-border: #23252b;
  --color-scrim: rgba(0,0,0,0.5);
  --color-primary-on-dark: #ff4d57;
  --color-accent-on-dark: #ffe08a;
  --color-danger-on-dark: #ffd9d9;
  --color-primary-shade: #c00010;
  --color-primary-deep: #99000c;
  --color-chart-1: #1c7ea1;
  --color-chart-2: #ec0246;
  --color-chart-3: #066bfc;
  --color-chart-4: #a345cc;
  --color-chart-other: #6e6e73;
  --color-on-chart-1: #ffffff;
  --color-on-chart-2: #ffffff;
  --color-on-chart-3: #ffffff;
  --color-on-chart-4: #ffffff;
  --color-on-chart-other: #ffffff;
  --btn-lit: rgba(255,255,255,0.75);
  --btn-rim: rgba(255,255,255,0.95);
  --btn-floor: rgba(0,0,0,0.06);
  --btn-lit-solid: rgba(255,255,255,0.16);
  --btn-rim-solid: rgba(255,255,255,0.28);
  --color-danger-soft: rgba(200,16,24,0.10);
  --color-danger-text: #c81018;
  --color-rail-ink: rgba(255,255,255,0.68);
  --color-rail-hover: rgba(255,255,255,0.07);
  --color-rail-group: rgba(255,255,255,0.04);
  --color-tabbar-bg: rgba(255,255,255,0.86);
  --color-primary-soft: rgba(215,25,32,0.08);
  --color-primary-text: #d71920;
  --color-brand: #a8201a;
  --color-brand-fg: #ffffff;
  --color-brand-text: #a8201a;
  --color-action: #136f58;
  --color-action-fg: #ffffff;
  --color-action-text: #136f58;
  --color-kpi: #c59b27;
  --color-kpi-fg: #1a1300;
  --color-kpi-text: #9a7418;
  --color-scrim-strong: rgba(2,6,23,0.85);
  --color-paper-rule-light: #888888;
  --color-paper: #ffffff;
  --color-paper-ink: #111111;
  --color-paper-ink-muted: #555555;
  --color-paper-danger: #cc0000;
  --color-paper-rule: #777777;
  --color-guest-ink: #0f172a;
  --color-guest-ink-muted: #475569;
  --color-guest-ink-faint: #64748b;
  --color-guest-rule: #cbd5e1;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-chart: 3px;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-control: 12px;
  --radius-md: 16px;
  --radius-nav: 20px;
  --radius-lg: 22px;
  --radius-zone-num: 9px;
  --radius-sheet: 24px;
  --radius-pill: 999px;
  --shadow-rest: 0 1px 2px rgba(15,23,42,0.04), 0 10px 28px rgba(15,23,42,0.07);
  --shadow-lift: 0 6px 14px rgba(15,23,42,0.10), 0 20px 44px rgba(15,23,42,0.13);
  --shadow-float: 0 4px 8px rgba(15,23,42,0.08), 0 24px 56px rgba(15,23,42,0.16);
  --shadow-rail-active: 0 6px 16px rgba(215,25,32,0.45);
  --shadow-rise: 0 -10px 34px rgba(15,23,42,0.16), 0 12px 30px rgba(15,23,42,0.12);
  --shadow-rise-lg: 0 -12px 40px rgba(15,23,42,0.25);
  --press-scale: 0.97;
  --disabled-opacity: 0.5;
  --tabbar-h: 64px;
  --nav-tile: 24px;
  --modal-w: 480px;
  --color-rail-ink-strong: #ffffff;
  --mascot-fig-s: 64px;
  --mascot-fig-m: 96px;
  --mascot-fig-l: 160px;
  --mascot-halo: drop-shadow(0 0 3px rgba(255,255,255,0.32)) drop-shadow(0 0 8px rgba(255,255,255,0.14));
  --font-display: "Kanit", "Prompt", "Noto Sans Thai", "Noto Sans Myanmar", "Noto Sans Lao", "Noto Sans Khmer", system-ui, sans-serif;
  --font-sans: "Prompt", "Noto Sans Thai", "Noto Sans Myanmar", "Noto Sans Lao", "Noto Sans Khmer", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dur-press: 120ms;
  --dur-fast: 180ms;
  --dur-base: 260ms;
  --dur-slow: 420ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-width: 256px;
  --header-height: 60px;
  --content-max: 1440px;
  --ui-control-height: 44px;
  --ui-panel-head-height: 50px;
  --ui-kpi-min-height: 112px;
  --ui-kpi-icon-size: 42px;
  --ui-card-padding-compact: 14px;
  --mobilenav-height: 76px;
  --target-min: 44px;
  --icon-btn: 44px;
  --input-text-m: 16px;
  --zone-num: 30px;
  --bnav-inset: 10px;
  --bnav-lift: 8px;
  --bnav-blur: 18px;
}

:root[data-theme='dark'] {
  --color-bg: #131315;
  --color-surface: #1c1c1f;
  --color-surface-2: #26262a;
  --color-border: #333338;
  --color-text: #f5f5f5;
  --color-text-muted: #a0a0a6;
  --color-success-text: #4ade80;
  --color-warning-text: #fbbf24;
  --color-info: #60a5fa;
  --color-scrim: rgba(0,0,0,0.66);
  --color-chart-1: #1aa8b4;
  --color-chart-2: #e20d7f;
  --color-chart-3: #167dfd;
  --color-chart-4: #b73dce;
  --color-on-chart-1: #1a1300;
  --color-on-chart-3: #1a1300;
  --btn-lit: rgba(255,255,255,0.09);
  --btn-rim: rgba(255,255,255,0.12);
  --btn-floor: rgba(0,0,0,0);
  --color-danger-text: #ffd9d9;
  --color-tabbar-bg: rgba(28,28,31,0.86);
  --color-primary-soft: rgba(255,77,87,0.16);
  --color-primary-text: #ff4d57;
  --color-brand-text: #cb7976;
  --color-action-text: #71a99b;
  --color-kpi-text: #ffe08a;
  --shadow-rest: 0 1px 2px rgba(0,0,0,0.4), 0 10px 28px rgba(0,0,0,0.45);
  --shadow-lift: 0 6px 14px rgba(0,0,0,0.5), 0 20px 44px rgba(0,0,0,0.5);
  --shadow-float: 0 4px 8px rgba(0,0,0,0.5), 0 24px 56px rgba(0,0,0,0.55);
  --shadow-rise: 0 -10px 34px rgba(0,0,0,0.5), 0 12px 30px rgba(0,0,0,0.45);
  --shadow-rise-lg: 0 -12px 40px rgba(0,0,0,0.55);
}

:root {
  /* Brand — TaoKae restaurant OS (เถ้าแก่เฮง): red primary + gold accent on a soft
   * neutral canvas. Brand CI colours: #D71920 red, #111111 black, #F5C34B gold,
   * #666666 gray, #F5F5F5 light. Per-tenant override is locked off; ThemeProvider
   * still writes --color-primary / --color-accent. */
  --color-primary: #d71920; /* TaoKae red */
  --color-primary-fg: #ffffff;
  --color-accent: #f5c34b; /* TaoKae gold */
  --color-accent-fg: #1a1300; /* near-black text on gold */

  /* CI ใหม่ — the TaoKae POS Figma palette (file A0jr1BCB3THe0dOQnK6Mq6, section 07
   * Design System), owner decision 2026-09-24 (#442). Own names, NOT new values for
   * --color-primary / --color-accent: the rest of the app keeps แดงเฮง/ทองมงคล until
   * DESIGN.md adopts the CI app-wide, and ThemeProvider writes those two at runtime.
   * The pages already in the CI (qr-order.css, bom-cogs.css, pos-options.css) read
   * these instead of each keeping its own copy of the hex.
   *   brand  แดงชาด    what is selected, the bar over a group
   *   action เขียวหยก  the one control that changes something (add, save)
   *   kpi    ทองเหลือง  the summary boxes
   * Fills keep one value in both modes, like the brand red. Words take the *-text
   * twin (The Semantic Text Rule): on white brand 7.3:1, action 6.1:1, while the
   * gold fill is 2.6:1, so gold words use a deeper cut at 4.3:1 — large or bold
   * numbers only. Dark mode swaps the twins below. The -fg is the text ON a
   * fill: white on brand and action (7.3:1 / 6.1:1), near-black on gold
   * (7.1:1; white would read 2.6:1). */
  --color-brand: #a8201a;
  --color-brand-fg: #ffffff;
  --color-brand-text: var(--color-brand);
  --color-action: #136f58;
  --color-action-fg: #ffffff;
  --color-action-text: var(--color-action);
  --color-kpi: #c59b27;
  --color-kpi-fg: #1a1300;
  --color-kpi-text: #9a7418;

  /* Chart series (#445 · front-shop audit item 5, owner 2026-09-24): the colour of
   * a series in a chart — donut segments, legend dots, the KPI icon chips — and of
   * the POS tender buttons, so a tender is the same colour on the button and in the
   * dashboard's payment donut. Four hues in a FIXED order, never cycled; a fifth
   * series folds into "อื่นๆ" (grey). NOT the 8 workspace colours (DESIGN.md
   * § Tertiary). The series colours now come from the design system (v25, owner
   * 21/10/2026: ฟ้า · ชมพู · น้ำเงิน · ม่วง, darkened until the words on a tender
   * button pass 4.5:1) through tokens.generated.css, with --color-on-chart-N as the
   * ink on each. Checked with the dataviz palette validator on adjacent pairs, light
   * on #fff and dark on #1c1c1f: lightness band, chroma, colour-blind separation
   * (worst ΔE 8.4 light / 8.2 dark), normal-vision separation, >= 3:1 on the card. */
  /* เทา — "อื่นๆ", and the split-bill button (a mode, not a tender). One value in
   * both modes: 5.1:1 on #fff, 3.4:1 on #1c1c1f, 5.1:1 under white words. */
  --color-chart-other: #6e6e73;

  /* Two darker stops of the brand red, for the red gradients on hero cards, the
   * login CTA and the level badge. Every one of those gradients used to pick its
   * own dark end by hand (#c00010 / #a50722 / #99000c / #8f0410 — four values doing
   * one job), so the same "red panel" arrived at a different depth on each screen.
   * shade = one step down, for large calm surfaces; deep = two, for small badges
   * that want the drama. Fixed values, not derived: the gradients pair them with
   * the workspace red #e60012, not with --color-primary. */
  --color-primary-shade: #c00010;
  --color-primary-deep: #99000c;

  /* ON DARK — brand colours lifted for legibility on the dark rail, the login
   * panel, the billing hero and the camera overlay. The brand red and gold keep
   * their value in both modes (see DESIGN.md), which means small text in them on a
   * near-black surface fails contrast. These are the read-me-anyway variants; use
   * them ONLY on a dark surface, never on a card. */
  --color-primary-on-dark: #ff4d57;
  --color-accent-on-dark: #ffe08a;
  --color-danger-on-dark: #ffd9d9;

  /* THE CHASSIS — the rail is the frame around the screen, not content in it, so
   * it holds one value in both themes and never takes a tenant's brand colour
   * (DESIGN.md "The Dark Rail Rule"). DESIGN.md declared these two values from
   * the day the rule was written; until 2026-08-16 they existed only as literals
   * in layout.css, so the one surface the rule protects was the one surface with
   * no token to protect it. Deliberately NOT overridden under [data-theme='dark']:
   * that is the whole point of the rule. */
  --color-rail: #141518;
  --color-rail-border: #23252b;

  /* Surfaces (light mode defaults) — warm neutral, cards on a light gray canvas */
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-surface-2: #f0f0f2;
  --color-border: #e4e4e7;
  /* Behind modals and bottom sheets. The same rgba(0,0,0,0.5) that every dialog
     in the app had hardcoded on its own; named here so a sheet is a sheet
     everywhere, and so dark mode can go heavier without hunting for literals. */
  --color-scrim: rgba(0, 0, 0, 0.5);
  /* The heavier veil, for a screen that has to swallow the page behind it rather
     than merely dim it: เครื่องตอกบัตร is a kiosk left running in a shop all day,
     and its sheets must read as the only thing on screen from across a room.
     Navy rather than black — it sits over the clock's own dark canvas and pure
     black there looks like a dead panel.
     Deliberately NOT overridden for dark mode, unlike --color-scrim: at 85% the
     veil already carries the separation on either canvas, and the two literals
     this replaces had no dark variant either, so a dark value here would change
     a screen that nobody asked to change. */
  --color-scrim-strong: rgba(2, 6, 23, 0.85);

  /* Text */
  --color-text: #111111;
  --color-text-muted: #666666;

  /* Semantic */
  --color-success: #16a34a;
  --color-warning: #e08e0b;
  /* Text-only variants. The fills above are tuned for icons/backgrounds and fail
   * WCAG AA as small text (#16a34a = 3.30:1 on white, #e08e0b = 2.61:1). Use these
   * whenever the semantic colour carries ACTUAL WORDS — trend lines, status pills,
   * "เหลือน้อย" labels — so a shop reading a tablet in daylight can still read them.
   * Verified: 5.44:1 / 5.93:1 on the card, 4.60:1 / 5.00:1 on their own 12% tint. */
  --color-success-text: #0f7a37;
  --color-warning-text: #8a5a00;
  --color-danger: #c81018; /* deeper crimson, distinct from brand red */

  /* PAPER — a sheet, not a screen. Receipts, payslips, POs and tax invoices draw
   * a white sheet at a fixed mm width so the cashier previews on screen exactly
   * what leaves the printer, and the same markup is what prints. The screen text
   * tokens are wrong here in both directions: in dark mode they turn the ink pale
   * on a sheet that stays white, and on paper there is no theme to follow at all.
   * Like --color-scrim-strong, deliberately NOT overridden for dark. */
  --color-paper-ink-muted: #555555;
  --color-paper: #ffffff;
  --color-paper-ink: #111111;
  --color-paper-rule: #777777;
  --color-paper-rule-light: #888888;
  --color-paper-danger: #cc0000;

  /* GUEST SCREEN — the tablet turned around to face the customer to scan a
   * PromptPay QR. Locked light in both modes on purpose: a QR needs a bright
   * quiet zone to scan reliably, the amount needs maximum contrast at arm's
   * length, and the customer never chose the shop's dark mode. Slate rather than
   * the app's neutrals so this screen reads as the bank's surface, not ours. */
  --color-guest-ink: #0f172a;
  --color-guest-ink-muted: #475569;
  --color-guest-ink-faint: #64748b;
  --color-guest-rule: #cbd5e1;

  /* Shape & depth — Clicx leans on big rounded cards + pill buttons */
  /* The small step, for anything under ~24px: a checkbox, a text-line
   * placeholder, a micro badge. 10px on an 18px box reads as a capsule rather
   * than a rounded square. Value matches the `xs` step recorded in DESIGN.md. */
  --radius-xs: 8px;
  /* Chart geometry only — bar caps, legend swatches, sparkline ends. These are
   * marks in a plot, not containers: a 12px legend swatch at `xs` reads as a
   * dot and stops matching the square in the chart it labels. Never use it on
   * anything a finger touches. */
  --radius-chart: 3px;
  --radius-sm: 10px;
  /* Deliberately one step off --radius-sm: a 44px icon button in the topbar is a
   * square of chrome, not a text button, and reading as slightly softer is how it
   * says so. Documented in DESIGN.md as the `control` step since 2026-08-04, a
   * token since 2026-08-16, and every literal that meant it was folded in the
   * same day — the step and its callers landed together, so it never got the
   * chance to become a value people wrote out by hand. */
  --radius-control: 12px;
  --radius-md: 16px;
  /* The floating mobile nav bar. Wider than a card because it is a detached slab
   * with air on all four sides, not a panel butted against the page. */
  --radius-nav: 20px;
  --radius-lg: 22px;
  /* Bottom sheets: the top two corners only, and wider still — the radius is the
   * grip that says "this slid up from the edge and can slide back down". */
  --radius-sheet: 24px;
  --radius-pill: 999px;
  /* Depth = three layers only (DESIGN.md "The Two-Step Depth Rule", owner 2026-07-30):
   *   rest  — a card sitting on the tray (~1mm). Pairs with the 1px border, and stays
   *           thin enough that six KPI cards in a row don't read as overlapping glows.
   *   lift  — a pressable card responding to :hover AND :active (touch has no hover),
   *           with translateY(-2px) and a .18s ease-out transition.
   *   float — things that genuinely float above the page: modals, dropdowns, toasts,
   *           overlay badges, the floating POS total bar.
   * The --shadow-card / --shadow-sm aliases were removed 2026-08-16 after their
   * last 45 references were renamed. They had been kept "until the callers move
   * over", which is how an alias becomes a second name: the count grew 24 → 45
   * while it sat there, because each new screen copied whatever the screen beside
   * it said. A deprecated name with no removal date is just a synonym. */
  --shadow-rest: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.07);
  --shadow-lift: 0 6px 14px rgba(15, 23, 42, 0.1), 0 20px 44px rgba(15, 23, 42, 0.13);
  --shadow-float: 0 4px 8px rgba(15, 23, 42, 0.08), 0 24px 56px rgba(15, 23, 42, 0.16);
  /* Bottom-anchored surfaces cast UPWARD. Light in this system comes from above,
   * so a bar or sheet welded to the bottom edge has to throw its shadow onto the
   * content it covers — a downward shadow there falls off the screen and the panel
   * reads as painted on. rise = the mobile nav bar; rise-lg = the sheet above it. */
  --shadow-rise: 0 -10px 34px rgba(15, 23, 42, 0.16), 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-rise-lg: 0 -12px 40px rgba(15, 23, 42, 0.25);

  /* Motion — one vocabulary for the whole app.
   * The thesis: this is the shop's operating system, so motion has exactly two
   * jobs — acknowledge a touch, and explain that new numbers just arrived.
   * Nothing here loops, nothing decorates, and every duration is short enough
   * that a busy cashier never waits on choreography.
   * Durations express distance: the further a thing travels or the more it
   * changes, the longer it takes. Exits are always faster than entrances. */
  --dur-press: 120ms; /* touch feedback — must feel instant */
  --dur-fast: 180ms; /* a control changing state */
  --dur-base: 260ms; /* a page or panel arriving */
  --dur-slow: 420ms; /* the one authored entrance: the day's numbers landing */
  /* Confident deceleration, no bounce: money should settle, not spring. One curve
   * for the whole app. (--ease-in was defined here until 2026-08-16 and used by
   * exactly nothing: an accelerating curve is for things leaving, and nothing in
   * an operations screen leaves on its own. Removed rather than left as a loaded
   * gun — an unused token reads as permission.) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Shared UI contract — every solution composes its own screen, while these
   * measurements keep the product feeling like one application. */
  --ui-page-gap: var(--space-4);
  --ui-card-padding: var(--space-4);
  --ui-card-padding-compact: 14px;
  --ui-card-padding-roomy: var(--space-5);
  --ui-panel-head-height: 50px;
  --ui-kpi-min-height: 112px;
  --ui-kpi-icon-size: 42px;
  --ui-control-height: 44px;
  --ui-page-title-size: clamp(21px, 1.7vw, 26px);
  --ui-section-title-size: 15px;
  --ui-body-size: 13px;
  --ui-helper-size: 11.5px;

  /* Layout */
  --sidebar-width: 256px;
  --header-height: 60px;
  --mobilenav-height: 76px;
  /* Data-heavy dashboards need more room than forms. Individual narrow forms
   * may still set their own max-width, but the workspace itself must not force
   * six-card dashboards into a 1,200px ceiling on large displays. */
  --content-max: 1440px;

  /* THE DEVICE'S OWN EDGES — a notch, a home indicator, a gesture bar, a rounded
   * corner. The browser reports them through env(); these name them so a screen
   * asks for "the safe edge" instead of re-deriving it. env() resolves to 0 where
   * there is nothing to avoid, so the same rule is correct on a desktop monitor
   * and on an iPhone in landscape.
   *
   * WHY TOKENS AND NOT env() AT EACH SITE (2026-08-16): a sweep found 37 sites
   * spelling this four different ways — bare env(), env() plus a space step,
   * max(env(), 16px), and the three-term stack below. Four spellings means four
   * different amounts of clearance for the same physical edge, which is what
   * "the position is slightly off on that device" actually looks like from the
   * shop floor. One name per edge, and the value is arguable in one place. */
  /* The DEV ribbon (below) sits at the top edge like a notch, so everything that
   * already clears the notch clears the ribbon too — no screen needs its own rule. */
  --test-ribbon-h: 0px;
  --safe-top: calc(env(safe-area-inset-top, 0px) + var(--test-ribbon-h));
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* What a scrolling page must leave at its foot so the last row clears the
   * floating mobile nav AND the device's gesture bar underneath it. This is the
   * three-term stack that was being retyped per page; get it wrong once and the
   * final row of a stock count is unreachable on that device only. */
  --safe-bottom-nav: calc(var(--mobilenav-height) + var(--safe-bottom) + var(--ui-page-gap));
  /* The floor the thumb bar occupies, for anything that measures itself against
     the bottom of the viewport (the POS cart's sticky max-height). Zero by
     default and filled in by `.shell[data-bottom-nav='on']`, so a formula can
     subtract it unconditionally and stay correct on screens with a rail. */
  --nav-reserve: 0px;

  /* Stacking. A dialog must clear every piece of shell chrome that can be open
   * underneath it: the mobile bottom nav (30), the all-groups overview panel
   * (88), the setup wizard scrim (90), the topbar menu (110/120) and the mobile
   * "More" sheet (140/141). It stays BELOW toast notifications (300) on purpose
   * — a "saved" confirmation still has to be readable over an open dialog. */
  --z-modal: 200;

  /* Body = Prompt (readable), display/headings = Kanit (per brand CI typography).
   * Burmese, Lao and Khmer (#451): the brand faces carry none of these scripts, and
   * a bundled face (brand-fonts.ts) is only drawn when a stack NAMES it — without
   * these names the staff languages fell to whatever the device had. Thai and Latin
   * still resolve to Prompt/Kanit first; each script face downloads only when its
   * own letters appear (unicode-range). DESIGN.md: script-fallback. */
  --font-sans: 'Prompt', 'Noto Sans Thai', 'Noto Sans Myanmar', 'Noto Sans Lao',
    'Noto Sans Khmer', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Kanit', 'Prompt', 'Noto Sans Thai', 'Noto Sans Myanmar',
    'Noto Sans Lao', 'Noto Sans Khmer', system-ui, sans-serif;
}

:root[data-theme='dark'] {
  /* TaoKae dark — near-black neutral; the red/gold accents pop on top */
  --color-bg: #131315;
  --color-surface: #1c1c1f;
  --color-surface-2: #26262a;
  --color-border: #333338;
  /* Heavier on dark: a 50% veil over a near-black canvas barely separates the
     sheet from the page behind it. */
  --color-scrim: rgba(0, 0, 0, 0.66);
  --color-text: #f5f5f5;
  --color-text-muted: #a0a0a6;
  /* Dark mode inverts the text variants: the light-mode darks fall to ~3:1 on a
   * near-black card, so text goes lighter than the fill instead of darker. */
  --color-success-text: #4ade80;
  --color-warning-text: #fbbf24;
  /* CI words on the #1c1c1f card: แดงชาด reads 2.3:1 and เขียวหยก 2.8:1 there, so
   * text takes a 60% tint toward white (5.3:1 / 6.4:1) and gold takes the on-dark
   * gold. The fills above stay as they are. */
  --color-brand-text: #cb7976;
  --color-action-text: #71a99b;
  --color-kpi-text: var(--color-accent-on-dark);
  /* Chart series on the dark card: the *-text twins above are 60% tints that read
   * washed out as marks (validator: lightness, chroma and colour-blind separation
   * fail), and the fills are too dark (แดงชาด 2.3:1). These are their own steps on
   * the same hues — >= 3:1 on #1c1c1f and still >= 3:1 under a white icon. */
  --shadow-rest: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 6px 14px rgba(0, 0, 0, 0.5), 0 20px 44px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 4px 8px rgba(0, 0, 0, 0.5), 0 24px 56px rgba(0, 0, 0, 0.55);
  --shadow-rise: 0 -10px 34px rgba(0, 0, 0, 0.5), 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-rise-lg: 0 -12px 40px rgba(0, 0, 0, 0.55);
}
