/* =========================================================
   OldSchoolGames — "Premium Arcade" design system v2
   Neon synthwave identity + chunky, tactile mobile-game UI:
   outlined display type, 3D lipped buttons, bevelled panels,
   ribbons, medals, shine sweeps and squash-on-press.
   ========================================================= */
:root {
  /* surfaces */
  --bg: #0b0726; --bg2: #120a38;
  --surface: #1c1452; --surface2: #261c68; --panel: #2c2178; --panel-hi: #3a2d93;
  --ink: #120a33;           /* outline colour for chunky UI */
  --line: rgba(190, 170, 255, .14); --line2: rgba(190, 170, 255, .26);
  /* text (all ≥ 4.5:1 on --bg) */
  --text: #ffffff; --muted: #c4bdf0; --dim: #968fcb;
  /* neon palette */
  --cyan: #2de2ff; --magenta: #ff3ec8; --yellow: #ffd84a; --orange: #ff9a1f; --green: #3dffa2; --violet: #9d7bff; --red: #ff4d6d; --blue: #4aa8ff;
  --acc: var(--yellow); --acc-ink: #3a2000; --acc2: var(--magenta); --ok: var(--green); --bad: var(--red);
  /* button gradients: top, bottom, lip */
  --b-yel: #ffe666, #ffb31a, #b86200;
  --glow-cyan: 0 0 6px rgba(45, 226, 255, .7), 0 0 22px rgba(45, 226, 255, .35);
  --glow-magenta: 0 0 6px rgba(255, 62, 200, .7), 0 0 22px rgba(255, 62, 200, .35);
  --glow-yellow: 0 0 8px rgba(255, 216, 74, .7), 0 0 26px rgba(255, 216, 74, .35);
  /* outlined "game title" text */
  --ot: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 1.4px 1.4px 0 var(--ink), -1.4px -1.4px 0 var(--ink), 1.4px -1.4px 0 var(--ink), -1.4px 1.4px 0 var(--ink);
  --ot-drop: var(--ot), 0 4px 0 var(--ink), 0 6px 12px rgba(0, 0, 0, .4);
  --ot-sm: 1.5px 0 0 var(--ink), -1.5px 0 0 var(--ink), 0 1.5px 0 var(--ink), 0 -1.5px 0 var(--ink), 0 2.5px 0 var(--ink);
  /* type */
  --display: "Lilita One", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pixel: "Press Start 2P", monospace;
  --label: var(--body);
  /* shape & motion */
  --r: 20px; --r-sm: 12px; --cw: 64px;
  --shadow: 0 18px 44px -14px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  /* category palette (g1 = neon tint, g2 = deep tone) */
  --c-board: #ff9a3d; --c-board2: #d6336c;
  --c-strategy: #a98bff; --c-strategy2: #5b2ee0;
  --c-cards: #3dffa2; --c-cards2: #0e9f74;
  --c-dice: #ffd84a; --c-dice2: #f07800;
  --c-puzzle: #2de2ff; --c-puzzle2: #1f6fe0;
  --c-word: #ff6bd5; --c-word2: #b01fc0;
  --c-arcade: #b8ff3d; --c-arcade2: #0ea58e;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
@view-transition { navigation: auto; }
body {
  color: var(--text); font: 600 15px/1.55 var(--body); min-height: 100vh; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1000px 560px at 85% -10%, rgba(255, 62, 200, .16), transparent 60%),
    radial-gradient(900px 560px at -10% 8%, rgba(45, 226, 255, .12), transparent 60%),
    radial-gradient(1200px 800px at 50% 120%, rgba(157, 123, 255, .14), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg) 700px);
  animation: pagein .5s var(--ease);
}
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } }
/* very light grain for depth */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .03; /* no blend mode: blending a full-screen layer is re-done every frame */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
::selection { background: var(--magenta); color: #fff; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--yellow); color: var(--acc-ink); font-weight: 900; border-radius: 10px; border: 2px solid var(--ink); }
.skip:focus { top: 12px; }
.gt { color: #fff; text-shadow: var(--ot-drop); }
.px { font-family: var(--pixel); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 10px clamp(14px, 4vw, 40px); position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(28, 18, 80, .97), rgba(16, 10, 50, .96)); /* no backdrop blur: it re-blurs moving games/videos every frame */
  border-bottom: 2px solid var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 8px 24px -12px rgba(0, 0, 0, .8);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 24px; letter-spacing: .02em; white-space: nowrap; color: #fff; text-shadow: var(--ot-sm); }
.logo .mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; transform: rotate(-6deg);
  background: linear-gradient(180deg, #ff6bd5, #c21c9a); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 3px 0 var(--ink); }
.logo .mark i { width: 20px; height: 20px; display: grid; grid-template: repeat(2, 1fr) / repeat(2, 1fr); gap: 3px; }
.logo .mark i b { background: #fff; border-radius: 3px; box-shadow: 0 1.5px 0 rgba(0, 0, 0, .3); }
.logo .mark i b:nth-child(2), .logo .mark i b:nth-child(3) { background: var(--yellow); }
.logo b { color: var(--yellow); font-weight: 400; }
.spacer { flex: 1; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 12px; color: var(--muted); font-weight: 800; font-size: 14px; transition: color .2s, background .2s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.lang { display: flex; background: rgba(0, 0, 0, .3); border-radius: 12px; padding: 3px; border: 2px solid var(--ink); }
.lang button { border: 0; background: none; color: var(--muted); padding: 5px 11px; border-radius: 9px; cursor: pointer; font-weight: 900; font-size: 13px; transition: all .2s; }
.lang button.on { background: linear-gradient(180deg, #6fefff, #12b6dc); color: #04212b; box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .6), 0 2px 0 var(--ink); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 2px solid var(--ink); cursor: pointer; font-size: 17px; color: #fff;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 3px 0 var(--ink); transition: transform .12s var(--spring); }
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 1px 0 var(--ink); }
.icon-btn[aria-pressed="true"] { filter: grayscale(.8) brightness(.8); }
/* music toggle: animated equalizer while on */
.icon-btn.eq[aria-pressed] { filter: none; }
.icon-btn.eq .bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.icon-btn.eq .bars i { width: 3px; height: 4px; border-radius: 2px; background: var(--dim); }
.icon-btn.eq.on { background: linear-gradient(180deg, #b49bff, #6a43e0); }
.icon-btn.eq.on .bars i { background: #fff; box-shadow: 0 1px 0 var(--ink); animation: eq .9s ease-in-out infinite; }
.icon-btn.eq.on .bars i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.icon-btn.eq.on .bars i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.icon-btn.eq.on .bars i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* ---------- buttons: chunky 3D with lip + shine ---------- */
.btn { --t: #4f3fc4; --b: #33259a; --lip: var(--ink);
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--ink); border-radius: 14px; padding: 9px 18px; cursor: pointer;
  background: linear-gradient(180deg, var(--t), var(--b)); color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .01em; text-shadow: 0 1.5px 0 rgba(0, 0, 0, .35);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28), inset 0 -3px 0 rgba(0, 0, 0, .22), 0 4px 0 var(--lip), 0 8px 16px -6px rgba(0, 0, 0, .6);
  transition: transform .14s var(--spring), box-shadow .14s, filter .2s; }
.btn::after { content: ''; position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); pointer-events: none; }
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.btn:hover:not(:disabled)::after { animation: shine .7s ease; }
.btn:active:not(:disabled) { transform: translateY(3px) scale(.98); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 1px 0 var(--lip); }
.btn:disabled { opacity: .45; cursor: default; filter: grayscale(.5); }
@keyframes shine { to { left: 130%; } }
.btn.pri { --t: #ffe666; --b: #ffaa12; --lip: #8a4700; color: #fff; text-shadow: var(--ot-sm); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(160, 70, 0, .35), 0 4px 0 #8a4700, 0 0 0 2px var(--ink), 0 10px 22px -6px rgba(255, 170, 18, .55); border-color: transparent; }
.btn.pri:active:not(:disabled) { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 1px 0 #8a4700, 0 0 0 2px var(--ink); }
.btn.mag { --t: #ff7ae0; --b: #d61ea6; --lip: #6d0a52; }
.btn.cy { --t: #6ff0ff; --b: #10a9d6; --lip: #05506a; text-shadow: var(--ot-sm); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: none; border-color: transparent; box-shadow: none; color: var(--muted); text-shadow: none; }
.btn.ghost:hover { color: #fff; }
.btn.big { padding: 14px 28px; font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .03em; border-radius: 18px; }
select.btn { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%), linear-gradient(180deg, var(--t), var(--b)); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%, 0 0; background-size: 5px 5px, 5px 5px, 100% 100%; background-repeat: no-repeat; }
select.btn option { background: var(--surface); color: var(--text); }

/* ---------- home: hero ---------- */
.hero-wrap { --floor: clamp(110px, 15vw, 180px); position: relative; isolation: isolate; overflow: hidden; border-bottom: 2px solid var(--ink); }
.synth { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stars { position: absolute; inset: 0 0 var(--floor) 0; opacity: .8; animation: twinkle 4s ease-in-out infinite alternate;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #cfe9ff, transparent),
    radial-gradient(1px 1px at 60px 150px, #fff, transparent), radial-gradient(1.5px 1.5px at 170px 20px, #ffd3f4, transparent),
    radial-gradient(1px 1px at 200px 120px, #fff, transparent), radial-gradient(1px 1px at 90px 200px, #c9f6ff, transparent);
  background-size: 240px 240px; }
.stars.s2 { background-size: 380px 300px; background-position: 60px 40px; animation-duration: 6s; animation-delay: -2s; opacity: .55; }
@keyframes twinkle { to { opacity: .35; } }
.sun { position: absolute; left: 72%; bottom: var(--floor); width: min(440px, 52vw); aspect-ratio: 1; translate: -50% 38%; border-radius: 50%;
  background: linear-gradient(180deg, #ffe666 0%, #ff9a1f 42%, #ff3ec8 78%, #a21caf 100%);
  -webkit-mask-image: linear-gradient(#000 48%, transparent 48% 52%, #000 52% 60%, transparent 60% 65%, #000 65% 72%, transparent 72% 78%, #000 78% 84%, transparent 84% 91%, #000 91%);
  mask-image: linear-gradient(#000 48%, transparent 48% 52%, #000 52% 60%, transparent 60% 65%, #000 65% 72%, transparent 72% 78%, #000 78% 84%, transparent 84% 91%, #000 91%); opacity: .9; }
.sun-glow { position: absolute; left: 72%; bottom: var(--floor); width: min(700px, 80vw); aspect-ratio: 1; translate: -50% 45%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 62, 200, .35), rgba(255, 154, 31, .12) 55%, transparent); }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: var(--floor); perspective: 300px; perspective-origin: 50% 0; overflow: hidden;
  background: linear-gradient(180deg, #1b0a4a, var(--bg) 90%); border-top: 2px solid var(--magenta); box-shadow: 0 -6px 30px rgba(255, 62, 200, .5); }
.floor::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 62, 200, .25), transparent 40%); }
.grid-plane { position: absolute; left: -100%; width: 300%; bottom: 0; height: 600%; transform-origin: 50% 100%;
  background-image: linear-gradient(rgba(255, 62, 200, .6) 2px, transparent 2px), linear-gradient(90deg, rgba(45, 226, 255, .45) 2px, transparent 2px);
  background-size: 60px 60px; animation: gridmove 1.1s linear infinite;
  -webkit-mask-image: linear-gradient(transparent 20%, #000 75%); mask-image: linear-gradient(transparent 20%, #000 75%); }
@keyframes gridmove { from { transform: rotateX(72deg) translateY(0); } to { transform: rotateX(72deg) translateY(60px); } }

.hero {
  max-width: 1240px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 40px) calc(var(--floor) + 34px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 99px; background: rgba(0, 0, 0, .35); border: 2px solid var(--ink); box-shadow: inset 0 0 0 1px rgba(61, 255, 162, .35); color: var(--green); font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: livedot 1.6s ease-in-out infinite; }
@keyframes livedot { 50% { transform: scale(.6); opacity: .5; } }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { margin: 18px 0 16px; font-size: clamp(42px, 6.4vw, 80px); line-height: .98; color: #fff; text-shadow: var(--ot), 0 6px 0 var(--ink), 0 10px 24px rgba(0, 0, 0, .5); letter-spacing: .01em; }
.hero h1 em { font-style: normal; display: inline-block; color: var(--yellow); transform: rotate(-2deg); margin-top: 4px; }
.hero p.lead { margin: 0 0 30px; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); font-weight: 600; max-width: 540px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .cta .btn.pri { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); } }
.hero .cta .btn.pri:hover { animation: none; }
.hero .stats { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero .stats div { display: flex; flex-direction: column; align-items: center; min-width: 88px; padding: 10px 14px 8px; border-radius: 16px; background: linear-gradient(180deg, rgba(58, 45, 147, .85), rgba(28, 20, 82, .85)); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 4px 0 var(--ink); }
.hero .stats b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--yellow); text-shadow: var(--ot-sm); }
.hero .stats span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

/* hero cabinet illustration (original SVG) */
.art { position: relative; display: grid; place-items: center; }
.cab { width: min(340px, 80%); height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .7)); animation: float 6s ease-in-out infinite; }
.cab .flick { animation: flicker 5s linear infinite; }
.cab .blinky { animation: blink 1s steps(2) infinite; }
.cab .fall1 { animation: fall 3.2s steps(10) infinite; }
.cab .runner { animation: run 4s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes fall { from { transform: translateY(-40px); } to { transform: translateY(60px); } }
@keyframes run { 0% { transform: translateX(0); } 50% { transform: translateX(84px); } 50.01% { transform: translateX(84px) scaleX(-1); } 100% { transform: translateX(0) scaleX(-1); } }
@keyframes flicker { 0%, 19%, 21%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .55; } }
@keyframes float { 50% { translate: 0 -10px; } }
.art .chip-float { position: absolute; font-weight: 900; font-size: 13px; padding: 8px 12px; border-radius: 14px; color: #fff; border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 4px 0 var(--ink); animation: float 5s ease-in-out infinite; white-space: nowrap; text-shadow: 0 1.5px 0 rgba(0, 0, 0, .35); }
.art .cf1 { left: 0; top: 18%; background: linear-gradient(180deg, #6ff0ff, #10a9d6); }
.art .cf2 { right: 0; top: 46%; background: linear-gradient(180deg, #ffe666, #ffaa12); color: #fff; text-shadow: var(--ot-sm); animation-delay: -2s; }
.art .cf3 { left: 6%; bottom: 10%; background: linear-gradient(180deg, #ff7ae0, #d61ea6); animation-delay: -3.5s; }

/* ---------- home: sections ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); scroll-margin-top: 76px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 56px 0 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.1; color: #fff; text-shadow: var(--ot-drop); display: flex; align-items: center; gap: 14px; }
.section-head h2::before { content: ''; width: 18px; height: 18px; border-radius: 6px; transform: rotate(45deg); flex: none;
  background: linear-gradient(135deg, #fff 0 12%, var(--hc, var(--magenta)) 30%, color-mix(in srgb, var(--hc, var(--magenta)) 60%, #000)); border: 2px solid var(--ink); box-shadow: 0 0 14px var(--hc, var(--magenta)); }
.section-head p { margin: 8px 0 0; color: var(--muted); font-weight: 700; }
.sec-cyan { --hc: var(--cyan); } .sec-yellow { --hc: var(--yellow); } .sec-green { --hc: var(--green); }

/* chunky panel mixin-ish base */
.feat, .gcard, .cont-card, .ach, .side .card, .toast, .overlay .box { border: 2px solid var(--ink); }

/* popular bento */
.featured { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 18px; }
.feat { position: relative; border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; isolation: isolate; background: #140d40;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), 0 6px 0 var(--ink), 0 16px 30px -12px rgba(0, 0, 0, .7); transition: transform .3s var(--spring), box-shadow .3s; }
.feat:first-child { grid-column: span 2; grid-row: span 2; padding: 28px; }
.feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.feat::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(14, 8, 44, .97) 0%, rgba(14, 8, 44, .55) 40%, transparent 72%); }
.feat::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: 1; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent); pointer-events: none; }
.feat:hover::before { animation: shine .9s ease; }
.medal { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 18px; color: #fff; text-shadow: var(--ot-sm);
  background: radial-gradient(circle at 35% 30%, #fff8c4, #ffcf33 45%, #c98a00); border: 2px solid var(--ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 3px 0 var(--ink); }
.medal.m2 { background: radial-gradient(circle at 35% 30%, #fff, #c9d3e8 45%, #7d88a8); }
.medal.m3 { background: radial-gradient(circle at 35% 30%, #ffe0c2, #e08a4a 45%, #9a4f1c); }
.medal.m4, .medal.m5 { background: radial-gradient(circle at 35% 30%, #d9cbff, #8a6cf0 45%, #4a2fae); }
.feat .cat { align-self: flex-start; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 99px; color: #fff; background: linear-gradient(180deg, var(--g1), var(--g2)); border: 2px solid var(--ink); text-shadow: 0 1px 0 rgba(0, 0, 0, .4); margin-bottom: 10px; }
.feat h3 { margin: 0; font-size: 24px; color: #fff; line-height: 1.05; text-shadow: var(--ot-drop); }
.feat:first-child h3 { font-size: clamp(34px, 3.6vw, 48px); }
.feat p { margin: 10px 0 0; color: rgba(255, 255, 255, .85); font-size: 15px; max-width: 420px; display: none; }
.feat:first-child p { display: block; }
.feat .go { display: none; margin-top: 18px; align-self: flex-start; }
.feat:first-child .go { display: inline-flex; }
.feat:hover, .feat:focus-visible { transform: translateY(-6px) scale(1.015); box-shadow: inset 0 0 0 2px var(--g1), 0 10px 0 var(--ink), 0 0 34px -6px var(--g1); }
.feat:hover img { transform: scale(1.07); }

/* horizontal shelves (continue / new) */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 18px; overflow-x: auto; padding: 8px 4px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.shelf > * { scroll-snap-align: start; }
.shelf.cont { grid-auto-columns: minmax(260px, 310px); }
.cont-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, var(--surface2), var(--surface)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 5px 0 var(--ink); transition: transform .25s var(--spring); }
.cont-card img { width: 88px; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; flex: none; border: 2px solid var(--ink); }
.cont-card b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; line-height: 1.1; text-shadow: var(--ot-sm); }
.cont-card small { color: var(--muted); font-size: 12px; font-weight: 800; }
.cont-card .resume { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 14px; flex: none; text-shadow: var(--ot-sm);
  background: linear-gradient(180deg, #ffe666, #ffaa12); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--ink); }
.cont-card:hover, .cont-card:focus-visible { transform: translateY(-4px); }

/* achievements */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ach { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: linear-gradient(180deg, #1f1758, #18114a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06), 0 4px 0 var(--ink); }
.ach .ai { position: relative; width: 50px; height: 50px; flex: none; display: grid; place-items: center; font-size: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a3f86, #231a5e); border: 2px solid var(--ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3); filter: grayscale(1) brightness(.6); }
.ach:not(.got) .ai::after { content: '🔒'; position: absolute; right: -6px; bottom: -4px; font-size: 14px; filter: none; }
.ach b { display: block; font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1.15; letter-spacing: .01em; }
.ach small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; font-weight: 700; }
.ach .bar { height: 10px; border-radius: 99px; background: rgba(0, 0, 0, .45); margin-top: 7px; overflow: hidden; border: 2px solid var(--ink); }
.ach .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(180deg, #8ff6ff, #12b6dc); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .6); }
.ach.got { background: linear-gradient(180deg, #3a2d93, #261c68); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .14), 0 4px 0 var(--ink), 0 0 24px -8px var(--yellow); }
.ach.got .ai { filter: none; background: radial-gradient(circle at 35% 30%, #fff8c4, #ffcf33 45%, #c98a00); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 0 18px -2px var(--yellow); }

/* toolbar */
.toolbar { position: sticky; top: 64px; z-index: 20; padding: 14px 0; margin-top: 8px; background: linear-gradient(var(--bg) 72%, transparent); }
.toolbar .inner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1 1 260px; max-width: 360px; }
.search-wrap::before { content: '⌕'; position: absolute; left: 15px; top: 50%; translate: 0 -54%; color: var(--yellow); font-size: 21px; font-weight: 900; pointer-events: none; z-index: 1; }
.search { width: 100%; padding: 12px 16px 12px 42px; border-radius: 16px; border: 2px solid var(--ink); background: #0e0832; color: var(--text); font-size: 15px; font-weight: 700; outline: none; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .4), 0 2px 0 rgba(255, 255, 255, .06); transition: box-shadow .2s; }
.search::placeholder { color: var(--dim); }
.search:focus { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .4), 0 0 0 3px var(--cyan); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --cc: var(--cyan); display: inline-flex; align-items: center; gap: 7px; border: 2px solid var(--ink); color: var(--muted); padding: 7px 13px; border-radius: 99px; cursor: pointer; font-weight: 900; font-size: 14px;
  background: linear-gradient(180deg, #2a2070, #1c1452); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 3px 0 var(--ink); transition: transform .14s var(--spring), color .2s; }
.chip:hover { color: #fff; transform: translateY(-2px); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); border: 1.5px solid var(--ink); }
.chip small { color: var(--dim); font-size: 12px; font-weight: 800; }
.chip.on { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 75%, #fff), color-mix(in srgb, var(--cc) 75%, #000)); text-shadow: var(--ot-sm); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--ink); }
.chip.on i { background: #fff; }
.chip.on small { color: rgba(255, 255, 255, .85); text-shadow: none; }
.result-count { color: var(--muted); font-weight: 800; font-size: 13px; margin-left: auto; }

/* ---------- game cards ---------- */
.grid { max-width: 1240px; margin: 4px auto 60px; padding: 0 clamp(16px, 4vw, 40px); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.gcard { position: relative; display: flex; flex-direction: column; border-radius: 20px; padding: 7px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel-hi), var(--surface) 60%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .16), 0 6px 0 var(--ink), 0 14px 28px -12px rgba(0, 0, 0, .7);
  transition: transform .28s var(--spring), box-shadow .28s; }
.gcard::after { content: ''; position: absolute; top: 0; bottom: 0; width: 45%; left: -70%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent); pointer-events: none; z-index: 3; }
.gcard:hover, .gcard:focus-visible { transform: translateY(-7px) rotate(-.6deg); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .16), 0 0 0 3px var(--g1), 0 11px 0 var(--ink), 0 0 36px -6px var(--g1); outline: none; }
.gcard:hover::after, .gcard:focus-visible::after { animation: shine .9s ease; }
.gcard:active { transform: translateY(-2px) scale(.98); }
.gcard .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; border-radius: 14px; border: 2px solid var(--ink); background: linear-gradient(140deg, var(--g1), var(--g2)); }
.gcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--ease), filter .4s; }
.gcard .thumb::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(14, 8, 44, .55), transparent 45%), linear-gradient(160deg, rgba(255, 255, 255, .18), transparent 35%); }
.gcard:hover .thumb img, .gcard:focus-visible .thumb img { transform: scale(1.1); filter: brightness(.75) saturate(1.15); }
.gcard .scan { display: none; }
.gcard .ico { position: absolute; left: 8px; bottom: 8px; z-index: 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(180deg, var(--g1), var(--g2)); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--ink); }
.gcard .play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 58px; height: 58px; translate: -50% -50%; scale: .4; opacity: 0; border-radius: 50%; display: grid; place-items: center; font-size: 0;
  background: linear-gradient(180deg, #ffe666, #ffaa12); border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--ink), 0 0 26px rgba(255, 216, 74, .6); transition: scale .35s var(--spring), opacity .2s; }
.gcard .play::before { content: ''; margin-left: 5px; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; filter: drop-shadow(0 2px 0 var(--ink)); }
.gcard:hover .play, .gcard:focus-visible .play { opacity: 1; scale: 1; }
.gcard .new { position: absolute; right: -4px; top: 10px; z-index: 2; font-family: var(--display); font-size: 14px; padding: 3px 12px 3px 10px; color: #fff; text-shadow: var(--ot-sm);
  background: linear-gradient(180deg, #ff7ae0, #d61ea6); border: 2px solid var(--ink); border-radius: 10px 0 0 10px; box-shadow: 0 3px 0 var(--ink); animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-6deg) scale(1.08); } 92% { transform: rotate(5deg) scale(1.08); } }
.gcard .body { padding: 11px 8px 6px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.gcard h3 { margin: 0; font-size: 19px; line-height: 1.1; color: #fff; text-shadow: var(--ot-sm); }
.gcard p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; font-weight: 700; line-height: 1.4; }
.gcard .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.tagpill { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 99px; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .45);
  background: linear-gradient(180deg, color-mix(in srgb, var(--g1) 80%, #fff 0%), var(--g2)); border: 2px solid var(--ink); }
.gcard .players { font-size: 12px; color: var(--muted); font-weight: 800; }
.gcard .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* difficulty meter */
.diff { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 900; color: var(--muted); }
.diff i { width: 7px; height: 13px; border-radius: 3px; background: rgba(0, 0, 0, .45); border: 1.5px solid var(--ink); }
.diff.d1 i:nth-child(-n+1) { background: linear-gradient(180deg, #8affc8, #18c97a); }
.diff.d2 i:nth-child(-n+2) { background: linear-gradient(180deg, #ffe98a, #ffb31a); }
.diff.d3 i:nth-child(-n+3) { background: linear-gradient(180deg, #ff9aae, #e5294f); }
.diff span { margin-left: 5px; }
.empty { text-align: center; color: var(--muted); grid-column: 1/-1; padding: 60px; font-size: 18px; font-weight: 800; }

footer.site { border-top: 2px solid var(--ink); padding: 34px clamp(16px, 4vw, 40px); color: var(--muted); font-size: 14px; font-weight: 700; background: rgba(0, 0, 0, .2); }
footer.site .inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }

/* category colour hooks */
[data-cat="board"] { --g1: var(--c-board); --g2: var(--c-board2); }
[data-cat="strategy"] { --g1: var(--c-strategy); --g2: var(--c-strategy2); }
[data-cat="cards"] { --g1: var(--c-cards); --g2: var(--c-cards2); }
[data-cat="dice"] { --g1: var(--c-dice); --g2: var(--c-dice2); }
[data-cat="puzzle"] { --g1: var(--c-puzzle); --g2: var(--c-puzzle2); }
[data-cat="word"] { --g1: var(--c-word); --g2: var(--c-word2); }
[data-cat="arcade"] { --g1: var(--c-arcade); --g2: var(--c-arcade2); }

/* ---------- play page ---------- */
.play-head { max-width: 1320px; margin: 22px auto 0; padding: 0 clamp(14px, 3vw, 30px); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.play-head .titlebox { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 240px; }
.play-head .gicon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; flex: none; transform: rotate(-4deg);
  background: linear-gradient(180deg, var(--g1), var(--g2)); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 4px 0 var(--ink); }
.play-head .crumb { font-size: 13px; font-weight: 800; color: var(--dim); display: flex; gap: 8px; align-items: center; }
.play-head .crumb a { color: var(--muted); } .play-head .crumb a:hover { color: var(--yellow); }
.play-head h1 { margin: 2px 0 0; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.05; color: #fff; text-shadow: var(--ot-drop); }
.play-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.play-wrap { max-width: 1320px; margin: 20px auto 50px; padding: 0 clamp(8px, 3vw, 30px); display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.cabinet { position: relative; border-radius: 28px; padding: 14px clamp(8px, 1.6vw, 18px) 16px;
  background: linear-gradient(180deg, #3a2d93, #241a66 30%, #1a1250);
  border: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .16), inset 0 -4px 0 rgba(0, 0, 0, .3), 0 8px 0 var(--ink), 0 0 50px -14px var(--g1, var(--magenta)), var(--shadow); }
/* marquee with chasing light bulbs */
.marquee { position: relative; margin: 0 auto 14px; text-align: center; padding: 14px 18px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--g1, var(--cyan)) 30%, #140d40), #0f0934); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12); }
.marquee::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 5px; pointer-events: none;
  background: radial-gradient(circle, #fffbe0 0 1.6px, #ffcf33 2.2px, transparent 3.2px) 0 0 / 14px 14px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: bulbs .6s steps(2) infinite; }
@keyframes bulbs { 50% { background-position: 7px 7px; } }
.marquee span { position: relative; font-family: var(--display); font-size: clamp(20px, 2.6vw, 30px); letter-spacing: .04em; color: #fff; text-shadow: var(--ot), 0 4px 0 var(--ink), 0 0 26px var(--g1, var(--cyan)); }
.screen { position: relative; border-radius: 20px; padding: clamp(12px, 2.4vw, 26px) clamp(4px, 1.5vw, 20px) clamp(16px, 2.6vw, 28px);
  background: radial-gradient(120% 90% at 50% 0%, rgba(45, 226, 255, .08), transparent 60%), linear-gradient(180deg, #120c3a, #0a0626);
  border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .05), inset 0 0 60px rgba(0, 0, 0, .6), 0 2px 0 rgba(255, 255, 255, .1); min-height: 320px; }
.screen::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 6; background: radial-gradient(130% 110% at 50% 50%, transparent 68%, rgba(0, 0, 0, .35)), linear-gradient(160deg, rgba(255, 255, 255, .05), transparent 30%); }
/* fullscreen never scrolls: the game is scaled to fit (play.js fitStage), so a scrollbar would only ever come from the
   scaled box's invisible edges */
.screen:fullscreen { display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 0; border: 0; padding: 16px; overflow: hidden; background: var(--bg); }
.screen:fullscreen .stage { width: 100%; }
/* illustrated scene behind every game (js/scenes.js) */
canvas.page-scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
/* the body's own gradient would paint over a z-index:-1 canvas, so let the scene show through */
body[data-scene] { background: transparent; }
body[data-scene] .play-head .crumb, body[data-scene] .more h2 { text-shadow: 0 2px 0 rgba(18, 10, 51, .9), 0 0 8px rgba(18, 10, 51, .8); }
body[data-scene] .play-head .crumb a { color: #fff; }
body.shot canvas.page-scene { display: none; }
/* Snakes & Ladders fullscreen side panel (dice, roll button, players) */
.sl-panel { position: absolute; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 24px;
  background: linear-gradient(180deg, #3a2d93, #241a66 50%, #1a1250); border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .16), 0 8px 0 var(--ink), 0 26px 44px rgba(0, 0, 0, .5); animation: popin .45s var(--spring); }
.sl-panel .sl-turn { font-family: var(--display); font-size: 24px; line-height: 1.15; text-align: center; color: #fff; text-shadow: var(--ot-sm); padding: 10px 12px; border-radius: 16px; border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 4px 0 var(--ink); }
.sl-panel .row { flex-direction: column; flex-wrap: nowrap; gap: 12px; align-items: stretch; }
.sl-panel .row > div:first-child { align-self: center; }
/* Snakes & Ladders dice: big, chunky 3D die (bigger still in the fullscreen panel) */
.sl-die .die { width: 84px; height: 84px; padding: 13px; gap: 4px; border-radius: 20px; border-width: 3px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .14), inset 0 3px 0 #fff, 0 6px 0 var(--ink), 0 14px 20px -8px rgba(0, 0, 0, .55); transition: transform .15s var(--spring); }
.sl-die:hover .die { transform: translateY(-3px) rotate(-4deg); }
.sl-die .die i.p { box-shadow: inset 0 2px 2px rgba(255, 255, 255, .25); }
.sl-panel .sl-die .die { width: 150px; height: 150px; padding: 24px; gap: 7px; border-radius: 32px; border-width: 4px; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .14), inset 0 4px 0 #fff, 0 10px 0 var(--ink), 0 22px 30px -10px rgba(0, 0, 0, .6); }
.sl-panel .sl-die { margin: 6px 0 4px; }
.sl-panel .btn.big, .sl-panel select.btn { width: 100%; }
.sl-panel .panel { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 900; border-radius: 12px; }
/* self-sizing canvases in fullscreen: edge to edge, the HUD lives inside the canvas */
.screen:fullscreen:has(canvas.hires) { padding: 0; }
/* canvases with their own HUD (e.g. Snake) don't need the status pill or the stage gap */
.screen:fullscreen:has(canvas.hud) .status { display: none; }
.screen:fullscreen:has(canvas.hud) .stage { gap: 0; }
.screen:fullscreen:has(canvas.hires:not(.hud)) .status { margin: 10px auto 0; }
.screen:fullscreen canvas.hires { border: 0; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .screen:fullscreen .snake-pad { display: none; } }
/* canvases flagged .hires re-render at full size themselves; the rest are scaled to fit */
/* fullscreen world behind every game (js/scenes.js mounted on .screen; visible only in fullscreen) */
.screen > canvas.scene:not(.page-scene) { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: none; }
.screen:fullscreen > canvas.scene:not(.page-scene) { display: block; }
.screen:fullscreen .stage { position: relative; z-index: 1; }
.fs-hint { position: absolute; top: 16px; right: 20px; z-index: 8; padding: 8px 14px; border-radius: 12px; background: rgba(18, 10, 51, .7); border: 2px solid var(--ink); color: #fff; font-weight: 900; font-size: 14px; animation: fsHint 3.8s ease forwards; pointer-events: none; }
@keyframes fsHint { 0% { opacity: 0; transform: translateY(-8px); } 10%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* juicy press burst */
.fx-burst { position: fixed; z-index: 66; pointer-events: none; width: 0; height: 0; }
.fx-burst b { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 10px #ffd84a; animation: fxRing .45s ease-out forwards; }
.fx-burst i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; background: var(--c); clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%); animation: fxStar .6s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes fxRing { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
@keyframes fxStar { from { transform: translate(0, 0) scale(1.2) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.3) rotate(200deg); opacity: 0; } }
/* character pieces (chess / checkers) */
.pc-svg { display: block; width: 92%; height: 92%; margin: 4%; pointer-events: none; overflow: visible; filter: drop-shadow(0 3px 0 rgba(18, 10, 51, .45)); }
.pc-svg.sel { animation: pcBob .7s ease-in-out infinite; filter: drop-shadow(0 0 6px #ffd84a) drop-shadow(0 6px 0 rgba(18, 10, 51, .4)); }
.pc-svg.can { animation: pcWiggle 1.6s ease-in-out infinite; filter: drop-shadow(0 0 5px rgba(255, 216, 74, .9)) drop-shadow(0 3px 0 rgba(18, 10, 51, .45)); }
.pc-fly { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.pc-pop { position: absolute; left: 50%; bottom: 70%; z-index: 9; pointer-events: none; white-space: nowrap; font-family: 'Lilita One', var(--display); font-size: clamp(16px, 2.4vw, 26px); letter-spacing: .5px; -webkit-text-stroke: 5px #120a33; paint-order: stroke fill; text-shadow: 0 3px 0 #120a33; animation: pcPop 1.1s cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes pcBob { 50% { translate: 0 -12%; scale: 1.08; } }
@keyframes pcWiggle { 0%, 70%, 100% { rotate: 0deg; } 78% { rotate: -7deg; } 86% { rotate: 6deg; } 93% { rotate: -3deg; } }
@keyframes pcPop { 0% { transform: translate(-50%, 20px) scale(.4); opacity: 0; } 18% { transform: translate(-50%, 0) scale(1.2); opacity: 1; } 30% { transform: translate(-50%, 0) scale(1); } 75% { opacity: 1; } 100% { transform: translate(-50%, -34px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pc-svg.sel, .pc-svg.can { animation: none; } }
.pause-screen { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; align-content: center; gap: 20px; border-radius: inherit; background: rgba(10, 6, 34, .78); backdrop-filter: blur(4px); animation: fade .2s; }
.pause-screen b { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); color: #fff; text-shadow: var(--ot-drop); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.deck { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: flex-start; margin-top: 16px; padding: 12px 10px 8px; border-radius: 20px; background: linear-gradient(180deg, #2a2070, #1b1350); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), inset 0 -3px 0 rgba(0, 0, 0, .3); }
.deck .abtn { display: inline-flex; flex-direction: column; align-items: center; gap: 7px; background: none; border: 0; color: var(--muted); cursor: pointer; font-weight: 900; font-size: 12px; padding: 2px 6px; border-radius: 12px; min-width: 64px; }
.deck .abtn .cap { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; color: #fff; text-shadow: var(--ot-sm);
  background: radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--bc) 45%, #fff), var(--bc) 55%, color-mix(in srgb, var(--bc) 70%, #000)); border: 2px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 4px 0 var(--ink); transition: transform .14s var(--spring), box-shadow .14s; }
.deck .abtn:hover .cap { transform: translateY(-2px) scale(1.06); }
.deck .abtn:active .cap, .deck .abtn[aria-pressed="true"]:not(.tog) .cap { transform: translateY(3px) scale(.96); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--ink); }
.deck .abtn:hover { color: #fff; }
.deck .abtn:disabled { opacity: .35; cursor: default; }
.deck .abtn.off .cap { filter: grayscale(1) brightness(.6); text-decoration: line-through; }
.deck .sep { width: 2px; align-self: stretch; background: rgba(0, 0, 0, .35); border-radius: 2px; margin: 4px 4px 20px; }

.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.side .card { padding: 0 0 16px; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, var(--surface2), var(--surface)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 5px 0 var(--ink); }
.side .card > *:not(h2) { margin-left: 18px; margin-right: 18px; }
.side h2 { margin: 0 0 12px; padding: 10px 18px 9px; font-size: 19px; color: #fff; text-shadow: var(--ot-sm); display: flex; align-items: center; gap: 10px; letter-spacing: .02em;
  background: linear-gradient(180deg, var(--hc, #5b48d6), color-mix(in srgb, var(--hc, #5b48d6) 65%, #000)); border-bottom: 2px solid var(--ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25); }
.side .c-rules { --hc: #5b48d6; } .side .c-keys { --hc: #1d8fd1; } .side .c-score { --hc: #e08a00; } .side .c-badge { --hc: #c2268f; }
.side .rules-txt { color: #e4e0ff; font-size: 14px; line-height: 1.6; margin: 0; font-weight: 600; }
.side .rules-txt.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.side .link { background: none; border: 0; color: var(--yellow); cursor: pointer; padding: 8px 0 0; font-weight: 900; font-size: 13px; }
.keys { display: grid; gap: 9px; padding: 0; list-style: none; }
.keys li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 800; }
.keys kbd { display: inline-block; min-width: 28px; text-align: center; padding: 3px 7px 4px; border-radius: 8px; color: #fff; font: 900 12px/1.3 var(--body); margin-left: 4px;
  background: linear-gradient(180deg, #4a3cb8, #2e2385); border: 2px solid var(--ink); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .3), 0 2.5px 0 var(--ink); }
.now-playing { display: flex; align-items: center; gap: 10px; margin: 12px 18px 0 !important; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 2px solid var(--ink); font-size: 13px; font-weight: 700; color: var(--muted); }
.now-playing b { color: #fff; font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .02em; }
.np-eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.np-eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--violet); animation: eq .9s ease-in-out infinite; }
.np-eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; } .np-eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.score-big { font-family: var(--display); font-size: 46px; line-height: 1; color: var(--yellow); text-shadow: var(--ot-drop); margin: 6px 0 8px; display: flex; align-items: center; gap: 10px; }
.score-big::before { content: '🏆'; font-size: 30px; text-shadow: none; filter: drop-shadow(0 3px 0 var(--ink)); }
.score-sub { color: var(--muted); font-size: 13px; font-weight: 700; }
.mini-ach { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.mini-ach span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; background: radial-gradient(circle at 35% 30%, #4a3f86, #231a5e); border: 2px solid var(--ink); filter: grayscale(1) brightness(.6); }
.mini-ach span.got { filter: none; background: radial-gradient(circle at 35% 30%, #fff8c4, #ffcf33 45%, #c98a00); box-shadow: 0 2px 0 var(--ink); }

.status { display: flex; justify-content: center; margin: 0 auto 18px; position: relative; z-index: 2; }
.status:empty { display: none; }
.status > span, .status { font-weight: 800; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 99px; background: linear-gradient(180deg, #2a2070, #1a1250); border: 2px solid var(--ink); font-size: 15px; font-weight: 900; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 3px 0 var(--ink); max-width: 100%; text-align: center; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 16px; user-select: none; -webkit-user-select: none; position: relative; z-index: 1; }
.row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.panel { background: rgba(0, 0, 0, .3); border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 10px 16px; }
.muted { color: var(--muted); }
.big { font-family: var(--display); font-size: 32px; font-weight: 400; text-shadow: var(--ot-sm); }
.more { max-width: 1320px; margin: 0 auto 60px; padding: 0 clamp(14px, 3vw, 30px); }
.more h2 { font-size: 28px; margin: 0 0 18px; color: #fff; text-shadow: var(--ot-drop); }
.more .grid { padding: 0; margin: 0; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.more .gcard p { display: none; }

/* ---------- SEO text blocks (static, generated by tools/seo.mjs): readable for people too ---------- */
.seo-about, .seo-dir { max-width: 1320px; margin: 0 auto 56px; padding: 0 clamp(14px, 3vw, 30px); color: #d9d4ff; line-height: 1.6; font-weight: 600; }
.seo-about { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.seo-col { background: rgba(255, 255, 255, .04); border: 2px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 20px 24px; }
.seo-about h2, .seo-dir h2 { font-size: 22px; margin: 0 0 8px; color: #fff; }
.seo-about h2 + p { margin-top: 0; }
.seo-about p { margin: 0 0 18px; }
.seo-facts { margin: 0; padding-left: 18px; }
.seo-links { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.seo-about a, .seo-dir a { color: #8ff3ff; text-decoration: none; }
.seo-about a:hover, .seo-dir a:hover { text-decoration: underline; }
.seo-dir { border-top: 2px solid rgba(255, 255, 255, .08); padding-top: 36px; }
.seo-dir h1 { font-size: clamp(26px, 3.2vw, 38px); margin: 0 0 10px; color: #fff; text-shadow: var(--ot-drop); }
.seo-intro { max-width: 900px; margin: 0 0 26px; }
.seo-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.seo-cat { background: rgba(255, 255, 255, .04); border: 2px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 14px 18px; }
.seo-cat h3 { margin: 0 0 6px; font-size: 19px; }
.seo-cat ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 14px; font-size: 14px; }
.seo-cat li { break-inside: avoid; padding: 2px 0; }
@media (max-width: 760px) { .seo-about { grid-template-columns: 1fr; } }
body.shot .seo-about, body.shot .seo-dir, body.shot footer.site { display: none; }

/* footer links + site information pages (About / Contact / Privacy / Terms) */
footer.site { position: relative; z-index: 3; background: rgba(9, 6, 32, .94); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: #c9c2ff; text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }
.legal { max-width: 820px; margin: 36px auto 70px; padding: 28px clamp(18px, 4vw, 44px); background: rgba(255, 255, 255, .04); border: 2px solid rgba(255, 255, 255, .08); border-radius: 22px; color: #ddd8ff; line-height: 1.7; font-weight: 600; }
.legal h1 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 8px; color: #fff; text-shadow: var(--ot-drop); }
.legal h2 { font-size: 22px; margin: 28px 0 6px; color: #fff; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal a { color: #8ff3ff; }
.legal-date { color: var(--muted); font-size: 14px; }
.legal .todo { color: #ffb4b4; }
.legal.notfound { text-align: center; }
.legal.notfound h1 { font-size: 96px; }

/* touch pads for arcade games */
.tpad { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; touch-action: manipulation; }
.tpad .btn, .dpad .btn { min-width: 58px; height: 54px; font-size: 20px; border-radius: 16px; }
.dpad { display: grid; grid-template-columns: repeat(3, 58px); gap: 8px; touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .tpad.auto, .dpad.auto { display: none; } }

/* ---------- result overlay: rays + ribbon + stars ---------- */
.overlay { position: fixed; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(40, 24, 110, .75), rgba(5, 3, 18, .88)); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 60; animation: fade .25s; padding: 16px; overflow: hidden; }
.overlay .rays { position: absolute; left: 50%; top: 42%; width: 1100px; height: 1100px; translate: -50% -50%; pointer-events: none; opacity: .35;
  background: repeating-conic-gradient(from 0deg, rgba(255, 216, 74, .55) 0 9deg, transparent 9deg 22deg); -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 70%); mask-image: radial-gradient(closest-side, #000 20%, transparent 70%); animation: spin 18s linear infinite; }
.overlay.lose .rays { background: repeating-conic-gradient(from 0deg, rgba(140, 120, 220, .35) 0 9deg, transparent 9deg 22deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay .box { position: relative; background: linear-gradient(180deg, #3a2d93, #241a66 45%, #1a1250); border-width: 3px; border-radius: 28px; padding: 74px 30px 28px; text-align: center; width: min(440px, 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .18), 0 8px 0 var(--ink), 0 40px 80px -20px rgba(0, 0, 0, .8); animation: popin .55s var(--spring); }
.overlay .badge { position: absolute; left: 50%; top: -58px; translate: -50% 0; width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; font-size: 54px;
  background: radial-gradient(circle at 35% 30%, #fff8c4, #ffcf33 45%, #c98a00); border: 3px solid var(--ink); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .2), 0 5px 0 var(--ink), 0 0 40px rgba(255, 216, 74, .6); animation: badgein .7s var(--spring) .15s both; }
.overlay .badge.lose { background: radial-gradient(circle at 35% 30%, #b9b2e6, #6e64b0 45%, #3a3170); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .2), 0 5px 0 var(--ink); }
@keyframes badgein { from { transform: scale(0) rotate(-40deg); } }
.overlay .ribbon { position: relative; margin: 0 -46px 18px; padding: 12px 20px 14px; background: linear-gradient(180deg, #ff7ae0, #d61ea6); border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 5px 0 var(--ink); border-radius: 10px; z-index: 1; animation: ribbonin .5s var(--spring) .25s both; }
.overlay.lose .ribbon { background: linear-gradient(180deg, #8a7fd0, #4e4499); }
.overlay .ribbon::before, .overlay .ribbon::after { content: ''; position: absolute; top: 14px; width: 30px; height: 100%; z-index: -1; background: color-mix(in srgb, #d61ea6 70%, #000); border: 3px solid var(--ink); }
.overlay.lose .ribbon::before, .overlay.lose .ribbon::after { background: #3a3170; }
.overlay .ribbon::before { left: -22px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.overlay .ribbon::after { right: -22px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
@keyframes ribbonin { from { transform: scaleX(.2); opacity: 0; } }
.overlay h2 { margin: 0; font-size: clamp(24px, 5vw, 32px); line-height: 1.1; color: #fff; text-shadow: var(--ot), 0 4px 0 var(--ink); }
.overlay .rating { display: flex; justify-content: center; gap: 6px; margin: -4px 0 12px; }
.overlay .rating i { font-style: normal; font-size: 44px; filter: drop-shadow(0 3px 0 var(--ink)); animation: starpop .5s var(--spring) both; }
.overlay .rating i:nth-child(2) { font-size: 56px; margin-top: -10px; animation-delay: .55s; }
.overlay .rating i:nth-child(1) { animation-delay: .4s; } .overlay .rating i:nth-child(3) { animation-delay: .7s; }
.overlay .rating i.dim { filter: grayscale(1) brightness(.45) drop-shadow(0 3px 0 var(--ink)); }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.overlay p { color: #e4e0ff; margin: 0 0 24px; font-weight: 800; font-size: 16px; }
.overlay .row .btn { min-width: 140px; }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
/* Roulette */
.rl-wheel { margin: 0 auto 8px; display: block; }
.rl-top { gap: 12px; align-items: center; margin-bottom: 8px; }
.rl-cred { display: flex; flex-direction: column; align-items: center; background: linear-gradient(180deg, #3a2d93, #241a66); border: 2px solid #120a33; border-radius: 14px; padding: 4px 14px; box-shadow: 0 3px 0 #120a33; }
.rl-cred b { font-family: 'Lilita One', sans-serif; font-size: 22px; color: #ffd84a; text-shadow: 0 2px 0 #120a33; }
.rl-cred small { color: #c9c6ff; font-weight: 800; }
.rl-hist { display: flex; gap: 4px; flex-wrap: wrap; max-width: 340px; }
.rl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 12px 'Lilita One', sans-serif; color: #fff; border: 2px solid #120a33; }
.rl-dot.red { background: #e8264a; } .rl-dot.black { background: #221d38; } .rl-dot.green { background: #14a058; }
.rl-dot.last { width: 32px; height: 32px; font-size: 15px; box-shadow: 0 0 0 2px #ffd84a; }
.rl-chips { display: flex; gap: 8px; justify-content: center; margin: 4px 0 10px; }
.rl-chip-btn { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #120a33; cursor: pointer; font: 15px 'Lilita One', sans-serif; text-shadow: 0 1px 0 rgba(0,0,0,.45);
  background: radial-gradient(circle, var(--c1) 46%, var(--c2) 47% 55%, var(--c1) 56%), var(--c1); background: repeating-conic-gradient(var(--c1) 0 30deg, var(--c2) 30deg 45deg); box-shadow: inset 0 0 0 7px rgba(0,0,0,.0), 0 4px 0 #120a33; position: relative; transition: transform .12s; }
.rl-chip-btn::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--c1); border: 2px dashed var(--c2); z-index: -0; }
.rl-chip-btn { isolation: isolate; } .rl-chip-btn::before { z-index: -1; }
.rl-chip-btn.on { transform: translateY(-5px) scale(1.08); box-shadow: 0 0 0 3px #fff, 0 6px 0 #120a33; }
.rl-scroll { max-width: 100%; overflow-x: auto; padding: 4px; }
.rl-table { display: grid; gap: 3px; padding: 8px; background: radial-gradient(circle at 50% 30%, #1d8a4c, #0f5a2f); border: 3px solid #120a33; border-radius: 16px; box-shadow: inset 0 0 0 3px rgba(255, 216, 74, .35), 0 6px 0 #120a33; width: max-content; margin: 0 auto; }
.rl-table.locked { filter: saturate(.8) brightness(.9); pointer-events: none; }
.rl-cell { position: relative; border: 2px solid rgba(255, 255, 255, .55); border-radius: 6px; color: #fff; font: inherit; font-family: 'Lilita One', sans-serif; cursor: pointer; padding: 0; text-shadow: 0 1px 0 #120a33; transition: transform .1s, box-shadow .1s; background: transparent; }
.rl-cell.red { background: linear-gradient(180deg, #ff4d6d, #c81c3d); } .rl-cell.black { background: linear-gradient(180deg, #3a3354, #1a1630); } .rl-cell.green { background: linear-gradient(180deg, #2ec27e, #11804a); }
.rl-cell.out { background: rgba(255, 255, 255, .06); font-size: .85em; }
.rl-cell.redd .rl-lbl { color: #ff4d6d; font-size: 1.6em; } .rl-cell.blackd .rl-lbl { color: #120a33; font-size: 1.6em; text-shadow: 0 0 2px #fff; }
.rl-cell:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #ffd84a; z-index: 2; }
.rl-cell.hit { box-shadow: 0 0 0 3px #fff, 0 0 18px 4px #ffd84a; animation: rlHit .5s ease-in-out 4 alternate; z-index: 3; }
@keyframes rlHit { to { transform: scale(1.18); } }
.rl-chip { position: absolute; right: -6px; top: -7px; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 11px; display: grid; place-items: center; font: 11px 'Lilita One', sans-serif; font-style: normal;
  background: repeating-conic-gradient(var(--c1) 0 30deg, var(--c2) 30deg 45deg); border: 2px solid #120a33; box-shadow: 0 2px 0 #120a33; text-shadow: 0 1px 0 rgba(0,0,0,.5); z-index: 4; animation: rlChip .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
@keyframes rlChip { from { transform: translateY(-14px) scale(.4); opacity: 0; } }
.rl-actions { gap: 8px; margin-top: 10px; }
.rl-help { font-size: 13px; text-align: center; margin: 6px 0 0; }
/* "choose your kid" row (Ludo / Snakes & Ladders vs computer) */
.kid-pick { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.kid-pick-t { font-weight: 900; color: #e4e0ff; margin-right: 4px; }
.kid-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px 6px; border-radius: 14px; border: 2px solid var(--ink, #120a33);
  background: linear-gradient(180deg, #3a2d93, #241a66); color: #e4e0ff; cursor: pointer; font: inherit; box-shadow: 0 3px 0 var(--ink, #120a33); transition: transform .12s; }
.kid-opt small { font-weight: 800; font-size: 12px; }
.kid-opt:hover { transform: translateY(-2px); }
.kid-opt.on { background: linear-gradient(180deg, #ffe666, #ffaa12); color: #120a33; box-shadow: 0 0 0 3px #fff, 0 3px 0 var(--ink, #120a33); }
/* fullscreen is for playing: the picker (a pre-game setting) steps aside so board + die + players fit the screen */
.screen:fullscreen .kid-pick { display: none; }
/* fullscreen scales the whole board down instead of scrolling it sideways */
.screen:fullscreen .mines-wrap { max-width: none !important; overflow: visible !important; }
/* phones: one compact row */
@media (max-width: 560px) {
  .kid-pick { gap: 5px; flex-wrap: nowrap; }
  .kid-pick-t { display: none; }
  .kid-opt { padding: 3px 4px 4px; border-radius: 12px; }
  .kid-opt canvas { width: 40px !important; height: 46px !important; }
  .kid-opt small { font-size: 10px; white-space: nowrap; }
}
canvas.juice-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 69; }
body.shot canvas.juice-fx, body.shot .kid-pick, body.shot .rl-help { display: none !important; }
/* trailer recording (?shot=1&trailer=1): keep the Snake-style effects visible */
body.shot.trailer canvas.juice-fx { display: block !important; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { position: relative; overflow: hidden; display: flex; gap: 12px; align-items: center; padding: 12px 18px 12px 12px; border-radius: 20px; background: linear-gradient(180deg, #3a2d93, #241a66); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 5px 0 var(--ink), 0 20px 40px -10px #000; animation: toastin .6s var(--spring); max-width: 340px; }
.toast::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); animation: shine 1s ease .5s; }
.toast.out { animation: toastout .4s forwards; }
.toast .ti { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-size: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8c4, #ffcf33 45%, #c98a00); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); animation: badgein .6s var(--spring) .2s both; }
.toast small { display: block; font-weight: 900; font-size: 11px; color: var(--yellow); letter-spacing: .1em; margin-bottom: 2px; }
.toast b { font-family: var(--display); font-weight: 400; font-size: 20px; text-shadow: var(--ot-sm); }
@keyframes toastin { from { opacity: 0; transform: translateY(30px) scale(.8); } }
@keyframes toastout { to { opacity: 0; transform: translateY(10px) scale(.95); } }

@keyframes fade { from { opacity: 0 } }
@keyframes popin { from { opacity: 0; transform: translateY(30px) scale(.85); } }
@keyframes pop { 50% { transform: scale(1.15) } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 216, 74, .9); } 60% { box-shadow: 0 0 0 7px rgba(255, 216, 74, 0); } }
@keyframes shake { 25% { transform: translateX(-5px) } 75% { transform: translateX(5px) } }
.shake { animation: shake .25s; }

/* ---------- generic grid boards (engine styles) ---------- */
.gb { display: grid; gap: 3px; background: rgba(0, 0, 0, .35); padding: 4px; border-radius: 12px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line2); }
.gb > div { background: var(--surface2); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 5px; font-weight: 800; transition: background .15s; }

/* m,n,k */
.mnk .c { font-size: calc(var(--cs) * .58); width: var(--cs); height: var(--cs); font-family: var(--display); }
.mnk.xo { gap: 6px; padding: 8px; background: rgba(0, 0, 0, .3); }
.mnk.xo .c { background: linear-gradient(180deg, #241c5c, #1a1446); border-radius: 10px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.mnk.xo .c:hover { background: #2d2470; }
.mnk .c.x { color: var(--magenta); text-shadow: 0 0 18px rgba(255, 62, 200, .7); } .mnk .c.o { color: var(--cyan); text-shadow: 0 0 18px rgba(45, 226, 255, .7); }
.mnk.xo .c.win { background: linear-gradient(180deg, #3d4f1f, #2d3c16); }
.mnk.stone { background: linear-gradient(135deg, #e3b673, #c8914a); gap: 0; padding: 6px; border-radius: 10px; box-shadow: 0 18px 36px -12px rgba(0, 0, 0, .7), inset 0 0 0 3px #a87434; }
.mnk.stone .c { background: none; border-radius: 0; position: relative; }
.mnk.stone .c::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid rgba(90, 55, 15, .55); }
.mnk.stone .c::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid rgba(90, 55, 15, .55); }
.mnk.stone .c i { width: 84%; height: 84%; border-radius: 50%; z-index: 1; }
.mnk.stone .c.x i { background: radial-gradient(circle at 32% 30%, #6b6b6b, #0c0c0c 60%); box-shadow: 0 3px 4px rgba(0, 0, 0, .5); }
.mnk.stone .c.o i { background: radial-gradient(circle at 32% 30%, #fff, #d9d4c8 70%); box-shadow: 0 3px 4px rgba(0, 0, 0, .4); }
.mnk.stone .c.win i { box-shadow: 0 0 0 3px var(--bad), 0 0 14px var(--bad); }
.mnk.grav { background: linear-gradient(180deg, #2f6bff, #1d4ed8); padding: 10px; gap: 8px; border-radius: 18px; box-shadow: 0 20px 40px -14px rgba(29, 78, 216, .8), inset 0 -6px 0 rgba(0, 0, 0, .2); }
.mnk.grav .c { background: #0b1638; border-radius: 50%; box-shadow: inset 0 4px 6px rgba(0, 0, 0, .6); }
.mnk.grav .c i { width: 84%; height: 84%; border-radius: 50%; }
.mnk.grav .c.x i { background: radial-gradient(circle at 35% 30%, #ff8f8f, #e11d48 65%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.mnk.grav .c.o i { background: radial-gradient(circle at 35% 30%, #fff3a6, #f5b70a 65%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.mnk.grav .c.win i { box-shadow: 0 0 0 4px #fff, 0 0 18px #fff; }
.mnk .c.last { outline: 2px solid var(--acc); outline-offset: -2px; }

/* dice */
.die { width: 56px; height: 56px; background: linear-gradient(145deg, #ffffff, #e9e6f2); border-radius: 13px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 8px; gap: 2px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 8px 16px -6px rgba(0, 0, 0, .55); }
.die i { border-radius: 50%; }
.die i.p { background: radial-gradient(circle at 35% 35%, #4a4a6a, #12121f); }
.die.held { box-shadow: 0 0 0 4px var(--acc), 0 10px 20px -6px rgba(255, 225, 77, .6); transform: translateY(-5px); }
.die.roll { animation: roll .35s var(--ease); }
@keyframes roll { 40% { transform: rotate(-18deg) scale(1.12); } }
.die.sm { width: 36px; height: 36px; padding: 5px; border-radius: 9px; }

/* playing cards */
.pc { width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .11); background: linear-gradient(160deg, #ffffff, #f4f1e8); color: #1c1c2e; position: relative; box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 4px 10px -3px rgba(0, 0, 0, .45); font-family: Georgia, "Times New Roman", serif; font-weight: 700; flex: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pc:not(.slot):not(.dim):hover { transform: translateY(-2px); }
.pc { color: #2a2160; background: linear-gradient(165deg, #ffffff 0%, #fbf7ee 60%, #f1eadb 100%); }
.pc.red { color: #e3203f; }
.pc:not(.back):not(.slot)::before { content: ''; position: absolute; inset: 3.5%; border-radius: calc(var(--cw) * .08); border: 1.5px solid currentColor; opacity: .13; pointer-events: none; }
.pc .cr { position: absolute; left: 6%; top: 4%; display: flex; flex-direction: column; align-items: center; width: calc(var(--cw) * .24); font-family: var(--display); font-weight: 400; font-size: calc(var(--cw) * .25); line-height: .9; letter-spacing: -.06em; z-index: 1; }
.pc .cr svg { width: calc(var(--cw) * .16); height: calc(var(--cw) * .16); margin-top: 1px; }
.pc .cr.cb { left: auto; top: auto; right: 6%; bottom: 4%; transform: rotate(180deg); }
.pc .cr svg path, .pc .cm:not(.court) svg path { fill: currentColor; }
.pc .cm { position: absolute; inset: 30% 22%; display: flex; align-items: center; justify-content: center; }
.pc .cm svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 calc(var(--cw) * .025) 0 rgba(18, 10, 51, .2)); }
.pc .cm.ace { inset: 24% 14%; }
.pc .cm.ace::before { content: ''; position: absolute; width: 96%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff6c8 0 55%, #ffd84a 56% 62%, transparent 63%); }
.pc .cm.ace svg { position: relative; width: 74%; }
.pc .cm.court { inset: 16% 21% 13%; }
.pc .cm.court svg { filter: none; }
.pc.back { background:
    radial-gradient(circle at 50% 50%, #ffd84a 0 15%, #120a33 15.5% 18%, transparent 18.5%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .13) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .13) 0 2px, transparent 2px 8px),
    radial-gradient(ellipse at 30% 20%, #9a4cf0, #5b1db8 55%, #3a0f80);
  border: calc(var(--cw) * .05) solid #fdf8ec; }
.pc.back::after { content: '★'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--cw) * .22); color: #120a33; line-height: 1; }
.pc.slot { background: rgba(255, 255, 255, .05); border: 2px dashed rgba(255, 255, 255, .22); box-shadow: none; color: rgba(255, 255, 255, .3); display: flex; align-items: center; justify-content: center; font-size: calc(var(--cw) * .35); }
.pc.sel { box-shadow: 0 0 0 3px var(--acc), 0 8px 18px -4px rgba(255, 225, 77, .6); transform: translateY(-4px); }
.pc.dim { filter: brightness(.78) saturate(.75); cursor: default; }
/* card-table effects layer (solitaire) */
.cfx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: visible; }
.cfx-canvas { position: absolute; pointer-events: none; }
.cfx-pop { bottom: auto; }
.cfx-pop.big { font-size: clamp(22px, 3.4vw, 40px); }
.pc.hint { animation: hintGlow 1.5s ease-in-out infinite; }
@keyframes hintGlow { 50% { box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px #7dff8a, 0 0 18px 4px rgba(125, 255, 138, .55); } }
@media (prefers-reduced-motion: reduce) { .pc.hint { animation: none; } }
.pc.hint { box-shadow: 0 0 0 3px var(--ok), 0 6px 14px -4px rgba(61, 255, 162, .6); }
.felt { position: relative; border-radius: 18px; padding: 18px; width: 100%; max-width: 1000px;
  background: radial-gradient(ellipse at 50% 0%, #2a9a63, #156b42 55%, #0d4a2d);
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .12), inset 0 0 60px rgba(0, 0, 0, .35), 0 20px 40px -16px rgba(0, 0, 0, .7); }
.felt::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .35; background-image: repeating-radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px); }
.tab { display: grid; gap: 8px; }
.pile { position: relative; min-height: calc(var(--cw) * 1.4); }
.pile .pc { position: absolute; left: 0; }

/* tokens */
.tok { width: 70%; height: 70%; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, .55), inset 0 -3px 0 rgba(0, 0, 0, .2); }
.can { animation: pulse 1.1s infinite; cursor: pointer; }

/* forms */
input.txt { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .3); color: var(--text); font-size: 18px; font-weight: 700; outline: none; transition: border-color .2s; }
input.txt:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.kbd { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 580px; }
.kbd button { width: 40px; height: 46px; border-radius: 8px; border: 1px solid var(--line2); background: linear-gradient(180deg, #2a2266, #1a1446); color: var(--text); font-weight: 800; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3); transition: transform .1s; }
.kbd button:active { transform: translateY(2px); }
.kbd button:disabled { opacity: .3; }
.kbd button.ok { background: linear-gradient(180deg, #4ade80, #16a34a); opacity: 1; } .kbd button.bad { background: linear-gradient(180deg, #fb7185, #e11d48); }
canvas.game { background: #07051a; border-radius: 10px; border: 1px solid rgba(45, 226, 255, .3); max-width: 100%; touch-action: none; box-shadow: 0 0 30px -10px rgba(45, 226, 255, .5), 0 20px 40px -14px rgba(0, 0, 0, .7); }
table.score { border-collapse: collapse; min-width: 300px; font-size: 15px; border-radius: 16px; overflow: hidden; }
table.score td, table.score th { padding: 8px 16px; border-bottom: 1px solid var(--line); text-align: left; }
table.score td:last-child, table.score th:last-child { text-align: right; min-width: 60px; }
table.score tr.pickable { cursor: pointer; } table.score tr.pickable:hover { background: rgba(255, 225, 77, .1); }
table.score td.pv { color: var(--acc); font-weight: 800; }

/* engine element polish (overrides) */
canvas.game { background: #0b0726; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 0 0 2px rgba(255, 255, 255, .06), 0 6px 0 var(--ink), 0 0 40px -12px rgba(45, 226, 255, .5); }
.gb { border-radius: 14px; box-shadow: 0 5px 0 var(--ink), inset 0 0 0 2px var(--ink); }
input.txt { border: 2px solid var(--ink); border-radius: 14px; background: #0e0832; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .4); }
input.txt:focus { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .4), 0 0 0 3px var(--cyan); }
.kbd button { border: 2px solid var(--ink); border-radius: 10px; background: linear-gradient(180deg, #4a3cb8, #2e2385); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 3px 0 var(--ink); font-weight: 900; }
.kbd button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- board skins: physical, chunky boards to match the game UI ---------- */
.board { border: 3px solid var(--ink) !important; border-radius: 14px !important; margin: 14px 14px 32px !important; }
.board.wood { box-shadow: 0 0 0 9px #b8743a, 0 0 0 10px #8a5426, 0 0 0 13px var(--ink), 0 19px 0 var(--ink), 0 28px 36px rgba(0, 0, 0, .55) !important; }
.board.baize { box-shadow: 0 0 0 9px #9a5e2a, 0 0 0 13px var(--ink), 0 19px 0 var(--ink), 0 28px 36px rgba(0, 0, 0, .55) !important; }
.board.stone { box-shadow: 0 0 0 9px #8d94a8, 0 0 0 10px #6c7389, 0 0 0 13px var(--ink), 0 19px 0 var(--ink), 0 28px 36px rgba(0, 0, 0, .55) !important; }
.board.paper { box-shadow: 0 0 0 7px #e9d6a8, 0 0 0 10px var(--ink), 0 16px 0 var(--ink), 0 24px 32px rgba(0, 0, 0, .5) !important; }
.board.ocean { box-shadow: 0 0 0 8px #e9d6a8, 0 0 0 11px var(--ink), 0 17px 0 var(--ink), 0 26px 34px rgba(0, 0, 0, .5) !important; }
.board.night { background: linear-gradient(180deg, #2c2178, #1c1452); box-shadow: 0 0 0 8px #3a2d93, 0 0 0 11px var(--ink), 0 17px 0 var(--ink), 0 26px 34px rgba(0, 0, 0, .5) !important; }
svg.board { margin: 18px 18px 34px !important; }
/* raised tiles that "press in" once opened */
.tiles > div { border: 2px solid var(--ink); border-radius: 7px !important; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(0, 0, 0, .22); font-family: var(--display); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); transition: transform .08s; }
.tiles > div:not(.open):active { transform: translateY(2px); }
.tiles > div.open { box-shadow: inset 0 3px 5px rgba(0, 0, 0, .22); }

/* card tables: green felt inside a wooden rim */
.felt { border: 3px solid var(--ink); border-radius: 22px; padding: 26px;
  background: radial-gradient(ellipse at 50% 0%, #3cc77a, #1f9455 55%, #136a3c);
  box-shadow: inset 0 0 0 9px #a8682f, inset 0 0 0 11px #7a4620, inset 0 0 0 13px var(--ink), inset 0 0 60px rgba(0, 0, 0, .35), 0 7px 0 var(--ink), 0 16px 30px rgba(0, 0, 0, .5); }
.felt::before { inset: 13px; border-radius: 10px; }
/* playing cards, dice and tokens get the ink outline */
.pc { box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink), 0 7px 12px -3px rgba(0, 0, 0, .45); }
.pc.slot { box-shadow: none; border-color: rgba(255, 255, 255, .35); }
.pc.sel { box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--yellow), 0 8px 18px -4px rgba(255, 216, 74, .6); }
.pc.hint { box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--green), 0 6px 14px -4px rgba(61, 255, 162, .6); }
.die { border: 2.5px solid var(--ink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14), 0 4px 0 var(--ink), 0 9px 14px -6px rgba(0, 0, 0, .55); }
.die.held { box-shadow: 0 0 0 4px var(--yellow), 0 4px 0 var(--ink), 0 10px 20px -6px rgba(255, 216, 74, .6); }
.tok { box-shadow: 0 0 0 2px var(--ink), 0 3px 0 2px var(--ink), inset 0 -3px 0 rgba(0, 0, 0, .2); }

/* tic-tac-toe & friends: chunky tiles with outlined marks */
.mnk.xo { gap: 8px; padding: 10px; background: linear-gradient(180deg, #2c2178, #1c1452); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 0 0 7px #3a2d93, 0 0 0 10px var(--ink), 0 16px 0 var(--ink), 0 24px 32px rgba(0, 0, 0, .5); margin: 12px 12px 30px; }
.mnk.xo .c { background: linear-gradient(180deg, #5446c9, #3a2d9a); border: 2px solid var(--ink); border-radius: 14px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .25), 0 4px 0 var(--ink); font-family: var(--display); }
.mnk.xo .c:hover { background: linear-gradient(180deg, #6a5ae0, #4535b0); }
.mnk.xo .c.x, .mnk.xo .c.o { box-shadow: inset 0 3px 6px rgba(0, 0, 0, .3); }
.mnk.xo .c.x { color: #ff6bd5; text-shadow: var(--ot), 0 4px 0 var(--ink), 0 0 20px rgba(255, 62, 200, .6); }
.mnk.xo .c.o { color: #4ae2ff; text-shadow: var(--ot), 0 4px 0 var(--ink), 0 0 20px rgba(45, 226, 255, .6); }
.mnk.xo .c.win { background: linear-gradient(180deg, #ffe666, #ffaa12); }
.mnk.stone { border: 3px solid var(--ink); box-shadow: 0 0 0 9px #b8743a, 0 0 0 10px #8a5426, 0 0 0 13px var(--ink), 0 19px 0 var(--ink), 0 28px 36px rgba(0, 0, 0, .55); margin: 14px 14px 32px; }
.mnk.stone .c.x i, .mnk.stone .c.o i { border: 2px solid var(--ink); }
.mnk.grav { border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), inset 0 -6px 0 rgba(0, 0, 0, .2), 0 8px 0 var(--ink), 0 18px 30px rgba(29, 78, 216, .6); }
.mnk.grav .c { border: 2px solid var(--ink); }
.mnk.grav .c i { border: 2px solid var(--ink); }

/* thumbnail capture mode */
body.shot .topbar, body.shot .play-head, body.shot .side, body.shot .marquee, body.shot .deck, body.shot .more, body.shot .status, body.shot .overlay, body.shot canvas.confetti, body.shot .toasts, body.shot .tpad, body.shot .dpad { display: none !important; }
body.shot::before, body.shot .screen::after { display: none; }
body.shot { animation: none; }
body.shot .stage { width: 100%; }
body.shot .play-wrap { margin: 0; padding: 0; max-width: none; display: block; }
body.shot .cabinet { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
body.shot .screen { min-height: 100vh; border-radius: 0; border: 0; box-shadow: none; display: flex; align-items: safe center; justify-content: safe center; padding: 20px;
  background: radial-gradient(70% 80% at 50% 40%, #2c2178, #0b0726 75%); }
/* branded backdrop for thumbnails & trailers, in the site's neon-arcade look and the game's category colours:
   a neon glow behind the game, star specks, and a synthwave grid floor */
body.shot[data-cat] .screen { position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 84% 12%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 92% 46%, rgba(255,255,255,.8) 50%, transparent 52%), radial-gradient(1.5px 1.5px at 6% 52%, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(2px 2px at 30% 8%, rgba(255,255,255,.7) 50%, transparent 52%), radial-gradient(1.5px 1.5px at 70% 30%, rgba(255,255,255,.6) 50%, transparent 52%),
    radial-gradient(48% 55% at 50% 44%, color-mix(in srgb, var(--g1) 55%, transparent), transparent 72%),
    radial-gradient(70% 45% at 50% 100%, color-mix(in srgb, var(--g1) 45%, transparent), transparent 75%),
    radial-gradient(60% 60% at 0% 0%, color-mix(in srgb, var(--g2) 75%, transparent), transparent 70%),
    radial-gradient(60% 60% at 100% 0%, color-mix(in srgb, var(--magenta) 30%, transparent), transparent 70%),
    linear-gradient(170deg, color-mix(in srgb, var(--g2) 60%, #1a0f4a) 0%, #160c44 50%, #0b0726 100%); }
body.shot[data-cat] .screen::before { content: ''; position: absolute; left: -30%; right: -30%; bottom: 0; height: 58%; z-index: -1; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--g1) 75%, transparent) 2px, transparent 2px), linear-gradient(90deg, color-mix(in srgb, var(--g1) 75%, transparent) 2px, transparent 2px);
  background-size: 64px 42px; transform: perspective(380px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(transparent, #000 55%); mask-image: linear-gradient(transparent, #000 55%); opacity: .6; }
/* a thin neon horizon line across the top, like the site header glow */
body.shot[data-cat] .screen::after { content: ''; display: block !important; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 0; background: linear-gradient(90deg, transparent, var(--g1), var(--magenta), var(--cyan), transparent); box-shadow: 0 0 18px var(--g1); opacity: .8; }
body.shot[data-cat] .stage { position: relative; z-index: 1; }
/* the game sits on a soft neon pool of light */
body.shot[data-cat] .stage > :is(canvas, .gb, .board, .felt, .grid, div):first-of-type { filter: drop-shadow(0 18px 30px rgba(0,0,0,.55)) drop-shadow(0 0 26px color-mix(in srgb, var(--g1) 45%, transparent)); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .play-wrap { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .art { max-width: 420px; width: 100%; margin: 0 auto; }
  .cab { width: min(260px, 70%); }
  .sun, .sun-glow { left: 50%; }
  .sun { opacity: .45; }
  .featured { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .nav { display: none; }
}
@media (max-width: 600px) {
  :root { --cw: 44px; }
  .topbar { gap: 8px; }
  .logo { font-size: 19px; }
  .logo .mark { width: 32px; height: 32px; }
  /* "OLDSCHOOLGAMES" is long: keep the ID/EN switch on screen on small phones */
  .topbar .logo { font-size: clamp(13px, 4.4vw, 19px); gap: 7px; min-width: 0; }
  .topbar .logo span:last-child { overflow: hidden; text-overflow: clip; }
  .hero { padding-top: 30px; gap: 26px; }
}
@media (max-width: 340px) {
  .topbar .logo span:last-child { display: none; }
  .hero .stats { gap: 8px; }
  .hero .stats div { min-width: 70px; padding: 8px 10px 6px; }
  .hero .stats b { font-size: 20px; }
  .art .chip-float { font-size: 11px; padding: 6px 9px; }
  .featured { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 12px; }
  .feat { padding: 12px; }
  .feat:first-child { padding: 18px; }
  .feat h3 { font-size: 18px; }
  .feat:first-child h3 { font-size: 28px; }
  .feat:first-child p { font-size: 13px; }
  .medal { width: 32px; height: 32px; font-size: 15px; }
  .toolbar { top: 58px; }
  .search-wrap { max-width: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .result-count { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .gcard { padding: 5px; border-radius: 16px; }
  .gcard .thumb { border-radius: 11px; }
  .gcard .ico { width: 30px; height: 30px; font-size: 16px; left: 6px; bottom: 6px; border-radius: 9px; }
  .gcard .body { padding: 8px 5px 4px; }
  .gcard h3 { font-size: 16px; }
  .gcard p { font-size: 12px; }
  .gcard .players { display: none; }
  .tagpill { font-size: 10px; padding: 2px 7px; }
  .badges { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ach { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; }
  .ach > div { width: 100%; }
  .play-head .titlebox { flex-basis: 100%; }
  .play-head .gicon { width: 48px; height: 48px; font-size: 25px; }
  .cabinet { border-radius: 20px; padding: 8px 4px 10px; }
  .marquee { padding: 10px; }
  .screen { border-radius: 14px; min-height: 0; }
  .deck { gap: 2px; padding: 10px 2px 6px; }
  .deck .abtn { min-width: 54px; padding: 2px; font-size: 11px; }
  .deck .abtn .cap { width: 42px; height: 42px; font-size: 16px; }
  .deck .sep { display: none; }
  .big { font-size: 24px; }
  .status-pill { font-size: 13px; padding: 7px 14px; }
  .die { width: 46px; height: 46px; padding: 6px; }
  .tpad { gap: 6px; }
  .tpad .btn { min-width: 48px; padding: 0 6px; }
  .overlay .ribbon { margin: 0 -30px 16px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grid-plane { transform: rotateX(72deg); }
  @view-transition { navigation: none; }
}

/* =========================================================
   Netflix-style home navigation (arcade look kept)
   billboard · sideways rows with arrows · cards that grow on hover · info window · search
   ========================================================= */
.nf-home .topbar.nf-top { position: fixed; left: 0; right: 0; top: 0; background: linear-gradient(180deg, rgba(7, 5, 26, .85), rgba(7, 5, 26, 0)); border-bottom-color: transparent; box-shadow: none; backdrop-filter: none; transition: background .35s, border-color .35s, box-shadow .35s; }
.nf-home .topbar.nf-top.solid { background: linear-gradient(180deg, rgba(28, 18, 80, .96), rgba(16, 10, 50, .94)); border-bottom-color: var(--ink); box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .8); }
.nf-home .nav { margin-left: 10px; }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 -2px 0 var(--yellow); }
.nf-search { display: flex; align-items: center; gap: 0; border-radius: 14px; transition: background .25s; }
.nf-search .search { width: 0; padding: 0; border-width: 0; opacity: 0; transition: width .3s var(--ease), padding .3s, opacity .2s; min-width: 0; }
.nf-search.open { background: rgba(7, 5, 26, .75); box-shadow: 0 0 0 2px var(--ink); }
.nf-search.open .search { width: min(260px, 40vw); padding: 9px 12px; opacity: 1; border: 0; background: transparent; box-shadow: none; }

/* billboard */
.nf-bill { position: relative; isolation: isolate; min-height: min(86vh, 760px); display: flex; align-items: flex-end; padding: 120px clamp(18px, 5vw, 64px) clamp(150px, 16vw, 210px); overflow: hidden; }
.nf-bill-bg { position: absolute; inset: 0; z-index: -2; background: radial-gradient(70% 80% at 60% 40%, #2c2178, #0b0726 75%); }
.nf-bill-bg img { position: absolute; right: 0; top: 0; width: 78%; height: 100%; object-fit: cover; object-position: center 35%; animation: billIn 1.2s var(--ease) both; }
.nf-bill-bg img.out { animation: billOut .9s ease forwards; }
@keyframes billIn { from { opacity: 0; } }
@keyframes billOut { to { opacity: 0; } }
@keyframes billZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.nf-bill-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 18%, rgba(11, 7, 38, .88) 34%, rgba(11, 7, 38, .25) 62%, rgba(11, 7, 38, .05)), linear-gradient(0deg, var(--bg) 16%, rgba(11, 7, 38, .75) 34%, transparent 58%),
    radial-gradient(60% 70% at 0% 100%, color-mix(in srgb, var(--g1, var(--magenta)) 28%, transparent), transparent 70%); }
.nf-bill-in { max-width: 560px; animation: billText .7s var(--ease) both; }
@keyframes billText { from { opacity: 0; transform: translateY(14px); } }
.nf-eyebrow { display: inline-block; font-family: var(--pixel); font-size: 11px; letter-spacing: .08em; color: var(--yellow); text-shadow: var(--glow-yellow); margin-bottom: 14px; }
.nf-bill-title { margin: 0 0 12px; font-size: clamp(42px, 6.4vw, 86px); line-height: .95; color: #fff; text-shadow: var(--ot), 0 6px 0 var(--ink), 0 0 40px var(--g1, var(--magenta)); }
.nf-bill-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.nf-bill-meta .nf-ico { font-size: 22px; filter: drop-shadow(0 2px 0 var(--ink)); }
.nf-players { color: var(--muted); font-weight: 800; font-size: 13px; }
.nf-bill-desc { margin: 0 0 22px; font-size: clamp(15px, 1.3vw, 18px); color: #e4e0ff; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.nf-bill-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nf-bill-dots { position: absolute; right: clamp(18px, 5vw, 64px); bottom: clamp(160px, 17vw, 220px); display: flex; gap: 8px; }
.nf-bill-dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: rgba(255, 255, 255, .35); cursor: pointer; transition: all .3s var(--spring); }
.nf-bill-dots button.on { width: 30px; border-radius: 8px; background: var(--yellow); box-shadow: var(--glow-yellow); }

/* round buttons (play / my list / info) */
.nf-round { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); background: rgba(18, 10, 51, .7); color: #fff; font-size: 18px; font-weight: 900; cursor: pointer; line-height: 1; transition: transform .15s var(--spring), background .2s, border-color .2s; }
.nf-round:hover { transform: scale(1.1); border-color: #fff; background: rgba(60, 45, 150, .9); }
.nf-round.on { border-color: var(--green); color: var(--green); }
.nf-round.play { background: linear-gradient(180deg, #ffe666, #ffaa12); border-color: var(--ink); color: #fff; text-shadow: var(--ot-sm); box-shadow: 0 3px 0 var(--ink); font-size: 16px; padding-left: 3px; }
.nf-round.big { width: 54px; height: 54px; font-size: 24px; }

/* rows */
.nf-rows { position: relative; z-index: 2; margin-top: clamp(-160px, -12vw, -110px); padding-bottom: 20px; }
.nf-row { position: relative; margin-bottom: clamp(18px, 2.6vw, 34px); }
.nf-row:hover, .nf-row:focus-within { z-index: 5; }
.nf-row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 clamp(18px, 5vw, 64px); margin-bottom: 4px; }
.nf-row-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: clamp(19px, 2vw, 26px); color: #fff; text-shadow: var(--ot-sm), 0 3px 0 var(--ink); }
.nf-row-ico { font-size: .9em; filter: drop-shadow(0 2px 0 var(--ink)); }
.nf-more { border: 0; background: none; color: var(--cyan); font: 800 14px var(--body); cursor: pointer; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; text-shadow: none; padding: 4px 6px; }
.nf-row:hover .nf-more, .nf-more:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .nf-more { opacity: 1; transform: none; } }
.nf-dashes { display: flex; flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 45%; gap: 3px; padding-bottom: 6px; }
.nf-dashes i { width: 14px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.nf-dashes i.on { background: var(--yellow); }
.nf-row:not(:hover) .nf-dashes { opacity: 0; } .nf-dashes { transition: opacity .3s; }
@media (hover: none) { .nf-dashes { display: none; } }
.nf-rail { position: relative; display: flow-root; } /* flow-root: the track's negative margins must not leak out */
/* the track has room above / below so a growing card isn't clipped (overflow-x forces overflow-y) */
.nf-track { --cw: clamp(210px, 21vw, 300px); display: flex; gap: clamp(8px, .8vw, 12px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding: 0 clamp(18px, 5vw, 64px);
  padding: 34px clamp(18px, 5vw, 64px) 120px; margin: -30px 0 -116px; scrollbar-width: none; overscroll-behavior-x: contain; }
.nf-track::-webkit-scrollbar { display: none; }
.nf-arrow { position: absolute; top: 4px; bottom: 4px; z-index: 6; width: clamp(18px, 4.6vw, 58px); border: 0; cursor: pointer; color: #fff; font-size: clamp(30px, 3.5vw, 52px); font-family: var(--display); line-height: 1;
  background: rgba(7, 5, 26, .55); opacity: 0; transition: opacity .25s, background .2s, font-size .2s; text-shadow: var(--ot-sm); }
.nf-arrow.prev { left: 0; border-radius: 0 12px 12px 0; } .nf-arrow.next { right: 0; border-radius: 12px 0 0 12px; }
.nf-rail:hover .nf-arrow, .nf-arrow:focus-visible { opacity: 1; }
.nf-arrow:hover { background: rgba(7, 5, 26, .8); font-size: clamp(36px, 4.2vw, 62px); }
.nf-arrow[hidden] { display: none; }
@media (hover: none) { .nf-arrow { display: none; } }

/* cards */
.nf-card { position: relative; flex: none; width: var(--cw); scroll-snap-align: start; border-radius: 12px; transition: transform .3s var(--ease) .12s, box-shadow .3s .12s; z-index: 1; }
.nf-thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 2px solid var(--ink); background: linear-gradient(140deg, var(--g1), var(--g2)); box-shadow: 0 4px 0 var(--ink); }
.nf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 5, 26, .85), transparent 45%); pointer-events: none; }
.nf-name { position: absolute; left: 10px; right: 10px; bottom: 7px; z-index: 1; font-family: var(--display); font-size: clamp(15px, 1.3vw, 19px); line-height: 1.05; color: #fff; text-shadow: var(--ot-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-new { position: absolute; right: 7px; top: 7px; z-index: 1; font-family: var(--display); font-size: 12px; padding: 2px 9px; border-radius: 8px; color: #fff; text-shadow: var(--ot-sm); background: linear-gradient(180deg, #ff6b8a, #e8264a); border: 2px solid var(--ink); }
.nf-best { position: absolute; left: 8px; top: 7px; z-index: 1; font-family: var(--display); font-size: 13px; padding: 2px 8px; border-radius: 8px; color: var(--yellow); text-shadow: var(--ot-sm); background: rgba(7, 5, 26, .75); border: 2px solid var(--ink); }
.nf-pop { position: absolute; left: 0; right: 0; top: calc(100% - 12px); padding: 16px 12px 12px; border-radius: 0 0 12px 12px; background: linear-gradient(180deg, #2c2178, #1a1250); border: 2px solid var(--ink); border-top: 0;
  box-shadow: 0 12px 26px -8px rgba(0, 0, 0, .8); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s .12s, transform .25s .12s, visibility 0s .4s; }
.nf-pop b { display: block; font-family: var(--display); font-weight: 400; font-size: 16px; line-height: 1.1; margin: 8px 0 6px; text-shadow: var(--ot-sm); }
.nf-pop-btns { display: flex; gap: 6px; align-items: center; }
.nf-pop-btns .spacer { flex: 1; }
.nf-pop-btns .nf-round { width: 34px; height: 34px; font-size: 15px; }
.nf-pop-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nf-pop-meta .tagpill { font-size: 10px; padding: 2px 8px; }
.nf-pop-meta .diff span { font-size: 11px; }
@media (hover: hover) and (pointer: fine) {
  .nf-card:hover, .nf-card:focus-within { transform: scale(1.32); z-index: 10; }
  .nf-card:hover .nf-thumb, .nf-card:focus-within .nf-thumb { border-radius: 12px 12px 0 0; box-shadow: 0 0 0 2px var(--ink), 0 0 26px -2px var(--g1); }
  .nf-card:hover .nf-name, .nf-card:focus-within .nf-name { opacity: 0; }
  .nf-card:hover .nf-pop, .nf-card:focus-within .nf-pop { opacity: 1; visibility: visible; transform: none; transition-delay: .12s, .12s, 0s; }
  .nf-card:hover .nf-rank, .nf-card:focus-within .nf-rank { opacity: 0; }
}
/* top 10: huge outlined rank numbers behind each card */
.nf-row.top10 .nf-track { --cw: clamp(150px, 13vw, 200px); gap: clamp(70px, 7.4vw, 112px); padding-left: calc(clamp(18px, 5vw, 64px) + clamp(70px, 7.4vw, 112px)); }
.nf-card.ranked .nf-thumb { aspect-ratio: 3 / 4; }
.nf-card.ranked .nf-thumb img { object-position: center; }
.nf-rank { position: absolute; right: calc(100% - 22px); bottom: -12px; z-index: -1; font-family: var(--display); font-size: clamp(120px, 11.5vw, 180px); line-height: .8; letter-spacing: -.06em;
  color: var(--bg); -webkit-text-stroke: 4px var(--yellow); paint-order: stroke; text-shadow: 0 0 22px rgba(255, 216, 74, .35); transition: opacity .2s; pointer-events: none; }

/* search results / see all */
.nf-results { padding: 100px clamp(18px, 5vw, 64px) 10px; }
.nf-res-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.nf-res-head h2 { margin: 0; font-size: clamp(26px, 3.2vw, 38px); text-shadow: var(--ot-drop); }
.nf-results .chips { margin-bottom: 10px; }
.nf-results .result-count { display: block; margin-bottom: 14px; }
.nf-results .grid { padding: 0; max-width: none; }
.nf-home #badges { padding: 0 clamp(18px, 5vw, 64px); max-width: none; }

/* info window */
.nf-modal { position: fixed; inset: 0; z-index: 75; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 4vh 12px; background: rgba(5, 3, 18, .86); animation: fade .2s; }
.nf-modal[hidden] { display: none; }
.nf-lock { overflow: hidden; }
.nf-modal-box { position: relative; width: min(860px, 100%); border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #241a66, #150f45); border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink), 0 40px 90px -20px #000; animation: popin .4s var(--spring); }
.nf-m-hero { position: relative; width: 100%; height: min(52vh, 480px); overflow: hidden; }
.nf-m-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-m-shade { position: absolute; inset: 0; background: linear-gradient(0deg, #241a66 4%, rgba(36, 26, 102, .55) 30%, transparent 60%); }
.nf-m-hero-in { position: absolute; left: clamp(16px, 4vw, 40px); right: 16px; bottom: clamp(14px, 3vw, 30px); }
.nf-m-hero-in h2 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 56px); line-height: 1; text-shadow: var(--ot), 0 5px 0 var(--ink), 0 0 30px var(--g1); }
.nf-x { position: absolute; right: 14px; top: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: rgba(18, 10, 51, .85); color: #fff; font-size: 18px; cursor: pointer; }
.nf-x:hover { background: var(--red); }
.nf-m-body { padding: 8px clamp(16px, 4vw, 40px) 30px; }
.nf-m-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.nf-m-desc { font-size: 17px; margin: 4px 0 14px; color: #fff; }
.nf-m-rules h3 { margin: 0 0 6px; font-size: 18px; text-shadow: var(--ot-sm); }
.nf-m-rules p { margin: 0; color: #e4e0ff; }
.nf-m-side p { margin: 0 0 8px; color: var(--dim); font-size: 14px; }
.nf-m-side b { color: #fff; }
.nf-m-sim-t { margin: 26px 0 12px; font-size: 22px; text-shadow: var(--ot-sm); }
.nf-m-sim { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.nf-m-simcard { display: block; border-radius: 14px; overflow: hidden; background: #2c2178; border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform .2s var(--spring); }
.nf-m-simcard:hover { transform: translateY(-3px); }
.nf-m-simcard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.nf-m-simcard b { display: block; padding: 8px 10px 0; font-family: var(--display); font-weight: 400; font-size: 16px; text-shadow: var(--ot-sm); }
.nf-m-simcard small { display: block; padding: 2px 10px 10px; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .nf-home .nav { display: none; }
  .nf-bill-bg img { width: 100%; }
  .nf-bill-shade { background: linear-gradient(0deg, var(--bg) 6%, rgba(11, 7, 38, .75) 45%, rgba(11, 7, 38, .2) 75%), linear-gradient(90deg, rgba(11, 7, 38, .6), transparent); }
  .nf-m-cols { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 560px) {
  .nf-bill { min-height: 78vh; padding-bottom: 130px; }
  .nf-bill-dots { bottom: 140px; }
  .nf-track { --cw: 44vw; }
  .nf-row.top10 .nf-track { --cw: 34vw; gap: 64px; padding-left: calc(18px + 64px); }
  .nf-rank { font-size: 110px; -webkit-text-stroke-width: 3px; }
  .nf-search.open .search { width: 46vw; }
  .nf-home .topbar .logo span:last-child { display: none; }
  .nf-dashes { display: none; } /* page dashes made the whole page wider than a narrow screen */
}
@media (prefers-reduced-motion: reduce) { .nf-bill-bg img { animation: none; } }

/* trailers: silent gameplay clips fading in over the picture (cards, billboard, info window) */
.nf-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.nf-vid.on { opacity: 1; }
.nf-thumb .nf-vid { z-index: 0; }
.nf-card:hover .nf-thumb::after { opacity: .35; transition: opacity .3s; }
.nf-bill-bg .nf-vid { left: auto; right: 0; width: 78%; object-position: center 35%; }
.nf-m-pic { position: absolute; inset: 0; }
.nf-m-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .nf-bill-bg .nf-vid { width: 100%; } }
