/* Tap to Install v3: two navigation rails around one stage, on the explorations family palette. */
@font-face { font-family: 'Instrument Sans'; src: url('assets/fonts/instrument-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('assets/fonts/instrument-serif.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('assets/fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('assets/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f5ef;
  --paper: #fbfaf6;
  --card: #fdfcf8;
  --tint: #eeeadf;
  --line: #dcdcd0;
  --line-2: #c6c9bb;
  --ink: #263f35;
  --ink-2: #1c2f27;
  --muted: #646c63;
  --accent: #be603e;
  --accent-2: #a9532f;
  --on-dark: #f8f6f0;
  --stage: #e7e4d8;
  --shadow: 0 1px 2px rgb(38 63 53 / 0.06), 0 18px 48px -18px rgb(38 63 53 / 0.35);
  --ad-accent: var(--accent);
  --on-accent: #ffffff;
  --backdrop-opacity: 0.5;
  --scrim: rgb(20 24 20 / 0.55);
  --radius: 12px;
  --btn-radius: 6px;
  --pad: clamp(16px, 2.4vw, 32px);
  --header-h: 72px;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --z-sticky: 10;
  --exploration-footer-bg: var(--paper);
  --exploration-footer-ink: var(--muted);
  --exploration-footer-border: var(--line);
}
/* Dark theme: follows the system unless the viewer picked a theme (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #131512;
    --paper: #1a1c18;
    --card: #1f221d;
    --tint: #262a24;
    --line: #30342d;
    --line-2: #40453c;
    --ink: #ecebe3;
    --ink-2: #ffffff;
    --muted: #a3a89d;
    --accent: #df7b55;
    --accent-2: #ec8c68;
    --on-dark: #151713;
    --stage: #1c1f1a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 60px -20px rgb(0 0 0 / 0.7);
    --on-accent: #151713;
    --backdrop-opacity: 0.34;
    --scrim: rgb(0 0 0 / 0.66);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #131512;
  --paper: #1a1c18;
  --card: #1f221d;
  --tint: #262a24;
  --line: #30342d;
  --line-2: #40453c;
  --ink: #ecebe3;
  --ink-2: #ffffff;
  --muted: #a3a89d;
  --accent: #df7b55;
  --accent-2: #ec8c68;
  --on-dark: #151713;
  --stage: #1c1f1a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 60px -20px rgb(0 0 0 / 0.7);
  --on-accent: #151713;
  --backdrop-opacity: 0.34;
  --scrim: rgb(0 0 0 / 0.66);
}
:root[data-theme='light'] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
html { -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 400; }
p { margin: 0; text-wrap: pretty; }
svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
em { font-style: italic; color: var(--accent); }
.eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 8px 12px; background: var(--ink); color: var(--on-dark); border-radius: 6px; }
.skip:focus { top: 8px; }
.noscript { padding: 16px; text-align: center; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--btn-radius); border: 1px solid transparent; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 120ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-accent { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-icon { width: 42px; padding: 0; }
.theme-btn .i-sun { display: none; }
.theme-btn[data-current='dark'] .i-sun { display: block; }
.theme-btn[data-current='dark'] .i-moon { display: none; }
.btn-accent:hover { background: var(--accent-2); }
.btn-ink { background: var(--ink); color: var(--on-dark); font-weight: 600; }
.btn-ink:hover { background: var(--ink-2); }
.btn-line { background: var(--paper); border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color 180ms var(--ease), background-color 180ms var(--ease), transform 120ms var(--ease); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(0.95); }
.text-link { font-size: 14px; text-underline-offset: 4px; }

/* shell */
.app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: 100dvh; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); padding: 10px var(--pad); background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; white-space: nowrap; }
.back:hover { color: var(--ink); }
.back svg { width: 14px; height: 14px; }
.title { display: flex; align-items: baseline; gap: 14px; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line); }
.title h1 { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.subtitle { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* shell: ads rail, stage, sections rail */
.shell {
  --left: 272px; --right: 232px; --left-min: 76px; --right-min: 64px;
  display: grid; grid-template-columns: var(--left) minmax(0, 1fr) var(--right); gap: 16px;
  height: calc(100dvh - var(--header-h)); min-height: 420px; padding: 16px var(--pad);
  transition: grid-template-columns 320ms var(--ease);
}
.shell[data-left='closed'] { --left: var(--left-min); }
.shell[data-right='closed'] { --right: var(--right-min); }
.shell > * { min-width: 0; min-height: 0; }

.rail { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.rail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.rail-sections .rail-top { flex-direction: row-reverse; }
.rail-label #ads-count { color: var(--ink); margin-left: 4px; }
.rail-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; transition: color 160ms var(--ease), border-color 160ms var(--ease); }
.rail-toggle:hover { color: var(--ink); border-color: var(--ink); }
.rail-toggle svg { transition: transform 320ms var(--ease); }
.shell[data-left='closed'] .rail-spots .rail-toggle svg, .shell[data-right='closed'] .rail-sections .rail-toggle svg { transform: rotate(180deg); }

.skill-row { flex: none; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.skill-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--ink); color: var(--on-dark); }
.skill-text { display: grid; line-height: 1.2; min-width: 0; }
.skill-text strong { font-size: 13px; font-weight: 600; }
.skill-text span { font-size: 12.5px; color: var(--muted); }
.icon-sm { width: 32px; height: 32px; }
.filters { display: flex; gap: 6px; flex: none; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.filters::-webkit-scrollbar { display: none; }
.filters :focus-visible { outline-offset: -2px; }
.chip { flex: none; min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 12px; white-space: nowrap; cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }

.spot-list, .section-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.spot-card { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.spot-card:hover { border-color: var(--line-2); }
.spot-card[aria-current='true'] { border-color: var(--ink); background: var(--paper); box-shadow: inset 3px 0 0 var(--ad-accent); }
.spot-card img { width: 48px; height: 85px; object-fit: cover; border-radius: 6px; background: var(--tint); }
.spot-card-text { display: grid; gap: 2px; min-width: 0; }
.spot-card-text strong { font-size: 15px; font-weight: 500; }
.spot-card-text span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.spot-card-text .dur { font-family: var(--mono); font-size: 11px; margin-top: 3px; }

.section-btn { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 52px; padding: 6px 10px 6px 6px; border-radius: 10px; border: 1px solid transparent; background: transparent; text-align: left; cursor: pointer; color: var(--ink); transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.section-btn svg { width: 32px; height: 32px; padding: 7px; border-radius: 8px; background: var(--tint); color: var(--ink); }
.section-btn:hover { background: var(--card); border-color: var(--line); }
.section-btn[aria-current='true'] { background: var(--card); border-color: var(--ink); }
.section-btn[aria-current='true'] svg { background: var(--ink); color: var(--on-dark); }
.section-text { display: grid; gap: 1px; min-width: 0; }
.section-text strong { font-size: 14px; font-weight: 500; }
.section-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* collapsed rails keep thumbnails and icons */
.shell[data-left='closed'] .rail-spots .rail-label, .shell[data-left='closed'] .skill-text, .shell[data-left='closed'] .spot-card-text, .shell[data-left='closed'] .filters { display: none; }
.shell[data-left='closed'] .rail-spots .rail-top { justify-content: center; }
.shell[data-left='closed'] .skill-row { grid-template-columns: 1fr; justify-items: center; padding: 6px; }
.shell[data-left='closed'] .skill-icon { display: none; }
.shell[data-left='closed'] .spot-card { grid-template-columns: 1fr; justify-items: center; padding: 5px; }
.shell[data-right='closed'] .rail-sections .rail-label, .shell[data-right='closed'] .section-text { display: none; }
.shell[data-right='closed'] .rail-sections .rail-top { justify-content: center; }
/* one column edge in every state: toggle, skill tile, cards and section buttons share the rail width */
.spot-list :focus-visible, .section-list :focus-visible { outline-offset: -2px; }
.shell[data-left='closed'] .rail-spots .rail-toggle, .shell[data-right='closed'] .rail-sections .rail-toggle { width: 100%; height: 36px; border-radius: 10px; }
.shell[data-right='closed'] .section-btn { grid-template-columns: 1fr; justify-items: center; padding: 6px; }

/* stage */
.stage-wrap { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: var(--radius); overflow: hidden; background: var(--stage); isolation: isolate; }
.stage-wrap:focus { outline: none; }
.stage-backdrop { position: absolute; inset: -60px; z-index: -2; background-size: cover; background-position: center; filter: blur(44px) saturate(1.15); opacity: var(--backdrop-opacity); transform: scale(1.05); }
.stage-wrap::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 80% at 50% 50%, transparent 35%, color-mix(in oklab, var(--stage) 75%, transparent)); pointer-events: none; }
.stage-head { grid-row: 1; display: flex; align-items: baseline; gap: 12px; padding: 14px 20px 0; }
.stage-head h2 { font-family: var(--serif); font-size: 26px; line-height: 1; order: -1; }
/* shown only while the browser holds the sound back; any click, tap or key turns it on */
.sound-chip { align-self: center; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--on-dark); font-size: 12.5px; font-weight: 600; cursor: pointer; animation: chip-in 240ms var(--ease) both; }
.sound-chip svg { width: 14px; height: 14px; }
.is-sound-blocked #sound { box-shadow: 0 0 0 2px var(--ad-accent); }
@keyframes chip-in { from { opacity: 0; transform: translateY(-4px); } }
.stage-body { grid-row: 2; position: relative; min-height: 0; padding: 12px 20px 20px; container-type: size; }
.view { height: 100%; min-height: 0; }

/* ad */
.spot-layout {
  /* the ad is sized from the space left after the bar: stage height minus bar minus gap (padding is outside the container) */
  --bar-h: 48px; --ad-gap: 12px; --strip-w: 196px; --col-gap: 16px;
  --ad-w: min(calc(100cqw - var(--strip-w) - var(--col-gap)), calc((100cqh - var(--bar-h) - var(--ad-gap)) * 9 / 16));
  height: 100%; display: grid; grid-template-columns: var(--ad-w) var(--strip-w); grid-template-rows: minmax(0, calc(var(--ad-w) * 16 / 9)) var(--bar-h);
  column-gap: var(--col-gap); row-gap: var(--ad-gap); justify-content: center; align-content: center;
}
.spot-col { display: contents; }
.spot-frame { grid-column: 1; grid-row: 1; width: 100%; max-height: 100%; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #0b0c0b; box-shadow: var(--shadow); }
.spot-frame video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
video:fullscreen { object-fit: contain; }
.player { grid-column: 1 / -1; grid-row: 2; justify-self: center; box-sizing: border-box; height: var(--bar-h); display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; background: color-mix(in oklab, var(--paper) 92%, transparent); border: 1px solid var(--line); width: max(100%, 560px); max-width: 100cqw; }
.player .scrub { flex: 1 1 auto; min-width: 80px; padding: 0 4px; }
.player .icon-btn { border-color: transparent; background: transparent; width: 36px; height: 36px; flex: none; }
.player .icon-btn:hover { border-color: var(--line-2); }
#play .i-play { display: none; }
.is-paused #play .i-play { display: block; fill: currentColor; stroke: none; }
.is-paused #play .i-pause { display: none; }
#sound .i-sound { display: none; }
.is-loud #sound .i-sound { display: block; }
.is-loud #sound .i-muted { display: none; }
.is-loud #sound { background: var(--ink); color: var(--on-dark); }
.scrub { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.scrub input { flex: 1; min-width: 40px; accent-color: var(--ad-accent); height: 28px; cursor: pointer; }
.time { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--tint); flex: none; }
.seg button { min-height: 30px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button[aria-checked='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.shot-strip { grid-column: 2; grid-row: 1; min-height: 0; list-style: none; margin: 0; padding: 0; width: auto; display: grid; gap: 0; align-content: start; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.shot-strip li + li { border-top: 1px solid var(--line); }
.shot { width: 100%; display: grid; grid-template-columns: 22px 30px minmax(0, 1fr); gap: 8px; align-items: center; padding: 5px 4px 5px 8px; border: 0; border-radius: 0; background: transparent; color: var(--muted); text-align: left; cursor: pointer; transition: color 160ms var(--ease); }
.shot:hover { color: var(--ink); }
.shot.is-now { color: var(--ink); box-shadow: inset 2px 0 0 var(--ad-accent); }
.shot img { width: 22px; height: 39px; object-fit: cover; border-radius: 3px; opacity: 0.85; }
.shot.is-now img { opacity: 1; }
.shot-time { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.shot-text { font-size: 12px; line-height: 1.3; }

/* how-to */
.view-howto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.howto-player { position: relative; width: min(100cqw, calc((100cqh - 60px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow); flex: none; }
.howto-player video { width: 100%; height: 100%; }
.howto-start { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 14px; padding: clamp(14px, 3cqw, 28px); border: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent 55%); color: #fff; text-align: left; cursor: pointer; font-family: var(--serif); font-size: clamp(18px, 2.4cqw, 28px); line-height: 1.1; }
.howto-start small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 13px; opacity: 0.9; }
.play-disc { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 999px; background: var(--paper); color: var(--ink); }
.play-disc svg { width: 20px; height: 20px; fill: currentColor; stroke: none; translate: 1px 0; }
.howto-player.is-started .howto-start { display: none; }
.howto-bar { display: flex; align-items: center; gap: 8px; width: min(100cqw, calc((100cqh - 60px) * 16 / 9)); }
.chapters { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.chapters::-webkit-scrollbar { display: none; }
.chapters li { flex: none; }
.chapters button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--paper) 92%, transparent); font-size: 13px; white-space: nowrap; cursor: pointer; }
.chapters button span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chapters button[aria-current='true'] { border-color: var(--ink); background: var(--card); }

/* assets */
.viewer { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; gap: 10px; background: transparent; }
.viewer:fullscreen { background: var(--bg); padding: 16px; }
.viewer-main { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; background: transparent; }
.viewer:not(.is-zoomed) .viewer-main img { position: absolute; inset: 0; }
.viewer-main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; filter: drop-shadow(0 10px 28px rgb(0 0 0 / 0.22)); }
.viewer.is-zoomed .viewer-main { place-items: start; overflow: auto; border-radius: 12px; }
.viewer.is-zoomed .viewer-main img { width: auto; height: auto; max-width: none; max-height: none; cursor: zoom-out; }
.viewer-bar { display: flex; align-items: center; gap: 8px; }
.viewer-caption { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-caption strong { color: var(--ink); font-weight: 600; margin-right: 8px; }
.viewer-count { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.filmstrip { list-style: none; margin: 0; padding: 2px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.filmstrip button { padding: 0; width: 76px; height: 56px; border-radius: 6px; border: 2px solid transparent; background: var(--tint); overflow: hidden; cursor: pointer; flex: none; }
.filmstrip img { width: 100%; height: 100%; object-fit: cover; }
.filmstrip button[aria-current='true'] { border-color: var(--ink); }

/* models */
.view-models { overflow: auto; }
.sheet-card { max-width: 980px; margin: 0 auto; padding: 8px 20px 16px; border-radius: 12px; background: color-mix(in oklab, var(--card) 94%, transparent); border: 1px solid var(--line); }
.models-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.models-table th, .models-table td { padding: 10px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.models-table thead th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.models-table tbody th { font-weight: 500; white-space: nowrap; }
.models-table td { color: var(--muted); line-height: 1.45; }
.models-table .num { text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.models-table tfoot th, .models-table tfoot td { border-bottom: 0; font-weight: 600; color: var(--ink); }
.models-table .is-runner th { color: var(--muted); }
.tag { font-style: normal; font-size: 11px; font-weight: 400; margin-left: 6px; padding: 1px 6px; border-radius: 4px; border: 1px dashed var(--line-2); color: var(--muted); }
.note { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 12px; }
.note strong { color: var(--ink); font-weight: 500; }

/* review loop */
.review-viewer { height: 100%; display: flex; justify-content: center; align-items: stretch; gap: 20px; }
.review-compare { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100cqw - 340px); border-radius: 14px; overflow: hidden; background: var(--tint); box-shadow: var(--shadow); flex: none; touch-action: pan-y; }
.review-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-after { clip-path: inset(0 0 0 var(--pos)); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; translate: -1px 0; background: #fff; pointer-events: none; }
.cmp-line span { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 34px; height: 34px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); }
.review-compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.review-compare:has(input:focus-visible) .cmp-line span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rc-tag { position: absolute; top: 10px; padding: 3px 8px; border-radius: 4px; background: rgb(0 0 0 / 0.55); color: #fff; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; pointer-events: none; }
.rc-tag-l { left: 10px; }
.rc-tag-r { right: 10px; }
.review-copy { width: 300px; flex: none; display: flex; flex-direction: column; gap: 12px; align-self: center; padding: 18px; border-radius: 12px; background: color-mix(in oklab, var(--card) 94%, transparent); border: 1px solid var(--line); }
.review-copy h3 { font-family: var(--serif); font-size: 28px; line-height: 1.05; }
.review-copy p:not(.eyebrow) { font-size: 13.5px; line-height: 1.5; }
.review-copy p strong { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 2px; }
.review-nav { display: flex; gap: 8px; }

/* downloads */
.view-downloads { overflow: auto; }
.dl-list { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 8px; }
.dl-list a { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px 8px 8px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in oklab, var(--card) 94%, transparent); text-decoration: none; transition: border-color 160ms var(--ease); }
.dl-list a:hover { border-color: var(--ink); }
.dl-type { display: grid; place-items: center; height: 44px; border-radius: 8px; background: var(--tint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }
.dl-text strong { display: block; font-weight: 500; font-size: 14.5px; }
.dl-text small { display: block; font-size: 12.5px; color: var(--muted); }
.dl-size { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

/* overview */
.view-overview { overflow: auto; }
.overview { max-width: 1000px; min-height: 100%; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
.ov-art { display: grid; justify-items: center; gap: 16px; }
.ov-logo { max-height: 220px; width: auto; object-fit: contain; filter: drop-shadow(0 10px 24px rgb(0 0 0 / 0.25)); }
.ov-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.ov-copy { display: grid; gap: 14px; padding: 24px; border-radius: 14px; background: color-mix(in oklab, var(--card) 94%, transparent); border: 1px solid var(--line); }
.ov-pitch { font-family: var(--serif); font-size: clamp(24px, 2.4cqw, 34px); line-height: 1.15; }
.ov-tagline { font-size: 14px; color: var(--muted); }
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.numbers div { display: grid; gap: 2px; padding: 10px 12px; background: var(--paper); }
.numbers dd { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.numbers dt { font-size: 11.5px; color: var(--muted); }

/* modals */
.modal { padding: 0; border: 0; border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.modal::backdrop { background: var(--scrim); }
.modal[open] { animation: modal-in 220ms var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } }
.how { width: min(1180px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.modal-inner { position: relative; padding: clamp(20px, 4vw, 44px); display: grid; gap: 14px; }
/* the phone's Close shares the eyebrow's row and sticks to the top while the long method scrolls under it
   (zero height, so the rows keep their place; the margins put it 14 px from the corner, as before) */
.modal-close-form { position: sticky; top: 14px; z-index: 3; grid-area: 1 / 1; justify-self: end; align-self: start; height: 0; margin: calc(14px - clamp(20px, 4vw, 44px)) calc(14px - clamp(20px, 4vw, 44px)) 0 0; }
.how-eyebrow { grid-area: 1 / 1; }
.how h2 { font-family: var(--serif); font-size: clamp(34px, 4vw, 48px); line-height: 1; }
.lead { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 60ch; }
.how-total { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.step-copy h3 { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.step-copy h3::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent); }
.step-copy p { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.step-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { margin: 0; min-width: 0; }
.tile-game { margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.tile-game::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--ad-accent); }
.tile-media { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--tint); }
.tile-media > img, .tile-media > video { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.tile-brief { display: grid; place-items: center; padding: 14px; text-align: center; background: color-mix(in oklab, var(--ad-accent) 14%, var(--paper)); }
.tile-brief p { font-family: var(--serif); font-size: 19px; line-height: 1.2; }
.tile-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 8px; }
.tile-pair img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.tile-pair span { color: var(--muted); }
.tile-wave { position: relative; padding: 10px; background: color-mix(in oklab, var(--ad-accent) 10%, var(--paper)); }
.tile-wave .bars { position: absolute; inset: 12px; display: flex; align-items: center; gap: 1px; }
.tile-wave .bars i { flex: 1; height: calc(var(--v) * 100%); background: var(--ad-accent); border-radius: 1px; }

.how-skill { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.how-skill h3 { font-family: var(--serif); font-size: 28px; line-height: 1.1; margin-top: 4px; }
.how-skill p:not(.eyebrow) { font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 75ch; margin-top: 6px; }
.how-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

/* footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 14px var(--pad); border-top: 1px solid var(--line); background: var(--paper); font-size: 13px; color: var(--muted); }
.credits { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 40px; text-underline-offset: 4px; color: var(--ink); }


/* horizontal strips fade on the side that has more to scroll (set by edgeFade in app.js) */
[data-more~='end'] { --fade-end: 44px; }
[data-more~='start'] { --fade-start: 44px; }
.spot-list[data-more], .section-list[data-more], .chapters[data-more], .shot-strip[data-more], .filters[data-more] { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start, 0px), #000 calc(100% - var(--fade-end, 0px)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start, 0px), #000 calc(100% - var(--fade-end, 0px)), transparent 100%); }

/* medium desktops */
@media (max-width: 1379px) { .subtitle { display: none; } }
@media (max-width: 1199px) {
  .shell { --left: 236px; --right: 200px; gap: 12px; }
  .spot-card { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .spot-card img { width: 40px; height: 71px; }
  .spot-layout { --strip-w: 190px; }
}
@container (max-width: 560px) {
  /* phones: the poster stays clear, only the play button sits on it */
  .howto-start { align-items: flex-end; padding: 12px; background: linear-gradient(to top, rgb(0 0 0 / 0.28), transparent 40%); }
  .howto-start-text { display: none; }
  .play-disc { width: 44px; height: 44px; }
  /* narrow stage: ad, a two-row slim bar, then the shots as one row */
  .spot-layout { --bar-h: 72px; --ad-gap: 10px; --shots-h: 58px; --ad-w: min(calc(100cqw - 16px), calc((100cqh - var(--bar-h) - var(--shots-h) - 2 * var(--ad-gap)) * 9 / 16));
    grid-template-columns: minmax(0, min(100cqw, 420px)); grid-template-rows: calc(var(--ad-w) * 16 / 9) var(--bar-h) var(--shots-h); }
  .spot-frame { grid-column: 1; width: var(--ad-w); justify-self: center; }
  .player { grid-column: 1; width: 100%; max-width: 100cqw; flex-wrap: wrap; gap: 0 2px; row-gap: 0; align-content: center; }
  .player .scrub { order: -1; flex: 1 0 100%; height: 26px; }
  .player .scrub input { height: 24px; }
  .player .icon-btn { width: 34px; height: 34px; }
  .player .seg { margin-inline: auto; }
  .shot-strip { grid-column: 1; grid-row: 3; width: 100%; display: flex; overflow-x: auto; overflow-y: hidden; height: auto; }
  .shot-strip li { flex: none; width: 190px; }
  .shot-strip li + li { border-top: 0; border-left: 1px solid var(--line); }
  .review-viewer { flex-direction: column; align-items: center; }
  .review-compare { height: calc(100cqh - 230px); max-width: 100cqw; }
  .review-copy { width: min(100%, 520px); align-self: center; }
  .overview { grid-template-columns: 1fr; }
}

/* phones, portrait and narrow */
@media (max-width: 899px) and (min-height: 501px), (max-width: 599px) {
  :root { --header-h: auto; }
  .top { flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px; }
  .brand { gap: 10px; }
  .back span { display: none; }
  .back { min-width: 32px; justify-content: center; border: 1px solid var(--line); border-radius: 6px; }
  .title { padding-left: 0; border: 0; }
  .title h1 { font-size: 24px; }
  .subtitle { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .btn { min-height: 38px; padding: 0 11px; font-size: 13px; }
  #how-open .label { display: none; }
  #how-open, #theme-toggle { width: 38px; padding: 0; }
  .shell, .shell[data-left='closed'], .shell[data-right='closed'] { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 10px 16px 24px; gap: 10px; }
  .rail-toggle, .rail-top, .skill-row, .filters { display: none !important; }
  .rail-spots { order: 1; }
  .rail-sections { order: 2; position: sticky; top: 0; z-index: var(--z-sticky); margin-inline: -16px; padding: 6px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .stage-wrap { order: 3; }
  .spot-list, .section-list { display: flex; overflow-x: auto; overflow-y: hidden; gap: 6px; margin-inline: -16px; padding: 2px 16px 4px; scrollbar-width: none; flex: none; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; overscroll-behavior-x: contain; }
  .spot-list li, .section-list li { scroll-snap-align: start; }
  .spot-list { gap: 5px; }
  .spot-list:empty { min-height: 57px; }
  .section-list:empty { min-height: 42px; }
  .spot-list::-webkit-scrollbar, .section-list::-webkit-scrollbar { display: none; }
  .spot-list li, .section-list li { flex: none; }
  .spot-card, .shell[data-left='closed'] .spot-card { width: auto; grid-template-columns: 24px auto; gap: 6px; padding: 3px 8px 3px 3px; justify-items: start; }
  .spot-card img { width: 24px; height: 43px; border-radius: 4px; }
  .spot-card-text, .shell[data-left='closed'] .spot-card-text { display: grid; }
  .spot-card-text span:not(.dur) { display: none; }
  .spot-card-text strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
  .section-btn, .shell[data-right='closed'] .section-btn { grid-template-columns: auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
  .section-btn svg, .section-text small { display: none; }
  .section-text, .shell[data-right='closed'] .section-text { display: block; }
  .section-text strong { font-size: 13.5px; white-space: nowrap; }
  .section-btn[aria-current='true'] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
  .stage-head { padding: 12px 14px 0; }
  .stage-body { container-type: inline-size; padding: 10px 12px 14px; }
  .view { height: auto; }
  .spot-layout { --ad-w: min(100cqw, calc(62svh * 9 / 16)); height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .spot-frame { grid-column: 1; grid-row: 1; width: var(--ad-w); max-height: none; justify-self: center; }
  .player { grid-column: 1; grid-row: 2; width: 100%; max-width: none; height: auto; flex-wrap: wrap; }
  .player .scrub { order: -1; flex: 1 0 100%; padding: 0 6px; }
  .shot-strip { grid-column: 1; grid-row: 3; }
  .player .seg { margin-inline: auto; }
  .shot-strip { width: 100%; display: flex; overflow-x: auto; max-height: none; scroll-snap-type: x proximity; }
  .shot-strip li { flex: none; width: 184px; scroll-snap-align: start; }
  .shot-strip li + li { border-top: 0; border-left: 1px solid var(--line); }
  .howto-player, .howto-bar { width: 100%; }
  .chapters button { min-height: 34px; padding: 0 10px; font-size: 12.5px; }
  .viewer { height: auto; grid-template-rows: auto auto auto; }
  .viewer-main { height: auto; }
  .viewer:not(.is-zoomed) .viewer-main img { position: static; width: auto; height: auto; max-width: 100%; max-height: 62svh; }
  .review-viewer { flex-direction: column; height: auto; }
  .review-compare { height: auto; width: min(100%, 360px); max-width: none; align-self: center; }
  .review-copy { width: 100%; }
  .overview { grid-template-columns: 1fr; gap: 16px; }
  .ov-logo { max-height: 130px; }
  .dl-list a { grid-template-columns: 48px minmax(0, 1fr) 18px; }
  .dl-size { grid-column: 2; grid-row: 2; margin-top: -6px; }
  .models-table thead { display: none; }
  .models-table, .models-table tbody, .models-table tr, .models-table th, .models-table td { display: block; }
  .models-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .models-table th, .models-table td { padding: 2px 0; border: 0; }
  .models-table .num { display: inline; text-align: left; margin-right: 12px; }
  .step { grid-template-columns: 1fr; gap: 12px; }
  .step-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(170px, 68vw); overflow-x: auto; margin-inline: -20px; padding: 0 20px 6px; }
}
@media (max-width: 520px) {
  .brand { flex: 1; }
  .top-actions { width: 100%; }
  .top-actions .btn { flex: 1; }
  #how-open, #theme-toggle { flex: none; }
}
@media (max-width: 380px) {
  .top-actions { gap: 5px; }
  .top-actions .btn { padding: 0 8px; gap: 6px; font-size: 12.5px; }
  #skill-top svg, .create-yours svg { display: none; }
  .player .icon-btn { width: 30px; height: 34px; }
  .player .seg button { padding: 0 5px; font-size: 12px; min-height: 28px; }
  .player { gap: 0; padding: 4px 3px; justify-content: space-between; }
  .player .seg { margin-inline: 0; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
}

/* short landscape phones: the stage between two icon rails */
@media (max-height: 500px) and (orientation: landscape) and (min-width: 600px) {
  :root { --header-h: 54px; }
  .top { padding: 6px 16px; }
  .title h1 { font-size: 22px; }
  .subtitle, .back span, #how-open .label { display: none; }
  .top-actions .btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
  .shell, .shell[data-left='open'], .shell[data-right='open'] { --left: 64px; --right: 56px; min-height: 320px; padding: 8px 12px; gap: 8px; }
  .rail-toggle, .rail-label, .skill-text, .spot-card-text, .filters, .section-text, .skill-icon { display: none !important; }
  .rail-top { display: none; }
  .skill-row { grid-template-columns: 1fr; justify-items: center; padding: 4px; }
  .spot-card { grid-template-columns: 1fr; justify-items: center; padding: 4px; }
  .spot-card img { width: 40px; height: 71px; }
  .section-btn { grid-template-columns: 1fr; justify-items: center; padding: 4px; min-height: 40px; }
  .stage-head { display: none; }
  .stage-head:has(.sound-chip:not([hidden])) { display: flex; position: absolute; top: 8px; left: 12px; z-index: 2; padding: 0; }
  .stage-head:has(.sound-chip:not([hidden])) > :not(.sound-chip) { display: none; }
  .stage-body { padding: 8px; }
  .spot-layout { --bar-h: 44px; --ad-gap: 8px; --strip-w: 180px; --col-gap: 12px; }
  .player { width: max(100%, 300px); padding: 3px; gap: 2px; }
  .player .icon-btn { width: 34px; height: 34px; }
  .player .time { display: none; }
  .player .scrub { min-width: 60px; }
}

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


/* =====================================================================================================
   UX fixes v1 (2026-09-27): desktop and landscape only. The phone portrait layout is frozen, so every rule
   below sits inside the exact complement of the phone block, and new elements stay hidden outside it.
   ===================================================================================================== */
.wide-only, .chip-click, .section-cap, .spot-spinner { display: none; }
.strip-col { display: contents; }
.shot-strip, .spot-list, .section-list, .chapters, .filmstrip, .player { -webkit-user-select: none; user-select: none; }

@media (min-width: 900px), (min-width: 600px) and (max-height: 500px) {
  .phone-only { display: none; }

  /* tokens: four radii, family lines, AA accent in light, a lighter per-game accent in dark */
  :root { --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --btn-radius: 4px; --radius: 12px; --accent: #b3572f; --accent-2: #9f4c29; --line: #d6ddcf; --line-2: #c3ccbb; }
  :root[data-theme='dark'] { --line: #30342d; --line-2: #40453c; --accent: #df7b55; --accent-2: #ec8c68; }
  .spot-card, .shot, .scrub, .tile, #sound, .rv-thumbs { --ad-ui: var(--ad-accent); }
  :root[data-theme='dark'] :is(.spot-card, .shot, .scrub, .tile, #sound, .rv-thumbs) { --ad-ui: color-mix(in oklab, var(--ad-accent) 65%, #ecebe3); }

  /* header: one filled button, a brand mark, and the line that says what the page is */
  .brand-mark { display: inline-block; width: 69px; height: 17px; background: currentColor; -webkit-mask: url('assets/scenario-logo-white.svg') center / contain no-repeat; mask: url('assets/scenario-logo-white.svg') center / contain no-repeat; }
  .brand-sub { display: inline; font-family: var(--sans); font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }
  .back > span:not(.wide-only) { display: none; }
  .back { gap: 8px; color: var(--ink); }
  .back:hover .brand-sub { color: var(--ink); }
  #skill-top { background: var(--paper); color: var(--ink); border-color: var(--line-2); font-weight: 500; }
  #skill-top:hover { border-color: var(--ink); }

  /* the ads rail: the family's serif statement, compact cards that all fit */
  .rail-spots .rail-top { align-items: flex-start; }
  .rail-spots .rail-label { display: none; }
  .intro { display: block; flex: 1; min-width: 0; padding: 2px 0 6px; }
  .intro h2 { font: 400 clamp(34px, 2.9vw, 44px) / 0.96 var(--serif); letter-spacing: -0.025em; }
  .intro h2 em { display: block; }
  .intro p { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); max-width: 30ch; }
  .shell[data-left='closed'] .intro { display: none; }
  .spot-card { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 5px 10px 5px 5px; border-radius: var(--r-sm); }
  .spot-card img { width: 36px; height: 64px; border-radius: var(--r-xs); }
  .spot-card-text strong { font-size: 15px; }
  .spot-card-text span:not(.dur) { font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .spot-card-text .dur { display: none; }
  .spot-card[aria-current='true'] { box-shadow: inset 3px 0 0 var(--ad-ui); }
  .shell[data-left='closed'] .spot-card img { width: 44px; height: 78px; }
  .chip { font-size: 12px; }
  @media (hover: hover) { .spot-card:hover { border-color: color-mix(in oklab, var(--ink) 40%, var(--line)); background: var(--paper); } }

  /* the sections rail: a serif title, and the skill in the rail's empty half */
  .rail-sections .rail-label { font: 400 26px / 1 var(--serif); letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
  .section-btn { border-radius: var(--r-sm); }
  .section-text strong { font-size: 15px; }
  .section-text small { font-size: 12px; }
  .rail-skill { display: grid; flex: none; gap: 8px; margin-top: 12px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); }
  .rail-skill strong { font: 400 20px / 1.1 var(--serif); }
  .rail-skill p { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
  .rail-skill .btn { justify-self: start; }
  .shell[data-right='closed'] .rail-skill { display: none; }

  /* the stage is a window into the game: its own colours, its own panels, its logo */
  .stage-wrap { background: linear-gradient(165deg, var(--game-bg2, var(--stage)) 0%, var(--game-bg, var(--stage)) 75%); }
  .stage-backdrop { opacity: 0.3; filter: blur(48px) saturate(1.2); }
  .stage-wrap::after { background: radial-gradient(100% 90% at 50% 40%, transparent 45%, rgb(0 0 0 / 0.22)); }
  .stage-wrap :focus-visible { outline-color: var(--game-ink); }
  :is(.player, .strip-col, .sheet-card, .review-copy, .ov-copy, .dl-list a, .chapters button, .howto-seg, .viewer-bar, .spot-error) {
    --ink: var(--game-panel-ink);
    --muted: color-mix(in oklab, var(--game-panel-ink) 72%, var(--game-panel));
    --line: color-mix(in oklab, var(--game-panel-ink) 14%, transparent);
    --line-2: color-mix(in oklab, var(--game-panel-ink) 30%, transparent);
    --paper: var(--game-panel); --card: var(--game-panel); --on-dark: var(--game-panel);
    --tint: color-mix(in oklab, var(--game-panel-ink) 8%, var(--game-panel));
    background: var(--game-panel); border-color: transparent; color: var(--ink);
  }
  :is(.player, .strip-col, .sheet-card, .review-copy, .ov-copy, .dl-list a, .chapters button, .howto-seg, .viewer-bar) :focus-visible { outline-color: var(--game-panel-ink); }
  .stage-head #stage-kicker { display: none; }
  .stage-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .stage-logo { display: block; height: 40px; width: auto; max-width: 240px; object-fit: contain; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.25)); }
  .stage-head { padding: 12px 16px 0; align-items: center; }
  .sound-chip { background: var(--game-panel); color: var(--game-panel-ink); border-color: var(--game-panel); font-size: 12px; }
  .howto-start small { font-size: 12px; }
  .text-link { font-size: 13.5px; }
  .skip { font-size: 13.5px; }
  @media (pointer: fine) { .chip-tap { display: none; } .chip-click { display: inline; } }
  .is-sound-blocked #sound { box-shadow: 0 0 0 2px var(--ad-ui); }
  /* the Ad section gives its height to the ad: no head row (the chip moves into the shot panel's head) */
  .stage-wrap[data-section='ad'] .stage-head { display: none; }
  .strip-head .sound-chip { margin: 10px 0 0; }
  .is-sound-blocked .strip-id span { display: none; }
  .stage-body { padding: 16px; }

  /* the ad: bigger, with the beat sheet as a side panel under the game's logo */
  .spot-layout { --strip-w: 236px; --col-gap: 20px; }
  .spot-frame { border-radius: var(--r-md); }
  .spot-spinner { position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgb(255 255 255 / 0.3); border-top-color: #fff; opacity: 0; pointer-events: none; }
  .spot-frame { position: relative; }
  .spot-frame.is-loading .spot-spinner { display: block; opacity: 1; animation: spin 900ms linear infinite; }
  @keyframes spin { to { rotate: 360deg; } }
  .spot-error { position: absolute; inset: auto 12px 12px; display: grid; gap: 8px; justify-items: start; padding: 14px; border-radius: var(--r-sm); font-size: 13.5px; }
  .spot-error[hidden] { display: none; }
  .strip-col { display: flex; flex-direction: column; grid-column: 2; grid-row: 1; min-height: 0; border-radius: var(--r-md); overflow: hidden; }
  .strip-head { display: block; flex: none; padding: 14px 14px 0; }
  .strip-id img { display: block; width: 100%; height: 52px; object-fit: contain; object-position: left center; }
  .strip-id span { display: block; margin-top: 8px; padding-bottom: 12px; font-size: 12px; line-height: 1.35; color: var(--muted); border-bottom: 1px solid var(--line); }
  .shot-strip { flex: 1; min-height: 0; padding: 12px 8px 8px; background: transparent; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .shot-strip li + li { border-top: 0; margin-top: 2px; }
  .shot { grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto; align-items: start; column-gap: 10px; row-gap: 2px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--ink); }
  .shot img { grid-row: 1 / 3; align-self: start; width: 32px; height: 57px; border-radius: var(--r-xs); opacity: 1; }
  .shot-time { grid-column: 2; grid-row: 1; line-height: 1.2; font-size: 11px; color: var(--muted); }
  .shot-text { grid-column: 2; grid-row: 2; font-size: 13.5px; line-height: 1.3; }
  .shot:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); }
  .shot.is-now { box-shadow: inset 3px 0 0 var(--ad-ui); background: color-mix(in oklab, var(--ink) 10%, transparent); }
  .player { --ctl-h: 40px; border-radius: var(--r-sm); gap: 4px; }
  .player .icon-btn, .player .seg { height: var(--ctl-h); border-radius: var(--r-sm); }
  .player .icon-btn { width: var(--ctl-h); }
  .player .seg { align-items: stretch; padding: 3px; }
  .seg button { min-height: 0; border-radius: var(--r-xs); font-size: 12px; }
  .player .scrub { height: var(--ctl-h); }
  .seg button[aria-checked='true'] { background: var(--ink); color: var(--game-panel); }
  .time { font-size: 11px; }
  .is-loud #sound { background: var(--ink); color: var(--game-panel); }
  /* a quiet custom scrub that follows the game's panel colours */
  .scrub input { -webkit-appearance: none; appearance: none; height: 20px; background: transparent; }
  .scrub input::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--ink) var(--p, 0%), color-mix(in oklab, var(--ink) 20%, transparent) var(--p, 0%)); }
  .scrub input::-moz-range-track { height: 4px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 20%, transparent); }
  .scrub input::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--ink); }
  .scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--paper); }
  .scrub input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--paper); }
  .scrub input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

  /* how-to: every chapter reachable without a sideways wheel */
  .howto-player { width: min(100cqw, calc((100cqh - 112px) * 16 / 9)); border-radius: var(--r-md); }
  .howto-bar { --ctl-h: 34px; width: min(100cqw, calc((100cqh - 112px) * 16 / 9)); align-items: flex-start; }
  .howto-bar .phone-fs { display: none; } /* the film has its own fullscreen control */
  .chapters { flex-wrap: wrap; row-gap: 6px; overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  .chapters button { height: var(--ctl-h); min-height: 0; padding: 0 12px; border-radius: var(--r-sm); font-size: 13.5px; }
  .howto-seg { display: inline-flex; flex: none; height: var(--ctl-h); padding: 3px; align-items: stretch; border-radius: var(--r-sm); }
  .howto-seg button { min-height: 0; padding: 0 10px; color: var(--muted); }
  .howto-seg button[aria-checked='true'] { background: var(--ink); color: var(--game-panel); }
  .chapters button span { font-size: 11px; }
  .chapters button[aria-current='true'] { background: var(--ink); color: var(--game-panel); }
  .chapters button[aria-current='true'] span { color: inherit; opacity: 0.8; }
  .howto-note { display: block; width: min(100cqw, calc((100cqh - 112px) * 16 / 9)); font-size: 12px; color: var(--game-ink); }
  .howto-error { display: block; position: absolute; inset: auto 16px 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--game-panel); color: var(--game-panel-ink); font-size: 13.5px; }
  .howto-error[hidden] { display: none; }

  /* assets: the caption in a panel, two lines, open on click */
  .viewer-bar { padding: 6px; border-radius: var(--r-sm); }
  .viewer-caption { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; font-size: 13.5px; line-height: 1.4; }
  .viewer-caption.is-open { display: block; -webkit-line-clamp: unset; }
  .viewer-count { font-size: 11px; }
  .filmstrip button { border-radius: var(--r-xs); }
  .viewer.is-zoomed .viewer-main { border-radius: var(--r-md); }

  /* models: the numbers explained, the header row in one voice, rows that stack in a narrow stage */
  .sheet-card { border-radius: var(--r-md); padding: 14px 20px 16px; }
  .models-sum { display: block; font-size: 15px; }
  .models-sum strong { font-weight: 600; }
  .cu-def { display: block; margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--muted); }
  .models-table { font-size: 13.5px; margin-top: 8px; }
  .models-table thead th, .models-table thead th.num { font: 400 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
  .models-table abbr { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
  .models-table .num { font: 500 13.5px var(--sans); font-variant-numeric: tabular-nums; }
  .models-table tbody th { white-space: normal; }
  .tag { font-size: 12px; border-radius: var(--r-xs); }
  .note { font-size: 13.5px; }
  @container (max-width: 640px) {
    .models-table thead { display: none; }
    .models-table, .models-table tbody, .models-table tfoot, .models-table tr { display: block; }
    .models-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
    .models-table th, .models-table td { display: block; padding: 0; border: 0; }
    .models-table tbody td:not(.num), .models-table tfoot td:not(.num) { grid-column: 1 / -1; grid-row: 2; }
    .models-table .num[data-unit]::after { content: ' ' attr(data-unit); color: var(--muted); font-weight: 400; }
  }

  /* review loop: laid out from the stage's own size, every fix one click away */
  .review-viewer { display: grid; grid-template-columns: auto minmax(0, 320px); justify-content: center; align-items: center; gap: 20px; height: 100%; }
  .review-compare { height: min(100cqh, calc((100cqw - 360px) * 16 / 9)); width: auto; max-width: none; aspect-ratio: 9 / 16; border-radius: var(--r-md); }
  .review-copy { width: auto; max-height: 100cqh; overflow: auto; border-radius: var(--r-md); }
  .review-copy h3 { font-size: 26px; }
  #rv-shot { display: none; }
  #rv-title { display: block; }
  .rc-tag { border-radius: var(--r-xs); }
  .rv-thumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
  .rv-thumbs button { display: block; width: 36px; height: 64px; padding: 0; border-radius: var(--r-xs); border: 2px solid transparent; overflow: hidden; background: var(--tint); cursor: pointer; }
  .rv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
  .rv-thumbs button[aria-current='true'] { border-color: var(--ad-ui); }
  @container (max-width: 700px) {
    .review-viewer { grid-template-columns: auto minmax(0, 240px); gap: 14px; }
    .review-compare { height: min(100cqh, calc((100cqw - 260px) * 16 / 9)); }
    .review-copy { padding: 14px; }
    .review-copy h3 { font-size: 20px; }
  }

  /* downloads: this ad, then the series */
  .dl-group { display: block; margin: 12px 0 -2px; font-size: 13.5px; font-weight: 600; color: var(--game-ink); }
  .dl-group:first-child { margin-top: 0; }
  .dl-list a { border-radius: var(--r-sm); }
  .dl-type { border-radius: var(--r-xs); font-size: 11px; }
  .dl-text strong { font-size: 15px; }
  .dl-text small { font-size: 12px; }
  .dl-size { font-size: 11px; }

  /* overview: pitch first, three figures, the rest in a sentence */
  .overview { align-items: start; padding-top: 24px; }
  .ov-art { padding-inline: 12px; }
  .ov-logo { max-width: 100%; height: auto; }
  .ov-copy { border-radius: var(--r-md); }
  .ov-style { display: block; margin-top: -8px; font-size: 13.5px; color: var(--muted); }
  .ov-pitch { font-size: 32px; }
  .ov-tagline { font-size: 15px; }
  .numbers { border-radius: var(--r-sm); }
  .numbers div:nth-child(2), .numbers div:nth-child(3), .numbers div:nth-child(6) { display: none; }
  .numbers dd { font-size: 32px; }
  .numbers dt { font-size: 12px; }
  .ov-sum { display: block; font-size: 13.5px; }

  /* the method modal: a bar that stays, a readable total, calm sheets in dark */
  .modal-bar { display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 2; margin: calc(-1 * clamp(20px, 4vw, 44px)) calc(-1 * clamp(20px, 4vw, 44px)) 0; padding: 10px clamp(20px, 4vw, 44px); background: var(--paper); border-bottom: 1px solid var(--line); }
  .step-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
  .step-dots a { display: inline-grid; place-items: center; min-width: 32px; height: 28px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; text-decoration: none; color: var(--muted); }
  .step-dots a:hover { color: var(--ink); border-color: var(--ink); }
  .bar-close { margin: 0; }
  .modal-close-form, .how-eyebrow { display: none; }
  .step { scroll-margin-top: 64px; }
  .how-total { font: 500 14px / 1.5 var(--sans); font-variant-numeric: tabular-nums; }
  .lead { font-size: 17px; }
  .step-copy p { font-size: 13.5px; }
  .tile-game { font-size: 12px; }
  .tile-brief p { font-size: 20px; }
  .how-skill h3 { font-size: 26px; }
  .how-skill p:not(.eyebrow) { font-size: 15px; }
  :root[data-theme='dark'] .step-tiles img { filter: brightness(0.9); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .step-tiles img { filter: brightness(0.9); } }
  @media (prefers-color-scheme: dark) { :root:not([data-theme='light']) :is(.spot-card, .shot, .scrub, .tile, #sound, .rv-thumbs) { --ad-ui: color-mix(in oklab, var(--ad-accent) 65%, #ecebe3); } }

  /* the skill sheet */
  .sheet { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
  .sheet-inner { position: relative; display: grid; gap: 12px; padding: 28px; }
  .sheet-close { position: absolute; top: 12px; right: 12px; margin: 0; }
  .sheet h2 { font: 400 32px / 1.05 var(--serif); padding-right: 40px; }
  .sheet h2:focus { outline: none; }
  .sheet-lead { font-size: 15px; line-height: 1.5; color: var(--muted); }
  .sheet-steps { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.5; }
  .sheet-steps code { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: var(--r-xs); background: var(--tint); }
  .sheet-note { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
  .sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
  .sheet-size { font-weight: 400; opacity: 0.85; }
  .sheet-size:not(:empty)::before { content: '· '; }

  /* type scale on the shell */
  .btn { font-size: 15px; }
  .btn-sm { font-size: 13.5px; }
  .foot { font-size: 13.5px; }

  /* the consent banner sits under the stage, never over the player, while it shows (desktop and landscape) */
  .shell { transition: padding-bottom 200ms var(--ease), grid-template-columns 320ms var(--ease); }
  @container (max-width: 560px) { .strip-head { display: none; } .strip-col { display: contents; } .shot-strip { padding-top: 0; } }
}

/* desktop only (not landscape): a 60 px header and a tighter shell give the ad its height */
@media (min-width: 900px) and (min-height: 501px) {
  :root { --header-h: 60px; }
  .top { padding-block: 6px; min-height: 60px; }
  .title { flex-direction: column; align-items: flex-start; gap: 3px; }
  .title h1 { font-size: 26px; }
  .subtitle { display: none; }
  .what-line { display: block; font-size: 13.5px; line-height: 1.3; color: var(--muted); }
  .what-line .short { display: none; }
  .shell { padding-top: 12px; padding-bottom: 12px; }
  /* the header stays in view when the page scrolls down to the footer, so its two buttons never slide away */
  .top { position: sticky; top: 0; z-index: 20; }
  @media (max-height: 780px) { .intro p { display: none; } .intro h2 { font-size: 32px; } }
}
@media (min-width: 900px) and (max-width: 1379px) and (min-height: 501px) {
  .chapters { gap: 5px; row-gap: 5px; }
  .howto-bar { --ctl-h: 30px; }
  .chapters button { padding: 0 9px; gap: 6px; font-size: 12px; }
  .what-line { font-size: 12px; }
  .what-line .long { display: none; }
  .what-line .short { display: inline; }
  .brand-sub { display: none; }
}

/* landscape phones: say where you are, and name the sections under their icons */
@media (max-height: 500px) and (orientation: landscape) and (min-width: 600px) {
  .stage-head, .stage-wrap[data-section='ad'] .stage-head { display: flex; position: absolute; top: 8px; left: 10px; z-index: 3; gap: 6px; padding: 0; align-items: center; }
  .strip-head .sound-chip { margin-top: 6px; min-height: 28px; font-size: 12px; }
  .stage-head h2, .stage-wrap[data-section='ad'] .stage-head h2 { display: block; position: static; width: auto; height: auto; clip-path: none; order: 0; padding: 4px 10px; border-radius: 999px; background: var(--game-panel); color: var(--game-panel-ink); font: 600 12px / 1.2 var(--sans); }
  .stage-head h2::after { content: ' · ' attr(data-section); font-weight: 400; }
  .stage-head .stage-logo, .stage-head #stage-kicker { display: none !important; }
  .stage-head:has(.sound-chip:not([hidden])) > :not(.sound-chip) { display: block; }
  .section-list { gap: 1px; overflow: hidden; }
  .section-btn { gap: 0; min-height: 0; padding: 2px; grid-template-rows: auto auto; }
  .section-btn svg { width: 24px; height: 24px; padding: 4px; }
  .section-cap { display: block; font-family: var(--mono); font-size: 10.5px; line-height: 1.15; color: var(--muted); text-align: center; }
  .section-btn[aria-current='true'] .section-cap { color: var(--ink); font-weight: 600; }
  .spot-card img { width: 36px; height: 64px; }
  .spot-layout { --bar-h: 48px; --strip-w: 180px; }
  .strip-head { padding: 8px 10px 6px; }
  .strip-id img { height: 32px; }
  .strip-id span { display: none; }
  .shot-strip { padding-top: 4px; }
  .player .icon-btn { width: 40px; height: 40px; }
  .shot-text { font-size: 12px; }
  .shell { padding-bottom: 8px; }
  .rail-skill { display: none; }
  .stage-wrap:not([data-section='ad']) .stage-body { padding-top: 38px; }
  .howto-player, .howto-bar, .howto-note { width: min(100cqw, calc((100cqh - 64px) * 16 / 9)); }
  .howto-note { display: none; }
  .chapters { flex-wrap: nowrap; overflow-x: auto; }
  .chapters[data-more] { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start, 0px), #000 calc(100% - var(--fade-end, 0px)), transparent 100%) !important; mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start, 0px), #000 calc(100% - var(--fade-end, 0px)), transparent 100%) !important; }
}

/* End of the ad and of the how-to: the last frame dims, and one card holds the next step, the count and
   the two other choices. It sits clear of the game's own Play Now (data-at from data.js). Shown on every screen
   size, the phone included (Emmanuel's own request, an approved exception to the phone freeze). */
.end-card { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 12px; background: rgb(8 10 8 / 0.6); animation: end-in 260ms var(--ease) both; container-type: inline-size; }
.end-card[data-at='middle'], .howto-end { justify-content: center; }
.spot-frame { position: relative; } /* the card belongs to the frame on every screen (no layout effect: nothing is offset) */
.end-card[hidden] { display: none; }
@keyframes end-in { from { opacity: 0; } }
.end-panel { display: grid; gap: 8px; width: min(100%, 320px); padding: 10px; border-radius: 12px; background: var(--game-panel, #fbfaf6); color: var(--game-panel-ink, #161a15); box-shadow: 0 12px 32px rgb(0 0 0 / 0.35); }
.end-main { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 14px 6px 6px; border: 0; border-radius: 8px; background: var(--game-panel-ink, #161a15); color: var(--game-panel, #fff); text-align: left; cursor: pointer; transition: transform 140ms var(--ease); }
.end-main:hover { transform: translateY(-1px); }
.end-main:active { transform: scale(0.98); }
.end-main:focus-visible { outline: 3px solid var(--game-panel-ink, #161a15); outline-offset: 2px; }
.end-ring { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; }
.end-ring svg:first-child { position: absolute; inset: 0; width: 44px; height: 44px; rotate: -90deg; }
.end-ring circle { fill: none; stroke-width: 3; }
.ring-bg { stroke: color-mix(in oklab, currentColor 22%, transparent); }
.ring-fg { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 106.8; stroke-dashoffset: 0; }
.end-ring .ring-play { width: 16px; height: 16px; fill: currentColor; stroke: none; translate: 1px 0; }
.end-card.is-static .ring-fg, .end-card.is-stopped .ring-fg { stroke-dashoffset: 0 !important; }
.end-text { display: grid; gap: 2px; line-height: 1.2; }
.end-text strong { font-size: 15px; font-weight: 600; }
.end-text small { font-size: 12px; opacity: 0.8; }
.end-count { margin: 0; font-size: 12px; line-height: 1.3; text-align: center; font-variant-numeric: tabular-nums; opacity: 0.85; }
.end-count:empty { display: none; }
.end-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.end-link { min-height: 40px; padding: 0 10px; border: 1px solid color-mix(in oklab, currentColor 30%, transparent); border-radius: 8px; background: transparent; color: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.end-link:hover { border-color: currentColor; }
.end-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@container (max-width: 230px) {
  .end-panel { padding: 8px; gap: 6px; }
  .end-main { gap: 8px; padding: 6px 10px 6px 4px; min-height: 48px; }
  .end-ring, .end-ring svg:first-child { width: 36px; height: 36px; }
  .end-text strong { font-size: 13.5px; }
  .end-more { grid-template-columns: 1fr; gap: 6px; }
  .end-link { min-height: 36px; }
}




/* ======================================================================================================
   UX fixes v2 (2026-09-27): desktop and landscape unless noted. Phone portrait stays frozen.
   ====================================================================================================== */
/* cards and sections are links now: they look exactly as the buttons did, on every screen */
a.spot-card, a.section-btn { text-decoration: none; -webkit-user-drag: none; }

@media (min-width: 900px), (min-width: 600px) and (max-height: 500px) {
  /* the consent banner never takes layout space. Ads rail open: it takes the rail's width at the rail's foot and
     the rail's list scrolls clear of it. Rail folded: it floats top right, over the shot panel and the section rail. */
  .consent-rail [data-testid='consent-banner-root'] { left: var(--consent-x, 24px) !important; right: auto !important; bottom: var(--consent-b, 24px) !important; top: auto !important; width: var(--consent-w, 272px) !important; max-width: none !important; padding: 0 !important; }
  .consent-rail [data-testid='consent-banner-root'] > *, .consent-rail [data-testid='consent-banner-card'] { width: 100% !important; max-width: none !important; }
  .consent-rail .spot-list { padding-bottom: calc(var(--consent-card-h, 0px) + 12px); }
  /* at the rail's width the card stacks its buttons: two side by side, Customize under them */
  .consent-rail [data-testid='consent-banner-header'] { padding: 16px !important; }
  .consent-rail [data-testid='consent-banner-footer'] { flex-direction: column !important; align-items: stretch !important; gap: 8px !important; padding: 12px 16px 16px !important; }
  .consent-rail [data-testid='consent-banner-footer-sub-group'] { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
  .consent-rail [data-testid='consent-banner-footer'] button { width: 100% !important; min-height: 36px; }
  .consent-float [data-testid='consent-banner-root'] { top: calc(var(--header-h) + 8px) !important; bottom: auto !important; left: auto !important; right: 12px !important; width: auto !important; max-width: none !important; padding: 0 !important; }
  .consent-float [data-testid='consent-banner-card'] { width: min(400px, calc(100vw - 24px)) !important; }
  .player { transform: translateY(calc(-1 * var(--consent-lift, 0px))); transition: transform 200ms var(--ease); }

  /* one height for the bar: the sound button's "tap for sound" ring is drawn inside it, so its box is the
     segmented control's box (--ctl-h, same radius, same centre line) */
  .is-sound-blocked #sound { box-shadow: inset 0 0 0 2px var(--ad-ui); }
  .player > .icon-btn, .player > .seg { height: var(--ctl-h); border-radius: var(--r-sm); align-self: center; }

  /* current and hover: the current card has the game's accent border and a fill; hover is a fill only */
  .section-btn { --ad-ui: var(--ad-accent); }
  :root[data-theme='dark'] .section-btn { --ad-ui: color-mix(in oklab, var(--ad-accent) 65%, #ecebe3); }
  .spot-card[aria-current='true'] { border-color: var(--ad-ui); background: color-mix(in oklab, var(--ad-ui) 9%, var(--card)); box-shadow: inset 3px 0 0 var(--ad-ui); }
  .section-btn[aria-current='true'] { border-color: var(--ad-ui); background: color-mix(in oklab, var(--ad-ui) 9%, var(--card)); }
  .section-btn:hover { border-color: transparent; }
  @media (hover: hover) {
    .spot-card:not([aria-current='true']):hover { border-color: var(--line); background: color-mix(in oklab, var(--ink) 5%, var(--card)); }
    .section-btn:not([aria-current='true']):hover { border-color: transparent; background: color-mix(in oklab, var(--ink) 6%, transparent); }
  }

  /* the stage names where you are: a readable logo mark, and the section in words when the right rail is folded */
  .stage-logo { height: 44px; max-width: 200px; }
  .stage-wrap[data-section='overview'] .stage-logo { visibility: hidden; }
  .strip-id img { height: 48px; }
  .shell[data-right='closed'] .stage-head h2 { position: static; width: auto; height: auto; clip-path: none; display: block; order: 2; padding: 5px 12px; border-radius: 999px; background: var(--game-panel); color: var(--game-panel-ink); font: 600 13.5px / 1.2 var(--sans); white-space: nowrap; }
  .shell[data-right='closed'] .stage-head h2::after { content: ' · ' attr(data-section); font-weight: 400; }
  /* folded right rail: captions under the icons, the current one in bold */
  .shell[data-right='closed'] .section-btn { grid-template-rows: auto auto; gap: 3px; padding: 6px 2px; }
  .shell[data-right='closed'] .section-cap, .section-cap { font: 500 11px / 1.15 var(--sans); letter-spacing: 0; text-align: center; color: var(--muted); text-wrap: balance; }
  .shell[data-right='closed'] .section-cap { display: block; }
  .section-btn[aria-current='true'] .section-cap { color: var(--ink); font-weight: 700; }

  /* text that sits on the stage itself reads on a panel plate (AA on every game's gradient) */
  .dl-group, .howto-note { width: fit-content; padding: 3px 8px; border-radius: var(--r-xs); background: var(--game-panel); color: var(--game-panel-ink); }
  .howto-note { max-width: min(100cqw, calc((100cqh - 112px) * 16 / 9)); }

  /* radii: 4, 8, 12 and pills only */
  .rail-toggle { border-radius: var(--r-xs); }
  .shell[data-left='closed'] .rail-spots .rail-toggle, .shell[data-right='closed'] .rail-sections .rail-toggle { border-radius: var(--r-sm); }
  .seg button, .howto-seg button, .rc-tag, .skip { border-radius: var(--r-xs); }

  /* small things: tags and paths on one line, the genre back on the overview card, the modal's quiet skill button */
  .tag { white-space: nowrap; display: inline-block; margin-top: 2px; }
  .sheet-steps code { white-space: nowrap; }
  .ov-copy .eyebrow.wide-only { display: block; }
  .overview { align-content: start; }
  .how-actions .btn-ink { background: var(--paper); color: var(--ink); border-color: var(--line-2); font-weight: 500; }
  .how-actions .btn-ink:hover { border-color: var(--ink); }

  /* lists that scroll up and down fade only on the side with more */
  [data-more-y~='start'] { --fy-start: 18px; }
  [data-more-y~='end'] { --fy-end: 32px; }
  .shot-strip[data-more-y], .spot-list[data-more-y] { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fy-start, 0px), #000 calc(100% - var(--fy-end, 0px)), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fy-start, 0px), #000 calc(100% - var(--fy-end, 0px)), transparent 100%); }

  /* chapter times: darker than the panel's muted tone, so they pass AA on every game's panel */
  .chapters button span { color: color-mix(in oklab, var(--ink) 86%, var(--paper)); opacity: 1; }
  .chapters button[aria-current='true'] span { color: inherit; opacity: 0.85; }

  /* the keyboard sheet */
  .keys-sheet h2 { font: 400 28px / 1.1 var(--serif); padding-right: 40px; }
  .keys-sheet h2:focus { outline: none; }
  .keys-list { display: grid; gap: 8px; margin: 4px 0 0; }
  .keys-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: baseline; }
  .keys-list dt { display: flex; gap: 4px; flex-wrap: wrap; }
  .keys-list dd { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
  kbd { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: var(--r-xs); border: 1px solid var(--line-2); background: var(--card); font: 500 12px var(--mono); }
}

/* desktop: the whole page fits the window, the footer is one slim row inside it */
@media (min-width: 900px) and (min-height: 501px) {
  .app { height: 100dvh; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
  .top { position: static; }
  .shell { height: auto; min-height: 0; padding-top: 8px; padding-bottom: 6px; }
  .stage-body { padding: 8px 16px; }
  .spot-layout { --ad-gap: 8px; }
  .foot, .foot[data-exploration-controls] { flex-wrap: nowrap; gap: 8px 16px; min-height: 0; padding: 0 var(--pad); font-size: 12px; }
  .foot .c-short { display: none; }
  .foot .credits { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .foot-links, .foot [data-exploration-tools] { flex-wrap: nowrap; white-space: nowrap; gap: 0 14px; }
  .foot-links a, .foot [data-exploration-tools] a, .foot #scenario-exploration-analytics .scenario-exploration-controls > * { min-height: 30px; font-size: 12px; }
  .foot-links a[href$='.zip'] { display: none; } /* the header and the rail already offer the skill */
}
/* the method's label fits down to 1024 once the header is tight; the footer takes its short credit line */
@media (min-width: 900px) and (max-width: 1199px) and (min-height: 501px) {
  .foot .c-long { display: none; }
  .foot .c-short { display: inline; }
}
@media (min-width: 900px) and (max-width: 1100px) and (min-height: 501px) {
  .top-actions { gap: 6px; }
  .top-actions .btn { padding: 0 12px; }
}

/* landscape phones: every control in the bar, key content above the fold */
@media (max-height: 500px) and (orientation: landscape) and (min-width: 600px) {
  .spot-layout { --strip-w: 150px; }
  .player { width: 100cqw; max-width: 100cqw; }
  .player .scrub { min-width: 160px; }
  .section-cap { font-size: 11px; }
  .ov-pitch { font-size: 22px; }
  .ov-icon { display: none; }
  .rv-thumbs { display: none !important; }
  .rc-tag { font-size: 9.5px; padding: 2px 5px; top: 6px; }
  .rc-tag-l { left: 6px; }
  .rc-tag-r { right: 6px; }
}

/* the method modal opens with focus on its title on every screen: no ring on the close button (focus handling) */
#how-title:focus { outline: none; }

/* 2026-09-27 (Emmanuel): how-to chapters: transparent by default, plain panel background only on the active chapter */
.chapters button,
.stage :is(.chapters) button { background: transparent !important; border-color: transparent !important; color: var(--game-ink, var(--ink)) !important; }
.chapters button span { color: inherit !important; opacity: .75; }
.chapters button:hover { background: color-mix(in oklab, var(--game-panel, var(--card)) 35%, transparent) !important; }
.chapters button[aria-current='true'] { background: var(--game-panel, var(--card)) !important; color: var(--game-panel-ink, var(--ink)) !important; }
.chapters button[aria-current='true'] span { opacity: .8; }

/* review rounds recorded in words only (Bloom Merge): a text card in the compare's place */
.rc-text { display: none; }
.review-compare.is-text { background: var(--game-panel, var(--card)); color: var(--game-panel-ink, var(--ink)); }
.review-compare.is-text > :not(.rc-text) { display: none; }
.review-compare.is-text .rc-text { display: grid; align-content: center; gap: 14px; position: absolute; inset: 0; padding: 22px; font-size: 14px; line-height: 1.5; }
.rc-text strong { display: block; font: 400 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; margin-bottom: 2px; }
.rv-num { display: grid; place-items: center; width: 100%; height: 100%; font: 500 13px var(--mono); }
