/* ZBZGames™ Arcade · Copyright © ZyeemZia */
:root {
  --bg: #f3f4fd; --bg2: #e7eafb; --panel: rgba(255, 255, 255, .82); --solid: #ffffff; --line: rgba(60, 70, 140, .13); --line2: rgba(60, 70, 140, .26);
  --ink: #12163a; --ink2: #3e4672; --ink3: #474e72; --gold: #674709; --cyan: #055468; --violet: #6d28d9; --pink: #d6337a;
  --barbg: rgba(243, 244, 253, .78); --stage: #ffffff; --overlay: rgba(243, 244, 253, .88); --tagbg: rgba(255, 255, 255, .9); --glow1: rgba(124, 58, 237, .16); --glow2: rgba(14, 165, 233, .13);
  --tile: #eef0fc; --tile2: #dfe3f8; --shadow: 0 18px 44px -22px rgba(40, 48, 120, .45);
  --g-bg: #fbfbff; --g-bg2: #e9ecfb; --g-ink: #12163a; --g-ink2: #4b5380; --g-line: rgba(60, 70, 140, .12);
  --ok: #16a34a; --bad: #e11d48;
  color-scheme: light;
  --grad: linear-gradient(120deg, #7c3aed, #0ea5e9 55%, #c08a1e);
  --h: 250;
  /* Filled buttons carry dark text, so their gradient stays pastel in both themes. */
  --grad-btn: linear-gradient(120deg, #c4b5fd, #7ee7ff 55%, #ecc97a);
  --ln-shade: 30%;
}
/* Dark follows the device, unless the visitor picked a theme with the toggle. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #05060f; --bg2: #0b0e24; --panel: rgba(22, 26, 56, .72); --solid: #12163a; --line: rgba(150, 160, 255, .15); --line2: rgba(150, 160, 255, .3);
  --ink: #eef1ff; --ink2: #b6bde3; --ink3: #9aa2cb; --gold: #e2b95c; --cyan: #56e0ff; --violet: #a78bfa; --pink: #ff5ea8;
  --barbg: rgba(5, 6, 15, .7); --stage: #060818; --overlay: rgba(5, 6, 15, .8); --tagbg: rgba(5, 6, 15, .72); --glow1: rgba(124, 58, 237, .28); --glow2: rgba(86, 224, 255, .13);
  --tile: #171b40; --tile2: #20265a; --shadow: 0 22px 50px -24px rgba(0, 0, 0, .9);
  --g-bg: #070a1c; --g-bg2: #0d1130; --g-ink: #ffffff; --g-ink2: #aab2d8; --g-line: rgba(120, 140, 255, .1);
  --ok: #3ddc84; --bad: #ff5470;
  color-scheme: dark;
  --grad: linear-gradient(120deg, #a78bfa, #56e0ff 55%, #e2b95c);
  --ln-shade: 0%;
} }
:root[data-theme="dark"] {
  --bg: #05060f; --bg2: #0b0e24; --panel: rgba(22, 26, 56, .72); --solid: #12163a; --line: rgba(150, 160, 255, .15); --line2: rgba(150, 160, 255, .3);
  --ink: #eef1ff; --ink2: #b6bde3; --ink3: #9aa2cb; --gold: #e2b95c; --cyan: #56e0ff; --violet: #a78bfa; --pink: #ff5ea8;
  --barbg: rgba(5, 6, 15, .7); --stage: #060818; --overlay: rgba(5, 6, 15, .8); --tagbg: rgba(5, 6, 15, .72); --glow1: rgba(124, 58, 237, .28); --glow2: rgba(86, 224, 255, .13);
  --tile: #171b40; --tile2: #20265a; --shadow: 0 22px 50px -24px rgba(0, 0, 0, .9);
  --g-bg: #070a1c; --g-bg2: #0d1130; --g-ink: #ffffff; --g-ink2: #aab2d8; --g-line: rgba(120, 140, 255, .1);
  --ok: #3ddc84; --bad: #ff5470;
  color-scheme: dark;
  --grad: linear-gradient(120deg, #a78bfa, #56e0ff 55%, #e2b95c);
  --ln-shade: 0%;
}
/* Form controls use the page font; browsers otherwise fall back to Arial. */
button, input, select, textarea { font-family: inherit; }
/* Small print never drops below 12px on screen. */
small { font-size: max(12px, .85em); }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Rajdhani', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); line-height: 1.5;
  background: radial-gradient(1200px 600px at 85% -10%, var(--glow1), transparent 60%), radial-gradient(900px 520px at -10% 18%, var(--glow2), transparent 60%), var(--bg);
  background-attachment: fixed; min-height: 100vh; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
a { color: var(--cyan); }
button { font-family: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; left: -9999px; } .sr:focus { left: 12px; top: 12px; z-index: 99; background: #000; color: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); background: var(--barbg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.bar .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: .03em; min-width: 0; }
.logo img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 18px rgba(86, 224, 255, .35); flex: none; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.bar nav a { color: var(--ink2); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 10px; text-transform: uppercase; font-size: .9rem; letter-spacing: .05em; white-space: nowrap; transition: background .15s, color .15s; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); background: rgba(150, 160, 255, .13); }
.bar .zz-btn { color: var(--ink); }
@media (max-width: 640px) { .bar nav a.hide-sm { display: none; } .bar .zz-btn { width: 40px; height: 40px; padding: 0; justify-content: center; } .bar .zz-btn span { display: none; } .logo span { font-size: 1.1rem; } }

/* buttons */
.go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: linear-gradient(135deg, #f0cc74, #c8922f); color: #1a1205; font: 700 1.2rem 'Rajdhani', sans-serif; letter-spacing: .06em; padding: 12px 34px; border-radius: 999px; cursor: pointer; text-decoration: none; box-shadow: 0 12px 30px -10px rgba(226, 185, 92, .75), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .15s, box-shadow .15s, filter .15s; }
.go:hover { transform: translateY(-2px); filter: brightness(1.06); }
.go:active { transform: translateY(0) scale(.97); }
.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 1.05rem 'Rajdhani', sans-serif; letter-spacing: .05em; padding: 11px 22px; border-radius: 999px; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, border-color .15s; }
.ghost:hover { transform: translateY(-2px); border-color: var(--cyan); }
.ghost:active { transform: scale(.97); }

/* hero */
.hero { padding: 40px 0 0; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 34px; align-items: center; }
.hero .eyebrow { display: inline-block; color: var(--cyan); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .82rem; border: 1px solid var(--line2); background: var(--panel); padding: 5px 14px; border-radius: 999px; }
.hero h1 { font-size: clamp(2.3rem, 6.2vw, 4.2rem); line-height: 1.02; margin: 16px 0 12px; letter-spacing: .01em; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--ink2); font-size: 1.15rem; max-width: 560px; margin: 0; font-weight: 500; }
.hero-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 9px 16px; min-width: 104px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.stats b { display: block; font-size: 1.55rem; color: var(--gold); line-height: 1.1; }
.stats span { color: var(--ink3); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.pick { min-width: 0; }
.pick-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--ink3); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; }
.pick-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.pick .game .art { aspect-ratio: 16 / 9; } .pick .game .ico { font-size: 4.6rem; }
.pick .game h3 { font-size: 1.6rem; } .pick .game p { font-size: 1.02rem; }
.marquee { margin-top: 30px; overflow: hidden; border-block: 1px solid var(--line); background: var(--panel); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee div { display: flex; gap: 26px; width: max-content; padding: 9px 0; animation: mq 60s linear infinite; }
.marquee span { white-space: nowrap; font-weight: 700; color: var(--ink2); letter-spacing: .04em; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (max-width: 860px) { .hero { padding-top: 26px; } .hero .wrap { grid-template-columns: 1fr; gap: 22px; } .hero-copy { text-align: center; } .hero p { margin: 0 auto; } .hero-go, .stats { justify-content: center; } }

/* shelves and filters */
.shelf { margin-top: 26px; }
.shelf h2, .section-h h2 { margin: 0 0 10px; font-size: 1.35rem; letter-spacing: .02em; }
.row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.row .game { flex: none; width: 150px; scroll-snap-align: start; }
.row .game p, .row .game .cat, .row .game .playpill { display: none; }
.row .game .art { aspect-ratio: 16 / 11; } .row .game .ico { font-size: 2.3rem; } .row .game h3 { font-size: 1rem; } .row .game .body { padding: 8px 10px 10px; }
.tools { position: sticky; top: calc(61px + env(safe-area-inset-top)); z-index: 10; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; margin: 22px -16px 16px; padding: 10px 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: var(--barbg); border-block: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); font: 700 .95rem 'Rajdhani', sans-serif; padding: 7px 14px; border-radius: 999px; cursor: pointer; letter-spacing: .04em; transition: transform .12s, border-color .12s; }
.chip small { font-size: max(12px, .78rem); opacity: .85; margin-left: 4px; }
.chip:hover { border-color: var(--cyan); }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--grad-btn); color: #0a0b1a; border-color: transparent; box-shadow: 0 8px 20px -10px var(--violet); }
.search { flex: 1 1 220px; max-width: 320px; background: var(--panel); border: 1px solid var(--line2); color: var(--ink); font: 600 1rem 'Rajdhani', sans-serif; padding: 9px 16px; border-radius: 999px; min-width: 0; }
.search:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 25%, transparent); }

