/* Hallmark · app screens · genre editorial · theme: Sudbury Guru learner (custom, after Sanskrit Mala final design 2026-11-13) · scope app · signature: the Continue card and the cited feedback sheet */
/* critique: a native-feeling learning app, one job a screen; pressable primary edge; motion only as navigation and feedback (push, sheet, toast) */
/* Hallmark · answered F3 · display heads balance with text-wrap */
/* Hallmark · waive 39b · the one primary action is 56px tall on purpose, one-handed on a phone · Sanskrit Mala final design spec, ux-plan/sanskrit-mala-distilled.md section 5 */
/* Hallmark · dismissed 23 · the accent fill is the 84px play control, not a surface */
/* Hallmark · dismissed 41 · primary-ink is text on the primary fill, never on the page background */
/* Hallmark · dismissed F7 · pills here are progress bars and the play control, both controls */
/* Hallmark · dismissed 3 · the left bar on a field in error is the GOV.UK error pattern, paired with the message and the summary */
/* Hallmark · answered F4 · one filled primary a screen; .btn-sec is an outline and .btn-dng appears only inside the confirm dialog */
/* The G1 Prep learner app. Structure from ux-plan/sanskrit-mala-distilled.md; tokens here are the only colours and faces. */
:root {
  /* brand: a deep road green, a cream, and sign yellow (progress only, never text) */
  --color-brand: #123B2B;
  --color-brand-2: #0B2A1E;
  --color-cream: #F6F2E4;
  --color-primary: #1D5C42;
  --color-primary-2: #174C36;
  --color-primary-edge: #0E3324;
  --color-primary-wash: #E4EFE8;
  --color-primary-ink: #FFFEFA;
  --color-gold: #FFC72C;
  --color-gold-edge: #C99400;
  --color-gold-wash: #FFF3CC;
  /* surfaces and text */
  --color-bg: #F4F3EE;
  --color-surface: #FFFEFB;
  --color-soft: #ECEBE4;
  --color-sunken: #E2E1D9;
  --color-ink: #17201B;
  --color-muted: #59625C;
  --color-line: #DEDDD5;
  --color-line-2: #B8BBB2;
  --color-scrim: rgba(12, 18, 15, 0.45);
  --color-on-fill: #FFFEFA;
  --color-map-land: #E8E6DC;
  --color-map-park: #CFE0C8;
  --color-map-water: #C7DCE6;
  --shadow-deep: rgba(8, 14, 11, 0.35);
  --shadow-sheet: rgba(8, 14, 11, 0.4);
  --shadow-knob: rgba(8, 14, 11, 0.3);
  --color-chip-dark: rgba(8, 12, 10, 0.72);
  /* meaning */
  --color-correct: #1E7A46;
  --color-correct-wash: #E3F1E7;
  --color-miss: #5A4F45;
  --color-miss-wash: #F0ECE6;
  --color-danger: #B3261E;
  --color-focus: #1F5FBF;
  /* the shared player reads these roles */
  --color-film: #0B0F0D;
  --color-accent: var(--color-primary);
  --color-accent-2: var(--color-primary-2);
  --color-accent-ink: var(--color-primary-ink);
  --color-paper-2: #FFFEFB;
  --color-paper-3: var(--color-soft);
  --color-rule-2: var(--color-line-2);
  --color-wash-warning: var(--color-gold-wash);
  --color-danger-ink: var(--color-danger);
  --color-incorrect: var(--color-danger);
  --color-sheet: #FFFEFB;
  --sign-warning: var(--color-gold);
  /* type: one family, six sizes */
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-body);
  --text-xs: 13px;
  --text-sm: 15px;
  --text-md: 17px;
  --text-lg: 20px;
  --text-xl: 26px;
  --text-2xl: 32px;
  /* space: the 4 px scale */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  /* shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  /* motion: navigation and feedback only */
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-push: 320ms;
  --dur-long: 420ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
  /* chrome */
  --nav-h: 52px;
  --tab-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --col: 560px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-line-2) transparent; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--color-bg); color: var(--color-ink); font: 400 var(--text-md)/1.45 var(--font-body); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
button { font: inherit; color: inherit; }
a { color: var(--color-primary); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
::selection { background: var(--color-gold-wash); color: var(--color-ink); }
.defs { position: absolute; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: 6px; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: var(--space-xs); background: var(--color-brand); color: var(--color-cream); transition: opacity var(--dur-short) var(--ease-std); }
.splash__mark { width: 112px; height: 112px; margin-bottom: var(--space-sm); filter: drop-shadow(0 12px 28px var(--shadow-deep)); }
.splash__name { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.01em; }
.splash__by { font-size: var(--text-sm); opacity: 0.8; }
.splash.is-out { opacity: 0; pointer-events: none; }

/* ---------- the app shell: a stack of screens over a tab bar ---------- */
.app { position: fixed; inset: 0; max-width: var(--col); margin: 0 auto; background: var(--color-bg); overflow: hidden; }
@media (min-width: 600px) { body { background: var(--color-sunken); } .app { box-shadow: 0 0 0 1px var(--color-line), 0 30px 80px -40px var(--shadow-deep); } }
.stack { position: absolute; inset: 0; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--color-bg); will-change: transform; }
.scr__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-xs) var(--space-md) calc(var(--tab-h) + var(--safe-b) + var(--space-lg)); -webkit-overflow-scrolling: touch; }
.scr--full .scr__body:has(.ep__stage) { padding-top: 0; }
.scr--full .scr__body { padding-bottom: calc(var(--space-2xl) + var(--safe-b)); }
.scr--bar .scr__body { padding-bottom: calc(112px + var(--safe-b)); }
.scr--dark { background: var(--color-brand); color: var(--color-cream); }

