/* =========================================================
   COOLFART.COM: the stylesheet. Subtlety was not an option.
   ========================================================= */
:root {
  --pink: #ff2fb9;
  --hot: #ff0066;
  --yellow: #ffee00;
  --cyan: #00e5ff;
  --green: #00ff88;
  --purple: #7a2cff;
  --ink: #0b0014;
  --paper: #fffdf3;
  --gold: #ffcc33;
  --e: 0;
  --f-bang: 'Bangers', Impact, 'Arial Black', sans-serif;
  --f-comic: 'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive;
  --f-pixel: 'Press Start 2P', 'Courier New', monospace;
  --f-term: 'VT323', 'Courier New', monospace;
  --f-glitch: 'Rubik Glitch', Impact, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: hidden; }
body {
  font-family: var(--f-comic);
  font-size: 18px;
  line-height: 1.5;
  color: #fff;
  background-color: #12001f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Ctext x='10' y='45' font-size='34' opacity='.13'%3E💨%3C/text%3E%3Ctext x='70' y='105' font-size='30' opacity='.13'%3E🍑%3C/text%3E%3C/svg%3E");
  padding-bottom: 64px;
}
body.lvl-1, body.lvl-2 {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ctext x='2' y='28' font-size='28'%3E🍑%3C/text%3E%3C/svg%3E") 6 6, auto;
}
body.gated { overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}
img { max-width: 100%; height: auto; }
a { color: var(--yellow); }
.small { font-size: 14px; opacity: .85; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.row.center { justify-content: center; }
[hidden] { display: none !important; }

#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 990; }

/* ================= GATE ================= */
#gate {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  padding: 16px;
  background: repeating-linear-gradient(45deg, #000 0 30px, #111 30px 60px);
  overflow-y: auto;
  transition: transform .6s cubic-bezier(.7,-0.4,.8,.4), opacity .6s;
}
#gate.bye { transform: scale(3) rotate(20deg); opacity: 0; pointer-events: none; }
.gate-inner {
  width: min(760px, 100%);
  background: #000;
  border: 6px solid var(--yellow);
  box-shadow: 0 0 0 6px #000, 0 0 60px rgba(255,238,0,.5);
  padding: 0 0 18px;
  text-align: center;
}
.hazard-bar { height: 22px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, #000 18px 36px); }
.gate-title {
  font-family: var(--f-glitch);
  font-size: clamp(38px, 9vw, 84px);
  margin: 14px 10px 4px;
  color: var(--hot);
  text-shadow: 3px 3px 0 var(--yellow);
  animation: blink 1s steps(2) infinite;
}
#bootlog {
  font-family: var(--f-term);
  font-size: clamp(14px, 3.4vw, 20px);
  color: var(--green);
  text-align: left;
  margin: 0 auto 10px;
  padding: 10px 16px;
  width: min(620px, 94%);
  min-height: 12.5em;
  background: #001207;
  border: 2px solid #0a4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gate-warn { font-size: clamp(16px, 3.6vw, 22px); margin: 8px 16px; }
.gate-photo { font-size: 14px; color: #ffb3b3; margin: 12px 18px; }
.gate-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 8px 16px; position: relative; }
.gate-buttons button { border: 0; border-radius: 12px; font-family: var(--f-bang); letter-spacing: 1px; transition: transform .15s; }
.gate-buttons button small { display: block; font-family: var(--f-comic); font-size: 13px; letter-spacing: 0; opacity: .85; }
.btn-mega {
  font-size: clamp(22px, 5vw, 34px); padding: 14px 22px;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--green), var(--cyan), var(--pink));
  background-size: 300% 100%;
  color: #000;
  animation: slide 3s linear infinite, pulse 1s ease-in-out infinite;
  box-shadow: 0 6px 0 #000, 0 0 30px var(--pink);
}
.btn-ohio { font-size: 24px; padding: 12px 18px; background: #3dff3d; color: #000; box-shadow: 0 6px 0 #063; }
.btn-normie { font-size: 18px; padding: 10px 16px; background: #ddd; color: #333; }
.btn-normie.suggest { outline: 3px dashed var(--yellow); }
.btn-flee { font-size: 18px; padding: 10px 16px; background: #400; color: #faa; transition: transform .25s !important; }
.gate-buttons button:hover { transform: scale(1.06) rotate(-2deg); }

/* ================= TICKER + HUD ================= */
#ticker {
  position: fixed; top: 0; left: 0; right: 0; height: 32px; z-index: 800;
  background: var(--hot); color: #fff; overflow: hidden;
  border-bottom: 3px solid #000;
  font-family: var(--f-pixel); font-size: 12px; line-height: 32px; white-space: nowrap;
}
.ticker-track { display: inline-block; animation: ticker 70s linear infinite; padding-left: 100%; }
.lvl-2 .ticker-track { animation-duration: 30s; }
.ticker-track span { padding: 0 8px; }
.ticker-track i { font-style: normal; padding: 0 8px; }

#hud {
  position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 800;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  pointer-events: none;
}
#hud > * { pointer-events: auto; }
.hud-aura, .hud-sniffers, .hud-ctrls {
  background: rgba(0,0,0,.85); border: 3px solid var(--yellow); border-radius: 999px;
  padding: 4px 14px; font-family: var(--f-pixel); font-size: 11px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 0 18px rgba(255,238,0,.4);
}
.hud-label { color: var(--yellow); }
#aura { font-size: 14px; color: var(--green); min-width: 4ch; }
#rank { font-style: normal; color: var(--pink); font-size: 10px; }
.hud-aura.pulse { animation: hudpulse .35s; }
.hud-sniffers { border-color: var(--hot); }
.hud-sniffers .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hot); animation: blink 1s infinite; }
.hud-ctrls select, .hud-ctrls button {
  font-family: var(--f-pixel); font-size: 10px; background: #222; color: #fff; border: 2px solid #fff; border-radius: 6px; padding: 4px;
}
.hud-ctrls button { font-size: 16px; padding: 0 6px; background: transparent; border: 0; }

#toast {
  position: fixed; top: 44px; left: 50%; z-index: 950;
  transform: translate(-50%, -150%);
  background: var(--yellow); color: #000; border: 4px solid #000; border-radius: 12px;
  padding: 10px 18px; font-family: var(--f-bang); font-size: clamp(18px, 4vw, 26px); letter-spacing: 1px;
  box-shadow: 6px 6px 0 #000; max-width: calc(100vw - 32px); text-align: center;
  transition: transform .3s cubic-bezier(.3,1.6,.6,1);
}
#toast.show { transform: translate(-50%, 0) rotate(-1.5deg); }