/* game cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; padding-bottom: 30px; }
.game { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.2, .8, .3, 1), border-color .2s, box-shadow .2s; }
.game:hover, .game:focus-visible { transform: translateY(-5px); border-color: hsl(var(--h) 85% 62% / .7); box-shadow: 0 24px 50px -22px hsl(var(--h) 90% 55% / .7); outline: none; }
.game:active { transform: translateY(-1px) scale(.985); }
.game .art { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 12% 0%, hsl(calc(var(--h) + 45) 95% 66% / .95), transparent 55%), radial-gradient(90% 90% at 100% 100%, hsl(calc(var(--h) - 35) 90% 38% / .9), transparent 60%), linear-gradient(135deg, hsl(var(--h) 82% 50%), hsl(calc(var(--h) + 18) 78% 24%)); }
.game .art::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .3) 1px, transparent 1.5px); background-size: 14px 14px; -webkit-mask-image: linear-gradient(135deg, transparent 35%, #000); mask-image: linear-gradient(135deg, transparent 35%, #000); opacity: .55; }
.game .art::after { content: ''; position: absolute; width: 44%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .42), rgba(255, 255, 255, .1) 60%); border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45); transition: transform .3s; }
.game .ico { position: relative; z-index: 1; font-size: 3.1rem; line-height: 1; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .4)); transition: transform .3s cubic-bezier(.2, 1.6, .4, 1); }
.game:hover .ico { transform: scale(1.16) rotate(-6deg); } .game:hover .art::after { transform: scale(1.12); }
.playpill { position: absolute; z-index: 2; right: 10px; bottom: 10px; font-style: normal; font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: #12163a; background: #fff; padding: 4px 12px; border-radius: 999px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); }
.game:hover .playpill, .game:focus-visible .playpill { opacity: 1; transform: none; }
.game .body { padding: 12px 14px 15px; }
.game .cat { display: block; color: var(--ink3); font-size: max(12px, .75rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.game h3 { margin: 1px 0 0; font-size: 1.25rem; letter-spacing: .02em; line-height: 1.2; }
.game p { margin: 4px 0 0; color: var(--ink2); font-size: .95rem; font-weight: 500; line-height: 1.35; }
.game .kids { position: absolute; z-index: 2; top: 10px; left: 10px; font-style: normal; font-size: max(12px, .75rem); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #ffd23f; color: #2a1a00; padding: 2px 9px; border-radius: 999px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); }
.game .best { position: absolute; z-index: 2; top: 10px; right: 10px; font-size: max(12px, .78rem); font-weight: 700; color: #ffe08a; background: rgba(10, 12, 30, .72); padding: 2px 9px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .game { border-radius: 18px; } .game .ico { font-size: 2.5rem; } .game h3 { font-size: 1.06rem; } .game p { font-size: .84rem; } .game .body { padding: 9px 10px 11px; } .game .cat { font-size: max(12px, .75rem); letter-spacing: .08em; } .stats div { min-width: 0; flex: 1 1 28%; padding: 8px; } .playpill { display: none; }
  .pick .game { flex-direction: row; align-items: stretch; } .pick .game .art { flex: none; width: 38%; aspect-ratio: auto; } .pick .game .ico { font-size: 3rem; } .pick .game h3 { font-size: 1.2rem; } .pick .game p { font-size: .9rem; } }
.empty { text-align: center; color: var(--ink3); padding: 30px 0; font-weight: 600; }
.kids-band { margin: 10px 0 30px; padding: 22px; border-radius: 26px; background: linear-gradient(135deg, rgba(255, 210, 63, .16), rgba(255, 94, 168, .13)); border: 1px solid rgba(255, 210, 63, .34); }
.kids-band h2 { margin: 0 0 4px; } .kids-band > p { margin: 0 0 16px; color: var(--ink2); font-weight: 500; }
.kids-band .grid { padding-bottom: 0; }
@media (max-width: 560px) { .kids-band { padding: 16px 12px; border-radius: 20px; } }

.foot { border-top: 1px solid var(--line); color: var(--ink3); padding: 26px 0 40px; font-size: .95rem; text-align: center; }
.foot a { color: var(--ink2); margin: 0 8px; display: inline-block; }

/* ---------- the game page ---------- */
.play-main { display: flex; flex-direction: column; }
.hud { display: flex; align-items: center; gap: 8px; padding: 10px 16px; max-width: 1000px; width: 100%; margin: 0 auto; }
.hud h1 { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; margin: 0; flex: 1; min-width: 0; }
.hud h1 i { font-style: normal; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; font-size: 1.2rem; background: linear-gradient(135deg, hsl(var(--h) 82% 52%), hsl(calc(var(--h) + 30) 78% 30%)); box-shadow: 0 8px 18px -8px hsl(var(--h) 90% 50%); }
.hud h1 span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .num { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px 12px; text-align: center; min-width: 62px; }
.hud .num small { display: block; color: var(--ink3); font-size: max(12px, .75rem); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; line-height: 1.2; }
.hud .num b { display: block; font-size: 1.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hud .num.best b { color: var(--gold); }
.hud .num b.bump { animation: bump .28s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes bump { 40% { transform: scale(1.35); color: var(--cyan); } }
.hbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); cursor: pointer; flex: none; display: grid; place-items: center; padding: 0; transition: transform .12s, border-color .12s; }
.hbtn:hover { border-color: var(--cyan); } .hbtn:active { transform: scale(.92); }
.hbtn svg, .theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hbtn svg .f { fill: currentColor; stroke: none; }
#arena { position: relative; width: 100%; max-width: 1000px; margin: 0 auto 14px; padding: 0 16px; display: flex; min-height: clamp(250px, calc(100vh - 136px), 720px); min-height: clamp(250px, calc(100dvh - 136px), 720px); }
#arena:fullscreen { max-width: none; margin: 0; padding: 0; background: var(--bg); min-height: 100%; }
#stage { position: relative; flex: 1; min-width: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line2); background: linear-gradient(180deg, var(--g-bg), var(--g-bg2)); touch-action: none; user-select: none; -webkit-user-select: none; outline: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 34px 80px -46px hsl(var(--h) 90% 55% / .8), var(--shadow); }
#arena:fullscreen #stage { border-radius: 0; border: 0; }
#stage:focus-visible { box-shadow: 0 0 0 2px var(--cyan); }
.zbz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zbz-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
#card { position: absolute; inset: 0 16px; z-index: 5; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 22px; border-radius: 22px; background: var(--overlay); backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3); overflow-y: auto; animation: cardIn .25s ease-out; }
@keyframes cardIn { from { opacity: 0; } }
#card > * { animation: rise .35s cubic-bezier(.2, .9, .3, 1) both; }
#card > :nth-child(2) { animation-delay: .04s; } #card > :nth-child(3) { animation-delay: .08s; } #card > :nth-child(4) { animation-delay: .12s; } #card > :nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
#arena:fullscreen #card { inset: 0; border-radius: 0; }
.c-icon { width: 84px; height: 84px; display: grid; place-items: center; font-size: 2.7rem; border-radius: 26px; background: radial-gradient(120% 90% at 12% 0%, hsl(calc(var(--h) + 45) 95% 66%), transparent 60%), linear-gradient(135deg, hsl(var(--h) 82% 50%), hsl(calc(var(--h) + 18) 78% 26%)); box-shadow: 0 18px 40px -14px hsl(var(--h) 90% 50% / .9), inset 0 1px 0 rgba(255, 255, 255, .4); margin-bottom: 6px; }
#card h1, #card h2 { margin: 0; font-size: clamp(1.8rem, 6vw, 2.7rem); line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#card .how { color: var(--ink2); max-width: 440px; margin: 4px 0 6px; font-weight: 500; font-size: 1.08rem; }
#card .big { font-size: 3.6rem; font-weight: 700; margin: 0; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
#card .small { color: var(--ink3); margin: 6px 0 0; font-weight: 700; }
#card .badge { display: inline-block; margin: 0; padding: 3px 14px; border-radius: 999px; background: linear-gradient(135deg, #f0cc74, #c8922f); color: #1a1205; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; }
.ctl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 10px; }
.ctl span { border: 1px solid var(--line2); background: var(--panel); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: .88rem; color: var(--ink2); }
@media (hover: none) and (pointer: coarse) { .ctl .k { display: none; } }
.c-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.more { max-width: 1000px; margin: 0 auto; padding: 4px 16px 30px; width: 100%; }
.more h2 { font-size: 1.2rem; margin: 10px 0; }
.more .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.more .game .ico { font-size: 2.3rem; }
.more .game p, .more .game .playpill { display: none; }

