/* ════════════════════════════════════════════════════════════════════════
   Pachinko deck - base layer.
   Reuses tokens.css + materials.css (mirrored verbatim from apps/web).
   Type registers + font vars are replicated from the app's globals.css so the
   real .font-logo / .font-display / .glass-pill / .mat-panel rules resolve.
   Theme attribute values match the app: data-theme="dark" (Vault, default) /
   data-theme="light" (Crystal).
   ════════════════════════════════════════════════════════════════════════ */

@font-face{
  font-family:"Eitai";
  src:url("assets/Eitai-Bold.ttf") format("truetype");
  font-weight:700; font-style:normal; font-display:swap;
}

:root{
  --font-logo:"Eitai","Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP",sans-serif;
  --font-display:"Zen Kaku Gothic Antique","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;
  --font-voice:"Kode Mono",ui-monospace,monospace;
  --font-body:"Work Sans",system-ui,-apple-system,sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  background:var(--pk-canvas); /* hard fallback: no white flash before the wash paints */ }
body{
  margin:0; min-height:100vh; overflow-x:hidden;
  background:transparent;            /* the .pk-ground wash is the real canvas */
  color:var(--pk-text);
  font-family:var(--font-body); font-weight:400; line-height:1.55;
}
::selection{ background:color-mix(in srgb, var(--pk-accent) 30%, transparent); }
[hidden]{ display:none !important; }   /* author display rules must not defeat the hidden attribute */

/* ── Type registers (mirrored from app globals.css) ───────────────────────── */
.font-logo{ font-family:var(--font-logo); font-weight:700; line-height:1.02; letter-spacing:-.01em; }
.font-display{ font-family:var(--font-display); font-weight:900; line-height:1.05; }
.font-jp{ font-family:"Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP",var(--font-display),sans-serif; font-weight:800; }
.font-voice{ font-family:var(--font-voice); font-feature-settings:"tnum" 1; }
.font-body{ font-family:var(--font-body); }
.t-4xl{font-size:var(--pk-fs-4xl)} .t-3xl{font-size:var(--pk-fs-3xl)} .t-2xl{font-size:var(--pk-fs-2xl)}
.t-xl{font-size:var(--pk-fs-xl)} .t-lg{font-size:var(--pk-fs-lg)} .t-base{font-size:var(--pk-fs-base)}
.t-sm{font-size:var(--pk-fs-sm)} .t-xs{font-size:var(--pk-fs-xs)}
.t-label{ letter-spacing:.08em; text-transform:uppercase; }

/* ── EN→JA swap: also trigger on the swap itself / a .swap-host, since the app
   only triggers via .glass-pill / .nav__brand / .footer__link hovers. ─────── */
.swap-host:hover .swap__en,
.swap:hover .swap__en{ opacity:0; transform:translateY(-5px); }
.swap-host:hover .swap__ja,
.swap:hover .swap__ja{ opacity:1; transform:translateY(0); }

/* ── Ground: render the full stack (the app currently mounts wash only) ───── */
.pk-ground__key{ position:absolute; inset:0; }
.pk-ground__grain{ position:absolute; inset:0; }

/* ════════════════════════════════════════════════════════════════════════
   SCENE PRIMITIVES - the reusable vocabulary every scene draws on.
   ════════════════════════════════════════════════════════════════════════ */
.scene{ position:relative; z-index:1; min-height:100vh; min-height:100svh;
  display:grid; place-items:center; padding:clamp(28px,7vh,96px) var(--pk-gutter); }
.scene--pin{ overflow:hidden; }            /* pinned scrub scenes clip their stage */
.scene__inner{ width:100%; max-width:1120px; margin:0 auto; }
.stack{ display:flex; flex-direction:column; }
.t-center{ text-align:center; }
.measure{ max-width:46ch; }

/* Eyebrow - the パチンコ · LABEL line (Kode Mono, tracked, uppercase) */
.eyebrow{ font-family:var(--font-voice); font-size:var(--pk-fs-xs); font-weight:500;
  letter-spacing:.18em; text-transform:uppercase; color:var(--pk-text-muted);
  display:inline-flex; align-items:center; gap:.6em; }
.eyebrow .kana{ color:var(--pk-accent); letter-spacing:.12em;
  font-family:"Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP",var(--font-voice); }

/* Headline - Zen Kaku 900 display */
.headline{ font-family:var(--font-display); font-weight:900; color:var(--pk-text);
  font-size:clamp(34px,6vw,68px); line-height:1.04; letter-spacing:-.01em; }
.headline .accent{ color:var(--pk-accent); }
.headline .coin{ color:var(--pk-coin); }

/* Sub / body */
.sub{ font-family:var(--font-body); font-weight:400; color:var(--pk-text-muted);
  font-size:clamp(16px,1.6vw,21px); line-height:1.5; }
.lead{ font-family:var(--font-body); color:var(--pk-text);
  font-size:clamp(18px,2vw,26px); line-height:1.45; }

