/* Design tokens · Liquid Glass (Phase 7a). Loads first; css/ux/glass.css (the material) loads right after it. Additive: the :root vars in showroom.css keep working.

   WHAT THE UI IS MADE OF
     One material, Liquid Glass, over the scene. No colour accent: the accent is white / silver (bright highlights, soft silver edges).
     The only colours left are the muted map categories (--c-*) and the three availability states (--ok, --hold, --sold), always desaturated and used sparingly.
     --gold --gold-2 --bronze --champagne are kept as ALIASES, now white / silver, so a stray old rule can never bring gold back. New code uses the --acc* tokens.

   COLOUR       --acc (white) · --acc-2 (silver) · --acc-3 (mid silver) · --acc-ink (dark text ON a white surface)
                --text-hi / --text-mid / --text-lo: white at 100 / 72 / 56% (the Apple label hierarchy; 56% is the AA floor on the TV)
                --ink --ink-2 --muted: dark text on the light glass (Day map) and on any light surface
   TYPE         --sans = -apple-system, SF Pro Display / Text (the iPad's own font), Manrope (bundled, the offline fallback), system-ui. No serif anywhere.
                --num = the same stack, SF Rounded first, for big figures (light weight, tabular numerals). Titles: weight 300 to 400, tracking -0.022em, tight leading.
                --t-* shorthand tokens below; the overline (.k and friends) is 11 to 12px, uppercase, +0.08em, 60% white.
   SHAPE        --r-tag 12 · --r-ctl 22 · --r-card 30 · --r-sheet 34 · --r-pill 999. Controls are capsules; cards and sheets use continuous large radii.
   MIRAI INK    (24 October, premium UI, Phase 2, design-research/BACKLOG-2.md Part A2) the resting look. Ink on paper in three depths: the well (--mf-paper #f1f1ef) under
                white slabs (no hairline, no resting shadow) holding 6% ink washes (--mf-wash); over the scenes one neutral smoked glass (--lg-tint* near-black, no purple,
                no sheen, no inner shade) with a uniform 1px edge (--mf-edge, white 10% / ink 8% on light) and a 1px top highlight. Selection inverts (--lg-fg fill,
                --mf-fg-inv text); a segmented thumb is a white slab. Radii --mf-r-xs/sm/md/lg/xl 6/10/14/20/28 (TV 6/12/16/24/34), nested = max(6px, outer - inset).
                Shadows only on what floats (--mf-sh-*). One ink #16161b at 100 / 76 / 64%. The primitives that use these live in css/ux/mf-base.css.
   MOTION       Mirai Feel (24 October, premium UI): --mf-t-press 100 · --mf-t-fast 160 · --mf-t-base 220 · --mf-t-slow 420 · --mf-t-long 600 (played values);
                --mf-ease-out (quint-out, the default) · -pop · -morph · -press · -btn · -glide · -inout · -exit; springs --mf-spring-settle / -lively / -glide, each over its own -t.
                The legacy names alias them: --dur-press/-quick/-base = fast/base/slow, --ease-out/--ease-expo = --mf-ease-out, --ease-spring = --mf-ease-pop;
                --dur-slow stays 720ms (the Day/Dusk material crossfade). JS reads the same values from window.MF (js/ux/feel.js)
   MIRAI CALM   (30 October, main v5) ADDITIVE: only the components ported from Apple-minimal (orb and sun dial, side level bar, top chrome, floor scale, Home pager,
                zoom stack, floor nav bar) read these; every --mf-* curve above keeps its main-base value. One critically damped spring (bounce 0) --mc-spring, played over
                --mc-s1-t 300 / -s2-t 440 / -s3-t 600ms; fades --mc-ease-fade over --mc-t-fade 200 / -fade-out 160ms; --mc-t-press 80ms; travel --mc-lift 4 / --mc-rise 8px;
                overlays scale --mc-pop-from .96 → 1 and leave at --mc-exit-to .98; --mc-stagger 20ms. JS: MF.ease.calm / .fade, MF.gsap.calm / .fade, MF.gsapCalm(ms),
                MF.spring.calm(ms) (k, c for MF.run), MF.t.s1 / s2 / s3 / fade / fadeOut / pressCalm (js/ux/feel.js). Values copied exactly from ../DT-3.0 (Phase 3, C-001)

   THE MATERIAL: HYBRID LIQUID GLASS (css/ux/glass.css builds it from the --lg-* variables set on <body> below; js/ux/glass.js feeds the snapshots)
     Three layers make a surface read as glass, in this order from the back:
       (a) a BLURRED BACKDROP: a snapshot of the map canvas behind the surface (or a pre-blurred JPEG from assets/blur/ on image scenes), taken once on settle
       (b) a WHITE TINT (about 12%; 28% on the light variant) plus a top-left to bottom-right SHEEN gradient
       (c) the SPECULAR EDGE (a 1px white gradient ring, bright top-left, ~10% bottom-right) plus an inner top highlight, an inner bottom shade and a large diffuse shadow
     Tiers:
       .lg            regular glass for the chrome (back, tally, guest, altimeter, orb, ring buttons, cta). FLAT: translucent tint + sheen + edge. No blur, no snapshot
       .lg-thin       labels, chips, pins, count bubbles, tags. FLAT, the lightest fill
       .lg-prominent  the ONE primary action: a bright near-white glass capsule, dark text. FLAT
       .lg-snap       SNAPSHOT GLASS for large surfaces (cards, the rail pill and list, the context strip, sheets). The blurred backdrop is a --lg-snap image that js/ux/glass.js
                      draws from the live map canvas (1/8 scale, blurred once, darkened or lightened) on settle, on card/lens change, on timechange and on resize.
                      During a flight (body.is-moving) the wash goes opaque in the surface's average colour (200ms crossfade) and a fresh snapshot is taken on settle.
                      Register a new surface with ONE call:  __uxGlass.register("#my-sheet")  (a selector) or  __uxGlass.register(el)  (an element).
                      Image scenes: __uxGlass.addSource(fn) tells the helper which image sits behind (see the header of js/ux/glass.js).
       .lg-live       REAL backdrop-filter (blur 22px, saturate 160%). At most ONE element on screen, and only while it is not moving. Prefer .lg-snap.
       .lg-tint       a light-variant helper: forces the Day (bright glass, dark text) tokens inside any element
       .lg-sel        the selected blob: the sliding indicator that window.__uxGlide moves under a segmented control
     Titles and story text sit DIRECTLY on the scene, no box: a single soft dark gradient scrim behind them (#ui::before, no blur), big light SF type, a soft text shadow (--lg-halo).

   PERFORMANCE BUDGET (product owner, Phase 7a; Phase 7b follows it too)
     1. backdrop-filter: at most ONE element at a time (.lg-live), never during a flight, never nested. Everything large uses snapshot glass; everything small is flat.
        Phase 7b: the close pages (Floor, Home, Walk, Choose, Price, Summary) use NO backdrop-filter at all (a pre-blurred scene under translucent fills). The one live element there is the active still sheet:
        the Compare sheet, the presenter drawer or a quick-answers card (css/ux/close2.css); the CSS drops the others while one is open.
        Pins, labels, chips, dots, ring buttons, tally, back, guest, altimeter, cluster bubbles: NO backdrop-filter and no live filter:blur. Glows are radial gradients.
     2. Animate only transform and opacity. No animated blur, box-shadow, width/height, top/left. Press and selection = scale + a pre-made highlight layer fading in.
        (Exceptions, named: the Day/Night crossfade interpolates registered colour variables once when the sun dial moves; the glide blob settles with width/height on a tiny empty element.)
     3. While the camera flies or a card morphs, body.is-moving is set (js/ux/map.js, js/ux/glass.js): snapshots are skipped, large surfaces fade to an opaque average-colour fill,
        and ambient loops pause. On settle body.is-settling holds the 200ms fade back to the fresh snapshot.
     4. will-change: transform only on the few elements that animate continuously (the map canvas, the active card). contain: layout paint on cards and the marker layer.
     5. One looping animation on screen at a time (the Mirai breathing ring); it pauses on idle (body.clean), on body.is-moving and under prefers-reduced-motion.
     6. No new setInterval polling; batch layout reads before writes; no getBoundingClientRect inside rAF during flights.
   Adaptive: body.glass-day (the sun dial on Day, set by js/ux/map.js) swaps the map levels to the light variant: brighter glass, dark text (a 700ms crossfade, never a hard cut).
   The close pages (Floor, Home, Walk, Choose, Price, Summary, Compare, the drawer, quick answers) are always dark glass over a pre-blurred scene (assets/blur/scene-*.jpg, one shared fixed layer, opacity only);
   only the drawings (floor plans, master plan, unit plans) sit on frosted WHITE sheets, which take the light tokens (.lg-tint and the sheet selectors above).

   VARIABLES SET ON <body> (override them to retune the material; light values live under "light variant" at the end of this file)
     --lg-tint / --lg-tint-thick / --lg-tint-thin   the dark base under the sheen      --lg-sheen          the diagonal white sheen over the tint
     --lg-blur / --lg-blur-card                     blur radii of .lg-live               --lg-sat / --lg-bright   its saturate / brightness
     --lg-wash-rest / --lg-avg-d                    the white tint over the snapshot / the fallback average colour (glass.js sets the real --lg-avg per surface; in flight the wash becomes rgb(var(--lg-avg) / .97))
     --lg-e0 / --lg-e1                              specular edge alpha at top-left / bottom-right
     --lg-hi / --lg-shade / --lg-shadow / --lg-shadow-s   inner highlight, inner bottom shade, large and small diffuse shadows
     --lg-fg / --lg-fg2 / --lg-fg3                  text on glass (100 / 74 / 58%)       --lg-line   hairlines on glass
     --lg-field / --lg-field-hi                     plain translucent fills for controls INSIDE glass (no blur)
     --lg-sel / --lg-sel-fg / --lg-sel-sh           the selected blob                    --lg-prom / --lg-prom-fg / --lg-prom-sh   the prominent capsule */
