/* Rhythm Breach site (WEB2). The app's neon pixel palette (Art/palette.txt) and fonts (App/Fonts), self-hosted.
   Type: Silkscreen for display and labels, Pixelify Sans for Root's voice (as in the app), the system sans for
   running text. Scale: 12 / 14 / 17 (18 on wide screens) / 20 / 24 / 32 / 48 / 64 px. Pixel art is served at 1x
   and scaled by whole numbers with image-rendering: pixelated. */
@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #0d0b1f;
  --panel: #17143a;
  --indigo: #211d4c;
  --line: #2c2766;
  --near-black: #050410;
  --ink: #e8e6ff;
  --dim: #8b86c2;
  --cyan: #3fe0ff;
  --cyan-shade: #1a96c4;
  --cyan-deep: #0e4e78;
  --green: #8dff6a;
  --green-shade: #3fa83a;
  --green-deep: #1d5a2c;
  --amber: #ffc247;
  --amber-shade: #b8781c;
  --red: #ff5a6e;
  --magenta: #ff4fb3;
  --magenta-shade: #a3246f;
  --ultraviolet: #9d5cff;
  --display: "Silkscreen", ui-monospace, monospace;
  --voice: "Pixelify Sans", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg) url("/img/dots.png") 0 0 / 16px 16px;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-wrap: break-word;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }

img { max-width: 100%; height: auto; image-rendering: pixelated; }

a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--amber); color: var(--bg); padding: 8px 12px; font: 700 0.875rem var(--display);
}
.skip:focus { left: 16px; top: 16px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 600px) { :root { --gutter: 24px; } }

/* Header and footer (every page) */
header.site { border-bottom: 2px solid var(--line); background: rgba(5, 4, 16, 0.6); }
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  font: 700 1rem/1 var(--display); letter-spacing: 0.25em; color: var(--cyan); text-decoration: none;
  text-transform: uppercase; text-shadow: 0 0 12px rgba(63, 224, 255, 0.45);
}
.brand:hover { color: var(--cyan); }
nav.site ul { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
nav.site a {
  display: inline-block; padding: 6px 0;
  font: 400 0.75rem/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
  text-decoration: none;
}
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); }
nav.site ul { align-items: center; }
@media (max-width: 479px) { nav.site .nav-anchor { display: none; } }
nav.site .nav-get {
  display: inline-block; font: 400 0.75rem/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase;
  padding: 8px 10px; color: var(--near-black); background: var(--cyan); box-shadow: 3px 3px 0 var(--cyan-deep);
  transition: transform 80ms steps(2), box-shadow 80ms steps(2);
}
nav.site a.nav-get:hover { color: var(--near-black); background: var(--green); }
nav.site a.nav-get:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--cyan-deep); }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 16px; }

footer.site { border-top: 2px solid var(--line); padding: 28px 0 44px; color: var(--dim); font-size: 0.9375rem; background: var(--near-black); }
footer.site ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0 0 12px; padding: 0; }
footer.site p { margin: 0; }
/* Discord's official white logo (discord.com/branding: unaltered, never recoloured); header and footer. */
.nav-discord a, .foot-discord a { display: inline-flex; align-items: center; padding: 6px 0; opacity: 0.85; transition: opacity 120ms steps(2), transform 120ms steps(2); }
.nav-discord a:hover, .nav-discord a:focus-visible, .foot-discord a:hover, .foot-discord a:focus-visible { opacity: 1; transform: translateY(-1px); }
.nav-discord img, .foot-discord img { display: block; height: 12px; width: auto; }
/* The header logo matches the nav labels' cap height (0.75rem) and sits on their centre line. */
.nav-discord a { padding: 6px 0; }
/* The pixel font sits low in its box; this lines the logo up with the labels. */
.nav-discord .d-logo { transform: translateY(6px); }
.foot-discord img { height: 18px; }
footer.site li.foot-discord { order: -1; flex-basis: 100%; margin-bottom: 4px; }
.nav-discord .d-symbol { display: none; height: 20px; }
/* Phones: one header row (the brand and Discord's symbol); Support lives in the footer, the hero has the store plate. */
@media (max-width: 479px) {
  nav.site li:has(> a[href="/support"]), nav.site li:has(> .nav-get) { display: none; }
  .nav-discord .d-logo { display: none; }
  .nav-discord .d-symbol { display: block; }
}
footer.site ul { align-items: center; }

