/* Want to Play, v1. Explorations shell (bar, hero, download cards, modals) on a deep indigo ground,
   with the bright casual-game palette of the ads. Archivo for words, JetBrains Mono for labels.
   Category colors: puzzle cyan, satisfying pink, growth lime, skill shots orange. Sun yellow marks
   the actions and the two checking stages. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-vf.woff2") format("woff2-variations"), url("fonts/archivo-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-normal-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0b0a1c;
  --bg-2: #100f26;
  --paper: #16152e;
  --sunk: #1d1c3a;
  --raised: #27264a;
  --ink: #f6f4ff;
  --ink-2: #cfcbe8;
  --ink-3: #9d98c2;
  --line: rgba(246, 244, 255, 0.11);
  --line-2: rgba(246, 244, 255, 0.22);
  --sun: #ffcb3d;
  --sun-ink: #ffd965;
  --sun-soft: #2a2312;
  --cyan: #3fd0ff;
  --pink: #ff5fa8;
  --lime: #8fe05a;
  --orange: #ff8c3f;
  --violet: #a985ff;
  --wrap: 1400px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --pad: clamp(16px, 3.2vw, 40px);
  --bar-h: 60px;
  --r: 12px;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --exploration-footer-bg: #0b0a1c;
  --exploration-footer-ink: #cfcbe8;
  --exploration-footer-border: rgba(246, 244, 255, 0.11);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 24px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; text-wrap: balance; letter-spacing: -0.01em; font-weight: 820; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gut), var(--pad)); padding-right: max(var(--gut-r), var(--pad)); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }
.m {
  display: inline-block; font-family: var(--mono); font-size: 12.5px; line-height: 1.35; letter-spacing: 0.01em;
  color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; white-space: nowrap;
}
.kicker, .eyebrow, .label {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kicker .n { color: var(--sun); }
.kicker .n::after { content: " /"; color: var(--ink-3); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i .f { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- top bar */
.bar {
  position: sticky; top: 0; z-index: 40;
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-left: max(var(--gut), var(--pad)); padding-right: max(var(--gut-r), var(--pad));
  background: rgba(11, 10, 28, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.bar-home { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.bar-home img { width: 98px; height: auto; }
/* the gallery link stays a readable target: it never shrinks; tighter actions first, then the Scenario mark alone */
.bar-home { flex-shrink: 0; min-height: 40px; }
.bar-home:hover .bar-sec { color: var(--ink); }
.bar-slash { color: var(--ink-3); }
.bar-title { text-decoration: none; font-weight: 820; font-stretch: 116%; font-size: 17px; white-space: nowrap; padding-left: 18px; border-left: 1px solid var(--line); }
.bar-title em { font-style: normal; color: var(--sun); }
.bar-right { display: flex; align-items: center; gap: 4px; }
.bar-actions { display: flex; align-items: center; gap: 2px; }
.bar-action {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 11px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  text-decoration: none; font-size: 14.5px; color: var(--ink-2); white-space: nowrap;
}
.bar-action svg.i { width: 17px; height: 17px; }
.bar-action:hover { color: var(--ink); background: var(--sunk); }
.bar-make { margin-left: 6px; background: var(--sun); color: #1a1405; font-weight: 750; }
.bar-make:hover { background: var(--sun-ink); color: #1a1405; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 10px;
  font-size: 16px; font-weight: 720; text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg.i { width: 17px; height: 17px; }
.btn-sun { background: var(--sun); color: #1a1405; }
.btn-sun:hover { background: var(--sun-ink); }
.btn-line { background: rgba(11, 10, 28, 0.5); border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink-2); background: var(--sunk); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 9px; }

/* ---------------------------------------------------------------- phone frame (hero, cards) */
.phone { position: relative; margin: 0; }
.phone-screen {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: clamp(14px, 9%, 30px) / clamp(14px, 5.1%, 30px);
  background: #05050d;
  border: clamp(4px, 2.4%, 8px) solid #05050d;
  box-shadow: 0 0 0 1px rgba(246, 244, 255, 0.16), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}
.phone-screen video, .phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ph-open { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.ph-ctl { position: absolute; z-index: 2; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 6px; pointer-events: none; }
.ph-ctl .ph-btn:last-child { margin-left: auto; }
.ph-btn {
  pointer-events: auto; flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(8, 8, 20, 0.62); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ph-btn:hover { background: rgba(8, 8, 20, 0.86); border-color: rgba(255, 255, 255, 0.6); }
.ph-btn svg.i { width: 16px; height: 16px; }
.ph-btn[aria-pressed="true"] { background: var(--sun); color: #1a1405; border-color: var(--sun); }
.ph-btn .when-on, .ph-btn[aria-pressed="true"] .when-off { display: none; }
.ph-btn[aria-pressed="true"] .when-on { display: block; }
[data-play] .i-pause { display: none; }
.is-playing [data-play] .i-play { display: none; }
.is-playing [data-play] .i-pause { display: block; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 78% 30%, rgba(169, 133, 255, 0.22), transparent 70%),
    radial-gradient(40% 50% at 92% 85%, rgba(255, 95, 168, 0.16), transparent 70%),
    radial-gradient(45% 60% at 5% 10%, rgba(63, 208, 255, 0.12), transparent 70%),
    var(--bg-2);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 680px); align-items: center; gap: clamp(28px, 4vw, 64px); padding-block: clamp(24px, 2.4vw, 32px); }
.hero-copy { max-width: 580px; }
.hero h1 { margin-top: 12px; font-size: clamp(42px, 5vw, 70px); font-stretch: 112%; font-weight: 860; line-height: 0.98; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero-sub { margin-top: 16px; font-size: clamp(17px, 1.45vw, 19.5px); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.hero-sub code { font-size: 0.86em; color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 5px; padding: 0.05em 0.35em; white-space: nowrap; }
.hero-for { margin-top: 10px; font-size: 15px; color: var(--ink-3); }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.stage-wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 14px; width: 100%; }
.stage { position: relative; flex: 0 0 100%; width: 100%; margin-bottom: 4px; aspect-ratio: 1 / 0.8; }
.stage .phone {
  position: absolute; left: 31%; top: 50%; width: 38%; z-index: 1;
  transform: translate(var(--x, 0%), -50%) scale(var(--s, 1)); opacity: var(--o, 1);
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.35s ease, visibility 0s linear 0s;
}
.stage .phone[data-pos="0"] { z-index: 3; }
.stage .phone[data-pos="-1"] { --x: -94%; --s: 0.74; --o: 0.92; z-index: 2; }
.stage .phone[data-pos="1"] { --x: 94%; --s: 0.74; --o: 0.92; z-index: 2; }
.stage .phone[data-pos="-2"] { --x: -140%; --s: 0.5; --o: 0; }
.stage .phone[data-pos="2"] { --x: 140%; --s: 0.5; --o: 0; }
.stage .phone.is-off { visibility: hidden; pointer-events: none; transition-delay: 0s, 0s, 0.5s; }
.stage .phone:not(.mid) { cursor: pointer; }
.stage .phone:not(.mid) .ph-ctl { display: none; }
.stage .phone:not(.mid) .phone-screen { box-shadow: 0 0 0 1px rgba(246, 244, 255, 0.12), 0 18px 40px -20px rgba(0, 0, 0, 0.8); }
.stage .phone.mid .phone-screen { box-shadow: 0 0 0 2px var(--sun), 0 30px 70px -26px rgba(0, 0, 0, 0.85); }
.stage .ph-btn { width: 32px; height: 32px; }
.stage figcaption { position: absolute; left: 0; right: 0; top: 100%; margin-top: 10px; text-align: center; font-family: var(--mono); font-size: calc(12px / var(--s, 1)); letter-spacing: 0.06em; color: var(--ink-3); text-transform: uppercase; white-space: nowrap; }
.stage .phone.mid figcaption { color: var(--ink); }
.car-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); border: 1px solid var(--line-2); background: rgba(11, 10, 28, 0.55); }
.car-btn:hover { color: var(--ink); border-color: var(--ink-2); background: var(--sunk); }
.car-btn svg.i { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .stage .phone { transition: none; } }

/* ---------------------------------------------------------------- download cards (under the hero, in the modal, at the end) */
.get, .kit { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 560px; }
.make-kit { margin-top: 28px; padding-top: 0; border-top: 0; }
.get > .label, .kit > .label { font-size: 11.5px; color: var(--ink-3); margin-bottom: 9px; }
.field { display: flex; align-items: center; min-width: 0; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); overflow: hidden; }
.field code { flex: 1 1 auto; min-width: 0; padding: 0 10px; font-size: 11.5px; letter-spacing: -0.015em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; }
.field button { flex: none; align-self: stretch; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-left: 1px solid var(--line-2); background: var(--sunk); cursor: pointer; font-size: 13px; color: var(--ink-2); }
.field button:hover { color: var(--ink); background: var(--raised); }
.field svg.i { width: 15px; height: 15px; }
.field button[data-copied] { color: var(--lime); }
.get-links { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--ink-3); }
.get-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.get-links a:hover { color: var(--ink); text-decoration-color: var(--sun); }
.get-links svg.i { width: 15px; height: 15px; color: var(--sun); }
.get-note { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }
.get-note a { color: var(--ink-2); }

/* ---------------------------------------------------------------- sections */
.sec { padding-block: clamp(64px, 8vw, 104px); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 820px; margin-bottom: clamp(28px, 3.6vw, 44px); }
.sec-head h2 { font-size: clamp(34px, 4.2vw, 56px); font-stretch: 110%; font-weight: 840; }
.sec-head h2 em { font-style: normal; color: var(--sun); }
.lead { margin-top: 16px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 40em; }

/* ---------------------------------------------------------------- 01 the method */
.method { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.give, .runs { border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); padding: 20px; }
.runs { display: flex; flex-direction: column; }
.runs .stages { flex: 1 1 auto; grid-auto-rows: 1fr; }
.box-k { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.give ol { display: grid; gap: 14px; }
.give li { padding-top: 12px; border-top: 1px solid var(--line); }
.give li:first-child { padding-top: 0; border-top: 0; }
.give b { display: block; font-size: 16.5px; }
.give span { display: block; margin-top: 2px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: st; }
.stg { position: relative; padding: 14px 14px 16px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); }
.stg-t { display: flex; align-items: center; gap: 10px; }
.stg-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; background: var(--raised); color: var(--ink); }
.stg h3 { font-size: 17px; font-stretch: 108%; }
.stg p { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.stg.chk { background: var(--sun-soft); border-color: rgba(255, 203, 61, 0.45); }
.stg.chk .stg-n { background: var(--sun); color: #1a1405; }
.stg .tag { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sun); }
.stg:not(:nth-child(4n))::after {
  content: ""; position: absolute; right: -9px; top: 22px; width: 8px; height: 12px; z-index: 1;
  background: var(--ink-3); clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.runs-k-note { font-size: 13px; color: var(--ink-3); }
.get-line { margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: 16px; color: var(--ink-2); }
.get-line b { color: var(--ink); }
.get-line .label { flex: none; color: var(--sun); }

/* ---------------------------------------------------------------- 02 examples */
.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.legend li { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.legend .build { margin-bottom: 6px; }
.build { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.build::before { content: ""; width: 10px; height: 10px; flex: none; }
.build.chain::before { border-radius: 2px; background: linear-gradient(90deg, var(--ink-2) 0 40%, transparent 40% 60%, var(--ink-2) 60%); height: 6px; width: 14px; }
.build.script::before { border: 2px solid var(--ink-2); border-radius: 2px; width: 10px; height: 10px; }
.build.gen::before { border-radius: 50%; background: var(--ink-2); }
.index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.index a {
  display: block; padding: 14px 16px 16px; border-radius: 12px; text-decoration: none;
  border: 1px solid var(--line); border-top: 3px solid var(--c); background: var(--paper);
}
.index a:hover { border-color: var(--line-2); border-top-color: var(--c); background: var(--sunk); }
.index b { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 18px; font-stretch: 108%; }
.index b span { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-3); }
.index small { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.c-puzzle { --c: var(--cyan); }
.c-satisfying { --c: var(--pink); }
.c-growth { --c: var(--lime); }
.c-skill { --c: var(--orange); }

.cat { padding-block: clamp(48px, 6vw, 72px) 0; }
.cat:last-of-type { padding-bottom: clamp(64px, 8vw, 104px); }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding-bottom: 16px; margin-bottom: 22px; border-bottom: 2px solid var(--c); }
.cat-head h2 { font-size: clamp(28px, 3.2vw, 40px); font-stretch: 110%; color: var(--ink); }
.cat-head p { font-size: 16.5px; color: var(--ink-2); }
.cat-head .cat-n { margin-left: auto; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c); }
.spots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; }
.spot {
  display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0;
  padding: 12px 12px 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line);
  margin-bottom: 18px;
}
.spot > * { min-width: 0; }
.spot .phone { margin-bottom: 14px; }
.spot h3 { font-size: 22px; font-stretch: 110%; display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.spot h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.spot .row { padding: 10px 4px 0; }
.spot .row + .row { margin-top: 10px; border-top: 1px solid var(--line); }
.spot .mech { padding: 4px 4px 0; font-size: 15px; color: var(--ink-2); }
.spot .mech b { color: var(--ink); font-weight: 650; }
.spot dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.spot dd { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.spot .fun dd { color: var(--ink); font-size: 15.5px; }
.spot .built dd .build { display: flex; margin-bottom: 4px; }
.spot .rule dd { color: var(--ink); }
.spot .rule dd::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; vertical-align: 0.12em; background: var(--sun); transform: rotate(45deg); }

/* ---------------------------------------------------------------- 03 want to play */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.rl {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; margin-bottom: 18px;
  border-radius: 16px; background: var(--paper); border: 1px solid var(--line); overflow: hidden;
}
.rl-fig { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; aspect-ratio: 4 / 5; overflow: hidden; }
.rl-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.rl-fig:hover img { transform: scale(1.03); }
.rl-src { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(8, 8, 20, 0.78); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: #fff; }
.rl-src svg.i { width: 12px; height: 12px; }
.rl-src b { font-weight: 500; }
.rl h3 { padding: 16px 18px 0; font-size: 21px; font-stretch: 108%; display: flex; gap: 12px; align-items: baseline; }
.rl h3 span { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--sun); }
.rl p { padding: 8px 18px 18px; font-size: 15.5px; color: var(--ink-2); }

/* ---------------------------------------------------------------- 04 make yours */
.make-cta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.made { margin-top: 26px; font-size: 14.5px; line-height: 1.7; color: var(--ink-3); max-width: 70em; }
.made .m { font-size: 12px; }
#make { border-bottom: 0; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding-block: 24px 40px; }
.foot-title { font-size: 14px; color: var(--ink-3); }

/* ---------------------------------------------------------------- modals */
.how, .vm { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.how-backdrop, .vm-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 14, 0.88); }
.how-dialog, .vm-dialog {
  position: relative; width: min(1100px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 18px; padding: clamp(18px, 2.4vw, 28px);
}
.how-head, .vm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.how-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-stretch: 112%; }
.x {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--sunk); color: var(--ink);
  cursor: pointer; display: grid; place-items: center;
}
.x:hover { border-color: var(--ink-2); background: var(--raised); }
.x svg.i { width: 20px; height: 20px; }
.how-lead { font-size: 16.5px; color: var(--ink-2); max-width: 46em; }
.story { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.story li { counter-increment: s; padding: 14px 16px 16px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.story li b { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.story li b::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.story li.hot { background: var(--sun-soft); border-color: rgba(255, 203, 61, 0.4); }
.story li.hot b::before { background: var(--sun); color: #1a1405; }
.story li code { font-family: var(--mono); font-size: 0.9em; color: var(--ink); }
.how-sub { margin: 26px 0 12px; font-size: 19px; font-stretch: 110%; }

/* the guide, read in the page */
.pr-dialog { width: min(920px, 100%); }
.pr .how-head { position: sticky; top: calc(-1 * clamp(18px, 2.4vw, 28px)); z-index: 1; margin: calc(-1 * clamp(18px, 2.4vw, 28px)) calc(-1 * clamp(18px, 2.4vw, 28px)) 16px; padding: clamp(14px, 2vw, 20px) clamp(18px, 2.4vw, 28px); background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pr .how-head h2 { display: flex; align-items: baseline; gap: 12px; }
.pr-n { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-stretch: 100%; }
.pr-act { display: flex; align-items: center; gap: 12px; }
.pr-pages { display: grid; gap: 18px; }
.pr-pages figure { margin: 0; display: grid; gap: 8px; justify-items: center; }
.pr-pages img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line-2); }
.pr-pages figcaption { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.mtable { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.mtable div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.mtable .m { flex: none; }
.mnote { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }

.vm-dialog { width: min(980px, 100%); }
.vm-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: start; }
.vm-player { width: min(calc((100vh - 120px) * 9 / 16), 460px); width: min(calc((100dvh - 120px) * 9 / 16), 460px); }
.vm-player .phone-screen { box-shadow: 0 0 0 1px rgba(246, 244, 255, 0.2); }
.vm-player video { background: #000; }
.vm-info { padding-top: 6px; }
.vm-info .cat-k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c, var(--ink-3)); }
.vm-info h2 { margin-top: 8px; font-size: clamp(28px, 3vw, 40px); font-stretch: 112%; }
.vm-info .vm-mech { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.vm-info .vm-fun { margin-top: 14px; font-size: 18px; line-height: 1.5; color: var(--ink); }
.vm-info .vm-build { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.vm-info .vm-build .build { display: flex; margin-bottom: 4px; }
.vm-nav { margin-top: 22px; display: flex; align-items: center; gap: 10px; }
.vm-nav .count { font-family: var(--mono); font-size: 13px; color: var(--ink-3); min-width: 6ch; text-align: center; font-variant-numeric: tabular-nums; }
.vm-step { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--sunk); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.vm-step:hover { border-color: var(--ink-2); background: var(--raised); }
.vm-step svg.i { width: 20px; height: 20px; }
.vm-hint { margin-top: 12px; font-size: 13px; color: var(--ink-3); }

/* the film: how to make one, 3:14 (16:9, sized to fit the screen height) */
.fm-dialog { width: min(1240px, 100%, calc((100vh - 150px) * 16 / 9 + 56px)); width: min(1240px, 100%, calc((100dvh - 150px) * 16 / 9 + 56px)); }
.fm-title { font-size: clamp(20px, 2.2vw, 26px); font-stretch: 112%; }
.fm-len { margin-left: 6px; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-3); vertical-align: 0.2em; }
.fm-player { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line); }
.fm-player video { display: block; width: 100%; height: 100%; background: #000; }

/* ---------------------------------------------------------------- 02 the Scenario MCP */
#mcp-title em { display: block; }
.mcp-k { margin-bottom: 12px; }
.lanes-note + .mcp-k, .picks + .mcp-k { margin-top: clamp(36px, 4.4vw, 56px); }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ln { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line-2); }
.ln.au { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px; }
.ln-fig { position: relative; aspect-ratio: 9 / 16; border-radius: 9px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-2); align-self: start; }
.ln-fig img, .ln-fig video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ln-split .ln-after { clip-path: inset(0 0 0 50%); }
.ln-split::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; background: var(--sun); }
.ln-tx { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.ln-m { display: flex; flex-wrap: wrap; gap: 6px; }
.ln-m .m { font-size: 13px; white-space: normal; }
.ln-u { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.ln-wave { display: block; width: 100%; height: 52px; align-self: end; fill: var(--sun); }
.lanes-note { margin-top: 14px; font-size: 14.5px; line-height: 1.8; color: var(--ink-3); }
.lanes-note .m { font-size: 12px; white-space: normal; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pk { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line-2); min-width: 0; }
.pk-t { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; font-stretch: 108%; }
.pk-t .stg-n { background: var(--sun); color: #1a1405; }
.pk-d { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.pk-call { align-self: flex-start; max-width: 100%; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); background: var(--sunk); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; }
.pk-call code { color: var(--sun-ink); margin-right: 4px; }
.pk-rk { display: grid; gap: 7px; margin-top: auto; padding-top: 4px; }
.pk-rk li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; font-weight: 650; color: var(--ink-3); }
.pk-rk li.win { color: var(--ink); }
.pk-rk i { flex: none; font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); color: var(--ink-3); }
.pk-rk li.win i { background: var(--sun); border-color: var(--sun); color: #1a1405; }
.managed { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 12px; }
.mg-count, .mg-trace { padding: 20px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line-2); min-width: 0; }
.mg-n { display: flex; align-items: baseline; gap: 8px; font-size: 20px; font-weight: 700; color: var(--ink-2); }
.mg-n b { font-size: 56px; font-weight: 850; font-stretch: 110%; line-height: 1; color: var(--ink); }
.mg-s { margin-top: 4px; font-size: 14.5px; color: var(--ink-3); }
.mg-list { margin-top: 14px; display: grid; }
.mg-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.mg-list b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.mg-d { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); max-width: 46em; }
.trace { margin-top: 20px; max-width: 660px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.trace li { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trace img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); margin-bottom: 7px; }
.trace b { font-size: 15px; }
.trace span { font-family: var(--mono); font-size: 11.5px; line-height: 1.35; color: var(--sun-ink); }
.trace li + li::before { content: ""; position: absolute; left: -23px; top: calc((100% - 52px) / 2); width: 12px; height: 12px; border-top: 2px solid var(--ink-3); border-right: 2px solid var(--ink-3); transform: rotate(45deg); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .spots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stg:not(:nth-child(4n))::after { display: none; }
  .stg:nth-child(odd)::after { display: block; }
}
@media (max-width: 1020px) {
  .bar-title { display: none; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-copy { max-width: 680px; }
  .stage-wrap { max-width: 620px; margin: 0 auto; }
  .method { grid-template-columns: 1fr; }
  .give ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .give li { padding-top: 0; border-top: 0; }
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .managed { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .spots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .spot { margin-bottom: 12px; }
  .legend { grid-template-columns: 1fr; }
  .vm-body { grid-template-columns: 1fr; justify-items: center; }
  .vm-player { width: min(100%, calc((100dvh - 230px) * 9 / 16), 420px); }
  .vm-info { width: 100%; }
  .picks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .bar-home .bar-sec, .bar-home .bar-slash { display: none; }
  .bar-action span { display: none; }
  .bar-action { padding: 0 9px; }
  .bar-make span { display: inline; }
  .give ol { grid-template-columns: 1fr; }
  .give li { padding-top: 12px; border-top: 1px solid var(--line); }
  .give li:first-child { padding-top: 0; border-top: 0; }
  .mtable { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .stage .ph-btn { width: 30px; height: 30px; }
  .stage .phone:not(.mid) .ph-ctl { left: 4px; right: 4px; bottom: 4px; }
}
@media (max-width: 600px) {
  .spots { grid-template-columns: 1fr; }
  .spot { grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: none; grid-row: auto; column-gap: 14px; padding: 12px; }
  .spot .phone { grid-row: 1 / span 3; grid-column: 1; margin-bottom: 0; }
  .spot h3 { grid-column: 2; font-size: 20px; padding: 2px 0 0; align-self: start; }
  .spot .mech { grid-column: 2; padding: 6px 0 0; align-self: start; }
  .spot .fun { grid-column: 2; padding: 10px 0 0; align-self: start; }
  .spot .built, .spot .rule { grid-column: 1 / -1; }
  .spot .fun.row { margin-top: 0; border-top: 0; }
  .spot .built.row { margin-top: 14px; }
  .spot .row { padding-left: 0; padding-right: 0; }
  .spot .ph-btn { width: 30px; height: 30px; }
  .spot .ph-ctl { left: 4px; right: 4px; bottom: 4px; gap: 4px; }
  .spot .ph-btn svg.i { width: 14px; height: 14px; }
  .rules { grid-template-columns: 1fr; }
  .rl { grid-template-columns: 116px minmax(0, 1fr); grid-template-rows: none; grid-row: auto; margin-bottom: 12px; }
  .rl-fig { grid-row: 1 / span 2; aspect-ratio: auto; height: 100%; min-height: 145px; }
  .rl-src { left: 5px; bottom: 5px; padding: 4px 7px; border-radius: 6px; font-size: 10px; line-height: 1.3; letter-spacing: 0; flex-direction: column; align-items: flex-start; gap: 0; white-space: nowrap; }
  .rl-src svg.i, .rl-c { display: none; }
  .rl h3 { padding: 12px 14px 0; font-size: 18px; gap: 8px; }
  .rl p { padding: 6px 14px 14px; font-size: 14.5px; }
  .index { grid-template-columns: 1fr 1fr; gap: 8px; }
  .index a { padding: 12px; }
  .index small { display: none; }
  .index b { font-size: 16px; flex-direction: column; gap: 2px; }
  .stages { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .runs .stages { grid-auto-rows: auto; }
  .stg { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; padding: 12px 14px; }
  .stg-t { display: contents; }
  .stg-n { grid-row: 1 / span 2; }
  .stg h3 { grid-column: 2; display: flex; align-items: center; min-height: 28px; }
  .stg .tag { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
  .stg p { grid-column: 2; margin-top: 2px; }
  .stg::after, .stg:nth-child(odd)::after { display: none !important; }
  .runs .box-k { flex-direction: column; align-items: flex-start; gap: 2px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .cat-head .cat-n { margin-left: 0; }
  .get-line { flex-direction: column; align-items: flex-start; gap: 4px; }
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .ln { grid-template-columns: 84px minmax(0, 1fr); }
  .ln.au { grid-template-columns: minmax(0, 1fr); }
  .trace { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 30px; max-width: 360px; }
  .trace li:nth-child(3)::before { display: none; }
  .mg-count, .mg-trace, .pk { padding: 16px; }
}
@media (max-width: 400px) {
  .spot { grid-template-columns: 112px minmax(0, 1fr); }
}
/* below 440 px the full-size logo and the bar actions overlap */
@media (max-width: 440px) {
  .bar-home img { width: 84px; }
  .bar-action { padding: 0 7px; }
  .bar-make { padding: 0 10px; font-size: 14px; }
}

/* the full logo needs about 386 px of bar */
@media (max-width: 385px) {
  .bar-home img { width: 27px; height: 24px; object-fit: cover; object-position: left center; }
}
@media (max-width: 360px) {
  .bar { gap: 8px; }
  .bar-action { padding: 0 6px; }
  .bar-make { margin-left: 2px; padding: 0 9px; }
}

/* landscape phones: the cards take the phone row layout and the rule frames stay three a row, so each fits the short screen */
@media (max-height: 500px) and (min-width: 601px) {
  .rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .spot { grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: none; grid-row: auto; column-gap: 14px; padding: 12px; margin-bottom: 12px; align-content: start; }
  .spot .phone { grid-row: 1 / span 3; grid-column: 1; margin-bottom: 0; }
  .spot h3 { grid-column: 2; font-size: 20px; padding: 2px 0 0; align-self: start; }
  .spot .mech { grid-column: 2; padding: 6px 0 0; align-self: start; }
  .spot .fun { grid-column: 2; padding: 10px 0 0; align-self: start; }
  .spot .built, .spot .rule { grid-column: 1 / -1; }
  .spot .fun.row { margin-top: 0; border-top: 0; }
  .spot .built.row { margin-top: 14px; }
  .spot .row { padding-left: 0; padding-right: 0; }
  .spot .ph-btn { width: 30px; height: 30px; }
  .spot .ph-ctl { left: 4px; right: 4px; bottom: 4px; gap: 4px; }
  .spot .ph-btn svg.i { width: 14px; height: 14px; }
  .vm-body { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; }
  .vm-player { width: min(calc((100vh - 140px) * 9 / 16), 420px); width: min(calc((100dvh - 140px) * 9 / 16), 420px); }
  .vm-info { width: auto; padding-top: 0; }
  .vm-head { margin-bottom: 10px; }
  .vm-info h2 { margin-top: 4px; font-size: 24px; }
  .vm-info .vm-mech, .vm-info .vm-fun { margin-top: 6px; font-size: 15px; }
  .vm-info .vm-build { margin-top: 10px; padding-top: 10px; font-size: 13.5px; }
  .vm-nav { margin-top: 12px; }
}
/* full screen: show the whole portrait ad on black, never crop it to the screen */
video:fullscreen { object-fit: contain !important; background: #000; border-radius: 0 !important; width: 100% !important; height: 100% !important; }
video:-webkit-full-screen { object-fit: contain !important; background: #000; border-radius: 0 !important; width: 100% !important; height: 100% !important; }


@media (max-width: 640px) {
  .get { margin-top: 24px; padding-top: 18px; }
  .field { height: auto; min-height: 44px; }
  .field code { white-space: normal; overflow-wrap: anywhere; padding-block: 9px; }
}

/* the hero fills the first screen exactly: the next section starts below the fold */
@media (min-width: 1021px) and (min-height: 600px) {
  .hero { min-height: calc(100svh - 60px); display: flex; align-items: center; }
  .hero-in { width: 100%; }
  .stage-wrap { max-width: min(680px, calc((100svh - 200px) / 0.8)); margin-inline: auto; }
}