/* ================= SECTIONS ================= */
main { display: block; }
body.farting main { will-change: transform; }
.sec { position: relative; padding: 72px max(16px, calc(50vw - 600px)); overflow: hidden; }
.sec-title {
  font-family: var(--f-bang); font-weight: 400;
  font-size: clamp(34px, 7vw, 72px); line-height: 1; letter-spacing: 2px;
  margin: 0 0 12px; text-align: center;
  color: var(--yellow);
  -webkit-text-stroke: 2px #000;
  text-shadow: 4px 4px 0 var(--hot), 8px 8px 0 #000;
  transform: rotate(-1.5deg);
}
.sec-title span { display: block; font-size: .5em; color: #fff; }
.sec-sub { text-align: center; max-width: 760px; margin: 0 auto 28px; font-size: 18px; }
.panel {
  position: relative; background: rgba(0,0,0,.55); border: 2px solid var(--cyan); border-radius: 10px;
  padding: 14px; margin-bottom: 18px; box-shadow: 0 0 22px rgba(0,229,255,.18), inset 0 0 40px rgba(0,229,255,.05);
}
.panel-title {
  font-family: var(--f-term); font-size: 20px; color: var(--cyan); letter-spacing: 1px; margin-bottom: 10px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline;
}
.panel-title small { font-size: 16px; opacity: .7; }
canvas { display: block; max-width: 100%; }
#wave, #pitchCanvas, #manifold, #sky, #bars { width: 100%; }

/* ================= HERO ================= */
#hero { position: relative; min-height: 100vh; padding: 56px 16px 40px; overflow: hidden; text-align: center; }
.sunburst {
  position: absolute; left: 50%; top: 42%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax;
  background: repeating-conic-gradient(from 0deg, #ff2fb9 0 7.5deg, #7a2cff 7.5deg 15deg, #ffee00 15deg 22.5deg, #00e5ff 22.5deg 30deg);
  opacity: .5; animation: spin 40s linear infinite; z-index: 0;
}
.lvl-2 .sunburst { animation-duration: 6s; opacity: .8; }
.farting .sunburst { opacity: calc(.4 + var(--e) * .6); }
.hero-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-family: var(--f-pixel); font-size: clamp(8px, 2vw, 12px);
  background: #000; color: var(--yellow); padding: 8px 12px; border: 3px solid var(--yellow); transform: rotate(-2deg);
}
.mega-title {
  font-family: var(--f-bang); font-weight: 400;
  font-size: clamp(54px, 14vw, 190px); line-height: .95; margin: 18px 0 6px; letter-spacing: 2px;
  transform: scale(calc(1 + var(--e) * .12));
}
.mega-title span {
  display: inline-block;
  color: hsl(calc(var(--i) * 33deg) 100% 60%);
  -webkit-text-stroke: 3px #000;
  text-shadow: 3px 3px 0 #000, 6px 6px 0 #000, 9px 9px 0 var(--hot), 12px 12px 0 #000;
  animation: wobble 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.14s);
}
.mega-title span.pop { animation: letterpop .45s ease-out; }
.farting .mega-title span { animation-duration: .35s; }
.typer {
  font-family: var(--f-pixel); font-size: clamp(11px, 2.6vw, 18px); min-height: 2.6em;
  background: rgba(0,0,0,.8); display: inline-block; padding: 10px 14px; border-radius: 8px; margin: 6px 0 18px;
  color: var(--green); max-width: 100%;
}
.caret { animation: blink .8s steps(2) infinite; }

.hero-grid { display: grid; grid-template-columns: 1fr minmax(0, 480px) 1fr; gap: 20px; align-items: center; }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.sticker {
  font-family: var(--f-bang); font-size: 24px; line-height: 1; padding: 14px 16px; color: #000;
  border: 4px solid #000; box-shadow: 5px 5px 0 #000; border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; width: 118px;
  animation: float 3s ease-in-out infinite;
}
.s1 { background: var(--yellow); transform: rotate(-14deg); font-size: 30px; }
.s2 { background: var(--green); transform: rotate(10deg); animation-delay: -1s; border-radius: 12px; aspect-ratio: auto; }
.s3 { background: var(--cyan); animation-delay: -2s; }
.s4 { background: var(--pink); transform: rotate(-8deg); animation-delay: -.5s; border-radius: 12px; aspect-ratio: auto; font-size: 20px; }