:root {
  /* colour: white / silver. The map categories and availability colours are muted on purpose. */
  --night-0: #0e0b14; --night-2: #221c2c;
  --acc: #ffffff; --acc-2: #e3e4e9; --acc-3: #b4b6bf; --acc-ink: #101014; --acc-glow: rgba(255, 255, 255, .55);
  --text-hi: #f5f5f7; --text-mid: rgba(245, 245, 247, .72); --text-lo: rgba(245, 245, 247, .56);
  --champagne: linear-gradient(180deg, #ffffff 0%, #f1f1f4 55%, #dcdde3 100%);   /* alias: the bright white glass fill */
  --ok: #8fc4a0; --hold: #dfb06a; --sold: #8b8b94;
  /* status ink on light sheets (AA on white) */
  --ok-ink: #1d6a3c; --hold-ink: #7a4f08; --sold-ink: #4a4a52;
  /* the cost sheet: one muted colour per part of the price, readable on dark glass (--cost-N) and on a white sheet (--cost-N-d). base blue, floor rise teal, parking violet, club amber, GST coral, stamp duty green */
  --cost-1: #6ea8f2; --cost-2: #4fc3b5; --cost-3: #a78bfa; --cost-4: #e8b14f; --cost-5: #f08a78; --cost-6: #7ccb8c;
  --cost-1-d: #2f6fd0; --cost-2-d: #17897d; --cost-3-d: #7650d8; --cost-4-d: #b7780f; --cost-5-d: #d4573f; --cost-6-d: #2e8b4e;
  /* the close pages: state colours (now, done, interest) */
  --now: #6ea8f2; --done: #7ccb8c; --interest: #f0a35c;
  /* data layers on the map: DISTINCT, harmonised hues so layers tell apart at a glance (warm to cool). The chrome stays white / silver glass; white is only Mirai and the focus state.
     --layer-N is the Dusk / Night tone, --layer-N-d the Day tone (deeper, so it holds on the satellite map). Fills and strokes only: no live blur on data layers. */
  --layer-1: #F2B33D; --layer-2: #8FD14F; --layer-3: #FF8A5B; --layer-4: #A66BFF; --layer-5: #FF5FA2; --layer-6: #4FA8FF; --layer-7: #3CC6B5; --layer-8: #E7A25C;
  --layer-1-d: #D4900F; --layer-2-d: #5FA21C; --layer-3-d: #E5602B; --layer-4-d: #7D3FE0; --layer-5-d: #E02E80; --layer-6-d: #1F7FE0; --layer-7-d: #12988A; --layer-8-d: #C9772C;
  --st-done: #7ED6A0; --st-build: #F2B33D; --st-plan: #A66BFF; --st-done-d: #2E9D5E; --st-build-d: #D4900F; --st-plan-d: #7D3FE0;   /* Century projects: delivered / building now / coming next (shape says it too: solid, ring, dashed) */
  /* the six Area categories (a little more saturated so they read on the satellite Day map too) */
  --c-work: #6FA3E8; --c-edu: #B49CF0; --c-health: #EE8A86; --c-lake: #5FC9B2; --c-dine: #EBA55A; --c-civic: #A9ABBC;

  /* type: Apple system type everywhere; Manrope (bundled) only where SF is not installed */
  --sans: -apple-system, "SF Pro Display", "SF Pro Text", Manrope, system-ui, sans-serif;
  --num: ui-rounded, "SF Pro Rounded", -apple-system, "SF Pro Display", Manrope, system-ui, sans-serif;
  --fs-micro: max(12px, .68rem); --fs-label: max(12px, .72rem);   /* A11 A-002: nothing under 12px */ --fs-ui: .95rem; --fs-body: .95rem; --fs-body-l: 1.05rem;
  --fs-title: 2rem; --fs-figure: 2.2rem; --fs-figure-xl: 3.2rem; --fs-display-2: 3rem; --fs-display-1: 4.2rem;
  --lh-body: 1.5; --ls-label: .08em; --ls-title: -.022em;
  --t-display-1: 300 var(--fs-display-1)/.98 var(--sans);
  --t-display-2: 300 var(--fs-display-2)/1.02 var(--sans);
  --t-title: 400 var(--fs-title)/1.1 var(--sans);
  --t-figure: 300 var(--fs-figure)/1 var(--num);
  --t-figure-xl: 300 var(--fs-figure-xl)/1 var(--num);
  --t-body-l: 500 var(--fs-body-l)/1.5 var(--sans);
  --t-body: 500 var(--fs-body)/1.5 var(--sans);
  --t-ui: 600 var(--fs-ui)/1.2 var(--sans);
  --t-label: 600 var(--fs-label)/1.2 var(--sans);
  --t-micro: 600 var(--fs-micro)/1.3 var(--sans);

  /* shape (px) and elevation */
  --r-tag: 12px; --r-ctl: 20px; --r-card: 28px; --r-sheet: 34px; --r-pill: 999px;   /* (31 October, A11 A-010) four radii: 12 / 20 / 28 / 34, plus the capsule (were 12 / 22 / 30 / 34) */
  --e1: 0 8px 22px -10px rgba(0, 0, 0, .55);
  --e2: 0 24px 60px -20px rgba(0, 0, 0, .55);
  --e3: 0 40px 90px -30px rgba(0, 0, 0, .7);

  /* motion (24 October, premium UI, P-001): the legacy names now speak Mirai Feel (the block below). --dur-slow stays 720ms: it is the measured Day/Night material crossfade */
  --dur-press: var(--mf-t-fast); --dur-quick: var(--mf-t-base); --dur-base: var(--mf-t-slow); --dur-slow: 720ms;
  --ease-out: var(--mf-ease-out);   /* quint-out: the one curve for everything that arrives or settles */
  --ease-expo: var(--mf-ease-out);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: var(--mf-ease-pop);   /* (24 October, premium UI) the old linear() spring (~5% overshoot) and its @supports wrapper became the one pop ease (3.9%) */
}

/* ---------- Mirai Feel motion (24 October, premium UI, P-001). Values are what PLAYS: js/tempo.js does not touch CSS. ---------- */
:root {
  --mf-ease-out:   cubic-bezier(.22, 1, .36, 1);     /* quint-out: everything that arrives or settles (bencho "out", 256 uses) */
  --mf-ease-pop:   cubic-bezier(.22, 1, .36, 1);  /* A11: no overshoot any more (was 3.9%): the same quint-out; the tiny bounce lives on --mf-spring-lively only (dots, badges) */
  --mf-ease-morph: cubic-bezier(.33, .55, .2, 1);    /* geometry morphs: a box changing size AND place (card -> panel, FLIP) */
  --mf-ease-press: cubic-bezier(.22, 1, .36, 1);   /* A11: no overshoot any more (was 5.3%): the press lets go on quint-out / the calm spring */
  --mf-ease-btn:   cubic-bezier(.22, 1, .36, 1);    /* round-button discs and icon nudges (0.4% overshoot) */
  --mf-ease-glide: cubic-bezier(.22, 1, .36, 1);  /* a selection blob travelling between options (bencho icon-bar settle) */
  --mf-ease-inout: cubic-bezier(.65, 0, .35, 1);     /* on-screen travel between two resting places (kept from DT-3.0) */
  --mf-ease-exit:  cubic-bezier(.4, 0, 1, 1);        /* a thing leaving for good (toast out, ghost out, sheet away) */
  --mf-t-press: 100ms;  /* press-in only */
  --mf-t-fast:  160ms;  /* colour, opacity, hover, small fades, exits */
  --mf-t-base:  220ms;  /* text swaps, digit rolls, chips, pills, knobs */
  --mf-t-slow:  420ms;  /* panels, cards, popovers, glide blob, page-level content */
  --mf-t-long:  600ms;  /* sheets' content, large reveals, hero words, crossfades of photos */
  /* springs as CSS easings: each MUST be played over its own -t (a linear() spring stretched to another duration is a different spring) */
  --mf-spring-settle: linear(0 0%, 0.015 2%, 0.053 4%, 0.107 6%, 0.169 8%, 0.236 10%, 0.337 13%, 0.434 16%, 0.551 20%, 0.671 25%, 0.764 30%, 0.844 36%, 0.906 43%, 0.944 50%, 0.974 60%, 0.99 72%, 0.997 85%, 1 100%);
  --mf-spring-settle-t: 480ms;   /* k 380, c 34, m 1: zeta .87, 0.3% overshoot. Sheets, cards, popovers settling */
  --mf-spring-lively: linear(0, 0.255 4.2%, 0.725 8.3%, 1.095 12.5%, 1.244 16.7%, 1.215 20.8%, 1.102 25%, 1 29.2%, 0.944 33.3%, 0.941 37.5%, 0.966 41.7%, 0.994 45.8%, 1.011 50%, 1.016 54.2%, 1.011 58.3%, 1.003 62.5%, 0.998 66.7%, 0.996 70.8%, 0.997 75%, 0.999 79.2%, 1 83.3%, 1.001 87.5%, 1.001 91.7%, 1 95.8%, 1);
  --mf-spring-lively-t: 860ms;   /* k 500, c 18, m 1: zeta .40, 25% overshoot. ONLY for tiny pops (a dot, a tick, a badge), never for a panel */
  --mf-spring-glide: linear(0 0%, 0.015 2%, 0.053 4%, 0.107 6%, 0.169 8%, 0.236 10%, 0.337 13%, 0.434 16%, 0.551 20%, 0.671 25%, 0.764 30%, 0.844 36%, 0.906 43%, 0.944 50%, 0.974 60%, 0.99 72%, 0.997 85%, 1 100%);   /* A11 A-021: critically damped, no overshoot */
  --mf-spring-glide-t: 620ms;    /* k 260, zeta .725 (bencho tab-bar tile), 3.6% overshoot */
  --mf-press: .96;               /* the press scale for controls up to 300px; larger elements travel at most --mf-press-travel (A4) */
  --mf-press-travel: 12px;
  --mf-lift-y: 6px;              /* the one travel distance for text swaps and small entrances */
  --mf-rise-y: 12px;             /* the one travel distance for cards and panels entering */
}
@supports not (transition-timing-function: linear(0, 1)) {
  :root { --mf-spring-settle: cubic-bezier(.22, 1, .36, 1); --mf-spring-lively: cubic-bezier(.22, 1, .36, 1); --mf-spring-glide: cubic-bezier(.22, 1, .36, 1); }
}
/* ---------- Mirai Calm motion (30 October, main v5; copied from ../DT-3.0 Phase 3, C-001). Additive: read only by the ported components. ---------- */
:root {
  /* the one spring: critically damped (bounce 0), scale-invariant; play it over --mc-sN-t = 1.469 × its perceptual duration.
     x(t) = 1 - (1 + wt)e^(-wt) sampled at 18 stops; it never passes 1, so nothing that reads it overshoots */
  --mc-spring: linear(0 0%, 0.015 2%, 0.053 4%, 0.107 6%, 0.169 8%, 0.236 10%, 0.337 13%, 0.434 16%, 0.551 20%, 0.671 25%, 0.764 30%, 0.844 36%, 0.906 43%, 0.944 50%, 0.974 60%, 0.99 72%, 0.997 85%, 1 100%);
  --mc-s1-t: 300ms;   /* d .20: thumbs, knobs, dots, labels, small chips, the press release, the side bar's strip */
  --mc-s2-t: 440ms;   /* d .30: popovers, cards, a thumb travelling, panels inside a page */
  --mc-s3-t: 600ms;   /* d .41: sheets, large reveals, a page settling after a hand-over */
  --mc-ease-fade: cubic-bezier(.4, 0, .6, 1);   /* opacity and colour (exits keep --mf-ease-exit) */
  --mc-t-fade: 200ms;  --mc-t-fade-out: 160ms;  --mc-t-press: 80ms;
  --mc-lift: 4px;  --mc-rise: 8px;  --mc-pop-from: .96;  --mc-exit-to: .98;
  --mc-stagger: 20ms;  /* cap 6 items */
}
@supports not (transition-timing-function: linear(0, 1)) { :root { --mc-spring: cubic-bezier(.29, .40, .14, 1); } }   /* 2.3% max error at 1.2 × d */
/* (25 October, original + smooth variant) the two focus inks, named: the resting look is the original Liquid Glass (no Mirai Ink tokens), but the focus rings
   keep the measured fix of Phase 2 V-011: ink 45% read 2.83-2.89:1 on white and 2.46:1 on the Day strip (design-research/qa/ws0b/focus), so the light ring is 60% */
:root { --mf-focus-l: rgba(22, 22, 27, .6); --mf-focus-d: rgba(255, 255, 255, .85); }

/* ---------- Mirai Ink: the resting look (24 October, premium UI, Phase 2, V-001) ---------- */
:root {
  /* radius scale (BENCHO §1.1); nested radius = max(var(--mf-r-xs), outer - inset) */
  --mf-r-xs: 6px; --mf-r-sm: 10px; --mf-r-md: 14px; --mf-r-lg: 20px; --mf-r-xl: 28px; --mf-r-pill: 999px;
  /* ink system: one ink, fixed strengths (BENCHO §1.1; DT's own ink #16161b, ≈ bencho #17181a) */
  --mf-ink: #16161b; --mf-ink-rgb: 22, 22, 27; --mf-silver: #f5f5f7; --mf-slab: #ffffff;
  --mf-paper: #f1f1ef;                          /* the well: the ground of every paper level (was #f7f4ee cream) */
  --mf-ground-dark: #0e0e10;                    /* full-screen dark grounds: media library, viewers, walkthrough, how-we-build (was #0f0d14 / #100e14 purple-black) */
  --mf-wash: rgba(22, 22, 27, .06);   --mf-wash-hi: rgba(22, 22, 27, .11);       /* on light: rest / pressed or hover */
  --mf-wash-d: rgba(255, 255, 255, .07); --mf-wash-hi-d: rgba(255, 255, 255, .12); /* on dark */
  --mf-line: rgba(22, 22, 27, .10);   --mf-line-d: rgba(255, 255, 255, .10);     /* list dividers only (never a card edge) */
  --mf-smoke: rgba(14, 14, 18, .72);  --mf-smoke-chrome: rgba(18, 18, 22, .60);  --mf-smoke-photo: rgba(14, 14, 18, .62); /* dark glass: cards / chrome / labels over photos */
  --mf-scrim: rgba(10, 10, 12, .36);                                            /* overlay scrims, no blur (was rgba(14,12,20,.34)) */
  /* edges and highlights */
  --mf-ring-d: inset 0 0 0 1px rgba(255, 255, 255, .10);  --mf-ring-l: inset 0 0 0 1px rgba(22, 22, 27, .08);
  /* (25 October, Mirai Calm, C-004) one edge cue per surface (A3.0 rule 5): the top highlights are transparent shadows now, so every list that names them
     keeps its syntax. Were inset 0 1px 0 rgba(255,255,255,.10) / .90 */
  --mf-hi-d: 0 0 0 0 transparent;      --mf-hi-l: 0 0 0 0 transparent;
  /* shadows: only what floats */
  --mf-sh-float: 0 0 0 1px rgba(22, 22, 27, .06), 0 1px 2px rgba(22, 22, 27, .06), 0 8px 24px -12px rgba(22, 22, 27, .22);   /* chrome, tray, toast, action bar on paper */
  --mf-sh-overlay: 0 0 0 1px rgba(22, 22, 27, .06), 0 24px 70px -20px rgba(10, 10, 12, .38);                               /* sheets, drawer, popover cards (BENCHO-87 panel) */
  --mf-sh-thumb: 0 0 0 .5px rgba(22, 22, 27, .10), 0 1px 2px rgba(22, 22, 27, .14), 0 2px 6px -2px rgba(22, 22, 27, .18);    /* thumbs, knobs, slab discs (BENCHO-21/-30) */
  --mf-sh-lift-d: 0 1px 2px rgba(0, 0, 0, .30), 0 28px 60px -30px rgba(0, 0, 0, .65);                                       /* map/site cards over the scene (21ST lift) */
  --mf-sh-chrome-d: 0 1px 2px rgba(0, 0, 0, .30), 0 10px 24px -12px rgba(0, 0, 0, .55);                                     /* chrome capsules over the scene */
  /* focus (named). Implementer note (24 October, V-011): the light ring is ink 60%, not the 45% A2.1.1 kept from Phase 1: measured on the pixels (qa/ws0b/focus),
     ink 45% reaches 2.83-2.89:1 on white and on the paper well and 2.46:1 on the Day strip (2.96:1 is its ceiling on pure white), under V-011's own 3:1 */
  --mf-focus-l: rgba(22, 22, 27, .6); --mf-focus-d: rgba(255, 255, 255, .85);
  /* type */
  --mf-tr-display: -.03em; --mf-tr-title: -.02em; --mf-tr-ui: -.01em; --mf-tr-caps: .06em;
  /* icons */
  /* (25 October, Mirai Calm, C-005, A3.4) 1.5 beside 400/500 text (Manrope 500's stem at 14px), the × 1.75, a glyph that stands alone at ≤ 14px 2. Were 1.75 / 2 */
  --mf-ico-stroke: 1.5; --mf-ico-stroke-x: 1.75; --mf-ico-stroke-sm: 2;
}
:root.tv { --mf-r-sm: 12px; --mf-r-md: 16px; --mf-r-lg: 24px; --mf-r-xl: 34px; }   /* the TV's rem is 19-27px: corners grow ×1.2 with it */
/* the two registered colours of Mirai Ink (A2.1.2): they cross-fade with Day / Night like the ten above (values below, in the dark and the light blocks) */
@property --mf-edge   { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .10); }   /* the 1px edge ring colour of glass surfaces */
@property --mf-fg-inv { syntax: "<color>"; inherits: true; initial-value: #16161b; }                    /* text ON a selected (inverted) chip: ink on dark, white on light */

/* the material variables: dark scene (Night and Dusk). The overlays (drawer, sheet, quick answers) are always dark glass, on any level, Day included */
body, .lg-dark {
  --lg-blur: 22px; --lg-blur-card: 22px; --lg-sat: 160%; --lg-bright: 1.05;
  /* (24 October, premium UI, Phase 2, V-002) Mirai Ink dark: one flat neutral smoke (no purple, no sheen, no inner shade), a uniform 1px edge (--mf-edge, drawn by
     css/ux/mf-base.css), a 10% top highlight, lift shadows that only float. Was: tint rgba(58,54,78,.54) / thick rgba(34,30,48,.62) / thin rgba(58,54,78,.48), wash .12,
     avg 44 38 64, a 150° white sheen, edge .85 → .10, highlight .35, an inner bottom shade, fg3 .60, line .15, field .09 / .16, the white-gradient primary */
  --lg-tint: rgba(18, 18, 22, .60); --lg-tint-thick: rgba(14, 14, 18, .72); --lg-tint-thin: rgba(18, 18, 22, .52);
  --lg-wash-rest: rgba(255, 255, 255, .04); --lg-avg-d: 22 22 26;
  --lg-sheen: none;
  --lg-e0: .10; --lg-e1: .10;
  --lg-hi: 0 0 0 0 transparent; --lg-shade: 0 0 0 0 transparent;   /* (25 October, Mirai Calm, C-004) no top highlight (was var(--mf-hi-d), white 10%) */
  --lg-shadow: var(--mf-sh-lift-d); --lg-shadow-s: var(--mf-sh-chrome-d);
  --lg-fg: #f5f5f7; --lg-fg2: rgba(245, 245, 247, .76); --lg-fg3: rgba(245, 245, 247, .64); --lg-line: rgba(255, 255, 255, .10);
  --lg-field: rgba(255, 255, 255, .07); --lg-field-hi: rgba(255, 255, 255, .12);
  --lg-sel: rgba(255, 255, 255, .26); --lg-sel-fg: #ffffff; --lg-sel-sh: 0 1px 2px rgba(0, 0, 0, .30);
  --lg-prom: #f5f5f7; --lg-prom-fg: #16161b; --lg-prom-sh: 0 1px 2px rgba(0, 0, 0, .30), 0 8px 20px -10px rgba(0, 0, 0, .55);
  --mf-edge: rgba(255, 255, 255, .10); --mf-fg-inv: #16161b;   /* V-001: the two registered Mirai Ink colours, dark values */
  --lg-halo: 0 1px 14px rgba(0, 0, 0, .55), 0 0 2px rgba(0, 0, 0, .45);   /* titles sit on the scene with a soft shadow, no box */
  /* the Day / Night swap: the colour tokens are registered, so they interpolate on <body> and every surface and every word follows in step (700ms; 200ms for the moving fill) */
  transition: --lg-fg var(--dur-slow) var(--ease-out), --lg-fg2 var(--dur-slow) var(--ease-out), --lg-fg3 var(--dur-slow) var(--ease-out), --lg-line var(--dur-slow) var(--ease-out),
    --lg-field var(--dur-slow) var(--ease-out), --lg-field-hi var(--dur-slow) var(--ease-out), --lg-tint var(--dur-slow) var(--ease-out), --lg-tint-thin var(--dur-slow) var(--ease-out),
    --lg-tint-thick 560ms var(--ease-out), --lg-sel var(--dur-slow) var(--ease-out),
    --mf-edge var(--dur-slow) var(--ease-out), --mf-fg-inv var(--dur-slow) var(--ease-out),   /* (24 October, premium UI, Phase 2, V-001) the Mirai Ink pair follows the same 700ms */
    --lg-prom var(--dur-slow) var(--ease-out), --lg-prom-fg var(--dur-slow) var(--ease-out), --lg-sel-fg var(--dur-slow) var(--ease-out), --lg-wash-rest var(--dur-slow) var(--ease-out);   /* (25 October, premium UI, Phase 2, INTEG) the four below */
}
@property --lg-fg { syntax: "<color>"; inherits: true; initial-value: #f5f5f7; }
@property --lg-fg2 { syntax: "<color>"; inherits: true; initial-value: rgba(245, 245, 247, .76); }
@property --lg-fg3 { syntax: "<color>"; inherits: true; initial-value: rgba(245, 245, 247, .6); }
@property --lg-line { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .15); }
@property --lg-field { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .09); }
@property --lg-field-hi { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .16); }
@property --lg-tint { syntax: "<color>"; inherits: true; initial-value: rgba(18, 18, 22, .58); }        /* (24 October, premium UI, Phase 2, V-002) neutral (was rgba(28,26,38,.58)) */
@property --lg-tint-thin { syntax: "<color>"; inherits: true; initial-value: rgba(18, 18, 22, .52); }   /* neutral (was rgba(28,26,38,.52)) */
@property --lg-tint-thick { syntax: "<color>"; inherits: true; initial-value: rgba(14, 14, 18, .4); }   /* neutral (was rgba(26,24,35,.4)) */
@property --lg-sel { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .26); }
/* (25 October, premium UI, Phase 2, INTEG: WS2's request, AC-V 5) the four colours the Day / Night swap still cut in one frame: the one primary (the Then & now play
   button and knob, the sun thumb, Play, Begin, the avatars and badges), its glyph colour, the selected label on a thumb, and the glass wash layer. Registered, they
   cross-fade in the same 700ms. Every value they are given is a plain colour (checked), nothing inside the map reads them, so the map's reset below holds them still
   too: the swap restyles no more elements than before (the ten above already change on <body>) */