/* the navigation bar: back on the left, a small title that appears once the large title scrolls away */
.nb { flex: none; display: grid; grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr); align-items: center; min-height: calc(var(--nav-h) + var(--safe-t)); padding: var(--safe-t) var(--space-xs) 0; background: color-mix(in srgb, var(--color-bg) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; position: relative; z-index: 2; transition: border-color var(--dur-micro) linear; }
.nb.is-stuck { border-bottom-color: var(--color-line); }
.nb__t { font-size: var(--text-md); font-weight: 600; text-align: center; opacity: 0; transition: opacity var(--dur-micro) linear; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.nb.is-stuck .nb__t, .nb--plain .nb__t { opacity: 1; }
.nb__l { justify-self: start; display: flex; align-items: center; }
.nb__r { justify-self: end; display: flex; align-items: center; }
.nbb { display: inline-flex; align-items: center; gap: var(--space-3xs); min-height: 44px; min-width: 44px; padding: 0 var(--space-xs); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--color-primary); font-weight: 600; font-size: var(--text-md); text-decoration: none; cursor: pointer; }
.nbb svg { width: 24px; height: 24px; flex: none; }
.nbb:active { background: var(--color-soft); }
.nbb--icon { justify-content: center; padding: 0; color: var(--color-ink); }
.brand { display: inline-flex; align-items: center; gap: var(--space-xs); padding-left: var(--space-xs); font-weight: 700; font-size: var(--text-md); color: var(--color-ink); white-space: nowrap; }
.brand svg { width: 32px; height: 32px; border-radius: 8px; }
.lt { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; margin: var(--space-xs) 0 var(--space-md); }
.sub { color: var(--color-muted); margin: calc(-1 * var(--space-xs)) 0 var(--space-md); }

/* ---------- the tab bar ---------- */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); padding: var(--space-2xs) var(--space-xs) var(--safe-b); background: color-mix(in srgb, var(--color-surface) 94%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--color-line); transition: transform var(--dur-push) var(--ease-out); }
.tabbar.is-hidden { transform: translateY(110%); }
.tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: var(--space-3xs); min-height: 56px; color: var(--color-muted); font-size: var(--text-xs); font-weight: 600; text-decoration: none; border-radius: var(--r-md); }
.tabbar a svg { width: 26px; height: 26px; }
.tabbar a[aria-current="page"] { color: var(--color-primary); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -4px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--color-primary); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 var(--space-2xs); border-radius: var(--r-pill); background: var(--color-primary); color: var(--color-primary-ink); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--color-surface); }

/* ---------- buttons: pressable, with a solid bottom edge that collapses on press ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 52px; padding: var(--space-xs) var(--space-lg); border: 0; border-radius: var(--r-md); font-weight: 700; font-size: var(--text-md); text-decoration: none; cursor: pointer; transition: transform var(--dur-micro) var(--ease-std), box-shadow var(--dur-micro) var(--ease-std); }
.btn svg { width: 22px; height: 22px; }
.btn-pri { background: var(--color-primary); color: var(--color-primary-ink); box-shadow: 0 4px 0 var(--color-primary-edge); min-height: 56px; width: 100%; font-size: var(--text-lg); }
.btn-pri:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--color-primary-edge); }
.btn-sec { background: var(--color-surface); color: var(--color-ink); box-shadow: inset 0 0 0 2px var(--color-line-2), 0 3px 0 var(--color-line-2); }
.btn-sec:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--color-line-2), 0 1px 0 var(--color-line-2); }
.btn-dng { background: var(--color-danger); color: var(--color-on-fill); }
.btn-wide { width: 100%; }
.link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--space-2xs) var(--space-xs); border: 0; background: transparent; color: var(--color-primary); font-weight: 700; font-size: var(--text-md); cursor: pointer; text-decoration: none; }
.stackv { display: grid; gap: var(--space-xs); justify-items: center; }
.stackv > .btn { width: 100%; }

/* ---------- cards, tiles, rows ---------- */
.card { display: grid; gap: var(--space-sm); padding: var(--space-md); border-radius: var(--r-lg); background: var(--color-surface); border: 2px solid var(--color-line); }
.card--next { border-color: var(--color-primary); box-shadow: 0 4px 0 var(--color-primary-wash); }
.kick { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.h2 { font-size: var(--text-xl); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.h3 { font-size: var(--text-lg); font-weight: 700; line-height: 1.25; }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }
.sec { margin-top: var(--space-xl); }
.sec__h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.sec__h h2 { font-size: var(--text-lg); font-weight: 700; }

.cont { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--space-md); align-items: start; }
.poster { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-sm); overflow: hidden; background: var(--color-film); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster__t { position: absolute; right: var(--space-2xs); bottom: var(--space-2xs); padding: 0 var(--space-2xs); border-radius: 6px; background: var(--color-chip-dark); color: var(--color-on-fill); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--color-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--color-gold); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-2xs); }
.day { display: grid; place-items: center; height: 40px; border-radius: 12px; font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.day.is-on { background: var(--color-gold); color: var(--color-ink); box-shadow: inset 0 -3px 0 var(--color-gold-edge); }
.day.is-today { outline: 2px solid var(--color-primary); outline-offset: -2px; color: var(--color-ink); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); }
.tile { display: grid; align-content: start; gap: var(--space-2xs); padding: var(--space-sm); border-radius: var(--r-md); background: var(--color-surface); border: 1px solid var(--color-line); }
.tile b { font-size: var(--text-xl); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.3; }

.group { border-radius: var(--r-lg); background: var(--color-surface); border: 1px solid var(--color-line); overflow: hidden; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); min-height: 64px; padding: var(--space-xs) var(--space-md); color: var(--color-ink); text-decoration: none; border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer; }
.row + .row { border-top: 1px solid var(--color-line); }
.row:active { background: var(--color-soft); }
.row__i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--color-primary-wash); color: var(--color-primary); }
.row__i svg { width: 22px; height: 22px; }
.row__t { display: grid; gap: var(--space-3xs); min-width: 0; }
.row__t b { font-weight: 600; font-size: var(--text-md); line-height: 1.3; }
.row__t span { font-size: var(--text-sm); color: var(--color-muted); }
.row__r { display: flex; align-items: center; gap: var(--space-2xs); color: var(--color-muted); font-size: var(--text-sm); }
.row__r svg { width: 20px; height: 20px; }
.row--danger, .row--danger .row__i { color: var(--color-danger); }
.row--danger .row__i { background: var(--color-miss-wash); }

/* season progress ring */
.ring { position: relative; width: 44px; height: 44px; }
.ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .tr { stroke: var(--color-soft); }
.ring .pr { stroke: var(--color-gold); stroke-linecap: round; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--text-sm); font-weight: 700; }