/* Shared type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; text-transform: uppercase; }
h1 { font-size: 2rem; letter-spacing: 0.04em; margin: 0 0 16px; }
h2 { font-size: 1.5rem; letter-spacing: 0.06em; margin: 0 0 16px; }
h3 { font-size: 1rem; letter-spacing: 0.08em; margin: 0 0 6px; }
@media (min-width: 600px) { h1 { font-size: 3rem; } h2 { font-size: 2rem; } }

.kicker, .eyebrow {
  margin: 0 0 12px; font: 400 0.75rem/1.4 var(--display); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan);
}
.measure { max-width: 38rem; }
.lede { font-size: 1.25rem; line-height: 1.5; max-width: 34rem; margin: 0 0 24px; }
.stage .lede { margin-top: 8px; }
.muted, .fine { color: var(--dim); }
.fine { font-size: 0.875rem; margin: 16px 0 0; }

.panel { background: var(--panel); border: 2px solid var(--line); padding: 20px; margin: 24px 0; }

/* ---------- Pixel sprites ----------
   Root's clips are the app's own sheets (Art/out/anim-*.png, App/Root/RootClips.swift): horizontal strips of 64x64
   frames. Linear loops are used as they are; clips with a schedule (idle, gimme) are unrolled into one frame per tick
   so a plain steps() plays them at the app's tick. --s is a whole-number scale, so pixels stay square and sharp. */
.sprite {
  --s: 2; --f: 8; --t: 1s; --w: 64px; --h: 64px;
  display: block; width: calc(var(--w) * var(--s)); height: calc(var(--h) * var(--s));
  background-repeat: no-repeat; background-position: 0 0; image-rendering: pixelated;
  background-size: calc(var(--w) * var(--f) * var(--s)) calc(var(--h) * var(--s));
  animation: sprite var(--t) steps(var(--f)) infinite;
}
@keyframes sprite { to { background-position: calc(var(--w) * var(--f) * var(--s) * -1) 0; } }
.root-keytar { background-image: url("/img/px/root-studio-playing.png"); }               /* 8 x 0.125 s */
.root-dj { background-image: url("/img/px/root-dj.png"); }
.sprite.still { animation: none; }                               /* 8 x 0.125 s */
.root-idle { --f: 68; --t: 13.6s; background-image: url("/img/px/root-idle.png"); }      /* 68 ticks x 0.2 s */
/* Bosses: the fight's idle sheets, 4 frames of 48x48 at 0.25 s (CampaignBossSprite). */
.boss { --w: 48px; --h: 48px; --f: 4; --s: 2; }
.boss-taskman { background-image: url("/img/px/boss-taskman.png"); }
.boss-quota { background-image: url("/img/px/boss-quota.png"); }
.boss-emptybin { background-image: url("/img/px/boss-emptybin.png"); }

/* ---------- Landing: the stage ---------- */
.stage { padding: 32px 0 56px; overflow: hidden; position: relative; }
.stage::before {
  /* a soft neon floor behind the highway */
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: radial-gradient(60% 70% at 70% 100%, rgba(63, 224, 255, 0.10), transparent 70%);
}
.stage-grid {
  position: relative; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "play" "now";
}
.stage-head { grid-area: head; }
.now { grid-area: now; }
.hero-play { grid-area: play; }
.stage h1 { text-shadow: 0 0 18px rgba(63, 224, 255, 0.35); margin: 0 0 16px; }
.stage h1 .hl { display: block; color: var(--magenta); text-shadow: 0 0 18px rgba(255, 79, 179, 0.45); }
@media (max-width: 359px) { .stage h1 { font-size: 1.5rem; } }
@media (min-width: 1000px) {
  .stage { padding: 56px 0 80px; }
  .stage h1 { font-size: 3rem; }
  .stage-grid {
    grid-template-columns: minmax(0, 1fr) 360px; column-gap: 64px; row-gap: 32px;
    grid-template-areas: "head play" "now play";
    grid-template-rows: auto 1fr;
  }
}

/* App Store button: our own pixel plate (Apple's badge needs their artwork), lit, never grey. */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.store-btn {
  display: inline-grid; gap: 4px; padding: 12px 20px 14px; min-width: 220px; text-decoration: none;
  color: var(--near-black); background: var(--cyan); border: 2px solid var(--cyan);
  box-shadow: 0 0 28px rgba(63, 224, 255, 0.35), 5px 5px 0 var(--cyan-deep);
  transition: transform 80ms steps(2), box-shadow 80ms steps(2), background-color 80ms steps(2);
}
.store-btn.soon { cursor: default; }
.store-btn:not(.soon):hover, .store-btn:not(.soon):focus-visible { color: var(--near-black); background: var(--green); border-color: var(--green); }
.store-btn:not(.soon):active { transform: translate(3px, 3px); box-shadow: 0 0 18px rgba(141, 255, 106, 0.35), 2px 2px 0 var(--cyan-deep); }
.store-top { font: 400 0.75rem/1.2 var(--display); letter-spacing: 0.2em; text-transform: uppercase; }
.store-main { font: 700 1.0625rem/1.2 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }

/* The hero's highway: four lanes, notes falling to a 120 BPM beat on an 8-beat (4 s) loop, each landing on the
   line with a flash. A note's wrapper fills its lane; the pill (i) falls, the flash (b) waits on the line. Every
   note shares one animation; its beat (b0..b7) only shifts the delay. Reduced motion: notes hold mid-fall. */