.chamber { position: relative; }
.chamber-label {
  font-family: var(--f-pixel); font-size: 12px; color: #000; background: var(--yellow); border: 3px solid #000;
  display: inline-block; padding: 6px 10px; margin-bottom: 8px; animation: blink 1.2s steps(2) infinite;
}
.chamber-frame {
  position: relative; padding: 10px; border-radius: 18px;
  background: conic-gradient(from var(--ang, 0deg), var(--pink), var(--yellow), var(--green), var(--cyan), var(--purple), var(--pink));
  box-shadow: 0 0 calc(30px + var(--e) * 90px) rgba(255,47,185,.8), 0 10px 0 #000;
  animation: angspin 3s linear infinite;
}
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.chamber-video { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 480 / 496; }
#screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lvl-2.farting #screen { animation: hue 1.5s linear infinite; }
#vid { width: 100%; height: 100%; display: block; object-fit: cover; }
.farting[data-mode="reverse"] #screen { animation: spin 1.2s linear infinite reverse; border-radius: 50%; }
.farting[data-mode="demon"] #screen { filter: hue-rotate(140deg) saturate(2.6) brightness(1.35); }
.farting[data-mode="nightcore"] #screen { filter: saturate(2) hue-rotate(280deg) brightness(1.15); }
.farting[data-mode="slowed"] #screen { filter: blur(1px) saturate(1.4) hue-rotate(40deg); }
.vid-overlay {
  position: absolute; inset: 0; border: 0; background: radial-gradient(circle, rgba(0,0,0,.15), rgba(0,0,0,.7));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff;
}
.play-orb {
  width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 54px; padding-left: 10px;
  background: var(--hot); border: 6px solid #fff; box-shadow: 0 0 0 6px #000, 0 0 50px var(--hot);
  animation: pulse .9s ease-in-out infinite;
}
.play-text {
  font-family: var(--f-bang); font-size: clamp(26px, 6vw, 44px); letter-spacing: 2px; color: var(--yellow);
  -webkit-text-stroke: 1.5px #000; text-shadow: 3px 3px 0 #000;
}
.vid-overlay:hover .play-orb { transform: scale(1.12) rotate(-8deg); }
.phase {
  position: absolute; left: 8px; right: 8px; top: 8px; font-family: var(--f-pixel); font-size: 10px; line-height: 1.5;
  background: rgba(0,0,0,.75); color: var(--yellow); padding: 6px 8px; border-radius: 6px; pointer-events: none;
}
.phase.flash { animation: phaseflash .6s; }
.finished {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px;
  background: rgba(0,0,0,.75); font-family: var(--f-bang); font-size: clamp(36px, 8vw, 64px); color: var(--yellow);
  -webkit-text-stroke: 1.5px #000; animation: letterpop .6s;
}
.finished small { font-family: var(--f-pixel); font-size: 10px; color: #fff; -webkit-text-stroke: 0; }
#bars { height: 90px; margin-top: 8px; background: #000; border-radius: 8px; }

.progress { position: relative; height: 22px; margin: 12px 0 8px; background: #000; border: 3px solid #fff; border-radius: 999px; overflow: hidden; cursor: pointer; }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--green), var(--yellow), var(--hot)); z-index: 2; mix-blend-mode: screen; }
.progress-marks .mark { position: absolute; top: 0; bottom: 0; background: rgba(255,47,185,.35); }
.progress-marks .mark.b1 { background: rgba(255,238,0,.5); }
.progress-marks .mark.b2 { background: rgba(0,255,136,.35); }
.progress-marks .tick { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }

.readouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.readouts div { background: #001a0a; border: 2px solid #0c6; border-radius: 6px; padding: 6px 4px; }
.readouts label { display: block; font-family: var(--f-pixel); font-size: 8px; color: #0c6; }
.readouts span { font-family: var(--f-term); font-size: 22px; color: var(--green); white-space: nowrap; }
.modes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.modes button {
  font-family: var(--f-bang); font-size: 18px; letter-spacing: 1px; padding: 8px 12px; border-radius: 8px;
  border: 3px solid #000; background: #fff; color: #000; box-shadow: 3px 3px 0 #000;
}
.modes button:hover { transform: translateY(-2px) rotate(-2deg); }
.modes button.on { background: var(--hot); color: #fff; animation: pulse .6s infinite; }
.modes button.stop { background: #333; color: #fff; }

.gauge { width: 200px; background: rgba(0,0,0,.8); border: 3px solid #fff; border-radius: 14px; padding: 10px 10px 6px; }
.gauge-label, .stink-label { font-family: var(--f-pixel); font-size: 10px; color: var(--yellow); margin-top: 4px; }
.stinkometer { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,.8); border: 3px solid #fff; border-radius: 14px; padding: 12px; }
.stink-tube { position: relative; width: 36px; height: 200px; border: 3px solid #fff; border-radius: 18px; background: #111; overflow: hidden; }
.stink-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #4c3, #cf0, #fc0, #f30); }
.stink-peak { position: absolute; left: 0; right: 0; height: 3px; background: #fff; bottom: 0; }

/* ================= NAV ================= */
#fartents { position: relative; z-index: 2; padding: 28px 16px; background: #000; border-block: 6px solid var(--yellow); text-align: center; }
#fartents h2 { font-family: var(--f-pixel); font-size: clamp(12px, 3vw, 18px); color: var(--yellow); margin: 0 0 16px; }
#fartents ul { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 1100px; }
#fartents a {
  display: inline-block; text-decoration: none; color: #000; font-family: var(--f-bang); font-size: 20px; letter-spacing: 1px;
  padding: 6px 14px; border: 3px solid #000; border-radius: 10px; box-shadow: 3px 3px 0 var(--pink);
  transition: transform .15s;
}
#fartents li:nth-child(5n+1) a { background: var(--yellow); transform: rotate(-3deg); }
#fartents li:nth-child(5n+2) a { background: var(--cyan); transform: rotate(2deg); }
#fartents li:nth-child(5n+3) a { background: var(--green); transform: rotate(-1deg); }
#fartents li:nth-child(5n+4) a { background: var(--pink); transform: rotate(3deg); }
#fartents li:nth-child(5n+5) a { background: #fff; transform: rotate(-2deg); }
#fartents a:hover { transform: scale(1.12) rotate(0deg) !important; }

/* ================= STATS ================= */
#stats {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  background: #000; border-bottom: 22px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, #000 18px 36px) 22;
}
.stat { padding: 26px 8px; text-align: center; border-right: 2px dashed #333; }
.stat b { display: block; font-family: var(--f-bang); font-weight: 400; font-size: clamp(36px, 6vw, 64px); color: var(--yellow); line-height: 1; text-shadow: 3px 3px 0 var(--hot); }
.stat span { font-family: var(--f-pixel); font-size: 9px; line-height: 1.6; color: #ccc; }

/* ================= BLUBERTO ================= */
#bluberto { background: linear-gradient(90deg, #009246 0 33.3%, #f1f2f1 33.3% 66.6%, #ce2b37 66.6%); color: #000; }
#bluberto::before {
  content: '🍕 🤌 🍝 🤌 🍕 🤌 🍝 🤌 🍕 🤌 🍝 🤌 🍕 🤌 🍝'; position: absolute; inset: 10px 0 auto; font-size: 32px; opacity: .3;
  white-space: nowrap; animation: ticker 30s linear infinite;
}
#bluberto .sec-title { color: #fff; text-shadow: 4px 4px 0 #009246, 8px 8px 0 #ce2b37; }
.lore-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.lore { background: var(--paper); border: 4px solid #000; border-radius: 14px; padding: 22px; box-shadow: 10px 10px 0 #000; transform: rotate(-1deg); }
.lore-lead { font-family: var(--f-bang); font-size: 30px; margin: 0 0 6px; color: #003cff; letter-spacing: 1px; }
.italian { font-style: italic; font-weight: 700; color: #ce2b37; background: #fff3b0; padding: 8px 10px; border-radius: 8px; }
.lore-facts { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 16px; }
.card-wrap { display: flex; flex-direction: column; align-items: center; }
.tcard {
  --mx: 50%; --my: 50%;
  position: relative; width: min(340px, 100%); padding: 12px; border-radius: 16px;
  background: linear-gradient(160deg, #ffe15a, #f7b500); border: 10px solid #ffd21c; outline: 3px solid #a07400;
  color: #000; box-shadow: 0 20px 40px rgba(0,0,0,.5); transition: transform .12s; transform-style: preserve-3d;
}
.tcard-shine {
  position: absolute; inset: 0; border-radius: 6px; pointer-events: none; z-index: 3; mix-blend-mode: overlay; opacity: .3; transition: opacity .2s;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.8), transparent 40%),
    repeating-linear-gradient(115deg, #f0f 0%, #0ff 8%, #ff0 16%, #0f0 24%, #f0f 32%);
  background-size: 100% 100%, 300% 300%;
  background-position: center, var(--mx) var(--my);
}
.tcard:hover .tcard-shine { opacity: .55; }
.tcard-head { display: flex; justify-content: space-between; font-family: var(--f-bang); font-size: 20px; letter-spacing: 1px; }
.tcard-head .hp { color: #c00; }
.tcard-img { border: 5px solid #c9a227; margin: 6px 0; background: #000; }
.tcard-img img { display: block; width: 100%; }
.tcard-type { font-size: 11px; font-weight: 700; text-align: center; background: #e9c34b; margin-bottom: 6px; }
.tcard-move { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; font-size: 14px; border-bottom: 1px solid rgba(0,0,0,.25); padding: 4px 0; }
.tcard-move b { font-size: 15px; }
.tcard-move span { font-family: var(--f-bang); font-size: 22px; }
.tcard-move p { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.3; }
.tcard-foot { display: flex; justify-content: space-between; font-size: 11px; margin-top: 6px; gap: 4px; flex-wrap: wrap; }
.hint { font-family: var(--f-pixel); font-size: 10px; color: #000; background: #fff; padding: 4px 8px; }

/* ================= DOCUMENTARY ================= */
#documentary { background: #111; }
#documentary .sec-title { color: #fff; text-shadow: 4px 4px 0 #888, 8px 8px 0 #000; font-family: var(--f-bang); }
.filmstrip {
  display: flex; gap: 14px; overflow-x: auto; padding: 34px 14px; scroll-snap-type: x mandatory;
  background:
    radial-gradient(circle, #111 6px, transparent 7px) 0 6px / 30px 20px repeat-x,
    radial-gradient(circle, #111 6px, transparent 7px) 0 calc(100% - 6px) / 30px 20px repeat-x,
    #000;
  border-radius: 6px; scrollbar-color: var(--yellow) #000;
}
.frame {
  flex: 0 0 220px; scroll-snap-align: start; text-align: left; color: #fff;
  background: #1d1d1d; border: 3px solid #444; border-radius: 6px; padding: 10px; display: grid; grid-template-columns: 1fr 26px; gap: 4px 8px;
  font-family: var(--f-comic); transition: transform .15s;
}
.frame:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--yellow); }
.frame.live { border-color: var(--hot); box-shadow: 0 0 24px var(--hot); transform: scale(1.04); }
.frame.hit { animation: letterpop .4s; }
.frame-time { font-family: var(--f-pixel); font-size: 18px; color: var(--yellow); }
.frame-meter { grid-row: span 3; background: #000; border: 2px solid #555; position: relative; height: 90px; }
.frame-meter div { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #0f8, #ff0, #f06); }
.frame-db { font-family: var(--f-term); font-size: 20px; color: var(--green); }
.frame-pitch { font-family: var(--f-term); font-size: 16px; color: var(--cyan); }
.frame p { grid-column: 1 / -1; margin: 6px 0 0; font-size: 15px; line-height: 1.35; }

/* ================= LAB ================= */
#lab {
  background:
    linear-gradient(rgba(0,255,200,.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(0,255,200,.05) 1px, transparent 1px) 0 0 / 32px 32px,
    #020a12;
}
#lab::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 4px);
}
#lab .sec-title { color: var(--cyan); text-shadow: 3px 3px 0 #003, 0 0 30px var(--cyan); -webkit-text-stroke: 1px #000; font-family: var(--f-bang); }
.nasa { text-align: center; font-family: var(--f-term); font-size: 20px; color: var(--green); margin: 0 0 22px; }
#wave, #spec { cursor: crosshair; }
.spec { position: relative; cursor: crosshair; border: 1px solid #0aa; }
.spec img { display: block; width: 100%; height: auto; image-rendering: auto; }
.spec-axis span {
  position: absolute; left: 4px; transform: translateY(-50%); font-family: var(--f-term); font-size: 15px; color: #fff;
  background: rgba(0,0,0,.6); padding: 0 4px; pointer-events: none;
}
.spec-note {
  position: absolute; font-family: var(--f-term); font-size: clamp(12px, 1.8vw, 18px); line-height: 1; color: #fff;
  background: rgba(0,0,0,.65); border: 1px solid var(--yellow); padding: 3px 6px; pointer-events: none;
}
.spec-note small { color: var(--yellow); }
.spec-head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 12px #fff; pointer-events: none; display: none; }
.lab-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.readout { width: 100%; border-collapse: collapse; font-family: var(--f-term); font-size: 18px; }
.readout th { text-align: left; color: var(--cyan); font-weight: 400; padding: 4px 8px 4px 0; vertical-align: top; }
.readout td.v { color: var(--yellow); white-space: nowrap; padding: 4px 8px; vertical-align: top; }
.readout td.n { color: #9fb; font-size: 16px; padding: 4px 0; }
.readout tr { border-bottom: 1px dashed rgba(0,229,255,.2); }
.synth-ctrls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.synth-ctrls button, .btn-q, .tiny {
  font-family: var(--f-term); font-size: 19px; background: #001a22; color: var(--cyan); border: 2px solid var(--cyan); border-radius: 6px; padding: 4px 10px;
}
.synth-ctrls button:hover, .btn-q:hover, .tiny:hover { background: var(--cyan); color: #000; }
.toggle { font-family: var(--f-term); font-size: 19px; color: var(--yellow); display: flex; align-items: center; gap: 6px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--yellow); }

/* ================= UNKNOWN PRESSURES ================= */
#pressures { background: #000; color: #eee; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.pressures-wrap { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 40px; align-items: center; max-width: 1100px; margin: 0 auto; }
#ridges { width: 100%; height: auto; }
.pressures-text h2 { font-weight: 300; letter-spacing: 10px; font-size: clamp(28px, 5vw, 48px); margin: 0; }
.pressures-text h3 { font-weight: 700; letter-spacing: 6px; font-size: clamp(18px, 3vw, 26px); margin: 4px 0 18px; color: #fff; }
.btn-mono { background: #000; color: #fff; border: 2px solid #fff; padding: 10px 18px; letter-spacing: 4px; font-family: inherit; font-size: 14px; }
.btn-mono:hover { background: #fff; color: #000; }

/* ================= QUANTUM ================= */
#quantum {
  background:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, #fff, transparent), radial-gradient(1px 1px at 85% 15%, #fff, transparent),
    radial-gradient(ellipse at 50% 40%, #3a0b6b, #0a0018 70%);
}
#quantum .sec-title { color: #d7b8ff; text-shadow: 0 0 20px var(--purple), 4px 4px 0 #000; font-family: var(--f-bang); }
.quantum-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.q-manifold { border-color: var(--purple); padding: 6px; }
#manifold { height: 480px; cursor: grab; touch-action: none; border-radius: 6px; }
#manifold:active { cursor: grabbing; }
.axis-key { font-family: var(--f-term); color: #c9a8ff; font-size: 16px; padding: 4px 8px; }
.schrod, .term { border-color: var(--purple); }
.psi { font-family: 'Times New Roman', serif; font-size: 24px; text-align: center; margin: 4px 0 10px; }
.psi span { color: var(--yellow); font-family: var(--f-term); font-size: 26px; }
.prob { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; font-family: var(--f-term); font-size: 18px; margin-bottom: 6px; }
.prob-bar { height: 16px; background: #1a0033; border: 1px solid var(--purple); }
.prob-bar div { height: 100%; background: linear-gradient(90deg, var(--purple), var(--pink)); width: 50%; }
.btn-q { width: 100%; font-size: 24px; padding: 8px; margin-top: 6px; border-color: var(--pink); color: var(--pink); background: #20002a; }
.btn-q:disabled { opacity: .5; }
.collapse { min-height: 3em; font-size: 16px; margin: 8px 0 0; }
.collapse b { color: var(--yellow); font-family: var(--f-term); font-size: 22px; }
#qterm {
  margin: 0; height: 290px; overflow-y: auto; background: #050010; color: var(--green); font-family: var(--f-term); font-size: 17px; line-height: 1.25;
  padding: 8px; border-radius: 4px; white-space: pre-wrap;
}
#qterm .hd { color: var(--yellow); }
#qterm .ok { color: var(--cyan); }
#qterm .err { color: #ff4d6d; }
.tiny { font-size: 15px; padding: 0 8px; }

/* ================= LAUNCH ================= */
#launch { background: linear-gradient(180deg, #0a1b4d, #2f74d0 60%, #8fd3ff); }
#launch .sec-title { color: #fff; text-shadow: 4px 4px 0 #ff5a00, 8px 8px 0 #000; }
.launch-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.launch-pad { border: 4px solid #000; border-radius: 12px; overflow: hidden; box-shadow: 8px 8px 0 #000; }
#sky { height: 560px; }
.launch-ctrl { background: rgba(0,0,30,.8); border-color: #ff8a00; }
.launch-ctrl .panel-title { color: #ffb347; }
.payloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.payloads button { font-family: var(--f-bang); font-size: 18px; letter-spacing: 1px; background: #111; color: #fff; border: 3px solid #555; border-radius: 8px; padding: 6px; }
.payloads button small { display: block; font-family: var(--f-term); font-size: 16px; color: #aaa; }
.payloads button.on { border-color: #ff8a00; background: #3a1a00; box-shadow: 0 0 14px #ff8a00; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-family: var(--f-term); font-size: 18px; margin: 12px 0; }
.specs dt { color: #ffb347; }
.specs dd { margin: 0; color: #fff; }
.specs small { color: #aaa; }
.btn-launch {
  width: 100%; font-family: var(--f-bang); font-size: 36px; letter-spacing: 3px; padding: 10px; border-radius: 12px; border: 4px solid #000;
  background: linear-gradient(180deg, #ffde00, #ff5a00); color: #000; box-shadow: 0 6px 0 #000;
}
.btn-launch:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-launch:disabled { filter: grayscale(1); opacity: .6; }
.results { margin-top: 12px; font-family: var(--f-term); font-size: 18px; }
.res-row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #445; padding: 2px 0; }
.res-row span { color: #ffb347; }
.res-row b { font-weight: 400; color: #fff; text-align: right; }
.res-out, .res-err, .res-live { margin-top: 8px; padding: 8px; border-radius: 6px; font-family: var(--f-comic); font-size: 17px; }
.res-out { background: #10301a; border: 2px solid var(--green); }
.res-err { background: #3a0010; border: 2px solid #ff4d6d; }
.res-live { background: #3a1a00; border: 2px solid #ff8a00; text-align: center; animation: blink .5s steps(2) infinite; }

/* ================= STUDIO ================= */
#studio {
  background:
    linear-gradient(180deg, transparent 55%, rgba(255,47,185,.25)),
    linear-gradient(rgba(255,47,185,.35) 2px, transparent 2px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(0,229,255,.25) 2px, transparent 2px) 0 0 / 64px 100%,
    linear-gradient(180deg, #1a0033, #4b0063 60%, #9a005e);
}
#studio .sec-title { color: #fff; text-shadow: 0 0 10px var(--pink), 0 0 30px var(--pink), 4px 4px 0 #000; font-family: var(--f-bang); }
.synthwave { background: rgba(10,0,30,.75); border-color: var(--pink); box-shadow: 0 0 30px rgba(255,47,185,.35); }
.synthwave .panel-title { color: var(--pink); }
.piano { display: flex; height: 170px; user-select: none; touch-action: manipulation; border: 4px solid #000; border-radius: 0 0 10px 10px; overflow: hidden; }
.key { position: relative; border: 0; padding: 0; }
.key.white { flex: 1 1 0; background: linear-gradient(180deg, #fff, #e7e7ff); border-right: 2px solid #222; }
.key.white:last-child { border-right: 0; }
.key.black { flex: 0 0 0; width: 0; z-index: 2; background: none; }
.key.black::before {
  content: ''; position: absolute; top: 0; left: -14px; width: 28px; height: 100px; border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #333, #000); box-shadow: inset 0 -6px 0 #444;
}
.key span { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-family: var(--f-pixel); font-size: 9px; color: #888; pointer-events: none; }
.key.black span { bottom: auto; top: 76px; left: -14px; right: auto; width: 28px; color: #bbb; font-size: 8px; z-index: 1; }
.key.white.down { background: linear-gradient(180deg, var(--pink), #ffd1f1); }
.key.black.down::before { background: var(--cyan); }
.btn-neon {
  font-family: var(--f-bang); font-size: 20px; letter-spacing: 1px; padding: 8px 14px; border-radius: 8px;
  background: transparent; color: #fff; border: 3px solid var(--cyan); box-shadow: 0 0 12px var(--cyan), inset 0 0 12px rgba(0,229,255,.4);
}
.btn-neon:hover { background: var(--cyan); color: #000; }
.studio-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; margin-top: 18px; }
.pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pad {
  aspect-ratio: 1; border-radius: 10px; border: 3px solid hsl(calc(var(--h) * 1deg) 100% 60%);
  background: hsl(calc(var(--h) * 1deg) 80% 18%); color: #fff; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: 6px; text-align: left; box-shadow: inset 0 0 18px hsl(calc(var(--h) * 1deg) 100% 50% / .5); touch-action: manipulation;
}
.pad b { font-family: var(--f-pixel); font-size: 10px; }
.pad span { font-family: var(--f-bang); font-size: clamp(12px, 1.6vw, 17px); line-height: 1; letter-spacing: .5px; }
.pad small { font-family: var(--f-term); font-size: 13px; opacity: .7; }
.pad.hit { animation: padhit .35s; }
.seq { overflow-x: auto; }
.seq-row { display: grid; grid-template-columns: 74px repeat(16, minmax(20px, 1fr)); gap: 4px; margin-bottom: 6px; min-width: 470px; }
.seq-name { font-family: var(--f-bang); font-size: 18px; line-height: 1; letter-spacing: 1px; }
.seq-name small { display: block; font-family: var(--f-term); font-size: 13px; color: #faf; letter-spacing: 0; }
.cell { aspect-ratio: 1; border-radius: 4px; border: 2px solid #5a2a7a; background: #1a0630; padding: 0; }
.cell.beat { background: #2a0a48; }
.cell.on { background: var(--pink); border-color: #fff; box-shadow: 0 0 10px var(--pink); }
.cell.now { outline: 2px solid var(--yellow); }
.cell.on.now { background: var(--yellow); }
.seq-ctrls label { font-family: var(--f-term); font-size: 19px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seq-ctrls input[type=range] { accent-color: var(--pink); width: 140px; }

/* ================= PPAF ================= */
.leopard, #ppaf, #party {
  background-color: #d9a441;
  background-image:
    radial-gradient(ellipse 14px 11px at 20px 20px, #2b1806 60%, transparent 62%),
    radial-gradient(ellipse 18px 13px at 20px 20px, #8a5a1c 60%, transparent 62%),
    radial-gradient(ellipse 12px 15px at 60px 52px, #2b1806 60%, transparent 62%),
    radial-gradient(ellipse 17px 19px at 60px 52px, #8a5a1c 60%, transparent 62%),
    radial-gradient(ellipse 10px 8px at 88px 14px, #2b1806 60%, transparent 62%),
    radial-gradient(ellipse 9px 12px at 30px 78px, #2b1806 60%, transparent 62%);
  background-size: 100px 92px;
}
#ppaf { color: #000; }
.sec-title.gold {
  background: linear-gradient(180deg, #fff6c4, #ffcc33 45%, #b8860b 55%, #ffe680);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #3b2400; text-shadow: none; filter: drop-shadow(4px 4px 0 #000);
}
#ppaf .sec-sub { background: #000; color: var(--gold); padding: 10px 14px; border-radius: 10px; border: 3px solid var(--gold); }
.collider { max-width: 980px; margin: 0 auto; background: rgba(0,0,0,.82); border: 6px solid var(--gold); border-radius: 18px; padding: 18px; color: #fff; box-shadow: 0 0 40px rgba(255,204,51,.5); }
.inventory { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.item {
  display: flex; align-items: center; gap: 6px; font-family: var(--f-bang); font-size: 18px; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff3b0, #ffcc33); color: #000; border: 3px solid #000; border-radius: 999px; padding: 6px 14px; box-shadow: 3px 3px 0 #000;
}
.item:hover { transform: scale(1.08) rotate(-3deg); }
.item .ico { font-size: 22px; }
.item.legendary { background: linear-gradient(90deg, #f0f, #ff0, #0ff, #f0f); background-size: 300%; animation: slide 2s linear infinite; }
.reactor { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; gap: 10px; margin: 24px auto 10px; max-width: 520px; min-height: 160px; }
.reactor .ring {
  position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; margin: -100px; border-radius: 50%;
  border: 8px dashed var(--gold); animation: spin 6s linear infinite; opacity: .6;
}
.reactor.colliding .ring { animation-duration: .3s; border-color: var(--hot); }
.slot {
  position: relative; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; text-align: center; line-height: 1.1;
  background: #1a1200; border: 4px solid #554; overflow: hidden; word-break: break-all; padding: 8px;
}
.slot.full { border-color: var(--gold); box-shadow: 0 0 20px var(--gold); }
.colliding #slotA { animation: smashL .9s ease-in forwards; }
.colliding #slotB { animation: smashR .9s ease-in forwards; }
.plus { font-family: var(--f-bang); font-size: 48px; color: var(--gold); position: relative; }
.fusion { grid-column: 1 / -1; text-align: center; min-height: 110px; margin-top: 10px; }
.fusion.show { animation: letterpop .6s; }
.f-ico { font-size: 52px; }
.f-name { font-family: var(--f-bang); font-size: clamp(26px, 5vw, 44px); letter-spacing: 2px; color: var(--gold); line-height: 1.05; overflow-wrap: anywhere; }
.f-note { font-size: 17px; color: #fff; }
.dex { text-align: center; font-family: var(--f-term); font-size: 19px; color: var(--gold); }
#party {
  position: fixed; inset: 0; z-index: 980; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  animation: partybg .4s steps(2) infinite; cursor: pointer; text-align: center; padding: 16px;
}
#party::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax; z-index: -1;
  background: repeating-conic-gradient(rgba(255,215,0,.55) 0 10deg, transparent 10deg 20deg); animation: spin 5s linear infinite;
}
#party > * { position: relative; }
#party { overflow: hidden; isolation: isolate; }
.party-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.party-words span {
  font-family: var(--f-bang); font-size: clamp(42px, 10vw, 120px); line-height: 1; color: #ffe680; -webkit-text-stroke: 3px #000;
  text-shadow: 6px 6px 0 #000; transition: transform .1s;
}
.party-words span.lit { color: #fff; transform: scale(1.3) rotate(-6deg); text-shadow: 0 0 30px #ff0, 6px 6px 0 #000; }
.party-heads { display: flex; gap: 10px; }
.party-heads img { width: clamp(56px, 12vw, 120px); animation: bounce .325s ease-in-out infinite alternate; }
.party-heads img:nth-child(even) { animation-delay: .16s; }
.party-sub { font-family: var(--f-pixel); font-size: 12px; background: #000; color: var(--gold); padding: 8px 12px; }

/* ================= TRANSLATOR ================= */
#translator { background: linear-gradient(180deg, #e8f0fe, #c7d7fb); color: #202124; font-family: Arial, Helvetica, sans-serif; }
#translator .sec-title { color: #1a73e8; text-shadow: 3px 3px 0 #fff, 6px 6px 0 #000; -webkit-text-stroke: 1.5px #000; }
.xlate { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; max-width: 1000px; margin: 0 auto; }
.xlate-col { background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.2); overflow: hidden; }
.xlate-lang { background: #f1f3f4; padding: 10px 14px; font-size: 14px; color: #5f6368; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.xlate-lang b { color: #1a73e8; }
.xlate-lang select { font-size: 15px; padding: 4px 8px; border-radius: 6px; border: 1px solid #ccc; background: #fff; color: #202124; }
.xlate-box { padding: 16px; font-size: 19px; min-height: 180px; }
.xlate-box.src { font-style: italic; color: #444; overflow-wrap: anywhere; }
.xlate-box.src img { float: left; margin: 0 10px 4px 0; border-radius: 50%; }
.xlate-box.out p { margin: 0 0 8px; }
.xlate-box.out b { color: #1a73e8; font-size: 13px; display: block; }
.xlate-box.out small { color: #188038; font-weight: 700; }
.xlate-swap { align-self: center; font-size: 30px; color: #1a73e8; }
.btn-big {
  font-family: var(--f-bang); font-size: 26px; letter-spacing: 1px; padding: 10px 22px; border-radius: 10px; border: 4px solid #000;
  background: var(--yellow); color: #000; box-shadow: 5px 5px 0 #000; margin-top: 14px;
}
.btn-big:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #000; }
.btn-big:disabled { opacity: .5; transform: none; }

/* ================= WRAPPED ================= */
#wrapped { background: #000; }
#wrapped .sec-title { color: #1ed760; text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 #333; }
.wrapped-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.wcard { border-radius: 18px; padding: 20px; min-height: 200px; display: flex; flex-direction: column; color: #000; transition: transform .2s; }
.wcard:hover { transform: rotate(-2deg) scale(1.03); }
.wk { font-family: var(--f-pixel); font-size: 11px; }
.wv { font-family: var(--f-bang); font-weight: 400; font-size: clamp(34px, 5vw, 52px); line-height: 1; margin: 10px 0; overflow-wrap: anywhere; }
.wcard p { margin: auto 0 0; font-size: 16px; }
.wcard img { border-radius: 50%; border: 3px solid #000; }
.c1 { background: #1ed760; } .c2 { background: #ff4ec7; } .c3 { background: #ffd400; }
.c4 { background: #7d5cff; color: #fff; } .c5 { background: #00e5ff; } .c6 { background: #ff6b00; } .c7 { background: #e9e9e9; }

/* ================= CERTIFICATE ================= */
#certificate { background: repeating-linear-gradient(90deg, #5a3416 0 40px, #66401d 40px 80px); }
#certificate .sec-title { color: #ffe9b0; text-shadow: 4px 4px 0 #2a1406, 8px 8px 0 #000; }
#certificate .sec-sub { background: rgba(0,0,0,.5); padding: 8px 12px; border-radius: 8px; }
.cert-ctrls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 18px; }
.cert-ctrls label { font-family: var(--f-pixel); font-size: 12px; }
.cert-ctrls input { font-family: var(--f-comic); font-size: 20px; padding: 10px 12px; border-radius: 8px; border: 4px solid #000; width: min(340px, 100%); }
.cert-ctrls .btn-big { margin-top: 0; }
#cert { width: min(100%, 1000px); height: auto; margin: 0 auto; box-shadow: 0 20px 50px rgba(0,0,0,.6); transform: rotate(-.6deg); }

/* ================= REVIEWS ================= */
#reviews {
  background:
    radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(2px 2px at 30% 70%, #ff0, transparent),
    radial-gradient(2px 2px at 60% 40%, #0ff, transparent), radial-gradient(2px 2px at 80% 80%, #f0f, transparent),
    radial-gradient(2px 2px at 90% 10%, #fff, transparent), #000010;
  background-size: 220px 220px;
  animation: starscroll 20s linear infinite;
}
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.review { margin: 0; background: #ffffcc; color: #000; border: 4px ridge #c0c0c0; padding: 14px; transform: rotate(var(--r)); font-family: 'Comic Sans MS', var(--f-comic); box-shadow: 6px 6px 0 #ff00ff; }
.review:hover { transform: rotate(0) scale(1.04); }
.stars { font-size: 18px; }
.stars span { font-size: 12px; color: #c00; font-weight: 700; margin-left: 6px; }
.review blockquote { margin: 8px 0; font-size: 18px; font-weight: 700; }
.review figcaption { font-size: 14px; color: #333; }

/* ================= FAQ ================= */
#faq { background: #fffbe0 repeating-linear-gradient(180deg, transparent 0 31px, #b7d4ff 31px 32px); color: #111; }
#faq::before { content: ''; position: absolute; left: max(16px, calc(50vw - 520px)); top: 0; bottom: 0; width: 2px; background: #ff7b7b; }
#faq .sec-title { color: var(--hot); text-shadow: 4px 4px 0 #000; }
.faq-list { max-width: 900px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details { background: #fff47a; border: 3px solid #000; border-radius: 4px; padding: 10px 14px; box-shadow: 5px 5px 0 rgba(0,0,0,.8); }
.faq-list details:nth-child(even) { background: #9dffb0; transform: rotate(.6deg); }
.faq-list details:nth-child(3n) { background: #ffb0e6; transform: rotate(-.6deg); }
.faq-list summary { font-family: var(--f-bang); font-size: 24px; letter-spacing: 1px; cursor: pointer; }
.faq-list p { margin: 8px 0 0; font-size: 18px; }

/* ================= FOOTER ================= */
#footer {
  text-align: center; padding: 40px 16px 30px;
  background: #000080 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ctext x='14' y='40' font-size='26' opacity='.25'%3E💨%3C/text%3E%3C/svg%3E");
  border-top: 8px ridge #c0c0c0;
}
.webring { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; font-family: 'Times New Roman', serif; font-size: 18px; color: #ff0; }
.webring button { font-family: 'Times New Roman', serif; font-size: 16px; background: #c0c0c0; border: 3px outset #fff; padding: 4px 10px; color: #000; }
.counter { margin: 18px auto; display: inline-block; font-family: var(--f-pixel); font-size: 12px; background: #000; padding: 10px; border: 3px inset #888; color: #ccc; }
#visitor { color: #0f0; letter-spacing: 2px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.badge { width: 88px; height: 31px; display: grid; place-items: center; font-family: Verdana, sans-serif; font-size: 8px; font-weight: 700; line-height: 1.1; border: 2px outset #fff; text-align: center; }
.b1 { background: #fff; color: #000; } .b2 { background: #3c0; color: #fff; } .b3 { background: #000; color: #0ff; }
.b4 { background: #036; color: #ff0; } .b5 { background: #f0c; color: #fff; } .b6 { background: repeating-linear-gradient(-45deg, #fc0 0 6px, #000 6px 12px); color: #fff; text-shadow: 1px 1px 0 #000; }
.construction { font-family: var(--f-pixel); font-size: 11px; color: #ff0; animation: blink 1s steps(2) infinite; }
.fine { max-width: 820px; margin: 10px auto 0; font-size: 13px; color: #ccd; font-family: 'Times New Roman', serif; }

/* ================= POPUPS ================= */
.popup {
  position: fixed; z-index: 960; width: min(340px, calc(100vw - 20px));
  background: #c0c0c0; color: #000; border: 3px outset #fff; box-shadow: 4px 4px 0 #000;
  font-family: Tahoma, Verdana, sans-serif; font-size: 14px; animation: popin .25s;
}
.popup-bar { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: 700; padding: 3px 4px 3px 8px; cursor: move; touch-action: none; user-select: none; }
.popup-x { width: 22px; height: 20px; background: #c0c0c0; border: 2px outset #fff; font-weight: 700; line-height: 1; padding: 0; color: #000; }
.popup-body { display: flex; gap: 12px; align-items: center; padding: 14px; }
.popup-ico { font-size: 36px; }
.popup-body p { margin: 0; }
.popup-btns { display: flex; gap: 8px; justify-content: center; padding: 0 12px 12px; }
.popup-btns button { min-width: 80px; background: #c0c0c0; border: 2px outset #fff; padding: 4px 10px; font-family: Tahoma, sans-serif; color: #000; }
.popup-btns button:active, .popup-x:active { border-style: inset; }

#peek {
  position: fixed; right: -10px; bottom: 60px; z-index: 850; border: 0; background: none; padding: 0;
  transform: translateX(120%) rotate(-20deg); transition: transform .5s cubic-bezier(.3,1.5,.6,1); display: flex; align-items: center; flex-direction: row-reverse;
}
#peek.show { transform: translateX(0) rotate(-12deg); }
#peek img { width: 110px; }
#peek span { background: #fff; color: #000; font-family: var(--f-comic); font-weight: 700; padding: 8px 12px; border-radius: 14px; border: 3px solid #000; margin-right: -6px; }

/* ================= SECRETS ================= */
.secret { position: fixed; inset: 0; z-index: 970; pointer-events: none; display: grid; place-items: center; }
.secret.sixseven { display: flex; justify-content: center; align-items: center; gap: 18px; font-family: var(--f-bang); background: rgba(0,0,0,.6); }
.sixseven b { font-size: clamp(120px, 30vw, 300px); color: var(--yellow); -webkit-text-stroke: 4px #000; text-shadow: 10px 10px 0 var(--hot); animation: letterpop .4s; }
.sixseven span { font-size: clamp(60px, 14vw, 140px); }
.sixseven .h1 { animation: juggle .3s ease-in-out infinite alternate; }
.sixseven .h2 { animation: juggle .3s ease-in-out infinite alternate-reverse; }
.secret.zoom img { width: 140vmax; max-width: none; animation: zoomin 2.4s cubic-bezier(.2,.8,.2,1) forwards; }
body.flip main { transform: rotate(180deg) !important; transition: transform .6s; }
body.sbd::after {
  content: 'you can feel it.'; position: fixed; inset: 0; z-index: 940; pointer-events: none; display: grid; place-items: center;
  font-family: var(--f-glitch); font-size: clamp(40px, 10vw, 110px); color: #b6ff3b;
  background: radial-gradient(circle, rgba(140,255,0,.45), rgba(40,90,0,.75)); animation: fog 3s ease-out forwards;
}
body.ultra main { animation: ultra 1s linear infinite; }

/* ================= OHIO MODE ================= */
.lvl-2 { animation: ohiobg 1.2s steps(4) infinite; }
.lvl-2 .sec-title { font-family: var(--f-glitch); animation: wobble 1s ease-in-out infinite; }
.lvl-2 .sec:nth-of-type(odd) { transform: rotate(-.6deg); }
.lvl-2 .sec:nth-of-type(even) { transform: rotate(.6deg); }
.lvl-2 .sticker { animation: spin 2s linear infinite; }
.lvl-2 .panel { animation: hue 3s linear infinite; }
.lvl-2.farting #shake { filter: saturate(calc(1 + var(--e) * 2)); }

/* ================= NORMIE MODE ================= */
.lvl-0 .sunburst, .lvl-0 .mega-title span, .lvl-0 .sticker, .lvl-0 .chamber-frame, .lvl-0 .chamber-label,
.lvl-0 .play-orb, .lvl-0 .btn-mega, .lvl-0 #bluberto::before, .lvl-0 .construction, .lvl-0 .gate-title,
.lvl-0 #reviews, .lvl-0 .modes button.on, .lvl-0 .res-live, .lvl-0 .caret, .lvl-0 .hud-sniffers .dot { animation: none !important; }
.lvl-0 .mega-title { transform: none; }

/* ================= KEYFRAMES ================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes slide { to { background-position: 300% 0; } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes hudpulse { 50% { transform: scale(1.12); } }
@keyframes ticker { to { transform: translateX(-100%); } }
@keyframes wobble { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes letterpop { 0% { transform: scale(.4) rotate(-20deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1); } }
@keyframes float { 50% { translate: 0 -12px; } }
@keyframes hue { to { filter: hue-rotate(360deg); } }
@keyframes angspin { to { --ang: 360deg; } }
@keyframes phaseflash { 0% { background: var(--hot); color: #fff; transform: scale(1.08); } }
@keyframes padhit { 0% { transform: scale(.9); background: #fff; } }
@keyframes smashL { 60% { transform: translateX(120%) scale(1.2); } 100% { transform: translateX(140%) scale(0); opacity: 0; } }
@keyframes smashR { 60% { transform: translateX(-120%) scale(1.2); } 100% { transform: translateX(-140%) scale(0); opacity: 0; } }
@keyframes partybg { 50% { filter: hue-rotate(40deg) brightness(1.2); } }
@keyframes bounce { to { transform: translateY(-30px) rotate(10deg); } }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }
@keyframes juggle { from { transform: translateY(40px); } to { transform: translateY(-40px); } }
@keyframes zoomin { from { transform: scale(.05) rotate(-30deg); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes fog { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes starscroll { to { background-position: 0 220px, 0 220px, 0 220px, 0 220px, 0 220px, 0 0; } }
@keyframes ohiobg { 25% { background-color: #2a0033; } 50% { background-color: #002a1a; } 75% { background-color: #332a00; } }
@keyframes ultra { to { filter: hue-rotate(360deg) saturate(2); } }

/* ================= RESPONSIVE ================= */
.hero-grid > *, .lore-grid > *, .lab-grid > *, .quantum-grid > *, .launch-grid > *, .studio-grid > *, .pressures-wrap > *, .xlate > * { min-width: 0; }
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side.left { display: none; }
  .hero-side.right { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .lore-grid, .lab-grid, .quantum-grid, .launch-grid, .studio-grid, .pressures-wrap { grid-template-columns: 1fr; }
  #stats { grid-template-columns: repeat(3, 1fr); }
  .pressures-wrap { text-align: center; }
  #ridges { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 96px; }
  .sec { padding: 56px 16px; }
  #stats { grid-template-columns: repeat(2, 1fr); }
  .readouts { grid-template-columns: repeat(2, 1fr); }
  .lore-facts { grid-template-columns: 1fr; }
  .xlate { grid-template-columns: 1fr; }
  .xlate-swap { transform: rotate(90deg); justify-self: center; }
  .gauge { width: 160px; }
  .stink-tube { height: 150px; }
  #manifold { height: 360px; }
  #sky { height: 460px; }
  .hud-sniffers, .hud-ctrls .hud-label { display: none; }
  #hud { flex-wrap: nowrap; }
  .hud-aura { flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .hud-ctrls { flex: none; gap: 4px; }
  #rank { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hud-aura, .hud-ctrls { padding: 4px 10px; }
  .readout { font-size: 16px; }
  .readout tr { display: grid; grid-template-columns: 1fr auto; }
  .readout td.n { grid-column: 1 / -1; padding-bottom: 6px; }
  .spec-note { display: none; }
  .piano { height: 140px; }
  .key span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
