/* ---------- Networks (themes) ---------- */
:root, [data-net="checker"] {
  --bg: #fffdf5; --on-bg: #111; --bg2: #ffd400; --on-bg2: #111;
  --paper: #fff; --ink: #111; --line: #111;
  --a1: #ff2e88; --a1-ink: #111; --a2: #00c2ff; --a2-ink: #111; --a3: #ffd400; --a3-ink: #111;
  --hero: conic-gradient(#111 25%, #fff 0 50%, #111 0 75%, #fff 0) 0 0 / 72px 72px;
  --r: 8px; --tilt: -2deg;
}
[data-net="splat"] {
  --bg: #ff7a1a; --on-bg: #1b1035; --bg2: #ffb400; --on-bg2: #1b1035;
  --paper: #fff6e0; --ink: #1b1035; --line: #1b1035;
  --a1: #7ddc1f; --a1-ink: #1b1035; --a2: #7a3cff; --a2-ink: #fff; --a3: #00b3ff; --a3-ink: #1b1035;
  --hero: radial-gradient(circle at 12% 22%, #7ddc1f 0 46px, transparent 47px),
          radial-gradient(circle at 21% 30%, #7ddc1f 0 18px, transparent 19px),
          radial-gradient(circle at 86% 16%, #7a3cff 0 60px, transparent 61px),
          radial-gradient(circle at 78% 84%, #7ddc1f 0 70px, transparent 71px),
          radial-gradient(circle at 8% 88%, #00b3ff 0 40px, transparent 41px), #ff7a1a;
  --r: 26px; --tilt: 3deg;
}
[data-net="ribbon"] {
  --bg: #2331f5; --on-bg: #fff; --bg2: #7b2cff; --on-bg2: #fff;
  --paper: #fff; --ink: #0d1040; --line: #0d1040;
  --a1: #ffe14d; --a1-ink: #0d1040; --a2: #4df3ff; --a2-ink: #0d1040; --a3: #ff5fd2; --a3-ink: #0d1040;
  --hero: radial-gradient(circle at 20% 20%, rgba(255,255,255,.35) 0 2px, transparent 3px) 0 0 / 90px 90px,
          radial-gradient(circle at 70% 60%, rgba(255,255,255,.3) 0 3px, transparent 4px) 0 0 / 130px 130px,
          linear-gradient(135deg, #1b28ff, #7b2cff 55%, #ff5fd2);
  --r: 34px; --tilt: -3deg;
}
[data-net="late"] {
  --bg: #07070d; --on-bg: #eafff2; --bg2: #11112a; --on-bg2: #eafff2;
  --paper: #15152e; --ink: #eafff2; --line: #39ff88;
  --a1: #39ff88; --a1-ink: #07070d; --a2: #ff3df0; --a2-ink: #07070d; --a3: #ffe14d; --a3-ink: #07070d;
  --hero: repeating-linear-gradient(0deg, rgba(57,255,136,.12) 0 2px, transparent 2px 6px), #07070d;
  --r: 4px; --tilt: -1deg;
}

/* ---------- Base ---------- */
:root { --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .9 0 0 0 0 .9 0 0 0 1.6 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip;
       font: 500 17px/1.55 "Fredoka", ui-rounded, system-ui, sans-serif; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--a2); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: #fff; color: #111; padding: 8px 12px; }
.skip:focus { left: 8px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ch { padding: 84px 0; background: var(--bg); color: var(--on-bg); border-top: 5px solid var(--line); position: relative; scroll-margin-top: 0; }
.ch.alt { background: var(--bg2); color: var(--on-bg2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
       font-family: "Bungee", sans-serif; font-size: 15px; letter-spacing: .02em; line-height: 1.1;
       padding: 12px 18px; background: var(--paper); color: var(--ink); border: 4px solid var(--line);
       border-radius: var(--r); box-shadow: 5px 5px 0 var(--line); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }
.btn.big { font-size: 19px; padding: 15px 24px; background: var(--a1); color: var(--a1-ink); }
.btn.ghost { background: transparent; color: inherit; box-shadow: none; border-style: dashed; }
.btn.small { font-size: 13px; padding: 8px 12px; }

.bumper { margin-bottom: 36px; }
.bumper h2 { font-family: "Bungee", sans-serif; font-size: clamp(2rem, 6.5vw, 4rem); line-height: 1; margin: 12px 0 10px;
             text-shadow: 4px 4px 0 var(--a1); }
[data-net="late"] .bumper h2 { text-shadow: 0 0 18px var(--a1); }
.bumper p { font-size: 1.15rem; max-width: 48ch; }
.chip { display: inline-block; font-family: "VT323", monospace; font-size: 1.5rem; line-height: 1; padding: 6px 12px 4px;
        background: var(--line); color: var(--bg); transform: rotate(var(--tilt)); border-radius: calc(var(--r) / 2); }
[data-net="late"] .chip { color: #07070d; }

/* ---------- CH 01: hero ---------- */
.hero { background: var(--hero); border-top: 0; padding: 96px 16px 84px; min-height: min(92vh, 860px); display: grid; place-items: center; }
.tv { position: relative; width: min(1000px, 100%); display: grid; grid-template-columns: 1fr 92px; gap: 16px; padding: 20px;
      background: var(--a1); border: 5px solid var(--line); border-radius: 34px; box-shadow: 12px 12px 0 var(--line); }
.tv::before, .tv::after { content: ""; position: absolute; bottom: 100%; left: 50%; width: 5px; height: 70px; background: var(--line);
      transform-origin: bottom; border-radius: 3px; }
.tv::before { transform: rotate(-32deg); } .tv::after { transform: rotate(28deg); }
.screen { position: relative; overflow: hidden; background: #0b1020; color: #fff; border: 5px solid var(--line);
          border-radius: 46px / 40px; padding: clamp(24px, 5vw, 56px); min-width: 0; }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
          background: repeating-linear-gradient(0deg, rgba(255,255,255,.055) 0 2px, transparent 2px 5px),
                      radial-gradient(ellipse at 30% 0%, rgba(255,255,255,.14), transparent 60%); }
.bug { font-family: "VT323", monospace; font-size: 1.5rem; letter-spacing: .12em; text-transform: uppercase; color: #39ff88;
       display: flex; align-items: center; gap: 10px; }
.rec { width: 12px; height: 12px; border-radius: 50%; background: #ff3b3b; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
h1 { font-family: "Bungee", sans-serif; font-size: clamp(1.9rem, 8.4vw, 5.4rem); line-height: .98; margin: 10px 0 18px; text-transform: uppercase; }
h1 span { display: block; }
h1 span:first-child { color: #ffd400; text-shadow: 4px 4px 0 #ff2e88; }
h1 span:last-child { color: #fff; text-shadow: 4px 4px 0 #00c2ff; }
.role { font-size: clamp(1.05rem, 2.6vw, 1.5rem); font-weight: 700; }
.tagline { margin-top: 8px; font-size: 1.1rem; color: #c9d2ff; max-width: 46ch; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; position: relative; z-index: 1; }
.cta .btn { border-color: #fff; box-shadow: 5px 5px 0 #fff; }
.cta .btn.big { background: #ffd400; color: #111; border-color: #111; box-shadow: 5px 5px 0 #fff; }
.cta .btn.ghost { box-shadow: none; color: #fff; }
.tv-side { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 10px; }
.knob { width: 58px; height: 58px; border-radius: 50%; background: var(--paper); border: 5px solid var(--line); position: relative; }
.knob::after { content: ""; position: absolute; left: 50%; top: 5px; width: 5px; height: 18px; margin-left: -2.5px; background: var(--line); border-radius: 3px; }
.knob.small { width: 42px; height: 42px; transform: rotate(40deg); }
.grille { flex: 1; width: 58px; min-height: 60px; border-radius: 8px; background: repeating-linear-gradient(0deg, var(--line) 0 5px, transparent 5px 12px); }
.onair { font-family: "VT323", monospace; font-size: 1.15rem; line-height: 1; padding: 6px 6px 4px; background: #ff3b3b; color: #fff;
         border: 3px solid var(--line); border-radius: 6px; animation: blink 2s steps(2) infinite; }
.rating { position: absolute; left: clamp(12px, 4vw, 48px); bottom: 20px; display: flex; align-items: center; gap: 10px;
          background: #fff; color: #111; border: 4px solid #111; padding: 6px 12px 6px 6px; transform: rotate(-3deg); max-width: 260px; }
.rating b { font-family: "Bungee", sans-serif; background: #111; color: #fff; padding: 6px 8px; font-size: 1rem; line-height: 1; text-align: center; }
.rating small { font-size: .78rem; line-height: 1.2; font-weight: 600; }

/* ---------- The TV's channels ---------- */
.screen { transition: background-color .1s; }
.screen[data-c="1"] { background: #2a0a14; } .screen[data-c="2"] { background: #08204a; } .screen[data-c="3"] { background: #0c2b1c; }
.screen[data-c="4"] { background: #2b1d08; } .screen[data-c="5"] { background: #200a33; }
.chans { display: grid; position: relative; z-index: 1; }
.chan { grid-area: 1 / 1; visibility: hidden; opacity: 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.chan.on { visibility: visible; opacity: 1; }
.station { font-family: "Bungee", sans-serif; font-size: clamp(2rem, 8.4vw, 5rem); line-height: 1; margin: 10px 0 14px; color: #ffd400; text-shadow: 4px 4px 0 #ff2e88; text-transform: uppercase; }
.screen[data-c="2"] .station { text-shadow: 4px 4px 0 #00c2ff; } .screen[data-c="3"] .station { color: #fff; text-shadow: 4px 4px 0 #18b45a; }
.screen[data-c="5"] .station { color: #fff; }
.when { font-family: "VT323", monospace; font-size: 1.35rem; color: #c9d2ff; letter-spacing: .04em; margin-top: 2px; }
.hl { margin-top: 14px; display: grid; gap: 8px; max-width: 62ch; }
.hl li { position: relative; padding-left: 26px; font-size: 1.05rem; line-height: 1.4; }
.hl li::before { content: "▶"; position: absolute; left: 0; top: .15em; font-size: .8em; color: #39ff88; }
.hl b { color: #ffd400; font-weight: 700; }
.ch-osd { position: absolute; top: 14px; right: 22px; z-index: 2; font-family: "VT323", monospace; font-size: 1.5rem; line-height: 1; color: #39ff14; text-shadow: 2px 2px 0 #000; white-space: pre; }
.snow { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background-color: #15151c; background-image: var(--noise); }
.snow.on { animation: snow .38s steps(4); }
button.knob { padding: 0; cursor: pointer; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); flex: none; }
button.knob:hover { filter: brightness(.92); }
.strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.strip button { font-family: "VT323", monospace; font-size: 1.3rem; line-height: 1; padding: 9px 12px 7px; background: var(--paper); color: var(--ink);
                border: 3px solid var(--line); border-radius: 8px; box-shadow: 0 4px 0 var(--line); }
.strip button b { font-weight: 400; opacity: .6; margin-right: 4px; }
.strip button[aria-selected="true"] { background: #ffd400; color: #111; transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }

.ticker { background: var(--line); color: var(--a3); overflow: hidden; border-top: 5px solid var(--line); font-family: "VT323", monospace; font-size: 1.6rem; white-space: nowrap; }
[data-net="late"] .ticker { background: #000; }
.ticker-track { display: inline-flex; animation: tick 46s linear infinite; padding: 8px 0 5px; }
.ticker span { padding: 0 26px; }
.ticker span::before { content: "★"; margin-right: 26px; color: var(--a1); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- CH 02: guide ---------- */
.guide { background: #0a1766; color: #fff; border: 5px solid var(--line); border-radius: var(--r); box-shadow: 9px 9px 0 var(--line);
         font-family: "VT323", monospace; overflow: hidden; }
.guide-bar { display: flex; justify-content: space-between; padding: 8px 14px 5px; background: #050b3a; color: #ffe14d; font-size: 1.5rem; letter-spacing: .08em; }
.guide-scroll { overflow-x: auto; }
.guide-grid { display: grid; grid-template-columns: 92px repeat(72, minmax(9px, 1fr)); gap: 3px; padding: 3px; min-width: 860px; }
.guide-grid > * { border: 2px solid; border-color: #8ea0ff #060d4d #060d4d #8ea0ff; padding: 7px 8px 5px; min-width: 0; }
.g-corner, .g-label, .g-year { background: #1b2a9c; color: #ffe14d; font-size: 1.25rem; grid-column: 1; display: flex; align-items: center; }
.g-year { justify-content: center; }
.g-corner, .g-label { position: sticky; left: 3px; z-index: 1; }
.g-show { background: linear-gradient(#2c4be0, #1a2fa8); color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: center; min-height: 74px; overflow: hidden; }
.g-show b { font-size: 1.5rem; line-height: 1; font-weight: 400; white-space: nowrap; }
.g-show small { font-size: 1.1rem; line-height: 1.1; color: #c5d0ff; }
.g-show:hover, .g-show:focus-visible { background: #ffe14d; color: #050b3a; }
.g-show:hover small, .g-show:focus-visible small { color: #050b3a; }
.g-show.live { background: linear-gradient(#e0356f, #a81a4a); }
.g-now { border: 0; padding: 0; color: #ffe14d; text-align: center; font-size: 1rem; line-height: .9; white-space: nowrap; display: grid; justify-content: center; }

/* ---------- CH 03: experience ---------- */
.season { margin-top: 56px; scroll-margin-top: 20px; }
.season:first-of-type { margin-top: 0; }
.season-head { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 28px; margin-bottom: 22px;
               padding-bottom: 14px; border-bottom: 5px dashed currentColor; }
.season-head h3 { font-family: "Bungee", sans-serif; font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1; }
.season-head h3 small { display: block; font-family: "VT323", monospace; font-size: 1.5rem; letter-spacing: .12em; text-transform: uppercase; }
.season-head p { font-weight: 600; line-height: 1.35; }
.burst { font-family: "Bungee", sans-serif; font-size: .8rem; background: var(--a1); color: var(--a1-ink); padding: 8px 12px;
         border: 4px solid var(--line); transform: rotate(-6deg); align-self: center; border-radius: var(--r); }
.eps { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.ep { background: var(--paper); color: var(--ink); border: 4px solid var(--line); border-radius: var(--r); padding: 22px;
      box-shadow: 8px 8px 0 var(--line); transition: transform .15s; }
.ep:hover { transform: rotate(-.6deg) translateY(-3px); }
.ep:nth-child(even):hover { transform: rotate(.6deg) translateY(-3px); }
.ep-no { display: inline-block; font-family: "VT323", monospace; font-size: 1.3rem; line-height: 1; background: var(--a2); color: var(--a2-ink); padding: 5px 9px 3px; border-radius: 4px; }
.ep h4 { font-family: "Bungee", sans-serif; font-size: 1.45rem; line-height: 1.1; margin: 12px 0 4px; }
.ep-tag { font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; margin-bottom: 10px; }
.award { font-weight: 700; background: var(--a3); color: var(--a3-ink); padding: 6px 10px; border: 3px solid var(--line); border-radius: calc(var(--r) / 2); margin-bottom: 10px; display: inline-block; }
.facts { margin-top: 14px; display: grid; gap: 8px; }
.facts li { border-top: 3px dotted var(--line); padding-top: 8px; font-size: .98rem; line-height: 1.35; }
.facts b { font-family: "Bungee", sans-serif; font-size: 1.25rem; margin-right: 6px; white-space: nowrap; }

/* ---------- CH 04: numbers ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.stat { background: var(--paper); color: var(--ink); border: 4px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: 8px 8px 0 var(--line); }
.stat:nth-child(3n+1) { transform: rotate(-1.2deg); } .stat:nth-child(3n) { transform: rotate(1deg); }
.stat b { display: block; font-family: "Bungee", sans-serif; font-size: clamp(3rem, 9vw, 4.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat:nth-child(3n+1) b { color: var(--a1); } .stat:nth-child(3n+2) b { color: var(--a2); } .stat:nth-child(3n) b { color: var(--a3); }
.stat b { -webkit-text-stroke: 2px var(--line); paint-order: stroke fill; }
.stat span { font-weight: 600; }

/* ---------- CH 05: stickers ---------- */
.wall { background: var(--paper); color: var(--ink); border: 4px solid var(--line); border-radius: var(--r); padding: 24px;
        box-shadow: 8px 8px 0 var(--line); position: relative;
        background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1.5px, transparent 2px); background-size: 22px 22px; }
.wall h3 { font-family: "VT323", monospace; font-size: 1.5rem; letter-spacing: .1em; text-transform: uppercase; margin: 18px 0 10px; }
.wall h3:first-child { margin-top: 0; }
.stickers { display: flex; flex-wrap: wrap; gap: 14px; }
.sticker { font-family: "Bungee", sans-serif; font-size: 1.05rem; padding: 10px 16px; border: 4px solid #fff; outline: 3px solid var(--line);
           border-radius: 999px; background: var(--a1); color: var(--a1-ink); box-shadow: 3px 4px 0 rgba(0,0,0,.25);
           transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--rot, 0deg)); cursor: grab; position: relative; user-select: none; -webkit-user-select: none; }
.sticker:nth-child(3n+2) { background: var(--a2); color: var(--a2-ink); border-radius: 14px; }
.sticker:nth-child(3n) { background: var(--a3); color: var(--a3-ink); border-radius: 40% 60% 55% 45% / 60% 45% 55% 40%; }
.sticker.drag { cursor: grabbing; z-index: 5; box-shadow: 8px 12px 0 rgba(0,0,0,.25); }
.sticker.pop { animation: pop .5s; }
@keyframes pop { 40% { scale: 1.25; rotate: 14deg; } }
#tidy { margin-top: 22px; }

/* ---------- CH 06: game ---------- */
.arcade { background: var(--a2); color: var(--a2-ink); border: 5px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: 10px 10px 0 var(--line); max-width: 760px; }
.arcade-head { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; font-family: "VT323", monospace; font-size: 1.4rem; }
.arcade-head strong { font-family: "Bungee", sans-serif; font-weight: 400; font-size: 1.3rem; margin-right: auto; }
.heat { position: relative; height: 24px; background: #0b1020; border: 3px solid var(--line); margin: 8px 0 10px; border-radius: 6px; overflow: hidden; }
.heat i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #39ff88, #ffe14d 55%, #ff3b3b); }
.heat span { position: absolute; inset: 0; display: grid; place-items: center; font-family: "VT323", monospace; color: #fff; mix-blend-mode: difference; letter-spacing: .1em; }
.game-wrap { position: relative; border: 4px solid var(--line); border-radius: 10px; overflow: hidden; background: #0b1020; }
#game { display: block; width: 100%; height: auto; }
#game.playing { touch-action: none; cursor: none; }
.game-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
             background: rgba(11,16,32,.88); color: #fff; text-align: center; padding: 20px; }
.game-over[hidden] { display: none; }
.game-over p { max-width: 40ch; font-size: 1.05rem; }
.game-over small { font-family: "VT323", monospace; font-size: 1.15rem; color: #c9d2ff; }
.game-over .btn { border-color: #fff; box-shadow: 5px 5px 0 #fff; background: #ffd400; color: #111; }

/* ---------- CH 07: school ---------- */
.school { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 26px; align-items: start; }
.diploma { position: relative; background: var(--paper); color: var(--ink); border: 4px solid var(--line); outline: 4px double var(--line); outline-offset: -14px;
           padding: 40px 32px 46px; box-shadow: 8px 8px 0 var(--line); transform: rotate(-1.5deg); border-radius: var(--r); }
.diploma h3 { font-family: "Bungee", sans-serif; font-size: clamp(1.5rem, 4.4vw, 2.2rem); line-height: 1.1; margin: 10px 0 6px; }
.diploma p { font-size: 1.2rem; font-weight: 600; }
.diploma small { font-family: "VT323", monospace; font-size: 1.3rem; letter-spacing: .06em; }
.seal { position: absolute; right: 18px; bottom: -22px; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center;
        background: var(--a1); color: var(--a1-ink); border: 4px solid var(--line); font-size: .85rem; line-height: 1.15; font-weight: 700; transform: rotate(12deg); }
.seal b { font-family: "Bungee", sans-serif; font-weight: 400; font-size: .95rem; }
.notebook { background: #fffef2; color: #1a1a3a; border: 4px solid var(--line); border-radius: var(--r); padding: 22px 22px 22px 54px; box-shadow: 8px 8px 0 var(--line);
            background-image: linear-gradient(90deg, transparent 38px, #ff8aa8 38px 41px, transparent 41px), repeating-linear-gradient(#fffef2 0 35px, #a9c8ff 35px 37px); }
.notebook h3 { font-family: "Bungee", sans-serif; font-size: 1.3rem; line-height: 37px; }
.notebook li { line-height: 37px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- CH 08: credits ---------- */
.finale { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 28px; align-items: start; }
.contact { display: flex; flex-wrap: wrap; gap: 14px; align-content: flex-start; }
.contact .big { flex-basis: 100%; }
.hint { flex-basis: 100%; font-family: "VT323", monospace; font-size: 1.25rem; opacity: .8; margin-top: 6px; }
.credits { height: 330px; overflow: hidden; background: #0b1020; color: #fff; border: 5px solid var(--line); border-radius: var(--r); box-shadow: 8px 8px 0 var(--line); text-align: center; position: relative; }
.roll { animation: roll 24s linear infinite; padding: 0 16px; }
.credits:hover .roll, .credits:focus .roll { animation-play-state: paused; }
.roll p { font-family: "Bungee", sans-serif; font-size: 1.15rem; line-height: 1.25; margin: 0 0 34px; }
.roll small { display: block; font-family: "VT323", monospace; font-size: 1.2rem; letter-spacing: .14em; text-transform: uppercase; color: #ffe14d; }
@keyframes roll { from { transform: translateY(48px); } to { transform: translateY(-100%); } }
.fine { margin-top: 44px; font-size: .9rem; opacity: .8; }
footer.ch { padding-bottom: 130px; }

/* ---------- Remote, OSD, static, goo ---------- */
.remote { position: fixed; right: 14px; bottom: 14px; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px;
          background: #1c1c24; border: 4px solid #000; border-radius: 22px; box-shadow: 6px 6px 0 rgba(0,0,0,.45); width: 168px; }
.remote button { font-family: "VT323", monospace; font-size: 1.2rem; line-height: 1; padding: 10px 4px 8px; border-radius: 12px; border: 3px solid #000;
          background: #e9e9f2; color: #111; box-shadow: 0 4px 0 #000; }
.remote button:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.remote [data-act="net"] { background: #ffd400; } .remote .goo-btn { background: #7ddc1f; }
.unplain { display: none; }
.osd { position: fixed; top: 14px; left: 16px; z-index: 80; pointer-events: none; font-family: "VT323", monospace; font-size: 2rem; line-height: 1;
       color: #39ff14; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; opacity: 0; transition: opacity .5s; white-space: pre; }
.osd.on { opacity: 1; transition: none; }
/* Both full-screen overlays stay out of the page entirely until they play: phone browsers tint their
   top bar from fixed elements at the top edge, even ones parked off-screen. */
.static { display: none; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0; background-color: #15151c;
  background-image: var(--noise); }
.static.on { display: block; animation: snow .34s steps(4); }
@keyframes snow { 0% { opacity: .95; background-position: 0 0; } 33% { background-position: 60px -90px; } 66% { background-position: -80px 40px; opacity: .9; } 100% { opacity: 0; background-position: 30px 70px; } }
.slime { display: none; position: fixed; inset: 0; z-index: 90; pointer-events: none; transform: translateY(-135%); }
.slime.on { display: block; animation: goo 2.7s cubic-bezier(.5, 0, .4, 1); }
.goo { height: 100%; background: #7ddc1f; display: grid; place-items: center; }
.goo span { font-family: "Bungee", sans-serif; font-size: clamp(3rem, 14vw, 9rem); color: #fff; -webkit-text-stroke: 3px #1b3d00; paint-order: stroke fill; transform: rotate(-6deg); text-shadow: 6px 6px 0 #1b3d00; }
.drips { display: flex; align-items: flex-start; }
.drips i { flex: 1; background: #7ddc1f; border-radius: 0 0 999px 999px; height: 70px; }
.drips i:nth-child(2n) { height: 150px; flex: 1.4; } .drips i:nth-child(3n) { height: 105px; flex: .8; } .drips i:nth-child(5) { height: 210px; }
@keyframes goo { 0% { transform: translateY(-135%); } 38%, 58% { transform: translateY(0); } 100% { transform: translateY(135%); } }

/* ---------- Shooting star (Ribbon network) ---------- */
.sky { display: none; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
[data-net="ribbon"] .sky { display: block; }
.shoot { position: absolute; width: 190px; height: 3px; margin-left: -190px; border-radius: 3px; opacity: 0; transform-origin: 100% 50%; filter: opacity(var(--glow, 1));
         background: linear-gradient(90deg, transparent, rgba(77,243,255,.55) 55%, #fff); }
.shoot::after { content: ""; position: absolute; right: -4px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #fff;
         box-shadow: 0 0 10px 3px #fff, 0 0 26px 9px rgba(77,243,255,.8), 0 0 46px 16px rgba(255,95,210,.45); }
.shoot.go { animation: shoot var(--dur, 1.1s) cubic-bezier(.3, .1, .7, 1) both; }
@keyframes shoot {
  0% { opacity: 0; transform: rotate(var(--a)) translateX(0) scaleX(.3); }
  12% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--dist)) scaleX(1); }
}
html.plain .sky { display: none !important; }

/* ---------- Ooze (Splat network): drawn on a canvas by main.js ---------- */
.ooze { display: none; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 55; pointer-events: none; opacity: .96; }
[data-net="splat"] .ooze { display: block; }
html.plain .ooze { display: none !important; }

/* ---------- Keyboard hints vs touch hints ---------- */
.for-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .for-keys { display: none; }
  .for-touch { display: inline; }
  .ep:hover, .ep:nth-child(even):hover, .btn:hover { transform: none; }
  .btn:hover { box-shadow: 5px 5px 0 var(--line); }
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .ch { padding: 60px 0; }
  .hero { padding: 76px 16px 110px; min-height: 0; }
  .tv { grid-template-columns: 1fr; padding: 12px; border-radius: 26px; box-shadow: 7px 7px 0 var(--line); }
  .tv-side { flex-direction: row; padding: 0 6px; }
  .grille { height: 42px; min-height: 0; background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 12px); }
  .knob { width: 44px; height: 44px; } .knob.small { width: 34px; height: 34px; }
  .screen { border-radius: 30px / 26px; }
  .remote { left: 50%; right: auto; bottom: 10px; transform: translateX(-50%); width: auto; grid-template-columns: repeat(4, auto); border-radius: 18px; padding: 8px; }
  .remote button { padding: 9px 10px 7px; font-size: 1.1rem; white-space: nowrap; }
  .osd { font-size: 1.6rem; }
  .ch-osd { position: static; margin-bottom: 6px; font-size: 1.25rem; }
  .screen { touch-action: pan-y; }
  /* Channel buttons: an even 3 x 2 grid of thumb-sized keys */
  .strip { display: grid; grid-template-columns: repeat(3, 1fr); }
  .strip button { font-size: 1.2rem; padding: 6px 4px 4px; min-height: 46px; text-align: center; white-space: nowrap; }
  /* The remote tucks away while you scroll down and comes back when you scroll up */
  .remote { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transition: transform .25s ease; }
  .remote.tuck { transform: translateX(-50%) translateY(170%); }
  .remote button { min-height: 44px; }
  /* The guide becomes a simple list instead of a sideways-scrolling grid */
  .guide-grid { display: flex; flex-direction: column; min-width: 0; }
  .g-corner, .g-year, .g-now { display: none; }
  .g-label { position: static; order: 0; }
  .g-label ~ .g-label { order: 4; }
  .g-show { min-height: 62px; }
  .g-show[href="#s3"] { order: 1; } .g-show[href="#s2"] { order: 2; } .g-show[href="#s1"] { order: 3; } .g-show[href="#ch7"] { order: 5; }
  .g-show b { white-space: normal; }
  .bumper p { font-size: 1.05rem; }
  .season-head { gap: 6px 16px; }
  .ep, .stat, .wall { padding: 18px; box-shadow: 6px 6px 0 var(--line); }
  .diploma { padding: 34px 24px 44px; }
  .notebook { padding-left: 50px; }
  .arcade { padding: 10px; }
  .arcade-head { font-size: 1.2rem; gap: 2px 14px; }
  .arcade-head strong { flex-basis: 100%; }
  .game-over p { font-size: .95rem; }
  .credits { height: 280px; }
  .bug { font-size: 1.2rem; letter-spacing: .06em; }
  .when { font-size: 1.15rem; letter-spacing: 0; }
  .hl li { font-size: 1rem; }
  .game-over { padding: 8px 12px; gap: 6px; }
  .game-over p { font-size: .84rem; line-height: 1.3; }
  .game-over .btn.big { font-size: 15px; padding: 9px 18px; }
  .game-over small { font-size: 1rem; }
  .stat { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .credits { height: auto; overflow: visible; padding-top: 28px; }
}

/* ---------- Boring version / print ---------- */
html.plain body { background: #fff; color: #111; font: 16px/1.5 system-ui, sans-serif; }
html.plain *, html.plain *::before, html.plain *::after { animation: none !important; box-shadow: none !important; text-shadow: none !important; transform: none !important; font-family: inherit !important; }
html.plain .ch, html.plain .ch.alt { background: #fff; color: #111; padding: 28px 0; border-top: 1px solid #ccc; }
html.plain .hero { min-height: 0; padding: 28px 16px; display: block; }
html.plain .tv { background: none; border: 0; padding: 0; display: block; max-width: 1048px; margin: 0 auto; }
html.plain .tv::before, html.plain .tv::after, html.plain .screen::after, html.plain .tv-side, html.plain .rating, html.plain .ticker,
html.plain .remote, html.plain .osd, html.plain .static, html.plain .slime, html.plain #ch6, html.plain .cta, html.plain .bug, html.plain .chip,
html.plain .burst, html.plain .hint, html.plain #tidy, html.plain .bumper p, html.plain .g-now, html.plain .guide-bar, html.plain .ep-no, html.plain #ch2 { display: none !important; }
html.plain .chan { display: none; } html.plain .chan:first-child { display: block; visibility: visible; opacity: 1; }
html.plain .strip, html.plain .ch-osd, html.plain .snow { display: none !important; }
html.plain .screen { background: none !important; color: #111; border: 0; padding: 0; border-radius: 0; }
html.plain h1 { font-size: 2.2rem; text-transform: none; } html.plain h1 span { display: inline; color: #111 !important; }
html.plain .tagline { color: #444; }
html.plain .bumper { margin-bottom: 14px; } html.plain .bumper h2 { font-size: 1.4rem; margin: 0; }
html.plain .ep, html.plain .stat, html.plain .wall, html.plain .diploma, html.plain .notebook, html.plain .credits {
  background: #fff !important; color: #111; border: 1px solid #ccc; outline: 0; border-radius: 6px; padding: 14px; }
html.plain .season { margin-top: 22px; } html.plain .season-head { border-bottom: 1px solid #ccc; }
html.plain .season-head h3 { font-size: 1.5rem; } html.plain .season-head h3 small { font-size: .9rem; }
html.plain .ep h4 { font-size: 1.05rem; margin-top: 0; } html.plain .facts b, html.plain .stat b { font-size: 1.05rem; color: #111 !important; -webkit-text-stroke: 0; display: inline; }
html.plain .award { background: none; border: 0; padding: 0; }
html.plain .sticker { background: #fff !important; color: #111 !important; border: 1px solid #999; outline: 0; border-radius: 999px !important; font-size: .95rem; padding: 3px 10px; cursor: default; }
html.plain .wall h3, html.plain .notebook h3, html.plain .diploma h3 { font-size: 1.05rem; letter-spacing: 0; text-transform: none; line-height: 1.4; }
html.plain .notebook li { line-height: 1.6; } html.plain .seal { position: static; width: auto; height: auto; background: none; border: 0; display: block; text-align: left; }
html.plain .seal br { display: none; } html.plain .diploma small, html.plain .seal, html.plain .seal b { font-size: 1rem; }
html.plain .credits { display: none; }
html.plain .btn { border: 1px solid #111; background: #fff; color: #111; border-radius: 6px; font-size: .95rem; padding: 6px 12px; }
html.plain .unplain { display: block; position: fixed; right: 12px; top: 12px; z-index: 50; background: #111; color: #fff; border: 0; border-radius: 6px; padding: 8px 12px; font: 600 14px system-ui, sans-serif; }
@media print {
  .remote, .unplain, .osd, .static, .slime, .contact button { display: none !important; }
  .ep, .stat { break-inside: avoid; }
}