.hero-play { position: relative; justify-self: center; width: 100%; max-width: 320px; padding-top: 112px; }
.hero-play .root-keytar {
  position: absolute; top: 0; left: 50%; margin-left: -64px; z-index: 2; --s: 2;
}
.highway {
  --lane: 25%; --travel: 312px; --loop: 4s;
  position: relative; height: 360px; overflow: hidden;
  background: linear-gradient(var(--near-black), #120f2e 70%, #1b1745);
  border: 2px solid var(--cyan-shade);
  box-shadow: 0 0 0 4px var(--near-black), 0 0 40px rgba(63, 224, 255, 0.25), 8px 8px 0 4px var(--near-black);
}
.lane { position: absolute; top: 0; bottom: 0; width: 25%; border-right: 2px solid rgba(44, 39, 102, 0.8); }
.lane:nth-child(1) { left: 0; } .lane:nth-child(2) { left: 25%; } .lane:nth-child(3) { left: 50%; }
.lane:nth-child(4) { left: 75%; border-right: 0; }
.lane:nth-child(2) { border-right-color: rgba(63, 224, 255, 0.25); }
.hitline {
  position: absolute; left: 0; right: 0; top: calc(var(--travel) + 4px); height: 4px;
  background: repeating-linear-gradient(90deg, var(--cyan-shade) 0 6px, transparent 6px 10px);
  animation: hit-pulse 0.5s steps(1) infinite;
}
@keyframes hit-pulse { 0% { opacity: 1; } 30% { opacity: 0.55; } }
.n { position: absolute; top: 0; bottom: 0; width: 25%; display: grid; justify-items: center; }
.n.l1 { left: 0; } .n.l2 { left: 25%; } .n.l3 { left: 50%; } .n.l4 { left: 75%; }
.n i {
  /* the app's tap note, 36x12 at 2x, in a box 8 px bigger each way so its glow never clips */
  position: absolute; top: 0; width: 64px; height: 24px; margin-top: -24px; left: calc(50% - 32px);
  background: url("/img/px/note-tap-cyan.png") center / 72px 24px no-repeat; image-rendering: pixelated;
  filter: drop-shadow(0 0 4px rgba(63, 224, 255, 0.6));
  transform: translateY(var(--y, 120px));
  animation: note-fall var(--loop) linear infinite;
}
.n.g i { background-image: url("/img/px/note-tap-green.png"); filter: drop-shadow(0 0 4px rgba(141, 255, 106, 0.6)); }
@media (min-width: 1000px) {
  .hero-play { max-width: 360px; padding-top: 168px; }
  .hero-play .root-keytar { --s: 3; margin-left: -96px; }
  .highway { --travel: 392px; height: 440px; }
}
@media (max-width: 380px) { .n i { width: 56px; left: calc(50% - 28px); background-size: 54px 18px; } }
@keyframes note-fall {
  0% { transform: translateY(0); opacity: 1; }
  37.5% { transform: translateY(calc(var(--travel) + 14px)); opacity: 1; }
  37.6%, 100% { transform: translateY(calc(var(--travel) + 14px)); opacity: 0; }
}
.n b {
  position: absolute; top: calc(var(--travel) - 14px); left: calc(50% - 30px); width: 60px; height: 36px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.9), rgba(63, 224, 255, 0.55) 45%, transparent);
  opacity: 0; animation: note-hit var(--loop) steps(1) infinite;
}
.n.g b { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.9), rgba(141, 255, 106, 0.55) 45%, transparent); }
@keyframes note-hit { 0% { opacity: 0; } 37.5% { opacity: 1; } 41% { opacity: 0.5; } 44% { opacity: 0; } }
/* beat k lands at k x 0.5 s; the fall takes 1.5 s, so the delay is k x 0.5 - 1.5 s, moved into the last loop (-4 s) when it would be positive */
.b0 i, .b0 b { animation-delay: -1.5s; --y: 60px; }
.b1 i, .b1 b { animation-delay: -1s; --y: 300px; }
.b2 i, .b2 b { animation-delay: -0.5s; --y: 220px; }
.b3 i, .b3 b { animation-delay: -4s; --y: 150px; }
.b4 i, .b4 b { animation-delay: -3.5s; --y: 20px; }
.b5 i, .b5 b { animation-delay: -3s; --y: 250px; }
.b6 i, .b6 b { animation-delay: -2.5s; --y: 90px; }
.b7 i, .b7 b { animation-delay: -2s; --y: 180px; }
/* eighth notes between beats: landing at 1.25, 2.25, 3.25 and 3.75 s */
.h1 i, .h1 b { animation-delay: -0.25s; --y: 280px; }
.h2 i, .h2 b { animation-delay: -3.25s; --y: 200px; }
.h3 i, .h3 b { animation-delay: -2.25s; --y: 40px; }
.h4 i, .h4 b { animation-delay: -1.75s; --y: 110px; }
.hw-perfect {
  position: absolute; left: 0; right: 0; top: 40%; text-align: center;
  font: 700 1.25rem/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 194, 71, 0.6), 2px 2px 0 var(--near-black);
  animation: perfect-pop 0.5s steps(1) infinite;
}
@keyframes perfect-pop { 0% { transform: translateY(0); opacity: 1; } 40% { transform: translateY(-4px); opacity: 0.85; } 80% { opacity: 0.6; } }