/* ---------- shared pieces for board games ---------- */
.g-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(94%, 460px); padding: 12px 0; }
.g-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; width: 100%; }
.g-chip { border: 1px solid var(--line2); background: var(--panel); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: 1rem; color: var(--ink); white-space: nowrap; }
.g-chip b { color: var(--gold); }
.g-btn { border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 1rem 'Rajdhani', sans-serif; padding: 7px 16px; border-radius: 999px; cursor: pointer; touch-action: manipulation; transition: transform .12s, border-color .12s; }
.g-btn:hover { border-color: var(--cyan); } .g-btn:active { transform: scale(.94); } .g-btn:disabled { opacity: .6; cursor: default; }
.g-msg { margin: 0; min-height: 1.5em; font-size: 1.2rem; font-weight: 700; text-align: center; }
.g-sub { margin: 0; color: var(--ink3); font-weight: 600; text-align: center; }
.kb { outline: 3px solid var(--cyan) !important; outline-offset: 2px; z-index: 2; }
.shake { animation: shake .3s; }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes pop { from { transform: scale(.55); opacity: 0; } 70% { transform: scale(1.08); } }
.qz-time { width: 100%; height: 10px; border-radius: 99px; background: var(--tile2); overflow: hidden; }
.qz-time i { display: block; height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff5470, #ffd23f 45%, #3ddc84); background-size: min(100vw, 520px) 100%; }

/* Square boards keep equal rows whatever is written on a tile. */
.mm-board, .gg-grid, .mt-grid, .st-grid, .hh-grid, .gd-grid, .el-grid, .mn-board { grid-auto-rows: minmax(0, 1fr); }
.mm-t, .gg-c, .mt-c, .st-c, .hh-c, .gd-c, .mn-c { min-width: 0; min-height: 0; line-height: 1; overflow: hidden; }
/* Merge Matrix, Slide Shift */
.mm-board { width: min(92%, 430px, 62vh); aspect-ratio: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px; background: var(--tile); border: 1px solid var(--line); border-radius: 22px; touch-action: none; box-shadow: var(--shadow); }
.mm-t { display: grid; place-items: center; border-radius: 14px; background: var(--tile2); font-weight: 700; font-size: clamp(1.2rem, 6vw, 2.2rem); color: var(--ink); transition: background .12s; }
.mm-t:not([data-v="0"]) { color: #0b0e24; background: linear-gradient(145deg, hsl(var(--hue) 90% 80%), hsl(calc(var(--hue) + 20) 78% 66%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .18), 0 8px 18px -8px hsl(var(--hue) 90% 50% / .8); text-shadow: 0 1px 0 rgba(255, 255, 255, .45); }
.mm-t.new { animation: pop .2s ease-out; } .mm-t.merged { animation: bumpT .22s ease-out; }
@keyframes bumpT { 50% { transform: scale(1.14); } }
.mm-t[data-v="1024"], .mm-t[data-v="2048"], .mm-t[data-v="4096"], .mm-t[data-v="8192"] { font-size: clamp(1rem, 4.6vw, 1.7rem); }
.ss-t { border: 0; cursor: pointer; padding: 0; font-family: inherit; transition: transform .1s; }
.ss-t:active { transform: scale(.94); }
.ss-t[data-v="0"] { background: transparent; box-shadow: none; cursor: default; }
/* Memory Stars */
.ms-board { width: min(94%, 460px, 66vh); display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ms-card { aspect-ratio: 1; border: 0; padding: 0; border-radius: 16px; cursor: pointer; position: relative; perspective: 600px; background: none; touch-action: manipulation; }
.ms-card span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .38s cubic-bezier(.3, 1.3, .5, 1); font-size: clamp(1.6rem, 8vw, 2.6rem); }
.ms-back { background: linear-gradient(135deg, #7c3aed, #2563eb); color: #ffd23f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -12px #4c1d95; }
.ms-face { background: linear-gradient(160deg, #fffdf4, #ffeec2); transform: rotateY(180deg); }
.ms-card.up .ms-back { transform: rotateY(180deg); } .ms-card.up .ms-face { transform: rotateY(0); }
.ms-card.done .ms-face { box-shadow: 0 0 0 3px #3ddc84 inset, 0 0 22px -4px #3ddc84; }
/* Mine Sentinel */
.mn-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(94%, 440px, 62vh); padding: 10px 0; }
.mn-bar { display: flex; justify-content: space-between; width: 100%; align-items: center; font-weight: 700; font-size: 1.1rem; }
.mn-mode { border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 1rem 'Rajdhani', sans-serif; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.mn-mode[aria-pressed="true"] { background: #ff5470; border-color: transparent; color: #fff; }
.mn-board { width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.mn-c { border: 0; border-radius: 7px; background: linear-gradient(145deg, #4b55c9, #2a3180); color: #fff; font: 700 clamp(.9rem, 4vw, 1.3rem) 'Rajdhani', sans-serif; cursor: pointer; padding: 0; -webkit-touch-callout: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(0, 0, 0, .2); touch-action: manipulation; }
.mn-c.open { background: var(--tile); cursor: default; box-shadow: none; color: var(--ink); animation: pop .16s ease-out; }
.mn-c[data-n="1"] { color: #0e9fc4; } .mn-c[data-n="2"] { color: #16a34a; } .mn-c[data-n="3"] { color: #e11d48; } .mn-c[data-n="4"] { color: #7c3aed; } .mn-c[data-n="5"] { color: #ea580c; } .mn-c[data-n="6"] { color: #b45309; }
.mn-tip { margin: 0; color: var(--ink3); font-size: .9rem; font-weight: 600; text-align: center; }
/* Word Forge */
.wf-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(96%, 480px); padding: 10px 0; }
.wf-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: min(100%, 300px, 40vh); }
.wf-c { aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--line2); border-radius: 10px; font-weight: 700; font-size: 1.6rem; text-transform: uppercase; background: var(--panel); }
.wf-c.fill { border-color: var(--ink3); animation: bumpT .12s; }
.wf-c.hit, .wf-c.near, .wf-c.no { animation: flip .4s both; color: #fff; }
.wf-c:nth-child(5n+2) { animation-delay: .08s; } .wf-c:nth-child(5n+3) { animation-delay: .16s; } .wf-c:nth-child(5n+4) { animation-delay: .24s; } .wf-c:nth-child(5n+5) { animation-delay: .32s; }
@keyframes flip { from { transform: rotateX(90deg); } }
.wf-c.hit, .wf-keys .hit { background: #d4a73f; border-color: #d4a73f; color: #1a1205; }
.wf-c.near, .wf-keys .near { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.wf-c.no, .wf-keys .no { background: #6b7190; border-color: #6b7190; color: #fff; }
.wf-msg { min-height: 1.4em; margin: 0; color: var(--ink2); font-weight: 700; text-align: center; }
.wf-keys { width: 100%; display: grid; gap: 6px; }
.wf-keys div { display: flex; gap: 5px; justify-content: center; }
.wf-keys button { flex: 1; max-width: 42px; height: 46px; border: 0; border-radius: 9px; background: var(--tile2); color: var(--ink); font: 700 1.05rem 'Rajdhani', sans-serif; text-transform: uppercase; cursor: pointer; padding: 0; touch-action: manipulation; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.wf-keys button:active { transform: scale(.92); }
.wf-keys button.wide { max-width: 66px; flex: 1.5; font-size: .85rem; }
/* Math Sprint and other four-answer quizzes */
.qz-wrap { width: min(94%, 520px); display: flex; flex-direction: column; gap: 16px; align-items: center; padding: 12px 0; }
.qz-q { font-size: clamp(2.2rem, 10vw, 3.8rem); font-weight: 700; letter-spacing: .02em; text-align: center; line-height: 1.15; animation: pop .22s ease-out; }
.qz-q.seq { font-size: clamp(1.5rem, 7vw, 2.6rem); }
.qz-q em { font-style: normal; color: var(--cyan); }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.qz-o { position: relative; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 clamp(1.5rem, 7vw, 2.1rem) 'Rajdhani', sans-serif; padding: 16px 8px; border-radius: 18px; cursor: pointer; touch-action: manipulation; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08); transition: transform .1s, border-color .1s; }
.qz-o:hover { border-color: var(--cyan); } .qz-o:active { transform: scale(.96); }
.qz-o small { position: absolute; top: 6px; left: 10px; font-size: .8rem; color: var(--ink3); }
.qz-o.ok { background: #22c55e; color: #04210f; border-color: transparent; } .qz-o.no { background: #ff5470; color: #fff; opacity: .75; border-color: transparent; }

/* Echo Lights */
.el-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(92%, 420px, 58vh); padding: 10px 0; }
.el-msg { margin: 0; font-size: 1.4rem; font-weight: 700; min-height: 1.5em; }
.el-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; aspect-ratio: 1; }
.el-pad { position: relative; border: 0; border-radius: 26px; background: color-mix(in srgb, var(--c) 42%, var(--tile)); cursor: pointer; transition: background .1s, transform .1s, box-shadow .1s; touch-action: manipulation; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -6px 0 rgba(0, 0, 0, .18); }
.el-pad.on { background: var(--c); transform: scale(.96); box-shadow: 0 0 46px var(--c), inset 0 2px 0 rgba(255, 255, 255, .5); }
.el-pad small { position: absolute; top: 8px; left: 14px; color: #12163a; background: rgba(255, 255, 255, .8); padding: 0 7px; border-radius: 7px; font-weight: 700; font-size: .95rem; }
/* Grid Duel */
.gd-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(90%, 380px, 56vh); padding: 10px 0; }
.gd-msg { margin: 0; font-size: 1.35rem; font-weight: 700; min-height: 1.5em; }
.gd-sub { margin: 0; color: var(--ink3); font-weight: 600; }
.gd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; aspect-ratio: 1; }
.gd-c { border: 1px solid var(--line2); border-radius: 18px; background: var(--panel); color: var(--ink); font-size: clamp(2rem, 12vw, 3.4rem); font-weight: 700; cursor: pointer; padding: 0; touch-action: manipulation; transition: transform .1s, border-color .1s; }
.gd-c:not(.X):not(.O):hover { border-color: var(--cyan); }
.gd-c.X { color: var(--gold); } .gd-c.O { color: var(--cyan); }
.gd-c.last { animation: pop .22s ease-out; } .gd-c.win { background: color-mix(in srgb, var(--ok) 28%, var(--panel)); border-color: var(--ok); }
/* Mole Patrol */
.mp-wrap { width: min(92%, 440px, 60vh); display: flex; flex-direction: column; gap: 16px; padding: 10px 0; }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mp-hole { aspect-ratio: 1; border: 0; border-radius: 50% / 46%; background: radial-gradient(90% 60% at 50% 100%, #2a1808, transparent 70%), linear-gradient(#7a5127, #3a240f); position: relative; overflow: hidden; cursor: pointer; padding: 0; touch-action: manipulation; box-shadow: inset 0 12px 20px rgba(0, 0, 0, .5), 0 6px 0 #5a9c3a; }
.mp-hole span { position: absolute; left: 0; right: 0; bottom: -70%; font-size: clamp(2.2rem, 12vw, 3.6rem); line-height: 1.2; transition: bottom .16s cubic-bezier(.3, 1.5, .5, 1); }
.mp-hole.up span { bottom: 12%; }
.mp-hole.hit { background: linear-gradient(#f0cc74, #b8862f); }
.mp-hole.hit span { transform: scale(.8) rotate(12deg); }
/* Hue Hunter */
.hh-wrap { width: min(92%, 440px, 62vh); display: flex; flex-direction: column; gap: 14px; padding: 10px 0; }
.hh-grid { display: grid; gap: 6px; aspect-ratio: 1; }
.hh-c { border: 0; border-radius: 12px; cursor: pointer; padding: 0; touch-action: manipulation; animation: pop .22s ease-out; transition: transform .1s; }
.hh-c:active { transform: scale(.93); }
/* Quick Draw */
.qd-pad { position: absolute; inset: 0; border: 0; color: #fff; font-family: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; touch-action: manipulation; transition: background .15s; }
.qd-pad b { font-size: clamp(2rem, 9vw, 3.6rem); text-shadow: 0 4px 18px rgba(0, 0, 0, .3); }
.qd-pad span { font-size: 1.15rem; font-weight: 700; background: rgba(0, 0, 0, .32); padding: 2px 12px; border-radius: 999px; }
.qd-pad.wait { background: radial-gradient(circle at 50% 40%, #ef4444, #7f1d1d); }
.qd-pad.go { background: radial-gradient(circle at 50% 40%, #22c55e, #166534); }
.qd-pad.go b { animation: pop .18s ease-out; }
.qd-pad.early { background: radial-gradient(circle at 50% 40%, #f59e0b, #78350f); }
.qd-pad.done { background: radial-gradient(circle at 50% 40%, #6366f1, #1e1b4b); }
.qd-dots { display: flex; gap: 8px; margin-top: 10px; } .qd-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .3); } .qd-dots i.on { background: #fff; }

/* Glow Grid */
.gg-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: min(100%, 400px, 54vh); aspect-ratio: 1; }
.gg-c { border: 1px solid var(--line2); border-radius: 16px; background: var(--tile2); cursor: pointer; padding: 0; touch-action: manipulation; transition: background .18s, box-shadow .18s, transform .1s; }
.gg-c:active { transform: scale(.92); }
.gg-c.on { background: radial-gradient(circle at 35% 30%, #fff7c2, #ffd23f 55%, #f59e0b); border-color: transparent; box-shadow: 0 0 26px -2px rgba(255, 210, 63, .85), inset 0 1px 0 rgba(255, 255, 255, .7); }
/* Mind Tiles */
.mt-grid { display: grid; gap: 8px; width: min(100%, 400px, 54vh); aspect-ratio: 1; }
.mt-c { border: 1px solid var(--line2); border-radius: 14px; background: var(--tile2); cursor: pointer; padding: 0; touch-action: manipulation; transition: background .2s, transform .1s, box-shadow .2s; }
.mt-c:active { transform: scale(.93); }
.mt-c.show, .mt-c.hit { background: linear-gradient(145deg, #56e0ff, #7c3aed); border-color: transparent; box-shadow: 0 0 24px -4px #56e0ff; }
.mt-c.miss { background: #ff5470; border-color: transparent; animation: shake .3s; }
/* Tint Tubes */
.tt-rack { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; width: 100%; padding: 14px 0 4px; }
.tt-tube { position: relative; width: 50px; height: 176px; border: 3px solid var(--line2); border-top: 0; border-radius: 0 0 26px 26px; background: var(--panel); cursor: pointer; padding: 0; display: flex; flex-direction: column-reverse; overflow: hidden; touch-action: manipulation; transition: transform .16s cubic-bezier(.3, 1.5, .5, 1), border-color .16s; }
.tt-tube small { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font-size: max(12px, .75rem); font-weight: 700; color: var(--ink3); z-index: 1; }
.tt-tube i { display: block; height: 25%; flex: none; background: var(--c); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .28), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.tt-tube i.in { animation: pour .22s ease-out; }
@keyframes pour { from { height: 0; } }
.tt-tube.sel { transform: translateY(-14px); border-color: var(--cyan); }
.tt-tube.full { border-color: var(--ok); }
@media (max-width: 420px) { .tt-tube { width: 42px; height: 152px; } .tt-rack { gap: 14px 8px; } }
/* Sum Trail */
.st-target { font-size: clamp(2rem, 9vw, 3rem); font-weight: 700; line-height: 1; }
.st-target small { display: block; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.st-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; width: min(100%, 400px, 50vh); aspect-ratio: 1; touch-action: none; }
.st-c { border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); color: var(--ink); font: 700 clamp(1.3rem, 6vw, 2rem) 'Rajdhani', sans-serif; cursor: pointer; padding: 0; touch-action: none; transition: transform .1s, background .12s; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08); }
.st-c.sel { background: linear-gradient(145deg, #a78bfa, #7c3aed); color: #fff; border-color: transparent; transform: scale(.93); box-shadow: 0 0 20px -4px #a78bfa; }
.st-c.new { animation: pop .25s ease-out; }
/* Colour Clash */
.cc-rule { margin: 0; font-weight: 700; font-size: 1.1rem; color: var(--ink2); text-align: center; }
.cc-rule b { color: var(--ink); background: var(--tile2); border-radius: 8px; padding: 1px 10px; }
.cc-word { width: 100%; text-align: center; padding: 14px 8px; border-radius: 22px; background: #0b0e24; border: 1px solid var(--line2); font-size: clamp(2.8rem, 15vw, 5rem); font-weight: 700; line-height: 1.1; letter-spacing: .04em; animation: pop .2s ease-out; }
.cc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.cc-o { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 1.3rem 'Rajdhani', sans-serif; padding: 16px 8px; border-radius: 18px; cursor: pointer; touch-action: manipulation; transition: transform .1s; }
.cc-o:active { transform: scale(.95); }
.cc-o i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); flex: none; }
.cc-o small { position: absolute; top: 5px; left: 10px; font-size: max(12px, .78rem); color: var(--ink3); }
/* Word Weave */
.ww-slots, .ww-tiles { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; min-height: 54px; }
.ww-slots span { width: 46px; height: 54px; display: grid; place-items: center; border-bottom: 4px solid var(--line2); font-size: 1.9rem; font-weight: 700; text-transform: uppercase; }
.ww-slots span.f { border-color: var(--cyan); animation: bumpT .14s; }
.ww-tiles button { width: 50px; height: 54px; border: 0; border-radius: 13px; background: linear-gradient(145deg, #f0cc74, #c8922f); color: #1a1205; font: 700 1.7rem 'Rajdhani', sans-serif; text-transform: uppercase; cursor: pointer; padding: 0; touch-action: manipulation; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 5px 0 #8a6218; transition: transform .1s, opacity .15s; }
.ww-tiles button:active { transform: translateY(3px); }
.ww-tiles button.used { opacity: .18; pointer-events: none; }
@media (max-width: 400px) { .ww-slots span { width: 38px; height: 48px; font-size: 1.6rem; } .ww-tiles button { width: 42px; height: 48px; font-size: 1.45rem; } }
/* Count Garden */
.cg-field { width: 100%; min-height: 180px; display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 6px 10px; padding: 18px 14px; border-radius: 24px; background: linear-gradient(160deg, color-mix(in srgb, #3ddc84 26%, transparent), color-mix(in srgb, #56e0ff 22%, transparent)); border: 2px solid color-mix(in srgb, #3ddc84 45%, transparent); font-size: clamp(2rem, 9vw, 2.9rem); line-height: 1.15; }
.cg-field span { animation: pop .3s cubic-bezier(.2, 1.6, .4, 1) both; }
.cg-field span.cnt { transform: scale(1.25); filter: drop-shadow(0 0 8px #ffd23f); transition: transform .15s; }

/* Order Rush */
.or-grid { display: grid; gap: 8px; width: min(100%, 400px, 54vh); aspect-ratio: 1; grid-auto-rows: minmax(0, 1fr); }
.or-c { min-width: 0; min-height: 0; border: 0; border-radius: 16px; color: #0b0e24; font: 700 clamp(1.3rem, 6vw, 2.1rem) 'Rajdhani', sans-serif; line-height: 1; cursor: pointer; padding: 0; touch-action: manipulation; background: linear-gradient(145deg, hsl(var(--hue) 90% 80%), hsl(calc(var(--hue) + 24) 78% 66%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .18); text-shadow: 0 1px 0 rgba(255, 255, 255, .45); animation: pop .25s ease-out both; transition: transform .1s, opacity .2s, filter .2s; }
.or-c:active { transform: scale(.93); }
.or-c.done { opacity: .22; filter: grayscale(1); cursor: default; }
/* Odd One Out, Shadow Safari */
.oo-grid, .sh-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.oo-grid.six { grid-template-columns: repeat(3, 1fr); }
.oo-c { position: relative; aspect-ratio: 1.25; border: 2px solid var(--line2); border-radius: 22px; background: var(--panel); font-size: clamp(2.6rem, 13vw, 4rem); line-height: 1; cursor: pointer; padding: 0; touch-action: manipulation; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08); animation: pop .3s cubic-bezier(.2, 1.6, .4, 1) both; transition: transform .1s, border-color .1s; }
.oo-grid.six .oo-c { font-size: clamp(2rem, 9vw, 3rem); aspect-ratio: 1; }
.oo-c:hover { border-color: var(--cyan); } .oo-c:active { transform: scale(.95); }
.oo-c small { position: absolute; top: 6px; left: 10px; font: 700 .8rem 'Rajdhani', sans-serif; color: var(--ink3); }
.oo-c.ok { background: color-mix(in srgb, #22c55e 30%, var(--panel)); border-color: #22c55e; }
.oo-c.no { opacity: .35; border-color: #ff5470; }
.sh-plate { width: 100%; display: grid; place-items: center; padding: 14px; border-radius: 24px; background: linear-gradient(160deg, #fff7d6, #ffe1a8); border: 2px solid #f0cc74; }
.sh-shape { font-size: clamp(5rem, 26vw, 8rem); line-height: 1.15; transition: filter .45s; animation: pop .3s ease-out; }
.sh-shape.dark { filter: brightness(0); }
.sh-opts .oo-c { aspect-ratio: 1.7; font-size: clamp(2.2rem, 10vw, 3.2rem); }
/* Tide Fill */
.tf-grid { display: grid; width: min(100%, 400px, 48vh); aspect-ratio: 1; grid-auto-rows: minmax(0, 1fr); border-radius: 14px; overflow: hidden; border: 3px solid var(--line2); touch-action: manipulation; cursor: pointer; }
.tf-grid i { display: block; min-width: 0; min-height: 0; transition: background .18s; }
.tf-grid i.in { animation: tfIn .3s ease-out; }
@keyframes tfIn { from { filter: brightness(1.9); } }
.tf-pal { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tf-p { position: relative; width: 50px; height: 50px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .7); background: var(--c); cursor: pointer; padding: 0; touch-action: manipulation; box-shadow: 0 8px 18px -8px var(--c), inset 0 2px 0 rgba(255, 255, 255, .45); transition: transform .12s, opacity .12s; }
.tf-p small { font: 700 .95rem 'Rajdhani', sans-serif; color: #12163a; background: rgba(255, 255, 255, .8); padding: 0 6px; border-radius: 6px; }
.tf-p:active { transform: scale(.9); } .tf-p:disabled { opacity: .45; cursor: default; transform: scale(.82); }
/* Knight Hop */
.kh-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; width: min(100%, 400px, 50vh); aspect-ratio: 1; grid-auto-rows: minmax(0, 1fr); }
.kh-c { position: relative; min-width: 0; min-height: 0; border: 0; border-radius: 12px; background: var(--tile); color: var(--ink); font-size: clamp(1.7rem, 8vw, 2.6rem); line-height: 1; cursor: pointer; padding: 0; touch-action: manipulation; transition: transform .1s; }
.kh-c.alt { background: var(--tile2); }
.kh-c.can::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: var(--cyan); opacity: .75; }
.kh-c.can:active { transform: scale(.93); }
.kh-c.me { color: #fff; background: linear-gradient(145deg, #8b5cf6, #5b21b6); box-shadow: 0 0 22px -4px #a78bfa, inset 0 1px 0 rgba(255, 255, 255, .4); font-size: clamp(2rem, 10vw, 3.1rem); animation: pop .2s ease-out; }
.kh-c.hole { background: repeating-linear-gradient(45deg, rgba(255, 84, 112, .3) 0 6px, transparent 6px 12px); cursor: default; }

@media (max-width: 640px) {
  /* Canvas games have no content height of their own, so the arena must claim the screen. */
  #arena { padding: 0 8px; min-height: calc(100vh - 128px); min-height: calc(100dvh - 128px); }
  #stage { border-radius: 18px; }
  .more .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .more .game .ico { font-size: 1.8rem; } .more .game .art { aspect-ratio: 4 / 3; }
  .more .game h3 { font-size: .9rem; }
  .more .game .cat, .more .game .best, .more .game .kids { display: none; }
  #card { inset: 0 8px; border-radius: 18px; }
  .hud { padding: 8px; gap: 6px; }
  .hud h1 { font-size: 1.1rem; gap: 6px; } .hud h1 i { width: 32px; height: 32px; font-size: 1.05rem; border-radius: 10px; }
  .hud .num { min-width: 50px; padding: 3px 8px; }
  .tools { top: calc(61px + env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } html { scroll-behavior: auto; } .marquee div { animation: none; } .marquee { overflow-x: auto; } }

/* theme toggle */
.theme-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; } :root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .sun { display: none; } :root:not([data-theme="light"]) .theme-btn .moon { display: block; } }

/* Anything the page hides must stay hidden, whatever display a component sets.
   Without this the category filter and search set [hidden] and nothing vanished. */
[hidden] { display: none !important; }
/* Narrow phones: the game name gives way to the score, never the reverse. */
@media (max-width: 380px) { .hud h1 { font-size: 1rem; } .hud h1 i { display: none; } .hud .num { min-width: 46px; } .hud .num small { font-size: max(12px, .75rem); } .hbtn { width: 36px; height: 36px; } }

/* 1971 BAF heritage */
.classic-band { display: grid; gap: 4px; margin: 6px 0 26px; padding: 22px 24px; border-radius: 26px; text-decoration: none; color: var(--ink);
  background: linear-gradient(120deg, rgba(0, 106, 78, .22), rgba(244, 42, 65, .16)), var(--panel); border: 1px solid rgba(0, 106, 78, .45); transition: transform .18s; box-shadow: var(--shadow); }
.classic-band:hover { transform: translateY(-3px); }
.classic-band strong { font-size: 1.9rem; line-height: 1.1; }
.classic-band span { color: var(--ink2); font-weight: 500; }
.classic-band .classic-tag { color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; }
.classic-band em { font-style: normal; font-weight: 700; color: color-mix(in srgb, var(--cyan), var(--ink) 25%); margin-top: 6px; }
.classic { padding-bottom: 30px; }
.classic-hero { padding: 40px 0 10px; }
.classic-hero .eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .85rem; }
.classic-hero h1 { font-size: clamp(3rem, 12vw, 6rem); margin: 6px 0; line-height: 1; }
.classic-hero h1 span { background: linear-gradient(120deg, #006a4e, #f42a41); -webkit-background-clip: text; background-clip: text; color: transparent; }
.classic-hero .lead { font-size: 1.15rem; color: var(--ink2); max-width: 760px; font-weight: 500; }
.classic-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.classic-meta { color: var(--ink3); font-weight: 600; }
.classic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-top: 26px; }
.classic .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; box-shadow: var(--shadow); }
.classic .panel h2 { margin: 0 0 10px; font-size: 1.3rem; }
.classic .panel p, .classic .panel li { color: var(--ink2); font-weight: 500; }
.classic .panel ol { padding-left: 1.2em; margin: 0; }
.classic .panel ol li { margin: 8px 0; }
.facts { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.facts li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.facts b { color: var(--ink); }
.facts span { text-align: right; }
.sha { display: block; word-break: break-all; font-size: .85rem; background: var(--bg2); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.classic .small { font-size: .9rem; color: var(--ink3); }
.classic-more { text-align: center; margin: 26px 0 0; font-weight: 700; font-size: 1.1rem; }

/* ---------- Learn games (Bangla, Arabic, English) ---------- */
.ln-wrap { width: min(96%, 720px); display: flex; flex-direction: column; gap: 12px; padding: 12px 0; align-self: flex-start; margin: 0 auto; }
.ln-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ln-seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line2); border-radius: 999px; padding: 3px; gap: 2px; }
.ln-seg button { border: 0; background: none; color: var(--ink2); font: 700 .95rem 'Rajdhani', sans-serif; padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.ln-seg button[aria-pressed="true"] { background: var(--grad-btn); color: #0a0b1a; }
.ln-body { display: flex; flex-direction: column; gap: 12px; }
.ln-card { position: relative; display: grid; justify-items: center; gap: 6px; padding: 18px 14px; border-radius: 26px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), var(--panel)); border: 2px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: var(--shadow); }
.ln-big { border: 0; background: none; color: color-mix(in srgb, var(--c), #000 var(--ln-shade, 0%)); font-size: clamp(6rem, 30vw, 11rem); line-height: 1.15; font-weight: 700; cursor: pointer; padding: 0 10px; text-shadow: 0 6px 24px color-mix(in srgb, var(--c) 45%, transparent); animation: lnPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes lnPop { from { transform: scale(.6); opacity: 0; } }
.ln-word { display: flex; align-items: center; gap: 10px; font-size: clamp(1.5rem, 6vw, 2.2rem); font-weight: 700; }
.ln-emoji { font-size: 1.3em; }
.ln-roman { color: var(--ink3); font-weight: 600; }
.ln-nav { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ln-nav button, .ln-hear { border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 1.05rem 'Rajdhani', sans-serif; padding: 10px 16px; border-radius: 14px; cursor: pointer; min-width: 48px; touch-action: manipulation; transition: transform .1s; }
.ln-nav button:active, .ln-hear:active { transform: scale(.94); }
.ln-say, .ln-check { background: var(--grad-btn) !important; color: #0a0b1a !important; border-color: transparent !important; }
.ln-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.ln-strip button { flex: none; min-width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font-size: 1.35rem; font-weight: 700; cursor: pointer; padding: 0 8px; }
.ln-strip button.on { background: var(--grad-btn); color: #0a0b1a; border-color: transparent; }
.ln-write { display: grid; gap: 10px; justify-items: center; }
.ln-pad { position: relative; width: min(100%, 420px); border-radius: 22px; border: 2px dashed var(--line2); background: var(--panel); overflow: hidden; }
.ln-pad canvas { position: absolute; inset: 0; margin: auto; }
.ln-ink { touch-action: none; cursor: crosshair; }
.ln-stars { min-height: 1.6em; font-size: 1.5rem; text-align: center; }
.ln-stars span { font-size: 1.1rem; font-weight: 700; color: var(--ink2); }
.ln-quiz { display: grid; gap: 12px; justify-items: center; text-align: center; }
.ln-qhead { margin: 0; color: var(--ink3); font-weight: 700; }
.ln-hint { margin: 0; font-size: 1.4rem; font-weight: 700; } .ln-hint small { color: var(--ink3); font-size: .9rem; display: block; }
.ln-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(100%, 420px); }
.ln-opts button { aspect-ratio: 1.5; border-radius: 18px; border: 2px solid var(--line2); background: var(--panel); color: var(--ink); font-size: clamp(2.4rem, 12vw, 4rem); font-weight: 700; cursor: pointer; touch-action: manipulation; }
.ln-opts button.ok { background: #22c55e; color: #fff; border-color: #22c55e; animation: lnPop .35s; }
.ln-opts button.no { background: #ef4444; color: #fff; border-color: #ef4444; }
.ln-voice { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); color: var(--ink2); font-weight: 600; font-size: .92rem; }
#stage:has(.ln-wrap) { overflow-y: auto; align-items: flex-start; }
@media (max-width: 440px) { .ln-nav { gap: 5px; } .ln-nav button { padding: 9px 10px; font-size: .92rem; min-width: 40px; } .ln-seg button { padding: 6px 9px; font-size: .88rem; } }

/* counting objects and stars always wrap inside the card */
.ln-count { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; max-width: 100%; font-size: clamp(1.4rem, 6vw, 2rem); line-height: 1.2; padding: 4px 0; }
.ln-count span { animation: lnPop .35s both; }
.ln-count span:nth-child(n+6) { animation-delay: .05s; }
.ln-count.small { font-size: 1.3rem; }
.ln-count em { font-style: normal; font-weight: 700; color: var(--ink3); }
.ln-word { flex-wrap: wrap; justify-content: center; text-align: center; max-width: 100%; }
.ln-stars { max-width: 100%; overflow-wrap: anywhere; }
.ln-card, .ln-quiz, .ln-write { min-width: 0; max-width: 100%; }
.ln-hint { overflow-wrap: anywhere; }
.ln-pic { font-size: clamp(3rem, 14vw, 4.5rem); line-height: 1.1; }

/* ---------- polish: page transitions, living stage, progress ---------- */
@view-transition { navigation: auto; }
#stage { isolation: isolate; }
#stage::before { content: ''; position: absolute; inset: -20%; z-index: -1; pointer-events: none; background: radial-gradient(38% 34% at 22% 24%, hsl(var(--h) 90% 60% / .2), transparent 70%), radial-gradient(34% 32% at 80% 78%, hsl(calc(var(--h) + 60) 90% 60% / .15), transparent 70%); animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(4%, -3%) rotate(8deg) scale(1.08); } }
.game .new { position: absolute; z-index: 2; top: 10px; left: 10px; font-style: normal; font-size: max(12px, .75rem); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(135deg, #56e0ff, #a78bfa); color: #0a0c1e; padding: 2px 9px; border-radius: 999px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); }
.game .kids + .new { left: 62px; }
.row .game .new, .more .game .new { display: none; }
@supports (animation-timeline: view()) { @media (prefers-reduced-motion: no-preference) {
  #games > .game { animation: cardUp linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
} }
@keyframes cardUp { from { opacity: 0; transform: translateY(26px) scale(.96); } }
.ghost.sm { font-size: .92rem; padding: 7px 16px; }
.xp { display: flex; align-items: center; gap: 10px; width: min(100%, 360px); margin-top: 8px; font-weight: 700; font-size: .9rem; color: var(--ink2); }
.xp span { white-space: nowrap; } .xp span:last-child { color: var(--gold); } .xp.up span:first-child { color: var(--ok); }
.xp i { flex: 1; min-width: 36px; height: 8px; border-radius: 99px; background: var(--tile2); overflow: hidden; }
.xp i b { display: block; height: 100%; border-radius: 99px; background: var(--grad); transform-origin: left; animation: xpIn .9s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes xpIn { from { transform: scaleX(0); } }
.me { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; padding: 12px 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.me[hidden] { display: none; }
.me-lv { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-content: center; text-align: center; background: var(--grad-btn); color: #0a0c1e; }
.me-lv b { font-size: 1.5rem; line-height: 1; } .me-lv span { font-size: max(12px, .75rem); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.me-xp { flex: 1 1 200px; min-width: 0; }
.me-xp div { margin: 0 0 6px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-weight: 700; } .me-xp div span { color: var(--ink3); font-size: .9rem; }
.me-xp i { display: block; height: 10px; border-radius: 99px; background: var(--tile2); overflow: hidden; } .me-xp i b { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.me-st { text-align: center; min-width: 72px; flex: 1 0 auto; } .me-st b { display: block; font-size: 1.3rem; color: var(--gold); line-height: 1.1; } .me-st span { color: var(--ink3); font-size: max(12px, .75rem); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* Gem Cascade */
.gc-wrap { width: min(94%, 440px, 54vh); }
.gc-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(0, 1fr); gap: 4px; width: 100%; aspect-ratio: 1; padding: 6px; border-radius: 18px; background: var(--tile); border: 1px solid var(--line2); }
.gc-c { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 30%; font-size: clamp(.8rem, 4.4vw, 1.3rem); line-height: 1; color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, .95), 0 1px 3px rgba(0, 0, 0, .7); cursor: pointer; touch-action: none; overflow: hidden; background: radial-gradient(circle at 30% 24%, hsl(var(--g) 100% 80%), hsl(var(--g) 85% 52%) 62%, hsl(var(--g) 80% 40%)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 0 4px 10px -5px hsl(var(--g) 90% 40%); transition: transform .12s; }
.gc-c.k0 { --g: 350; } .gc-c.k1 { --g: 44; } .gc-c.k2 { --g: 140; } .gc-c.k3 { --g: 195; } .gc-c.k4 { --g: 268; } .gc-c.k5 { --g: 22; }
.gc-c.sel { transform: scale(1.1); box-shadow: 0 0 0 3px var(--ink), 0 0 18px hsl(var(--g) 95% 60%); z-index: 1; }
.gc-c.new { animation: gcDrop .26s cubic-bezier(.3, 1.3, .5, 1); }
.gc-c.gone { animation: gcGone .24s ease-in forwards; }
@keyframes gcDrop { from { transform: translateY(-70%); opacity: .3; } }
@keyframes gcGone { to { transform: scale(.2) rotate(40deg); opacity: 0; } }

/* Four Fall */
.ff-wrap { width: min(94%, 460px, 60vh); }
.ff-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(0, 1fr); gap: 5px; width: 100%; aspect-ratio: 7 / 6; padding: 8px; border-radius: 18px; background: linear-gradient(160deg, hsl(225 70% 46%), hsl(245 70% 30%)); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .3); }
.ff-c { position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(5, 6, 15, .55); cursor: pointer; touch-action: manipulation; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .5); }
.ff-c i { position: absolute; inset: 0; border-radius: 50%; display: none; }
.ff-c.p1 i { display: block; background: radial-gradient(circle at 32% 28%, #fff3b0, #ffd23f 45%, #c8922f); }
.ff-c.p2 i { display: block; background: radial-gradient(circle at 32% 28%, #ffc2cf, #ff5470 45%, #b3123a); }
.ff-c.last i { animation: ffDrop .34s cubic-bezier(.3, 0, .6, 1.25); }
.ff-c.win i { box-shadow: 0 0 0 3px #fff, 0 0 18px #fff; }
@keyframes ffDrop { from { transform: translateY(calc(var(--r) * -112%)); } }

/* Flip Field */
.rf-wrap { width: min(94%, 420px, 50vh); }
.rf-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(0, 1fr); gap: 4px; width: 100%; aspect-ratio: 1; padding: 6px; border-radius: 18px; background: linear-gradient(160deg, hsl(150 55% 34%), hsl(165 60% 22%)); box-shadow: var(--shadow); }
.rf-c { position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); cursor: pointer; touch-action: manipulation; }
.rf-c i { position: absolute; inset: 12%; border-radius: 50%; display: none; box-shadow: 0 3px 6px rgba(0, 0, 0, .4); }
.rf-c.p1 i { display: block; background: radial-gradient(circle at 32% 28%, #fff3b0, #ffd23f 45%, #c8922f); }
.rf-c.p2 i { display: block; background: radial-gradient(circle at 32% 28%, #c9f6ff, #56e0ff 45%, #0b7ea3); }
.rf-c.can::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: #fff; opacity: .7; }
.rf-c.turn i { animation: rfTurn .4s ease-out; } .rf-c.last i { animation: pop .22s ease-out; }
@keyframes rfTurn { from { transform: rotateY(180deg) scale(.6); filter: brightness(2); } }
.rf-you b { color: var(--gold); } .rf-bot b { color: var(--cyan); }

/* Ring Tower */
.rt-wrap { width: min(96%, 520px); }
.rt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; height: min(38vh, 250px); }
.rt-peg { position: relative; display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start; gap: 3px; min-width: 0; padding: 0 4px 12px; border: 1px solid var(--line2); border-radius: 18px; background: var(--panel); cursor: pointer; touch-action: manipulation; overflow: hidden; }
.rt-peg::before { content: ''; position: absolute; left: 50%; bottom: 8px; top: 20%; width: 8px; margin-left: -4px; border-radius: 6px; background: var(--tile2); }
.rt-peg::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 5px; height: 6px; border-radius: 6px; background: var(--tile2); }
.rt-peg small { position: absolute; top: 6px; left: 10px; color: var(--ink3); font-weight: 700; font-size: .8rem; }
.rt-peg.goal { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.rt-peg.held { border-color: var(--cyan); }
.rt-d { position: relative; z-index: 1; flex: none; display: block; height: clamp(12px, 3.4vh, 22px); width: calc(26% + 70% * var(--s) / var(--n)); border-radius: 99px; background: linear-gradient(180deg, hsl(calc(var(--s) * 47) 90% 68%), hsl(calc(var(--s) * 47) 80% 46%)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 6px -2px rgba(0, 0, 0, .4); transition: transform .15s; }
.rt-d.up { transform: translateY(-14px); box-shadow: 0 0 14px var(--cyan); }

/* Number Nest */
.nn-wrap { width: min(92%, 400px, 48vh); }
.nn-grid { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); grid-auto-rows: minmax(0, 1fr); gap: 3px; width: 100%; aspect-ratio: 1; padding: 5px; border-radius: 16px; background: var(--tile2); border: 1px solid var(--line2); }
.nn-c { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: var(--solid); color: var(--cyan); font: 700 clamp(1.1rem, 6vw, 1.9rem) 'Rajdhani', sans-serif; line-height: 1; cursor: pointer; touch-action: manipulation; }
.nn-c.given { color: var(--ink); background: var(--tile); cursor: default; }
.nn-c.sel { box-shadow: inset 0 0 0 3px var(--gold); }
.nn-c.no { background: color-mix(in srgb, var(--bad) 35%, var(--solid)); }
.nn-c.br { margin-right: 4px; } .nn-c.bb { margin-bottom: 4px; }
.nn-pad { display: flex; gap: 6px; width: 100%; }
.nn-k { flex: 1; min-width: 0; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 700 1.4rem 'Rajdhani', sans-serif; padding: 8px 0; border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.nn-k:active { transform: scale(.94); } .nn-k:disabled { opacity: .45; cursor: default; }
.nn-h { color: var(--bad); letter-spacing: .1em; }

/* Clock Wise */
.cw-wrap { width: min(94%, 440px); }
.cw-clock { width: min(62%, 32vh, 250px); aspect-ratio: 1; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .3)); }
.cw-clock .face { fill: var(--solid); stroke: hsl(var(--h) 85% 55%); stroke-width: 3; }
.cw-clock line { stroke: var(--ink3); stroke-width: .6; } .cw-clock line.b { stroke: var(--ink); stroke-width: 1.4; }
.cw-clock text { font: 700 12px 'Rajdhani', sans-serif; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.cw-clock .hand { stroke-linecap: round; transform-origin: 50px 50px; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.cw-clock .hr { stroke: var(--ink); stroke-width: 3.4; } .cw-clock .mn { stroke: hsl(var(--h) 85% 50%); stroke-width: 2.2; }
.cw-clock .pin { fill: var(--gold); }

/* ---------- second round: favourites, score history, badges, today's bonus ---------- */
.fav { border: 0; background: none; color: var(--ink3); font: 700 .92rem 'Rajdhani', sans-serif; padding: 6px 10px; cursor: pointer; border-radius: 999px; touch-action: manipulation; }
.fav:hover { color: var(--ink); } .fav[aria-pressed="true"] { color: #ff5ea8; }
.hist { margin-top: 10px; display: grid; justify-items: center; gap: 4px; }
.hist div { display: flex; align-items: flex-end; gap: 5px; height: 34px; }
.hist i { width: 12px; min-height: 3px; border-radius: 4px 4px 2px 2px; background: var(--tile2); }
.hist i.now { background: var(--grad); }
.hist span { font-size: max(12px, .75rem); font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .08em; }
.c-icon { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .c-icon { animation: none; } }
.game.faved h3::after { content: ' ♥'; color: #ff5ea8; font-size: .8em; }
#pickNote { margin-left: auto; color: var(--gold); text-transform: none; letter-spacing: .02em; }
.badges { flex: 1 0 100%; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.badges::-webkit-scrollbar { display: none; }
.badge-i { flex: none; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; padding: 6px 12px 6px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--tile); font-weight: 700; font-size: .9rem; line-height: 1.15; opacity: .45; filter: grayscale(1); }
.badge-i i { grid-row: span 2; font-style: normal; font-size: 1.4rem; }
.badge-i small { color: var(--ink3); font-size: max(12px, .75rem); font-weight: 600; }
.badge-i.got { opacity: 1; filter: none; border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
/* Pixel Clues */
.pc-wrap { width: min(94%, 430px, 52vh); }
.pc-board { display: grid; grid-template-columns: auto repeat(var(--n, 5), minmax(0, 1fr)); gap: 3px; width: 100%; }
.pc-top, .pc-left { display: flex; align-items: flex-end; justify-content: center; font-weight: 700; font-size: clamp(.85rem, 3.6vw, 1.1rem); line-height: 1.1; color: var(--ink2); text-align: center; padding: 2px 3px; }
.pc-left { align-items: center; justify-content: flex-end; padding-right: 8px; white-space: nowrap; min-width: 2.4em; }
.pc-top.ok, .pc-left.ok { color: var(--ok); }
.pc-c { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid var(--line2); border-radius: 8px; background: var(--solid); color: var(--ink3); font: 700 1rem 'Rajdhani', sans-serif; cursor: pointer; touch-action: manipulation; transition: background .1s; }
.pc-c.on { background: linear-gradient(135deg, hsl(var(--h) 90% 62%), hsl(calc(var(--h) + 40) 85% 48%)); border-color: transparent; box-shadow: 0 0 12px hsl(var(--h) 90% 60% / .5); }
.pc-c.done { animation: pop .3s ease-out; }
.pc-mode.on { background: var(--grad-btn); color: #0a0b1a; border-color: transparent; }
/* Letter Hunt */
.lh-wrap { width: min(94%, 440px, 50vh); }
.lh-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; width: 100%; padding: 6px; border-radius: 16px; background: var(--tile2); border: 1px solid var(--line2); }
.lh-c { aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 8px; background: var(--solid); color: var(--ink); font: 700 clamp(1rem, 5vw, 1.5rem) 'Rajdhani', sans-serif; line-height: 1; cursor: pointer; touch-action: none; }
.lh-c.got { background: color-mix(in srgb, var(--ok) 45%, var(--solid)); }
.lh-c.sel, .lh-c.got.sel { background: var(--cyan); color: #06121c; }
.lh-words { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.lh-words span { border: 1px solid var(--line2); background: var(--panel); border-radius: 999px; padding: 2px 11px; font-weight: 700; font-size: .95rem; letter-spacing: .06em; }
.lh-words span.found { text-decoration: line-through; opacity: .45; }
/* Block Bay */
.bb-wrap { width: min(94%, 400px, 44vh); }
.bb-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; width: 100%; padding: 6px; border-radius: 16px; background: var(--tile2); border: 1px solid var(--line2); }
.bb-c { aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: var(--solid); cursor: pointer; touch-action: none; }
.bb-c.on { background: linear-gradient(135deg, hsl(var(--hue) 90% 66%), hsl(var(--hue) 80% 46%)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35); }
.bb-c.gh { background: color-mix(in srgb, var(--cyan) 55%, var(--solid)); }
.bb-c.gh-no { background: color-mix(in srgb, var(--bad) 50%, var(--solid)); }
.bb-c.clr { animation: bbClr .35s ease-out; }
@keyframes bbClr { from { background: #fff; transform: scale(1.15); } }
.bb-tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.bb-p { position: relative; display: grid; place-items: center; min-width: 0; height: clamp(78px, 12vh, 92px); border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); cursor: pointer; touch-action: manipulation; padding: 6px; }
.bb-p small { position: absolute; top: 4px; left: 8px; color: var(--ink3); font-weight: 700; font-size: max(12px, .75rem); }
.bb-p.sel { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan); }
.bb-p.used { opacity: .25; cursor: default; } .bb-p.stuck { opacity: .5; }
.bb-m { display: grid; grid-template-columns: repeat(var(--w), 11px); grid-auto-rows: 11px; gap: 2px; }
.bb-m i { border-radius: 3px; } .bb-m i.on { background: linear-gradient(135deg, hsl(var(--hue) 90% 66%), hsl(var(--hue) 80% 46%)); }
/* Ten Pairs */
.tp-wrap { width: min(92%, 400px, 48vh); }
.tp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.tp-c { aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 18px; background: linear-gradient(135deg, hsl(var(--hue) 90% 80%), hsl(var(--hue) 78% 66%)); color: #0b0e24; font: 700 clamp(1.6rem, 8vw, 2.4rem) 'Rajdhani', sans-serif; text-shadow: 0 1px 0 rgba(255, 255, 255, .45); cursor: pointer; touch-action: manipulation; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), 0 6px 14px -8px rgba(0, 0, 0, .5); transition: transform .1s; }
.tp-c.sel { transform: scale(.9); box-shadow: 0 0 0 4px var(--gold); }
.tp-c.in { animation: pop .25s ease-out; }
/* Tiny Speller */
.ts-wrap { width: min(94%, 440px); }
.ts-pic { font-size: clamp(4rem, 22vw, 7rem); line-height: 1.1; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .25)); }
.ts-pic.in { animation: pop .3s ease-out; }
.ts-slots { display: flex; gap: 8px; justify-content: center; }
.ts-slots span { width: clamp(40px, 12vw, 58px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; border: 2px dashed var(--line2); font: 700 clamp(1.5rem, 7vw, 2.2rem) 'Rajdhani', sans-serif; }
.ts-slots span.on { border-style: solid; border-color: transparent; background: var(--ok); color: #04210f; animation: pop .2s ease-out; }
.ts-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ts-t { width: clamp(46px, 14vw, 64px); aspect-ratio: 1; padding: 0; border: 0; border-radius: 16px; background: linear-gradient(135deg, hsl(var(--hue) 90% 80%), hsl(var(--hue) 78% 66%)); color: #0b0e24; font: 700 clamp(1.5rem, 7vw, 2.2rem) 'Rajdhani', sans-serif; text-shadow: 0 1px 0 rgba(255, 255, 255, .45); cursor: pointer; touch-action: manipulation; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3); }
.ts-t.used { opacity: .2; cursor: default; }