@property --lg-prom { syntax: "<color>"; inherits: true; initial-value: #f5f5f7; }
@property --lg-prom-fg { syntax: "<color>"; inherits: true; initial-value: #16161b; }
@property --lg-sel-fg { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --lg-wash-rest { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .04); }
/* (22 October, measured on a OnePlus Pad Go) nothing inside the map reads these ten (its canvas, routes, pins and clouds; checked element by element on Century, City,
   Market and Area, and against every rule that reads them: the map's cards and bars sit beside .mapview, not in it). Inherited, their 700ms swap re-styled every pin
   on every frame (up to ~1,400 in Area, 100-135ms a frame), so a drag of the sun dial across Day / Dusk stalled. Held still here, the map's subtree is left alone */
#lv-map > .mapview { --lg-fg: initial; --lg-fg2: initial; --lg-fg3: initial; --lg-line: initial; --lg-field: initial; --lg-field-hi: initial; --lg-tint: initial; --lg-tint-thin: initial; --lg-tint-thick: initial; --lg-sel: initial;
  --mf-edge: initial; --mf-fg-inv: initial;   /* (24 October, premium UI, Phase 2, V-001) the Mirai Ink pair is held still in the map as well */
  --lg-prom: initial; --lg-prom-fg: initial; --lg-sel-fg: initial; --lg-wash-rest: initial; }   /* (25 October, premium UI, Phase 2, INTEG) and the four registered with them */

/* light variant: the Day map and the light levels. Brighter glass, dark text (SF "regular" light material). */
body.glass-day:is([data-level="century"], [data-level="city"], [data-level="market"], [data-level="area"]),
body:is([data-level="home"], [data-level="choose"], [data-level="walk"], [data-level="price"], [data-level="summary"]), #drawer:not(.ux-setup), #sheet, #ask-ov,
.lg-tint, .cx-pl, .sm-pl, #lv-home .fp, #lv-home .u-plan, #lv-walk .wk-sheet {
  --lg-blur: 22px; --lg-blur-card: 22px; --lg-sat: 160%; --lg-bright: 1.08;
  /* (24 October, premium UI, Phase 2, V-003) Mirai Ink light: white glass .86 / .80 with no sheen, the edge in ink (--mf-edge), quiet ink shadows, one ink at
     100 / 76 / 64%, the selected thumb a white slab, the one primary solid ink. Was: white .70 / .62 / .66, wash .30, a sheen, white edges 1 → .30, an inner shade,
     blue-grey shadows with a .5px ring, fg3 .60, line .14, sel white .96 with a ring, the white-gradient primary */
  --lg-tint: rgba(255, 255, 255, .86); --lg-tint-thick: rgba(255, 255, 255, .80); --lg-tint-thin: rgba(255, 255, 255, .80);
  --lg-wash-rest: rgba(255, 255, 255, .24); --lg-avg-d: 240 240 238;
  --lg-sheen: none;
  --lg-e0: 0; --lg-e1: 0;
  --lg-hi: 0 0 0 0 transparent; --lg-shade: 0 0 0 0 transparent;   /* (25 October, Mirai Calm, C-004) no top highlight (was inset 0 1px 0 rgba(255,255,255,.9)) */
  --lg-shadow: 0 1px 2px rgba(22, 22, 27, .06), 0 24px 56px -28px rgba(22, 22, 27, .32); --lg-shadow-s: 0 1px 2px rgba(22, 22, 27, .08), 0 8px 20px -12px rgba(22, 22, 27, .26);
  --lg-fg: #16161b; --lg-fg2: rgba(22, 22, 27, .76); --lg-fg3: rgba(22, 22, 27, .64); --lg-line: rgba(22, 22, 27, .10);
  --lg-field: rgba(22, 22, 27, .06); --lg-field-hi: rgba(22, 22, 27, .11);
  --lg-sel: #ffffff; --lg-sel-fg: #16161b; --lg-sel-sh: var(--mf-sh-thumb);
  --lg-prom: #16161b; --lg-prom-fg: #ffffff; --lg-prom-sh: 0 0 0 0 transparent;
  --mf-edge: rgba(22, 22, 27, .08); --mf-fg-inv: #ffffff;   /* V-001: the two registered Mirai Ink colours, light values (= this selector list, A2.1.2) */
  --lg-halo: 0 0 10px rgba(255, 255, 255, .85);
}
@property --lg-wash { syntax: "<color>"; inherits: false; initial-value: rgba(255, 255, 255, .12); }