/* Today's song, like a cassette label. */
.now {
  position: relative; background: var(--panel); border: 2px solid var(--line); padding: 18px 18px 20px;
  margin: 0; box-shadow: 4px 4px 0 var(--near-black); align-self: start;
}
.now-tag {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px;
  font: 400 0.75rem/1.4 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
}
.onair {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 8px 3px 6px; color: var(--ink);
  background: var(--indigo); border: 2px solid var(--cyan-shade);
}
.onair::before { content: ""; width: 8px; height: 8px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.now-title {
  font-size: 1.75rem; line-height: 1.15; letter-spacing: 0.05em; margin: 0 0 6px; color: var(--ink);
  text-shadow: 0 0 14px rgba(232, 230, 255, 0.35);
}
@media (min-width: 600px) { .now-title { font-size: 2.25rem; } }
.now-meta { margin: 0 0 16px; color: var(--dim); font: 400 0.875rem/1.4 var(--display); letter-spacing: 0.08em; }
.root-says {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; margin: 0;
  border-top: 2px solid var(--line); padding-top: 16px;
}
.root-says .root-anim {
  /* Root composing at his synth: the app's compose clip, 8 frames of 64×64 at 150 ms (a seamless 1.2 s loop). */
  display: block; width: 64px; height: 64px; grid-row: span 2;
  background: url("/img/px/root-compose.png") 0 0 / 512px 64px no-repeat; image-rendering: pixelated;
  animation: root-compose 1.2s steps(8) infinite;
}
@keyframes root-compose { to { background-position: -512px 0; } }
.root-says blockquote { margin: 0; }
.root-says blockquote p { margin: 0; font: 400 1.125rem/1.45 var(--voice); max-width: 32rem; }
.root-says figcaption {
  margin-top: 8px; font: 400 0.75rem/1.4 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan);
}
.root-says figcaption::before { content: "— "; }

/* ---------- Landing: bands ---------- */
.band { border-top: 2px solid var(--line); padding: 56px 0; }
@media (min-width: 900px) { .band { padding: 88px 0; } }
.band p { max-width: 38rem; }
.kicker-amber { color: var(--amber); }

/* Scroll-in: things rise into place as they enter the screen, driven by the scroll itself (no script). Browsers
   without scroll-driven animations, and anyone asking for reduced motion, just see everything in place. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }

/* The story: the first three worlds (the app's backdrops at 2x, the boss idling at 2x), then three screens. */
.story-band { background: linear-gradient(var(--near-black), var(--bg)); }
.story-head h2 { color: var(--ink); text-shadow: 0 0 18px rgba(255, 194, 71, 0.3); }
.worlds {
  list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) { .worlds { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.world {
  --c: var(--cyan);
  position: relative; display: flex; flex-direction: column; padding: 0 0 14px; background: var(--panel);
  border: 2px solid var(--line); border-top: 4px solid var(--c); box-shadow: 4px 4px 0 var(--near-black);
  transition: transform 120ms steps(3), box-shadow 120ms steps(3);
}
.world:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--near-black), 0 0 24px color-mix(in srgb, var(--c) 30%, transparent); }
.w-boot { --c: var(--cyan); } .w-downloads { --c: var(--green); } .w-bin { --c: var(--magenta); } .w-more { --c: var(--amber); }
.world-art {
  display: grid; place-items: center; height: 160px; margin-bottom: 12px; overflow: hidden;
  background: var(--near-black) 50% 40% / 442px 900px no-repeat; image-rendering: pixelated;
  box-shadow: inset 0 -40px 40px -20px var(--panel);
}
.w-boot .world-art { background-image: url("/img/px/world-boot.png"); }
.w-downloads .world-art { background-image: url("/img/px/world-downloads.png"); }
.w-bin .world-art { background-image: url("/img/px/world-bin.png"); background-position: 50% 75%; }
.world .boss { filter: drop-shadow(0 0 10px rgba(5, 4, 16, 0.9)); }
.world-num, .world h3, .world-boss { padding: 0 14px; }
.world-num { font: 400 0.6875rem/1.4 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--c); }
.world h3 { margin: 4px 0 4px; font-size: 1rem; }
.world-boss { color: var(--dim); font-size: 0.875rem; }
.w-more { justify-content: flex-end; min-height: 100%; }
.world-more-n {
  display: grid; place-items: center; height: 160px; margin-bottom: 12px;
  font: 700 3rem/1 var(--display); color: var(--amber); text-shadow: 0 0 18px rgba(255, 194, 71, 0.45);
  background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(44, 39, 102, 0.5) 6px 8px), var(--near-black);
}
@media (max-width: 420px) { .world-art, .world-more-n { height: 128px; } .world h3 { font-size: 0.875rem; } }

