/* MagicalWind, "arcade fun". Saturated flat colours, thick night-blue outlines, hard offset shadows.
   Pixel art is always scaled by whole numbers: --px (2 phones, 3 tablet/desktop, 4 from 1440 px, 5 from 2200 px).
   Three themes: Day (default), Candy, Night. The same values live in brand/palette.json; tests/test_site.py
   checks the contrast of every text/background pair below. */

@font-face { font-family: "PS2P"; src: url("/static/fonts/press-start-2p-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify"; src: url("/static/fonts/pixelify-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify"; src: url("/static/fonts/pixelify-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --px: 2;
  --bw: 3px;
  --sh: 4px;
  --ink: #1B1740;
  --cream: #FFF6E0;
  --white: #FFFFFF;
  --sky: #29C5F6;
  --turquoise: #2DE1C2;
  --pink: #FF5FA2;
  --sun: #FFD23F;
  --lime: #9BE83A;
  --mandarin: #FF8A2A;
  --violet: #8A4DFF;
  --f-display: "PS2P", "Courier New", monospace;
  --f-ui: "Pixelify", system-ui, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* theme: day */
  color-scheme: light;
  --bg: #29C5F6;
  --band-a: #FFD23F;
  --band-b: #9BE83A;
  --band-c: #FF5FA2;
  --band-d: #2DE1C2;
  --card: #FFF6E0;
  --text: #1B1740;
  --muted: #4A3F7A;
  --outline: #1B1740;
  --accent: #FF5FA2;
  --btn: #FFD23F;
  --btn-text: #1B1740;
  --btn-2: #FF5FA2;
  --link: #6A2BE0;
  --chip: #8A4DFF;
  --chip-text: #FFFFFF;
  --shadow: #1B1740;
  --foot: #1B1740;
  --foot-text: #FFF6E0;
  --focus: #1B1740;
  --pat-bg: url("/static/img/tiles/day-bg.png");
  --pat-a: url("/static/img/tiles/day-band-a.png");
  --pat-b: url("/static/img/tiles/day-band-b.png");
  --pat-c: url("/static/img/tiles/day-band-c.png");
  --pat-d: url("/static/img/tiles/day-band-d.png");
  --pat-foot: url("/static/img/tiles/day-foot.png");
  --edge-bg: url("/static/img/tiles/day-bg-edge.png");
  --edge-a: url("/static/img/tiles/day-band-a-edge.png");
  --edge-b: url("/static/img/tiles/day-band-b-edge.png");
  --edge-c: url("/static/img/tiles/day-band-c-edge.png");
  --edge-d: url("/static/img/tiles/day-band-d-edge.png");
  --edge-foot: url("/static/img/tiles/day-foot-edge.png");
  --sunburst: url("/static/img/tiles/day-sun.png");
}
:root[data-theme="candy"] {
  color-scheme: light;
  --bg: #FF6FB5;
  --band-a: #FFE45C;
  --band-b: #4BF0C0;
  --band-c: #B07CFF;
  --band-d: #FF9F4A;
  --card: #FFF2F8;
  --text: #1B1740;
  --muted: #5A2E63;
  --outline: #1B1740;
  --accent: #E8177E;
  --btn: #4BF0C0;
  --btn-text: #1B1740;
  --btn-2: #FFE45C;
  --link: #C2006A;
  --chip: #C2006A;
  --chip-text: #FFFFFF;
  --shadow: #1B1740;
  --foot: #3A1050;
  --foot-text: #FFF2F8;
  --focus: #1B1740;
  --pat-bg: url("/static/img/tiles/candy-bg.png");
  --pat-a: url("/static/img/tiles/candy-band-a.png");
  --pat-b: url("/static/img/tiles/candy-band-b.png");
  --pat-c: url("/static/img/tiles/candy-band-c.png");
  --pat-d: url("/static/img/tiles/candy-band-d.png");
  --pat-foot: url("/static/img/tiles/candy-foot.png");
  --edge-bg: url("/static/img/tiles/candy-bg-edge.png");
  --edge-a: url("/static/img/tiles/candy-band-a-edge.png");
  --edge-b: url("/static/img/tiles/candy-band-b-edge.png");
  --edge-c: url("/static/img/tiles/candy-band-c-edge.png");
  --edge-d: url("/static/img/tiles/candy-band-d-edge.png");
  --edge-foot: url("/static/img/tiles/candy-foot-edge.png");
  --sunburst: url("/static/img/tiles/candy-sun.png");
}
:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #241D5E;
  --band-a: #33287F;
  --band-b: #123F73;
  --band-c: #5B1D78;
  --band-d: #0E5560;
  --card: #2C2575;
  --text: #FFF6E0;
  --muted: #D2CBFF;
  --outline: #0B0920;
  --accent: #FF5FA2;
  --btn: #FFD23F;
  --btn-text: #1B1740;
  --btn-2: #3BE8FF;
  --link: #7FF2FF;
  --chip: #FF5FA2;
  --chip-text: #1B1740;
  --shadow: #FF5FA2;
  --foot: #0F0B2E;
  --foot-text: #FFF6E0;
  --focus: #FFD23F;
  --pat-bg: url("/static/img/tiles/night-bg.png");
  --pat-a: url("/static/img/tiles/night-band-a.png");
  --pat-b: url("/static/img/tiles/night-band-b.png");
  --pat-c: url("/static/img/tiles/night-band-c.png");
  --pat-d: url("/static/img/tiles/night-band-d.png");
  --pat-foot: url("/static/img/tiles/night-foot.png");
  --edge-bg: url("/static/img/tiles/night-bg-edge.png");
  --edge-a: url("/static/img/tiles/night-band-a-edge.png");
  --edge-b: url("/static/img/tiles/night-band-b-edge.png");
  --edge-c: url("/static/img/tiles/night-band-c-edge.png");
  --edge-d: url("/static/img/tiles/night-band-d-edge.png");
  --edge-foot: url("/static/img/tiles/night-foot-edge.png");
  --sunburst: url("/static/img/tiles/night-sun.png");
}
/* Without JavaScript the theme can't be saved: follow the system setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #241D5E; --band-a: #33287F; --band-b: #123F73; --band-c: #5B1D78; --band-d: #0E5560;
    --card: #2C2575; --text: #FFF6E0; --muted: #D2CBFF; --outline: #0B0920; --accent: #FF5FA2;
    --btn: #FFD23F; --btn-text: #1B1740; --btn-2: #3BE8FF; --link: #7FF2FF; --chip: #FF5FA2; --chip-text: #1B1740;
    --shadow: #FF5FA2; --foot: #0F0B2E; --foot-text: #FFF6E0; --focus: #FFD23F;
    --pat-bg: url("/static/img/tiles/night-bg.png"); --pat-a: url("/static/img/tiles/night-band-a.png");
    --pat-b: url("/static/img/tiles/night-band-b.png"); --pat-c: url("/static/img/tiles/night-band-c.png");
    --pat-d: url("/static/img/tiles/night-band-d.png"); --pat-foot: url("/static/img/tiles/night-foot.png");
    --edge-bg: url("/static/img/tiles/night-bg-edge.png"); --edge-a: url("/static/img/tiles/night-band-a-edge.png");
    --edge-b: url("/static/img/tiles/night-band-b-edge.png"); --edge-c: url("/static/img/tiles/night-band-c-edge.png");
    --edge-d: url("/static/img/tiles/night-band-d-edge.png"); --edge-foot: url("/static/img/tiles/night-foot-edge.png");
    --sunburst: url("/static/img/tiles/night-sun.png");
  }
}
@media (min-width: 768px) { :root { --px: 3; --bw: 4px; --sh: 6px; } }
@media (min-width: 1440px) { :root { --px: 4; } }
@media (min-width: 2200px) { :root { --px: 5; --sh: 8px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--f-body);
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--pat-bg);
  background-size: calc(16px * var(--px));
  image-rendering: pixelated;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 1.125rem; } }
img, video, canvas { max-width: 100%; }
img { height: auto; }
.shot img, .cab-screen img, .tv img, video, .polaroid img { image-rendering: auto; }
.spr, .pixel, canvas { image-rendering: pixelated; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
h3, h4 { font: 700 1.375rem/1.25 var(--f-ui); }
p, ul, ol, dl { margin: 0 0 1em; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 4px; }
:focus { outline: none; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
main:focus, section:focus { outline: none; }
strong { font-weight: 700; }
code { font-family: var(--f-ui); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.no-js .needs-js { display: none !important; }
.small { font-size: .92em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 860px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }
@media (min-width: 1920px) { .wrap { max-width: 1440px; } .wrap.narrow { max-width: 960px; } }
@media (min-width: 2200px) { .wrap { max-width: 1760px; } .wrap.narrow { max-width: 1100px; } body { font-size: 1.3rem; } }
.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 300; padding: 12px 16px;
  background: var(--sun); color: var(--ink); font: 700 18px var(--f-ui); border: 3px solid var(--ink);
}
.skip:focus { left: 12px; }

/* ---------- stickers, labels, buttons, chips ---------- */
.sticker {
  background: var(--card);
  color: var(--text);
  border: var(--bw) solid var(--outline);
  box-shadow: var(--sh) var(--sh) 0 var(--shadow);
  padding: 20px;
}
@media (min-width: 768px) { .sticker { padding: 26px 30px; } }
.tilt-l { transform: rotate(-1deg); }
.tilt-r { transform: rotate(1deg); }
.note-yellow { --card: #FFE45C; --text: #1B1740; --link: #5A1FC0; --muted: #3B2F66; }

.label {
  --lc: var(--sun);
  display: inline-block;
  font: 400 16px/1.5 var(--f-display);
  background: var(--lc);
  color: #1B1740;
  border: var(--bw) solid #1B1740;
  box-shadow: var(--sh) var(--sh) 0 #1B1740;
  padding: .55em .8em .45em;
  margin: 0 0 28px;
  transform: rotate(-1.5deg);
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (min-width: 768px) { .label { font-size: 24px; } }
@media (min-width: 2200px) { .label { font-size: 32px; } }
.label-sun { --lc: var(--sun); }
.label-pink { --lc: var(--pink); }
.label-lime { --lc: var(--lime); }
.label-sky { --lc: var(--sky); }
.label-cream { --lc: var(--cream); }
.label-small { font-size: 16px; margin-top: 12px; }
/* never put a label on a band of the same colour */
:root:not([data-theme="night"]) .b-a .label-sun { --lc: var(--sky); }
:root:not([data-theme="night"]) .b-c .label-pink { --lc: var(--sun); }
:root[data-theme="candy"] .b-bg .label-pink { --lc: var(--sun); }
.sticker .label { margin-bottom: 20px; }
h1.page-title { font-size: 24px; }
@media (min-width: 768px) { h1.page-title { font-size: 32px; } }
@media (min-width: 2200px) { h1.page-title { font-size: 40px; } }
.h-pixel { font: 400 16px/1.5 var(--f-display); margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  font: 700 19px/1.1 var(--f-ui); letter-spacing: .02em; text-transform: uppercase;
  color: var(--btn-text); background: var(--btn);
  border: var(--bw) solid #1B1740; border-radius: 0;
  box-shadow: 4px 4px 0 #1B1740;
  text-decoration: none; cursor: pointer;
  position: relative;
}
:root[data-theme="night"] .btn { box-shadow: 4px 4px 0 var(--shadow); }
.btn:hover { text-decoration: none; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #1B1740; animation: boing .42s steps(4, end); }
:root[data-theme="night"] .btn:hover { box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 #1B1740; animation: none; }
.btn-2 { background: var(--btn-2); }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: 17px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; animation: none; }
@keyframes boing {
  0% { transform: translate(0, 0); }
  35% { transform: translate(-2px, -8px); }
  70% { transform: translate(-2px, 0); }
  100% { transform: translate(-2px, -2px); }
}
.actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }

.chip, .chips li {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 15px/1.2 var(--f-ui); letter-spacing: .04em; text-transform: uppercase;
  background: var(--chip); color: var(--chip-text);
  border: 3px solid #1B1740; padding: 5px 10px; margin: 0;
}
.chip-light, .chips .chip-light { background: var(--card); color: var(--text); }
.chip .dot { width: 10px; height: 10px; background: var(--sun); border: 2px solid #1B1740; flex: none; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }

/* ---------- header ---------- */
.topbar {
  position: relative; z-index: 20;
  background: var(--card); color: var(--text);
  border-bottom: var(--bw) solid var(--outline);
  box-shadow: 0 var(--sh) 0 rgba(27, 23, 64, .25);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; }
.logo-sm { zoom: 1; display: block; }
@media (min-width: 480px) { .logo-sm { zoom: 2; } }
@media (min-width: 2200px) { .logo-sm { zoom: 3; } }
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; min-width: 48px; padding: 8px 14px;
  font: 700 18px var(--f-ui); text-transform: uppercase; color: #1B1740; background: var(--sun);
  border: 3px solid #1B1740; box-shadow: 3px 3px 0 #1B1740; cursor: pointer;
}
.no-js .menu-btn { display: none; }
.menu-ico { width: 18px; height: 14px; background: linear-gradient(#1B1740 0 4px, transparent 4px 5px, #1B1740 5px 9px, transparent 9px 10px, #1B1740 10px 14px); }
.menu { display: none; width: 100%; }
.no-js .menu, .menu.open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.nav a {
  display: flex; align-items: center; min-height: 48px; padding: 6px 14px;
  font: 700 20px var(--f-ui); color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: .04em;
  border: 3px solid transparent;
}
.nav a:hover { border-color: var(--outline); background: var(--sun); color: #1B1740; }
.nav a[aria-current="page"] { background: var(--pink); color: #1B1740; border-color: #1B1740; box-shadow: 3px 3px 0 #1B1740; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 0 10px; }
.theme-switch { display: inline-flex; border: 3px solid #1B1740; box-shadow: 3px 3px 0 #1B1740; background: var(--cream); }
.theme-btn, .sound-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 10px;
  font: 700 16px var(--f-ui); color: #1B1740; background: var(--cream); border: 0; cursor: pointer;
}
.theme-btn + .theme-btn { border-left: 3px solid #1B1740; }
.theme-btn[aria-pressed="true"] { background: var(--sun); box-shadow: inset 0 -4px 0 #1B1740; }
.theme-btn[aria-pressed="true"] span::after { content: " \2713"; }
.sound-btn { border: 3px solid #1B1740; box-shadow: 3px 3px 0 #1B1740; }
.sound-btn[aria-pressed="true"] { background: var(--lime); }
.sound-state { font-weight: 400; text-transform: uppercase; font-size: 13px; padding: 1px 5px; border: 2px solid #1B1740; background: #fff; }
.ico { zoom: 2; display: block; }
.no-js .controls { display: none; }
@media (min-width: 1200px) {
  .menu-btn { display: none; }
  .menu, .no-js .menu { display: flex !important; width: auto; align-items: center; gap: 18px; }
  .topbar-in { flex-wrap: nowrap; }
  .nav ul { flex-direction: row; padding: 0; gap: 2px; }
  .nav a { font-size: 17px; padding: 4px 10px; }
  .controls { padding: 0; flex-wrap: nowrap; }
  .theme-btn, .sound-btn { font-size: 15px; padding: 4px 8px; }
}
@media (min-width: 2200px) { .nav a { font-size: 22px; } .theme-btn, .sound-btn { font-size: 19px; } }

/* HUD: scroll "levels" (decorative) */
.hud {
  position: fixed; left: 14px; bottom: 14px; z-index: 30; display: none; align-items: center; gap: 10px;
  padding: 8px 10px; background: #1B1740; color: var(--sun); border: 3px solid var(--sun);
  font: 400 12px/1 var(--f-display); pointer-events: none;
}
.js .hud { display: flex; }
@media (max-width: 767px) { .js .hud { display: none; } }
.hud-bar { width: 80px; height: 12px; border: 2px solid var(--sun); background: #1B1740; }
.hud-fill { display: block; height: 100%; width: 0; background: var(--pink); }

/* ---------- bands (full-width colour sections with a zigzag top edge) ---------- */
.band {
  --band: var(--bg); --pat: var(--pat-bg); --edge: var(--edge-bg);
  position: relative;
  background-color: var(--band);
  background-image: var(--pat);
  background-size: calc(16px * var(--px));
  padding: 56px 0 64px;
}
@media (min-width: 768px) { .band { padding: 80px 0 88px; } }
.band::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(-4px * var(--px)); height: calc(5px * var(--px));
  background: var(--edge) repeat-x 0 0 / calc(8px * var(--px)) calc(5px * var(--px));
  pointer-events: none;
}
.topbar + main > .band:first-child::before, main > article > header.band::before { display: none; }
.b-bg { --band: var(--bg); --pat: var(--pat-bg); --edge: var(--edge-bg); }
.b-a { --band: var(--band-a); --pat: var(--pat-a); --edge: var(--edge-a); }
.b-b { --band: var(--band-b); --pat: var(--pat-b); --edge: var(--edge-b); }
.b-c { --band: var(--band-c); --pat: var(--pat-c); --edge: var(--edge-c); }
.b-d { --band: var(--band-d); --pat: var(--pat-d); --edge: var(--edge-d); }
.b-foot, .b-screen { --band: var(--foot); --pat: var(--pat-foot); --edge: var(--edge-foot); color: var(--foot-text); }
.b-screen .label { --lc: var(--sun); }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 30px; }
.section-head .label { margin: 0; }
.two-col { display: grid; gap: 34px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.two-col > * { min-width: 0; }
@media (min-width: 960px) { .two-col { grid-template-columns: 1.45fr 1fr; gap: 44px; } }

/* ---------- Puff ---------- */
.puff-sprite {
  --s: var(--px); --f: 0;
  display: inline-block; flex: none;
  width: calc(32px * var(--s)); height: calc(32px * var(--s));
  background: url("/static/img/sprites/puff-sheet.png") no-repeat;
  background-size: calc(608px * var(--s)) calc(32px * var(--s));
  background-position: calc(var(--f) * -32px * var(--s)) 0;
  image-rendering: pixelated;
}
.puff-xl { --s: calc(var(--px) * 3); }
.puff-sprite[data-mood="blink"] { --f: 2; }
.puff-sprite[data-mood="happy"] { --f: 12; }
.puff-sprite[data-mood="blow"] { --f: 14; }
.puff-sprite[data-mood="surprised"] { --f: 16; }
.puff-sprite[data-mood="sleep"] { --f: 17; }
:root[data-theme="night"] .puff-sprite {
  filter: drop-shadow(calc(var(--s) * 1px) 0 0 #FFF6E0) drop-shadow(calc(var(--s) * -1px) 0 0 #FFF6E0)
          drop-shadow(0 calc(var(--s) * 1px) 0 #FFF6E0) drop-shadow(0 calc(var(--s) * -1px) 0 #FFF6E0);
}
.puff-sprite.floaty { animation: floaty 1.2s steps(1, end) infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--s) * -2px)); } }

.bubble {
  position: relative; margin: 0; max-width: 32ch;
  font: 400 18px/1.35 var(--f-ui);
  background: #FFFFFF; color: #1B1740;
  border: 3px solid #1B1740; box-shadow: 4px 4px 0 #1B1740;
  padding: 10px 14px;
}
@media (min-width: 2200px) { .bubble { font-size: 24px; } }
/* stepped pixel tail */
.bubble::before, .bubble::after {
  content: ""; position: absolute; top: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 34%, 67% 34%, 67% 67%, 34% 67%, 34% 100%, 0 100%);
}
.bubble::before { left: 18px; width: 21px; height: 21px; background: #1B1740; margin-top: 0; }
.bubble::after { left: 21px; width: 12px; height: 12px; background: #FFFFFF; margin-top: -3px; }
.puff-says { display: flex; align-items: flex-end; gap: 6px; margin: 0; }
.puff-says .bubble { margin-bottom: calc(18px * var(--px)); }
.puff-left { flex-direction: row; }
.puff-left .bubble::before, .puff-left .bubble::after { transform: scaleX(-1); }
.puff-left .bubble::before { left: -3px; }
.puff-left .bubble::after { left: 6px; }
.puff-right { flex-direction: row-reverse; }
.puff-right .bubble::before { left: auto; right: -3px; }
.puff-right .bubble::after { left: auto; right: 6px; }

/* ---------- studio hero: showreel + featured games ---------- */
.hero-studio { position: relative; overflow: hidden; min-height: calc(100vh - 70px); min-height: calc(100svh - 70px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0 56px; }
@media (min-width: 1100px) { .hero-studio { padding: 56px 0 72px; } }
.reel { position: absolute; inset: 0; }
.reel-video { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; opacity: .85; image-rendering: auto; }
.reel-shade {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(11, 9, 32, .35) 0 2px, transparent 2px 4px), linear-gradient(90deg, color-mix(in srgb, var(--foot) 88%, transparent) 0%, color-mix(in srgb, var(--foot) 72%, transparent) 48%, color-mix(in srgb, var(--foot) 30%, transparent) 100%);
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 34px; align-items: center; }
@media (min-width: 1100px) { .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 48px; } }
.kicker {
  display: inline-block; margin: 0 0 18px; padding: 6px 12px;
  font: 700 18px var(--f-ui); text-transform: uppercase; letter-spacing: .08em;
  background: var(--pink); color: #1B1740; border: 3px solid #1B1740; box-shadow: 3px 3px 0 #0B0920; transform: rotate(-3deg);
}
.hero-logo { --ls: 3; margin: 0 0 18px; line-height: 0; }
@media (min-width: 480px) { .hero-logo { --ls: 4; } }
@media (min-width: 1440px) { .hero-logo { --ls: 5; } }
@media (min-width: 2200px) { .hero-logo { --ls: 7; } }
.logo-big { zoom: var(--ls); display: block; }
.letters { position: relative; display: block; width: calc(var(--w) * var(--ls) * 1px); height: calc(var(--h) * var(--ls) * 1px); }
.lt {
  position: absolute; left: calc(var(--x) * var(--ls) * 1px); top: calc(var(--y) * var(--ls) * 1px);
  width: calc(var(--lw) * var(--ls) * 1px); height: calc(var(--lh) * var(--ls) * 1px);
  background: url("/static/img/sprites/letters.png") no-repeat;
  background-size: calc(var(--sw) * var(--ls) * 1px) calc(var(--sh2) * var(--ls) * 1px);
  background-position: calc(var(--sx) * var(--ls) * -1px) 0;
  image-rendering: pixelated;
}
.letters.hop .lt, .letters:hover .lt { animation: hop 1.1s steps(1, end) 2; animation-delay: calc(var(--i) * 70ms); }
.letters.dizzy .lt { animation: dizzy .9s steps(4, end) 3; animation-delay: calc(var(--i) * 40ms); }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(calc(var(--ls) * -3px)); } 82% { transform: translateY(calc(var(--ls) * -1px)); } }
@keyframes dizzy { 0% { transform: translateY(0) rotate(0); } 25% { transform: translateY(calc(var(--ls) * -4px)) rotate(-12deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(calc(var(--ls) * -2px)) rotate(12deg); } 100% { transform: none; } }
.hero-title { font: 400 20px/1.45 var(--f-display); margin: 0 0 18px; color: var(--foot-text); text-shadow: 3px 3px 0 #0B0920; }
@media (min-width: 768px) { .hero-title { font-size: 24px; } }
@media (min-width: 1440px) { .hero-title { font-size: 32px; } }
.hero-text { font-size: 1.1em; max-width: 44ch; margin-bottom: 26px; color: var(--foot-text); }
.hero-games { display: grid; gap: 26px; }
.poster { position: relative; background: #0B0920; border: var(--bw) solid #0B0920; box-shadow: var(--sh) var(--sh) 0 var(--pink); transform: translate(var(--tx, 0), var(--ty, 0)); }
.poster-2 { box-shadow: var(--sh) var(--sh) 0 var(--sun); }
@media (min-width: 1100px) { .poster-1 { margin-right: 7%; } .poster-2 { margin-left: 7%; } }
.poster-art { display: block; position: relative; overflow: hidden; aspect-ratio: 2.35 / 1; }
.poster-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.poster-logo { position: absolute; left: 5%; bottom: 10%; width: 52%; height: auto; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 #0B0920); }
.poster-1 .poster-logo { width: 46%; bottom: 14%; }
.poster:hover .poster-bg, .capsule:hover .cap-art img, .media-tile:hover img, .media-tile:hover video { transform: scale(1.04); }
.poster-info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; background: var(--card); color: var(--text); border-top: var(--bw) solid #0B0920; }
.poster-name { font: 400 16px/1.4 var(--f-display); margin: 0; flex: 1 1 100%; }
.poster-name a { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.poster-name a:hover { text-decoration: underline; }
.poster-info .actions { margin: 0; }
.poster-info .badges { margin: 0; }
.hero-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 30px; }
.hero-guide { display: flex; align-items: flex-end; gap: 4px; }
.puff-l { --s: calc(var(--px) * 2); }
.bubble-hero { margin-bottom: calc(40px * var(--px)); max-width: 26ch; }
.bubble-hero::before { left: -3px; transform: scaleX(-1); }
.bubble-hero::after { left: 6px; transform: scaleX(-1); }
.puff-btn { position: relative; z-index: 2; background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; min-width: 44px; min-height: 44px; }
.puff-btn:focus-visible { outline-offset: 6px; }
.reel-toggle {
  min-height: 44px; padding: 6px 12px; font: 700 16px var(--f-ui); color: var(--foot-text); background: transparent;
  border: 3px solid var(--foot-text); cursor: pointer;
}
.reel-toggle[aria-pressed="true"] { background: var(--foot-text); color: var(--foot); }
.sunburst {
  position: absolute; left: 50%; top: 50%;
  width: calc(150px * var(--px)); height: calc(150px * var(--px));
  margin: calc(-75px * var(--px)) 0 0 calc(-75px * var(--px));
  background: var(--sunburst) no-repeat 0 0 / 100% 100%;
  image-rendering: pixelated;
}
.btn-ghost { background: var(--card); color: var(--text); }

/* badges, tags */
.badges { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; margin: 0;
  font: 700 14px/1.2 var(--f-ui); text-transform: uppercase; letter-spacing: .04em;
  background: var(--card); color: var(--text); border: 3px solid #1B1740;
}
.badge-live { background: #9BE83A; color: #1B1740; }
.badge-live::before { content: ""; width: 8px; height: 8px; background: #FF5FA2; border: 2px solid #1B1740; }
.badge-off { background: transparent; color: inherit; border-style: dashed; border-color: currentColor; }
.badge-off::before { content: "\2715"; font-size: 12px; }
.tags { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { margin: 0; padding: 3px 8px; font: 700 14px/1.2 var(--f-ui); color: #1B1740; background: var(--sky); border: 2px solid #1B1740; }
.tags li:nth-child(4n+2) { background: var(--pink); }
.tags li:nth-child(4n+3) { background: var(--sun); }
.tags li:nth-child(4n+4) { background: var(--lime); }
.section-intro { max-width: 52ch; margin: 0; font-size: 1.06em; font-weight: 500; }
.b-screen .section-intro, .b-screen figcaption, .crew-text { color: var(--foot-text); }
.b-screen .section-intro a, .b-screen figcaption a, .crew-text a, .hero-text a { color: #FFD23F; }

/* ---------- store capsules ---------- */
.capsules { display: grid; gap: 36px; }
@media (min-width: 900px) { .capsules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }
.capsules-one { max-width: 640px; grid-template-columns: 1fr !important; }
.capsule {
  --cab: var(--violet); --cab-dark: #5A22C8;
  display: flex; flex-direction: column; background: var(--card); color: var(--text);
  border: var(--bw) solid #1B1740; box-shadow: var(--sh) var(--sh) 0 var(--shadow);
}
.cab-mandarin { --cab: var(--mandarin); --cab-dark: #A84508; }
.cap-art { display: block; overflow: hidden; border-bottom: var(--bw) solid #1B1740; background: #0B0920; line-height: 0; }
.cap-art img { width: 100%; aspect-ratio: 920 / 430; object-fit: cover; image-rendering: auto; }
.cap-body { padding: 18px 20px 4px; flex: 1; }
.cap-name { font: 400 20px/1.4 var(--f-display); margin: 0 0 6px; }
@media (min-width: 768px) { .cap-name { font-size: 24px; } }
.cap-name a { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.cap-name a:hover { text-decoration: underline; }
.cap-tag { font: 700 20px/1.3 var(--f-ui); margin-bottom: 14px; }
.cap-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 26px; margin: 0 0 16px; }
.cap-meta div { margin: 0; }
.cap-meta dt { font: 700 13px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cap-meta dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 520px) { .cap-meta { grid-template-columns: 1fr 1fr; } }
.cap-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 16px 20px;
  background: var(--cab-dark); border-top: var(--bw) solid #1B1740; color: #FFFFFF;
}
.cap-panel .badge-off { color: #FFFFFF; }
.coin-btn {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 10px 16px;
  font: 400 14px/1.3 var(--f-display); text-transform: uppercase;
  color: #1B1740; background: var(--sun); border: var(--bw) solid #1B1740; box-shadow: 4px 4px 0 #1B1740;
  text-decoration: none;
}
@media (min-width: 768px) { .coin-btn { font-size: 16px; } }
.coin-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #1B1740; }
.coin-btn:active, .coin-btn.inserted { transform: translate(4px, 4px); box-shadow: 0 0 0 #1B1740; }
.coin { width: 24px; height: 24px; flex: none; background: url("/static/img/sprites/coin.png") no-repeat 0 0 / 96px 24px; image-rendering: pixelated; }
.coin-btn:hover .coin, .coin-btn:focus-visible .coin { animation: coin .5s steps(4) infinite; }
@keyframes coin { to { background-position: -96px 0; } }
.coin-txt { animation: blink 1s steps(1, end) 8; }
@keyframes blink { 50% { color: #A3005A; } }
.coin-btn.inserted .coin { animation: drop .35s steps(4, end) forwards; }
@keyframes drop { to { transform: translateY(18px); opacity: 0; } }

/* ---------- trailers, media strip ---------- */
.tablist { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.tablist button {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; cursor: pointer;
  font: 700 18px var(--f-ui); color: var(--foot-text); background: transparent; border: 3px solid var(--foot-text);
}
.tablist button[aria-selected="true"] { background: #FFD23F; color: #1B1740; border-color: #1B1740; box-shadow: 4px 4px 0 var(--pink); }
.tab-logo { height: 28px; width: auto; image-rendering: pixelated; }
.tabs-on .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.panel-title { font: 400 16px/1.4 var(--f-display); color: var(--foot-text); margin: 26px 0 14px; }
.tabpanel + .tabpanel { margin-top: 34px; }
.tabs-on .tabpanel + .tabpanel { margin-top: 0; }
.crt-big { padding: 12px; }
.strip-title { font: 400 16px/1.4 var(--f-display); color: var(--foot-text); margin: 48px 0 18px; }
@media (min-width: 768px) { .strip-title { font-size: 20px; } }
.media-strip { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.media-tile { position: relative; margin: 0; overflow: hidden; border: 3px solid var(--foot-text); background: #0B0920; line-height: 0; }
.media-tile img, .media-tile video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.media-tile a.shot { display: block; }
.media-tag { position: absolute; left: 8px; top: 8px; padding: 3px 7px; font: 700 13px/1.2 var(--f-ui); text-transform: uppercase; color: #1B1740; background: #FFD23F; border: 2px solid #1B1740; pointer-events: none; }

/* ---------- follow strip ---------- */
.follow { padding: 48px 0 56px; }
@media (min-width: 768px) { .follow { padding: 64px 0 72px; } }
.follow-in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }
.follow-in .label { margin: 0; }
.follow-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.follow-list li { margin: 0; }
.follow-item {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 8px;
  font: 700 17px var(--f-ui); color: var(--text); background: var(--card); border: 3px solid #1B1740; box-shadow: 4px 4px 0 #1B1740; text-decoration: none;
}
a.follow-item:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #1B1740; }
.follow-item.off { background: transparent; color: var(--text); border-style: dashed; border-color: var(--text); box-shadow: none; }
.f-ico { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 4px; font: 400 10px/1 var(--f-display); color: #FFD23F; background: #1B1740; }
.follow-item.off .f-ico { background: transparent; color: var(--text); border: 2px dashed var(--text); }

/* ---------- crew ---------- */
.crew-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 1000px) { .crew-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.crew-portraits { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }
.avatar { --i: 0; position: relative; width: calc(32px * var(--px)); height: calc(32px * var(--px)); background: var(--sky); border: 3px solid #1B1740; box-shadow: 4px 4px 0 #0B0920; overflow: hidden; }
.avatar::before {
  content: ""; position: absolute; left: calc(4px * var(--px) - 3px); top: calc(8px * var(--px) - 3px);
  width: calc(24px * var(--px)); height: calc(24px * var(--px));
  background: url("/static/img/sprites/crew.png") no-repeat; background-size: calc(120px * var(--px)) calc(24px * var(--px));
  background-position: calc(var(--i) * -24px * var(--px)) 0; image-rendering: pixelated;
}
.avatar[data-i="1"] { --i: 1; background: var(--pink); }
.avatar[data-i="2"] { --i: 2; background: var(--sun); }
.avatar[data-i="3"] { --i: 3; background: var(--lime); }
.avatar[data-i="4"] { --i: 4; background: var(--violet); }
.avatar-puff { background: var(--cream); }
.avatar-puff::before { display: none; }
.avatar-puff .puff-sprite { position: absolute; left: -3px; top: -3px; --s: var(--px); }
.crew-text { max-width: 60ch; }
.how { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 16px; }
.how li { margin: 0; padding: 16px 20px; }
.how h3 { font: 400 14px/1.4 var(--f-display); margin-bottom: 8px; }
.how p { margin: 0; }

/* ---------- leaf game ---------- */
.game-wrap { display: grid; gap: 34px; align-items: start; }
@media (min-width: 1000px) { .game-wrap { grid-template-columns: .85fr 1.15fr; gap: 44px; } }
.scoreboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 20px; }
.scoreboard div { background: #1B1740; border: 3px solid #1B1740; padding: 8px 10px; text-align: center; }
.scoreboard dt { font: 700 15px var(--f-ui); color: var(--cream); text-transform: uppercase; letter-spacing: .06em; }
.scoreboard dd { margin: 4px 0 0; font: 400 20px/1.2 var(--f-display); color: var(--sun); }
.game-screen { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.crt { background: #0B0920; border: var(--bw) solid #1B1740; box-shadow: var(--sh) var(--sh) 0 var(--shadow); padding: 10px; }
:root[data-theme="night"] .crt { border-color: #FFF6E0; }
.crt-game { padding: 8px; line-height: 0; }
#leafgame { --gs: 2; display: block; width: calc(144px * var(--gs)); height: calc(90px * var(--gs)); max-width: none; cursor: pointer; touch-action: manipulation; }
.game-puff { align-self: flex-end; }

/* ---------- game pages ---------- */
.game-hero { position: relative; overflow: hidden; min-height: min(78vh, 760px); display: flex; align-items: flex-end; padding: 120px 0 64px; }
@media (min-width: 960px) { .game-hero { padding: 160px 0 96px; } }
.gh-bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; image-rendering: auto; }
.gh-shade { position: absolute; inset: 0;
  background: linear-gradient(0deg, color-mix(in srgb, var(--foot) 96%, transparent) 0%, color-mix(in srgb, var(--foot) 82%, transparent) 38%, color-mix(in srgb, var(--foot) 15%, transparent) 75%); }
.game-hero-in { position: relative; z-index: 1; }
.crumbs { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; font: 700 17px var(--f-ui);
  background: var(--card); color: var(--text); border: 3px solid #1B1740; padding: 0 10px; }
.crumbs a { color: var(--link); display: inline-flex; align-items: center; justify-content: center; min-height: 46px; min-width: 48px; padding: 0 2px; }
.game-logo { margin: 0 0 18px; line-height: 0; }
.game-logo-img { width: min(560px, 100%); height: auto; filter: drop-shadow(4px 4px 0 #0B0920); image-rendering: pixelated; }
.game-tagline { font: 700 22px/1.3 var(--f-ui); color: var(--foot-text); margin-bottom: 18px; text-shadow: 2px 2px 0 #0B0920; }
@media (min-width: 768px) { .game-tagline { font-size: 28px; } }
.game-hero .badges { margin-bottom: 24px; }
.game-hero .badge-off { color: var(--foot-text); }
.status-box { margin-bottom: 26px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { font: 700 17px/1.5 var(--f-ui); text-transform: uppercase; letter-spacing: .03em; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 8px; } }
.video-main { margin: 0; }
.video video { display: block; width: 100%; height: auto; background: #000; }
.video figcaption { margin-top: 18px; font: 700 18px var(--f-ui); color: var(--foot-text); }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.feature { margin: 0; }
.feature:nth-child(3n+1) { transform: rotate(-.7deg); }
.feature:nth-child(3n+3) { transform: rotate(.7deg); }
.feature-n { display: inline-block; font: 400 16px var(--f-display); background: var(--pink); color: #1B1740; border: 3px solid #1B1740; padding: 6px 8px 4px; margin-bottom: 12px; }
.feature:nth-child(even) .feature-n { background: var(--lime); }
.feature:nth-child(3n) .feature-n { background: var(--sky); }
.feature p:last-child { margin-bottom: 0; }
.clips { display: grid; gap: 28px; }
@media (min-width: 860px) { .clips { grid-template-columns: repeat(2, 1fr); } }
.clip { margin: 0; padding: 12px; }
.crt-small { padding: 6px; box-shadow: none; }
.clip figcaption { margin-top: 12px; font: 700 18px/1.35 var(--f-ui); }
.lead { font-size: 1.12em; max-width: 60ch; }
.levels { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); counter-reset: lv; }
.level { margin: 0; }
.level h3, .level h4 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.range { font: 400 14px/1 var(--f-display); background: var(--sun); color: #1B1740; border: 3px solid #1B1740; padding: 6px 6px 4px; }
.level p { margin: 0; }
.branches { display: grid; gap: 28px; }
@media (min-width: 860px) { .branches { grid-template-columns: 1fr 1fr; } }
.branch .levels-branch { grid-template-columns: 1fr; gap: 12px; margin: 0; }
.branch .level { border-left: 6px solid var(--pink); padding-left: 12px; }
.branch-2 .level { border-left-color: var(--lime); }
.gallery { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery li { margin: 0; }
.polaroid { margin: 0; background: #FFFFFF; border: 3px solid #1B1740; box-shadow: 5px 5px 0 #1B1740; padding: 8px 8px 10px; display: block; }
.polaroid img { display: block; width: 100%; }
.polaroid figcaption { color: #1B1740; font: 700 17px/1.3 var(--f-ui); margin-top: 8px; }
.polaroid a.shot { display: block; }
a.polaroid:hover, .polaroid:hover { transform: translate(-2px, -3px); box-shadow: 7px 8px 0 #1B1740; }
.gallery-small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hint-on-band { font-weight: 600; }
.faq { display: grid; gap: 16px; }
.faq details { padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 18px;
  font: 700 21px/1.3 var(--f-ui);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; font: 400 16px/1 var(--f-display); background: var(--sun); color: #1B1740; border: 3px solid #1B1740; }
.faq details[open] summary::before { content: "-"; background: var(--pink); }
.faq details p { padding: 0 18px 16px 62px; margin: 0; }
.ai-box p:last-child, .note-yellow p:last-child { margin-bottom: 0; }

/* ---------- news, pages ---------- */
.news-list { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin-bottom: 30px; }
.news-list-full { grid-template-columns: 1fr; }
.news-item:nth-child(odd) { transform: rotate(-.6deg); }
.news-item:nth-child(even) { transform: rotate(.6deg); }
.news-date { font: 700 15px var(--f-ui); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.news-title { font: 700 1.4rem/1.25 var(--f-ui); }
.news-title a { color: var(--text); }
.page-head { padding: 36px 0 70px; }
@media (min-width: 768px) { .page-head { padding: 52px 0 96px; } }
.page-head-in { display: grid; gap: 24px; align-items: end; }
@media (min-width: 960px) { .page-head-in { grid-template-columns: 1.6fr 1fr; } }
.page-head .lead { margin: 6px 0 22px; }
.page-head-puff { justify-self: end; }
.page-head .actions { margin: 0; }
.prose { max-width: 70ch; }
.sticker.prose { max-width: none; }
.prose h2 { font: 400 16px/1.5 var(--f-display); margin: 1.6em 0 .7em; }
@media (min-width: 768px) { .prose h2 { font-size: 20px; } }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin-bottom: .55em; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px; background: var(--pink); border: 2px solid var(--outline); }
.prose > :last-child { margin-bottom: 0; }
.prose-ai > p:first-child { font-size: 1.15em; background: #FFE45C; color: #1B1740; border: 3px solid #1B1740; padding: 12px 16px; }
.copy-text { user-select: all; }
.note-line { font: 700 20px/1.4 var(--f-ui); }
.link-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.small-note { display: inline-block; margin-top: 34px; padding: 14px 18px; }
.big-code { font: 400 64px/1 var(--f-display); color: #1B1740; text-shadow: 6px 6px 0 var(--pink); margin: 0 0 26px; }
:root[data-theme="night"] .big-code { color: var(--sun); }
@media (min-width: 768px) { .big-code { font-size: 96px; } }
.status-card { display: flex; gap: 18px; align-items: center; text-align: left; margin: 0 auto 26px; max-width: 640px; }
.status-card .lead { margin: 0; }
.center .actions { justify-content: center; }
.logo-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.logo-tile { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.logo-tile p { margin: 0; }
.logo-art { display: grid; place-items: center; min-height: 140px; background: #FFFFFF; border: 3px solid #1B1740; padding: 14px; }
.logo-tile.dark .logo-art { background: #1B1740; }
.logo-tile.wide .logo-art { background: var(--sky); }

/* ---------- forms ---------- */
.form .field { margin-bottom: 18px; }
.form label { display: block; font: 700 18px var(--f-ui); margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: #1B1740; background: #FFFFFF; border: 3px solid #1B1740; border-radius: 0; }
.form .hint, .form .opt { color: var(--muted); font-size: .92em; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.footer { padding: 64px 0 90px; }
.footer a { color: var(--foot-text); }
.footer a:hover { color: var(--sun); }
.footer-in { display: grid; gap: 34px; }
@media (min-width: 900px) { .footer-in { grid-template-columns: 1fr 2fr; } }
.footer-brand { display: flex; gap: 18px; align-items: center; }
.footer-brand p { margin: 0; font: 400 18px/1.5 var(--f-ui); }
.footer-brand strong { font-weight: 700; font-size: 22px; }
.emblem-foot { zoom: 3; display: block; }
.footer-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer-h { font: 400 14px/1.4 var(--f-display); color: var(--sun); margin-bottom: 12px; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; font: 700 18px var(--f-ui); }
.footer-copy { grid-column: 1 / -1; border-top: 3px dashed rgba(255, 246, 224, .45); padding-top: 22px; margin: 0; font-size: .95em; }
.footer-hint { display: block; margin-top: 6px; font: 400 17px var(--f-ui); }

/* ---------- toast, trail, confetti, splash ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 90; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  background: var(--sun); color: #1B1740; border: 3px solid #1B1740; box-shadow: 5px 5px 0 #1B1740;
  padding: 12px 16px; font: 700 18px/1.35 var(--f-ui);
}
.toast:empty { opacity: 0; pointer-events: none; padding: 0; border: 0; box-shadow: none; }
.trail { position: fixed; z-index: 80; pointer-events: none; width: 6px; height: 6px; animation: trail .48s steps(4, end) forwards; }
@keyframes trail { to { transform: translateY(10px); opacity: 0; } }
.confetti { position: fixed; inset: 0; z-index: 85; pointer-events: none; width: 100vw; height: 100vh; max-width: none; }
.splash {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background-color: var(--bg); background-image: var(--pat-bg); background-size: calc(16px * var(--px));
}
.splash-in { position: relative; display: grid; place-items: center; gap: 18px; }
.splash .sunburst { position: absolute; transform: scale(.25); }
.splash .sunburst.s2 { transform: scale(.5); }
.splash .sunburst.s3 { transform: scale(.75); }
.splash .sunburst.s4 { transform: none; }
.splash .puff-xl { position: relative; z-index: 2; }
.splash .letters { z-index: 2; }
.splash .lt { opacity: 0; }
.splash .lt.on { opacity: 1; animation: land .3s steps(3, end); }
@keyframes land { 0% { transform: translateY(calc(var(--ls) * -12px)); } 66% { transform: translateY(calc(var(--ls) * 2px)); } 100% { transform: none; } }
.splash-tag { margin: 0; opacity: 0; font: 400 16px/1 var(--f-display); color: #1B1740; background: #FFD23F; border: 3px solid #1B1740; box-shadow: 4px 4px 0 #1B1740; padding: 10px 12px 8px; }
@media (min-width: 768px) { .splash-tag { font-size: 24px; } }
.splash-tag.on { opacity: 1; }
.splash-skip { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; margin: 0; font: 700 17px var(--f-ui); color: #1B1740; }
.splash-skip span { background: var(--cream); border: 3px solid #1B1740; padding: 6px 10px; }
.splash.out { animation: wipe .36s steps(6, end) forwards; }
@keyframes wipe { to { transform: translateY(-100%); } }

/* ---------- XP bar (scroll progress), loading wipe, pixel cursor ---------- */
.xp { position: fixed; left: 0; right: 0; top: 0; z-index: 70; height: 6px; background: rgba(11, 9, 32, .55); pointer-events: none; display: none; }
.js .xp { display: block; }
.xp-fill { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #FF5FA2 0 12px, #FFD23F 12px 24px, #9BE83A 24px 36px, #29C5F6 36px 48px); }
.wipe {
  position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; gap: 16px; align-content: center;
  background-color: var(--foot); background-image: var(--pat-foot); background-size: calc(16px * var(--px));
  animation: wipe-in .2s steps(4, end);
}
@keyframes wipe-in { from { transform: translateY(100%); } to { transform: none; } }
.wipe p { margin: 0; font: 400 20px/1 var(--f-display); color: #FFD23F; }
.wipe-bar { width: 200px; height: 18px; border: 3px solid #FFD23F; padding: 2px; }
.wipe-bar span { display: block; height: 100%; width: 100%; background: #FF5FA2; animation: load .22s steps(5, end); }
@keyframes load { from { width: 0; } }
@media (hover: hover) and (pointer: fine) {
  html { cursor: url("/static/img/sprites/cursor.png") 0 0, auto; }
  a, button, summary, label, select, [role="tab"], .puff-btn, canvas, .hero-logo { cursor: url("/static/img/sprites/cursor-hand.png") 9 0, pointer; }
  input, textarea { cursor: text; }
}
.news-item .news-date { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-title a { display: inline-flex; align-items: center; min-height: 44px; }
.feature, .news-item, .how li { transition: none; }

/* ---------- reduced motion: nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .coin-btn:hover, a.polaroid:hover, .polaroid:hover { transform: none; }
}
@media print {
  .topbar, .footer, .hud, .xp, .reel, .toast, .needs-js, .puff-says { display: none !important; }
  body { background: #fff; color: #000; }
  .band { background: none; padding: 20px 0; }
  .band::before { display: none; }
}