/* eased "soft shade" (Apple-style progressive edge): alpha stops follow an cubic-bezier(.65, 0, .35, 1) (smoothstep) curve, so no edge or band can be seen. Used as mask-image alpha on the tint and blur layers. */
:root { --soft-sym: rgba(0,0,0,0.000) 0%, rgba(0,0,0,0.104) 10%, rgba(0,0,0,0.352) 20%, rgba(0,0,0,0.648) 30%, rgba(0,0,0,0.896) 40%, rgba(0,0,0,1.000) 50%, rgba(0,0,0,0.896) 60%, rgba(0,0,0,0.648) 70%, rgba(0,0,0,0.352) 80%, rgba(0,0,0,0.104) 90%, rgba(0,0,0,0.000) 100%; --soft-sym-n: rgba(0,0,0,0.000) 0%, rgba(0,0,0,0.134) 10%, rgba(0,0,0,0.440) 20%, rgba(0,0,0,0.771) 30%, rgba(0,0,0,0.982) 40%, rgba(0,0,0,1.000) 50%, rgba(0,0,0,0.982) 60%, rgba(0,0,0,0.771) 70%, rgba(0,0,0,0.440) 80%, rgba(0,0,0,0.134) 90%, rgba(0,0,0,0.000) 100%; --soft-left: rgba(0,0,0,1.000) 0%, rgba(0,0,0,1.000) 7%, rgba(0,0,0,1.000) 14%, rgba(0,0,0,0.976) 22%, rgba(0,0,0,0.909) 30%, rgba(0,0,0,0.810) 38%, rgba(0,0,0,0.688) 46%, rgba(0,0,0,0.535) 55%, rgba(0,0,0,0.362) 65%, rgba(0,0,0,0.190) 76%, rgba(0,0,0,0.053) 88%, rgba(0,0,0,0.000) 100%; --soft-v: rgba(0,0,0,0.000) 0%, rgba(0,0,0,0.156) 3.5%, rgba(0,0,0,0.500) 7%, rgba(0,0,0,0.844) 10.5%, rgba(0,0,0,1.000) 14%, rgba(0,0,0,1.000) 86%, rgba(0,0,0,0.844) 89.5%, rgba(0,0,0,0.500) 93%, rgba(0,0,0,0.156) 96.5%, rgba(0,0,0,0.000) 100%; }