/* Three screens from the game in neon frames; a swipeable row on phones. */
.shots {
  display: flex; gap: 20px; margin: 40px calc(var(--gutter) * -1) 0; padding: 12px var(--gutter) 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .shots { justify-content: center; gap: 40px; overflow: visible; margin: 48px 0 0; padding: 0; } }
.shot {
  flex: 0 0 240px; margin: 0; scroll-snap-align: center; border: 2px solid var(--green-shade);
  background: var(--near-black); box-shadow: 0 0 0 4px var(--near-black), 0 0 32px rgba(141, 255, 106, 0.2), 6px 6px 0 4px var(--near-black);
  transition: transform 160ms steps(4);
}
.shot-boss { border-color: var(--magenta-shade); box-shadow: 0 0 0 4px var(--near-black), 0 0 32px rgba(255, 79, 179, 0.25), 6px 6px 0 4px var(--near-black); }
.shot:last-child { border-color: var(--amber-shade); box-shadow: 0 0 0 4px var(--near-black), 0 0 32px rgba(255, 194, 71, 0.2), 6px 6px 0 4px var(--near-black); }
@media (min-width: 900px) { .shot { flex-basis: 280px; } .shot-boss { transform: translateY(-24px); } }
.shot:hover { transform: translateY(-8px); }
.shot img { display: block; width: 100%; height: auto; image-rendering: auto; }

/* The daily song: the gameplay clip beside the day's steps. */
.day-band { background: var(--bg); }
.day-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .day-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 64px; align-items: start; } }
.day-head p { color: var(--dim); }
.playfield { position: relative; width: 100%; max-width: 280px; margin: 28px 0 0; }
@media (max-width: 899px) { .playfield { margin-left: auto; margin-right: auto; } }
.demo-frame {
  position: relative; width: 100%; aspect-ratio: 720 / 1566;
  border: 2px solid var(--cyan-shade); background: var(--near-black); overflow: hidden;
  box-shadow: 0 0 0 4px var(--near-black), 0 0 40px rgba(63, 224, 255, 0.25), 8px 8px 0 4px var(--near-black);
}
.demo-frame video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sound {
  position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 12px; cursor: pointer;
  font: 700 0.75rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: rgba(5, 4, 16, 0.85); border: 2px solid var(--cyan);
  box-shadow: 3px 3px 0 var(--near-black);
}
.sound:hover { background: var(--indigo); }
.sound:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--near-black); }
.sound[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
/* A pixel speaker: a box and a cone, plus two waves when the sound is on. */
.sound-icon { position: relative; width: 16px; height: 14px; }
.sound-icon::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 4px; height: 6px; background: currentColor;
  box-shadow: 4px -2px 0 currentColor, 4px 0 0 currentColor, 4px 2px 0 currentColor, 4px 4px 0 currentColor,
    6px -4px 0 currentColor, 6px 6px 0 currentColor;
}
.sound[aria-pressed="true"] .sound-icon::after {
  content: ""; position: absolute; left: 11px; top: 3px; width: 2px; height: 8px; background: currentColor;
  box-shadow: 3px -3px 0 currentColor, 3px 0 0 currentColor, 3px 3px 0 currentColor, 3px 5px 0 currentColor;
}

/* The share card */
/* How a day goes: steps falling down a lane. Each step's note is the app's tap note (36x12) in a box with room for
   its glow (the old box was the sprite's own size, so the glow and the flare's sparks were cut off). */
.day { list-style: none; margin: 0; padding: 0; position: relative; }
.day::before {
  content: ""; position: absolute; left: 25px; top: 8px; bottom: 8px; width: 2px;
  background: repeating-linear-gradient(var(--line) 0 8px, transparent 8px 12px);
}
.step { position: relative; padding: 0 0 32px 68px; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 0; top: -2px; width: 52px; height: 24px;
  background: url("/img/px/note-tap-cyan.png") center / 36px 12px no-repeat; image-rendering: pixelated;
  filter: drop-shadow(0 0 4px rgba(63, 224, 255, 0.55));
}
.step:nth-child(even)::before { background-image: url("/img/px/note-tap-green.png"); filter: drop-shadow(0 0 4px rgba(141, 255, 106, 0.55)); }
.step-breach::before { background-image: url("/img/px/note-tap-flare.png"); filter: drop-shadow(0 0 5px rgba(255, 194, 71, 0.6)); }
.step-trace::before {
  background: linear-gradient(var(--magenta), var(--magenta)) center / 36px 8px no-repeat;
  filter: drop-shadow(0 0 5px rgba(255, 79, 179, 0.7));
}
.when {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-height: 19px;
  font: 400 0.75rem/1.2 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber);
}
.when img { width: auto; height: auto; }
.step p { margin: 0; color: var(--ink); }
.mini-meter {
  display: block; width: min(240px, 100%); height: 12px; margin-top: 12px; border: 2px solid var(--line);
  background: var(--near-black); position: relative;
}
.mini-meter i { position: absolute; inset: 0 auto 0 0; }
.mini-breach i { width: 100%; background: repeating-linear-gradient(90deg, var(--cyan) 0 6px, transparent 6px 8px); }
.mini-trace i { width: 72%; background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 8px); }