/* the season path: numbered nodes */
.path { display: grid; gap: 0; position: relative; }
.node { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); min-height: 72px; padding: var(--space-xs) 0; color: var(--color-ink); text-decoration: none; }
.node::before { content: ""; position: absolute; left: 27px; top: 0; bottom: 0; width: 2px; background: var(--color-line); z-index: 0; }
.node:first-child::before { top: 50%; }
.node:last-child::before { bottom: 50%; }
.node__c { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--color-surface); border: 2px solid var(--color-line-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.node__c svg { width: 26px; height: 26px; }
.node.is-done .node__c { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-ink); }
.node.is-next .node__c { border: 3px solid var(--color-primary); box-shadow: 0 0 0 5px var(--color-primary-wash); color: var(--color-primary); }
.node__t { display: grid; gap: var(--space-3xs); }
.node__t b { font-weight: 600; line-height: 1.3; }
.node__t span { font-size: var(--text-sm); color: var(--color-muted); }
.node:active .node__c { transform: scale(0.96); }
.tag { display: inline-block; padding: var(--space-3xs) var(--space-xs); border-radius: var(--r-pill); background: var(--color-primary-wash); color: var(--color-primary); font-size: var(--text-xs); font-weight: 700; line-height: 18px; }
.tag--gold { background: var(--color-gold-wash); color: var(--color-ink); }

/* ---------- welcome ---------- */
.welcome { display: grid; align-content: center; gap: var(--space-lg); min-height: 100%; padding: calc(var(--safe-t) + var(--space-xl)) var(--space-lg) calc(var(--safe-b) + var(--space-lg)); }
.welcome__mark { width: 84px; height: 84px; }
.welcome h1 { font-size: var(--text-2xl); line-height: 1.15; letter-spacing: -0.015em; }
.points { display: grid; gap: var(--space-md); padding: 0; margin: 0; list-style: none; }
.points li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-sm); align-items: start; }
.points .row__i { width: 44px; height: 44px; }
.points b { display: block; font-weight: 600; }
.points span { color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- the episode screen ---------- */
.ep__stage { margin: 0 calc(-1 * var(--space-md)); background: var(--color-film); }
/* full-bleed: edge to edge, as tall as the screen allows; the whole frame always shows (contain), never cropped */
.ep__stage .sgp { width: 100%; height: min(calc(100vw * 16 / 9), calc(100svh - var(--nav-h) - var(--safe-t) - 120px)); max-height: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.ep__stage .sgp video { object-fit: contain; }
.ep__meta { display: grid; gap: var(--space-xs); margin-top: var(--space-lg); }
.ep__meta h1 { font-size: var(--text-xl); line-height: 1.2; }
details.more { margin-top: var(--space-lg); border-radius: var(--r-lg); background: var(--color-surface); border: 1px solid var(--color-line); }
details.more summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 var(--space-md); font-weight: 600; cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary svg { transform: rotate(90deg); }
details.more summary svg { width: 20px; height: 20px; color: var(--color-muted); transition: transform var(--dur-micro) var(--ease-std); }
.lines { list-style: none; margin: 0; padding: 0 var(--space-md) var(--space-md); display: grid; gap: var(--space-2xs); }
.lines li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-xs); padding: var(--space-xs); border-radius: var(--r-sm); cursor: pointer; font-size: var(--text-md); }
.lines li span { color: var(--color-muted); font-variant-numeric: tabular-nums; font-size: var(--text-sm); padding-top: var(--space-3xs); }
.lines li[aria-current] { background: var(--color-gold-wash); }

/* ---------- the question screen ---------- */
.qtop { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); padding: calc(var(--safe-t) + var(--space-2xs)) var(--space-md) var(--space-xs) var(--space-2xs); }
.qprog { height: 10px; border-radius: var(--r-pill); background: var(--color-soft); overflow: hidden; }
.qprog > i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--color-primary); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform var(--dur-short) var(--ease-out); }
.qcount { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.q { display: grid; gap: var(--space-md); padding-top: var(--space-xs); }
.q h1 { font-size: var(--text-xl); line-height: 1.25; letter-spacing: -0.01em; }
.qsign { display: grid; place-items: center; padding: var(--space-sm); border-radius: var(--r-lg); background: var(--color-surface); border: 1px solid var(--color-line); }
.qsign img { max-height: 160px; width: auto; }
.opts { display: grid; gap: var(--space-sm); }
.opt { display: grid; grid-template-columns: 32px minmax(0, 1fr) 24px; align-items: center; gap: var(--space-sm); min-height: 64px; padding: var(--space-sm) var(--space-md); border-radius: var(--r-md); border: 2px solid var(--color-line-2); background: var(--color-surface); box-shadow: 0 4px 0 var(--color-line); font-size: var(--text-md); font-weight: 600; text-align: left; cursor: pointer; }
.opt__k { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 2px solid var(--color-line-2); font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.opt__m svg { width: 24px; height: 24px; }
.opt[aria-checked="true"] { border-color: var(--color-primary); background: var(--color-primary-wash); box-shadow: 0 4px 0 var(--color-primary); }
.opt[aria-checked="true"] .opt__k { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-ink); }
.opt.is-right { border-color: var(--color-correct); background: var(--color-correct-wash); box-shadow: 0 4px 0 var(--color-correct); }
.opt.is-right .opt__k { border-color: var(--color-correct); background: var(--color-correct); color: var(--color-on-fill); }
.opt.is-right .opt__m { color: var(--color-correct); }
.opt.is-miss { border-color: var(--color-miss); background: var(--color-miss-wash); box-shadow: 0 4px 0 var(--color-miss); }
.opt.is-miss span:nth-child(2) { text-decoration: line-through; text-decoration-thickness: 2px; }
.opt[disabled] { cursor: default; }
.qnote { color: var(--color-muted); font-size: var(--text-md); text-align: center; }
.qerr { color: var(--color-danger); font-weight: 600; text-align: center; }

/* the fixed action bar and the feedback sheet over it */
.abar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; gap: var(--space-2xs); padding: var(--space-sm) var(--space-md) calc(var(--space-sm) + var(--safe-b)); background: var(--color-bg); border-top: 1px solid var(--color-line); }
.fb { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: grid; gap: var(--space-sm); max-height: 78%; overflow-y: auto; padding: var(--space-lg) var(--space-md) calc(var(--space-sm) + var(--safe-b)); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--color-surface); box-shadow: 0 -16px 48px -24px var(--shadow-sheet); }
.fb--right { background: var(--color-correct-wash); }
.fb--miss { background: var(--color-surface); border-top: 4px solid var(--color-miss); }
.fb__v { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-xl); font-weight: 700; }
.fb__v i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--color-correct); color: var(--color-on-fill); }
.fb--miss .fb__v i { background: var(--color-miss); }
.fb__v svg { width: 22px; height: 22px; }
.fb__a { font-weight: 700; font-size: var(--text-lg); }
.yours { color: var(--color-muted); font-size: var(--text-md); }
.yours s { text-decoration-thickness: 2px; }
.cite { margin: 0; padding: var(--space-sm) var(--space-md); border-radius: var(--r-md); background: var(--color-gold-wash); border: 1px solid var(--color-gold-edge); }
.cite p { font-size: var(--text-md); line-height: 1.5; }
.cite figcaption { display: flex; align-items: center; gap: var(--space-2xs); margin-top: var(--space-2xs); font-size: var(--text-sm); font-weight: 700; color: var(--color-ink); }
.cite figcaption svg { width: 18px; height: 18px; }