/* =====================================================================
   COMPACT SYSTEM (17 October, Phases 3 to 5): one scale for the sliders, chips, cards, pins and labels.
   Static values on :root only: nothing writes these at runtime. The px floors are the OnePlus Pad Go (1rem = 13px); the clamps grow with the
   root to a cap (1366 iPad: 1rem = 16.56px; 1080p: 19.14px). The TV (html.tv) and phones (portrait, 600px or less) adjust below.
   Hit areas: a control is 32px to the eye and 44px to the finger, through a ::after, its bar's padding, or the 8px touch slop of js/ux/a11y.js.
   ===================================================================== */
:root {
  /* controls and chips */
  --ctl-h: clamp(32px, 2.46rem, 40px);
  --ctl-h-lg: clamp(40px, 3.08rem, 48px);                              /* primary actions, segmented controls */
  --ctl-hit: 44px;
  --ctl-hit-y: min(0px, calc((var(--ctl-h) - var(--ctl-hit)) / 2));     /* a ::after's top and bottom inset that makes a 44px target */
  --ctl-hit-y-lg: min(0px, calc((var(--ctl-h-lg) - var(--ctl-hit)) / 2));
  --chip-px: clamp(10px, .8rem, 14px);
  --chip-gap: clamp(6px, .46rem, 8px);
  --chip-r: 999px;
  --bar-pad: 6px;                                                      /* a chip bar: 32px chips + 2 x 6px = a 44px bar */
  --bar-gap: 4px;
  --ico: clamp(14px, 1.08rem, 18px);
  --ico-sm: clamp(12px, .92rem, 15px);

  /* type: nothing under 11px */
  --t-label-fs: clamp(12.5px, .96rem, 15px);
  --t-meta-fs: clamp(12px, .85rem, 13px);
  --t-body-fs: clamp(13px, 1rem, 15px);
  --t-card-title-fs: clamp(17px, 1.35rem, 21px);
  --t-card-fig-fs: clamp(26px, 2.1rem, 34px);
  --t-place-fs: clamp(1.9rem, 2.8vw, 2.4rem);                          /* the #place title: the level's or the story's name */
  --t-slider-fs: clamp(15px, .9rem, 18px);                             /* the slider's current row */
  --t-label: 600 var(--t-label-fs)/1.2 var(--sans);
  --t-meta: 500 var(--t-meta-fs)/1.25 var(--sans);
  --t-kicker: 600 var(--t-meta-fs)/1.2 var(--sans);                    /* with letter-spacing .08em and uppercase */

  /* cards */
  --card-w: clamp(280px, 23rem, 340px);
  --card-w-sm: clamp(260px, 21.5rem, 320px);
  --card-pad: clamp(14px, 1.23rem, 20px);
  --card-gap: 8px;
  --card-r: var(--mf-r-lg);                                            /* (24 October, premium UI, Phase 2, V-006) Mirai Ink cards 20 (was clamp(16px, 1.38rem, 22px): 17.94 at 1280) */
  --card-tile-r: var(--mf-r-xs);                                       /* (V-006) nested tiles 6 (was 12px) */
  --card-photo-h: clamp(108px, 9.2rem, 150px);
  --card-shadow: 0 12px 32px -14px rgba(0, 0, 0, .5);
  --card-shadow-day: 0 0 0 1px rgba(22, 22, 27, .08), 0 12px 30px -16px rgba(20, 24, 44, .35);

  /* the two floating sliders (the level slider #alt and the floor dial) */
  --sl-move: var(--mf-t-base);                                         /* the strip's glide, and its rows' scale and fade (24 October, premium UI, P-001: 220ms) */
  --sl-plate: rgba(14, 14, 18, .38);                                   /* the one light plate: a tint, never a backdrop-filter ((24 October, premium UI, Phase 2, V-002) neutral, was rgba(14,12,20,.38)) */
  --sl-plate-day: rgba(255, 255, 255, .62);

  /* active states: Dusk and Night (white on dark glass) / Day and paper (ink) */
  --act-bg: rgba(255, 255, 255, .14);
  --act-line: inset 0 0 0 1px rgba(255, 255, 255, .22);
  --act-fg: #fff;
  --act-bg-day: rgba(22, 22, 27, .07);
  --act-line-day: inset 0 0 0 1px rgba(22, 22, 27, .14);
  --act-fg-day: #16161b;

  /* map pins: one disc family */
  --pin: clamp(21px, 1.62rem, 24px);
  --pin-lm: calc(var(--pin) + 3px);                                    /* landmarks and the guest's workplace */
  --pin-story: calc(var(--pin) + 5px);                                 /* the City's numbered story medallions */
  --pin-fill: rgba(16, 16, 20, .82);                                   /* (24 October, premium UI, Phase 2, V-002) neutral (was rgba(20,18,30,.8)) */
  --pin-line: rgba(255, 255, 255, .14);                                /* (V-002) was .16 */
  --pin-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  --pin-fill-day: rgba(255, 255, 255, .96);
  --pin-line-day: rgba(22, 22, 27, .12);
  --pin-shadow-day: 0 1px 3px rgba(20, 24, 44, .3);
  --pin-hover: 1.08;
  --pin-sel: 1.12;
  --pin-dim: .55;
  --hl-fs: clamp(12px, .92rem, 14px);                                  /* the hover name pill */
  --hl-max: 180px;
  --halo: 0 0 2px #0e0b14, 0 1px 3px rgba(14, 11, 20, .9);              /* text on the map: tight shadows only (wide ones re-blur on the Pad Go GPU) */

  /* restrained marker hues: the --c-* and status hues about 18% less saturated; the -d tones read on a white Day disc (3.4:1 or more) */
  --mk-work: #7AA5DD; --mk-edu: #B7A4E8; --mk-health: #E5938F; --mk-lake: #69BFAD; --mk-dine: #DEA567; --mk-civic: #ABACBA;
  --mk-work-d: #4F8BDA; --mk-edu-d: #8F70DE; --mk-health-d: #D85A55; --mk-lake-d: #3A9783; --mk-dine-d: #C77722; --mk-civic-d: #7F829A;
  --mk-done: #86CEA2; --mk-build: #E2AE4D; --mk-plan: #A978F2;
  --mk-done-d: #2E9D5E; --mk-build-d: #B88016; --mk-plan-d: #7D3FE0;

  /* the bottom-left slot the Stories pill takes on Around Mirai: the strip and the map filters start after it */
  --sd-slot: calc(8rem + 8px);
}
:root.tv {
  --ctl-h: clamp(40px, 1.8rem, 56px); --ctl-h-lg: clamp(48px, 2.2rem, 64px);
  --chip-px: clamp(14px, .62rem, 18px); --chip-gap: 8px; --ico: clamp(18px, .8rem, 22px); --ico-sm: clamp(15px, .66rem, 18px);
  --t-label-fs: clamp(15px, .68rem, 20px); --t-meta-fs: clamp(13px, .55rem, 16px); --t-body-fs: clamp(16px, .7rem, 20px);
  --t-card-title-fs: clamp(21px, .95rem, 28px); --t-card-fig-fs: clamp(34px, 1.45rem, 44px); --t-slider-fs: clamp(18px, .78rem, 22px);
  --card-w: clamp(360px, 16rem, 460px); --card-w-sm: clamp(330px, 14.5rem, 420px); --card-pad: clamp(18px, .85rem, 26px); --card-r: var(--mf-r-lg); --card-photo-h: clamp(150px, 6.6rem, 200px);
  --pin: clamp(24px, 1.15rem, 32px); --hl-fs: clamp(15px, .62rem, 18px); --hl-max: 260px;
  --sd-slot: calc(7rem + 10px);
}
@media (orientation: portrait) and (max-width: 600px) {
  :root { --card-w: calc(100vw - 2 * var(--pad)); --card-w-sm: calc(100vw - 2 * var(--pad)); --hl-max: 150px; }
}