/* Versus and the shop */
.more-band { background: var(--bg); }
.more-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
@media (min-width: 900px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
.more-card {
  --c: var(--magenta);
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px; align-items: center; padding: 20px;
  background: var(--panel); border: 2px solid var(--line); border-left: 6px solid var(--c);
  box-shadow: 4px 4px 0 var(--near-black); transition: transform 120ms steps(3), box-shadow 120ms steps(3);
}
.more-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--near-black); }
/* The shop card reads as a different thing from Versus: amber, a warm glow, and the starter deal's art on the right. */
.more-shop {
  --c: var(--amber);
  grid-template-columns: minmax(0, 1fr) 192px;
  background: radial-gradient(120% 140% at 100% 50%, rgba(255, 194, 71, 0.16), transparent 60%), var(--panel);
  border-color: rgba(255, 194, 71, 0.45); border-left-width: 2px; border-right: 6px solid var(--c);
}
.more-shop .starter { order: 2; width: 192px; height: 112px; image-rendering: pixelated; }
@media (max-width: 420px) { .more-shop { grid-template-columns: minmax(0, 1fr); } .more-shop .starter { order: 0; } }
.more-card h3 { color: var(--c); font-size: 1.25rem; margin-bottom: 8px; }
.more-card p { margin: 0; }
@media (max-width: 420px) { .more-card { grid-template-columns: minmax(0, 1fr); justify-items: start; } }

/* Five tiers: the genre ladder (green, cyan, amber, magenta, ultraviolet) */
.tier-band { background: var(--near-black); }
.tiers { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.tier {
  --t: var(--ink);
  position: relative;
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; row-gap: 6px;
  grid-template-areas: "icon name" "icon bar" "icon note";
  padding: 14px 16px; background: var(--panel); border: 2px solid var(--line); border-left: 6px solid var(--t);
}
.tier img { grid-area: icon; width: 48px; height: 48px; }
.t-name { grid-area: name; font: 700 1rem/1.5 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t); }
.t-bar { grid-area: bar; display: block; height: 10px; background: var(--near-black); }
.t-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--t) 0 6px, transparent 6px 8px); }
.t-note { grid-area: note; color: var(--dim); font-size: 0.9375rem; }
.t-easy { --t: var(--green); }   .t-easy .t-bar i { width: 53%; }
.t-normal { --t: var(--cyan); }  .t-normal .t-bar i { width: 63%; }
.t-hard { --t: var(--amber); }   .t-hard .t-bar i { width: 82%; }
.t-expert { --t: var(--magenta); }  .t-expert .t-bar i { width: 92%; }
.t-insane { --t: var(--ultraviolet); }  .t-insane .t-bar i { width: 100%; }
.t-insane img { height: 54px; margin-top: -6px; }

/* Insane: locked until you "beat Expert" (a tap, a hover, or ~4 s on screen on a touch screen; site.js). It wakes
   like a neon sign (a stepped flicker, 1.3 s), then fire catches along its bottom edge and a few embers rise.
   Without the script it shows unlocked. Pixel fire is img/px/flame-insane.png: three 24x6 frames, drawn at 2x. */
.t-insane .n-locked, .t-hint, .t-fire, .t-ember { display: none; }
.t-lock {
  display: inline-block; width: 14px; height: 18px; margin-right: 8px; vertical-align: -3px;
  background: url("/img/px/lock.png") 0 0 / 14px 18px no-repeat; image-rendering: pixelated;
}
.t-hint {
  margin-left: 10px; font: 400 0.6875rem/1 var(--display); letter-spacing: 0.14em; color: #d9c2ff; vertical-align: 2px;
}
.t-insane.is-locked { --t: var(--line); }
.t-insane.is-locked img { filter: grayscale(1) brightness(0.5); }
.t-insane.is-locked .t-name { color: var(--dim); }
.t-insane.is-locked .t-bar i { width: 0; }
.t-insane.is-locked .n-open { display: none; }
.t-insane.is-locked .n-locked { display: inline; }
.t-insane.is-locked .t-hint { display: inline; animation: hint-blink 1.2s steps(1) infinite; }
@keyframes hint-blink { 50% { opacity: 0.35; } }
/* The whole card is the button; its label is for screen readers and keyboards (the focus ring is the site's). */
.t-wake {
  position: absolute; inset: 0; width: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 0; color: transparent;
}
.link-button {
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 0.9375rem; color: var(--cyan);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px;
}
.link-button:hover { color: var(--green); }

