/* Tiny Players — Comic Panels theme */
/* Dark mode only — night-sky paper, light ink outlines, panels stay bright */
:root {
  --paper:#15132a; --dot:#2a2650; --ink:#f5f1ff; --white:#fff; --surface:#221e40;
  --coral:#ff6b6b; --yellow:#ffd93d; --sky:#cfeaff; --mint:#d4f5e2; --pink:#ffd6e7; --lilac:#e5d9ff; --peach:#ffe2c2; --lemon:#1d1a38;
  --text:#f3eef8; --muted:#b8b2cc; --focus:#7dd3fc; --bubble-text:#1f1a33;
  --display-fill:#ffd93d; --display-shadow:#0b0a18;
  --shadow:5px 5px 0 var(--ink); --shadow-sm:3px 3px 0 var(--ink);
  --radius:6px;
  color-scheme:dark;
}
* { box-sizing:border-box; margin:0; padding:0; }
body {
  font-family:Nunito, -apple-system, "Segoe UI", Roboto, sans-serif; font-size:16px; line-height:1.5;
  background:var(--paper); background-image:radial-gradient(var(--dot) 1.6px, transparent 1.6px); background-size:18px 18px;
  color:var(--text); min-height:100vh;
}
a { color:inherit; text-decoration:none; }
button { font:inherit; cursor:pointer; }
[hidden] { display:none !important; }
.display { font-family:Bangers, "Baloo 2", Nunito, sans-serif; letter-spacing:.04em; font-weight:400; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Header */
.header { position:sticky; top:0; z-index:10; background:var(--paper); background-image:radial-gradient(var(--dot) 1.6px, transparent 1.6px); background-size:18px 18px; }
.header-inner { max-width:none; margin:0; padding:19px 24px 17px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px 14px; }
.header-inner .logo { grid-column:2; grid-row:1; justify-self:center; } .header-inner .search { grid-column:3; grid-row:1; justify-self:end; margin-left:0; }
.logo { display:inline-flex; align-items:center; padding:4px 0; line-height:1; transition:transform .12s; }
.logo:hover { transform:translate(-1px,-1px); }
.wm { display:inline-flex; align-items:flex-end; font-family:Fredoka, Nunito, sans-serif; font-weight:700; font-size:33px; letter-spacing:.01em; color:#fff; }
.wm i { width:10px; }
.wm b { display:inline-block; font-weight:700; transform:rotate(var(--r)); text-shadow:0 3px 0 rgba(0,0,0,.25); }
.wm b:nth-child(1) { --r:-6deg } .wm b:nth-child(2) { --r:4deg } .wm b:nth-child(3) { --r:-3deg } .wm b:nth-child(4) { --r:5deg }
.wm b:nth-child(6) { --r:3deg } .wm b:nth-child(7) { --r:-5deg } .wm b:nth-child(8) { --r:4deg } .wm b:nth-child(9) { --r:-2deg } .wm b:nth-child(10) { --r:6deg } .wm b:nth-child(11) { --r:-4deg } .wm b:nth-child(12) { --r:3deg }
.search { flex:0 1 240px; min-width:170px; margin-left:auto; position:relative; }
.search input {
  width:100%; height:48px; padding:0 16px 0 44px; border-radius:999px; border:3px solid var(--ink); background:var(--surface);
  color:var(--text); font:inherit; font-weight:700; outline:none; box-shadow:var(--shadow-sm);
}
.search input:focus { box-shadow:var(--shadow-sm), 0 0 0 3px var(--focus); }
.search svg { position:absolute; left:15px; top:50%; transform:translateY(-50%); width:20px; height:20px; pointer-events:none; }
.btn {
  display:inline-flex; align-items:center; gap:8px; min-height:46px; padding:0 18px; border-radius:12px; border:3px solid var(--ink);
  background:var(--coral); color:#fff; font-weight:800; box-shadow:var(--shadow-sm); transition:transform .12s, box-shadow .12s;
}
.btn.ghost { background:var(--surface); color:var(--text); }
.btn:hover { transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--ink); }
.btn:active { transform:translate(2px,2px); box-shadow:1px 1px 0 var(--ink); }


/* Layout: slim category rail + content */
.shell { display:grid; grid-template-columns:minmax(0, 1fr); align-items:start; }

.container { max-width:none; margin:0; padding:8px 20px 20px; }

/* Panels */
.panel {
  position:relative; display:block; border:3px solid var(--ink); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden;
  transition:transform .12s, box-shadow .12s;
}
a.panel:hover { transform:translate(-3px,-3px); box-shadow:8px 8px 0 var(--ink); }
a.panel:active { transform:translate(2px,2px); box-shadow:2px 2px 0 var(--ink); }
.panel .art { position:absolute; inset:0; display:grid; place-items:center; font-size:clamp(48px, 5.5vw, 84px); line-height:1; padding-bottom:26px; filter:drop-shadow(4px 4px 0 rgba(0,0,0,.12)); }
.panel .bubble {
  position:absolute; left:14px; bottom:14px; background:var(--white); color:var(--bubble-text); border:3px solid var(--ink); border-radius:14px; padding:6px 12px;
  font-weight:800; font-size:15px; line-height:1.2; max-width:calc(100% - 28px); box-shadow:var(--shadow-sm);
}
.panel .bubble::after { content:""; position:absolute; bottom:-11px; left:18px; width:12px; height:12px; background:var(--white); border-right:3px solid var(--ink); border-bottom:3px solid var(--ink); transform:rotate(45deg); }
.badge {
  position:absolute; top:-4px; left:-4px; z-index:2; font-family:Bangers, sans-serif; font-size:16px; letter-spacing:.06em; padding:3px 12px;
  border:3px solid var(--ink); box-shadow:var(--shadow-sm); transform:rotate(-5deg); background:var(--coral); color:#fff;
}
.badge.hot { background:#2f9bff; } .badge.two { background:#22c55e; color:var(--ink); } .badge.learn { background:var(--yellow); color:var(--ink); } .badge.soon { background:#cfcfcf; color:var(--ink); }


/* Poster tiles */
.poster { isolation:isolate; }
.poster .bg { position:absolute; inset:0; }
.poster .rays { position:absolute; inset:-40%; background:repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.12) 0deg 10deg, transparent 10deg 20deg); }
.poster .scene { position:absolute; inset:0; overflow:hidden; }
.poster .scene i { position:absolute; font-style:normal; line-height:1; opacity:.55; filter:drop-shadow(0 4px 0 rgba(0,0,0,.18)); }
.poster .hero { position:absolute; right:2%; bottom:-6%; font-size:clamp(64px, 7.5vw, 118px); line-height:1; transform:rotate(-8deg); filter:drop-shadow(6px 6px 0 rgba(0,0,0,.22)); transition:transform .15s; }
.poster:hover .hero { transform:rotate(-4deg) scale(1.06); }
.poster .ptitle { position:absolute; left:14px; bottom:12px; right:38%; font-family:Bangers, sans-serif; font-size:clamp(22px, 2.4vw, 36px); letter-spacing:.04em; line-height:.95; color:#fff; -webkit-text-stroke:1.5px #1f1a33; text-shadow:3px 3px 0 #1f1a33; text-wrap:balance; }
.poster .ptitle small { display:block; font-family:Nunito, sans-serif; font-weight:800; font-size:clamp(11px, 1vw, 14px); letter-spacing:.08em; text-transform:uppercase; -webkit-text-stroke:0; text-shadow:0 2px 0 #1f1a33; opacity:.92; margin-bottom:4px; }

.poster .thumb { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; transition:transform .25s; }
.poster:hover .thumb { transform:scale(1.05); }
.poster .shade { position:absolute; left:0; right:0; bottom:0; height:55%; background:linear-gradient(transparent, rgba(0,0,0,.5)); pointer-events:none; }
.poster .ptitle { right:8px; }

/* Grid */
.section-title { display:flex; align-items:center; gap:14px; margin:8px 0 16px; }
.section-title h1, .section-title h2 { font-family:Bangers, sans-serif; font-size:34px; letter-spacing:.05em; color:var(--display-fill); text-shadow:3px 3px 0 var(--display-shadow); }
.section-title small { font-weight:800; font-size:13px; background:var(--surface); border:3px solid var(--ink); border-radius:999px; padding:4px 12px; }
.mosaic { display:grid; grid-template-columns:repeat(6, 1fr); gap:14px; grid-auto-flow:dense; }
.mosaic .panel { aspect-ratio:16/9; }
.mosaic .big { grid-column:span 2; grid-row:span 2; }
.mosaic .panel:not(.big) .ptitle { font-size:clamp(15px, 1.35vw, 21px); left:10px; right:10px; bottom:8px; -webkit-text-stroke:1px #1f1a33; text-shadow:2px 2px 0 #1f1a33; }
.mosaic .panel:not(.big) .ptitle small { font-size:10px; margin-bottom:2px; }
.mosaic .big .ptitle { font-size:clamp(26px, 2.6vw, 38px); }
.mosaic .big .ptitle small { font-size:clamp(11px, 1vw, 14px); }
.intro { max-width:78ch; font-weight:600; font-size:17px; line-height:1.6; color:var(--muted); margin:-4px 0 18px; }
.about { max-width:78ch; margin-top:28px; background:var(--surface); border:3px solid var(--ink); box-shadow:var(--shadow); padding:22px 26px; }
.about:empty { display:none; }
.about h2 { font-family:Bangers, sans-serif; font-size:26px; letter-spacing:.05em; color:var(--display-fill); text-shadow:2px 2px 0 var(--display-shadow); margin:14px 0 6px; }
.about h2:first-child { margin-top:0; }
.about p, .about li { font-weight:600; line-height:1.6; }
.about ol { padding-left:22px; margin:4px 0; }
.about li { margin:4px 0; }
.side dd a { font-weight:800; border-bottom:2px solid var(--coral); }
.recent { margin-bottom:22px; }
.recent .section-title { margin:0 0 12px; }
/* small square tiles — twelve across on desktop so the whole history fits in one row */
.recent-row { display:grid; grid-template-columns:repeat(12, 1fr); gap:10px; }
.recent-row .panel { aspect-ratio:1; border-width:2px; box-shadow:3px 3px 0 var(--ink); }
.recent-row .panel:hover { box-shadow:5px 5px 0 var(--ink); }
.recent-row .badge { display:none; }
.recent-row .shade { height:60%; }
.recent-row .ptitle { font-size:clamp(11px, 0.95vw, 14px); left:6px; right:6px; bottom:5px; line-height:1; -webkit-text-stroke:0.5px #1f1a33; text-shadow:1.5px 1.5px 0 #1f1a33; }
.recent-row .ptitle small { display:none; }
.grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.grid .panel { aspect-ratio:16/9; }
.card.soon { opacity:.55; }
.card.soon:hover { transform:none; box-shadow:var(--shadow); }
.mosaic.zigzag, .mosaic.zigzag-b { grid-template-columns:repeat(6, 1fr); grid-template-rows:repeat(4, 1fr); }
/* Bigs fill their two rows exactly so both boards end up the same height whatever the pattern */
.mosaic.zigzag .big, .mosaic.zigzag-b .big { aspect-ratio:auto; align-self:stretch; }
.mosaic.zigzag > :nth-child(1) { grid-area:1 / 1 / span 2 / span 2; } .mosaic.zigzag > :nth-child(2) { grid-area:1 / 3; } .mosaic.zigzag > :nth-child(3) { grid-area:1 / 4 / span 2 / span 2; } .mosaic.zigzag > :nth-child(4) { grid-area:1 / 6; }
.mosaic.zigzag > :nth-child(5) { grid-area:2 / 3; } .mosaic.zigzag > :nth-child(6) { grid-area:2 / 6; } .mosaic.zigzag > :nth-child(7) { grid-area:3 / 1; } .mosaic.zigzag > :nth-child(8) { grid-area:3 / 2 / span 2 / span 2; }
.mosaic.zigzag-b > :nth-child(1) { grid-area:1 / 1 / span 2 / span 2; } .mosaic.zigzag-b > :nth-child(2) { grid-area:1 / 3; } .mosaic.zigzag-b > :nth-child(3) { grid-area:1 / 4; } .mosaic.zigzag-b > :nth-child(4) { grid-area:1 / 5 / span 2 / span 2; }
.mosaic.zigzag-b > :nth-child(5) { grid-area:2 / 3 / span 2 / span 2; } .mosaic.zigzag-b > :nth-child(6) { grid-area:3 / 1 / span 2 / span 2; } .mosaic.zigzag-b > :nth-child(7) { grid-area:3 / 5; } .mosaic.zigzag-b > :nth-child(8) { grid-area:3 / 6; }
.mosaic.zigzag-b > :nth-child(9) { grid-area:4 / 3; } .mosaic.zigzag-b > :nth-child(10) { grid-area:4 / 4; } .mosaic.zigzag-b > :nth-child(11) { grid-area:4 / 5; } .mosaic.zigzag-b > :nth-child(12) { grid-area:4 / 6; }
.mosaic.zigzag > :nth-child(9) { grid-area:3 / 4; } .mosaic.zigzag > :nth-child(10) { grid-area:3 / 5 / span 2 / span 2; } .mosaic.zigzag > :nth-child(11) { grid-area:4 / 1; } .mosaic.zigzag > :nth-child(12) { grid-area:4 / 4; }
.board { position:relative; border:4px solid var(--ink); border-radius:26px; box-shadow:var(--shadow); padding:22px; margin:81px 0 18px; background:var(--board); }
.board-pop { --board:linear-gradient(135deg, #ff6b6b, #ff8c42); }
.board-new { --board:linear-gradient(135deg, #2ec4b6, #7ed957); }
.board + .board { margin-top:81px; } /* heading (51px) + the same 16px gap the other sections use */
/* Board headings match the other section titles (Browse by grade, Keep playing): yellow Bangers above the box */
.board-tag { position:absolute; left:-4px; top:-65px; margin:0; font-family:Bangers, sans-serif; font-size:34px; font-weight:400; letter-spacing:.05em; line-height:1.5; color:var(--display-fill); text-shadow:3px 3px 0 var(--display-shadow); white-space:nowrap; }
.board-tag b { margin-right:8px; }
.board-see { position:absolute; right:-4px; top:-55px; background:var(--yellow); border:3px solid var(--ink); border-radius:999px; padding:6px 14px; font-weight:800; font-size:14px; color:#1f1a33; box-shadow:3px 3px 0 var(--ink); }
.board .panel { border-width:3px; box-shadow:4px 4px 0 rgba(0,0,0,.35); }
.home-block { margin-bottom:26px; } .home-block .section-title { margin:0 0 12px; }
.see-all { margin-left:auto; font-weight:800; font-size:14px; border-bottom:3px solid transparent; } .see-all:hover { border-bottom-color:var(--coral); }
.empty { grid-column:1 / -1; padding:40px; text-align:center; font-weight:800; background:var(--surface); border:3px solid var(--ink); box-shadow:var(--shadow); }

/* Player page */
.stage.pseudo-fs { position:fixed; inset:0; z-index:100; width:100%; height:100%; max-height:none; aspect-ratio:auto; border:0; border-radius:0; box-shadow:none; }
.stage.pseudo-fs iframe { width:100%; height:100%; }
.exit-fs { position:absolute; top:10px; right:10px; z-index:101; width:44px; height:44px; border-radius:50%; border:3px solid #1f1a33; background:#fff; color:#1f1a33; font-size:20px; font-weight:800; box-shadow:var(--shadow-sm); cursor:pointer; }
body.no-scroll { overflow:hidden; }
.player { display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:20px; align-items:start; max-width:1600px; }
.stage { position:relative; background:#111; border:3px solid var(--ink); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; aspect-ratio:16/9; max-height:calc(100vh - 140px); }
.stage iframe { width:100%; height:100%; border:0; display:block; }
.stage .splash-screen { position:absolute; inset:0; display:grid; place-items:center; text-align:center; padding:20px; background:repeating-conic-gradient(from 0deg at 50% 45%, #ffb347 0deg 9deg, #ffd166 9deg 18deg); }
.stage .splash-screen .big { font-size:110px; line-height:1; filter:drop-shadow(4px 4px 0 rgba(0,0,0,.12)); }
.stage .splash-screen h2 { font-family:Bangers, sans-serif; font-size:clamp(30px,4vw,48px); letter-spacing:.05em; color:#1f1a33; text-shadow:4px 4px 0 #fff; margin:8px 0 16px; }
.stage .splash-screen .btn { font-family:Bangers, sans-serif; font-size:22px; letter-spacing:.06em; min-height:54px; padding:0 34px; border-radius:999px; }
.toolbar { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.side { background:var(--surface); border:3px solid var(--ink); border-radius:var(--radius); box-shadow:var(--shadow); padding:20px; }
.side h1 { font-family:Bangers, sans-serif; font-size:34px; letter-spacing:.05em; margin-bottom:6px; color:var(--display-fill); text-shadow:2px 2px 0 var(--display-shadow); }
.side p { color:var(--muted); font-weight:600; margin-bottom:12px; }
.side dt { font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); font-weight:800; margin-top:12px; }
.side dd { font-weight:700; }

/* Ads — hidden until site.js activates them */
.ad-slot { display:none; }
.ad-slot.live { display:block; }
.ad-leaderboard { min-height:90px; margin:24px 0 8px; }
.ad-rect { min-height:250px; margin-top:16px; }
.ad-below { min-height:90px; margin-top:16px; }

/* Footer */
footer { margin-top:48px; background:var(--surface); border-top:4px solid var(--ink); border-bottom:4px solid var(--ink); padding:26px 20px; display:flex; flex-direction:column; align-items:center; gap:10px; font-weight:700; }
.footer-links { display:flex; gap:22px; flex-wrap:wrap; justify-content:center; }
.footer-links a { font-weight:800; border-bottom:3px solid transparent; }
.footer-links a:hover { border-bottom-color:var(--coral); }
.heart { display:inline-block; animation:heartbeat 2.4s ease-in-out infinite; transform-origin:center; }
@keyframes heartbeat { 0%,100% { transform:scale(1); } 14% { transform:scale(1.18); } 28% { transform:scale(1); } 42% { transform:scale(1.12); } 56% { transform:scale(1); } }

/* Consent banner */
.consent {
  position:fixed; left:16px; right:16px; bottom:16px; z-index:20; max-width:720px; margin:0 auto; background:var(--surface);
  border:3px solid var(--ink); border-radius:14px; padding:16px 20px; display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; box-shadow:var(--shadow);
}
.consent p { font-weight:700; }
.consent a { color:var(--focus); text-decoration:underline; }
.consent-actions { display:flex; gap:10px; }

/* Legal pages */
.prose { max-width:72ch; margin:28px auto; background:var(--surface); border:3px solid var(--ink); box-shadow:var(--shadow); padding:32px; }
.prose h1 { font-family:Bangers, sans-serif; font-size:40px; letter-spacing:.05em; margin-bottom:4px; color:var(--display-fill); text-shadow:2px 2px 0 var(--display-shadow); }
.prose .updated { color:var(--muted); font-size:14px; font-weight:700; margin-bottom:24px; }
.prose h2 { font-size:20px; font-weight:800; margin:26px 0 8px; }
.prose p, .prose li { line-height:1.65; font-size:16px; }
.prose ul { padding-left:20px; margin:8px 0; }
.prose a { color:var(--focus); text-decoration:underline; }
.notfound { text-align:center; }
.notfound .big { font-size:96px; line-height:1; }
.notfound a.btn { color:#fff; text-decoration:none; font-family:Bangers, sans-serif; font-size:22px; letter-spacing:.06em; border-radius:999px; padding:0 28px; margin-top:10px; }
.prose code { font:inherit; font-weight:800; background:var(--paper); border:2px solid var(--ink); border-radius:8px; padding:3px 8px; }
.prose .copyline { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.prose .copyline .btn { min-height:38px; padding:0 14px; font-size:14px; }

@media (max-width:1100px) { .grid { grid-template-columns:repeat(3, 1fr); } .mosaic { grid-template-columns:repeat(4, 1fr); } .mosaic.zigzag, .mosaic.zigzag-b { grid-template-columns:repeat(4, 1fr); grid-template-rows:repeat(6, 1fr); } /* 4 bigs + 8 smalls = 6 full rows of 4, placed explicitly so both boards match */
  .mosaic.zigzag > :nth-child(1) { grid-area:1 / 1 / span 2 / span 2; } .mosaic.zigzag > :nth-child(2) { grid-area:1 / 3; } .mosaic.zigzag > :nth-child(3) { grid-area:3 / 3 / span 2 / span 2; } .mosaic.zigzag > :nth-child(4) { grid-area:1 / 4; } .mosaic.zigzag > :nth-child(5) { grid-area:2 / 3; } .mosaic.zigzag > :nth-child(6) { grid-area:2 / 4; } .mosaic.zigzag > :nth-child(7) { grid-area:3 / 1; } .mosaic.zigzag > :nth-child(8) { grid-area:5 / 1 / span 2 / span 2; } .mosaic.zigzag > :nth-child(9) { grid-area:3 / 2; } .mosaic.zigzag > :nth-child(10) { grid-area:5 / 3 / span 2 / span 2; } .mosaic.zigzag > :nth-child(11) { grid-area:4 / 1; } .mosaic.zigzag > :nth-child(12) { grid-area:4 / 2; }
  .mosaic.zigzag-b > :nth-child(1) { grid-area:1 / 3 / span 2 / span 2; } .mosaic.zigzag-b > :nth-child(2) { grid-area:1 / 1; } .mosaic.zigzag-b > :nth-child(3) { grid-area:1 / 2; } .mosaic.zigzag-b > :nth-child(4) { grid-area:3 / 1 / span 2 / span 2; } .mosaic.zigzag-b > :nth-child(5) { grid-area:5 / 1 / span 2 / span 2; } .mosaic.zigzag-b > :nth-child(6) { grid-area:5 / 3 / span 2 / span 2; } .mosaic.zigzag-b > :nth-child(7) { grid-area:2 / 1; } .mosaic.zigzag-b > :nth-child(8) { grid-area:2 / 2; } .mosaic.zigzag-b > :nth-child(9) { grid-area:3 / 3; } .mosaic.zigzag-b > :nth-child(10) { grid-area:3 / 4; } .mosaic.zigzag-b > :nth-child(11) { grid-area:4 / 3; } .mosaic.zigzag-b > :nth-child(12) { grid-area:4 / 4; } .recent-row { grid-template-columns:repeat(8, 1fr); } .recent-row .ptitle { font-size:11px; } }
@media (max-width:900px) {
  .player { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .container { padding:8px 14px 14px; }
  .prose { margin:14px; padding:20px; }
  .section-title { gap:10px; margin:4px 0 10px; }
  .section-title h1, .section-title h2 { font-size:22px; text-shadow:2px 2px 0 var(--display-shadow); white-space:nowrap; }
  .section-title small { font-size:11px; padding:3px 9px; border-width:2px; white-space:nowrap; }
  .recent { margin-bottom:14px; }
  /* phones: a taller, portrait game box (16:9 leaves no room for the splash or touch controls) */
  .stage { aspect-ratio:4/5; max-height:calc(100svh - 150px); }
  .stage .splash-screen { padding:14px; }
  .stage .splash-screen .big { font-size:72px; }
  .stage .splash-screen h2 { font-size:28px; margin:6px 0 12px; }
  .stage .splash-screen .btn { font-size:19px; min-height:48px; padding:0 26px; }
  .header-inner { padding:13px 12px 14px; gap:10px; display:flex; flex-wrap:nowrap; }
  .header-inner .logo, .header-inner .search { grid-column:auto; justify-self:auto; }
  .logo { flex:none; padding:2px 0; }
  .wm { font-size:24px; } .wm i { width:7px; } .wm b { text-shadow:0 2px 0 rgba(0,0,0,.25); }
  .search { flex:1 1 auto; min-width:0; margin-left:auto; }
  .search input { height:38px; font-size:14px; padding:0 12px 0 36px; border-width:2px; }
  .search svg { left:11px; width:17px; height:17px; }
  .grid { grid-template-columns:repeat(2, 1fr); gap:12px; }
  .mosaic, .mosaic.zigzag, .mosaic.zigzag-b { grid-template-columns:repeat(2, 1fr); grid-template-rows:none; gap:10px; }
  .mosaic.zigzag .big, .mosaic.zigzag-b .big { aspect-ratio:16/9; align-self:auto; }
  .mosaic.zigzag > :nth-child(n), .mosaic.zigzag-b > :nth-child(n) { grid-area:auto; } .mosaic.zigzag > .big:nth-child(n), .mosaic.zigzag-b > .big:nth-child(n) { grid-column:span 2; grid-row:span 1; }
  .recent-row { grid-template-columns:repeat(4, 1fr); gap:8px; }
  .recent-row .panel:nth-child(n+9) { display:none; }
  .recent-row .ptitle { font-size:10px; left:5px; right:5px; bottom:4px; }
  .mosaic .panel:not(.big) .ptitle { font-size:14px; }
  .mosaic .big .ptitle { font-size:24px; }
  .mosaic .big .ptitle small { display:block; font-size:10px; }
  .panel .art { padding-bottom:22px; }
  .panel .bubble { font-size:13px; padding:5px 10px; left:10px; bottom:10px; }
  .poster .hero { font-size:44px; right:2%; bottom:-2%; }
  .poster .ptitle { right:8px; }
  .poster .ptitle { font-size:15px; left:9px; bottom:7px; right:38%; line-height:1; -webkit-text-stroke:1px #1f1a33; text-shadow:2px 2px 0 #1f1a33; }
  .poster .ptitle small { display:none; }
  .poster .scene i { font-size:14px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .heart, .btn, .rail-item, .panel, .col-stick, .col-conf, .col-live::before, .planet-ball { animation:none; transition:none; }
}

/* ---- Homepage: welcome strip, grade planets, browse rows ---- */
.welcome { position:relative; overflow:hidden; text-align:center; margin:0 0 16px; padding:100px 24px 160px; border:3px solid var(--ink); border-radius:var(--radius); box-shadow:var(--shadow);
  background:linear-gradient(180deg, #38bdf8 0%, #7dd3fc 60%, #bae6fd 100%); color:#1f1a33; }
.welcome-in { position:relative; z-index:1; }
.balloon { position:absolute; left:8%; top:14%; width:86px; height:100px; border-radius:50% 50% 45% 45%; background:repeating-linear-gradient(90deg, #ff6b6b 0 14px, #fde047 14px 28px, #4d8bff 28px 42px); border:4px solid #1f1a33; box-shadow:inset -12px -8px 0 rgba(0,0,0,.15); }
.balloon::before { content:""; position:absolute; left:50%; bottom:-38px; width:34px; height:24px; transform:translateX(-50%); background:#c98a5b; border:4px solid #1f1a33; border-radius:6px; }
.balloon::after { content:""; position:absolute; left:50%; bottom:-16px; width:44px; height:18px; transform:translateX(-50%); border-left:3px solid #1f1a33; border-right:3px solid #1f1a33; }
.welcome-kids { position:absolute; right:3%; bottom:-4px; height:46%; width:auto; filter:drop-shadow(4px 4px 0 rgba(0,0,0,.25)); pointer-events:none; }
.kite { position:absolute; right:9%; top:16%; width:70px; height:70px; background:#ff8c42; border:4px solid #1f1a33; transform:rotate(45deg); border-radius:8px 30px 8px 30px; }
.kite::after { content:""; position:absolute; left:-40px; top:70px; width:80px; height:60px; border-bottom:4px solid #1f1a33; border-left:4px solid #1f1a33; border-radius:0 0 0 60px; transform:rotate(20deg); }
.welcome-title { font-family:Bangers, sans-serif; font-size:clamp(30px, 4.4vw, 56px); letter-spacing:.05em; line-height:1.05; color:#fff; text-shadow:4px 4px 0 #1f1a33; margin:0 0 10px; font-weight:400; }
.welcome-sub2 { font-weight:700; color:#2b2550; margin:0 0 18px; font-size:clamp(15px, 1.6vw, 19px); }
.welcome-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; }
.welcome .btn-play { min-height:52px; font-size:18px; padding:0 24px; text-decoration:none; } .welcome .btn-play.alt { background:#fff; }
.sky-sun { position:absolute; right:9%; top:-30px; width:110px; height:110px; border-radius:50%; background:#fde047; border:4px solid #1f1a33; box-shadow:0 0 0 14px rgba(253,224,71,.35); }
.cloud { position:absolute; background:#fff; border-radius:999px; opacity:.95; }
.cloud::before, .cloud::after { content:""; position:absolute; background:#fff; border-radius:50%; }
.cloud.c1 { left:4%; top:22%; width:120px; height:40px; } .cloud.c1::before { left:22px; top:-22px; width:50px; height:50px; } .cloud.c1::after { left:60px; top:-14px; width:40px; height:40px; }
.cloud.c2 { right:5%; top:18%; width:150px; height:46px; } .cloud.c2::before { left:28px; top:-26px; width:60px; height:60px; } .cloud.c2::after { left:80px; top:-16px; width:44px; height:44px; }
.cloud.c3 { left:14%; bottom:12%; width:90px; height:30px; } .cloud.c3::before { left:16px; top:-16px; width:38px; height:38px; } .cloud.c3::after { left:44px; top:-10px; width:30px; height:30px; }
.cloud.c4 { right:14%; bottom:14%; width:110px; height:34px; } .cloud.c4::before { left:20px; top:-18px; width:44px; height:44px; } .cloud.c4::after { left:56px; top:-12px; width:34px; height:34px; }
.rainbow { position:absolute; left:-40px; bottom:-140px; width:300px; height:300px; border-radius:50%; border:14px solid transparent; border-top-color:#ff6b6b; box-shadow:0 -14px 0 0 #fde047 inset, 0 -28px 0 0 #22c55e inset, 0 -42px 0 0 #3b82f6 inset; opacity:.85; transform:rotate(-20deg); }
.btn-play { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 18px; border-radius:999px; border:3px solid var(--ink); font-weight:800; font-size:15px; box-shadow:var(--shadow-sm); transition:transform .12s, box-shadow .12s; cursor:pointer; }
.btn-play { background:var(--yellow); color:#1f1a33; }
.btn-play:hover { transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--ink); }
.grades { margin-bottom:22px; } .grades .section-title { margin-bottom:10px; }
.planets { display:flex; flex-wrap:wrap; justify-content:center; gap:14px 22px; }
.planet { display:flex; flex-direction:column; align-items:center; gap:8px; font-size:14px; font-weight:800; color:var(--muted); transition:transform .12s; }
.planet:hover { transform:translateY(-4px); }
.planet-ball { position:relative; width:124px; height:124px; border-radius:50%; background:var(--planet); border:4px solid var(--ink); box-shadow:var(--shadow), inset -14px -14px 0 rgba(0,0,0,.18);
  display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1; color:#fff; font-family:Bangers, sans-serif; letter-spacing:.05em; text-shadow:2px 2px 0 #0b0a18; }
.planet-ball::before { content:""; position:absolute; left:14px; top:14px; width:34px; height:18px; border-radius:50%; background:rgba(255,255,255,.45); transform:rotate(-30deg); }
.planet:nth-child(2n) .planet-ball::after { content:""; position:absolute; left:-22px; right:-22px; top:50%; height:26px; border:4px solid var(--ink); border-radius:50%; transform:translateY(-50%) rotate(-14deg); background:rgba(255,255,255,.25); pointer-events:none; }
.planet:hover .planet-ball, .planet:focus-visible .planet-ball { animation:planet-wobble .5s ease-in-out infinite alternate; }
@keyframes planet-wobble { to { transform:translateY(-6px) rotate(6deg); } }
.planet-all .planet-ball { background:conic-gradient(from -30deg, #ff6b6b, #ffd93d, #7ed957, #2ec4b6, #4d8bff, #b06bff, #ff6b6b); }
.planet-ball small { font-family:Nunito, sans-serif; font-size:13px; font-weight:900; letter-spacing:.08em; text-shadow:none; opacity:.95; }
.planet-ball b { font-size:60px; font-weight:400; }
.shell > main { min-width:0; } /* scrolling rows must not widen the page */
.collections { margin-top:30px; }
.collections { margin-top:6px; }
.tabs { border:4px solid var(--ink); border-radius:22px; background:var(--surface); box-shadow:var(--shadow); overflow:hidden; }
.tab-bar { display:flex; border-bottom:4px solid var(--ink); }
.tab { flex:1; padding:14px; border:0; border-right:4px solid var(--ink); background:transparent; color:var(--ink); font-family:Bangers, sans-serif; font-size:24px; letter-spacing:.05em; cursor:pointer; }
.tab:last-child { border-right:0; }
.tab[aria-selected="true"] { background:var(--yellow); color:#1f1a33; }
.tab-pane { display:none; padding:18px; grid-template-columns:repeat(5, 1fr); gap:14px; }
.tab-pane.on { display:grid; }
.tab-pane[data-pane="theme"] { grid-template-columns:repeat(7, 1fr); } /* 14 themes = two even rows */
.col-card { display:flex; flex-direction:column; border:3px solid var(--ink); border-radius:var(--radius); box-shadow:var(--shadow-sm); background:#fff; overflow:hidden; transition:transform .12s, box-shadow .12s; }
.col-card:hover { transform:translate(-3px,-3px); box-shadow:6px 6px 0 var(--ink); }
.col-live { position:relative; display:grid; place-items:center; height:104px; overflow:hidden; background:linear-gradient(135deg, var(--ta), var(--tb)); }
.col-live::before { content:""; position:absolute; inset:-22px 0 0 -22px; background-image:radial-gradient(rgba(255,255,255,.3) 3px, transparent 3.5px); background-size:22px 22px; animation:col-dots 40s linear infinite; will-change:transform; }
.col-card:nth-child(10n+1) { --ta:#22c55e; --tb:#84cc16; } .col-card:nth-child(10n+2) { --ta:#f59e0b; --tb:#fbbf24; } .col-card:nth-child(10n+3) { --ta:#3b82f6; --tb:#38bdf8; } .col-card:nth-child(10n+4) { --ta:#ec4899; --tb:#f472b6; } .col-card:nth-child(10n+5) { --ta:#8b5cf6; --tb:#a78bfa; }
.col-card:nth-child(10n+6) { --ta:#f97316; --tb:#fb923c; } .col-card:nth-child(10n+7) { --ta:#06b6d4; --tb:#22d3ee; } .col-card:nth-child(10n+8) { --ta:#ef4444; --tb:#f87171; } .col-card:nth-child(10n+9) { --ta:#14b8a6; --tb:#2dd4bf; } .col-card:nth-child(10n) { --ta:#6366f1; --tb:#818cf8; }
.col-stick { position:relative; z-index:1; padding:8px 16px; border-radius:14px; background:#fff; border:3px solid var(--ink); box-shadow:4px 4px 0 var(--ink); transform:rotate(-6deg); }
.col-card:hover .col-stick, .col-card:focus-visible .col-stick { animation:col-wiggle .6s ease-in-out infinite; }
.col-big { display:block; font-size:48px; line-height:1; }
.col-conf { position:absolute; top:0; width:11px; will-change:transform; height:11px; border-radius:2px; background:#fff; opacity:.95; animation:col-fall 16s linear infinite; }
.col-conf:nth-of-type(1) { left:10%; background:#fde047; } .col-conf:nth-of-type(2) { left:26%; border-radius:50%; animation-delay:-5s; } .col-conf:nth-of-type(3) { left:62%; background:#fde047; animation-delay:-10.5s; }
.col-conf:nth-of-type(4) { left:80%; border-radius:50%; animation-delay:-2.5s; width:8px; height:8px; } .col-conf:nth-of-type(5) { left:44%; background:#ff6b6b; animation-delay:-8s; } .col-conf:nth-of-type(6) { left:90%; background:#fde047; animation-delay:-13.5s; width:8px; height:8px; }
@keyframes col-wiggle { 0%,100% { transform:rotate(-12deg) scale(1.1); } 50% { transform:rotate(6deg) scale(1.1); } }
@keyframes col-dots { to { transform:translate(22px, 22px); } }
@keyframes col-fall { 0% { transform:translateY(-14px) rotate(0); } 100% { transform:translateY(120px) rotate(180deg); } }
.col-label { display:block; padding:10px 8px; text-align:center; font-weight:800; font-size:14px; color:#fff; background:#7c3aed; min-height:44px; display:flex; align-items:center; justify-content:center; }
.col-card .col-label { background:var(--ta); }
@media (max-width:1100px) { .tab-pane, .tab-pane[data-pane="theme"] { grid-template-columns:repeat(4, 1fr); } }
@media (max-width:600px) {
  .board { padding:12px 10px; margin:59px 0 14px; border-radius:20px; } .board + .board { margin-top:59px; } .board-tag { top:-47px; font-size:22px; text-shadow:2px 2px 0 var(--display-shadow); } .board-see { top:-43px; font-size:12px; padding:4px 10px; }
  .welcome { padding:80px 14px 120px; margin-bottom:14px; }
  .balloon, .kite, .welcome-kids { display:none; } .welcome-title { font-size:25px; } .welcome-sub2 { font-size:13px; margin-bottom:12px; }
  .welcome-actions { gap:8px; } .welcome .btn-play { min-height:40px; font-size:14px; padding:0 14px; border-width:2px; }
  .sky-sun { width:70px; height:70px; right:-14px; top:-24px; } .cloud.c2, .cloud.c4 { display:none; } .cloud.c1 { transform:scale(.7); left:-10px; top:12%; } .cloud.c3 { transform:scale(.7); left:-4px; bottom:6%; } .rainbow { transform:rotate(-20deg) scale(.6); left:-90px; bottom:-170px; }
  .planets { gap:12px 14px; } .planet-ball { width:74px; height:74px; border-width:3px; box-shadow:var(--shadow-sm), inset -9px -9px 0 rgba(0,0,0,.18); } .planet-ball::before { left:9px; top:9px; width:20px; height:11px; } .planet:nth-child(2n) .planet-ball::after { left:-13px; right:-13px; height:16px; border-width:3px; } .planet-ball b { font-size:34px; } .planet-ball small { font-size:9px; } .planet { font-size:11px; gap:4px; }
  .tab-pane, .tab-pane[data-pane="theme"] { grid-template-columns:repeat(3, 1fr); gap:8px; padding:10px; } .tab { font-size:17px; padding:10px 6px; } .col-live { height:72px; } .col-stick { padding:5px 10px; border-width:2px; box-shadow:3px 3px 0 var(--ink); } .col-big { font-size:32px; } .col-conf { width:8px; height:8px; } .col-label { font-size:11px; padding:6px 4px; min-height:38px; }
}

/* ---- Printables (free A4 sheets) ---- */
.board-print { --board:linear-gradient(135deg, #ffd23f, #ff9f43); }
.pgrid { display:grid; grid-template-columns:repeat(6, 1fr); gap:14px; }
.pcard { position:relative; display:flex; flex-direction:column; background:#fff; border:3px solid var(--ink); border-radius:18px; box-shadow:4px 4px 0 rgba(0,0,0,.35); overflow:hidden; color:#1f1a33; transition:transform .12s, box-shadow .12s; }
.pcard:hover { transform:translate(-3px,-3px); box-shadow:7px 7px 0 var(--ink); }
.pcard img { display:block; width:100%; height:auto; aspect-ratio:3/4; object-fit:cover; object-position:top; background:#fff; border-bottom:3px solid var(--ink); }
.pkind { position:absolute; top:8px; left:8px; z-index:2; font-size:11px; font-weight:800; background:var(--yellow); border:2px solid #1f1a33; border-radius:999px; padding:3px 9px; color:#1f1a33; }
.pinfo { display:flex; flex-direction:column; gap:2px; padding:10px 52px 12px 12px; }
.pinfo b { font-family:Bangers, sans-serif; font-weight:400; letter-spacing:.04em; font-size:20px; line-height:1; }
.pinfo small { font-size:12px; font-weight:800; color:#6b6580; }
.pdl { position:absolute; right:10px; bottom:10px; width:36px; height:36px; border-radius:50%; background:var(--coral); color:#fff; border:3px solid #1f1a33; display:grid; place-items:center; font-weight:900; font-size:18px; box-shadow:2px 2px 0 #1f1a33; }
/* homepage marquee: all sheets glide left at a constant speed, seamless loop (track holds two copies), pause on hover/touch */
.board-print { --pcard-w:200px; --mq-gap:14px; }
.mq { position:relative; overflow:hidden; margin:0 -22px; padding:6px 0; }
.mq-track { display:flex; gap:var(--mq-gap); width:max-content; padding:0 var(--mq-gap); animation:mq var(--mq-dur, 95s) linear infinite; will-change:transform; }
.mq-track .pcard { width:var(--pcard-w); flex:0 0 var(--pcard-w); }
.mq:hover .mq-track, .mq.paused .mq-track { animation-play-state:paused; }
@keyframes mq { to { transform:translateX(calc(-50% - var(--mq-gap) / 2)); } }
@media (prefers-reduced-motion: reduce) { .mq-track { animation:none; } .mq { overflow-x:auto; } }
/* /printables page */
.print-kinds { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 18px; }
.print-kinds a { display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:0 16px; border-radius:999px; border:3px solid var(--ink); background:var(--surface); color:var(--text); font-weight:800; font-size:14px; box-shadow:var(--shadow-sm); }
.print-kinds a[aria-pressed="true"] { background:var(--yellow); color:#1f1a33; }
.print-section { margin:26px 0 8px; }
.print-note { font-size:14px; color:var(--muted); margin:6px 0 0; }
/* /print/<slug> page */
.sheet { display:grid; grid-template-columns:minmax(0, 420px) 1fr; gap:26px; align-items:start; margin-top:8px; }
.sheet-preview { border:4px solid var(--ink); border-radius:18px; background:#fff; box-shadow:var(--shadow); overflow:hidden; }
.sheet-preview img { display:block; width:100%; height:auto; }
.sheet-side h1 { font-family:Bangers, sans-serif; font-size:clamp(30px,4vw,44px); letter-spacing:.05em; color:var(--display-fill); text-shadow:3px 3px 0 var(--display-shadow); margin:0 0 6px; }
.sheet-meta { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 14px; } .sheet-meta span { font-weight:800; font-size:13px; background:var(--surface); border:3px solid var(--ink); border-radius:999px; padding:4px 12px; }
.sheet-side p { font-size:17px; line-height:1.5; max-width:52ch; }
.sheet-actions { display:flex; flex-wrap:wrap; gap:12px; margin:18px 0 10px; }
.sheet-actions .btn { min-height:50px; font-size:18px; }
.sheet-how { margin-top:22px; } .sheet-how h2 { font-size:18px; margin:0 0 6px; } .sheet-how ol { padding-left:20px; line-height:1.6; }
@media (max-width:1100px) { .pgrid { grid-template-columns:repeat(4, 1fr); } }
@media (max-width:700px) { .pgrid { grid-template-columns:repeat(2, 1fr); gap:10px; } .board-print { --pcard-w:150px; } .mq { margin:0 -10px; } .pinfo b { font-size:17px; } .pdl { width:32px; height:32px; font-size:15px; } .sheet { grid-template-columns:1fr; } .sheet-preview { max-width:420px; margin:0 auto; } }
@media print { header, footer, .sheet-side, .print-section, .section-title, .ad-slot, .consent, .top-nav, .rail { display:none !important; } body { background:#fff !important; } .sheet { display:block; margin:0; } .sheet-preview { border:0; box-shadow:none; border-radius:0; } .sheet-preview img { width:100%; } .container { max-width:none; padding:0; } }