/* Reveal hook (the JS reveal helper animates these; class is a semantic marker) */
.reveal{ will-change:transform,opacity; }

/* GachaGlyph - the capsule mark (seam + clasp). Inline SVG, inherits color.
   Snippet to paste:
   <span class="gacha-glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
     stroke-width="1.6"><rect x="5" y="3" width="14" height="18" rx="7"/>
     <path d="M5 12h14"/><circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none"/></svg></span> */
.gacha-glyph{ display:inline-block; width:1em; height:1em; vertical-align:-.12em; color:inherit; }
.gacha-glyph svg{ display:block; width:100%; height:100%; }

/* ── Pinned chrome (expanded in Task 3) ───────────────────────────────────── */
.chrome{ position:fixed; inset:0 0 auto 0; height:var(--pk-nav-h);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 var(--pk-gutter); z-index:50; pointer-events:none; }
.chrome > *{ pointer-events:auto; }
.chrome__logo{ font-size:var(--pk-fs-lg); color:var(--pk-text); text-decoration:none; }
.chrome__right{ display:flex; gap:8px; align-items:center; }
.chip{ font-family:var(--font-voice); font-size:var(--pk-fs-xs); color:var(--pk-text-muted);
  background:var(--pk-mat-chip-bg); border:1px solid var(--pk-mat-chip-edge);
  border-radius:var(--pk-radius-chip); padding:6px 10px; cursor:pointer;
  transition:color var(--pk-dur-fast) var(--pk-ease-out-quint),
    border-color var(--pk-dur-fast) var(--pk-ease-out-quint); }
.chip:hover{ color:var(--pk-text); border-color:color-mix(in srgb,var(--pk-accent) 50%,var(--pk-mat-chip-edge)); }

/* ── Progress rail + pachinko ball (wired in Task 3) ──────────────────────── */
.rail{ position:fixed; top:var(--pk-nav-h); bottom:18px; right:16px; width:3px; z-index:40;
  background:linear-gradient(var(--pk-mat-chip-edge),color-mix(in srgb,var(--pk-mat-chip-edge) 30%,transparent));
  border-radius:999px; pointer-events:none; }
.rail__ball{ position:absolute; left:50%; top:0; width:14px; height:14px; margin-left:-7px;
  border-radius:50%;
  background:radial-gradient(circle at 32% 28%, #fff 0%, #FFE9A8 22%, var(--pk-coin) 60%, #B07A00 100%);
  box-shadow:inset 0 -1px 2px rgba(0,0,0,.35), 0 0 10px color-mix(in srgb,var(--pk-coin) 60%,transparent); }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 1 · Cover / The drop
   ════════════════════════════════════════════════════════════════════════ */
.scene--hero{ overflow:hidden; }
.hero{ display:grid; justify-items:center; text-align:center; gap:clamp(14px,2.4vh,28px); }
.hero__stage{ position:relative; width:min(440px,84vw); height:clamp(220px,33vh,360px);
  display:grid; place-items:center; perspective:900px; }
.hero__pack{ position:absolute; width:clamp(116px,15vw,158px); aspect-ratio:1086/1448;
  border-radius:14px; filter:drop-shadow(0 26px 44px rgba(0,0,0,.55)); }
.hero__pack--c{ z-index:3; transform:translateY(-14px); }
.hero__pack--l{ z-index:2; transform:translate(-86px,16px) rotate(-13deg); }
.hero__pack--r{ z-index:2; transform:translate(86px,16px) rotate(13deg); }
.hero__mascot{ position:absolute; z-index:4; width:clamp(104px,13vw,138px); aspect-ratio:754/828;
  bottom:-2px; filter:drop-shadow(0 20px 30px rgba(0,0,0,.55)); }
.hero__title{ margin:0; }
.hero__cta{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:6px; }
.hero__scroll{ position:absolute; bottom:22px; left:50%; transform:translateX(-50%);
  font-family:var(--font-voice); font-size:11px; letter-spacing:.24em; text-transform:uppercase;
  color:var(--pk-text-muted); }
.hero__scroll::after{ content:""; display:block; width:1px; height:28px; margin:9px auto 0;
  background:linear-gradient(var(--pk-text-muted),transparent); }
@media (prefers-reduced-motion: no-preference){
  .hero__mascot{ animation:hero-bob 5.5s var(--pk-ease-out-quint) infinite alternate; }
  .hero__scroll::after{ animation:scroll-cue 1.8s var(--pk-ease-out-quint) infinite; transform-origin:top; }
}
@keyframes hero-bob{ from{ transform:translateY(0); } to{ transform:translateY(-12px); } }
@keyframes scroll-cue{ 0%{ transform:scaleY(0); opacity:0; } 40%{ opacity:1; } 100%{ transform:scaleY(1); opacity:0; } }

/* ════════════════════════════════════════════════════════════════════════
   GRADED SLAB - reusable stylized PSA-style holder (scenes 2, 3, 5, 7).
   --rar sets the rarity color. Abstract by design (no licensed card art).
   ════════════════════════════════════════════════════════════════════════ */
.slab{ position:relative; width:clamp(168px,20vw,224px); aspect-ratio:5/7;
  border-radius:16px; padding:9px;
  background:linear-gradient(155deg, rgba(255,255,255,.16), rgba(255,255,255,.03));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.08),
    0 34px 60px -22px rgba(0,0,0,.65);
  -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); }