/* Lit: the neon tube, pulsing in three steps */
.t-insane.is-lit {
  border-color: rgba(157, 92, 255, 0.6); border-left-color: var(--t);
  box-shadow: 0 0 10px rgba(157, 92, 255, 0.45), inset 0 0 8px rgba(157, 92, 255, 0.25);
  animation: neon-pulse 2.4s steps(1) infinite;
}
.t-insane.is-lit .t-name { text-shadow: 0 0 8px rgba(157, 92, 255, 0.8); }
@keyframes neon-pulse {
  0% { box-shadow: 0 0 6px rgba(157, 92, 255, 0.35), inset 0 0 6px rgba(157, 92, 255, 0.2); }
  33% { box-shadow: 0 0 10px rgba(157, 92, 255, 0.45), inset 0 0 8px rgba(157, 92, 255, 0.25); }
  66% { box-shadow: 0 0 14px rgba(157, 92, 255, 0.55), inset 0 0 10px rgba(157, 92, 255, 0.3); }
}
/* Waking: the sign flickers on and the bar steps to full */
.t-insane.is-waking, .t-insane.is-waking img, .t-insane.is-waking .t-name, .t-insane.is-waking .t-bar {
  animation: neon-wake 1.3s steps(1) both;
}
.t-insane.is-waking .t-bar i { animation: bar-fill 0.7s steps(14, end) both; }
@keyframes neon-wake {
  0% { opacity: 0.2; } 8% { opacity: 1; } 12% { opacity: 0.2; } 26% { opacity: 1; } 29% { opacity: 0.2; }
  33% { opacity: 0.6; } 40% { opacity: 0.2; } 46%, 100% { opacity: 1; }
}
@keyframes bar-fill { from { width: 0; } to { width: 100%; } }
/* Then the fire catches along the bottom edge, fading out to the right, and embers rise now and then */
.t-insane.is-fire .t-fire {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; pointer-events: none; opacity: 0.85;
  background: url("/img/px/flame-insane.png") 0 0 / 48px 36px repeat-x; image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(to right, #000 40%, rgba(0, 0, 0, 0.25));
  mask-image: linear-gradient(to right, #000 40%, rgba(0, 0, 0, 0.25));
  animation: fire-flick 0.5s steps(1) infinite;
}
.t-insane.fire-in .t-fire { animation: fire-flick 0.3s steps(1) infinite, fire-sweep 0.7s steps(12, end) both; }
@keyframes fire-flick { 0% { background-position-y: 0; } 33% { background-position-y: -12px; } 66% { background-position-y: -24px; } }
@keyframes fire-sweep { from { clip-path: inset(-20px 100% 0 0); } to { clip-path: inset(-20px 0 0 0); } }
.t-insane.is-fire .t-ember {
  display: block; position: absolute; bottom: 8px; width: 2px; height: 2px; background: #d9c2ff; opacity: 0;
  pointer-events: none; animation: ember-rise 3.4s steps(10) infinite;
}
.t-ember.e1 { left: 18%; }
.t-ember.e2 { left: 52%; background: var(--ink); }
.t-ember.e3 { left: 77%; }
.t-insane.is-fire .t-ember.e2 { animation-duration: 4.1s; animation-delay: 1.3s; }
.t-insane.is-fire .t-ember.e3 { animation-duration: 4.8s; animation-delay: 2.6s; }
.t-insane.fire-in .t-ember { animation: ember-rise 1.2s steps(8) 0.5s both; }
@keyframes ember-rise {
  0% { transform: translate(0, 0); opacity: 0.9; } 50% { transform: translate(3px, -22px); opacity: 0.9; }
  100% { transform: translate(-2px, -44px); opacity: 0; }
}

/* Root */
.root-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .root-grid { grid-template-columns: 480px minmax(0, 1fr); gap: 64px; } }
/* Root rocking out: img/px/root-rock.png is 8 frames of 64x64 art pixels side by side (Art/scripts/rock.py), stepped
   through once a second: two beats at 120 BPM. --s is the whole-number scale; reduced motion shows the first frame. */
.root-rock {
  --s: 5; width: calc(64px * var(--s)); height: calc(64px * var(--s)); justify-self: center;
  background: url("/img/px/root-rock.png") 0 0 / calc(512px * var(--s)) calc(64px * var(--s)) no-repeat;
  image-rendering: pixelated; animation: root-rock 1s steps(8) infinite;
}
@keyframes root-rock { to { background-position: calc(-512px * var(--s)) 0; } }
@media (max-width: 359px) { .root-rock { --s: 4; } }
@media (min-width: 900px) { .root-rock { --s: 7; } }
.root-voice { margin: 0 0 20px; padding: 0 0 0 18px; border-left: 4px solid var(--cyan); }
.root-voice p { font: 400 1.25rem/1.5 var(--voice); margin: 0 0 12px; max-width: 34rem; }
.root-band .measure { color: var(--dim); }

/* The end */
.end-band { background: var(--panel); text-align: center; }
.end { display: flex; flex-direction: column; align-items: center; }
.end h2 { max-width: 20ch; margin-bottom: 8px; }
.end > p { margin: 0 0 24px; }
.end p.end-help { margin: 28px 0 0; color: var(--dim); font-size: 0.9375rem; }
.end .root-dj { --s: 2; margin: 0 auto 16px; }

/* ---------- Long-form pages (privacy, terms, support) ---------- */
main.wrap { padding-top: 32px; padding-bottom: 56px; }
.doc { max-width: 52rem; }
.doc h1 { text-shadow: 0 0 18px rgba(63, 224, 255, 0.3); }
.doc h2 { font-size: 1.25rem; color: var(--cyan); margin: 40px 0 12px; }
.doc h3 { color: var(--amber); margin: 24px 0 8px; }
.doc p, .doc li { max-width: 40rem; }
.doc ul { padding-left: 1.25em; }
.doc li { margin: 6px 0; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 1rem; }
.doc th, .doc td { border: 2px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { font: 700 0.75rem var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); background: var(--panel); }
.table-scroll { overflow-x: auto; }
.updated { color: var(--dim); font-size: 0.9375rem; }

details { background: var(--panel); border: 2px solid var(--line); margin: 12px 0; padding: 0 18px; }
details[open] { padding-bottom: 12px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--ink); }
summary:hover { color: var(--cyan); }