/* ---------- results ---------- */
.score { display: grid; justify-items: center; gap: var(--space-2xs); text-align: center; padding: var(--space-md) 0 var(--space-lg); }
.score b { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.score b span { font-size: var(--text-xl); color: var(--color-muted); font-weight: 600; }
.score h1 { font-size: var(--text-xl); }
.parts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.part { display: grid; gap: var(--space-2xs); padding: var(--space-md); border-radius: var(--r-md); background: var(--color-surface); border: 2px solid var(--color-line); }
.part b { font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.part.is-pass { border-color: var(--color-correct); background: var(--color-correct-wash); }
.part em { font-style: normal; font-weight: 700; font-size: var(--text-sm); }
.rlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.rlist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-md) 0; border-top: 1px solid var(--color-line); }
.rlist .mk { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--color-correct); color: var(--color-on-fill); }
.rlist .mk--miss { background: var(--color-miss); }
.rlist .mk svg { width: 18px; height: 18px; }
.rlist b { display: block; font-weight: 600; line-height: 1.35; }
.rlist p { font-size: var(--text-md); color: var(--color-muted); margin-top: var(--space-2xs); }
.rlist .ans { color: var(--color-ink); font-weight: 600; }

/* ---------- empty state, banner, toast, dialog, switch ---------- */
.empty { display: grid; justify-items: center; gap: var(--space-sm); padding: var(--space-xl) var(--space-md); text-align: center; }
.empty__i { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--color-primary-wash); color: var(--color-primary); }
.empty__i svg { width: 34px; height: 34px; }
.banner { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-radius: var(--r-md); background: var(--color-gold-wash); font-size: var(--text-md); }
.banner svg { width: 24px; height: 24px; }
.toast { position: absolute; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + var(--space-md)); z-index: 20; transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: var(--space-sm) var(--space-md); border-radius: var(--r-md); background: var(--color-ink); color: var(--color-on-fill); font-size: var(--text-sm); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity var(--dur-short) var(--ease-std), transform var(--dur-short) var(--ease-out); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.dlg { width: min(420px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--color-surface); color: var(--color-ink); }
.dlg::backdrop { background: var(--color-scrim); }
.dlg form { display: grid; gap: var(--space-sm); padding: var(--space-lg) var(--space-md) var(--space-md); }
.dlg h2 { font-size: var(--text-lg); }
.dlg__acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); margin-top: var(--space-xs); }
.sw { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); min-height: 64px; padding: var(--space-xs) var(--space-md); cursor: pointer; }
.sw + .sw { border-top: 1px solid var(--color-line); }
.sw input { appearance: none; -webkit-appearance: none; position: relative; width: 52px; height: 32px; margin: 0; border-radius: var(--r-pill); background: var(--color-line-2); cursor: pointer; transition: background-color var(--dur-micro) linear; }
.sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--color-on-fill); box-shadow: 0 1px 3px var(--shadow-knob); transition: transform var(--dur-short) var(--ease-out); }
.sw input:checked { background: var(--color-primary); }
.sw input:checked::after { transform: translateX(20px); }
.sw input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.prose { display: grid; gap: var(--space-sm); }
.prose p { line-height: 1.55; }
.nos { padding: var(--space-lg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
p.small { font-size: 16px; }

/* ---------- Book: a map panel with a bottom sheet per step, ride-app style ---------- */
.scr--book .scr__body { padding: 0 0 calc(132px + var(--safe-b)); background: var(--color-bg); }
.map { position: relative; height: 38svh; min-height: 220px; overflow: hidden; background: var(--color-map-land); }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__land { fill: var(--color-map-land); }
.map__road { fill: none; stroke: var(--color-surface); stroke-width: 10; stroke-linecap: round; }
.map__road--major { stroke-width: 16; }
.map__road--minor { stroke-width: 6; opacity: 0.8; }
.map__park { fill: var(--color-map-park); }
.map__water { fill: var(--color-map-water); }
.map__pin { position: absolute; left: 50%; top: 46%; display: grid; place-items: center; width: 52px; height: 52px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--color-ink); color: var(--color-on-fill); box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-ink) 18%, transparent), 0 10px 24px -8px var(--shadow-deep); }
.map__pin svg { width: 26px; height: 26px; }
.map__lab { position: absolute; left: 50%; top: calc(46% + 36px); transform: translateX(-50%); max-width: 80%; padding: var(--space-2xs) var(--space-sm); border-radius: var(--r-sm); background: var(--color-surface); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 16px -8px var(--shadow-deep); }
.bk__top { position: absolute; top: calc(var(--safe-t) + var(--space-sm)); left: var(--space-md); right: var(--space-md); z-index: 3; display: flex; align-items: center; justify-content: space-between; }
.fab { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--color-surface); color: var(--color-ink); box-shadow: 0 6px 18px -6px var(--shadow-deep); }
.fab svg { width: 24px; height: 24px; }
.bk__step { padding: var(--space-2xs) var(--space-sm); border-radius: var(--r-sm); background: var(--color-surface); font-size: var(--text-sm); font-weight: 600; box-shadow: 0 6px 18px -8px var(--shadow-deep); }
.bsheet { position: relative; z-index: 2; display: grid; gap: var(--space-md); margin-top: calc(-1 * var(--space-lg)); padding: var(--space-md) var(--space-md) var(--space-lg); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--color-bg); box-shadow: 0 -12px 32px -20px var(--shadow-deep); }
.bsheet--full { margin-top: 0; padding-top: calc(var(--safe-t) + 88px); border-radius: 0; box-shadow: none; justify-items: start; }
.grab { justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--color-line-2); }
.bsheet--full .grab { display: none; }
.fld { display: grid; gap: var(--space-2xs); }
.fld label, .yn legend { font-weight: 700; font-size: var(--text-md); }
.fld input { min-height: 56px; padding: 0 var(--space-md); border: 2px solid var(--color-muted); border-radius: var(--r-md); background: var(--color-surface); font: inherit; font-size: var(--text-lg); color: var(--color-ink); }
.fld input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.is-err { padding-left: var(--space-sm); border-left: 4px solid var(--color-danger); }
.is-err input { border-color: var(--color-danger); }
.fld__err { color: var(--color-danger); font-weight: 700; }
.es { display: grid; gap: var(--space-2xs); padding: var(--space-md); border: 3px solid var(--color-danger); border-radius: var(--r-md); background: var(--color-surface); }
.es h2 { font-size: var(--text-lg); }
.es a { color: var(--color-danger); font-weight: 700; }
.rides { display: grid; gap: var(--space-xs); }
.ride { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); min-height: 76px; padding: var(--space-sm) var(--space-md); border: 2px solid var(--color-line); border-radius: var(--r-md); background: var(--color-surface); text-align: left; cursor: pointer; }
.ride[aria-checked="true"] { border-color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-ink); }
.ride__i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--color-soft); }
.ride__i svg { width: 28px; height: 28px; }
.ride__t, .ride__r { display: grid; gap: var(--space-3xs); }
.ride__t b, .ride__r b { font-weight: 700; }
.ride__t span, .ride__r span { font-size: var(--text-sm); color: var(--color-muted); }
.ride__r { text-align: right; }
.yn { margin: 0; padding: 0; border: 0; display: grid; gap: var(--space-xs); }
.yn__o { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.yn__o label { display: flex; align-items: center; gap: var(--space-xs); min-height: 52px; padding: 0 var(--space-md); border: 2px solid var(--color-line-2); border-radius: var(--r-md); background: var(--color-surface); font-weight: 600; cursor: pointer; }
.yn__o label:has(input:checked) { border-color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-ink); }
.yn__o input { width: 20px; height: 20px; margin: 0; accent-color: var(--color-primary); }
.days { display: flex; gap: var(--space-xs); overflow-x: auto; padding-bottom: var(--space-2xs); margin: 0 calc(-1 * var(--space-md)); padding-inline: var(--space-md); scroll-snap-type: x mandatory; }
.dchip { flex: none; display: grid; justify-items: center; gap: var(--space-3xs); width: 60px; min-height: 68px; padding: var(--space-xs) 0; border: 2px solid var(--color-line); border-radius: var(--r-md); background: var(--color-surface); cursor: pointer; scroll-snap-align: start; }
.dchip span { font-size: var(--text-sm); color: var(--color-muted); }
.dchip b { font-size: var(--text-lg); }
.dchip[aria-checked="true"] { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-on-fill); }
.dchip[aria-checked="true"] span { color: var(--color-on-fill); }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); }
.slot { min-height: 48px; border: 2px solid var(--color-line); border-radius: var(--r-sm); background: var(--color-surface); font-weight: 600; cursor: pointer; }
.slot[aria-checked="true"] { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-on-fill); }
.any { padding: 0; }
.bk__sum { text-align: center; }
.route { list-style: none; margin: 0; padding: var(--space-md); display: grid; gap: var(--space-md); border-radius: var(--r-md); background: var(--color-surface); border: 1px solid var(--color-line); position: relative; }
.route li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; }
.route li div { display: grid; gap: var(--space-3xs); }
.route__d { width: 14px; height: 14px; border-radius: 50%; background: var(--color-ink); }
.route__d--b { border-radius: 3px; background: var(--color-primary); }
.route li:first-child::after { content: ""; position: absolute; left: calc(var(--space-md) + 6px); top: 34px; height: calc(50% - 26px); width: 2px; background: var(--color-line-2); }
.chg { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-2xs); font-weight: 700; font-size: var(--text-sm); }
.tl { list-style: none; margin: var(--space-xs) 0; padding: 0; display: grid; gap: 0; width: 100%; }
.tl li { position: relative; display: grid; gap: var(--space-3xs); padding: 0 0 var(--space-lg) 36px; }
.tl li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--color-line-2); background: var(--color-bg); }
.tl li::after { content: ""; position: absolute; left: 9px; top: 26px; bottom: 2px; width: 2px; background: var(--color-line); }
.tl li:last-child::after { display: none; }
.tl li.is-done::before { border-color: var(--color-primary); background: var(--color-primary); }
.tl li.is-now::before { border-color: var(--color-primary); box-shadow: 0 0 0 4px var(--color-primary-wash); }
.tl span { color: var(--color-muted); font-size: var(--text-md); }
.copybox { white-space: pre-wrap; padding: var(--space-md); border-radius: var(--r-md); background: var(--color-surface); border: 1px solid var(--color-line); font: inherit; font-size: var(--text-md); width: 100%; }
[tabindex="-1"]:focus { outline: none; }
.app:has(.tabbar.is-hidden) .toast { bottom: calc(132px + var(--safe-b)); }
/* paid booking: price table, booked hero, the date tile, lesson rows */
.price { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.price th { text-align: left; font-weight: 500; padding: var(--space-xs) 0; color: var(--color-muted); }
.price td { text-align: right; padding: var(--space-xs) 0; font-variant-numeric: tabular-nums; }
.price__t th, .price__t td { border-top: 2px solid var(--color-ink); padding-top: var(--space-sm); font-weight: 700; color: var(--color-ink); font-size: var(--text-lg); }
.hint { color: var(--color-muted); font-size: var(--text-md); }
.slots__none { grid-column: 1 / -1; }
.slots .sk { height: 48px; border-radius: var(--r-sm); background: var(--color-soft); }
.booked { display: grid; justify-items: center; gap: var(--space-xs); text-align: center; padding: var(--space-md) 0 var(--space-lg); }
.booked__i { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--color-correct); color: var(--color-on-fill); box-shadow: 0 0 0 8px var(--color-correct-wash); }
.booked__i svg { width: 38px; height: 38px; }
.when { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-md); align-items: center; padding: var(--space-md); border-radius: var(--r-lg); background: var(--color-surface); border: 2px solid var(--color-primary); }
.when__d { display: grid; place-items: center; align-content: center; width: 64px; height: 68px; border-radius: var(--r-md); background: var(--color-primary); color: var(--color-on-fill); font-size: var(--text-sm); font-weight: 700; line-height: 1.1; }
.when__d b { font-size: var(--text-xl); }
.when__t { display: grid; gap: var(--space-3xs); }
.when__t b { font-size: var(--text-lg); }
.when__t span { color: var(--color-muted); }
.mini { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--color-primary-wash); color: var(--color-primary); }
.mini svg { width: 22px; height: 22px; }
.lsns { display: grid; gap: var(--space-xs); }
.lsn, .nextl { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-sm); border-radius: var(--r-lg); background: var(--color-surface); border: 1px solid var(--color-line); color: var(--color-ink); text-decoration: none; }
.lsn .row__t span + span { font-size: var(--text-sm); }
.nextl { margin-bottom: var(--space-md); border: 2px solid var(--color-primary); }
.spin-wait svg { animation: none; }
/* Learn: the learning card and the road card, equal in size and weight */
.heroes { display: grid; gap: var(--space-md); }
.hero .cont { grid-template-columns: 104px minmax(0, 1fr); }
.hero .cont__t { display: grid; gap: var(--space-xs); align-content: start; min-width: 0; }
.hero .kick { display: flex; align-items: center; gap: var(--space-2xs); }
.hero .kick svg { width: 18px; height: 18px; }
.card--road:not(.card--next) { border-color: var(--color-line-2); }
.dtile { display: grid; place-items: center; align-content: center; gap: var(--space-3xs); aspect-ratio: 9 / 16; border-radius: var(--r-sm); background: var(--color-primary); color: var(--color-on-fill); text-decoration: none; text-align: center; }
.dtile span { font-size: var(--text-sm); font-weight: 600; }
.dtile b { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.dtile em { margin-top: var(--space-xs); padding: var(--space-3xs) var(--space-xs); border-radius: var(--r-sm); background: color-mix(in srgb, var(--color-on-fill) 18%, transparent); font-style: normal; font-size: var(--text-sm); font-weight: 700; }
.dtile svg { width: 32px; height: 32px; }
.dtile--wait { background: var(--color-gold-wash); color: var(--color-ink); border: 1px solid var(--color-gold-edge); }
.dtile--map { position: relative; overflow: hidden; background: var(--color-map-land); }
.dtile--map .map { position: absolute; inset: 0; height: auto; min-height: 0; }
.dtile--map .map__pin { width: 40px; height: 40px; }
.dtile--map .map__pin svg { width: 20px; height: 20px; }
.who { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-xs); align-items: center; margin-top: var(--space-2xs); padding-top: var(--space-xs); border-top: 1px solid var(--color-line); }
.who .row__t b { font-size: var(--text-md); }
.steps { list-style: none; margin: var(--space-2xs) 0 0; padding: 0; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); }
.steps li { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-muted); }
.steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--color-line-2); flex: none; }
.steps li.is-done { color: var(--color-ink); }
.steps li.is-done::before { background: var(--color-primary); border-color: var(--color-primary); }
.steps li.is-now { color: var(--color-ink); font-weight: 700; }
.steps li.is-now::before { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-wash); }
.acts2 { display: grid; grid-template-columns: 1fr auto; gap: var(--space-xs); align-items: center; }
.dtile--book { background: var(--color-primary-wash); color: var(--color-primary); padding: var(--space-xs); }
.dtile--book svg { width: 44px; height: 44px; }
/* the school profile and verification */
.vstat { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-sm); align-items: start; padding: var(--space-md); border-radius: var(--r-lg); background: var(--color-surface); border: 2px solid var(--color-line-2); }
.vstat b { font-size: var(--text-lg); }
.vstat p { color: var(--color-muted); margin-top: var(--space-3xs); }
.vstat__i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--color-soft); color: var(--color-ink); }
.vstat__i svg { width: 24px; height: 24px; }
.vstat--verified { border-color: var(--color-correct); background: var(--color-correct-wash); }
.vstat--verified .vstat__i { background: var(--color-correct); color: var(--color-on-fill); }
.vstat--submitted { border-color: var(--color-gold-edge); background: var(--color-gold-wash); }
.vstat--changes { border-color: var(--color-danger); }
.vstat--changes .vstat__i { color: var(--color-danger); }
.carph { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 2px dashed var(--color-line-2); border-radius: var(--r-md); background: var(--color-soft); overflow: hidden; text-align: center; color: var(--color-muted); cursor: pointer; }
.carph img { width: 100%; height: 100%; object-fit: cover; }
.carph:has(img) { border-style: solid; border-color: var(--color-line); }
.carph > span { display: grid; justify-items: center; gap: var(--space-2xs); padding: var(--space-md); }
.carph svg { width: 40px; height: 40px; }
.carph b { color: var(--color-ink); }
.fileb { position: relative; cursor: pointer; }
.fileb:focus-within { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.card .fld + .fld, .card .two { margin-top: 0; }
.row__i--empty { background: var(--color-soft); color: var(--color-muted); }
.fld textarea { min-height: 96px; padding: var(--space-sm) var(--space-md); border: 2px solid var(--color-muted); border-radius: var(--r-md); background: var(--color-surface); font: inherit; font-size: var(--text-md); color: var(--color-ink); resize: vertical; }
.plate { display: inline-block; padding: var(--space-3xs) var(--space-xs); border: 2px solid var(--color-ink); border-radius: 6px; background: var(--color-surface); font-weight: 700; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; color: var(--color-ink); white-space: nowrap; }
.carcard { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-sm); align-items: center; padding: var(--space-sm) var(--space-md); }
.carcard img { width: 112px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
.carcard__t { display: grid; gap: var(--space-2xs); justify-items: start; }
.carcard + .row { border-top: 1px solid var(--color-line); }
.carline { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; color: var(--color-ink); font-weight: 600; }
.two > *, .fld { min-width: 0; }
.fld input, .fld textarea { width: 100%; min-width: 0; }
/* membership: the paywall, the compare table, locked episodes */
.pw { display: grid; justify-items: center; gap: var(--space-xs); text-align: center; padding: var(--space-md) 0 var(--space-lg); }
.pw__badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--color-gold); color: var(--color-ink); box-shadow: inset 0 -4px 0 var(--color-gold-edge); }
.pw__badge svg { width: 32px; height: 32px; }
.pw__price { display: flex; align-items: baseline; justify-content: center; gap: var(--space-xs); }
.pw__price b { font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.pw__price span { color: var(--color-muted); font-weight: 600; }
.card .pw__price { justify-content: flex-start; }
.card .pw__price b { font-size: var(--text-2xl); }
.cmp { display: grid; border-radius: var(--r-lg); background: var(--color-surface); border: 1px solid var(--color-line); overflow: hidden; }
.cmp > div { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); }
.cmp > div + div { border-top: 1px solid var(--color-line); }
.cmp [role=columnheader] { font-weight: 700; font-size: var(--text-sm); color: var(--color-muted); }
.cmp [role=cell] b { color: var(--color-primary); }
.node.is-locked .node__c { background: var(--color-soft); border-color: var(--color-line); color: var(--color-muted); }
.node.is-locked .node__c svg { width: 22px; height: 22px; }
.lockhero { position: relative; justify-self: center; display: grid; place-items: center; width: min(60%, 220px); margin: var(--space-md) auto 0; }
.lockhero img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-md); filter: saturate(0.4) brightness(0.7); }
.lockhero__l { position: absolute; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--color-surface); color: var(--color-ink); box-shadow: 0 10px 24px -8px var(--shadow-deep); }
.lockhero__l svg { width: 30px; height: 30px; }
.booked .booked__i:has(use[href="#i-star"]) { background: var(--color-gold); color: var(--color-ink); box-shadow: 0 0 0 8px var(--color-gold-wash); }
.kick { display: flex; align-items: center; gap: var(--space-2xs); }
.kick svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 360px) { .btn-pri { font-size: var(--text-md); } }
.btn { text-wrap: balance; }
/* communication surfaces: inbox cards, the countdown, quick texts, two buttons */
.msgs { display: grid; gap: var(--space-xs); }
.msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-md); border-radius: var(--r-lg); background: var(--color-surface); border: 1px solid var(--color-line); }
.msg__i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--color-soft); color: var(--color-ink); }
.msg__i svg { width: 22px; height: 22px; }
.msg--good .msg__i { background: var(--color-correct-wash); color: var(--color-correct); }
.msg--info .msg__i { background: var(--color-primary-wash); color: var(--color-primary); }
.msg--warn { border-color: var(--color-gold-edge); }
.msg--warn .msg__i, .msg--gold .msg__i { background: var(--color-gold-wash); color: var(--color-ink); }
.msg__t { display: grid; gap: var(--space-2xs); min-width: 0; }
.msg__h { display: flex; gap: var(--space-xs); align-items: baseline; justify-content: space-between; }
.msg__h b { font-size: var(--text-md); line-height: 1.3; }
.msg__a { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.msg__a .chg { padding: 0; }
.msg__w { color: var(--color-muted); font-size: var(--text-sm); }
.cd { display: inline-block; justify-self: start; margin-top: var(--space-2xs); padding: var(--space-3xs) var(--space-xs); border-radius: var(--r-sm); background: var(--color-primary-wash); color: var(--color-primary); font-weight: 700; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.twob { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.twob .btn { padding-inline: var(--space-sm); }
.bell { position: relative; }
.bell .badge { top: 2px; left: auto; right: 0; }
.dlg__acts--list { display: block; }
.qt { display: grid; gap: var(--space-xs); }
.qt .row { border: 1px solid var(--color-line); border-radius: var(--r-md); }
.qt .row + .row { border-top: 1px solid var(--color-line); }
.nbb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
/* identity: the guest and signed-in cards, the code field */
.idc { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-md); border-radius: var(--r-lg); background: var(--color-surface); border: 2px solid var(--color-line); color: var(--color-ink); text-decoration: none; }
.idc .row__t span + .tag { justify-self: start; margin-top: var(--space-2xs); }
.idc__a { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--color-primary); color: var(--color-on-fill); font-weight: 700; font-size: var(--text-lg); }
.idc--guest { border-style: dashed; border-color: var(--color-line-2); margin-bottom: var(--space-xs); }
.idc--guest .idc__a { background: var(--color-soft); color: var(--color-muted); }
.idc--guest .idc__a svg { width: 26px; height: 26px; }
.idc--guest + .btn { margin-bottom: var(--space-xs); }
.codein { font-size: var(--text-2xl) !important; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.tcode { letter-spacing: 0.15em; }
.lbl { font-weight: 700; }

/* ---------- the monochrome theme (raised design bar, rung 2): the same markup, no hue at all.
   Hierarchy, states and meaning must still read through weight, size, edge, shape and words.
   Open any screen with ?theme=mono to check it. ---------- */
html[data-theme="mono"] {
  --color-brand: #1C1C1C; --color-brand-2: #111111; --color-cream: #F4F4F2;
  --color-primary: #1F1F1F; --color-primary-2: #111111; --color-primary-edge: #0A0A09; --color-primary-wash: #E9E9E7; --color-primary-ink: #FFFFFE;
  --color-gold: #A3A3A0; --color-gold-edge: #6E6E6B; --color-gold-wash: #EFEFED;
  --color-bg: #F3F3F1; --color-surface: #FFFFFE; --color-soft: #EAEAE8; --color-sunken: #DFDFDD;
  --color-ink: #1A1A1A; --color-muted: #5C5C5A; --color-line: #DCDCDA; --color-line-2: #B6B6B3;
  --color-on-fill: #FFFFFE; --color-map-land: #E7E7E5; --color-map-park: #D2D2D0; --color-map-water: #C9C9C7;
  --color-correct: #262626; --color-correct-wash: #E8E8E6; --color-miss: #6A6A68; --color-miss-wash: #EFEFED;
  --color-danger: #111111; --color-focus: #0A0A09;
}
html[data-theme="mono"] img, html[data-theme="mono"] video { filter: grayscale(1); }

/* ---------- depth, contrast and highlights (owner 2026-11-22: "improve contrasts and highlights, shadows… feels so professional") ----------
   Three elevations, from light rather than hue, so monochrome has depth too: 1 for cards and rows, 2 for the one lead
   card on a screen, 3 for sheets and dialogs. Control edges reach 3:1 (non-text); secondary text is darker. */
:root {
  --shadow-1: 0 1px 1px rgba(16, 24, 20, 0.05), 0 2px 6px -2px rgba(16, 24, 20, 0.10);
  --shadow-2: 0 1px 2px rgba(16, 24, 20, 0.06), 0 10px 24px -12px rgba(16, 24, 20, 0.28);
  --shadow-3: 0 -2px 6px rgba(16, 24, 20, 0.06), 0 -18px 40px -20px rgba(16, 24, 20, 0.40);
  --color-hl: #FFE28A;
  --shadow-dlg: 0 24px 60px -20px rgba(16, 24, 20, 0.45);
  --shadow-cta: 0 8px 16px -10px rgba(16, 24, 20, 0.45);
  --shadow-bar-up: 0 -6px 18px -12px rgba(16, 24, 20, 0.25);
  --shadow-bar-down: 0 6px 16px -14px rgba(16, 24, 20, 0.35);
  --color-muted: #4E5751;
  --color-line-2: #8C928B;
  --color-bg: #EFEEE8;
}
html[data-theme="mono"] {
  --shadow-1: 0 1px 1px rgba(0, 0, 0, 0.06), 0 2px 6px -2px rgba(0, 0, 0, 0.12);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.07), 0 10px 24px -12px rgba(0, 0, 0, 0.32);
  --shadow-3: 0 -2px 6px rgba(0, 0, 0, 0.07), 0 -18px 40px -20px rgba(0, 0, 0, 0.45);
  --color-hl: #D6D6D2;
  --color-ink: #111111;
  --color-muted: #4A4A48;
  --color-line: #D4D4D1;
  --color-line-2: #8A8A87;
  --color-bg: #ECECEA;
  --color-soft: #E4E4E1;
}
/* the highlighter: a solid mark (a gradient's clear edge fails contrast), one per hero screen */
mark.hl { background: var(--color-hl); color: inherit; padding: 0 0.14em; margin: 0 -0.04em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* elevation 1: cards, groups, tiles, rows that sit on the page */
.card, .group, .tile, .idc, .msg, .lsn, .ride, .vstat, .when, .route, .part, .cmp, details.more, .qsign { box-shadow: var(--shadow-1); border-color: var(--color-line); }
/* elevation 2: the one lead card on a screen */
.card--next, .hero.card--next, .nextl, .when { box-shadow: var(--shadow-2); }
.card--next { border-color: var(--color-primary); }
/* elevation 3: sheets and dialogs */
.fb, .bsheet, .sgp__quiz, .sgp__card { box-shadow: var(--shadow-3); }
.dlg { box-shadow: var(--shadow-dlg); }
/* controls keep their pressable edge, now with a 3:1 outline */
.opt { border-color: var(--color-line-2); box-shadow: 0 3px 0 var(--color-line-2); }
.opt[aria-checked="true"] { box-shadow: 0 3px 0 var(--color-primary); }
.btn-sec { box-shadow: inset 0 0 0 2px var(--color-line-2), 0 3px 0 var(--color-line-2); }
.btn-pri { box-shadow: 0 4px 0 var(--color-primary-edge), var(--shadow-cta); }
.btn-pri:active { box-shadow: 0 1px 0 var(--color-primary-edge); }
/* chrome: a hairline and a soft lift so the bars float over content */
.tabbar { box-shadow: var(--shadow-bar-up); }
.nb.is-stuck { box-shadow: var(--shadow-bar-down); }
.abar { box-shadow: var(--shadow-bar-up); }
/* contrast fixes found by tests/tokens.mjs: control edges and the gold progress edge reach 3:1 on the page too */
:root { --color-line-2: #7A8079; --color-gold-edge: #9E7500; }
html[data-theme="mono"] { --color-line-2: #7A7A77; --color-gold-edge: #6A6A67; }
/* the install banner: a slim bar above the screens; the stack moves down while it shows */
.ib { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 44px; align-items: center; gap: var(--space-sm); min-height: 60px; padding: calc(var(--safe-t) + var(--space-xs)) var(--space-xs) var(--space-xs) var(--space-md); background: var(--color-surface); border-bottom: 1px solid var(--color-line); box-shadow: var(--shadow-1); }
.ib__mark { width: 36px; height: 36px; border-radius: 9px; }
.ib__t { display: grid; gap: 0; min-width: 0; }
.ib__t b { font-size: var(--text-sm); font-weight: 700; line-height: 1.25; }
.ib__t span { font-size: var(--text-xs); color: var(--color-muted); line-height: 1.3; }
.ib__go { min-height: 44px; padding: 0 var(--space-md); border: 0; border-radius: var(--r-pill); background: var(--color-primary); color: var(--color-primary-ink); font-weight: 700; font-size: var(--text-sm); cursor: pointer; }
.ib__x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--color-muted); font-size: 26px; line-height: 1; cursor: pointer; }
.ib__go:focus-visible, .ib__x:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.app.has-ib .stack { top: calc(60px + var(--safe-t)); }
.app.has-ib .scr .nb { padding-top: 0; min-height: var(--nav-h); }
/* the iPhone guide */
.ios { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.ios li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-sm); align-items: start; }
.ios__n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); color: var(--color-on-fill); font-weight: 700; }
.ios__i { width: 18px; height: 18px; vertical-align: -3px; }
.app.has-ib .stack { top: var(--ib-h, 64px); }
.ib__t b, .ib__t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
