/* ==========================================================================
   Studio site — Ashen Crown first, the arcade second.
   Palette follows rsgame/ART_BIBLE.md: ember = fire/the King, violet = magic
   (reserved), terracotta / moss / cream stone = Alma Verde.
   ========================================================================== */

:root {
  --bg: #0c0a0b;
  --bg-2: #151112;
  --bg-3: #1d1819;
  --line: rgba(239, 230, 218, 0.10);
  --line-2: rgba(239, 230, 218, 0.18);
  --ink: #efe6da;
  --ink-2: #b9ada0;
  --ink-3: #7d7369;

  --ember: #ff6a1f;
  --ember-2: #ffb26b;
  --ember-glow: rgba(255, 106, 31, 0.35);
  --violet: #8d62f2;
  --terracotta: #b85c38;
  --moss: #4f6b34;
  --cream: #dccca8;

  --ck: #d8ff3a;        /* Clutch Kick: graffiti lime */
  --ck-ink: #111;
  --pw: #ff5bd2;        /* Paper Witches: hulcrux pink-violet */
  --sk: #3fd4ff;        /* Sketchy: marker cyan */
  --rh: #ffc23d;        /* Rabbit Hole: carrot amber */
  --br: #e2604a;        /* Breach: torchlit red */
  --paper: #efe4cf;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --arcade: "Bungee", var(--sans);

  --wrap: 1200px;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 6px; }