/* =====================================================================================================================================================
   A11 · L0 foundations (31 October 2026, design-research/BACKLOG-4 L0, Audit11). ADDITIVE tokens read by css/ux/apple.css and css/ux/journey.css.
   TYPE   eight named styles (Apple's text styles, SF-first stack, Manrope offline): large title, title, headline, body, callout, subheadline, footnote, caption.
          Supporting text is never under 12px; weights: light for large titles, regular for body, medium for labels, semibold for emphasis only. No all-caps micro labels.
   SHAPE  four radii: --rad-s 12 (tags, small chips) / --rad-m 20 (controls, fields) / --rad-l 28 (cards) / --rad-xl 34 (sheets), plus the capsule --rad-pill.
   MOTION one calm system (--mc-*: critically damped, bounce 0). The overshoot curves (--mf-ease-pop / -press / -btn / -glide and the settle spring) are now the same
          quint-out as --mf-ease-out (a tiny bounce is kept only on --mf-spring-lively: dots, badges, ticks). js/tempo.js keeps its 1.25x (every duration is authored for it).
   ===================================================================================================================================================== */
:root {
  --ty-large-title: 300 clamp(34px, 3.2vw, 44px)/1.12 var(--sans);
  --ty-title: 400 28px/1.18 var(--sans);
  --ty-headline: 600 17px/1.3 var(--sans);
  --ty-body: 400 17px/1.4 var(--sans);
  --ty-callout: 500 16px/1.35 var(--sans);
  --ty-subhead: 500 15px/1.35 var(--sans);
  --ty-footnote: 400 13px/1.35 var(--sans);
  --ty-caption: 500 12px/1.3 var(--sans);
  --rad-s: 12px; --rad-m: 20px; --rad-l: 28px; --rad-xl: 34px; --rad-pill: 999px;
  --tap-min: 44px;
}