.slab__inner{ position:relative; height:100%; border-radius:9px; overflow:hidden;
  display:grid; place-items:center;
  background:
    radial-gradient(120% 80% at 50% 6%, color-mix(in srgb,var(--rar,#AEB8D6) 55%, transparent), transparent 60%),
    linear-gradient(180deg, var(--pk-mat-panel-bg-2), var(--pk-mat-panel-bg)); }
.slab__strip{ position:absolute; top:0; left:0; right:0; padding:6px 9px;
  display:flex; align-items:center; gap:6px;
  font-family:var(--font-voice); font-size:9px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:#fff;
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--rar,#AEB8D6) 88%, #000),
    color-mix(in srgb,var(--rar,#AEB8D6) 58%, #000)); }
.slab__strip .cert{ margin-left:auto; opacity:.82; font-weight:400; }
.slab__glyph{ width:46%; color:var(--rar,#AEB8D6); opacity:.92;
  filter:drop-shadow(0 8px 18px color-mix(in srgb,var(--rar,#AEB8D6) 55%, transparent)); }
.slab__sheen{ position:absolute; inset:0; mix-blend-mode:screen; pointer-events:none;
  background:linear-gradient(120deg, transparent 42%, rgba(255,255,255,.20) 50%, transparent 58%); }
.slab__grade{ position:absolute; bottom:8px; right:10px;
  font-family:var(--font-voice); font-weight:700; font-size:12px; color:var(--pk-text); }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 2 · The rip (scroll-scrubbed, pinned)
   ════════════════════════════════════════════════════════════════════════ */
#rip .rip{ position:relative; width:100%; height:100vh; display:grid; place-items:center; }
.rip__spill{ position:absolute; top:42%; left:50%; width:min(520px,70vw); aspect-ratio:1;
  transform:translate(-50%,-50%); border-radius:50%; opacity:0;
  background:radial-gradient(circle, color-mix(in srgb,var(--pk-coin) 55%, transparent), transparent 62%);
  filter:blur(20px); pointer-events:none; }
.rip__pack{ position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:clamp(150px,18vw,200px); aspect-ratio:1086/1448; }
.rip__half{ position:absolute; left:0; width:100%; height:50%; overflow:hidden; }
.rip__half img{ position:absolute; left:0; width:100%; height:auto;
  filter:drop-shadow(0 24px 40px rgba(0,0,0,.5)); }
.rip__half--top{ top:0; } .rip__half--top img{ top:0; }
.rip__half--bottom{ bottom:0; } .rip__half--bottom img{ bottom:0; }
.rip__slab{ position:relative; z-index:1; }
.rip__copy{ position:absolute; left:0; right:0; bottom:clamp(48px,12vh,120px);
  text-align:center; padding:0 var(--pk-gutter); }
.rip__line{ font-size:clamp(26px,4vw,46px); margin-top:14px; }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 3 · What it is
   ════════════════════════════════════════════════════════════════════════ */
.wi{ display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);
  gap:clamp(28px,6vw,84px); align-items:center; }
.wi__slab{ display:grid; place-items:center; }
.wi__copy{ display:grid; gap:clamp(14px,2vh,22px); justify-items:start; }
.wi__title{ font-size:clamp(30px,4.6vw,56px); }
.wi__chips{ display:flex; gap:8px; flex-wrap:wrap; }
.wi__chips .mat-chip{ font-family:var(--font-voice); font-size:11px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--pk-text-muted); padding:6px 11px; }
@media (max-width:780px){ .wi{ grid-template-columns:1fr; text-align:center; }
  .wi__copy{ justify-items:center; } }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 4 · The machines (pinned horizontal skid)
   ════════════════════════════════════════════════════════════════════════ */
.machines{ position:relative; }
.mac{ min-height:100vh; display:flex; flex-direction:column; justify-content:center;
  gap:clamp(22px,4.5vh,52px); padding:clamp(86px,13vh,150px) 0; overflow:hidden; }
.mac__head{ padding:0 var(--pk-gutter); display:grid; gap:12px; }
.mac__title{ font-size:clamp(28px,4.4vw,52px); }
.track{ display:flex; gap:clamp(18px,2vw,30px); padding:6px var(--pk-gutter);
  align-items:stretch; will-change:transform; }
.machine{ flex:0 0 auto; width:clamp(258px,28vw,344px); height:clamp(380px,60vh,520px);
  position:relative; overflow:hidden; border-radius:var(--pk-radius-panel);
  background:var(--pk-mat-panel-bg);
  box-shadow:inset 0 1px 0 var(--pk-mat-panel-rimlight), 0 28px 60px -22px var(--pk-mat-panel-shadow);
  padding:24px 22px; display:grid; grid-template-rows:auto 1fr auto; }
.machine::before{ content:""; position:absolute; top:0; left:0; right:0; height:4px;
  background:var(--rar); }
.machine__bloom{ position:absolute; top:24%; left:50%; width:88%; aspect-ratio:1;
  transform:translate(-50%,-24%);
  background:radial-gradient(circle, color-mix(in srgb,var(--rar) 48%, transparent), transparent 62%);
  filter:blur(30px); pointer-events:none; }
.machine__head{ position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; }
.machine__name{ font-family:var(--font-display); font-weight:900; font-size:var(--pk-fs-xl); color:var(--pk-text); }
.machine__dot{ width:10px; height:10px; border-radius:50%; background:var(--rar);
  box-shadow:0 0 14px color-mix(in srgb,var(--rar) 80%, transparent); }
.machine__pack{ position:relative; z-index:1; align-self:center; width:58%; margin:0 auto;
  aspect-ratio:1086/1448; filter:drop-shadow(0 22px 38px rgba(0,0,0,.5)); }
.machine__foot{ position:relative; z-index:1; display:grid; gap:5px; justify-items:center; text-align:center; }
.machine__price{ font-family:var(--font-voice); font-weight:700; font-size:var(--pk-fs-2xl); color:var(--pk-text); }
.machine__band{ font-family:var(--font-voice); font-size:12px; color:var(--pk-text-muted); letter-spacing:.03em; }
@media (prefers-reduced-motion: reduce){
  .mac{ overflow:visible; min-height:auto; }
  .track{ flex-direction:column; align-items:center; }
  .machine{ width:min(344px,86vw); height:auto; min-height:360px; }
}

/* ════════════════════════════════════════════════════════════════════════
   SCENE 5 · The reveal (interactive playable pull)
   ════════════════════════════════════════════════════════════════════════ */
.rv{ display:grid; justify-items:center; gap:clamp(18px,2.6vh,32px); text-align:center; }
.rv__title{ font-size:clamp(28px,4vw,50px); }
.rv__stage{ position:relative; width:min(360px,82vw); height:clamp(300px,44vh,430px);
  display:grid; place-items:center; perspective:1200px; }
.reveal__glow{ position:absolute; top:50%; left:50%; width:84%; aspect-ratio:1; opacity:0;
  transform:translate(-50%,-50%); border-radius:50%; pointer-events:none;
  background:radial-gradient(circle, color-mix(in srgb,var(--rar,#F5B301) 60%, transparent), transparent 62%);
  filter:blur(26px); }
.flipper{ position:relative; width:clamp(200px,24vw,252px); aspect-ratio:5/7;
  transform-style:preserve-3d; }
.flipper__face{ position:absolute; inset:0; border-radius:16px;
  backface-visibility:hidden; -webkit-backface-visibility:hidden; }
.flipper__face--front{ transform:rotateY(180deg); }
.flipper__face--front .slab{ width:100%; height:100%; }
.flipper__face--back{ display:grid; place-items:center; align-content:center; gap:14px;
  background:linear-gradient(160deg, var(--pk-mat-panel-bg-2), var(--pk-mat-panel-bg));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08), 0 34px 60px -22px rgba(0,0,0,.6); }
.rv__capglyph{ width:58px; height:58px; color:var(--pk-coin); }
.rv__kana{ font-family:"Hiragino Kaku Gothic ProN","Hiragino Sans","Noto Sans JP",sans-serif;
  font-weight:800; letter-spacing:.22em; color:var(--pk-text-muted); font-size:14px; }
.reveal__caption{ min-height:1.3em; font-family:var(--font-display); font-weight:900;
  font-size:clamp(19px,2.5vw,28px); color:var(--rar,var(--pk-text));
  transition:color var(--pk-dur-base) var(--pk-ease-out-quint); }
.reveal__caption.is-big{ text-shadow:0 0 22px color-mix(in srgb,var(--pk-coin) 60%, transparent); }
.rv__controls{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 6 · After the pull
   ════════════════════════════════════════════════════════════════════════ */
.headline .hot{ color:var(--pk-hot); }
.after{ display:grid; justify-items:center; gap:clamp(26px,5vh,52px); text-align:center; }
.after__pillars{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(16px,2vw,26px); width:100%; }
.pillar{ position:relative; text-align:left; border-radius:var(--pk-radius-panel);
  background:var(--pk-mat-panel-bg); padding:clamp(22px,2.4vw,30px);
  box-shadow:inset 0 1px 0 var(--pk-mat-panel-rimlight), 0 22px 48px -22px var(--pk-mat-panel-shadow);
  display:grid; gap:12px; align-content:start;
  transition:transform var(--pk-dur-base) var(--pk-ease-out-quint),
    box-shadow var(--pk-dur-base) var(--pk-ease-out-quint); }
.pillar__icon{ width:36px; height:36px; color:var(--pa,var(--pk-accent)); }
.pillar__title{ font-family:var(--font-display); font-weight:900; font-size:var(--pk-fs-xl); color:var(--pk-text); }
.pillar__line{ font-family:var(--font-body); color:var(--pk-text-muted); font-size:var(--pk-fs-base); line-height:1.5; }
.pillar__line b{ color:var(--pa,var(--pk-accent)); font-weight:600; }
@media (prefers-reduced-motion: no-preference){
  .pillar:hover{ transform:translateY(-6px);
    box-shadow:inset 0 1px 0 var(--pk-mat-panel-rimlight), 0 30px 60px -22px var(--pk-mat-panel-shadow); }
}
@media (max-width:820px){ .after__pillars{ grid-template-columns:1fr; } }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 7 · Why it matters (quiet, slow parallax)
   ════════════════════════════════════════════════════════════════════════ */
.why{ display:grid; grid-template-columns:1.08fr .92fr; gap:clamp(30px,6vw,92px); align-items:center; }
.why__copy{ display:grid; gap:clamp(16px,2.6vh,30px); justify-items:start; }
.why__title{ font-size:clamp(32px,5vw,60px); max-width:15ch; }
.why__body{ max-width:42ch; }
.why__slab{ display:grid; place-items:center; will-change:transform; }
.why__slab .slab{ width:clamp(220px,26vw,300px); }
@media (max-width:820px){ .why{ grid-template-columns:1fr; text-align:center; }
  .why__copy{ justify-items:center; } }

/* ── Relight flash: a warm bloom that covers the instant theme swap ──────── */
.relight{ position:fixed; inset:0; z-index:60; pointer-events:none; opacity:0;
  background:radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--pk-coin) 72%, #fff), transparent 76%); }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 8 · The craft (interactive theme flip)
   ════════════════════════════════════════════════════════════════════════ */
.craft{ display:grid; justify-items:center; gap:clamp(22px,4vh,42px); text-align:center; }
.craft__title{ font-size:clamp(30px,4.6vw,56px); }
.flip-cta{ display:inline-flex; align-items:center; gap:13px; padding:15px 30px;
  border-radius:var(--pk-radius-pill); cursor:pointer;
  font-family:var(--font-display); font-weight:900; font-size:clamp(17px,1.9vw,23px);
  color:var(--pk-text); background:var(--pk-mat-panel-bg);
  border:1px solid var(--pk-mat-chip-edge);
  box-shadow:inset 0 1px 0 var(--pk-mat-panel-rimlight), 0 16px 36px -18px var(--pk-mat-panel-shadow);
  transition:transform var(--pk-dur-fast) var(--pk-ease-out-quint),
    border-color var(--pk-dur-fast) var(--pk-ease-out-quint),
    box-shadow var(--pk-dur-fast) var(--pk-ease-out-quint); }
.flip-cta:hover{ transform:translateY(-2px);
  border-color:color-mix(in srgb,var(--pk-accent) 55%,var(--pk-mat-chip-edge));
  box-shadow:inset 0 1px 0 var(--pk-mat-panel-rimlight), 0 22px 44px -18px var(--pk-mat-panel-shadow); }
.flip-cta__icons{ display:inline-flex; gap:7px; color:var(--pk-coin); }
.flip-cta__icons svg{ width:20px; height:20px; }
.craft__sub{ max-width:40ch; }
.craft__chips{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.craft__chips .mat-chip{ font-family:var(--font-voice); font-size:11px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--pk-text-muted); padding:7px 13px; }

/* ── Rail cup - the pachinko ball settles here at the end ────────────────── */
.rail__cup{ position:absolute; left:50%; bottom:-3px; width:22px; height:12px; margin-left:-11px;
  border:2px solid var(--pk-text-muted); border-top:none; border-radius:0 0 11px 11px; opacity:.55; }

/* ════════════════════════════════════════════════════════════════════════
   SCENE 9 · The invitation
   ════════════════════════════════════════════════════════════════════════ */
.invite{ display:grid; justify-items:center; gap:clamp(20px,3.6vh,40px); text-align:center; }
.invite__lockup{ font-size:clamp(52px,12vw,150px); line-height:.94; color:var(--pk-text); }
.invite__line{ font-family:var(--font-display); font-weight:900; color:var(--pk-text);
  font-size:clamp(23px,3.2vw,38px); line-height:1.1; max-width:18ch; }
.invite__links{ display:flex; gap:12px; flex-wrap:wrap; justify-content:center; align-items:center; margin-top:6px; }
.invite__links a{ text-decoration:none; }

@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

/* ════════════════════════════════════════════════════════════════════════
   SCENE · Confidence (interactive nerve dial)
   A segmented Safe→Luckiest control drives a "reach" ladder: higher nerve
   widens the band and drops the floor (faithful to lib/confidence.ts intent,
   shown as feel, never as raw RTP numbers).
   ════════════════════════════════════════════════════════════════════════ */
.conf{ display:grid; gap:clamp(22px,4vh,42px); justify-items:center; text-align:center; }
.conf__head{ display:grid; gap:13px; justify-items:center; }
.conf__title{ font-size:clamp(30px,4.6vw,56px); }
.conf__sub{ max-width:48ch; }
.conf__panel{ width:min(720px,100%); display:grid; gap:clamp(18px,3vh,28px);
  border-radius:var(--pk-radius-panel); background:var(--pk-mat-panel-bg);
  box-shadow:inset 0 1px 0 var(--pk-mat-panel-rimlight), 0 28px 60px -22px var(--pk-mat-panel-shadow);
  padding:clamp(20px,3vw,34px); }
.conf__stops{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.conf__stop{ font-family:var(--font-voice); font-size:var(--pk-fs-xs); letter-spacing:.04em;
  color:var(--pk-text-muted); background:var(--pk-mat-chip-bg); border:1px solid var(--pk-mat-chip-edge);
  border-radius:var(--pk-radius-pill); padding:9px 16px; cursor:pointer;
  transition:color var(--pk-dur-fast) var(--pk-ease-out-quint),
    border-color var(--pk-dur-fast) var(--pk-ease-out-quint),
    background var(--pk-dur-fast) var(--pk-ease-out-quint); }
.conf__stop:hover{ color:var(--pk-text); }
.conf__stop.is-on{ color:var(--pk-text);
  border-color:color-mix(in srgb,var(--pk-accent) 60%,var(--pk-mat-chip-edge));
  background:color-mix(in srgb,var(--pk-accent) 16%, var(--pk-mat-chip-bg)); }
.conf__stop--lga.is-on{ border-color:color-mix(in srgb,var(--pk-coin) 70%,var(--pk-mat-chip-edge));
  background:color-mix(in srgb,var(--pk-coin) 18%, var(--pk-mat-chip-bg));
  box-shadow:0 0 22px -4px color-mix(in srgb,var(--pk-coin) 55%, transparent); }
.conf__body{ display:grid; grid-template-columns:auto 1fr; gap:clamp(18px,3vw,34px); align-items:center; }
.reach{ position:relative; width:104px; height:clamp(190px,30vh,250px);
  border-radius:14px; overflow:hidden; flex:0 0 auto;
  background:linear-gradient(180deg, var(--pk-mat-panel-bg-2), var(--pk-mat-panel-bg));
  box-shadow:inset 0 0 0 1px var(--pk-mat-chip-edge);
  display:grid; grid-template-rows:repeat(5,1fr); }
.reach__rung{ position:relative; z-index:1; font-family:var(--font-voice); font-size:9px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--pk-text-muted);
  display:flex; align-items:center; justify-content:center;
  border-bottom:1px solid color-mix(in srgb,var(--pk-mat-chip-edge) 60%, transparent); }
.reach__rung--grail{ color:var(--pk-coin); }
.reach__rung--dust{ border-bottom:none; }
.reach__band{ position:absolute; left:0; right:0; z-index:0;
  top:var(--reach-top,42%); height:var(--reach-h,20%);
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--reach-col,var(--pk-accent)) 58%, transparent),
    color-mix(in srgb,var(--reach-col,var(--pk-accent)) 16%, transparent));
  border-top:2px solid var(--reach-col,var(--pk-accent));
  box-shadow:0 0 26px -2px color-mix(in srgb,var(--reach-col,var(--pk-accent)) 55%, transparent);
  transition:top var(--pk-dur-slow) var(--pk-ease-out-expo),
    height var(--pk-dur-slow) var(--pk-ease-out-expo),
    border-color var(--pk-dur-slow) var(--pk-ease-out-quint); }
.conf__read{ display:grid; gap:9px; justify-items:start; text-align:left; }
.conf__readlabel{ font-size:9px; letter-spacing:.18em; text-transform:uppercase; color:var(--pk-text-muted); }
.conf__blurb{ font-family:var(--font-voice); font-size:clamp(15px,1.8vw,19px); color:var(--pk-text);
  line-height:1.4; min-height:2.6em; }
@media (max-width:620px){ .conf__body{ grid-template-columns:1fr; justify-items:center; }
  .conf__read{ justify-items:center; text-align:center; } .reach{ width:min(280px,80%); } }

/* ════════════════════════════════════════════════════════════════════════
   SCENE · Case Battles (head to head)
   ════════════════════════════════════════════════════════════════════════ */
.duel{ display:grid; gap:clamp(24px,4.5vh,46px); justify-items:center; text-align:center; }
.duel__head{ display:grid; gap:12px; justify-items:center; }
.duel__title{ font-size:clamp(28px,4.4vw,52px); }
.duel__ring{ display:grid; grid-template-columns:1fr auto 1fr; gap:clamp(12px,2.4vw,30px);
  align-items:center; width:min(820px,100%); }
.duel__side{ position:relative; border-radius:var(--pk-radius-panel); padding:clamp(18px,2.4vw,26px);
  background:var(--pk-mat-panel-bg); display:grid; gap:14px; justify-items:center;
  box-shadow:inset 0 1px 0 var(--pk-mat-panel-rimlight), 0 22px 48px -22px var(--pk-mat-panel-shadow); }
.duel__side--win{ box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--pk-coin) 55%, transparent),
    0 22px 54px -20px color-mix(in srgb,var(--pk-coin) 40%, var(--pk-mat-panel-shadow)); }
.duel__side--lose{ opacity:.82; }
.duel__who{ font-family:var(--font-display); font-weight:900; font-size:var(--pk-fs-lg); color:var(--pk-text);
  display:inline-flex; align-items:center; gap:7px; }
.duel__crown{ color:var(--pk-coin); }
.duel__cards{ display:flex; gap:8px; }
.duel__card{ position:relative; width:clamp(46px,7vw,62px); aspect-ratio:5/7; border-radius:8px;
  background:linear-gradient(170deg, var(--pk-mat-panel-bg-2), var(--pk-mat-panel-bg));
  box-shadow:inset 0 0 0 1px var(--pk-mat-chip-edge);
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  padding:0 0 5px; gap:1px;
  font-family:var(--font-voice); font-size:9px; color:var(--pk-text-muted); }
.duel__card::before{ content:""; position:absolute; top:0; left:0; right:0; height:4px;
  border-radius:8px 8px 0 0; background:var(--rar); }
.duel__card b{ font-family:var(--font-voice); font-size:13px; font-weight:700; color:var(--pk-text); }
.duel__total{ font-family:var(--font-voice); font-weight:700; font-size:var(--pk-fs-xl); color:var(--pk-text); }
.duel__side--win .duel__total{ color:var(--pk-coin); }
.duel__vs{ font-family:var(--font-display); font-weight:900; font-size:clamp(22px,3vw,34px);
  color:var(--pk-text-muted); letter-spacing:.04em; }
.duel__foot{ display:grid; gap:16px; justify-items:center; }
.duel__chips{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.duel__chips .mat-chip{ font-family:var(--font-voice); font-size:11px; letter-spacing:.05em;
  text-transform:uppercase; color:var(--pk-text-muted); padding:6px 12px; }
.duel__note{ color:var(--pk-text-muted); }
@media (max-width:720px){ .duel__ring{ grid-template-columns:1fr; }
  .duel__vs{ padding:2px 0; } }

/* ════════════════════════════════════════════════════════════════════════
   SCENE · Collection & pity (the long game)
   ════════════════════════════════════════════════════════════════════════ */
.coll{ display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:clamp(28px,6vw,84px); align-items:center; }
.coll__display{ display:grid; gap:16px; justify-items:center; }
.setgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(8px,1.2vw,14px); width:min(300px,72vw); }
.setslot{ position:relative; aspect-ratio:5/7; border-radius:10px; overflow:hidden;
  background:linear-gradient(170deg, var(--pk-mat-panel-bg-2), var(--pk-mat-panel-bg));
  box-shadow:inset 0 0 0 1px var(--pk-mat-chip-edge);
  opacity:.42; filter:grayscale(.6);
  transition:opacity var(--pk-dur-base) var(--pk-ease-out-quint),
    filter var(--pk-dur-base) var(--pk-ease-out-quint); }
.setslot::before{ content:""; position:absolute; top:0; left:0; right:0; height:5px; background:var(--rar); }
.setslot::after{ content:""; position:absolute; inset:0;
  background:radial-gradient(120% 70% at 50% 8%, color-mix(in srgb,var(--rar) 42%, transparent), transparent 60%); }
.setslot.is-on{ opacity:1; filter:none;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rar) 55%, var(--pk-mat-chip-edge)),
    0 10px 24px -12px color-mix(in srgb,var(--rar) 50%, transparent); }
.setmeter{ width:min(300px,72vw); height:7px; border-radius:999px; overflow:hidden;
  background:var(--pk-mat-chip-bg); box-shadow:inset 0 0 0 1px var(--pk-mat-chip-edge); }
.setmeter__fill{ display:block; height:100%; width:0;
  background:linear-gradient(90deg, var(--pk-accent), var(--pk-coin));
  transition:width 1.1s var(--pk-ease-out-expo); }
.setmeter__label{ font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--pk-text-muted); }
.coll__copy{ display:grid; gap:clamp(14px,2.2vh,22px); justify-items:start; }
.coll__title{ font-size:clamp(30px,4.6vw,54px); }
.coll__pity{ display:grid; gap:8px; width:100%; max-width:340px; }
.pity{ height:9px; border-radius:999px; overflow:hidden; background:var(--pk-mat-chip-bg);
  box-shadow:inset 0 0 0 1px var(--pk-mat-chip-edge); }
.pity__fill{ display:block; height:100%; width:0;
  background:linear-gradient(90deg, color-mix(in srgb,var(--pk-coin) 55%, var(--pk-accent)), var(--pk-coin));
  box-shadow:0 0 16px -2px color-mix(in srgb,var(--pk-coin) 55%, transparent);
  transition:width 1.3s var(--pk-ease-out-expo); }
.pity__label{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--pk-text-muted); }
.coll__chips{ display:flex; gap:8px; flex-wrap:wrap; }
.coll__chips .mat-chip{ font-family:var(--font-voice); font-size:11px; letter-spacing:.05em;
  text-transform:uppercase; color:var(--pk-text-muted); padding:6px 12px; }
@media (max-width:820px){ .coll{ grid-template-columns:1fr; text-align:center; }
  .coll__copy{ justify-items:center; } .coll__pity{ margin:0 auto; } }

/* ════════════════════════════════════════════════════════════════════════
   SCENE · Real & on-chain (provenance)
   ════════════════════════════════════════════════════════════════════════ */
.real{ display:grid; grid-template-columns:1.1fr .9fr; gap:clamp(30px,6vw,90px); align-items:center; }
.real__copy{ display:grid; gap:clamp(16px,2.4vh,26px); justify-items:start; }
.real__title{ font-size:clamp(30px,4.8vw,58px); max-width:16ch; }
.real__title .nowrap{ white-space:nowrap; }
.real__body{ max-width:42ch; }
.chain{ list-style:none; margin:6px 0 0; padding:0; display:grid; position:relative; }
.chain__step{ position:relative; display:flex; align-items:center; gap:14px; padding:9px 0;
  font-family:var(--font-voice); font-size:var(--pk-fs-sm); color:var(--pk-text-muted); }
.chain__dot{ position:relative; z-index:1; width:13px; height:13px; border-radius:50%; flex:0 0 auto;
  background:var(--pk-mat-panel-bg);
  box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--pk-accent) 70%,transparent); }
.chain__step:not(:last-child)::before{ content:""; position:absolute; left:6px; top:50%; bottom:-50%;
  width:1px; background:color-mix(in srgb,var(--pk-accent) 35%, transparent); }
.chain__step--you{ color:var(--pk-text); }
.chain__step--you .chain__dot{ background:var(--pk-coin);
  box-shadow:0 0 14px -1px color-mix(in srgb,var(--pk-coin) 70%, transparent); }
.real__slab{ display:grid; place-items:center; }
.real__slab .slab{ width:clamp(220px,26vw,300px); }
.slab__chain{ position:absolute; bottom:8px; left:10px; z-index:2;
  font-size:9px; letter-spacing:.08em; text-transform:uppercase; color:var(--pk-text);
  background:color-mix(in srgb,var(--pk-accent) 22%, var(--pk-mat-panel-bg));
  border:1px solid color-mix(in srgb,var(--pk-accent) 45%, var(--pk-mat-chip-edge));
  border-radius:999px; padding:3px 8px; }
@media (max-width:820px){ .real{ grid-template-columns:1fr; text-align:center; }
  .real__copy{ justify-items:center; } .chain{ justify-items:center; }
  .chain__step{ justify-content:center; } .chain__step::before{ display:none !important; } }

/* ════════════════════════════════════════════════════════════════════════
   PRINT / PDF — flatten the scroll story into stacked, legible panels.
   Forces ink-on-white regardless of the live theme.
   ════════════════════════════════════════════════════════════════════════ */
@media print{
  :root, :root[data-theme="dark"], :root[data-theme="light"]{
    --pk-canvas:#fff; --pk-canvas-2:#fff; --pk-text:#15171E; --pk-text-muted:#555;
    --pk-mat-panel-bg:#F5F3EC; --pk-mat-panel-bg-2:#FAF8F1;
    --pk-mat-panel-rimlight:rgba(0,0,0,.04); --pk-mat-panel-shadow:rgba(0,0,0,.12);
  }
  html, body{ background:#fff !important; }
  .pk-ground, .relight, .rail, .chrome, .hero__scroll{ display:none !important; }
  *{ transform:none !important; }
  .scene, .scene--pin, .machines, .mac{ min-height:auto !important; height:auto !important;
    overflow:visible !important; padding:34px var(--pk-gutter) !important;
    break-inside:avoid; page-break-inside:avoid; }
  .track{ flex-direction:column !important; align-items:center; }
  .machine{ width:min(340px,90%) !important; height:auto !important; min-height:0 !important;
    opacity:1 !important; margin-bottom:14px; }
  .rip__half--top, .rip__half--bottom{ opacity:1 !important; }
  .reveal__glow{ opacity:0 !important; }
  .flipper{ transform:none !important; }
  .flipper__face--back{ display:none !important; }
  .flipper__face--front{ position:relative !important; transform:none !important; }
  .reveal__again, .reveal__open{ display:none !important; }
  .reveal, .hero, .hero__stage{ opacity:1 !important; }
  /* new scenes: show progress fills + the default Safe reach band on paper */
  .setmeter__fill{ width:67% !important; }
  .pity__fill{ width:72% !important; }
  .reach__band{ box-shadow:none !important; }
  .duel__side--lose{ opacity:1 !important; }
}