/* Film grain over the whole site: keeps the dark from looking like a flat UI kit */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(239, 230, 218, .06); font-weight: 500; font-size: 15px; text-decoration: none;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn:hover { transform: translateY(-1px); background: rgba(239, 230, 218, .12); }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-ember {
  background: linear-gradient(180deg, #ff8a3d, var(--ember)); border-color: transparent; color: #1a0a03; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 178, 107, .4) inset, 0 10px 40px -10px var(--ember-glow);
}
.btn-ember:hover { background: linear-gradient(180deg, #ffa060, #ff7a33); box-shadow: 0 0 0 1px rgba(255, 178, 107, .6) inset, 0 14px 50px -8px var(--ember-glow); }
.btn-ghost { background: transparent; }
.btn-arcade { font-family: var(--arcade); font-size: 13px; letter-spacing: .02em; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #111; border: 0; }
.btn-arcade:hover { background: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px; padding: 14px 24px;
  transition: background .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(12, 10, 11, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: .01em; color: var(--ink); }
.brand svg { width: 26px; height: 26px; color: var(--ember-2); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ==========================================================================
   HERO: scroll-scrubbed cinematic
   ========================================================================== */
.hero { position: relative; height: 520vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.scene { position: absolute; inset: 0; --p: 0; background: #1a0f12; }
.scene-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-cam { position: absolute; inset: 0; }
.scene-layer { position: absolute; inset: 0; }
.scene-ash { filter: grayscale(1) brightness(.62) contrast(1.08) sepia(.08); }
.scene-color {
  -webkit-mask-image: var(--mask); mask-image: var(--mask);
  --mask: radial-gradient(circle at var(--rx, 50%) var(--ry, 72%), #000 var(--r, 0px), transparent calc(var(--r, 0px) + 260px)),
          radial-gradient(circle at var(--mx, -999px) var(--my, -999px), rgba(0,0,0,.9) 0, rgba(0,0,0,.9) 70px, transparent 200px);
}

/* Parallax planes: each one moves by its depth (--d) as the camera pushes in (--p) */
.plane {
  position: absolute; inset: -6% -6% -6% -6%; width: 112%; height: 112%;
  transform-origin: 50% 64%;
  transform: translate3d(0, calc(var(--p) * var(--d) * 22vh), 0) scale(calc(1 + var(--p) * var(--d) * 1.1));
  will-change: transform;
}
.plane svg { width: 100%; height: 100%; }

/* The keep window you start inside of. Flies past the camera in the first beat. */
.keep {
  position: absolute; inset: 0; pointer-events: none;
  transform-origin: 50% 50%;
  transform: scale(calc(1 + var(--kp, 0) * 7));
  opacity: calc(1 - var(--kp, 0) * 1.15);
}
.keep svg { width: 100%; height: 100%; }

.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.scene-fade { position: absolute; inset: auto 0 0 0; height: 30vh; background: linear-gradient(transparent, var(--bg)); opacity: var(--endfade, 0); pointer-events: none; }
.scene::after { /* vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8, 5, 6, .7) 100%);
}

/* Story beats */
.beat {
  position: absolute; z-index: 5; left: 50%; top: 50%; width: min(92vw, 760px);
  transform: translate(-50%, calc(-50% + (1 - var(--o, 0)) * 24px));
  opacity: var(--o, 0); text-align: center; pointer-events: none;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .6);
}
.beat.on { pointer-events: auto; }
.beat-line { font-family: var(--serif); font-size: clamp(34px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -.01em; }
.beat .kicker { margin-bottom: 14px; color: var(--ember-2); }
.beat-left { left: max(24px, 7vw); transform: translate(0, calc(-50% + (1 - var(--o, 0)) * 24px)); text-align: left; width: min(86vw, 560px); }
.beat-right { left: auto; right: max(24px, 7vw); transform: translate(0, calc(-50% + (1 - var(--o, 0)) * 24px)); text-align: right; width: min(86vw, 560px); }
@media (max-width: 700px) { .beat-left, .beat-right { left: 20px; right: 20px; width: auto; text-align: left; top: 30%; } }

/* Final beat: title up top over the spires, call to action down on the dark hill */
.beat-4 {
  top: 0; bottom: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: max(96px, 13vh) 0 max(64px, 9vh);
  transform: translate(-50%, calc((1 - var(--o, 0)) * 24px));
}
.hero-foot { display: flex; flex-direction: column; align-items: center; }
.beat-4 .hero-lede { margin-top: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px var(--ember); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.hero-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 11vw, 168px); line-height: .88; letter-spacing: -.025em;
  background: linear-gradient(180deg, #fff6e8 20%, var(--ember-2) 70%, var(--ember) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 40px rgba(255, 106, 31, .25));
}
.hero-the { display: block; font-style: italic; font-size: .32em; letter-spacing: .02em; margin-bottom: .15em; color: var(--ink-2); -webkit-text-fill-color: var(--ink-2); }
.hero-lede { margin: 22px auto 0; max-width: 540px; color: var(--ink); opacity: .9; font-size: 18px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

.hero-progress { position: absolute; z-index: 6; left: 24px; right: 24px; bottom: 22px; height: 1px; background: var(--line); }
.hero-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--ember), var(--ember-2)); }
.scroll-cue { position: absolute; z-index: 6; left: 50%; bottom: 40px; transform: translateX(-50%); color: var(--ink-2); transition: opacity .4s; }
.scroll-cue::after { content: ""; display: block; width: 1px; height: 28px; margin: 10px auto 0; background: linear-gradient(var(--ink-2), transparent); animation: cue 1.8s infinite var(--ease); transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { position: relative; padding: 140px 0; }
.section-head { max-width: 760px; margin-bottom: 64px; }
.kicker { color: var(--ink-3); margin-bottom: 18px; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.4vw, 88px); line-height: .98; letter-spacing: -.02em; }
.display em { font-style: italic; color: var(--ember-2); }
.section-lede { margin-top: 24px; font-size: 18px; color: var(--ink-2); max-width: 600px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Crown bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 28px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; min-height: 260px;
}
.tile::before { /* faint ember rim that follows the cursor */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--tx, 50%) var(--ty, 50%), rgba(255, 106, 31, .12), transparent 60%);
}
.tile:hover::before { opacity: 1; }
.tile h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; }
.tile p { color: var(--ink-2); }
.tile-tag { color: var(--ember-2); }
.tile-wide { grid-column: span 2; }
.tile-full { grid-column: 1 / -1; }
/* Bring them back: a 3:1 diorama, ashes -> the crown falls -> home. It pans with the scroll where it's cropped. */
.tile-restore { padding: 0; min-height: 0; aspect-ratio: 3 / 1; justify-content: flex-end; gap: 0; }
.restore-pano { position: absolute; inset: 0; background: url(art/bring-them-back.webp) var(--px, 50%) 0 / cover no-repeat; }
.tile-restore::after { /* lift the type off the floor of the diorama */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 10, 11, .35), transparent 16%, transparent 66%, rgba(12, 10, 11, .85)); }
.restore-phases { position: absolute; z-index: 1; top: 18px; left: 0; right: 0; margin: 0; padding: 0 24px; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(239, 230, 218, .82); }
.restore-phases span { color: var(--ember-2); margin-right: 6px; }
.restore-phases li:first-child span { color: #a9b3c2; }
.restore-phases li:last-child span { color: #9fd06a; }
.restore-copy { position: relative; z-index: 1; padding: 0 32px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.restore-copy h3 { font-size: clamp(34px, 4.3vw, 60px); line-height: .95; letter-spacing: -.01em;
  background: linear-gradient(90deg, #c9ced6, var(--ember-2) 50%, #c8e6a0); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, .6)); }
.restore-copy p:last-child { color: var(--ink); max-width: 640px; font-size: 15px; }
.tile-books .books { grid-template-columns: repeat(2, 1fr); }

.broom-art { height: 110px; margin: -8px -8px 6px; }
.broom-trail { fill: none; stroke: var(--violet); stroke-width: 2; stroke-dasharray: 4 7; opacity: .7; }
.broom-art { position: relative; }
.broom-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.broom-model { position: absolute; right: 4px; top: -14px; width: 132px; height: 132px; background: url(art/skills/broom.webp?v=20261119) 0 0 / 1200% 100% no-repeat;
  border-radius: 50%; box-shadow: 0 0 0 1px rgba(141, 98, 242, .45), 0 10px 22px rgba(141, 98, 242, .4); animation: turn 1.2s steps(11) infinite; } /* v5735: real in-game frames (a square of the game's picture), played at the game's speed: a round window, not a cut-out */
@keyframes bob { 50% { translate: 0 -6px; } }

.skill-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.skill-list li { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); }

.books { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.book { padding: 16px; border-radius: 12px; border: 1px solid rgba(141, 98, 242, .28); background: linear-gradient(180deg, rgba(141, 98, 242, .10), transparent); display: flex; flex-direction: column; gap: 6px; }
.book-name { font-family: var(--serif); font-size: 22px; font-style: italic; color: #cdb8ff; }
.book-role { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

/* ---------- Every skill: art bubbles ---------- */
.skills-panel { margin-top: 16px; padding: 30px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(70% 120% at 0% 0%, rgba(141, 98, 242, .08), transparent 60%), linear-gradient(180deg, var(--bg-3), var(--bg-2)); }
.skills-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.skills-head h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.05; margin-top: 8px; }
.skills-note { color: var(--ink-3); font-size: 14px; }
.skills-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skill { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line); cursor: default;
  transition: border-color .3s, background .3s, transform .3s var(--ease); }
.skill:hover { border-color: color-mix(in srgb, var(--tint) 60%, transparent); background: color-mix(in srgb, var(--tint) 10%, rgba(0,0,0,.28)); transform: translateY(-2px); }
.skill-art { position: relative; flex: none; width: 66px; height: 66px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--tint) 34%, transparent), transparent 70%), rgba(255,255,255,.03);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 35%, transparent); }
.skill-art::after { content: ""; position: absolute; inset: -4px; background: var(--sheet) 0 0 / 1200% 100% no-repeat; }
.skill:hover .skill-art::after { animation: turn 1.1s steps(11) infinite; }
@keyframes turn { to { background-position: 100% 0; } }
.skill-body { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 7px; }
.skill-name { font-weight: 500; font-size: 15px; }
.skill-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.skill-bar i { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 70%, #000), var(--tint));
  box-shadow: 0 0 10px color-mix(in srgb, var(--tint) 60%, transparent);
  transition: width 1.6s var(--ease) calc(var(--i) * 70ms); }
.skills-panel.in .skill-bar i { width: calc(var(--lv) * 1%); }
.skill-lv { flex: none; min-width: 26px; text-align: right; font-size: 13px; color: var(--tint); }
@media (max-width: 1000px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .skill-art { width: 52px; height: 52px; } .skills-panel { padding: 20px; } }
@media (max-width: 460px) { .skills-panel { padding: 16px; } .skills-grid { gap: 8px; } .skill { gap: 8px; padding-right: 12px; } .skill-art { width: 42px; height: 42px; }
  .skill-name { font-size: 13px; } .skill-lv { display: none; } }

.crown-cta { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding: 26px 30px; border-radius: var(--radius); border: 1px solid rgba(255, 106, 31, .3); background: linear-gradient(90deg, rgba(255, 106, 31, .10), transparent); }
.crown-cta p { font-size: 18px; }
.crown-cta em { font-family: var(--serif); font-size: 1.2em; color: var(--ember-2); }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .tile-restore { aspect-ratio: auto; min-height: 460px; }
  .restore-phases { display: none; }
  .restore-copy { padding: 22px; }
  .books { grid-template-columns: 1fr 1fr; }
}

/* ---------- Hero: globe labels, stacked lines, the dim under the title ---------- */
.beat-line em { font-style: italic; color: var(--ember-2); }
.beat-stack { display: flex; flex-direction: column; gap: 2px; }
.beat-sub { display: block; font-family: var(--serif); font-size: clamp(38px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -.01em;
  opacity: var(--o, 0); transform: translateX(calc((1 - var(--o, 0)) * -18px)); }
.beat-sub-ember { font-style: italic; color: var(--ember-2); }
.beat-low { top: auto; bottom: 9%; transform: translate(-50%, calc((1 - var(--o, 0)) * 12px)); }
.scene-dim { position: absolute; inset: 0; background: var(--bg); opacity: var(--dim, 0); pointer-events: none; }
.hero-labels { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hl { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  opacity: 0; transition: opacity .35s; will-change: transform; }
.hl.on { opacity: 1; }
.hl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ember)); box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 0 14px var(--c, var(--ember)); flex: none; }
.hl-text { padding: 7px 12px; border-radius: 10px; background: rgba(12, 10, 11, .66); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hl-text strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.1; }
.hl-text span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 2px; }
.hl-left { flex-direction: row-reverse; }
@media (max-width: 700px) { .hl-text strong { font-size: 15px; } .hl-text span { display: none; } }
/* (v5750) the boss pins' name tags: small, beside the jewel, placed by app.js layoutPins so they don't overlap */
.hl-pin { gap: 0; }
.hl-pin .hl-dot { display: none; }
.hl-pin .hl-text { padding: 3px 9px 4px 8px; border-radius: 5px; background: rgba(25, 13, 5, .8); border: 1px solid rgba(253, 252, 247, .14); border-left: 2px solid var(--c); }
.hl-pin .hl-text strong { font-size: clamp(12px, 1.02vw, 17px); color: #fdfcf7; }
.hl-pin .hl-text span { display: none; }
.hl-lead { position: absolute; height: 1px; background: rgba(253, 252, 247, .7); transform-origin: 0 50%; pointer-events: none; }
@media (max-width: 700px) { .hl-pin .hl-text strong { font-size: 11px; } .hl-pin .hl-text { padding: 2px 6px; } }

/* ---------- The alert before the duel ---------- */
.alert { top: 50%; width: min(96vw, 980px); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.alert-bar { width: 100%; height: 14px; border-radius: 3px;
  background: repeating-linear-gradient(-45deg, #ff3b2f 0 18px, #170708 18px 36px);
  box-shadow: 0 0 24px rgba(255, 59, 47, .45); animation: hazard 1.1s linear infinite; background-size: 51px 51px; }
@keyframes hazard { to { background-position: 51px 0; } }
.alert-kicker { color: #ff6b5a; letter-spacing: .22em; display: inline-flex; align-items: center; gap: 10px; animation: blink 1s steps(2, start) infinite; }
.alert-sign { display: inline-grid; place-items: center; width: 22px; height: 20px; font-weight: 700; color: #170708; background: #ffb02e;
  clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 4px; font-size: 12px; }
@keyframes blink { 50% { opacity: .35; } }
.alert-line { font-family: var(--arcade); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; text-align: center;
  font-size: clamp(40px, 7.4vw, 104px); line-height: .98; color: #ff3b2f;
  text-shadow: 0 0 22px rgba(255, 59, 47, .65), 0 0 60px rgba(255, 59, 47, .35), 3px 3px 0 #170708; animation: alarm 1.6s ease-in-out infinite; }
@keyframes alarm { 50% { color: #ffb02e; text-shadow: 0 0 28px rgba(255, 176, 46, .7), 0 0 70px rgba(255, 59, 47, .4), 3px 3px 0 #170708; } }
.duel-stage::after { /* a red alarm wash at the edges while the warning is up */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--alarm, 0);
  box-shadow: inset 0 0 160px rgba(255, 40, 30, .55); animation: pulse 1.6s ease-in-out infinite; }

/* ---------- The duel (scroll-scrubbed) ---------- */
.duel { position: relative; height: 340vh; }
.duel-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.duel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.duel-vignette { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--bg), transparent 18%, transparent 78%, var(--bg)), radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(8, 5, 6, .8)); }
.duel-beat-1 { top: 22%; }
.duel-card { top: auto; bottom: 13%; transform: translate(0, calc((1 - var(--o, 0)) * 24px)); width: min(86vw, 340px); padding: 20px 22px; border-radius: 16px; text-align: left;
  background: rgba(12, 10, 11, .55); border: 1px solid rgba(255, 106, 31, .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-shadow: none; }
.duel-card h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.05; margin-bottom: 8px; }
.duel-card p:last-child { color: var(--ink-2); font-size: 15px; }
.duel-card .kicker { margin-bottom: 10px; }
.duel-card-violet { border-color: rgba(141, 98, 242, .4); }
.duel-card-violet .kicker { color: #cdb8ff; }
.beat-right.duel-card { text-align: left; }
.duel-foot { top: auto; bottom: 7%; transform: translate(-50%, calc((1 - var(--o, 0)) * 16px)); color: var(--ink-2); }
@media (max-width: 700px) {
  .duel-card { top: auto; bottom: 18%; }
  .duel-card.beat-left { bottom: auto; top: 14%; }
  .duel-foot { display: none; }
}

/* ---------- Arcade ---------- */
.arcade { background: radial-gradient(80% 60% at 80% 0%, rgba(216, 255, 58, .05), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(255, 91, 210, .05), transparent 60%); border-top: 1px solid var(--line); }
.arcade-display { font-family: var(--arcade); font-size: clamp(36px, 5.2vw, 68px); line-height: 1.02; letter-spacing: 0; }
.arcade-display em { font-family: var(--serif); font-style: italic; font-size: 1.15em; color: var(--ink); letter-spacing: -.01em; }

.arcade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.game-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .3s; }
.game-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.game-art { position: relative; height: 240px; overflow: hidden; }
.game-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body > p:not(.game-meta) { color: var(--ink-2); }
.game-meta { color: var(--ink-3); }
.game-title { font-family: var(--arcade); font-weight: 400; font-size: 26px; }
.game-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.status { font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e8b84a; }

/* Clutch Kick: night asphalt, a skid line, graffiti CK */
.ck-art { background: #121313; }
.ck-road { position: absolute; inset: 0; background: repeating-linear-gradient(100deg, transparent 0 60px, rgba(255,255,255,.04) 60px 62px), radial-gradient(90% 70% at 70% 120%, rgba(216,255,58,.18), transparent 60%), linear-gradient(180deg, #0b0c10, #1b1c1c); }
.ck-skid { position: absolute; left: -10%; right: -10%; top: 58%; height: 70px; border-radius: 50%; border-top: 10px solid rgba(0,0,0,.55); border-bottom: 10px solid rgba(0,0,0,.45); transform: rotate(-8deg); filter: blur(1.5px); }
.ck-car { position: absolute; left: 5%; bottom: 30px; width: 90%; height: auto; transition: transform .6s var(--ease); filter: drop-shadow(0 0 22px rgba(216,255,58,.12)); }
.ck-shadow { position: absolute; left: 9%; right: 9%; bottom: 22px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.85), transparent); transition: transform .6s var(--ease); }
.ck-speed { position: absolute; right: 0; bottom: 60px; width: 30%; height: 60px; opacity: 0; transition: opacity .4s, transform .6s var(--ease); }
.ck-speed i { display: block; height: 2px; margin: 12px 0; border-radius: 2px; background: linear-gradient(90deg, rgba(216,255,58,.7), transparent); }
.ck-speed i:nth-child(2) { margin-left: 30%; }
.game-ck:hover .ck-car { transform: translateX(-6%) rotate(-1.2deg); }
.game-ck:hover .ck-shadow { transform: translateX(-6%); }
.game-ck:hover .ck-speed { opacity: 1; transform: translateX(-12%); }
.game-ck .game-title { color: var(--ck); }

/* Paper Witches: a pop-up spellbook */
.pw-art { background: radial-gradient(60% 80% at 50% 110%, rgba(255, 91, 210, .3), transparent 70%), #2a1b2e; perspective: 700px; }
.pw-page { position: absolute; bottom: 26px; width: 44%; height: 62%; background: var(--paper); box-shadow: 0 10px 30px rgba(0,0,0,.4); background-image: repeating-linear-gradient(transparent 0 17px, rgba(90, 60, 70, .12) 17px 18px); }
.pw-page-l { right: 50%; transform-origin: right bottom; transform: rotateY(18deg); border-radius: 6px 0 0 6px; }
.pw-page-r { left: 50%; transform-origin: left bottom; transform: rotateY(-18deg); border-radius: 0 6px 6px 0; }
.pw-hulcrux { position: absolute; left: 50%; bottom: 112px; width: 0; height: 0; border-left: 26px solid transparent; border-right: 26px solid transparent; border-bottom: 44px solid #1d1020; transform: translateX(-50%); filter: drop-shadow(0 0 16px var(--pw)) drop-shadow(0 0 4px var(--pw)); animation: hul 2.8s ease-in-out infinite; }
@keyframes hul { 50% { transform: translate(-50%, -8px); filter: drop-shadow(0 0 26px var(--pw)) drop-shadow(0 0 6px var(--pw)); } }
.pw-witch { position: absolute; left: 22%; bottom: 60px; width: 34px; height: 56px; background: #2b2230; clip-path: polygon(50% 0, 72% 38%, 64% 40%, 90% 100%, 10% 100%, 36% 40%, 28% 38%); transform: rotate(-4deg); filter: drop-shadow(2px 2px 0 rgba(0,0,0,.25)); }
.game-pw .game-title { color: var(--pw); }

/* Sketchy: a doodle drawing itself on paper, with guesses flying in */
.sk-art { background: radial-gradient(70% 80% at 50% 120%, rgba(63, 212, 255, .22), transparent 70%), #13202a; }
.sk-sheet { position: absolute; left: 50%; top: 50%; width: 62%; height: 74%; transform: translate(-50%, -50%) rotate(-2deg); background: var(--paper); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sk-doodle { width: 82%; height: auto; fill: none; stroke: #1b2430; stroke-linecap: round; stroke-linejoin: round; }
.sk-doodle pattern line { stroke: #1b2430; stroke-width: 1.4; }
.sk-ln { stroke-width: 2.6; stroke-dasharray: 420; animation: sk-draw 7s ease-in-out infinite; }
.sk-ln + .sk-ln { animation-delay: .5s; }
.sk-ln.sk-table { stroke-width: 1.6; animation-delay: .9s; }
.sk-fine { stroke-width: 1.2; }
.sk-shade { animation: sk-shade 7s ease-in-out infinite; }
@keyframes sk-draw { 0% { stroke-dashoffset: 420; } 35%, 100% { stroke-dashoffset: 0; } }
@keyframes sk-shade { 0%, 30% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
.sk-blanks { font-family: var(--mono); font-size: 13px; color: #6b5f50; letter-spacing: .1em; }
.sk-guess { position: absolute; padding: 6px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; background: #fff; color: #1b2430; box-shadow: 3px 3px 0 rgba(0,0,0,.35); }
.sk-guess-1 { left: 7%; top: 18%; transform: rotate(-6deg); }
.sk-guess-2 { right: 6%; bottom: 16%; transform: rotate(5deg); background: var(--sk); }
.game-sk .game-title { color: var(--sk); }

/* Rabbit Hole: a cut-away burrow, the links dig the tunnel, the rabbit hides at the bottom */
.rh-art { background: radial-gradient(50% 60% at 50% 100%, rgba(255, 194, 61, .18), transparent 70%), linear-gradient(180deg, #1a1712, #2a2116); }
.rh-burrow { position: absolute; inset: 0; width: 100%; height: 100%; }
.rh-tunnel, .rh-tunnel-core { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: rh-dig 8s ease-in-out infinite; }
.rh-tunnel { stroke: #5c4630; stroke-width: 30; stroke-opacity: .45; }
.rh-tunnel-core { stroke: #0d0906; stroke-width: 24; }
@keyframes rh-dig { 0% { stroke-dashoffset: 1; opacity: 1; } 55%, 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.rh-word { font-family: Georgia, serif; font-size: 13px; fill: #8fb6ff; text-decoration: underline; dominant-baseline: middle; opacity: 0; animation: 8s ease-in-out infinite; }
.rh-w1 { animation-name: rh-w1; }
.rh-w2 { animation-name: rh-w2; }
.rh-w3 { animation-name: rh-w3; fill: var(--rh); font-weight: 700; }
@keyframes rh-w1 { 0%, 8% { opacity: 0; } 14%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rh-w2 { 0%, 28% { opacity: 0; } 34%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rh-w3 { 0%, 48% { opacity: 0; } 54%, 90% { opacity: 1; } 100% { opacity: 0; } }
.rh-ears { transform-box: fill-box; transform-origin: 90% 60%; transition: transform .4s var(--ease); }
.game-rh:hover .rh-ears { transform: rotate(-22deg); }
.rh-zz { font-family: var(--mono); font-size: 11px; fill: #efe4cf; opacity: 0; animation: rh-zz 3s ease-in-out infinite; }
.rh-zz2 { font-size: 9px; animation-delay: 1.5s; }
@keyframes rh-zz { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .7; } 100% { opacity: 0; transform: translateY(-8px); } }
.game-rh .game-title { color: var(--rh); }

/* Breach: the chapel at night, its great door broken open, torches flickering */
.br-art { background: #0d0b12; }
.br-chapel { position: absolute; inset: 0; width: 100%; height: 100%; }
.br-fire { transform-box: fill-box; transform-origin: 50% 100%; animation: br-flicker 1.1s ease-in-out infinite alternate; }
.br-fire2 { animation-duration: .9s; animation-delay: .3s; }
.br-glow { animation: br-glow 1.1s ease-in-out infinite alternate; }
.br-glow2 { animation-duration: .9s; animation-delay: .3s; }
@keyframes br-flicker { 0% { transform: scale(.85, .9) skewX(-4deg); } 100% { transform: scale(1.1, 1.15) skewX(4deg); } }
@keyframes br-glow { 0% { opacity: .65; } 100% { opacity: 1; } }
.br-flag { transform-box: fill-box; transform-origin: 50% 0; animation: br-wave 3s ease-in-out infinite alternate; }
.br-flag2 { animation-delay: .7s; } .br-flag3 { animation-delay: 1.3s; } .br-flag4 { animation-delay: 2s; }
@keyframes br-wave { 0% { transform: skewX(-5deg); } 100% { transform: skewX(5deg); } }
.br-door { transform-box: fill-box; transform-origin: 100% 50%; transition: transform .6s var(--ease); }
.game-br:hover .br-door { transform: scaleX(.55); }
.br-light { transition: opacity .6s var(--ease); }
.game-br:hover .br-light { opacity: .45; }
.game-br .game-title { color: var(--br); }

/* A wide card: the art beside the words */
.arcade-grid .game-wide { grid-column: 1 / -1; flex-direction: row; }
.game-wide .game-art { flex: 1.2; height: auto; min-height: 260px; }
.game-wide .game-body { flex: 1; }

.game-next { border-style: dashed; background: transparent; }
.game-next-inner { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 12px; height: 100%; color: var(--ink-3); }
.next-q { font-family: var(--arcade); font-size: 88px; line-height: 1; color: var(--line-2); }

/* Two by two, with the "next cabinet" as a strip underneath */
.arcade-grid .game-next { grid-column: 1 / -1; }
.arcade-grid .game-next-inner { flex-direction: row; align-items: center; gap: 24px; padding: 20px 28px; }
.arcade-grid .next-q { font-size: 56px; }

.bridge {
  margin-top: 40px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 26px 30px; border-radius: var(--radius); text-decoration: none; overflow: hidden; position: relative;
  border: 1px solid rgba(255, 106, 31, .35); background: linear-gradient(90deg, rgba(255,106,31,.14), rgba(255,106,31,.02));
}
.bridge-label { color: var(--ink-2); }
.bridge-line { font-size: 20px; }
.bridge-line strong { font-family: var(--serif); font-weight: 400; font-size: 1.3em; color: var(--ember-2); }
.bridge-arrow { font-size: 26px; color: var(--ember-2); transition: transform .3s var(--ease); }
.bridge:hover .bridge-arrow { transform: translateX(6px); }

@media (max-width: 900px) {
  .arcade-grid { grid-template-columns: 1fr; }
  .arcade-grid .game-wide { flex-direction: column; }
  .game-wide .game-art { flex: none; height: 240px; min-height: 0; }
  .game-next { min-height: 180px; }
  .arcade-grid .game-next-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bridge { grid-template-columns: 1fr auto; }
  .bridge-label { grid-column: 1 / -1; }
}

/* ---------- Membership ---------- */
.membership { border-top: 1px solid var(--line); }
.membership-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.promise { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.promise li { padding-left: 22px; position: relative; color: var(--ink-2); }
.promise li::before { content: "✦"; position: absolute; left: 0; color: var(--ember); font-size: 12px; top: 4px; }
.promise strong { color: var(--ink); font-weight: 500; }

.plan {
  position: relative; padding: 32px; border-radius: 24px; background: linear-gradient(180deg, #221a18, #141011);
  border: 1px solid rgba(255, 106, 31, .28);
  box-shadow: 0 40px 120px -40px rgba(255, 106, 31, .35), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.plan-toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid var(--line); margin-bottom: 26px; }
.plan-toggle button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.plan-toggle button[aria-selected="true"] { background: var(--ink); color: #111; }
.save { font-size: 11px; color: var(--ember); margin-left: 4px; }
.plan-toggle button[aria-selected="true"] .save { color: #b0410b; }
.plan-name { color: var(--ink-3); }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 22px; }
.plan-price .cur { font-size: 28px; color: var(--ink-2); }
.plan-price #planPrice { font-family: var(--serif); font-size: 84px; line-height: 1; letter-spacing: -.02em; }
.plan-price .per { color: var(--ink-2); margin-left: 6px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.plan-list li { display: flex; align-items: center; gap: 12px; }
.chk { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; flex: none; }
.chk::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid var(--ink-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.crown-chk { background: var(--ember); border-color: var(--ember); }
.crown-chk::after { border-color: #1a0a03; }
.plan-fine { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }
@media (max-width: 900px) { .membership-grid { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- The Hearth (lore guide) ---------- */
.guide { border-top: 1px solid var(--line); }
.guide-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.hearth { border-radius: 24px; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; display: flex; flex-direction: column; }
.hearth-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 500; }
.hearth-src { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.hearth-flame { width: 12px; height: 16px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff3c4, var(--ember-2) 40%, var(--ember) 75%); box-shadow: 0 0 14px var(--ember); animation: flick 1.6s infinite alternate; }
@keyframes flick { 30% { transform: scale(.92, 1.06); } 70% { transform: scale(1.05, .95) rotate(3deg); } }
.hearth-log { padding: 20px; height: 330px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.55; }
.msg-bot { background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: rgba(255, 106, 31, .14); border: 1px solid rgba(255, 106, 31, .3); border-bottom-right-radius: 4px; }
.msg-src { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.msg .caret { display: inline-block; width: 7px; height: 1em; background: var(--ember-2); vertical-align: -2px; margin-left: 2px; animation: pulse 1s infinite; }
.hearth-chips { display: flex; gap: 8px; padding: 0 20px 14px; overflow-x: auto; scrollbar-width: none; }
.hearth-chips button { flex: none; border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--ink-2); }
.hearth-chips button:hover { color: var(--ink); border-color: var(--ember-2); }
.hearth-form { display: flex; gap: 8px; padding: 14px; border-top: 1px solid var(--line); }
.hearth-form input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 16px; color: var(--ink); font: inherit; }
.hearth-form input:focus { outline: none; border-color: var(--ember-2); }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Devlog ---------- */
.devlog { border-top: 1px solid var(--line); }
.log-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.log { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; transition: border-color .3s; }
.log:hover { border-color: var(--line-2); }
.log-meta { color: var(--ink-3); }
.log h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.log p:last-child { color: var(--ink-2); }
@media (max-width: 900px) { .log-list { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--ink-3); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.footer nav { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ==========================================================================
   Join modal with the "you get this too" panel
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 4, 5, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .3s var(--ease); }
.modal-shell {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(940px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  border-radius: 26px; border: 1px solid var(--line-2); background: var(--bg-2);
  box-shadow: 0 60px 160px -40px rgba(0,0,0,.9); animation: rise .5s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.modal-x { position: absolute; top: 14px; right: 16px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0,0,0,.4); font-size: 20px; line-height: 1; }

.join-main { padding: 40px 36px; display: flex; flex-direction: column; gap: 8px; }
.join-for { color: var(--ember-2); }
.join-title { font-family: var(--serif); font-weight: 400; font-size: 42px; line-height: 1; letter-spacing: -.01em; }
.join-price { color: var(--ink-2); margin-bottom: 18px; }
.join-price #joinPrice { color: var(--ink); font-weight: 600; }
.join-form { display: grid; gap: 14px; }
.join-form label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.join-form input { background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; color: var(--ink); font: inherit; font-size: 15px; }
.join-form input:focus { outline: none; border-color: var(--ember-2); box-shadow: 0 0 0 3px rgba(255, 178, 107, .15); }
.form-err { min-height: 1.2em; font-size: 13px; color: #ff8f7a; }
.join-done { text-align: center; padding: 30px 0; display: grid; gap: 10px; }
.join-done h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; }
.join-done p { color: var(--ink-2); }
.done-mark { font-size: 36px; color: var(--ember); }

/* The bonus panel */
.join-bonus { position: relative; overflow: hidden; padding: 40px 32px; display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--line); }
.bonus-tag {
  align-self: flex-start; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; animation: tagin .6s .25s var(--ease) both;
}
@keyframes tagin { from { opacity: 0; transform: translateY(-8px) scale(.9); } }
.bonus-title { font-size: 26px; line-height: 1.15; }
.bonus-sub { color: var(--ink-2); font-size: 15px; }
.bonus-items { display: grid; gap: 10px; margin-top: 6px; }
.bonus-item { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); animation: tagin .6s var(--ease) both; }
.bonus-item:nth-child(2) { animation-delay: .1s; }
.bonus-item:nth-child(3) { animation-delay: .2s; }
.bonus-thumb { width: 54px; height: 54px; border-radius: 10px; flex: none; display: grid; place-items: center; font-family: var(--arcade); font-size: 18px; }
.bonus-item strong { display: block; font-weight: 500; }
.bonus-item span { font-size: 13px; color: var(--ink-3); }

/* Bonus = the arcade (shown when joining the Crown) */
.join-bonus.is-arcade { background: radial-gradient(80% 60% at 100% 0%, rgba(216, 255, 58, .10), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(255, 91, 210, .10), transparent 60%), #121011; }
.join-bonus.is-arcade .bonus-tag { background: var(--ck); color: var(--ck-ink); }
.join-bonus.is-arcade .bonus-title { font-family: var(--arcade); font-weight: 400; font-size: 24px; }

/* Bonus = Ashen Crown (shown when joining an arcade game) */
.join-bonus.is-crown { background: #1a0f12; }
.join-bonus.is-crown .bonus-scene { position: absolute; inset: 0; }
.join-bonus.is-crown .bonus-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 10, 12, .1) 20%, rgba(20, 12, 14, .85) 62%, #140c0e 88%); }
.join-bonus.is-crown > *:not(.bonus-scene) { position: relative; z-index: 1; }
.join-bonus.is-crown .bonus-tag { background: var(--ember); color: #1a0a03; }
.join-bonus.is-crown .bonus-title { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: .95; margin-top: auto; }
.join-bonus.is-crown .bonus-title em { display: block; font-size: .45em; color: var(--ink-2); }
.bonus-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-2); font-size: 15px; }
.bonus-points li::before { content: "✦ "; color: var(--ember); }

@media (max-width: 760px) {
  .modal { place-items: end center; padding: 0; }
  .modal-shell { grid-template-columns: 1fr; border-radius: 22px 22px 0 0; max-height: 92vh; }
  .join-main { padding: 32px 22px 22px; }
  .join-bonus { border-left: 0; border-top: 1px solid var(--line); padding: 26px 22px 32px; }
  .join-bonus.is-crown .bonus-title { font-size: 36px; margin-top: 40px; }
}

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

/* "Coming soon" pill for Ashen Crown */
.soon-tag { display: inline-block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-2); border: 1px solid currentColor; border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; box-shadow: 0 0 18px rgba(255, 138, 61, .25); }
.soon-inline { font-size: 11px; padding: 3px 10px; margin: 0 10px 0 0; vertical-align: middle; }

/* ---------- Matchbox reel: real gameplay scrubbed by scroll ---------- */
.reel { position: relative; height: 520vh; }
.reel-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #08070a; }
.reel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(calc(1 - var(--dim, 1) * .78)) saturate(calc(1 - var(--dim, 1) * .6)); transform: scale(calc(1 + var(--dim, 1) * .06)); }
.reel-vignette { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--bg), transparent 14%, transparent 70%, rgba(8, 7, 10, .9)), radial-gradient(130% 100% at 50% 45%, transparent 55%, rgba(8, 7, 10, .75)); }
.reel-intro { text-align: center; width: min(90vw, 760px); }
.reel-intro .section-lede { margin: 18px auto 0; }
.reel-card { top: auto; bottom: calc(4.5% + 110px); left: max(24px, 6vw); transform: translate(0, calc((1 - var(--o, 0)) * 24px)); width: min(86vw, 400px); padding: 20px 22px; border-radius: 16px; text-align: left;
  background: rgba(10, 9, 12, .62); border: 1px solid var(--rc, var(--line-2)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-shadow: none; }
.reel-card h3 { font-family: var(--arcade); font-weight: 400; font-size: clamp(26px, 3vw, 36px); line-height: 1.05; margin: 8px 0; color: var(--rc); }
.reel-card p:last-child { color: var(--ink-2); font-size: 15px; }
.reel-meta { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.reel-rec { width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b; animation: pulse 1.6s infinite; }
.reel-ck { --rc: var(--ck); } .reel-pw { --rc: var(--pw); } .reel-sk { --rc: var(--sk); } .reel-rh { --rc: var(--rh); }
/* four matches along the bottom: each lights while its game plays, then burns down */
.reel-matches { position: absolute; left: 50%; transform: translateX(-50%); bottom: 4.5%; display: flex; gap: 104px; padding: 16px 64px 30px; border-radius: 14px; background: rgba(10, 9, 12, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); list-style: none; margin: 0; padding: 0; opacity: calc(1 - var(--dim, 1)); }
.reel-match { position: relative; width: 6px; height: 46px; border-radius: 3px; background: linear-gradient(#d9b98a, #a9875a); transform-origin: bottom; transform: scaleY(calc(1 - var(--burn, 0) * .55)); }
.reel-head { position: absolute; left: -3px; top: -9px; width: 12px; height: 16px; border-radius: 50% 50% 45% 45%; background: var(--mc); transition: box-shadow .3s; }
.reel-match.lit .reel-head { box-shadow: 0 -6px 14px 4px rgba(255, 150, 40, .85), 0 -14px 22px 6px rgba(255, 90, 20, .45); background: #ffcf6b; }
.reel-match.spent .reel-head { background: #2a2224; }
.reel-name { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.reel-match.lit .reel-name { color: var(--mc); }
.reel-m-ck { --mc: var(--ck); } .reel-m-pw { --mc: var(--pw); } .reel-m-sk { --mc: var(--sk); } .reel-m-rh { --mc: var(--rh); }
@media (max-width: 700px) {
  .reel-video { object-fit: contain; object-position: 50% 32%; }
  .reel-card { left: 16px; right: 16px; width: auto; bottom: calc(3% + 84px); }
  .reel-matches { bottom: 3%; gap: 34px; padding: 14px 22px 10px; }
  .reel-match { height: 40px; }
  .reel-name { display: none; }
}

/* ---------- Server status (status.js) ---------- */
.srv-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; text-decoration: none; white-space: nowrap; }
.nav-links + .srv-pill { margin-left: -4px; }
.srv-pill:hover { color: var(--ink); border-color: var(--ink-3); }
.srv-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 11px; color: var(--ink-2); }
.srv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
[data-state="up"] > .srv-dot { background: #3ba55c; box-shadow: 0 0 8px rgba(59, 165, 92, .7); }
[data-state="part"] > .srv-dot { background: #f0b232; box-shadow: 0 0 8px rgba(240, 178, 50, .6); }
[data-state="down"] > .srv-dot { background: #ed4245; box-shadow: 0 0 8px rgba(237, 66, 69, .6); }
@media (max-width: 860px) { .nav .srv-pill { margin-left: auto; } .nav .srv-pill + .btn { margin-left: 0; } }
@media (max-width: 420px) { .srv-pill .srv-text { display: none; } .srv-pill { padding: 8px; } }

/* (Nov 17) phones: the nav's button was pushed off the right edge; the hero has the same button. No sideways scroll. */
@media (max-width: 560px) { .nav .btn { display: none; } .nav .srv-pill { margin-left: auto; } }
html, body { overflow-x: clip; }