.contact { font: 700 1.125rem var(--display); letter-spacing: 0.04em; overflow-wrap: anywhere; }

/* ---------- Room invite (/r/<code>, README "Deep links") ---------- */
.invite { max-width: 40rem; text-align: center; padding-top: 40px; }
.invite h1 { font-size: 1.5rem; text-shadow: 0 0 18px rgba(63, 224, 255, 0.3); }
@media (min-width: 600px) { .invite h1 { font-size: 2rem; } }
.invite-root { width: 128px; height: 128px; display: block; margin: 0 auto 16px; }
.invite-who { margin: 0 auto 24px; max-width: 32rem; color: var(--dim); }
.room-code {
  display: inline-block; margin: 0 0 28px; padding: 14px 22px 10px 32px;
  font: 700 3.5rem/1 var(--display); letter-spacing: 0.3em; color: var(--amber);
  background: var(--near-black); border: 2px solid var(--amber-shade);
  box-shadow: 0 0 32px rgba(255, 194, 71, 0.25), 6px 6px 0 var(--near-black);
  text-shadow: 0 0 14px rgba(255, 194, 71, 0.5);
}
@media (min-width: 600px) { .room-code { font-size: 4.5rem; } }
.invite-cta { margin: 0 0 16px; }
.get-app {
  display: inline-block; padding: 16px 26px; min-width: 16rem;
  font: 700 1rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  color: var(--near-black); background: var(--cyan); border: 2px solid var(--cyan);
  box-shadow: 0 0 24px rgba(63, 224, 255, 0.35), 4px 4px 0 var(--cyan-deep);
}
.get-app:hover, .get-app:focus-visible { color: var(--near-black); background: var(--green); border-color: var(--green); }
.get-app:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--cyan-deep); }
.get-app-alt { color: var(--cyan); background: transparent; box-shadow: 4px 4px 0 var(--cyan-deep); }
.invite-copied { margin: 0 auto 12px; max-width: 30rem; color: var(--green); font-size: 0.9375rem; }
.invite-noapp { margin: 0 auto 12px; max-width: 30rem; color: var(--dim); font-size: 0.9375rem; }
.invite .fine { max-width: 32rem; margin: 24px auto 0; }
.invite-link { overflow-wrap: anywhere; color: var(--ink); }

/* ---------- Beat Lab song (/s/<code>, spec §13): the song's name on a cassette label in its colour ---------- */
.song-tape {
  display: inline-block; margin: 0 0 28px; padding: 18px 28px 14px; max-width: 100%;
  background: var(--near-black); border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--near-black);
}
.song-tape .song-name {
  display: block; padding: 10px 18px 8px; overflow-wrap: anywhere;
  font: 700 1.5rem/1.2 var(--display); letter-spacing: 0.06em; color: var(--near-black); background: var(--amber);
}
@media (min-width: 600px) { .song-tape .song-name { font-size: 2rem; } }
.song-tape .song-about { display: block; margin-top: 10px; color: var(--dim); font-size: 0.9375rem; }
.tape-orange .song-name { background: #ff9a3c; }
.tape-cyan .song-name { background: var(--cyan); }
.tape-pink .song-name { background: var(--magenta); }
.tape-green .song-name { background: var(--green); }
.tape-yellow .song-name { background: var(--amber); }
.tape-purple .song-name { background: var(--ultraviolet); }

/* Motion: nothing animates or blinks (the demo video doesn't autoplay either, see site.js). Sprites hold their
   first frame; the hero's notes hold mid-fall (--y) with no flashes. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-play-state: paused !important; transition: none !important; }
  .onair::before { animation: none; }
  .root-rock, .sprite, .root-says .root-anim { animation: none; background-position: 0 0; }
  .n i, .n b, .hitline, .hw-perfect { animation: none !important; }
  .reveal { animation: none !important; }
  /* Insane: straight to lit, still flames, no embers or blinking. */
  .t-insane, .t-insane *, .t-insane .t-fire { animation: none !important; }
  .t-insane .t-ember { display: none !important; }
  .t-insane .t-fire { -webkit-mask-image: none; mask-image: none; }
}
