/* Game Night Studio — white background, blue-to-purple theme, 5px corners.
   Fonts: Manrope (body), Sora (headings). Icons: Lucide only. */

/* Fonts are hosted on this site (assets/fonts), so nothing is fetched from Google. Latin subsets of Manrope, Sora and Rye. */
@font-face { font-family: 'Manrope'; src: url('../fonts/Manrope.woff') format('woff'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../fonts/Sora.woff') format('woff'); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Rye'; src: url('../fonts/Rye.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --blue: #2563eb;
  --indigo: #4f46e5;
  --purple: #7c3aed;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, rgba(37, 99, 235, .10) 0%, rgba(124, 58, 237, .12) 100%);
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg-soft: #f8fafc;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 5px;
  --radius-sm: 4px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Sora', 'Manrope', system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
.h-sm { font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
p { margin: 0 0 1em; }
a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--purple); }
code { font-size: .9em; background: var(--g-bg-f1f5f9); padding: .1em .35em; border-radius: var(--radius-sm); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--g-tx-334155); max-width: 38rem; }
.mb { margin-bottom: 2rem; }
.mt { margin-top: 2rem; }
.plain { list-style: none; margin: 0; padding: 0; }
.stack > * + * { margin-top: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
:focus-visible { outline: 3px solid rgba(79, 70, 229, .45); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--g-bg-ffffff); padding: .5rem 1rem; border-radius: var(--radius); z-index: 200; }
.skip-link:focus { left: .5rem; }

/* Lucide icons */
svg.lucide { width: 1.15em; height: 1.15em; flex: none; stroke-width: 2; vertical-align: -.2em; }

/* Layout */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.container.narrow, .narrow { max-width: 640px; }
.section { padding: 3rem 0; }
.section-sm { padding: 2rem 1rem; }
.section-tint { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 1.5rem; }
.section-head-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-title { margin-bottom: 1.5rem; }
.page-title h1 { margin-bottom: .25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.align-start { align-items: start; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .section { padding: 2rem 0; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(var(--surface-rgb), .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius); background: var(--grad); color: #fff; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-sm .brand-mark { width: 30px; height: 30px; }
.brand-sm .brand-name { font-size: 1.05rem; }
.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav > a:not(.btn) { padding: .5rem .8rem; border-radius: var(--radius-sm); color: var(--g-tx-334155); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav > a:not(.btn):hover { background: var(--bg-soft); color: var(--ink); }
.site-nav > a.active { color: var(--indigo); background: rgba(79, 70, 229, .08); }
.nav-toggle { display: none; background: var(--g-bg-ffffff); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .6rem; cursor: pointer; color: var(--ink); }
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .75rem; }
  .site-nav.open { display: flex; }
  .site-nav .btn { justify-content: center; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--g-bg-ffffff); padding: 2rem 0; margin-top: 3rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand p { margin: .5rem 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; }
.footer-links a, .link-btn { color: var(--g-tx-475569); font-size: .9rem; text-decoration: none; font-weight: 600; }
.footer-links a:hover, .link-btn:hover { color: var(--indigo); }
.link-btn { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.link-btn.inline { color: var(--indigo); text-decoration: underline; font-size: inherit; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid transparent; font: 700 .95rem var(--font); line-height: 1.2; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .15s, filter .15s, border-color .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .28); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 6px 18px rgba(79, 70, 229, .35); }
.btn-secondary { background: var(--g-bg-ffffff); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { color: var(--indigo); border-color: var(--indigo); background: rgba(79, 70, 229, .04); }
.btn-ghost { background: transparent; color: var(--g-tx-334155); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--indigo); }
.btn-danger { background: var(--g-bg-ffffff); color: var(--bad); border-color: var(--g-bd-fecaca); }
.btn-danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-sm { padding: .45rem .75rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn.icon-only { padding: .4rem .5rem; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.inline-form { display: inline; margin: 0; }

/* Cards, tiles, badges */
.card { background: var(--g-bg-ffffff); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card + .card { margin-top: 0; }
.card-accent { position: relative; overflow: hidden; }
.card-accent::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.icon-tile { width: 44px; height: 44px; border-radius: var(--radius); display: inline-grid; place-items: center; background: var(--grad-soft); color: var(--indigo); margin-bottom: .75rem; }
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.sm { width: 34px; height: 34px; margin: 0; }
.icon-tile.sm svg { width: 18px; height: 18px; }
.icon-tile.lg { width: 54px; height: 54px; }
.icon-tile.lg svg { width: 28px; height: 28px; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge-grad { background: var(--grad); color: #fff; }
.badge-soft { background: rgba(79, 70, 229, .1); color: var(--indigo); }
.badge-muted { background: var(--g-bg-f1f5f9); color: var(--g-tx-475569); }
.badge-ok { background: var(--g-bg-dcfce7); color: var(--ok); }
.badge-warn { background: var(--g-bg-fef3c7); color: var(--warn); }

/* Alerts */
.flash { padding-top: 1rem; }
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius); border: 1px solid; margin: 1rem 0; font-size: .95rem; word-break: break-word; }
.alert svg { margin-top: .2em; }
.alert-info { background: rgba(37, 99, 235, .06); border-color: rgba(37, 99, 235, .25); color: var(--g-tx-1e3a8a); }
.alert-success { background: var(--g-bg-f0fdf4); border-color: var(--g-bd-bbf7d0); color: var(--g-tx-14532d); }
.alert-error { background: var(--g-bg-fef2f2); border-color: var(--g-bd-fecaca); color: var(--g-tx-7f1d1d); }
.alert-warn { background: var(--g-bg-fffbeb); border-color: var(--g-bd-fde68a); color: var(--g-tx-78350f); }

/* Forms */
.field { margin-bottom: 1rem; }
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }
.input { width: 100%; padding: .7rem .85rem; border: 1px solid var(--g-bd-cbd5e1); border-radius: var(--radius-sm); font: inherit; background: var(--g-bg-ffffff); color: var(--ink); }
.input:hover { border-color: #94a3b8; }
.input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); }
textarea.input { resize: vertical; }
.hint { color: var(--muted); font-size: .82rem; margin: .3rem 0 0; }
.input-wrap { position: relative; flex: 1; }
.input-wrap .input { padding-right: 2.8rem; }
.input-btn { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: .4rem; color: var(--muted); cursor: pointer; border-radius: var(--radius-sm); }
.input-btn:hover { color: var(--indigo); }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; font-size: .92rem; margin: 0 0 1rem; cursor: pointer; }
.check input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--indigo); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.copy-row { display: flex; gap: .5rem; margin: .75rem 0; }
.copy-row .input { min-width: 0; }
.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; justify-content: space-between; }
.toolbar form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.toolbar .input-wrap { min-width: 240px; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.25rem 0; }
.danger-zone { border-color: var(--g-bd-fecaca); margin-top: 1.5rem; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.dl-2 { grid-template-columns: max-content 1fr max-content 1fr; }
@media (max-width: 720px) { .dl-2 { grid-template-columns: max-content 1fr; } }

/* Installer */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.check-list li { display: flex; align-items: center; gap: .55rem; }
.check-list .ok { color: var(--ok); }
.check-list .bad { color: var(--bad); font-weight: 700; }

/* Hero & marketing */
.hero { padding: 3.5rem 0 2.5rem; background: radial-gradient(60rem 24rem at 85% -10%, rgba(124, 58, 237, .10), transparent 60%), radial-gradient(50rem 22rem at 0% 0%, rgba(37, 99, 235, .08), transparent 55%), var(--g-bg-ffffff); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: .8rem 0; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-art { max-width: 340px; } }
.preview { padding: 1.25rem; box-shadow: var(--shadow); }
.preview-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; font-weight: 700; }
.vs { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.game-card { display: flex; flex-direction: column; align-items: flex-start; }
.game-card form { margin-top: auto; }
.game-card > p { flex: 0; }
.game-card .btn, .game-card .badge:last-child { margin-top: auto; }
.game-card.is-soon { background: var(--bg-soft); border-style: dashed; }
.step h3 { margin-top: .25rem; }
.feature { display: flex; gap: .9rem; align-items: flex-start; }
.feature > svg { width: 28px; height: 28px; color: var(--indigo); margin-top: .2rem; }
.feature h3 { margin-bottom: .2rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--g-bg-ffffff); }
.stat-num { display: block; font: 700 1.9rem var(--font-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; line-height: 1.2; }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* Tables */
.table-card { padding: 0; overflow: hidden; }
.table-card .pad { padding: 1rem 1.25rem 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--bg-soft); white-space: nowrap; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions { white-space: nowrap; text-align: right; }
.cell-icon { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
.cell-icon svg { color: var(--indigo); }

/* Admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.admin-head h1 { margin: 0; font-size: 1.7rem; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: var(--radius-sm); color: var(--g-tx-334155); text-decoration: none; font-weight: 700; font-size: .9rem; border: 1px solid transparent; }
.tabs a:hover { background: var(--bg-soft); }
.tabs a.active { background: rgba(79, 70, 229, .08); color: var(--indigo); border-color: rgba(79, 70, 229, .2); }
.tabs-pill a { border-color: var(--line); }
.tel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.tel-wide { grid-column: span 4; }
@media (max-width: 960px) { .tel-grid { grid-template-columns: repeat(2, 1fr); } .tel-wide { grid-column: span 2; } }
@media (max-width: 560px) { .tel-grid { grid-template-columns: 1fr; } .tel-wide { grid-column: span 1; } }
.tel-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.tel-top h3 { margin: 0; font-size: 1rem; }
.tel-num { font: 700 2rem var(--font-head); line-height: 1.1; margin-bottom: .6rem; }
.tel-num.sm { font-size: 1.5rem; margin: .2rem 0; }
.tel-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: .5rem; }
.meter { height: 8px; background: var(--g-bg-eef2ff); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: .6rem; }
.meter span { display: block; height: 100%; background: var(--grad); border-radius: var(--radius-sm); transition: width .6s ease; }
.meter span.hot { background: linear-gradient(90deg, #f59e0b, #dc2626); }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 170px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bar { width: 100%; background: var(--grad); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-val { font-size: .7rem; color: var(--muted); font-weight: 700; height: 1rem; }
.bar-label { font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.hbar { display: grid; grid-template-columns: 8.5rem 1fr 2.5rem; gap: .6rem; align-items: center; margin: .55rem 0; font-size: .9rem; }
.hbar-track { height: 10px; background: var(--g-bg-eef2ff); border-radius: var(--radius-sm); overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--grad); }
.hbar-num { text-align: right; font-weight: 700; }

/* Legal */
.legal h1 { margin-bottom: .25rem; }
.legal h2 { margin-top: 2rem; font-size: 1.25rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .4rem; }

/* Cookie popup */
.cookie { position: fixed; left: 1rem; bottom: 1rem; width: min(440px, calc(100vw - 2rem)); background: var(--g-bg-ffffff); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(15, 23, 42, .22); padding: 1.1rem 1.15rem; z-index: 100; overflow: hidden; }
.cookie::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.cookie-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.cookie-head h2 { margin: 0; font-size: 1.05rem; }
.cookie p { font-size: .9rem; color: var(--g-tx-475569); margin-bottom: .8rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookie-prefs { border-top: 1px solid var(--line); padding-top: .8rem; margin-bottom: .8rem; display: grid; gap: .7rem; }
.switch { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; margin: 0; cursor: pointer; }
.switch input { margin-top: .3rem; accent-color: var(--indigo); width: 1.05rem; height: 1.05rem; flex: none; }
.switch strong { display: block; font-size: .9rem; }
.switch small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }

/* ---------- Game page ---------- */
.game-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.game-title { display: flex; align-items: center; gap: .9rem; }
.game-title .icon-tile { margin: 0; }
.game-title h1 { font-size: 1.5rem; margin: 0; }
.game-title p { margin: 0; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
@media (max-width: 880px) { .game-layout { grid-template-columns: minmax(0, 1fr); } .game-side { order: 2; } }
.game-side .card { margin-bottom: 1.25rem; padding: 1.1rem 1.2rem; }
.game-main { padding: 1.25rem; min-height: 420px; min-width: 0; }
.banner { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-soft); font-weight: 700; margin-bottom: 1.25rem; }
.banner.info { background: rgba(37, 99, 235, .06); border-color: rgba(37, 99, 235, .25); color: var(--g-tx-1e3a8a); }
.banner.go { background: var(--grad); border-color: transparent; color: #fff; }
.banner.done { background: rgba(124, 58, 237, .08); border-color: rgba(124, 58, 237, .3); color: var(--g-tx-4c1d95); }
.banner.bad { background: var(--g-bg-fef2f2); border-color: var(--g-bd-fecaca); color: var(--g-tx-7f1d1d); }
.game-last { text-align: center; color: var(--muted); font-size: .92rem; min-height: 1.5rem; margin-top: 1rem; }
.game-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.25rem; }
#game-msg:empty { display: none; }

.player { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border: 2px solid var(--line); border-radius: var(--radius); margin-bottom: .55rem; background: var(--g-bg-ffffff); }
.player:last-child { margin-bottom: 0; }
.player.is-turn { border-color: transparent; background: linear-gradient(var(--g-bg-ffffff), var(--g-bg-ffffff)) padding-box, var(--grad) border-box; }
.player.is-empty { border-style: dashed; color: var(--muted); }
.player-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.player-meta strong { overflow-wrap: anywhere; }
.avatar { width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; color: #fff; font: 700 1rem var(--font-head); flex: none; }
.avatar.seat-0 { background: var(--blue); }
.avatar.seat-1 { background: var(--purple); }
.avatar-empty { background: var(--g-bg-f1f5f9); color: var(--muted); }
.player .mark { color: var(--muted); }
.player .crown { color: var(--g-tx-d97706); }

/* Noughts & crosses */
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 420px; margin: 0 auto; }
.ttt-cell { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius); background: var(--g-bg-ffffff); display: grid; place-items: center; cursor: pointer; padding: 0; font: inherit; transition: background .15s, border-color .15s, transform .1s; }
.ttt-cell:not(:disabled):hover { border-color: var(--indigo); background: rgba(79, 70, 229, .06); transform: translateY(-1px); }
.ttt-cell:disabled { cursor: default; }
.ttt-cell i { font: 800 clamp(1.6rem, 9vw, 3rem) var(--font-head); font-style: normal; }
.ttt-cell.x i { color: var(--blue); }
.ttt-cell.o i { color: var(--purple); }
.ttt-cell svg { width: 52%; height: 52%; stroke-width: 2.6; }
.ttt-cell.x svg { color: var(--blue); }
.ttt-cell.o svg { color: var(--purple); }
.ttt-cell.win { background: var(--grad-soft); border-color: var(--purple); }
.ttt-cell.pop svg { animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ttt-mini { max-width: 260px; gap: 6px; }
.ttt-mini .ttt-cell { cursor: default; }

/* Hangman: a Wild West gallows */
.hmw { max-width: 760px; margin: 0 auto; background: #fff8ea; border: 3px solid #7c4a1e; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 30px rgba(80, 40, 10, .22); color: #4a2508; }
.hmw-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 1.1rem; background: #7c4a1e; color: #ffe9b8; font: 1.25rem Rye, Georgia, serif; letter-spacing: .04em; }
.hmw-stars { display: flex; gap: .3rem; }
.hm-star { width: 1.55rem; height: 1.55rem; fill: #fbbf24; stroke: #92400e; stroke-width: 1.2; }
.hm-star.lost { fill: #7c4a1e; stroke: #4a2508; opacity: .5; }
.hmw-stage { background: #bfe3f4; line-height: 0; }
.hm-scene { display: block; width: 100%; height: auto; }
.hm-scene .hm-eyes-x, .hm-scene .hm-sg { display: none; }
.hmw.is-lost .hm-eyes-x { display: inline; }
.hmw.is-lost .hm-eyes-ok { display: none; }
.hmw.is-lost .hm-sg-lose, .hmw.is-won .hm-sg-win { display: inline; }
.hm-cl { animation: hmCloud 70s linear infinite; }
.hm-cl2 { animation-duration: 95s; animation-delay: -40s; }
.hm-cl3 { animation-duration: 60s; animation-delay: -22s; }
.hm-cl4 { animation-duration: 120s; animation-delay: -75s; }
.hm-cl1 { animation-delay: -10s; }
@keyframes hmCloud { from { transform: translateX(-160px); } to { transform: translateX(1250px); } }
.hm-roll { animation: hmRoll 17s linear infinite; }
.hm-roll2 { animation-duration: 25s; animation-delay: -11s; }
.hm-bounce { animation: hmBounce .8s ease-in-out infinite alternate; }
.hm-b2 { animation-duration: 1s; }
.hm-spin { transform-origin: 0 0; animation: hmSpin 2.4s linear infinite; }
.hm-s2 { animation-duration: 3s; }
@keyframes hmRoll { from { transform: translateX(-80px); } to { transform: translateX(1030px); } }
@keyframes hmBounce { from { transform: translateY(0); } to { transform: translateY(-16px); } }
@keyframes hmSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hm-cl, .hm-roll, .hm-bounce, .hm-spin { animation: none; } .hm-roll { transform: translateX(300px); } }
.hmw-ui { display: grid; gap: .8rem; padding: 1.1rem 1.1rem 1.2rem; justify-items: center; }
.hw-wrap { container-type: inline-size; width: 100%; }
.hw-word { --g: min(.6rem, 1.6cqw); --tw: min(3.6rem, calc((100cqw - (var(--n) - 1) * var(--g)) / var(--n))); display: flex; flex-wrap: wrap; gap: calc(var(--g) * 1.6) calc(var(--g) * 3); justify-content: center; }
.hw-w { display: flex; flex-wrap: nowrap; gap: var(--g); }
.hw-letter { position: relative; flex: 0 0 auto; width: var(--tw); height: calc(var(--tw) * 1.28); display: grid; place-items: center; background: linear-gradient(#c98b4d, #b57435); border: max(2px, calc(var(--tw) * .06)) solid #6b3c14; border-radius: calc(var(--tw) * .14); font: calc(var(--tw) * .58) Rye, Georgia, serif; color: #3b1d08; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12); }
.hw-letter.blank { color: transparent; background: linear-gradient(#e3b57a, #d29a5a); }
.hw-letter.missed { color: #8a2c18; background: linear-gradient(#f3b3a0, #e0806a); }
.hw-info { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; justify-content: center; font-weight: 800; color: #7c4a1e; }
.hw-info .badge { background: #f4d9a6; color: #5a300f; }
.hw-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(2.6rem, 1fr)); gap: .5rem; width: 100%; }
.hw-key { height: 3rem; border-radius: 9px; border: 2px solid #6b3c14; background: linear-gradient(#f4d9a6, #e6bf80); font: 800 1.2rem var(--font); color: #4a2508; cursor: pointer; box-shadow: 0 3px 0 #6b3c14; }
.hw-key:not(:disabled):hover { background: linear-gradient(#fbe6bd, #f0cb92); }
.hw-key:not(:disabled):active { transform: translateY(3px); box-shadow: none; }
.hw-key:disabled { cursor: default; }
.hw-key.hit { background: linear-gradient(#bde5a0, #8fcf6a); border-color: #2f6b1c; color: #1d4a0e; box-shadow: 0 3px 0 #2f6b1c; }
.hw-key.miss { background: linear-gradient(#f3b3a0, #e0806a); border-color: #8a2c18; color: #6e1c0c; box-shadow: none; transform: translateY(3px); opacity: .8; }
.hw-key:not(.hit):not(.miss):disabled { opacity: .6; }
.hw-hint { display: flex; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Snakes & Ladders ---- */
.sl-wrap { width: 100%; max-width: 560px; margin: 0 auto; min-width: 0; padding-bottom: 1.25rem; }
.sl-board { position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-auto-rows: 1fr; aspect-ratio: 1 / 1; border: 2px solid var(--blue); border-radius: var(--radius); overflow: visible; margin-bottom: 2.6rem; background: var(--g-bg-ffffff); }
.sl-cell { position: relative; background: var(--g-bg-bfdbfe); min-width: 0; box-shadow: inset 0 0 0 1px rgba(30, 64, 175, .35); }
.sl-cell.alt { background: var(--g-bg-ddd6fe); }
.sl-cell.lad-start, .sl-cell.lad-end { background: #86efac; }
.sl-cell.snk-head { background: var(--g-bg-fda4af); }
.sl-cell.snk-tail { background: var(--g-bg-fecdd3); }
.sl-cell.goal { background: var(--grad); }
.sl-cell:first-child { border-top-left-radius: 3px; }
.sl-cell:nth-child(10) { border-top-right-radius: 3px; }
.sl-num { position: absolute; top: 2px; left: 3px; font-size: clamp(.55rem, 2.1vw, .8rem); font-weight: 800; color: var(--g-tx-1e293b); line-height: 1; }
.sl-cell.goal .sl-num { color: #fff; }
.sl-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sl-ladder line { stroke: #2563eb; stroke-width: .75; stroke-linecap: round; }
.sl-ladder line.rung { stroke-width: .6; stroke: #3b82f6; }
.sl-snake path { fill: none; stroke: #7c3aed; stroke-width: 1.7; stroke-linecap: round; opacity: .85; }
.sl-snake .head { fill: #6d28d9; }
.sl-snake .eye { fill: #fff; }
.sl-piece { position: absolute; width: 4.6%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(17, 24, 39, .45); transition: left .6s ease, top .6s ease; z-index: 2; left: 40%; top: 108%; }
.sl-piece.p0 { background: var(--blue); }
.sl-piece.p1 { background: var(--purple); }
.sl-start { position: absolute; left: 50%; top: 108%; transform: translate(-50%, -50%); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9ca3af; z-index: 1; }
.sl-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1rem; }
.sl-pos { text-align: center; }
.sl-die { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 2px solid var(--blue); border-radius: var(--radius); color: var(--blue); font-weight: 800; font-size: 1.4rem; background: var(--g-bg-ffffff); }
.sl-die svg { width: 30px; height: 30px; }
.sl-die.rolled { animation: slRoll .5s ease; }
@keyframes slRoll { 0% { transform: rotate(-200deg) scale(.6); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sl-piece { transition: none; } .sl-die.rolled { animation: none; } }

/* ---- Connect 4 ---- */
.c4-wrap { width: 100%; max-width: 460px; margin: 0 auto; min-width: 0; }
.c4-drops, .c4-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.c4-drops { gap: 0; margin-bottom: 4px; }
.c4-drop { display: flex; align-items: center; justify-content: center; height: 32px; border: 0; background: transparent; color: #cbd5e1; border-radius: var(--radius-sm); cursor: default; padding: 0; }
.c4-drop svg { width: 18px; height: 18px; }
.c4-drop.ready { cursor: pointer; color: var(--blue); }
.c4-drop.ready.seat-1 { color: var(--purple); }
.c4-drop.ready:hover, .c4-drop.ready:focus-visible { background: var(--g-bg-eef2ff); }
.c4-board { background: linear-gradient(135deg, var(--blue), var(--purple)); padding: 6px; border-radius: var(--radius); gap: 0; }
.c4-cell { aspect-ratio: 1; padding: 4px; min-width: 0; }
.c4-disc { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--g-bg-ffffff); box-shadow: inset 0 2px 4px rgba(17, 24, 39, .35); }
.c4-disc.d0 { background: #3b82f6; box-shadow: inset 0 0 0 4px #2563eb, inset 0 -3px 6px rgba(0,0,0,.2); }
.c4-disc.d1 { background: #a78bfa; box-shadow: inset 0 0 0 4px #6d28d9, inset 0 -3px 6px rgba(0,0,0,.2); }
.c4-disc.win { animation: c4Win 1s ease-in-out infinite alternate; outline: 3px solid #fde047; outline-offset: -3px; }
.c4-disc.drop { animation: c4Drop .45s cubic-bezier(.3, .7, .4, 1); }
@keyframes c4Drop { from { transform: translateY(-420%); } to { transform: none; } }
@keyframes c4Win { from { transform: scale(1); } to { transform: scale(.88); } }
@media (prefers-reduced-motion: reduce) { .c4-disc.drop, .c4-disc.win { animation: none; } }

/* ---- Battleship ---- */
.bs-wrap { width: 100%; max-width: 440px; margin: 0 auto; min-width: 0; }
.bs-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; min-width: 0; }
.bs-col { min-width: 0; }
@media (max-width: 760px) { .bs-boards { grid-template-columns: minmax(0, 1fr); } }
.bs-title { display: flex; align-items: center; gap: .4rem; font-size: 1rem; margin: 0 0 .5rem; }
.bs-title svg { width: 18px; height: 18px; color: var(--blue); }
.bs-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; padding: 3px; background: var(--g-bg-bfdbfe); border-radius: var(--radius); }
.bs-cell { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 0; margin: 0; border: 0; border-radius: 2px; background: var(--g-bg-eff6ff); color: #fff; font-size: .7rem; line-height: 1; min-width: 0; }
.bs-cell svg { width: 70%; height: 70%; }
button.bs-cell { cursor: pointer; }
.bs-grid.setup .bs-cell:hover { background: var(--g-bg-dbeafe); }
.bs-cell.ship { background: #4f6bed; }
.bs-grid.setup .bs-cell.ship:hover { background: #6366f1; }
.bs-cell.pv.ok { background: #93c5fd; }
.bs-cell.pv.bad { background: var(--g-bg-fca5a5); }
.bs-cell.miss::after { content: ''; width: 28%; aspect-ratio: 1; border-radius: 50%; background: #94a3b8; }
.bs-cell.hit { background: var(--purple); }
.bs-cell.ship.hit { background: #6d28d9; }
.bs-cell.sunk { background: #1e1b4b; }
.bs-cell.reveal { background: var(--g-bg-c7d2fe); }
.bs-cell.latest { outline: 2px solid #fde047; outline-offset: -2px; }
.bs-grid.enemy.live button.bs-cell:hover, .bs-grid.enemy.live button.bs-cell:focus-visible { background: var(--g-bg-c4b5fd); }
.bs-grid.enemy:not(.live) { opacity: .92; }
.bs-tray { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 .6rem; }
.bs-ship { display: flex; flex-direction: column; gap: 4px; padding: .4rem .6rem; border: 1px solid var(--border, var(--g-bd-e5e7eb)); border-radius: var(--radius-sm); background: var(--g-bg-ffffff); cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; text-align: left; }
.bs-ship .pips { display: flex; gap: 2px; }
.bs-ship .pip { width: 10px; height: 10px; border-radius: 2px; background: var(--g-bg-cbd5e1); }
.bs-ship.placed .pip { background: #4f6bed; }
.bs-ship.sel { border-color: var(--blue); box-shadow: 0 0 0 2px #bfdbfe; }
.bs-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bs-status { margin-top: .6rem; }
.bs-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }

/* ---- Coloured icon tiles on legal pages ---- */
.legal h2, .legal-title { display: flex; align-items: center; gap: .65rem; }
.h-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius); }
.h-ico svg { width: 19px; height: 19px; }
.h-ico.lg { width: 48px; height: 48px; }
.h-ico.lg svg { width: 26px; height: 26px; }
.c-grad { background: var(--grad); color: #fff; }
.c-blue { background: var(--g-bg-dbeafe); color: #1d4ed8; }
.c-purple { background: var(--g-bg-ede9fe); color: #6d28d9; }
.c-indigo { background: var(--g-bg-e0e7ff); color: #4338ca; }
.c-teal { background: var(--g-bg-ccfbf1); color: var(--g-tx-0f766e); }
.c-amber { background: var(--g-bg-fef3c7); color: var(--g-tx-b45309); }
.c-green { background: var(--g-bg-dcfce7); color: var(--g-tx-15803d); }
.c-rose { background: var(--g-bg-ffe4e6); color: var(--g-tx-be123c); }
.c-pink { background: var(--g-bg-fce7f3); color: var(--g-tx-be185d); }

/* ---- Header announcement bar and footer extras ---- */
.site-notice { background: var(--grad); color: #fff; font-size: .9rem; font-weight: 600; text-align: center; padding: .45rem 0; }
.site-notice a, .site-notice span { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.site-notice a:hover { text-decoration: underline; }
.site-notice svg { width: 16px; height: 16px; }
.footer-about { margin: .5rem 0 0; color: var(--g-tx-475569); max-width: 34ch; }


/* ---- Chess ---- */
.ch-wrap { width: 100%; max-width: 580px; margin: 0 auto; min-width: 0; display: flex; flex-direction: column; gap: .6rem; }
.ch-strip { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.ch-strip .avatar { width: 30px; height: 30px; font-size: .85rem; }
.ch-caps { display: inline-flex; flex-wrap: wrap; gap: 0; margin-left: .25rem; }
.ch-caps .ch-p { margin-right: -3px; }
.ch-boardwrap { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 6px; }
.ch-ranks { display: grid; grid-template-rows: repeat(8, 1fr); font-size: .7rem; font-weight: 700; color: var(--g-tx-475569); text-align: center; }
.ch-ranks span { display: flex; align-items: center; justify-content: center; }
.ch-files { display: grid; grid-template-columns: repeat(8, 1fr); font-size: .7rem; font-weight: 700; color: var(--g-tx-475569); text-align: center; margin-top: 3px; }
.ch-board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 3px solid var(--g-bd-a5b4fc); border-radius: var(--radius); overflow: hidden; }
.ch-sq { position: relative; aspect-ratio: 1; padding: 0; margin: 0; border: 0; display: flex; align-items: center; justify-content: center; min-width: 0; cursor: default; }
.ch-sq.light { background: var(--g-bg-eef2ff); }
.ch-sq.dark { background: var(--g-bg-b4bff3); }
.ch-sq:not([disabled]) { cursor: pointer; }
.ch-sq.last::before { content: ''; position: absolute; inset: 0; background: rgba(250, 204, 21, .38); }
.ch-sq.sel::before { content: ''; position: absolute; inset: 0; background: rgba(124, 58, 237, .42); box-shadow: inset 0 0 0 3px #7c3aed; }
.ch-sq.incheck { box-shadow: inset 0 0 0 3px #e11d48; background-image: radial-gradient(circle, rgba(225, 29, 72, .55), rgba(225, 29, 72, 0) 70%); }
.ch-sq.move::after { content: ''; position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; background: rgba(109, 40, 217, .55); }
.ch-sq.cap::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; border: 5px solid rgba(109, 40, 217, .6); box-sizing: border-box; }
.ch-board.live .ch-sq:not([disabled]):hover { filter: brightness(.94); }
.ch-sq:focus-visible { outline: 3px solid #1d4ed8; outline-offset: -3px; z-index: 2; }
.ch-p { position: relative; width: 80%; height: 80%; filter: drop-shadow(0 1.5px 1.5px rgba(15, 23, 42, .35)); }
.ch-p.w { color: #2563eb; }
.ch-p.b { color: #7c3aed; }
.ch-caps .ch-p { width: 18px; height: 18px; filter: none; }
.ch-tools { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.ch-promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; padding: .75rem; border: 2px solid var(--purple); border-radius: var(--radius); background: var(--g-bg-f5f3ff); }
.ch-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .4rem .6rem; border: 1px solid var(--g-bd-cbd5e1); border-radius: var(--radius-sm); background: var(--g-bg-ffffff); cursor: pointer; font: inherit; font-size: .75rem; font-weight: 700; min-width: 64px; }
.ch-pick:hover, .ch-pick:focus-visible { border-color: var(--purple); background: var(--g-bg-ede9fe); }
.ch-pick .ch-p { width: 40px; height: 40px; }
.ch-moves { border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); padding: .75rem; max-height: 220px; overflow: auto; }
.ch-moves h3 { margin: 0 0 .5rem; }
.ch-grid { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr); gap: 4px 6px; font-size: .85rem; font-weight: 600; }
.ch-mn { color: var(--g-tx-64748b); align-self: center; }
.ch-mv { border: 0; border-radius: 4px; padding: 3px 8px; background: var(--g-bg-eef2ff); font: inherit; text-align: left; cursor: pointer; }
.ch-mv.b { background: var(--g-bg-f5f3ff); color: var(--g-tx-4c1d95); }
.ch-mv:hover { background: var(--g-bg-dbeafe); }
.ch-mv.cur { background: var(--g-bg-ddd6fe); box-shadow: inset 0 0 0 2px var(--purple); }

/* ---- Colour Clash ---- */
.cc-wrap { width: 100%; max-width: 640px; margin: 0 auto; min-width: 0; display: flex; flex-direction: column; gap: .9rem; }
.cc-strip { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.cc-strip .avatar { width: 30px; height: 30px; font-size: .85rem; }
.cc-backs, .dm-backs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-left: .25rem; }
.cc-table { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 1rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--g-bg-eef2ff), var(--g-bg-f5f3ff)); flex-wrap: wrap; }
.cc-pile { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.cc-pile[disabled] { cursor: default; opacity: .7; }
.cc-pile:not([disabled]):hover .cc-card, .cc-pile:not([disabled]):focus-visible .cc-card { transform: translateY(-3px); }
.cc-pile:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; border-radius: var(--radius); }
.cc-discard { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.cc-card { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 86px; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .28); color: #fff; font-family: Sora, Manrope, sans-serif; font-weight: 800; font-size: 1.6rem; padding: 0; margin: 0; flex: 0 0 auto; transition: transform .12s; box-sizing: border-box; }
.cc-card .cc-face { display: flex; align-items: center; justify-content: center; width: 62%; aspect-ratio: 1; border-radius: 50%; background: rgba(var(--surface-rgb), .22); font-size: 1.35rem; line-height: 1; }
.cc-card .cc-face svg { width: 70%; height: 70%; }
.cc-card .cc-corner { position: absolute; top: 2px; left: 5px; font-size: .75rem; line-height: 1.1; }
.cc-R { background: #dc2626; }
.cc-Y { background: #eab308; color: var(--g-tx-422006); }
.cc-G { background: #16a34a; }
.cc-B { background: #2563eb; }
.cc-W { background: #1e1b4b; }
.cc-W .cc-face { background: var(--g-bg-ffffff); color: var(--g-tx-1e1b4b); }
.cc-back { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.cc-back .cc-face i, .cc-back .cc-face svg { width: 60%; height: 60%; }
.cc-card.big { width: 82px; height: 122px; font-size: 2.2rem; }
.cc-card.big .cc-face { font-size: 1.9rem; }
.cc-card.mini { width: 34px; height: 50px; font-size: 1rem; border-width: 2px; border-radius: 5px; }
.cc-card.mini .cc-face { font-size: .8rem; }
.cc-card.mini .cc-corner { display: none; }
.cc-back.mini { width: 20px; height: 30px; border-width: 2px; margin-right: -8px; }
button.cc-card { cursor: default; opacity: .45; }
button.cc-card.can { cursor: pointer; opacity: 1; }
button.cc-card.can:hover, button.cc-card.can:focus-visible { transform: translateY(-6px); }
button.cc-card:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
button.cc-card.picked { transform: translateY(-10px); box-shadow: 0 0 0 3px #7c3aed, 0 4px 10px rgba(15, 23, 42, .3); }
.cc-col { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem; border-radius: 999px; background: var(--g-bg-ffffff); border: 1px solid var(--g-bd-cbd5e1); font-weight: 700; font-size: .85rem; }
.cc-col .cc-swatch { width: 14px; height: 14px; border-radius: 50%; background: currentColor; }
.cc-col.cc-R { color: #dc2626; background: var(--g-bg-ffffff); }
.cc-col.cc-Y { color: var(--g-tx-ca8a04); background: var(--g-bg-ffffff); }
.cc-col.cc-G { color: var(--g-tx-16a34a); background: var(--g-bg-ffffff); }
.cc-col.cc-B { color: #2563eb; background: var(--g-bg-ffffff); }
.cc-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; padding: .75rem; border: 2px solid var(--purple); border-radius: var(--radius); background: var(--g-bg-f5f3ff); }
.cc-colbtn { border: 0; border-radius: var(--radius-sm); padding: .55rem 1rem; font: inherit; font-weight: 800; color: #fff; cursor: pointer; min-width: 78px; }
.cc-colbtn.cc-Y { color: var(--g-tx-422006); }
.cc-colbtn:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.cc-mine h3 { margin: 0 0 .5rem; }
.cc-hand { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.cc-hand .cc-card.mini { margin: 0; }

/* ---- Dominoes ---- */
.dm-table { padding: 1rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--g-bg-eef2ff), var(--g-bg-f5f3ff)); min-height: 150px; }
.dm-chain { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.dm-empty { margin: 1.5rem 0; text-align: center; width: 100%; }
.dm-yard { text-align: center; margin: .75rem 0 0; display: flex; align-items: center; justify-content: center; gap: .35rem; }
.dm-endtag { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-weight: 800; font-size: .8rem; }
.dm-tile { display: inline-flex; background: var(--g-bg-ffffff); border: 2px solid #334155; border-radius: 6px; box-shadow: 0 2px 4px rgba(15, 23, 42, .25); padding: 0; margin: 0; flex: 0 0 auto; box-sizing: border-box; }
.dm-tile.h { flex-direction: row; width: 64px; height: 34px; }
.dm-tile.v { flex-direction: column; width: 34px; height: 64px; }
.dm-half { flex: 1 1 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 3px; min-width: 0; min-height: 0; }
.dm-half span { display: block; }
.dm-half span.pip { margin: 10%; border-radius: 50%; background: #1e293b; }
.dm-half[data-n="1"] span.pip { background: #7c3aed; }
.dm-half[data-n="2"] span.pip, .dm-half[data-n="3"] span.pip { background: #2563eb; }
.dm-half[data-n="4"] span.pip { background: #0d9488; }
.dm-half[data-n="5"] span.pip { background: #d97706; }
.dm-half[data-n="6"] span.pip { background: #dc2626; }
.dm-div { flex: 0 0 2px; background: #94a3b8; }
.dm-tile.v .dm-div { height: 2px; width: auto; }
.dm-tile.mini { width: 24px; height: 44px; border-width: 1.5px; }
.dm-tile.mini .dm-half { padding: 1px; }
.dm-tile.dm-back { background: linear-gradient(135deg, #2563eb, #7c3aed); border-color: #fff; width: 16px; height: 30px; margin-right: -6px; }
.dm-hand { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
button.dm-tile { cursor: default; opacity: .45; font: inherit; }
button.dm-tile.can { cursor: pointer; opacity: 1; }
button.dm-tile.can:hover, button.dm-tile.can:focus-visible { transform: translateY(-5px); }
button.dm-tile.picked { transform: translateY(-8px); box-shadow: 0 0 0 3px #7c3aed, 0 4px 10px rgba(15, 23, 42, .3); }
button.dm-tile:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
@media (max-width: 480px) {
  .cc-card { width: 52px; height: 78px; }
  .cc-card.big { width: 74px; height: 110px; }
  .cc-card.mini { width: 30px; height: 44px; }
  .cc-back.mini { width: 18px; height: 27px; }
  .dm-tile.h { width: 56px; height: 30px; }
  .dm-tile.v { width: 30px; height: 56px; }
  .dm-tile.mini { width: 22px; height: 40px; }
}

/* ---- Colour Clash: many players ---- */
.cc-opps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: .5rem; }
.cc-opp { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .5rem .6rem; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-ffffff); min-width: 0; }
.cc-opp .avatar { width: 30px; height: 30px; font-size: .85rem; flex: 0 0 auto; }
.cc-opp-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cc-opp-meta strong { overflow-wrap: anywhere; }
.cc-opp.is-turn { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(124, 58, 237, .25); }
.cc-opp.is-out, .player.is-out { opacity: .5; }
.cc-lobby { display: flex; flex-direction: column; gap: .9rem; }
.cc-lobby h3 { margin: 0; }
.cc-dir { display: inline-flex; align-items: center; gap: .3rem; }

/* Footer legal links with colourful icon tiles */
.h-ico.sm { width: 24px; height: 24px; border-radius: var(--radius-sm); }
.h-ico.sm svg { width: 14px; height: 14px; }
.has-ico { display: inline-flex; align-items: center; gap: .45rem; }
.link-btn.has-ico { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }

/* ---- Rock Paper Scissors ---- */
.rps-wrap, .mm-wrap, .dg-wrap { width: 100%; max-width: 640px; margin: 0 auto; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.rps-score { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .75rem 1rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--g-bg-eef2ff), var(--g-bg-f5f3ff)); }
.rps-side { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.rps-side strong { overflow-wrap: anywhere; max-width: 12rem; }
.rps-pips { display: inline-flex; gap: 6px; }
.rps-pip { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--g-bd-a5b4fc); background: var(--g-bg-ffffff); }
.rps-side.seat-0 .rps-pip.on { background: #2563eb; border-color: #2563eb; }
.rps-side.seat-1 .rps-pip.on { background: #7c3aed; border-color: #7c3aed; }
.rps-vs { font-weight: 800; font-size: .85rem; color: var(--g-tx-475569); }
.rps-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.rps-btn { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .4rem; border: 2px solid var(--g-bd-cbd5e1); border-radius: var(--radius); background: var(--g-bg-ffffff); font: inherit; font-weight: 800; cursor: pointer; color: var(--g-tx-1e293b); }
.rps-btn svg { width: 56px; height: 56px; }
.rps-btn:hover, .rps-btn:focus-visible { border-color: var(--purple); background: var(--g-bg-f5f3ff); color: #6d28d9; }
.rps-btn:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.rps-last { display: flex; align-items: center; justify-content: space-around; gap: .5rem; padding: .9rem; border-radius: var(--radius); border: 2px solid var(--g-bd-e2e8f0); text-align: center; }
.rps-last.won { border-color: var(--g-bd-86efac); background: var(--g-bg-f0fdf4); }
.rps-last.lost { border-color: var(--g-bd-fda4af); background: var(--g-bg-fff1f2); }
.rps-last.tie { background: var(--g-bg-f8fafc); }
.rps-hand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rps-hand svg { width: 64px; height: 64px; }
.rps-hand.mine { color: #2563eb; }
.rps-hand.theirs { color: #7c3aed; }
.rps-locked { text-align: center; }
.rps-locked p { margin: .25rem 0 0; }
.rps-history ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rps-history li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .6rem; border-radius: var(--radius-sm); background: var(--g-bg-f8fafc); font-size: .9rem; }
.rps-history li.won { background: var(--g-bg-f0fdf4); }
.rps-history li.lost { background: var(--g-bg-fff1f2); }

/* ---- Memory Match ---- */
.mm-score { display: flex; gap: .75rem; }
.mm-side { flex: 1 1 0; display: flex; flex-direction: column; padding: .6rem .8rem; border: 2px solid var(--g-bd-e2e8f0); border-radius: var(--radius); min-width: 0; }
.mm-side strong { overflow-wrap: anywhere; }
.mm-side.seat-0 { border-left: 5px solid #2563eb; }
.mm-side.seat-1 { border-left: 5px solid #7c3aed; }
.mm-side.is-turn { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(124, 58, 237, .2); }
.mm-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.mm-card { aspect-ratio: 3 / 4; border: 0; border-radius: 8px; padding: 0; display: flex; align-items: center; justify-content: center; font: inherit; cursor: default; min-width: 0; }
.mm-card.down { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; box-shadow: 0 2px 4px rgba(15, 23, 42, .25); }
.mm-card.down:not([disabled]) { cursor: pointer; }
.mm-card.down:not([disabled]):hover, .mm-card.down:not([disabled]):focus-visible { transform: translateY(-3px); }
.mm-card:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.mm-q { font-family: Sora, Manrope, sans-serif; font-weight: 800; font-size: 1.5rem; opacity: .85; }
.mm-card.up { background: var(--g-bg-ffffff); border: 2px solid var(--g-bd-cbd5e1); }
.mm-card.up.miss { border-color: var(--g-bd-f87171); background: var(--g-bg-fff1f2); }
.mm-card.matched.owner-me { border-color: #2563eb; background: var(--g-bg-eff6ff); }
.mm-card.matched.owner-them { border-color: #7c3aed; background: var(--g-bg-f5f3ff); }
.mm-face { display: flex; width: 60%; }
.mm-face svg, .mm-face i { width: 100%; height: auto; stroke-width: 2.2; }

/* ---- Draw & Guess ---- */
.dg-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.dg-word { font-family: Sora, Manrope, sans-serif; font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; min-width: 0; }
.dg-mask { letter-spacing: .15em; white-space: pre-wrap; word-break: break-all; }
.dg-stage { border: 3px solid var(--g-bd-a5b4fc); border-radius: var(--radius); overflow: hidden; background: var(--g-bg-ffffff); }
.dg-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 10 / 7; background: var(--g-bg-ffffff); touch-action: none; }
.dg-stage canvas.can-draw { cursor: crosshair; }
.dg-tools { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.dg-colors, .dg-widths, .dg-ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dg-color { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--g-bd-cbd5e1); padding: 0; cursor: pointer; }
.dg-color.on { box-shadow: 0 0 0 3px #7c3aed; border-color: #fff; }
.dg-width { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--g-bd-cbd5e1); border-radius: var(--radius-sm); background: var(--g-bg-ffffff); padding: 0; cursor: pointer; }
.dg-width span { display: block; border-radius: 50%; background: #1e293b; }
.dg-width.on { border-color: #7c3aed; background: var(--g-bg-f5f3ff); }
.dg-color:focus-visible, .dg-width:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.dg-guess { display: flex; gap: .5rem; }
.dg-guess .input { flex: 1 1 auto; min-width: 0; }
.dg-feed h3 { margin: 0 0 .35rem; }
.dg-feed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: .95rem; }
.dg-feed li { padding: .25rem .6rem; background: var(--g-bg-f8fafc); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .rps-btn svg { width: 44px; height: 44px; }
  .mm-grid { gap: 4px; }
  .dg-color { width: 28px; height: 28px; }
}

/* Quiz Race */
.tv-wrap { max-width: 640px; margin: 0 auto; padding: .5rem; }
.tv-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.tv-top .tv-secs { margin-left: auto; min-width: 2.2rem; text-align: center; }
.tv-bar { height: 6px; background: var(--border, var(--g-bg-e5e7eb)); border-radius: 4px; overflow: hidden; margin-bottom: 1rem; }
.tv-bar > i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #2563eb, #7c3aed); }
.tv-q { font-family: 'Sora', sans-serif; font-size: 1.25rem; line-height: 1.35; margin: 0 0 1rem; }
.tv-answers { display: grid; gap: .6rem; }
.tv-ans { display: flex; align-items: center; gap: .75rem; text-align: left; width: 100%; padding: .8rem .9rem; border: 2px solid var(--border, var(--g-bd-e5e7eb)); border-radius: 5px; background: var(--g-bg-ffffff); font: inherit; cursor: pointer; }
.tv-ans:hover:not(:disabled) { border-color: #7c3aed; }
.tv-ans:disabled { cursor: default; }
.tv-ans.picked { border-color: #2563eb; background: var(--g-bg-eff6ff); }
.tv-ans.right { border-color: #16a34a; background: var(--g-bg-f0fdf4); }
.tv-ans.wrong { border-color: #dc2626; background: var(--g-bg-fef2f2); }
.tv-ans.dim { opacity: .55; }
.tv-letter { flex: none; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 4px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); }
.tv-text { flex: 1; font-weight: 600; }
.tv-who { display: flex; gap: 2px; }
.avatar.mini { width: 1.3rem; height: 1.3rem; font-size: .7rem; }
.tv-board { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.tv-board li { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border: 1px solid var(--border, var(--g-bd-e5e7eb)); border-radius: 5px; }
.tv-board li.win { border-color: #7c3aed; background: var(--g-bg-faf5ff); }
.tv-settings { display: grid; gap: .75rem; margin: 1rem 0; text-align: left; }
.tv-settings .field { display: grid; gap: .25rem; }
.tv-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.tv-chip { border: 1px solid var(--border, var(--g-bd-e5e7eb)); border-radius: 5px; padding: .25rem .6rem; font-size: .85rem; cursor: pointer; }
.tv-chip.on { border-color: #7c3aed; background: var(--g-bg-faf5ff); }
.tv-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tv-ans:disabled { color: var(--text, var(--g-tx-111827)); }
.tv-ans.right:disabled, .tv-ans.wrong:disabled, .tv-ans.picked:disabled { opacity: 1; }

/* Resume bar: shown under the header when someone has a game to go back to */
.resume-bar { background: linear-gradient(90deg, var(--g-bg-eff6ff), var(--g-bg-f5f3ff)); border-bottom: 1px solid var(--g-bd-e0e7ff); }
.resume-inner { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding-top: .55rem; padding-bottom: .55rem; }
.resume-title { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .9rem; color: var(--g-tx-3730a3); }
.resume-item { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .7rem; border: 1px solid var(--g-bd-c7d2fe); border-radius: 5px; background: var(--g-bg-ffffff); color: inherit; text-decoration: none; font-size: .9rem; }
.resume-item:hover { border-color: #7c3aed; }
.resume-item svg, .resume-title svg { width: 1rem; height: 1rem; }
.resume-go { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; color: #4f46e5; }

/* Who's Who */
.ww-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.ww-board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.ww-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .25rem .25rem .35rem; background: var(--g-bg-ffffff); border: 2px solid var(--g-bd-e5e7eb); border-radius: 5px; cursor: pointer; font: inherit; color: inherit; transition: transform .1s, border-color .1s, opacity .15s; }
.ww-tile:hover:not(:disabled) { border-color: #7c3aed; transform: translateY(-1px); }
.ww-tile svg { width: 100%; height: auto; display: block; border-radius: 4px; }
.ww-name { font-size: .72rem; font-weight: 700; line-height: 1.1; }
.ww-tile.down { opacity: .35; filter: grayscale(1); }
.ww-tile.down::after { content: ""; position: absolute; inset: 0; background: linear-gradient(45deg, transparent 47%, #ef4444 47%, #ef4444 53%, transparent 53%), linear-gradient(-45deg, transparent 47%, #ef4444 47%, #ef4444 53%, transparent 53%); border-radius: 4px; pointer-events: none; }
.ww-tile.sel, .ww-tile.mine { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.ww-tile.theirs { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .25); }
.ww-tile.mine.down, .ww-tile.theirs.down { opacity: 1; filter: none; }
.ww-tag { position: absolute; top: -.45rem; left: 50%; transform: translateX(-50%); z-index: 1; background: linear-gradient(90deg, #2563eb, #7c3aed); color: #fff; font-size: .62rem; font-weight: 800; padding: .05rem .4rem; border-radius: 4px; white-space: nowrap; }
.ww-panel { display: flex; flex-direction: column; gap: .75rem; }
.ww-you { display: flex; gap: .75rem; align-items: center; }
.ww-you-face { width: 56px; flex: none; }
.ww-you-face svg { width: 100%; height: auto; display: block; border-radius: 4px; }
.ww-modes { display: flex; flex-wrap: wrap; gap: .5rem; }
.ww-group h4 { margin: 0 0 .3rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--g-tx-6b7280); }
.ww-qs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.ww-q { padding: .35rem .6rem; border: 1px solid var(--g-bd-d1d5db); border-radius: 4px; background: var(--g-bg-ffffff); font: inherit; font-size: .85rem; cursor: pointer; }
.ww-q:hover:not(:disabled) { border-color: #7c3aed; background: var(--g-bg-f5f3ff); }
.ww-q:disabled { opacity: .45; cursor: not-allowed; }
.ww-log { list-style: none; margin: 0; padding: 0; max-height: 18rem; overflow: auto; display: flex; flex-direction: column; gap: .4rem; font-size: .88rem; }
.ww-who { font-weight: 800; }
@media (max-width: 900px) {
  .ww-wrap { grid-template-columns: 1fr; }
  .ww-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ww-tile.mine.down::after { display: none; }

/* Draughts */
.dr-board .ch-sq.light { background: var(--g-bg-eef2ff); }
.dr-board .ch-sq.dark { background: #6d5bd0; }
.dr-board .ch-sq.last::before { background: rgba(250, 204, 21, .45); }
.dr-p { width: 82%; height: 82%; filter: drop-shadow(0 2px 1.5px rgba(15, 23, 42, .45)); position: relative; z-index: 1; }
.dr-p.w { color: #2563eb; }
.dr-p.b { color: #c026d3; }
.dr-board .ch-sq.dark { background: #5b4bc4; }

/* Word Duel */
.wd-wrap { display: flex; flex-direction: column; gap: .75rem; width: 100%; max-width: 640px; margin: 0 auto; }
.wd-score { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.wd-sc strong { font-size: 1.4rem; margin-right: .2rem; }
.wd-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px); gap: 1rem; align-items: start; }
.wd-me .wd-grid { max-width: 330px; margin: 0 auto; }
.wd-grid { display: flex; flex-direction: column; gap: 5px; }
.wd-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.wd-row.sm { gap: 3px; }
.wd-grid .wd-row.sm + .wd-row.sm { margin-top: 0; }
.wd-t { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 2px solid var(--g-bd-cbd5e1); border-radius: 4px; font-weight: 800; font-size: 1.6rem; background: var(--g-bg-ffffff); color: var(--g-tx-0f172a); }
.wd-t.has { border-color: #7c3aed; }
.wd-t.g { background: #16a34a; border-color: #16a34a; color: #fff; }
.wd-t.y { background: #eab308; border-color: #eab308; color: #fff; }
.wd-t.x { background: #64748b; border-color: #64748b; color: #fff; }
.wd-t.sm { font-size: .7rem; border-width: 1px; border-radius: 3px; }
.wd-kb { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.wd-krow { display: flex; gap: 5px; justify-content: center; width: 100%; }
.wd-k { flex: 1 1 0; max-width: 44px; min-width: 0; height: 48px; border: 0; border-radius: 4px; background: var(--g-bg-e2e8f0); font: inherit; font-weight: 800; cursor: pointer; color: var(--g-tx-0f172a); padding: 0; }
.wd-k.wide { flex: 1.6 1 0; max-width: 70px; font-size: .75rem; }
.wd-k.g { background: #16a34a; color: #fff; }
.wd-k.y { background: #eab308; color: #fff; }
.wd-k.x { background: #64748b; color: #fff; }
.wd-k:disabled { opacity: .5; cursor: default; }
@media (max-width: 520px) { .wd-cols { grid-template-columns: minmax(0, 1fr) 90px; gap: .6rem; } .wd-t { font-size: 1.25rem; } }

/* Word Tiles */
.wt-wrap { display: flex; flex-direction: column; gap: .75rem; width: 100%; max-width: 660px; margin: 0 auto; min-width: 0; }
.wt-score { margin-left: auto; font-weight: 800; font-size: 1.2rem; }
.wt-board { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 1px; background: var(--g-bg-c7d2fe); border: 3px solid var(--g-bd-a5b4fc); border-radius: var(--radius); overflow: hidden; container-type: inline-size; }
.wt-sq { position: relative; aspect-ratio: 1; padding: 0; margin: 0; border: 0; background: var(--g-bg-eef2ff); display: flex; align-items: center; justify-content: center; min-width: 0; cursor: default; font: inherit; }
.wt-sq:not([disabled]) { cursor: pointer; }
.wt-sq:not([disabled]):hover { filter: brightness(.93); }
.wt-sq:focus-visible { outline: 3px solid #1d4ed8; outline-offset: -3px; z-index: 2; }
.wt-sq.p-tw { background: #f87171; }
.wt-sq.p-dw { background: var(--g-bg-f9a8d4); }
.wt-sq.p-tl { background: #60a5fa; }
.wt-sq.p-dl { background: var(--g-bg-bae6fd); }
.wt-sq.star { background: var(--g-bg-f9a8d4); }
.wt-pl { font-size: 2.2cqw; font-weight: 800; color: rgba(15, 23, 42, .65); line-height: 1; display: flex; align-items: center; justify-content: center; }
.wt-pl svg { width: 3.4cqw; height: 3.4cqw; }
.wt-tile { position: relative; display: flex; align-items: center; justify-content: center; width: 94%; height: 94%; background: #fde68a; border: 1px solid #d4a017; border-radius: 3px; color: var(--g-tx-1f2937); box-shadow: 0 1px 1px rgba(15, 23, 42, .3); }
.wt-tile .wt-l { font-weight: 800; font-size: 4cqw; line-height: 1; }
.wt-tile .wt-v { position: absolute; right: 8%; bottom: 3%; font-size: 1.9cqw; font-weight: 700; line-height: 1; }
.wt-tile.blank .wt-l { color: #7c3aed; }
.wt-tile.pending { background: var(--g-bg-c4b5fd); border-color: #7c3aed; box-shadow: 0 0 0 2px #7c3aed; }
.wt-tile.last { box-shadow: 0 0 0 2px #2563eb; }
.wt-rack { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 56px; padding: .5rem; background: var(--g-bg-f5f3ff); border: 1px solid var(--g-bd-ddd6fe); border-radius: var(--radius); }
.wt-rackbtn { padding: 0; margin: 0; border: 0; background: none; cursor: pointer; width: 48px; height: 48px; }
.wt-rackbtn:disabled { cursor: default; }
.wt-rackbtn .wt-tile { width: 100%; height: 100%; font-size: 1rem; border-radius: 4px; }
.wt-rackbtn .wt-tile .wt-l { font-size: 1.5rem; }
.wt-rackbtn .wt-tile .wt-v { font-size: .65rem; right: 6px; bottom: 3px; }
.wt-rackbtn .wt-tile.sel { box-shadow: 0 0 0 3px #7c3aed; transform: translateY(-3px); }
.wt-rackbtn .wt-tile.swapsel { box-shadow: 0 0 0 3px #e11d48; transform: translateY(-3px); }
.wt-letters { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.wt-log ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; }
@media (max-width: 520px) { .wt-rackbtn { width: 42px; height: 42px; } }

/* Whodunit */
.wh-wrap { display: flex; flex-direction: column; gap: .75rem; width: 100%; max-width: 700px; margin: 0 auto; min-width: 0; }
.wh-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #cbd5e1; }
.wh-manor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wh-room { position: relative; min-height: 104px; padding: .45rem; display: flex; flex-direction: column; gap: .35rem; text-align: left; border: 2px solid var(--g-bd-c7d2fe); border-radius: 5px; background: linear-gradient(180deg, var(--g-bg-ffffff), var(--g-bg-eef2ff)); font: inherit; color: inherit; cursor: default; min-width: 0; }
.wh-room.here { border-color: #7c3aed; box-shadow: inset 0 0 0 1px #7c3aed; }
.wh-room.can { border-color: #2563eb; background: var(--g-bg-dbeafe); cursor: pointer; box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.wh-room.can:hover { background: var(--g-bg-bfdbfe); }
.wh-rname { font-weight: 800; font-size: .85rem; display: flex; align-items: center; gap: .25rem; }
.wh-pass svg { width: 14px; height: 14px; vertical-align: -2px; color: #7c3aed; }
.wh-tokens { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wh-pawn { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: .72rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .4); }
.wh-pawn.player { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0f172a; margin: 0 2px; }
.wh-pawn.me { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7c3aed; }
.wh-weap { font-size: .66rem; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: var(--g-bg-fef3c7); border: 1px solid #f59e0b; color: var(--g-tx-78350f); line-height: 1.3; }
.wh-form { display: flex; flex-direction: column; gap: .5rem; padding: .75rem; border: 1px solid var(--g-bd-ddd6fe); border-radius: var(--radius); background: var(--g-bg-faf5ff); }
.wh-accuse summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
.wh-choices { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.wh-cards { display: flex; flex-wrap: wrap; gap: .4rem; }
.wh-card { padding: .3rem .6rem; border-radius: 4px; font-weight: 700; font-size: .85rem; border: 1px solid; }
.wh-card.cs { background: var(--g-bg-ede9fe); border-color: var(--g-bd-a78bfa); }
.wh-card.cw { background: var(--g-bg-fef3c7); border-color: #f59e0b; }
.wh-card.cr { background: var(--g-bg-dcfce7); border-color: #4ade80; }
.wh-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.wh-nbgroup h4 { margin: .6rem 0 .25rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--g-tx-6b7280); }
.wh-nbrow { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .15rem 0; border-bottom: 1px solid var(--g-bd-f1f5f9); font-size: .88rem; }
.wh-nbrow.dim > span:first-child { color: #94a3b8; text-decoration: line-through; }
.wh-mark { border: 1px solid var(--g-bd-cbd5e1); border-radius: 4px; background: var(--g-bg-ffffff); padding: .1rem .5rem; font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer; color: var(--g-tx-475569); }
.wh-mark.m1 { background: var(--g-bg-fee2e2); border-color: var(--g-bd-fca5a5); color: var(--g-tx-991b1b); }
.wh-mark.m2 { background: var(--g-bg-fef9c3); border-color: #fde047; color: var(--g-tx-854d0e); }
.wh-mark.known { cursor: default; background: var(--g-bg-dcfce7); border-color: var(--g-bd-86efac); color: var(--g-tx-166534); }
@media (max-width: 640px) { .wh-cols { grid-template-columns: 1fr; } .wh-room { min-height: 92px; } }

/* Deal Street */
.ds-wrap { display: flex; flex-direction: column; gap: .75rem; width: 100%; max-width: 760px; margin: 0 auto; min-width: 0; }
.ds-board { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-template-rows: repeat(11, minmax(0, 1fr)); gap: 2px; background: var(--g-bg-c7d2fe); border: 3px solid var(--g-bd-a5b4fc); border-radius: var(--radius); container-type: inline-size; aspect-ratio: 1; }
.ds-sq { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; padding: 0; border: 0; background: var(--g-bg-ffffff); font: inherit; color: var(--g-tx-0f172a); cursor: pointer; min-width: 0; min-height: 0; overflow: hidden; text-align: center; }
.ds-sq:hover { background: var(--g-bg-f5f3ff); }
.ds-sq.sel { outline: 3px solid #7c3aed; outline-offset: -3px; z-index: 2; }
.ds-sq.t-go, .ds-sq.t-jail, .ds-sq.t-rest, .ds-sq.t-gojail { background: var(--g-bg-ede9fe); justify-content: center; }
.ds-sq.t-fortune { background: var(--g-bg-ecfeff); }
.ds-sq.t-luck { background: var(--g-bg-fff7ed); }
.ds-sq.mortgaged { background: repeating-linear-gradient(45deg, var(--g-bg-f1f5f9), var(--g-bg-f1f5f9) 4px, var(--g-bg-e2e8f0) 4px, var(--g-bg-e2e8f0) 8px); color: var(--g-tx-64748b); }
.ds-band { display: block; width: 100%; height: 22%; flex: none; }
.ds-n { font-size: 1.95cqw; font-weight: 700; line-height: 1.1; padding: 1px 2px 0; overflow-wrap: anywhere; }
.ds-p { font-size: 1.8cqw; color: var(--g-tx-475569); line-height: 1; }
.ds-ic svg { width: 3.2cqw; height: 3.2cqw; color: #7c3aed; }
.ds-houses { position: absolute; top: 2px; left: 0; right: 0; display: flex; justify-content: center; gap: 1px; }
.ds-house { display: block; width: 1.6cqw; height: 1.6cqw; background: #16a34a; border: 1px solid #14532d; }
.ds-hotel { display: block; width: 3.4cqw; height: 1.8cqw; background: #dc2626; border: 1px solid #7f1d1d; }
.ds-toks { position: absolute; bottom: 2px; left: 0; right: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; }
.ds-tok { display: inline-flex; align-items: center; justify-content: center; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.9cqw; border: 1px solid #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.ds-tok.big { width: 28px; height: 28px; font-size: .85rem; flex: none; }
.ds-center { grid-row: 2 / 11; grid-column: 2 / 11; background: linear-gradient(135deg, var(--g-bg-eff6ff), var(--g-bg-f5f3ff)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; text-align: center; }
.ds-title { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 5cqw; background: linear-gradient(90deg, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ds-dice { display: flex; gap: .6rem; }
.ds-die { width: 8cqw; height: 8cqw; min-width: 36px; min-height: 36px; display: flex; align-items: center; justify-content: center; background: var(--g-bg-ffffff); border: 2px solid #7c3aed; border-radius: 6px; font-weight: 800; font-size: 1.5rem; box-shadow: 0 2px 4px rgba(15, 23, 42, .2); }
.ds-event { margin: 0; font-size: .95rem; max-width: 90%; }
.ds-cash { margin-left: auto; font-weight: 800; font-size: 1.1rem; }
.ds-box { padding: .75rem; border: 1px solid var(--g-bd-ddd6fe); border-radius: var(--radius); background: var(--g-bg-faf5ff); display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }
.ds-btnrow { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.ds-bid { display: flex; gap: .5rem; flex-wrap: wrap; }
.ds-bid .input { flex: 1 1 120px; }
.ds-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ds-prow { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--g-bd-f1f5f9); flex-wrap: wrap; }
.ds-prow.mort .ds-pname { color: var(--g-tx-64748b); text-decoration: line-through; }
.ds-chip { width: 12px; height: 12px; border-radius: 2px; flex: none; }
.ds-pname { flex: 1 1 140px; font-size: .9rem; font-weight: 600; }
.ds-pbtns { display: flex; gap: .3rem; flex-wrap: wrap; }
.ds-trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ds-trade h4 { margin: .25rem 0; font-size: .8rem; text-transform: uppercase; color: var(--g-tx-6b7280); }
.ds-detail { padding: .75rem; border: 1px solid var(--g-bd-e5e7eb); border-radius: var(--radius); margin-bottom: .75rem; }
.ds-rents { width: 100%; font-size: .85rem; border-collapse: collapse; }
.ds-rents td { padding: 2px 0; border-bottom: 1px solid var(--g-bd-f1f5f9); }
.ds-rents td:last-child { text-align: right; font-weight: 700; }
@media (max-width: 640px) { .ds-cols { grid-template-columns: 1fr; } .ds-trade-cols { grid-template-columns: 1fr; } }

/* ---- Go Fish ---- */
.gf-wrap { display: flex; flex-direction: column; gap: .75rem; }
.gf-opp { font: inherit; text-align: left; cursor: pointer; }
.gf-opp:disabled { cursor: default; }
.gf-opp.is-picked { border-color: var(--purple); background: var(--g-bg-faf5ff); }
.gf-books { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 2px; }
.gf-book { padding: 0 .35rem; border-radius: 3px; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-size: .72rem; font-weight: 700; }
.gf-hand { display: flex; flex-wrap: wrap; gap: .6rem; }
.gf-group { display: flex; padding: .3rem .4rem .3rem 1.4rem; border: 2px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; font: inherit; }
.gf-group:disabled { cursor: default; }
.gf-group.is-picked { border-color: var(--purple); background: var(--g-bg-faf5ff); }
.gf-group .gf-card { margin-left: -1.1rem; }
.gf-card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 2.6rem; height: 3.6rem; border: 1px solid var(--g-bd-cbd5e1); border-radius: 5px; background: var(--g-bg-ffffff); box-shadow: 0 1px 2px rgba(15, 23, 42, .15); line-height: 1.1; }
.gf-card b { font-size: 1.05rem; }
.gf-card i { font-style: normal; font-size: 1.15rem; }
.gf-card.dark { color: var(--g-tx-1e3a8a); }
.gf-card.red { color: var(--g-tx-be185d); }
.gf-ask { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.gf-opp:disabled { color: inherit; opacity: 1; }
.gf-opp.is-out:disabled { opacity: .5; }
.gf-card { align-items: flex-start; padding: .3rem 0 0 .35rem; }
.gf-group .gf-card { margin-left: -1.7rem; }
.gf-group { padding-left: 2rem; }

/* ---- Whiteboard ---- */
.wb-wrap { display: flex; flex-direction: column; gap: .6rem; }
.wb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.wb-bar[hidden], .wb-panel[hidden], .wb-textin[hidden] { display: none; }
.wb-tool { width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-ffffff); color: var(--g-tx-334155); cursor: pointer; }
.wb-tool:hover:not(:disabled) { border-color: var(--purple); }
.wb-tool.is-on { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; border-color: transparent; }
.wb-tool:disabled, .wb-sw:disabled, .wb-size:disabled { opacity: .45; cursor: default; }
.wb-swatches { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.wb-sw { box-sizing: border-box; display: block; flex: none; margin: 0; align-self: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; padding: 0; position: relative; }
.wb-sw.is-on { box-shadow: 0 0 0 2px var(--purple); }
.wb-custom { background: conic-gradient(from 0deg at 50% 50%, #ef4444, #eab308, #22c55e, #2563eb, #ec4899, #ef4444); background-origin: border-box; background-clip: border-box; overflow: hidden; line-height: 0; }
.wb-custom input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; cursor: pointer; }
.wb-sizes { display: flex; gap: .3rem; align-items: center; margin-left: .5rem; }
.wb-size { width: 2.1rem; height: 2.1rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-ffffff); cursor: pointer; }
.wb-size span { display: block; border-radius: 50%; background: #334155; }
.wb-size.is-on { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(124, 58, 237, .25); }
.wb-fillrow { margin-left: .5rem; }
.wb-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--g-bd-cbd5e1); border-radius: var(--radius); background-color: var(--g-bg-ffffff); overflow: hidden; touch-action: none; }
.wb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wb-stage[data-bg="grid"] { background-image: linear-gradient(#e2e8f0 1px, transparent 1px), linear-gradient(90deg, #e2e8f0 1px, transparent 1px); background-size: 2.5% 4%; }
.wb-stage[data-bg="dots"] { background-image: radial-gradient(#94a3b8 1.6px, transparent 1.8px); background-size: 2.5% 4%; background-position: 0 0; }
.wb-stage[data-bg="dark"] { background-color: #0f172a; }
.wb-live { touch-action: none; }
.wb-textin { position: absolute; z-index: 3; min-width: 8rem; max-width: 90%; border: 2px dashed var(--purple); background: rgba(var(--surface-rgb), .85); font-family: inherit; font-weight: 600; padding: 0 .25rem; line-height: 1.2; outline: none; }
.wb-panel { padding: .6rem; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-ffffff); display: flex; flex-direction: column; gap: .5rem; }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: .3rem; max-height: 11rem; overflow-y: auto; }
.wb-pick { height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-ffffff); cursor: grab; color: var(--g-tx-334155); padding: 0; }
.wb-pick:hover { border-color: var(--purple); }
.wb-pick.is-on { border-color: var(--purple); background: var(--g-bg-faf5ff); box-shadow: 0 0 0 2px rgba(124, 58, 237, .25); }
.wb-pick svg { width: 1.4rem; height: 1.4rem; }
.wb-emo { font-size: 1.5rem; }
.wb-bgsel { display: inline-flex; align-items: center; gap: .4rem; }
.wb-bgsel select { width: auto; padding: .25rem .5rem; }
.wb-wrap.is-ro .wb-live { cursor: default; }
@media (max-width: 640px) { .wb-tool { width: 2.2rem; height: 2.2rem; } .wb-fillrow, .wb-sizes { margin-left: 0; } }
.wb-tool { font-size: .65rem; font-weight: 700; }

/* ---- Deal Street 3D dice ---- */
.ds-dice { display: flex; gap: calc(var(--dd, 36px) * .45); perspective: 700px; padding: .5rem 0; }
.ds-die3d { display: block; position: relative; width: var(--dd); height: var(--dd); }
.ds-cube { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(-28deg) rotateX(var(--x, 0deg)) rotateY(var(--y, 0deg)); }
.ds-face { position: absolute; inset: 0; box-sizing: border-box; background: linear-gradient(145deg, var(--g-bg-ffffff), var(--g-bg-eef2ff)); border: 2px solid #7c3aed; border-radius: 14%; backface-visibility: hidden; }
.ds-face i { position: absolute; width: 19%; height: 19%; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 35% 35%, #7c3aed, #2563eb); }
.ds-die3d.tumble { animation: dsHop 1.15s ease-out both; }
.ds-die3d.tumble .ds-cube { animation: dsTumble 1.15s cubic-bezier(.15, .7, .25, 1) both; }
.ds-dice.dbl .ds-die3d { filter: drop-shadow(0 0 8px rgba(124, 58, 237, .75)); }
@keyframes dsTumble {
  from { transform: rotateX(-22deg) rotateY(-28deg) rotateX(calc(var(--x) + var(--sx))) rotateY(calc(var(--y) + var(--sy))); }
  to { transform: rotateX(-22deg) rotateY(-28deg) rotateX(var(--x)) rotateY(var(--y)); }
}
@keyframes dsHop {
  0% { transform: translateY(0); } 22% { transform: translateY(-38%); } 46% { transform: translateY(0); }
  64% { transform: translateY(-14%); } 82% { transform: translateY(0); } 92% { transform: translateY(-4%); } 100% { transform: translateY(0); }
}
.ds-center { position: relative; }
.ds-mute { position: absolute; right: .4rem; bottom: .4rem; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-ffffff); color: var(--g-tx-475569); cursor: pointer; padding: 0; }
@media (prefers-reduced-motion: reduce) { .ds-die3d.tumble, .ds-die3d.tumble .ds-cube { animation: none; } }

.ds-card { width: min(70%, 22rem); padding: .5rem .75rem; border-radius: 6px; border: 2px solid #7c3aed; background: var(--g-bg-ffffff); box-shadow: 0 3px 8px rgba(15, 23, 42, .18); transform: rotate(-1.5deg); animation: dsCardIn .35s ease-out both; }
.ds-card.luck { border-color: #2563eb; }
.ds-card-h { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #7c3aed; }
.ds-card.luck .ds-card-h { color: #2563eb; }
.ds-card p { margin: .2rem 0 0; font-weight: 600; font-size: .95rem; }
@keyframes dsCardIn { from { opacity: 0; transform: translateY(8px) rotate(-1.5deg) scale(.96); } to { opacity: 1; transform: translateY(0) rotate(-1.5deg) scale(1); } }

/* centre info card */
.ds-center { justify-content: flex-start; gap: .25rem; padding: .5rem .75rem; overflow: hidden; }
.ds-title { font-size: 4cqw; line-height: 1.1; }
.ds-dice { padding: .15rem 0; }
.ds-event { font-size: .85rem; max-width: 95%; min-height: 1.1em; }
.ds-info { flex: 1 1 0; min-height: 0; width: min(92%, 30rem); overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ds-info .ds-card { width: min(92%, 22rem); }
.ds-info .ds-detail { width: 100%; margin: 0; padding: .5rem .75rem; background: var(--g-bg-ffffff); text-align: left; box-shadow: 0 2px 6px rgba(15, 23, 42, .12); }
.ds-detail-h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ds-detail-h h3 { margin: 0; }
.ds-x { border: 0; background: transparent; cursor: pointer; padding: .1rem .3rem; color: var(--g-tx-64748b); font-size: .75rem; }
.ds-info .ds-rents { font-size: .78rem; }
.ds-info .ds-detail p { margin: .25rem 0; }
.avatar.seat-0 { background: var(--pc0, #2563eb); }
.avatar.seat-1 { background: var(--pc1, #7c3aed); }
.avatar.seat-2 { background: var(--pc2, #dc2626); }
.avatar.seat-3 { background: var(--pc3, #16a34a); }
.avatar.seat-4 { background: var(--pc4, #ea580c); }
.avatar.seat-5 { background: var(--pc5, #ca8a04); }
.avatar.seat-6 { background: var(--pc6, #0d9488); }
.avatar.seat-7 { background: var(--pc7, #db2777); }
.avatar.seat-8 { background: var(--pc8, #0284c7); }
.avatar.seat-9 { background: var(--pc9, #92400e); }
.avatar.seat-10 { background: var(--pc10, #475569); }
.avatar.seat-11 { background: var(--pc11, #65a30d); }

/* player colours */
.sl-piece.p0 { background: var(--pc0, #2563eb); }
.sl-piece.p1 { background: var(--pc1, #7c3aed); }
.c4-disc.d0 { background: var(--pc0, #2563eb); }
.c4-disc.d1 { background: var(--pc1, #7c3aed); }
.ch-p.w, .dr-p.w { color: var(--pc0, #2563eb); }
.ch-p.b, .dr-p.b { color: var(--pc1, #7c3aed); }
.rps-side.seat-0 .rps-pip.on { background: var(--pc0, #2563eb); border-color: var(--pc0, #2563eb); }
.rps-side.seat-1 .rps-pip.on { background: var(--pc1, #7c3aed); border-color: var(--pc1, #7c3aed); }
.rps-hand.mine { color: var(--mine, #2563eb); }
.rps-hand.theirs { color: var(--theirs, #7c3aed); }

/* colour picker */
.pc-pick { margin-top: .75rem; padding: .6rem .7rem; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-ffffff); }
.pc-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.pc-sw { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; padding: 0; position: relative; }
.pc-sw.is-on { box-shadow: 0 0 0 3px #0f172a; }
.pc-sw.is-taken { opacity: .25; cursor: not-allowed; }
.pick-colours { border: 0; padding: 0; margin: .75rem 0; }
.pick-colours legend { font-weight: 700; font-size: .9rem; padding: 0; margin-bottom: .4rem; }
.pick-row { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; }
.pick-sw { position: relative; cursor: pointer; }
.pick-sw input { position: absolute; opacity: 0; inset: 0; }
.pick-sw.is-taken { opacity: .25; cursor: not-allowed; }
.pick-sw input + span { display: block; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; }
.pick-sw input:checked + span { box-shadow: 0 0 0 3px #0f172a; }
.pick-sw input:focus-visible + span { outline: 2px solid #7c3aed; outline-offset: 3px; }
.ttt-cell.x i, .ttt-cell.x svg { color: var(--pc0, #2563eb); }
.ttt-cell.o i, .ttt-cell.o svg { color: var(--pc1, #7c3aed); }
.c4-drop.ready { color: var(--pc0, #2563eb); }
.c4-drop.ready.seat-1 { color: var(--pc1, #7c3aed); }
.mm-side.seat-0 { border-left-color: var(--pc0, #2563eb); }
.mm-side.seat-1 { border-left-color: var(--pc1, #7c3aed); }
.mm-card.matched.owner-me { border-color: var(--mine, #2563eb); background: color-mix(in srgb, var(--mine, #2563eb) 12%, var(--g-bg-ffffff)); }
.mm-card.matched.owner-them { border-color: var(--theirs, #7c3aed); background: color-mix(in srgb, var(--theirs, #7c3aed) 12%, var(--g-bg-ffffff)); }
.ww-tile.sel, .ww-tile.mine { border-color: var(--mine, #2563eb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mine, #2563eb) 28%, transparent); }
.ww-tile.theirs { border-color: var(--theirs, #7c3aed); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theirs, #7c3aed) 28%, transparent); }

/* Deal Street title deed */
.ds-info .ds-detail.ds-deed { padding: 0; border: 2px solid #0f172a; border-radius: 4px; background: var(--g-bg-ffffff); text-align: center; overflow: hidden; box-shadow: 0 3px 8px rgba(15, 23, 42, .2); }
.ds-deed .dd-head { position: relative; margin: .35rem; padding: .4rem .5rem .5rem; border: 1px solid #0f172a; }
.ds-deed .dd-kind { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.ds-deed .dd-name { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; line-height: 1.15; }
.ds-deed .ds-x { position: absolute; top: 1px; right: 1px; color: inherit; }
.ds-deed .dd-body { padding: .1rem .75rem; font-size: .8rem; }
.ds-deed .dd-rent { font-size: .95rem; margin: .2rem 0; }
.ds-deed .dd-row { display: flex; justify-content: space-between; text-align: left; padding: 1px .4rem; }
.ds-deed .dd-sub { margin-top: .35rem; line-height: 1.45; font-size: .85rem; }
.ds-deed .dd-foot { margin: .35rem .6rem .45rem; font-size: .62rem; line-height: 1.25; color: var(--g-tx-334155); }
.ds-deed .dd-foot { overflow-wrap: anywhere; box-sizing: border-box; padding: 0 .1rem; }
.ds-deed { box-sizing: border-box; }
.ds-center { gap: .9rem; padding-top: .9rem; }
.ds-title { margin-bottom: .3rem; }
.ds-dice { padding: .6rem 0; }
.ds-center .ds-dice + * { margin-top: .3rem; }

/* Whiteboard fonts and clear vote */
@font-face { font-family: 'WBArchive'; src: url('../fonts/Archive-Regular.otf') format('opentype'); font-weight: normal; font-style: normal; font-display: swap; }
.wb-fontsel { display: inline-flex; align-items: center; gap: .4rem; }
.wb-fontsel .input { width: auto; min-width: 8rem; }
.wb-vote { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .5rem .75rem; border: 1px solid var(--g-bd-c4b5fd); background: var(--g-bg-f5f3ff); border-radius: var(--radius); }
.wb-vote[hidden] { display: none; }

/* Whiteboard options panel, tidied */
.wb-opts { display: grid; grid-template-columns: 4.5rem 1fr; align-items: center; gap: .6rem 1rem; padding: .75rem 1rem; border: 1px solid var(--g-bd-e2e8f0); border-radius: var(--radius); background: var(--g-bg-f8fafc); }
.wb-opts .wb-lbl { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--g-tx-64748b); }
.wb-opts .wb-sizes, .wb-opts .wb-fillrow { margin-left: 0; }
.wb-extra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; }
.wb-extra .check { margin: 0; font-size: .9rem; }
.wb-extra .wb-fontsel { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--g-tx-334155); }
.wb-extra .wb-fontsel .input { min-width: 9rem; padding: .3rem .5rem; font-size: .9rem; }
@media (max-width: 520px) { .wb-opts { grid-template-columns: 1fr; gap: .3rem; } .wb-opts .wb-lbl { margin-top: .3rem; } }

/* Block Battle */
.bk-wrap { padding: .75rem; border-radius: 18px; background: linear-gradient(160deg, var(--g-bg-fdf2f8) 0%, var(--g-bg-f5f3ff) 45%, var(--g-bg-ecfeff) 100%); border: 1px solid var(--g-bd-e9d5ff); }
.bk-main { display: flex; justify-content: center; align-items: flex-start; gap: .6rem; }
.bk-side { flex: 0 0 5.2rem; display: flex; flex-direction: column; gap: .6rem; }
.bk-box { background: rgba(var(--surface-rgb), .85); border: 1px solid var(--g-bd-e9d5ff); border-radius: 14px; padding: .4rem; text-align: center; box-shadow: 0 2px 6px rgba(167, 139, 250, .15); }
.bk-box canvas { display: block; width: 100%; height: auto; }
.bk-lbl { display: block; font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #a78bfa; margin: .1rem 0; }
.bk-stats strong { display: block; font-family: 'Sora', sans-serif; font-size: 1.1rem; color: var(--g-tx-4c1d95); margin-bottom: .3rem; }
.bk-stage { position: relative; flex: 0 1 300px; min-width: 0; padding-left: .7rem; }
.bk-cv { display: block; width: 100%; height: auto; border-radius: 14px; background: linear-gradient(180deg, var(--g-bg-fffafc), var(--g-bg-f0f9ff)); border: 3px solid var(--mc, var(--g-bd-c4b5fd)); box-shadow: 0 6px 18px rgba(167, 139, 250, .3); touch-action: none; }
.bk-gpw { position: absolute; left: 0; top: 0; bottom: 0; width: .45rem; background: var(--g-bg-fce7f3); border-radius: 99px; overflow: hidden; display: flex; align-items: flex-end; }
.bk-gp { display: block; width: 100%; height: 0; background: linear-gradient(0deg, #fb7185, var(--g-bg-f9a8d4)); transition: height .25s; }
.bk-gp-n { position: absolute; left: .7rem; bottom: -1.3rem; font-size: .72rem; color: var(--g-tx-be185d); font-weight: 700; }
.bk-ovl { position: absolute; inset: 0 0 0 .7rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-radius: 14px; background: rgba(var(--surface-rgb), .72); backdrop-filter: blur(2px); color: var(--g-tx-4c1d95); }
.bk-ovl[hidden] { display: none; }
.bk-ovl strong { font-family: 'Sora', sans-serif; font-size: 2.4rem; }
.bk-ovl span { font-weight: 600; }
.bk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 20rem; margin: 1.6rem auto .4rem; }
.bk-btn { border: 0; border-radius: 14px; padding: .8rem 0; font-size: 1.2rem; background: linear-gradient(135deg, var(--g-bg-e0e7ff), var(--g-bg-fbcfe8)); color: var(--g-tx-4c1d95); box-shadow: 0 2px 5px rgba(167, 139, 250, .3); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.bk-btn:active { transform: translateY(1px); filter: brightness(.96); }
.bk-btn.wide { grid-column: span 1; }
.bk-help { text-align: center; margin: .2rem 0 .8rem; }
@media (hover: hover) and (min-width: 900px) { .bk-pad { display: none; } .bk-gp-n { bottom: -1.3rem; } }
.bk-opps { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: .4rem; }
.bk-opp { background: rgba(var(--surface-rgb), .85); border: 2px solid var(--oc, var(--g-bd-c4b5fd)); border-radius: 14px; padding: .4rem .5rem; width: 8.2rem; text-align: center; }
.bk-opp-h { display: flex; align-items: center; justify-content: center; gap: .3rem; font-size: .8rem; overflow: hidden; white-space: nowrap; }
.bk-opp-h strong { overflow: hidden; text-overflow: ellipsis; }
.bk-opp-dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--oc); flex: none; }
.bk-opp-b { position: relative; display: flex; gap: 3px; margin: .3rem 0; }
.bk-opp-b canvas { width: 100%; height: auto; border-radius: 8px; background: linear-gradient(180deg, var(--g-bg-fffafc), var(--g-bg-f0f9ff)); }
.bk-opp-gw { flex: 0 0 4px; background: var(--g-bg-fce7f3); border-radius: 99px; display: flex; align-items: flex-end; overflow: hidden; }
.bk-opp-g { display: block; width: 100%; height: 0; background: #fb7185; }
.bk-opp-x { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; font-weight: 800; letter-spacing: .1em; color: var(--g-tx-be185d); background: rgba(var(--surface-rgb), .6); border-radius: 8px; }
.bk-opp.is-out .bk-opp-x { display: flex; }
.bk-opp.is-out { opacity: .75; }

/* Drop a game from the resume bar */
.resume-wrap { display: inline-flex; align-items: stretch; gap: .25rem; }
.resume-drop { display: inline-flex; margin: 0; }
/* The End / Leave buttons are red, labelled and always above the seasonal decorations */
.resume-trash { border: 2px solid #b91c1c; background: #dc2626; color: #fff; border-radius: 6px; padding: .15rem .7rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font-weight: 800; font-size: .85rem; position: relative; z-index: 9999; box-shadow: 0 2px 0 #7f1d1d; }
.resume-trash:hover { background: #b91c1c; border-color: #7f1d1d; }
.resume-trash svg { width: 1.1rem; height: 1.1rem; }
.btn-end { background: #dc2626; color: #fff; border: 2px solid #b91c1c; font-weight: 800; box-shadow: 0 2px 0 #7f1d1d; }
.btn-end:hover { background: #b91c1c; border-color: #7f1d1d; color: #fff; }
.btn-end svg { width: 1.1rem; height: 1.1rem; }
.xm-safe { position: relative; z-index: 9999; }
body.xmas-behind main { z-index: 3; }
/* the seasonal garland hangs from the header, so keep the games bar clear underneath it */
body.xmas-decor .resume-bar { padding-top: 24px; }

/* Play the computer */
.game-card form { width: 100%; }
.cpu-row { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--border, var(--g-bd-dcd7ea)); display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.cpu-pick { display: flex; gap: .5rem; flex-wrap: wrap; }
.cpu-pick .input { width: auto; padding: .4rem .6rem; min-width: 0; }
.cpu-row .btn { margin-top: 0; }

/* Word Duel hints */
.wd-hints { display: flex; flex-direction: column; gap: .4rem; align-items: center; margin: .5rem 0 1rem; text-align: center; }
.wd-cat { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: var(--bg-soft, var(--g-bg-eef0ff)); }
.wd-hint-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.wd-t.hint { border-style: dashed; }
.wd-t.hint.has { background: var(--g-bg-fff3c4); border-color: #e0b400; color: var(--g-tx-5a4600); border-style: solid; }

/* ===== Game chat ===== */
.chat { padding: 0; overflow: hidden; }
.chat-toggle { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; padding: .85rem 1rem; background: none; border: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.chat-toggle > span:first-child { display: inline-flex; align-items: center; gap: .5rem; }
.chat-toggle:focus-visible { outline: 2px solid var(--indigo); outline-offset: -2px; }
.chat-chev { transition: transform .15s; margin-left: auto; }
.chat.is-closed .chat-chev { transform: rotate(-90deg); }
.chat.is-closed .chat-body { display: none; }
.chat-badge { background: #e11d48; color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 800; padding: .1rem .45rem; min-width: 1.3rem; text-align: center; margin-left: auto; }
.chat-badge + .chat-chev { margin-left: .5rem; }
.chat-empty { margin: auto; text-align: center; }
.chat-ic, .chat-b svg { width: 1.15em; height: 1.15em; vertical-align: -.2em; color: var(--indigo); display: inline-block; }
.chat-r { border: 1px solid var(--line); background: var(--g-bg-ffffff); border-radius: 999px; padding: .05rem .5rem; font-size: .8rem; cursor: pointer; line-height: 1.5; }
.chat-r.is-me { border-color: var(--indigo); background: var(--g-bg-eef2ff); }
.chat-r span { font-weight: 700; font-size: .72rem; }
.chat-ev svg, .chat-ev i { width: .9rem; height: .9rem; flex: none; }
.chat-react-bar { display: flex; gap: .1rem; flex-wrap: wrap; padding-bottom: .25rem; border-bottom: 1px solid var(--line); margin-bottom: .15rem; }
.chat-react-bar button { background: none; border: 0; font-size: 1.15rem; cursor: pointer; border-radius: 8px; padding: .15rem .3rem; }
.chat-react-bar button:hover { background: var(--bg-soft); }
.chat-mi { display: flex; align-items: center; gap: .5rem; background: none; border: 0; font: inherit; font-size: .85rem; padding: .35rem .5rem; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); }
.chat-mi:hover { background: var(--bg-soft); }
.chat-mi svg, .chat-mi i { width: 1rem; height: 1rem; }
.chat-typing { min-height: 1.1rem; font-style: italic; }
.chat-link { background: none; border: 0; color: var(--indigo); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.chat-q:hover { border-color: var(--indigo); color: var(--indigo); }
.chat-form { position: relative; display: flex; flex-direction: column; gap: .25rem; }
.chat-row { display: flex; gap: .35rem; align-items: center; }
.chat-row .input { flex: 1; min-width: 0; }
.chat-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; border: 1px solid var(--line); background: var(--g-bg-ffffff); cursor: pointer; color: var(--ink); }
.chat-btn:hover { border-color: var(--indigo); color: var(--indigo); }
.chat-send { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.chat-send:hover { color: #fff; filter: brightness(1.08); }
.chat-btn svg, .chat-btn i { width: 1.15rem; height: 1.15rem; }
.chat-meta { display: flex; justify-content: space-between; min-height: 1.1rem; }
#chat-err { color: var(--g-tx-be123c); }
#chat-count.is-over { color: var(--g-tx-be123c); font-weight: 700; }
.chat-pick { position: absolute; bottom: 3rem; left: 0; right: 0; z-index: 6; background: var(--g-bg-ffffff); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); padding: .4rem; }
.chat-tabs { display: flex; gap: .25rem; margin-bottom: .35rem; }
.chat-tabs button { flex: 1; border: 0; background: var(--bg-soft); border-radius: 8px; padding: .3rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; color: var(--muted); }
.chat-tabs button.is-on { background: var(--indigo); color: #fff; }
.chat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.2rem, 1fr)); gap: .15rem; max-height: 10.5rem; overflow-y: auto; }
.chat-pk { border: 0; background: none; border-radius: 8px; height: 2.2rem; font-size: 1.25rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--indigo); }
.chat-pk:hover, .chat-pk:focus-visible { background: var(--bg-soft); }
.chat-pk svg, .chat-pk i { width: 1.3rem; height: 1.3rem; }
.chat-body { border-top: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: .75rem; background: var(--bg-soft); }
.chat-list { height: 20rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding: .25rem .35rem .25rem .1rem; overscroll-behavior: contain; scroll-behavior: smooth; }
.chat-m { display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; align-self: flex-start; }
.chat-m.is-mine { align-self: flex-end; align-items: flex-end; }
.chat-who { display: flex; align-items: center; gap: .6rem; font-size: .8rem; margin: 0 .5rem .25rem; }
.chat-m.is-mine .chat-who { flex-direction: row-reverse; }
.chat-who strong { font-weight: 700; }
.chat-dot { width: .65rem; height: .65rem; border-radius: 50%; flex: none; }
.chat-time { color: var(--muted); font-size: .72rem; margin-left: .35rem; }
.chat-m.is-mine .chat-time { margin: 0 .35rem 0 0; }
.chat-dots { background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 6px; padding: .15rem .3rem; line-height: 0; opacity: .55; transition: opacity .15s, background .15s; }
.chat-m:hover .chat-dots, .chat-dots:focus-visible, .chat-dots[aria-expanded="true"] { opacity: 1; }
.chat-dots:hover { background: rgba(100, 116, 139, .15); color: var(--ink); }
.chat-dots i, .chat-dots svg { width: 1rem; height: 1rem; }
.chat-b { position: relative; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.45; padding: .6rem .9rem; background: var(--g-bg-ffffff); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.chat-m.is-mine .chat-b { background: var(--grad); color: #fff; border-color: transparent; border-radius: 18px 18px 4px 18px; }
.chat-m.is-mine .chat-b svg, .chat-m.is-mine .chat-ic { color: #fff; }
.chat-rs { display: flex; flex-wrap: wrap; gap: .3rem; }
.chat-rs:not(:empty) { margin-top: .35rem; }
.chat-m.is-mine .chat-rs { justify-content: flex-end; }
.chat-menu { margin-top: .4rem; background: var(--g-bg-ffffff); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .15); padding: .45rem; display: flex; flex-direction: column; gap: .2rem; min-width: 13rem; color: var(--ink); }
.chat-ev { display: flex; align-items: center; gap: .45rem; justify-content: center; align-self: center; font-size: .78rem; color: var(--muted); text-align: center; background: rgba(100, 116, 139, .12); border-radius: 999px; padding: .25rem .8rem; }
.chat-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-q { border: 1px solid var(--line); background: var(--g-bg-ffffff); border-radius: 999px; padding: .3rem .8rem; font-size: .8rem; font-family: inherit; cursor: pointer; color: var(--ink); }
.chat-switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .2rem .75rem; margin-bottom: .75rem; }

.turn-toast{position:fixed;top:16px;left:50%;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:.5rem;padding:.7rem 1.1rem;border-radius:999px;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.25);animation:turn-in .3s ease;transition:opacity .4s}
.turn-toast.is-out{opacity:0}
.turn-toast svg{width:20px;height:20px}
@keyframes turn-in{from{opacity:0;transform:translate(-50%,-12px)}to{opacity:1;transform:translate(-50%,0)}}
.turn-sound{position:fixed;right:14px;bottom:14px;z-index:40;width:42px;height:42px;border-radius:50%;border:1px solid var(--border,var(--g-bd-d1d5db));background:var(--surface,var(--g-bg-ffffff));color:inherit;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.turn-sound svg{width:20px;height:20px}
@media (prefers-reduced-motion:reduce){.turn-toast{animation:none}}

@media (max-width: 900px) { .chat-list { height: 16rem; } .chat-m { max-width: 92%; } }

.chat-tray { display: flex; flex-wrap: wrap; gap: .35rem; padding: .4rem; background: var(--g-bg-ffffff); border: 1px solid var(--line); border-radius: 12px; }
.chat-chip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; border: 1px solid var(--g-bd-c7d2fe); background: var(--g-bg-eef2ff); color: var(--indigo); cursor: pointer; }
.chat-chip svg, .chat-chip i { width: 1.3rem; height: 1.3rem; }
.chat-chip-x { position: absolute; top: -.4rem; right: -.4rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #475569; color: #fff; font-size: .8rem; line-height: 1.05rem; text-align: center; opacity: 0; transition: opacity .15s; }
.chat-chip:hover .chat-chip-x, .chat-chip:focus-visible .chat-chip-x { opacity: 1; }
.chat button svg, .chat button i { pointer-events: none; }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }
.badge-watch { display: inline-flex; align-items: center; gap: .3rem; }
.avatar svg, .avatar i { width: 1.1rem; height: 1.1rem; }

.chat-dot { display: inline-flex; align-items: center; justify-content: center; }
.chat-dot:has(svg), .chat-dot:has(i) { width: 1.3rem; height: 1.3rem; color: #fff; }
.chat-dot svg, .chat-dot i { width: .8rem; height: .8rem; }

/* ===== Dark mode ===== */
:root { --page: #fff; --surface-rgb: 255, 255, 255; color-scheme: light; }
:root {
  --g-bd-86efac: #86efac;
  --g-bd-a5b4fc: #a5b4fc;
  --g-bd-a78bfa: #a78bfa;
  --g-bd-bbf7d0: #bbf7d0;
  --g-bd-c4b5fd: #c4b5fd;
  --g-bd-c7d2fe: #c7d2fe;
  --g-bd-cbd5e1: #cbd5e1;
  --g-bd-d1d5db: #d1d5db;
  --g-bd-dcd7ea: #dcd7ea;
  --g-bd-ddd6fe: #ddd6fe;
  --g-bd-e0e7ff: #e0e7ff;
  --g-bd-e2e8f0: #e2e8f0;
  --g-bd-e5e7eb: #e5e7eb;
  --g-bd-e9d5ff: #e9d5ff;
  --g-bd-f1f5f9: #f1f5f9;
  --g-bd-f87171: #f87171;
  --g-bd-fb7185: #fb7185;
  --g-bd-fca5a5: #fca5a5;
  --g-bd-fda4af: #fda4af;
  --g-bd-fde68a: #fde68a;
  --g-bd-fecaca: #fecaca;
  --g-bd-fecdd3: #fecdd3;
  --g-bg-b4bff3: #b4bff3;
  --g-bg-bae6fd: #bae6fd;
  --g-bg-bfdbfe: #bfdbfe;
  --g-bg-c4b5fd: #c4b5fd;
  --g-bg-c7d2fe: #c7d2fe;
  --g-bg-cbd5e1: #cbd5e1;
  --g-bg-ccfbf1: #ccfbf1;
  --g-bg-dbeafe: #dbeafe;
  --g-bg-dcfce7: #dcfce7;
  --g-bg-ddd6fe: #ddd6fe;
  --g-bg-e0e7ff: #e0e7ff;
  --g-bg-e2e8f0: #e2e8f0;
  --g-bg-e5e7eb: #e5e7eb;
  --g-bg-ecfeff: #ecfeff;
  --g-bg-ede9fe: #ede9fe;
  --g-bg-eef0ff: #eef0ff;
  --g-bg-eef2ff: #eef2ff;
  --g-bg-eff6ff: #eff6ff;
  --g-bg-f0f9ff: #f0f9ff;
  --g-bg-f0fdf4: #f0fdf4;
  --g-bg-f1f5f9: #f1f5f9;
  --g-bg-f5f3ff: #f5f3ff;
  --g-bg-f8fafc: #f8fafc;
  --g-bg-f9a8d4: #f9a8d4;
  --g-bg-faf5ff: #faf5ff;
  --g-bg-fbcfe8: #fbcfe8;
  --g-bg-fca5a5: #fca5a5;
  --g-bg-fce7f3: #fce7f3;
  --g-bg-fda4af: #fda4af;
  --g-bg-fdf2f8: #fdf2f8;
  --g-bg-fecdd3: #fecdd3;
  --g-bg-fee2e2: #fee2e2;
  --g-bg-fef2f2: #fef2f2;
  --g-bg-fef3c7: #fef3c7;
  --g-bg-fef9c3: #fef9c3;
  --g-bg-ffe4e6: #ffe4e6;
  --g-bg-fff1f2: #fff1f2;
  --g-bg-fff3c4: #fff3c4;
  --g-bg-fff7ed: #fff7ed;
  --g-bg-fffafc: #fffafc;
  --g-bg-fffbeb: #fffbeb;
  --g-bg-ffffff: #ffffff;
  --g-tx-0f172a: #0f172a;
  --g-tx-0f766e: #0f766e;
  --g-tx-111827: #111827;
  --g-tx-14532d: #14532d;
  --g-tx-15803d: #15803d;
  --g-tx-166534: #166534;
  --g-tx-16a34a: #16a34a;
  --g-tx-1e1b4b: #1e1b4b;
  --g-tx-1e293b: #1e293b;
  --g-tx-1e3a8a: #1e3a8a;
  --g-tx-1f2937: #1f2937;
  --g-tx-334155: #334155;
  --g-tx-3730a3: #3730a3;
  --g-tx-422006: #422006;
  --g-tx-475569: #475569;
  --g-tx-4c1d95: #4c1d95;
  --g-tx-5a4600: #5a4600;
  --g-tx-64748b: #64748b;
  --g-tx-6b7280: #6b7280;
  --g-tx-78350f: #78350f;
  --g-tx-7f1d1d: #7f1d1d;
  --g-tx-854d0e: #854d0e;
  --g-tx-991b1b: #991b1b;
  --g-tx-b45309: #b45309;
  --g-tx-be123c: #be123c;
  --g-tx-be185d: #be185d;
  --g-tx-ca8a04: #ca8a04;
  --g-tx-d97706: #d97706;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0b1020; --surface-rgb: 20, 26, 46;
  --ink: #e6e8f2; --muted: #9aa3b8; --line: #2a3350; --bg-soft: #10162a;
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --g-bd-86efac: #2d6542;
  --g-bd-a5b4fc: #222d5f;
  --g-bd-a78bfa: #362666;
  --g-bd-bbf7d0: #255536;
  --g-bd-c4b5fd: #2c205a;
  --g-bd-c7d2fe: #1e2955;
  --g-bd-cbd5e1: #363e47;
  --g-bd-d1d5db: #3b3e42;
  --g-bd-dcd7ea: #363143;
  --g-bd-ddd6fe: #251c50;
  --g-bd-e0e7ff: #1a264e;
  --g-bd-e2e8f0: #2e353f;
  --g-bd-e5e7eb: #34363b;
  --g-bd-e9d5ff: #351b51;
  --g-bd-f1f5f9: #28323c;
  --g-bd-f87171: #6e2929;
  --g-bd-fb7185: #6f2832;
  --g-bd-fca5a5: #5f2222;
  --g-bd-fda4af: #5f2229;
  --g-bd-fde68a: #675a24;
  --g-bd-fecaca: #541d1d;
  --g-bd-fecdd3: #531d24;
  --g-bg-b4bff3: #262e58;
  --g-bg-bae6fd: #1b4155;
  --g-bg-bfdbfe: #193252;
  --g-bg-c4b5fd: #281c58;
  --g-bg-c7d2fe: #17224c;
  --g-bg-cbd5e1: #343c45;
  --g-bg-ccfbf1: #1a483e;
  --g-bg-dbeafe: #14263f;
  --g-bg-dcfce7: #163d24;
  --g-bg-ddd6fe: #1d1542;
  --g-bg-e0e7ff: #111b3c;
  --g-bg-e2e8f0: #252b34;
  --g-bg-e5e7eb: #2a2c30;
  --g-bg-ecfeff: #0f3234;
  --g-bg-ede9fe: #181235;
  --g-bg-eef0ff: #0f1333;
  --g-bg-eef2ff: #0f1733;
  --g-bg-eff6ff: #0f1e32;
  --g-bg-f0f9ff: #0e2331;
  --g-bg-f0fdf4: #132f1b;
  --g-bg-f1f5f9: #1b222a;
  --g-bg-f5f3ff: #130e2f;
  --g-bg-f8fafc: #171e24;
  --g-bg-f9a8d4: #612244;
  --g-bg-faf5ff: #1e0d2e;
  --g-bg-fbcfe8: #461a33;
  --g-bg-fca5a5: #632020;
  --g-bg-fce7f3: #351527;
  --g-bg-fda4af: #641f27;
  --g-bg-fdf2f8: #2d1321;
  --g-bg-fecdd3: #48161c;
  --g-bg-fee2e2: #3a1313;
  --g-bg-fef2f2: #2e1111;
  --g-bg-fef3c7: #4c4217;
  --g-bg-fef9c3: #4f4a18;
  --g-bg-ffe4e6: #391114;
  --g-bg-fff1f2: #310e11;
  --g-bg-fff3c4: #4f4317;
  --g-bg-fff7ed: #33230f;
  --g-bg-fffafc: #2b0c19;
  --g-bg-fffbeb: #352d0f;
  --g-bg-ffffff: #141a2e;
  --g-tx-0f172a: #dbe1f0;
  --g-tx-0f766e: #bff4f0;
  --g-tx-111827: #dce2ef;
  --g-tx-14532d: #cff1dd;
  --g-tx-15803d: #bbf0cf;
  --g-tx-166534: #c7f0d7;
  --g-tx-16a34a: #acf0c5;
  --g-tx-1e1b4b: #d5d3ed;
  --g-tx-1e293b: #dbe1eb;
  --g-tx-1e3a8a: #b7c5ec;
  --g-tx-1f2937: #dde3eb;
  --g-tx-334155: #d0d7e1;
  --g-tx-3730a3: #b0ade3;
  --g-tx-422006: #f9e3d2;
  --g-tx-475569: #c8ced8;
  --g-tx-4c1d95: #c9b2ec;
  --g-tx-5a4600: #fcf1ca;
  --g-tx-64748b: #b9c0cb;
  --g-tx-6b7280: #bec1c7;
  --g-tx-78350f: #f4d2be;
  --g-tx-7f1d1d: #ecbcbc;
  --g-tx-854d0e: #f4d8b9;
  --g-tx-991b1b: #edb1b1;
  --g-tx-b45309: #f6c7a4;
  --g-tx-be123c: #f1a0b4;
  --g-tx-be185d: #eea0c1;
  --g-tx-ca8a04: #f8da9a;
  --g-tx-d97706: #f6c994;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0b1020; --surface-rgb: 20, 26, 46;
    --ink: #e6e8f2; --muted: #9aa3b8; --line: #2a3350; --bg-soft: #10162a;
    --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --g-bd-86efac: #2d6542;
    --g-bd-a5b4fc: #222d5f;
    --g-bd-a78bfa: #362666;
    --g-bd-bbf7d0: #255536;
    --g-bd-c4b5fd: #2c205a;
    --g-bd-c7d2fe: #1e2955;
    --g-bd-cbd5e1: #363e47;
    --g-bd-d1d5db: #3b3e42;
    --g-bd-dcd7ea: #363143;
    --g-bd-ddd6fe: #251c50;
    --g-bd-e0e7ff: #1a264e;
    --g-bd-e2e8f0: #2e353f;
    --g-bd-e5e7eb: #34363b;
    --g-bd-e9d5ff: #351b51;
    --g-bd-f1f5f9: #28323c;
    --g-bd-f87171: #6e2929;
    --g-bd-fb7185: #6f2832;
    --g-bd-fca5a5: #5f2222;
    --g-bd-fda4af: #5f2229;
    --g-bd-fde68a: #675a24;
    --g-bd-fecaca: #541d1d;
    --g-bd-fecdd3: #531d24;
    --g-bg-b4bff3: #262e58;
    --g-bg-bae6fd: #1b4155;
    --g-bg-bfdbfe: #193252;
    --g-bg-c4b5fd: #281c58;
    --g-bg-c7d2fe: #17224c;
    --g-bg-cbd5e1: #343c45;
    --g-bg-ccfbf1: #1a483e;
    --g-bg-dbeafe: #14263f;
    --g-bg-dcfce7: #163d24;
    --g-bg-ddd6fe: #1d1542;
    --g-bg-e0e7ff: #111b3c;
    --g-bg-e2e8f0: #252b34;
    --g-bg-e5e7eb: #2a2c30;
    --g-bg-ecfeff: #0f3234;
    --g-bg-ede9fe: #181235;
    --g-bg-eef0ff: #0f1333;
    --g-bg-eef2ff: #0f1733;
    --g-bg-eff6ff: #0f1e32;
    --g-bg-f0f9ff: #0e2331;
    --g-bg-f0fdf4: #132f1b;
    --g-bg-f1f5f9: #1b222a;
    --g-bg-f5f3ff: #130e2f;
    --g-bg-f8fafc: #171e24;
    --g-bg-f9a8d4: #612244;
    --g-bg-faf5ff: #1e0d2e;
    --g-bg-fbcfe8: #461a33;
    --g-bg-fca5a5: #632020;
    --g-bg-fce7f3: #351527;
    --g-bg-fda4af: #641f27;
    --g-bg-fdf2f8: #2d1321;
    --g-bg-fecdd3: #48161c;
    --g-bg-fee2e2: #3a1313;
    --g-bg-fef2f2: #2e1111;
    --g-bg-fef3c7: #4c4217;
    --g-bg-fef9c3: #4f4a18;
    --g-bg-ffe4e6: #391114;
    --g-bg-fff1f2: #310e11;
    --g-bg-fff3c4: #4f4317;
    --g-bg-fff7ed: #33230f;
    --g-bg-fffafc: #2b0c19;
    --g-bg-fffbeb: #352d0f;
    --g-bg-ffffff: #141a2e;
    --g-tx-0f172a: #dbe1f0;
    --g-tx-0f766e: #bff4f0;
    --g-tx-111827: #dce2ef;
    --g-tx-14532d: #cff1dd;
    --g-tx-15803d: #bbf0cf;
    --g-tx-166534: #c7f0d7;
    --g-tx-16a34a: #acf0c5;
    --g-tx-1e1b4b: #d5d3ed;
    --g-tx-1e293b: #dbe1eb;
    --g-tx-1e3a8a: #b7c5ec;
    --g-tx-1f2937: #dde3eb;
    --g-tx-334155: #d0d7e1;
    --g-tx-3730a3: #b0ade3;
    --g-tx-422006: #f9e3d2;
    --g-tx-475569: #c8ced8;
    --g-tx-4c1d95: #c9b2ec;
    --g-tx-5a4600: #fcf1ca;
    --g-tx-64748b: #b9c0cb;
    --g-tx-6b7280: #bec1c7;
    --g-tx-78350f: #f4d2be;
    --g-tx-7f1d1d: #ecbcbc;
    --g-tx-854d0e: #f4d8b9;
    --g-tx-991b1b: #edb1b1;
    --g-tx-b45309: #f6c7a4;
    --g-tx-be123c: #f1a0b4;
    --g-tx-be185d: #eea0c1;
    --g-tx-ca8a04: #f8da9a;
    --g-tx-d97706: #f6c994;
  }
}

/* ===== Avatars, friends, leaderboard, profile, badges, toasts ===== */
:root { --surface: var(--g-bg-ffffff); }
:root[data-theme="dark"] a:not(.btn):not(.chip):not(.brand) { color: #a5b0ff; }
:root[data-theme="dark"] a:not(.btn):not(.chip):not(.brand):hover { color: #c4b5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a:not(.btn):not(.chip):not(.brand) { color: #a5b0ff; }
  :root:not([data-theme="light"]) a:not(.btn):not(.chip):not(.brand):hover { color: #c4b5fd; }
}
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { color: var(--indigo); text-decoration: underline; }
.ico-sun { display: none; }
:root[data-theme="dark"] .ico-sun { display: inline-block; }
:root[data-theme="dark"] .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-sun { display: inline-block; }
  :root:not([data-theme="light"]) .ico-moon { display: none; }
}
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }

.av { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; color: #fff; font-weight: 800; flex: none; line-height: 1; }
.av svg, .av i { width: 55%; height: 55%; }
.av-sm { width: 1.9rem; height: 1.9rem; font-size: .85rem; }
.av-xl { width: 5rem; height: 5rem; font-size: 2rem; }
.av-xl svg { width: 2.6rem; height: 2.6rem; }

.nav-badge { background: #e11d48; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 800; padding: .05rem .4rem; margin-left: .2rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 600; }
.chip svg, .chip i { width: .95rem; height: .95rem; }
.chip:hover { border-color: var(--indigo); color: var(--indigo); }
.chip.is-on { background: var(--grad); color: #fff; border-color: transparent; }

.lb-filters { margin-bottom: 1rem; }
.lb-table td.num, .lb-table th.num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-name { display: inline-flex; align-items: center; gap: .6rem; }
.lb-table tr.is-me { background: var(--grad-soft); }
.lb-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7rem; height: 1.7rem; border-radius: 50%; font-weight: 800; font-size: .85rem; background: var(--bg-soft); }
.lb-rank.top1 { background: #fde68a; color: #78350f; }
.lb-rank.top2 { background: #e2e8f0; color: #334155; }
.lb-rank.top3 { background: #fdba74; color: #7c2d12; }
.lb-mini { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.lb-mini li { display: flex; align-items: center; gap: .6rem; }
.lb-mini li a { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.profile-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 12rem; }
.profile-id h1 { margin: 0; }
.pstat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.pstat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; }
.pstat strong { font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; }
.pstat span { color: var(--muted); font-size: .85rem; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.ach { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; display: flex; flex-direction: column; gap: .15rem; opacity: .5; filter: grayscale(1); }
.ach.is-got { opacity: 1; filter: none; border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.ach-ico { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--grad); color: #fff; margin-bottom: .25rem; }
.ach-ico svg, .ach-ico i { width: 1.2rem; height: 1.2rem; }

.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.people li { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.people li > a, .people-name { flex: 1; min-width: 8rem; }
.people-name { display: flex; flex-direction: column; line-height: 1.3; }
.people-actions { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.people-lg li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.people-lg li:last-child { border-bottom: 0; }
.invite-form { display: inline-flex; gap: .3rem; }
.invite-form select { max-width: 11rem; padding: .3rem .5rem; }
.presence { position: relative; display: inline-flex; }
.presence .dot { position: absolute; right: -1px; bottom: -1px; width: .7rem; height: .7rem; border-radius: 50%; background: #94a3b8; border: 2px solid var(--surface); }
.presence.is-on .dot { background: #22c55e; }
.h-xs { font-size: .95rem; margin: 1rem 0 .4rem; }

.pick-icons, .pick-colours { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.pick-icons legend, .pick-colours legend { font-weight: 700; font-size: .9rem; padding: 0; margin-bottom: .4rem; }
.pick-ic { position: relative; cursor: pointer; }
.pick-ic input { position: absolute; opacity: 0; inset: 0; }
.pick-ic > span:first-of-type { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 800; }
.pick-ic svg, .pick-ic i { width: 1.2rem; height: 1.2rem; }
.pick-ic input:checked + span { border-color: var(--indigo); background: var(--grad-soft); }
.pick-ic input:focus-visible + span { outline: 2px solid var(--indigo); outline-offset: 2px; }

.toasts { position: fixed; right: 14px; bottom: 70px; z-index: 65; display: flex; flex-direction: column; gap: .5rem; max-width: min(24rem, calc(100vw - 28px)); }
.toast { display: flex; align-items: center; gap: .7rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: .7rem .8rem; box-shadow: 0 10px 30px rgba(15, 23, 42, .25); animation: turn-in .3s ease; }
.toast-ico { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.toast-ico svg, .toast-ico i { width: 1.1rem; height: 1.1rem; }
.toast-body { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.toast-actions { display: inline-flex; align-items: center; gap: .3rem; }
.toast-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: .2rem; line-height: 0; }
.toast-x svg, .toast-x i { width: 1rem; height: 1rem; }
.alert-info svg, .alert-info i { flex: none; }
@media (max-width: 700px) { .toasts { right: 8px; left: 8px; max-width: none; } }

.ach-bar, .ach-total { display: block; height: .45rem; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: .35rem; }
.ach-bar span, .ach-total span { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.ach-total { height: .7rem; margin: 0 0 1.5rem; }
.ach.is-going { opacity: 1; filter: none; }
.ach.is-going .ach-ico { opacity: .75; }
.ach-when { color: var(--purple); font-weight: 600; margin-top: .2rem; }

.wb-cats { display: flex; flex-wrap: wrap; gap: .25rem; margin: .4rem 0; }
.wb-cat { border: 1px solid var(--g-bd-e2e8f0); background: var(--g-bg-ffffff); color: var(--g-tx-334155); border-radius: 999px; padding: .2rem .6rem; font-size: .8rem; cursor: pointer; }
.wb-cat.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }
.wb-pick svg { display: block; }

.player-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; overflow-wrap: anywhere; }
.player-link:hover, .player-link[aria-expanded="true"] { color: var(--purple); }
.player-pop { display: flex; flex-direction: column; gap: .15rem; margin: -.25rem 0 .55rem; padding: .35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 18px rgba(15, 23, 42, .12); }
.pop-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border: 0; border-radius: calc(var(--radius) - 4px); background: none; color: inherit; font: inherit; font-size: .92rem; text-align: left; cursor: pointer; text-decoration: none; }
.pop-item:hover:not(.is-off) { background: var(--g-bg-f1f5f9); }
.pop-item.is-off { opacity: .6; cursor: default; }
.pop-item.is-danger { color: var(--g-tx-b91c1c, #b91c1c); }
.pop-item svg, .pop-item i { width: 1.05rem; height: 1.05rem; flex: none; pointer-events: none; }
.pop-msg { margin: .25rem .6rem .35rem; color: var(--muted); }

.pdot { width: .65rem; height: .65rem; border-radius: 50%; background: #94a3b8; flex: none; }
.pdot.is-on { background: #22c55e; }
.invite-list li { flex-wrap: nowrap; }
.invite-friends { margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .25rem; }

/* custom avatars: pictures and emoji */
.av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av.av-pic { background: transparent !important; overflow: hidden; }
.av-emoji { font-size: 1.15em; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.av-xl .av-emoji { font-size: 2.6rem; }
.av-sm .av-emoji { font-size: 1.1rem; }
.avatar .av-img { width: 100%; height: 100%; border-radius: inherit; }
.avatar:has(.av-img) { background: transparent !important; overflow: hidden; }
.avatar .av-emoji { font-size: 1.3rem; }
.chat-dot .av-img { width: 100%; height: 100%; }
.chat-dot:has(.av-img), .chat-dot:has(.av-emoji) { width: 1.4rem; height: 1.4rem; background: transparent !important; overflow: hidden; }
.chat-dot .av-emoji { font-size: .95rem; }
.avatar-picker { margin-bottom: 1rem; }
.ap-preview { display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.ap-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.ap-tab { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .3rem .85rem; font: inherit; font-size: .88rem; cursor: pointer; }
.ap-tab.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }
.ap-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; background: var(--surface); }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: .3rem; max-height: 13rem; overflow-y: auto; }
.ap-pick { height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.ap-pick:hover { border-color: var(--purple); }
.ap-pick.is-on { border-color: var(--purple); background: var(--g-bg-faf5ff); box-shadow: 0 0 0 2px rgba(124, 58, 237, .25); }
.ap-pick svg { width: 1.4rem; height: 1.4rem; pointer-events: none; }
.ap-emo { font-size: 1.5rem; }
.ap-search { margin-bottom: .4rem; }
.ap-upload { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .5rem; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ----- Sudoku ----- */
.sd-wrap { display: flex; flex-direction: column; gap: .8rem; align-items: center; width: 100%; }
.sd-info { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; justify-content: center; }
.sd-time { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sd-time svg { width: 1em; height: 1em; }
.sd-code { display: inline-flex; align-items: center; gap: .3rem; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.sd-main { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: center; align-items: flex-start; width: 100%; }
.sd-grid { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 460px); aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--g-bg-ffffff); touch-action: manipulation; }
.sd-cell { position: relative; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--indigo); font: 600 clamp(1rem, 4.6vw, 1.7rem) var(--font); cursor: pointer; min-width: 0; }
.sd-cell:nth-child(9n) { border-right: 0; }
.sd-cell:nth-child(n+73) { border-bottom: 0; }
.sd-cell.r3 { border-right: 2px solid var(--ink); }
.sd-cell.b3 { border-bottom: 2px solid var(--ink); }
.sd-cell.given { color: var(--ink); font-weight: 800; background: rgba(100, 116, 139, .10); }
.sd-cell.peer { background: rgba(124, 58, 237, .07); }
.sd-cell.given.peer { background: rgba(124, 58, 237, .13); }
.sd-cell.same { background: rgba(124, 58, 237, .22); }
.sd-cell.sel { background: rgba(79, 70, 229, .30); box-shadow: inset 0 0 0 2px var(--indigo); z-index: 1; }
.sd-cell.clash { color: var(--bad); background: rgba(220, 38, 38, .12); }
.sd-cell.wrong { color: #fff; background: var(--bad); }
.sd-cell.hint { color: var(--ok); }
.sd-cell.reveal { color: var(--muted); font-style: italic; }
.sd-cell:focus-visible { outline: 3px solid var(--purple); outline-offset: -3px; z-index: 2; }
.sd-n { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; height: 100%; padding: 1px; font: 600 clamp(.5rem, 1.9vw, .72rem) var(--font); color: var(--muted); line-height: 1; }
.sd-n i { font-style: normal; display: flex; align-items: center; justify-content: center; }
.sd-side { display: flex; flex-direction: column; gap: .8rem; width: min(100%, 320px); }
.sd-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.sd-key { position: relative; padding: .6rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--g-bg-ffffff); font: 700 1.15rem var(--font); cursor: pointer; color: var(--ink); }
.sd-key small { position: absolute; right: 4px; bottom: 1px; font-size: .6rem; font-weight: 600; color: var(--muted); }
.sd-key svg { width: 1.1em; height: 1.1em; }
.sd-key:not(:disabled):hover { border-color: var(--indigo); background: rgba(79, 70, 229, .06); }
.sd-key.done { opacity: .35; }
.sd-key:disabled { opacity: .5; cursor: default; }
.sd-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.sd-tools .is-on { border-color: var(--indigo); background: rgba(79, 70, 229, .12); }
.sd-rivals { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .7rem; background: rgba(var(--surface-rgb), .6); }
.sd-rivals h3 { margin-bottom: .4rem; }
.sd-rival { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: center; gap: .5rem; padding: .2rem 0; }
.sd-rival:not(:has(.sd-bar)) { grid-template-columns: 1fr auto; }
.sd-rival.me .sd-rname { font-weight: 800; }
.sd-rival.out { opacity: .55; }
.sd-rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; }
.sd-rname svg { width: 1em; height: 1em; color: #ca8a04; }
.sd-bar { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.sd-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.sd-modes { display: grid; gap: .5rem; }
.sd-mode { display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: center; padding: .6rem .8rem; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.sd-mode span { grid-column: 2; }
.sd-mode.on { border-color: var(--indigo); background: rgba(79, 70, 229, .07); }
.sd-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; }
@media (max-width: 520px) { .sd-main { gap: .7rem; } .sd-side { width: 100%; } }

/* ===== Road Rush ===== */
.rr-wrap { max-width: 720px; margin: 0 auto; }
.rr-hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.rr-box { background: var(--bg-soft); border-radius: var(--radius); padding: 6px 8px; text-align: center; font-variant-numeric: tabular-nums; min-width: 0; }
.rr-box b { display: block; font-size: 1.15rem; line-height: 1.25; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.rr-box small { font-size: .7rem; font-weight: 500; opacity: .7; }
.rr-lbl { display: block; font-size: .62rem; letter-spacing: .08em; opacity: .65; }
.rr-box.low { background: rgba(216, 40, 0, .22); }
.rr-box.low b { color: #d82800; animation: rr-blink .7s steps(2) infinite; }
@keyframes rr-blink { 50% { opacity: .35; } }
.rr-canvas { display: block; width: 100%; aspect-ratio: 16 / 10; image-rendering: pixelated; image-rendering: crisp-edges; background: #000; border-radius: var(--radius); touch-action: none; user-select: none; -webkit-user-select: none; outline-offset: 3px; }
.rr-prog { padding: 10px 6px 4px; }
.rr-line { position: relative; height: 6px; background: rgba(127, 127, 127, .3); border-radius: 3px; margin: 0 8px; }
.rr-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #000; transition: left .25s linear; }
.rr-dot.me { width: 16px; height: 16px; margin: -8px 0 0 -8px; z-index: 2; }
.rr-flag { position: absolute; right: -6px; top: -7px; width: 10px; height: 20px; background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 10px 10px; border-radius: 2px; }
.rr-pad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.rr-pad .btn { min-height: 64px; font-size: 1.2rem; touch-action: none; user-select: none; -webkit-user-select: none; }
.rr-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.rr-results { margin-top: 12px; }
.rr-results:empty { display: none; }
.rr-rank { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.rr-rank li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; background: var(--bg-soft); border-radius: var(--radius); padding: 8px 10px; }
.rr-n { font-weight: 700; text-align: center; }
.rr-t { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.rr-cars { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 8px 0 14px; }
.rr-carpick { display: grid; justify-items: center; gap: 4px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--radius); background: transparent; color: inherit; cursor: pointer; font: inherit; }
.rr-carpick canvas { width: 132px; height: 78px; image-rendering: pixelated; image-rendering: crisp-edges; background: #1d1b3a; border-radius: var(--radius-sm); }
.rr-carpick.on { border-color: var(--indigo); box-shadow: 0 0 0 2px var(--indigo) inset; }
@media (max-width: 520px) { .rr-hud { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .rr-box.low b { animation: none; } .rr-dot { transition: none; } }

/* Alien Wave */
.aw-wrap { max-width: 720px; margin: 0 auto; }
.aw-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.aw-box { background: var(--bg-soft); border-radius: var(--radius); padding: 6px 8px; text-align: center; font-variant-numeric: tabular-nums; min-width: 0; }
.aw-box b { display: block; font-size: 1.15rem; line-height: 1.25; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.aw-lbl { display: block; font-size: .62rem; letter-spacing: .08em; opacity: .65; }
.aw-canvas { display: block; width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; image-rendering: crisp-edges; background: #000; border-radius: var(--radius); touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.aw-names { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin-top: 6px; font-size: .85rem; font-weight: 600; }
.aw-pad { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; margin-top: 10px; }
.aw-pad .btn { min-height: 64px; font-size: 1.1rem; touch-action: none; user-select: none; -webkit-user-select: none; }
.aw-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.aw-results { margin-top: 12px; }
.aw-results:empty { display: none; }
.aw-rank { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.aw-rank li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; background: var(--bg-soft); border-radius: var(--radius); padding: 8px 10px; }
.aw-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #000; }
.aw-sc { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-weight: 700; }
.sr-pad { grid-template-columns: 1fr 1.5fr 1.2fr 1fr; }
@media (max-width: 420px) { .sr-pad { gap: 6px; } .sr-pad .btn { padding-left: 6px; padding-right: 6px; } }

/* Maze Munch */
.mz-canvas { max-width: 560px; margin: 0 auto; aspect-ratio: 168 / 194; }
.mz-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; justify-content: center; margin-top: 10px; }
.mz-pad .btn { min-height: 56px; touch-action: none; user-select: none; -webkit-user-select: none; }

/* Shared pad for the arcade games */
.arc-pad { display: grid; gap: 8px; max-width: 420px; margin: 10px auto 0; }
.arc-pad .btn { min-height: 60px; touch-action: none; user-select: none; -webkit-user-select: none; justify-content: center; }

/* Solitaire */
.sl-wrap { --cw: 80px; max-width: 680px; margin: 0 auto; }
.sl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 10px; }
.sl-time { font: 700 1.1rem var(--font); font-variant-numeric: tabular-nums; }
.sl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.sl-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-soft); border-radius: 999px; padding: 4px 10px; font-size: .9rem; }
.sl-top { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.sl-gap { flex: 1 1 0; min-width: 0; }
.sl-waste { position: relative; width: calc(var(--cw) * 1.56); height: calc(var(--cw) * 1.38); }
.sl-waste .sl-card { position: absolute; top: 0; }
.sl-waste .sl-card.sl-slot { position: static; }
.sl-tab { display: grid; grid-template-columns: repeat(7, var(--cw)); gap: 6px; align-items: start; }
.sl-col { min-height: calc(var(--cw) * 1.38); }
.sl-card { position: relative; display: block; width: var(--cw); height: calc(var(--cw) * 1.38); padding: 0; margin: 0; border-radius: calc(var(--cw) * .1); border: 1px solid #b9bfd0; background: #fff; font: 700 calc(var(--cw) * .27) var(--font); line-height: 1; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; box-shadow: 0 1px 2px rgba(20, 20, 50, .2); flex: none; }
.sl-card.up.red { color: #d62839; }
.sl-card.up.blk { color: #1c1f33; }
.sl-card i { font-style: normal; display: block; font-size: .85em; }
.sl-c1 { position: absolute; top: 4%; left: 8%; text-align: center; }
.sl-c2 { position: absolute; bottom: 4%; right: 8%; text-align: center; transform: rotate(180deg); }
.sl-mid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--cw) * .5); opacity: .9; pointer-events: none; }
.sl-card.dn { border-color: #3f3a9c; background: repeating-linear-gradient(45deg, #5b54d6 0 5px, #4a43c0 5px 10px); box-shadow: inset 0 0 0 3px #fff, 0 1px 2px rgba(20, 20, 50, .2); }
.sl-card.sl-slot { background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--muted); }
.sl-card .dimsuit { opacity: .3; }
.sl-card.dim { pointer-events: none; }
.sl-card.sel { outline: 3px solid #f59e0b; outline-offset: 1px; z-index: 3; transform: translateY(-3px); }
.sl-last .sl-card, .sl-lastcol .sl-card:last-child { box-shadow: 0 0 0 3px var(--lc, #888), 0 1px 2px rgba(20, 20, 50, .2); }
.sl-tools { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.sl-over .sl-tab, .sl-over .sl-top { opacity: .55; pointer-events: none; }
@media (max-width: 420px) { .sl-tab, .sl-top { gap: 3px; } }
.sl-look { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.sl-pix { width: 1em; height: 1em; display: block; }
.sl-mid .sl-pix { width: .74em; height: .74em; }
.sl-8bit .sl-mid { padding-top: 7%; }
.sl-c1 .sl-pix, .sl-c2 .sl-pix { width: .8em; height: .8em; margin: 1px 0 0; }
/* the 8-bit look: flat colours, square corners, chunky outlines and pixel suits */
.sl-8bit { background: #0b3d1e; background-image: linear-gradient(45deg, #0e4a24 25%, transparent 25%, transparent 75%, #0e4a24 75%), linear-gradient(45deg, #0e4a24 25%, transparent 25%, transparent 75%, #0e4a24 75%); background-size: 8px 8px; background-position: 0 0, 4px 4px; border: 4px solid #000; padding: 10px; image-rendering: pixelated; }
.sl-8bit .sl-chip, .sl-8bit .sl-time, .sl-8bit .sl-bar .muted { color: #fff; background: transparent; font-family: 'Courier New', monospace; }
.sl-8bit .sl-chip { background: #000; border-radius: 0; }
.sl-8bit .sl-card { border-radius: 0; border: 2px solid #000; font-family: 'Courier New', monospace; font-weight: 700; box-shadow: 2px 2px 0 #000; background: #fcfcfc; }
.sl-8bit .sl-card.up.red { color: #e8402a; }
.sl-8bit .sl-card.up.blk { color: #101020; }
.sl-8bit .sl-card.dn { border-color: #000; background-color: #2b2bd6; background-image: linear-gradient(45deg, #ffd23a 25%, transparent 25%, transparent 75%, #ffd23a 75%), linear-gradient(45deg, #ffd23a 25%, transparent 25%, transparent 75%, #ffd23a 75%); background-size: 8px 8px; background-position: 0 0, 4px 4px; box-shadow: inset 0 0 0 2px #fcfcfc, 2px 2px 0 #000; }
.sl-8bit .sl-card.sl-slot { border: 2px dashed #7bd88f; background: transparent; box-shadow: none; color: #7bd88f; }
.sl-8bit .sl-card.sel { outline: 3px solid #ffe14d; outline-offset: 0; transform: none; }
.sl-8bit .sl-last .sl-card, .sl-8bit .sl-lastcol .sl-card:last-child { box-shadow: 0 0 0 3px var(--lc, #ffe14d), 2px 2px 0 #000; }
.sl-8bit .sl-look .small { color: #fff; }
.sl-8bit .sl-mid { opacity: 1; }
.sl-8bit .btn-ghost { color: #fff; }
.sl-8bit .btn-secondary { border-radius: 0; border: 2px solid #000; }

/* Gem Match */
.gm-wrap { max-width: 480px; margin: 0 auto; }
.gm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 8px; }
.gm-time { font: 700 1.1rem var(--font); font-variant-numeric: tabular-nums; }
.gm-level { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: .9rem; }
.gm-prog { flex: 1; height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.gm-prog span { display: block; height: 100%; background: linear-gradient(90deg, #3aa0ff, #b36bff); transition: width .3s; }
.gm-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; touch-action: none; border-radius: 12px; border: 3px solid #1d2050; background: #0b0d22; cursor: pointer; }
.gm-8bit .gm-canvas { border-radius: 0; border: 4px solid #000; image-rendering: pixelated; }
.gm-8bit .gm-prog { border-radius: 0; border: 2px solid #000; }
.gm-8bit .gm-prog span { background: #ffe14d; }
.gm-over .gm-canvas { opacity: .8; }
.arc-wrap[data-arc="duckshoot"] canvas { cursor: none; touch-action: none; image-rendering: pixelated; }
.cg-wrap { max-width: 900px; margin: 0 auto; }
.cg-canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 8px; touch-action: none; cursor: crosshair; background: #000; }

/* ---- games list filters ---- */
.gf { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.gf .chips { margin-bottom: 0; }
.gf-row, .gf-recent { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.gf-label { min-width: 5.5rem; font-weight: 600; }
.gf-search { max-width: 22rem; }
.gf .chip { cursor: pointer; font-family: inherit; }
.gf-count { margin: 0; min-height: 1.2em; }
.gf-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
[data-gf-grid] > [hidden] { display: none !important; }

/* ---- hidden Atari ST player ---- */
.emu-wrap { display: grid; gap: 1rem; }
.emu-pick { display: grid; gap: .75rem; }
.emu-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #000; }
.emu-frame iframe { display: block; width: 100%; height: min(78vh, 820px); border: 0; }

/* uploaded pictures fill the whole circle (the picture was being squeezed by the flex row) */
.av.av-pic img { width: 100%; height: 100%; min-width: 0; object-fit: cover; border-radius: 50%; display: block; }
.lb-name .av { width: 2.6rem; height: 2.6rem; }

/* ---- Christmas mode (Admin > Settings) ---- */
.xm-snow { position: fixed; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.xm-snow-behind { z-index: 0; }
.xm-snow-front { z-index: 9990; }
body.xmas-behind main, body.xmas-behind .site-footer { position: relative; z-index: 1; }
.xm-deco { position: fixed; bottom: 0; z-index: 2; pointer-events: none; background-repeat: no-repeat; background-size: contain; image-rendering: pixelated; display: none; }
.xm-tree-l { left: 6px; width: 60px; height: 68px; }
.xm-tree-r { right: 6px; width: 60px; height: 68px; }
.xm-presents { right: 70px; width: 36px; height: 28px; }
@media (min-width: 1240px) { .xm-deco { display: block; } .xm-tree-l, .xm-tree-r { width: 90px; height: 102px; } .xm-presents { right: 100px; width: 54px; height: 42px; } }
.xm-has-wreath { position: relative; }
.xm-wreath { position: absolute; inset: -7px; background: center / contain no-repeat; image-rendering: pixelated; pointer-events: none; }
.site-header { position: sticky; }
.xm-garland { position: absolute; left: 0; right: 0; top: 100%; height: 18px; background-repeat: repeat-x; background-size: auto 18px, auto 9px; background-position: 0 0, 25px 0; image-rendering: pixelated; pointer-events: none; opacity: .95; }
.xm-sound { position: fixed; left: 14px; bottom: 14px; z-index: 9995; display: flex; align-items: center; gap: .5rem; }
.xm-vol { width: 96px; accent-color: #e0302a; cursor: pointer; background: rgba(var(--surface-rgb), .85); border-radius: 6px; padding: 4px 6px; box-sizing: content-box; }
.xm-vol[hidden] { display: none; }
body.xmas-autumn .xm-vol { accent-color: #e8791a; }
.xm-music { flex: none; width: 42px; height: 42px; border: 2px solid #14662a; border-radius: 6px; background: #1f8f3a; color: #fff; font-size: 1.35rem; line-height: 1; cursor: pointer; box-shadow: 0 3px 0 #0b2a14, 0 4px 10px rgba(0, 0, 0, .25); display: grid; place-items: center; }
.xm-music.on { background: #e0302a; border-color: #8a1a16; box-shadow: 0 3px 0 #5a0f0c, 0 4px 10px rgba(0, 0, 0, .25); }
.xm-music.on .xm-note { animation: xm-bob .6s steps(2) infinite; }
.xm-music:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }
@keyframes xm-bob { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .xm-music.on .xm-note { animation: none; } }
body.xmas-decor .cookie { z-index: 9996; }
.xm-tree-l { left: 64px; }
.xm-extra2 { left: 130px; width: 36px; height: 28px; }
@media (min-width: 1240px) { .xm-extra2 { left: 160px; width: 54px; height: 42px; } }

/* ---- a faint screenshot behind each game card (strength set in Admin > Settings) ---- */
.game-card[data-bg]::after { content: ''; position: absolute; inset: 0; background: var(--gbg) center / cover no-repeat; opacity: var(--gbg-op, .18); z-index: 0; pointer-events: none; }
.game-card[data-bg] > * { position: relative; z-index: 1; }
.game-card[data-bg].card-accent::before { z-index: 2; }
.gbg-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: .5rem; }

/* 8-bit solitaire: each card back is Hugo or Penny (one per card), smiling and panting */
.sl-8bit .sl-card.dn { background: #4a43c0; overflow: hidden; }
.sl-8bit .sl-card.dn::before, .sl-8bit .sl-card.dn::after { content: ''; position: absolute; inset: 3px; background-repeat: no-repeat; background-size: 88% auto; background-position: center 2px; image-rendering: pixelated; pointer-events: none; }
.sl-8bit .sl-top > .sl-card.dn::before, .sl-8bit .sl-top > .sl-card.dn::after { background-position: center; }
.sl-8bit .sl-card.dn.dog-h::before { background-image: var(--sl-ha); }
.sl-8bit .sl-card.dn.dog-h::after { background-image: var(--sl-hb); }
.sl-8bit .sl-card.dn.dog-p::before { background-image: var(--sl-pa); }
.sl-8bit .sl-card.dn.dog-p::after { background-image: var(--sl-pb); }
.sl-8bit .sl-card.dn.dog-p { background: #7a3fc0; }
.sl-8bit .sl-card.dn::after { opacity: 0; animation: sl-pant 1s steps(1, end) infinite; }
@keyframes sl-pant { 0% { opacity: 0; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sl-8bit .sl-card.dn::after { animation: none; } }

/* Solitaire hints: the card(s) to move glow green, where they should go glows amber */
.sl-card.hint { outline: 3px solid #22c55e; outline-offset: 1px; z-index: 3; }
.sl-card.hint-to { outline: 3px dashed #f59e0b; outline-offset: 1px; z-index: 3; }
@media (prefers-reduced-motion: no-preference) { .sl-card.hint, .sl-card.hint-to { animation: sl-hint 1s ease-in-out infinite; } }
@keyframes sl-hint { 50% { outline-offset: 4px; } }
.sl-hint-msg { display: flex; align-items: center; gap: .5rem; justify-content: center; margin: .6rem 0 0; padding: .5rem .8rem; border-radius: var(--radius); background: rgba(34, 197, 94, .12); color: var(--ink); font-weight: 600; font-size: .92rem; text-align: center; }
.sl-hint-msg svg, .sl-hint-msg i { width: 1.1rem; height: 1.1rem; color: #16a34a; flex: none; }
.sl-8bit .sl-card.hint, .sl-8bit .sl-card.hint-to { outline-width: 4px; }

/* badge rarity */
.ach-rare { display: block; width: fit-content; max-width: 100%; margin-top: .2rem; padding: .15rem .55rem; border-radius: .6rem; line-height: 1.25; font-size: .7rem; font-weight: 700; background: var(--bg-soft); color: var(--muted); }
.ach-rare-common { background: rgba(100, 116, 139, .15); color: #475569; }
.ach-rare-uncommon { background: rgba(34, 197, 94, .15); color: #15803d; }
.ach-rare-rare { background: rgba(59, 130, 246, .15); color: #1d4ed8; }
.ach-rare-epic { background: rgba(168, 85, 247, .16); color: #7e22ce; }
.ach-rare-legendary { background: rgba(245, 158, 11, .2); color: #b45309; }
:root[data-theme="dark"] .ach-rare-common { color: #cbd5e1; } :root[data-theme="dark"] .ach-rare-uncommon { color: #86efac; } :root[data-theme="dark"] .ach-rare-rare { color: #93c5fd; } :root[data-theme="dark"] .ach-rare-epic { color: #d8b4fe; } :root[data-theme="dark"] .ach-rare-legendary { color: #fcd34d; }
.ach-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 1rem; }
.ach-game .badge-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ach-rare-common { color: #cbd5e1; } :root:not([data-theme="light"]) .ach-rare-uncommon { color: #86efac; } :root:not([data-theme="light"]) .ach-rare-rare { color: #93c5fd; } :root:not([data-theme="light"]) .ach-rare-epic { color: #d8b4fe; } :root:not([data-theme="light"]) .ach-rare-legendary { color: #fcd34d; } }

/* ---- Guide (help.php) ---- */
.hp-hero { background: var(--grad-soft); border-bottom: 1px solid var(--line); padding: 2.2rem 0 1.6rem; text-align: center; }
.hp-hero .container { display: flex; flex-direction: column; align-items: center; }
.hp-hero h1 { margin-bottom: .3rem; }
.hp-hero p { color: var(--muted); max-width: 40rem; }
.hp-hero-ico { width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: .8rem; box-shadow: 0 8px 22px rgba(79, 70, 229, .3); }
.hp-hero-ico svg { width: 30px; height: 30px; }
.hp-hero-links, .hp-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.hp-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2rem; padding-block: 1.5rem 3rem; align-items: start; }
.hp-side { position: sticky; top: 4.5rem; max-height: calc(100vh - 5.5rem); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .9rem; }
.hp-nav > summary { list-style: none; cursor: pointer; font-weight: 700; display: none; align-items: center; gap: .5rem; }
.hp-nav > summary::-webkit-details-marker { display: none; }
.hp-nav > summary svg { width: 1.1rem; height: 1.1rem; }
.hp-search { position: relative; margin-bottom: .6rem; }
.hp-search svg { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--muted); pointer-events: none; }
.hp-search .input { padding-left: 2rem; }
.hp-nav-h { font: 700 .72rem var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .9rem 0 .35rem; }
.hp-nav-h a { color: inherit; text-decoration: none; }
.hp-nav-list { list-style: none; margin: 0; padding: 0; }
.hp-nav-list a { display: flex; align-items: center; gap: .55rem; padding: .32rem .45rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600; }
.hp-nav-list a:hover { background: var(--bg-soft); }
.hp-nav-list a.is-on { background: var(--grad-soft); color: var(--indigo); }
.hp-nav-list a > svg { width: 1rem; height: 1rem; flex: none; color: var(--muted); }
.hp-games a { font-weight: 500; }
.hp-mini { width: 26px; height: 26px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; }
.hp-mini svg { width: 15px; height: 15px; }
.hp-cat > summary { cursor: pointer; font-weight: 700; font-size: .88rem; display: flex; align-items: center; gap: .45rem; padding: .35rem .2rem; }
.hp-cat > summary svg { width: 1rem; height: 1rem; color: var(--indigo); }
.hp-cat[hidden], .hp-nav-list li[hidden] { display: none; }
.hp-main { min-width: 0; }
.hp-sec { padding: 0 0 2.4rem; margin-bottom: 2.4rem; border-bottom: 1px solid var(--line); scroll-margin-top: 4.5rem; }
.hp-sec:last-child { border-bottom: 0; }
.hp-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.hp-head h2 { margin: 0; scroll-margin-top: 5rem; }
.hp-lead { margin: .2rem 0 0; color: var(--muted); }
.hp-tile { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.hp-tile svg { width: 26px; height: 26px; }
.hp-tile.c-slate, .hp-mini.c-slate { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.hp-main h3 { display: flex; align-items: center; gap: .5rem; margin-top: 1.4rem; font-size: 1.08rem; }
.hp-main h3 svg { width: 1.1rem; height: 1.1rem; color: var(--indigo); }
.hp-main h4 { display: flex; align-items: center; gap: .45rem; font-size: .95rem; margin: 1.1rem 0 .5rem; }
.hp-main h4 svg { width: 1rem; height: 1rem; color: var(--indigo); }
.hp-steps { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; counter-reset: s; }
.hp-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; color: var(--muted); }
.hp-steps li strong { color: var(--ink); font-size: 1rem; }
.hp-step-ico { position: relative; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--indigo); margin-bottom: .3rem; }
.hp-step-ico svg { width: 22px; height: 22px; }
.hp-step-ico b { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: var(--grad); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.hp-note { display: flex; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--grad-soft); margin: 1.1rem 0; font-size: .93rem; }
.hp-note > svg { width: 1.3rem; height: 1.3rem; flex: none; color: var(--indigo); margin-top: .1rem; }
.hp-note.hp-warn { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
.hp-note.hp-warn > svg { color: #b45309; }
.hp-note div { min-width: 0; }
.hp-two, .hp-three, .hp-modes { display: grid; gap: .9rem; margin: 1rem 0; }
.hp-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-modes { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.hp-card, .hp-mode { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; font-size: .93rem; }
.hp-card h3 { margin-top: 0; }
.hp-card p:last-child { margin-bottom: 0; }
.hp-mode { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); }
.hp-mode strong { color: var(--ink); }
.hp-ticks { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .45rem; }
.hp-ticks li { position: relative; padding-left: 1.6rem; }
.hp-ticks li::before { content: '\2713'; position: absolute; left: 0; top: .2em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--grad); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.hp-ticks.hp-dim li { color: var(--muted); }
.hp-ticks.hp-inline { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hp-table { display: grid; gap: .6rem; margin: 1rem 0; }
.hp-table > div { display: grid; grid-template-columns: 30px 11rem minmax(0, 1fr); gap: .3rem .8rem; align-items: start; padding: .75rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .93rem; }
.hp-table > div > span:last-child { color: var(--muted); }
.hp-fig { margin: 1.1rem 0; }
.hp-fig-in { border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-soft); padding: 1.1rem; display: flex; justify-content: center; overflow: hidden; pointer-events: none; user-select: none; }
.hp-fig figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.hp-mock-games { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.hp-mock-card { width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; font-size: .85rem; }
.hp-mock-card > svg { width: 26px; height: 26px; color: var(--indigo); }
.hp-mock-btn { display: inline-flex; align-items: center; gap: .3rem; background: var(--grad); color: #fff; font-weight: 700; font-size: .8rem; padding: .3rem .8rem; border-radius: var(--radius-sm); }
.hp-mock-btn svg { width: .85rem; height: .85rem; }
.hp-mock-invite { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; }
.hp-mock-lbl { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hp-code { display: block; font: 700 1.5rem var(--font-head); letter-spacing: .18em; margin: .2rem 0 .5rem; }
.hp-mock-input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .35rem .6rem; font-size: .8rem; color: var(--muted); text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hp-mock-avatars { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.hp-av { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 700 1.2rem var(--font-head); flex: none; }
.hp-av svg { width: 24px; height: 24px; }
.hp-av-1 { background: #2563eb; } .hp-av-2 { background: #db2777; } .hp-av-3 { background: #7c3aed; } .hp-av-4 { background: #f59e0b; } .hp-av-5 { background: #0d9488; }
.hp-mock-game { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .6rem; width: min(100%, 520px); }
.hp-mock-banner { grid-column: 1 / -1; background: var(--grad); color: #fff; font-weight: 700; padding: .5rem; border-radius: var(--radius-sm); text-align: center; display: flex; gap: .4rem; justify-content: center; align-items: center; font-size: .9rem; }
.hp-mock-banner svg { width: 1rem; height: 1rem; }
.hp-mock-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); min-height: 130px; display: grid; place-items: center; color: var(--indigo); }
.hp-mock-board svg { width: 64px; height: 64px; }
.hp-mock-side { display: grid; gap: .4rem; align-content: start; }
.hp-mock-player { display: flex; align-items: center; gap: .45rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .35rem .5rem; font-size: .85rem; }
.hp-mock-player .hp-av { width: 26px; height: 26px; font-size: .8rem; border-radius: 6px; }
.hp-mock-turn { margin-left: auto; background: var(--indigo); color: #fff; font-size: .68rem; font-weight: 700; padding: .05rem .4rem; border-radius: 4px; }
.hp-mock-chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; display: flex; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); min-height: 52px; }
.hp-mock-chat svg { width: 1rem; height: 1rem; }
.hp-mock-lb { width: min(100%, 420px); display: grid; gap: .4rem; }
.hp-lbrow { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .35rem .6rem; font-size: .9rem; }
.hp-lbrow b { width: 1.2rem; color: var(--muted); }
.hp-lbrow .hp-av { width: 28px; height: 28px; font-size: .85rem; border-radius: 6px; }
.hp-lbrow span:not(.hp-av) { font-weight: 700; flex: 1; }
.hp-lbrow em { font-style: normal; color: var(--muted); }
.hp-rare { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.hp-pill { padding: .25rem .8rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.hp-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; margin: .8rem 0; }
.hp-badge { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .65rem .8rem; font-size: .88rem; }
.hp-badge div { display: flex; flex-direction: column; min-width: 0; }
.hp-badge span:not(.hp-mini) { color: var(--muted); }
.hp-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .5rem; }
.hp-faq summary { cursor: pointer; font-weight: 700; padding: .75rem 1rem; }
.hp-faq details p { margin: 0; padding: 0 1rem 1rem; color: var(--muted); }
.hp-cat-h { margin-top: 2rem; padding-bottom: .4rem; border-bottom: 2px solid var(--line); }
.hp-game { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin: 1.1rem 0; scroll-margin-top: 4.5rem; }
.hp-game[hidden] { display: none; }
.hp-game-top { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.hp-game-img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-soft); display: block; }
.hp-game-noimg { display: grid; place-items: center; color: var(--indigo); }
.hp-game-noimg svg { width: 48px; height: 48px; }
.hp-game-title h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.hp-game-title p { color: var(--muted); }
.hp-game-title .hp-chips { justify-content: flex-start; }
.hp-game-title .chip { font-size: .78rem; padding: .2rem .6rem; }
.hp-how { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; font-size: .94rem; }
.hp-gb { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .5rem; }
.hp-gb-i { display: flex; gap: .55rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .4rem .6rem; background: var(--bg-soft); }
.hp-gb-i > svg { width: 1.2rem; height: 1.2rem; color: var(--indigo); flex: none; }
.hp-gb-i span { display: flex; flex-direction: column; line-height: 1.25; }
.hp-gb-i small { color: var(--muted); font-size: .72rem; }
.hp-gb-i strong { font-size: .88rem; }
.hp-game-go { margin: 1rem 0 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 899px) {
  .hp-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .hp-side { position: static; max-height: none; }
  .hp-nav > summary { display: flex; }
  .hp-nav:not([open]) > summary { margin: 0; }
  .hp-nav[open] > summary { margin-bottom: .7rem; }
  .hp-nav[open] nav { max-height: 60vh; overflow: auto; }
  .hp-two, .hp-three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hp-table > div { grid-template-columns: 30px minmax(0, 1fr); }
  .hp-table > div > span:last-child { grid-column: 1 / -1; }
  .hp-game-top { grid-template-columns: minmax(0, 1fr); }
  .hp-head { gap: .7rem; }
  .hp-tile { width: 44px; height: 44px; }
}

/* ---- reCAPTCHA (the badge is hidden, so the notice below the form is shown instead) ---- */
.grecaptcha-badge { visibility: hidden; }
.rc-note { font-size: .74rem; line-height: 1.45; color: var(--muted); margin: .6rem 0 0; }
.rc-note a { color: inherit; }

/* ---- Admin analytics charts ---- */
:root { --ch0: #2563eb; --ch1: #7c3aed; --ch2: #16a34a; --ch3: #d97706; --ch4: #dc2626; --ch5: #0891b2; --ch-grid: #e2e8f0; --ch-text: #64748b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ch0: #6b95f5; --ch1: #a78bfa; --ch2: #4ade80; --ch3: #fbbf24; --ch4: #f87171; --ch5: #22d3ee; --ch-grid: #2b3550; --ch-text: #9aa6c6; } }
:root[data-theme="dark"] { --ch0: #6b95f5; --ch1: #a78bfa; --ch2: #4ade80; --ch3: #fbbf24; --ch4: #f87171; --ch5: #22d3ee; --ch-grid: #2b3550; --ch-text: #9aa6c6; }
.ch { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--ch-grid); stroke-width: 1; }
.ch-tick { fill: var(--ch-text); font: 600 10.5px var(--font); }
.ch-big { fill: var(--ink); font: 700 22px var(--font-head); }
.ch-f0 { fill: var(--ch0); background: var(--ch0); } .ch-f1 { fill: var(--ch1); background: var(--ch1); } .ch-f2 { fill: var(--ch2); background: var(--ch2); }
.ch-f3 { fill: var(--ch3); background: var(--ch3); } .ch-f4 { fill: var(--ch4); background: var(--ch4); } .ch-f5 { fill: var(--ch5); background: var(--ch5); }
.ch-s0 { stroke: var(--ch0); } .ch-s1 { stroke: var(--ch1); } .ch-s2 { stroke: var(--ch2); } .ch-s3 { stroke: var(--ch3); } .ch-s4 { stroke: var(--ch4); } .ch-s5 { stroke: var(--ch5); }
.ch-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill-opacity: .12; }
.ch-hit { fill: transparent; }
.ch-col:hover .ch-hit, .ch-pt:hover .ch-hit { fill: var(--ch0); fill-opacity: .08; }
.ch-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; margin: 0 0 .5rem; padding: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.ch-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.ch-donut { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.ch-donut svg { width: 160px; height: 160px; flex: none; }
.ch-key { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 12rem; font-size: .9rem; }
.ch-key li { display: grid; grid-template-columns: auto 1fr auto 3rem; gap: .5rem; align-items: center; padding: .25rem 0; border-bottom: 1px solid var(--line); }
.ch-key em { color: var(--muted); font-style: normal; text-align: right; font-size: .85rem; }
.ch-empty { padding: 1.5rem 0; text-align: center; }
.stat-sub { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.an-range { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 0 0 1rem; }
.an-views { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.an-wide { grid-column: 1 / -1; }
.an-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.an-table th, .an-table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.an-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.an-table code { word-break: break-all; font-size: .82rem; }
.an-timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.an-timeline li { position: relative; padding: 0 0 1rem 1rem; }
.an-timeline li::before { content: ""; position: absolute; left: -1.45rem; top: .45rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--ch0); border: 2px solid var(--page); }
.an-timeline li:first-child::before { background: var(--ch2); }
@media (max-width: 640px) { .ch-key li { grid-template-columns: auto 1fr auto; } .ch-key em { display: none; } }

/* Hugo and Penny in the header (v2.30.0) */
.brand-wrap { display: flex; align-items: center; align-self: stretch; gap: .35rem; min-width: 0; }
.brand-pets { display: inline-flex; align-items: flex-end; align-self: flex-end; gap: 2px; margin-left: .15rem; }
.pet { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; -webkit-tap-highlight-color: transparent; }
.pet img { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.pet-say { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none; white-space: nowrap; background: #fff; color: #4338ca; border: 2px solid #1e2a78; border-radius: 8px; padding: 2px 7px; font: 800 .72rem/1.2 var(--font-head); letter-spacing: .02em; box-shadow: 2px 2px 0 #1e2a78; z-index: 60; }
.pet.is-barking .pet-say { animation: pet-say .9s ease-out forwards; }
.pet.is-barking img { animation: pet-hop .24s ease-out; }
@keyframes pet-say { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 15% { opacity: 1; transform: translateX(-50%) scale(1.08); } 80% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) scale(1); } }
@keyframes pet-hop { 0% { transform: translateY(0); } 45% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .pet:not(.is-barking) img { animation: pet-bob 1.4s steps(1, end) infinite; }
  .pet-penny:not(.is-barking) img { animation-delay: -.7s; }
}
@keyframes pet-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.pet:focus-visible { outline: 2px solid var(--accent, #4f46e5); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 560px) { .brand-pets { display: none; } }

/* Bingo (v2.31.0) */
.bg-wrap { max-width: 1100px; margin: 0 auto; display: grid; gap: 1rem; }
.bg-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.bg-stage { background: linear-gradient(180deg, #2a2233, #17121e); border: 3px solid #3b3046; border-radius: 18px; padding: .8rem; color: #fff; min-width: 0; }
.bg-ledbox { position: relative; border-radius: 10px; overflow: hidden; border: 4px solid #0a0710; box-shadow: 0 0 0 2px #4a3d58; }
.bg-led { display: block; width: 100%; height: auto; }
.bg-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 2px, transparent 2px 4px); }
.bg-hosts { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: .6rem; margin-top: 1.9rem; }
.bg-host { position: relative; text-align: center; opacity: .5; transition: opacity .25s; }
.bg-host.on { opacity: 1; }
.bg-host img { display: block; margin: 0 auto; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; }
.bg-host[data-host="hugo"] img { width: 90px; }
.bg-host[data-host="penny"] img { width: 105px; }
.bg-host b { display: block; font: 800 .95rem/1.3 var(--font-head); }
.bg-host.hop img { animation: bg-hop .32s ease-out; }
.bg-say { position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none; z-index: 3; white-space: nowrap; background: #fff; color: #4338ca; border: 3px solid #1e2a78; border-radius: 12px; padding: .2rem .6rem; font: 800 1rem/1.3 var(--font-head); box-shadow: 3px 3px 0 #1e2a78; }
.bg-say.show { animation: bg-say 2.6s ease-out forwards; }
.bg-callmeta { text-align: center; min-width: 0; padding-bottom: .4rem; }
.bg-calltext { min-height: 1.5em; font-weight: 700; color: #ffe14d; overflow-wrap: anywhere; }
.bg-count { font-size: .85rem; opacity: .85; margin: .2rem 0 .45rem; }
.bg-timer { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.bg-timer span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4d8dff, #c084fc); }
.bg-recent { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .7rem; min-height: 2rem; }
.bg-chip, .bg-tn { --bgc: #f4f4f8; --fgc: #1c1c2e; }
.bg-chip { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .3rem; border-radius: 8px; font: 800 .95rem var(--font-head); background: var(--bgc); color: var(--fgc); }
.bg-wrap .c0 { --bgc: #e5383b; --fgc: #fff; } .bg-wrap .c1 { --bgc: #ffd60a; --fgc: #2b2300; } .bg-wrap .c2 { --bgc: #2f6df6; --fgc: #fff; } .bg-wrap .c3 { --bgc: #f4f4f8; --fgc: #1c1c2e; } .bg-wrap .c4 { --bgc: #22c55e; --fgc: #04210f; }
.bg-tote { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; background: linear-gradient(180deg, #d9a21b, #b9820e); border: 3px solid #8c6208; border-radius: 16px; padding: .6rem; min-width: 0; }
.bg-tcol { background: rgba(60, 38, 0, .35); border-radius: 10px; padding: .35rem; }
.bg-thead { font: 800 .8rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: #fff; text-align: center; margin-bottom: .3rem; }
.bg-tgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.bg-tn { display: grid; place-items: center; aspect-ratio: 1; border-radius: 5px; font: 800 .72rem var(--font-head); background: rgba(20, 12, 0, .55); color: rgba(255, 255, 255, .45); transition: background .3s, color .3s; }
.bg-tcol:nth-child(1) .bg-tn.hit { --bgc: #e5383b; --fgc: #fff; } .bg-tcol:nth-child(2) .bg-tn.hit { --bgc: #ffd60a; --fgc: #2b2300; }
.bg-tcol:nth-child(3) .bg-tn.hit { --bgc: #2f6df6; --fgc: #fff; } .bg-tcol:nth-child(4) .bg-tn.hit { --bgc: #f4f4f8; --fgc: #1c1c2e; } .bg-tcol:nth-child(5) .bg-tn.hit { --bgc: #22c55e; --fgc: #04210f; }
.bg-tcol:nth-child(5) { grid-column: 1 / -1; } .bg-tcol:nth-child(5) .bg-tgrid { grid-template-columns: repeat(8, 1fr); }
.bg-tn.hit { background: var(--bgc); color: var(--fgc); }
.bg-tn.last { box-shadow: 0 0 0 2px #fff, 0 0 10px #fff; animation: bg-blink .8s steps(2) 4; }
.bg-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.bg-sw { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; cursor: pointer; }
.bg-boards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.bg-boards.n1 { max-width: 440px; width: 100%; margin: 0 auto; grid-template-columns: 1fr; }
.bg-board { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .7rem; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .08)); }
.bg-bhead { font: 800 .85rem var(--font-head); margin-bottom: .45rem; color: var(--muted, inherit); }
.bg-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bg-grid.mini { max-width: 260px; gap: 4px; }
.bg-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bgc); color: var(--fgc); font: 800 clamp(1rem, 3.6vw, 1.45rem) var(--font-head); -webkit-tap-highlight-color: transparent; }
.bg-grid.mini .bg-cell { cursor: default; font-size: 1rem; }
.bg-num { position: relative; z-index: 2; transition: color .2s; }
.bg-cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; transform: translateX(-104%); transition: transform .45s cubic-bezier(.2, .85, .2, 1);
  background: repeating-linear-gradient(135deg, rgba(20, 16, 48, .8) 0 6px, rgba(34, 28, 74, .72) 6px 12px); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), inset 0 6px 8px rgba(255, 255, 255, .18); }
.bg-cell.on .bg-cover { transform: none; }
.bg-cell.nt .bg-cover { transition: none; }
.bg-cell.on .bg-num { color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px rgba(0, 0, 0, .7); }
.bg-cell.wincell { box-shadow: 0 0 0 3px #ffd60a, 0 0 20px #ffd60a; animation: bg-glow .9s ease-in-out infinite alternate; z-index: 3; }
.bg-cell.nope { animation: bg-shake .35s; }
.bg-claimrow { display: flex; justify-content: center; }
.bg-claim { display: inline-flex; flex-direction: column; align-items: center; gap: .1rem; min-width: min(100%, 340px); padding: .8rem 2rem; border: 0; border-radius: 999px; cursor: pointer; color: #fff; background: linear-gradient(135deg, #e5383b, #f97316); box-shadow: 0 8px 0 #9f1d1f, 0 14px 24px rgba(0, 0, 0, .25); transition: transform .1s, box-shadow .1s, filter .2s; }
.bg-claim:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 3px 0 #9f1d1f, 0 6px 12px rgba(0, 0, 0, .25); }
.bg-claim-main { font: 800 2rem/1.1 var(--font-head); letter-spacing: .04em; }
.bg-claim-sub { font-weight: 700; font-size: .9rem; opacity: .95; min-height: 1.2em; }
.bg-claim:disabled { filter: grayscale(.85) brightness(.9); cursor: not-allowed; box-shadow: 0 4px 0 #555; }
.bg-claim.ready { animation: bg-pulse .7s ease-in-out infinite alternate; }
.bg-claim.shake { animation: bg-shake .4s; }
.bg-win { background: var(--surface); border: 2px solid #ffd60a; border-radius: 16px; padding: .9rem 1rem; text-align: center; }
.bg-win .bg-grid.mini { margin: .5rem auto 0; }
.bg-lobbytop { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.bg-lobbydog { image-rendering: pixelated; width: 60px; height: auto; }
.bg-settings { display: grid; gap: .75rem; margin: 1rem 0; }
@keyframes bg-hop { 0% { transform: translateY(0); } 45% { transform: translateY(-12px); } 100% { transform: translateY(0); } }
@keyframes bg-say { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 10% { opacity: 1; transform: translateX(-50%) scale(1.08); } 18% { transform: translateX(-50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bg-blink { 50% { box-shadow: 0 0 0 2px #fff0, 0 0 0 #fff0; } }
@keyframes bg-glow { from { box-shadow: 0 0 0 3px #ffd60a, 0 0 8px #ffd60a; } to { box-shadow: 0 0 0 3px #fff, 0 0 26px #ffd60a; } }
@keyframes bg-pulse { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes bg-shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@media (max-width: 820px) { .bg-top { grid-template-columns: 1fr; } .bg-host[data-host="hugo"] img { width: 66px; } .bg-host[data-host="penny"] img { width: 77px; } }
@media (prefers-reduced-motion: reduce) { .bg-claim.ready, .bg-cell.wincell, .bg-tn.last { animation: none; } .bg-cover { transition-duration: .01s; } }
.bingo-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: .5rem .9rem; }
.bingo-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto auto; align-items: center; gap: .5rem; }
.bingo-tile { display: grid; place-items: center; height: 2.4rem; border-radius: 8px; font: 800 .95rem var(--font-head); background: var(--bgc); color: var(--fgc); }
.bingo-tile.c0 { --bgc: #e5383b; --fgc: #fff; } .bingo-tile.c1 { --bgc: #ffd60a; --fgc: #2b2300; } .bingo-tile.c2 { --bgc: #2f6df6; --fgc: #fff; } .bingo-tile.c3 { --bgc: #f4f4f8; --fgc: #1c1c2e; box-shadow: inset 0 0 0 1px #cbd2e1; } .bingo-tile.c4 { --bgc: #22c55e; --fgc: #04210f; }
.bg-free { position: absolute; z-index: 3; left: 0; right: 0; top: 20%; text-align: center; font: 800 .66rem/1 var(--font-head, inherit); letter-spacing: .08em; color: #ffe14d; text-shadow: 0 1px 2px #000, 0 0 5px rgba(0, 0, 0, .8); pointer-events: none; }
.bg-cell.free .bg-num { opacity: .75; font-size: .7em; transform: translateY(.62em); }
.bg-grid.mini .bg-free { font-size: .45rem; }
.arc-wrap[data-arc="skeeball"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="clawmachine"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="derbyrace"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="whackamole"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="pupsays"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="pupflyer"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="minesweeper"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="bowling"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="darts"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="basketball"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="stickfighters"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="penaltyshootout"] canvas { image-rendering: auto; }
.arc-wrap[data-arc="stickfighters"] .arc-pad { grid-template-columns: repeat(4, 1fr) !important; max-width: 520px; }

/* Penny's Idea Box and Hugo's Bug Patrol */
.fb-card, .fb-dialog { padding: 1.25rem; }
.fb-head { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.fb-head h1, .fb-head h2 { margin: 0 0 .15rem; }
.fb-form { display: grid; gap: .75rem; }
.fb-opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.fb-opt input { position: absolute; opacity: 0; }
.fb-opt span { display: inline-block; padding: .45rem .8rem; border: 2px solid var(--g-bd-e2e8f0, #cbd5e1); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.fb-opt input:checked + span { border-color: var(--indigo); background: rgba(79, 70, 229, .1); color: var(--indigo); }
.fb-opt input:focus-visible + span { outline: 3px solid var(--indigo); outline-offset: 2px; }
.fb-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.fb-msg { margin: 0; min-height: 1.2em; font-weight: 600; }
.fb-msg.good { color: var(--ok); } .fb-msg.bad { color: var(--danger, #dc2626); }
.fb-thanks { display: none; align-items: center; gap: .75rem; font-size: 1.2rem; padding: .5rem 0; animation: fbpop .5s ease; }
.fb-sent .fb-thanks { display: flex; }
@keyframes fbpop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fb-list { display: grid; gap: .6rem; margin-bottom: 1.5rem; }
.fb-item { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 1rem; background: var(--card-bg, #fff); border: 1px solid var(--g-bd-e2e8f0, #e2e8f0); border-radius: var(--radius-sm, 10px); flex-wrap: wrap; }
.fb-item.fresh { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.fb-item p { margin: .25rem 0 0; }
.fb-body { flex: 1; min-width: 12rem; }
.fb-vote { display: grid; justify-items: center; gap: .1rem; min-width: 3.2rem; padding: .4rem; border: 2px solid var(--g-bd-e2e8f0, #cbd5e1); border-radius: 12px; background: transparent; cursor: pointer; color: inherit; font: inherit; }
.fb-vote.on { border-color: var(--indigo); background: rgba(79, 70, 229, .12); color: var(--indigo); }
.fb-vote:active { transform: scale(.94); }
.fb-fab { position: fixed; left: max(.75rem, env(safe-area-inset-left, 0px)); bottom: max(.75rem, env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem .3rem .35rem; border-radius: 999px; border: 2px solid #f59e0b; background: #fffbeb; color: #78350f; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.fb-fab img { border-radius: 8px; background: #fde68a; }
@media (max-width: 520px) { .fb-fab span { display: none; } .fb-fab { padding: .3rem; } }
.fb-dialog-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; }
.fb-dialog-wrap[hidden] { display: none; }
.fb-back { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.fb-dialog { position: relative; width: min(30rem, 100%); max-height: 92vh; overflow: auto; }
.fb-dialog.fb-sent .fb-form { opacity: .5; }
.fb-admin-item { margin-bottom: .6rem; display: grid; gap: .4rem; }
.fb-admin-item p { margin: 0; }
.fb-admin-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.fb-admin-row input[name=reply] { flex: 1; min-width: 12rem; }
.fb-filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .75rem 0; }
.fb-filters .chip.active { background: var(--indigo); color: #fff; }

.fb-side { padding: .6rem; }
.fb-open { width: 100%; justify-content: flex-start; gap: .6rem; }
.fb-open img { border-radius: 8px; background: #fde68a; }

.chip.fb-chip { background: linear-gradient(135deg, #f59e0b, #ec4899); color: #fff; border-color: transparent; font-weight: 800; font-size: 1rem; padding: .65rem 1.1rem; box-shadow: 0 4px 14px rgba(236, 72, 153, .35); }
.chip.fb-chip:hover { filter: brightness(1.08); transform: translateY(-1px); }
.fb-side { padding: .5rem; background: #fffbeb; border: 2px solid #f59e0b; }
.fb-open.btn { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; border: 0; font-weight: 800; font-size: 1.05rem; padding: .85rem 1rem; border-radius: 12px; box-shadow: 0 4px 12px rgba(234, 88, 12, .4); }
.fb-open.btn:hover { filter: brightness(1.08); }
.fb-open img { width: 44px; height: 44px; border-radius: 8px; background: #fde68a; }
.dash-chips .chip:not(.fb-chip) { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border-color: transparent; font-weight: 700; }
.dash-chips .chip:not(.fb-chip):hover { filter: brightness(1.12); }

/* Noughts & Crosses: Beach Day */
.tbw { position: relative; max-width: 520px; margin: 0 auto; aspect-ratio: 760 / 830; border-radius: 20px; overflow: hidden; border: 3px solid #0e7490; box-shadow: 0 10px 24px rgba(0, 60, 90, .22); background: #bae6fd; container-type: inline-size; }
.tb-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tb-grid { position: absolute; left: 19.7%; top: 34.9%; width: 60.5%; height: 55.4%; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.tb-cell { display: grid; place-items: center; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.tb-cell svg { width: 68%; height: 68%; filter: drop-shadow(0 3px 2px rgba(120, 70, 20, .35)); }
.tb-cell:not(:disabled):hover { background: rgba(185, 132, 67, .22); }
.tb-cell:focus-visible { outline: 3px solid #7c3aed; outline-offset: -4px; }
.tb-cell:disabled { cursor: default; }
.tb-cell.pop svg { animation: pop .3s ease-out; }
.tb-cell.win { background: rgba(253, 224, 71, .55); box-shadow: 0 0 0 4px rgba(250, 204, 21, .8); animation: tb-glow 1s ease-in-out infinite alternate; }
@keyframes tb-glow { to { background: rgba(253, 224, 71, .25); } }
.tb-pet { position: absolute; bottom: 0; width: 14.2%; height: auto; image-rendering: pixelated; }
.tb-hugo { left: 1.5%; }
.tb-penny { right: 1.5%; }
.tb-crab { position: absolute; bottom: 1.2%; left: 20%; width: 9%; animation: tb-crab 16s linear infinite; }
.tb-crab-svg { display: block; width: 100%; height: auto; animation: tb-flip 16s linear infinite; }
.tb-legs { animation: tb-scuttle .35s ease-in-out infinite alternate; transform-origin: 40px 40px; }
.tb-cl-l { animation: tb-snap 1.4s ease-in-out infinite; transform-origin: 16px 26px; }
.tb-cl-r { animation: tb-snap 1.4s ease-in-out .7s infinite; transform-origin: 64px 26px; }
@keyframes tb-crab { 0% { left: 20%; } 45% { left: 70%; } 50% { left: 70%; } 95% { left: 20%; } 100% { left: 20%; } }
@keyframes tb-flip { 0%, 46% { transform: scaleX(1); } 50%, 96% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
@keyframes tb-scuttle { to { transform: translateY(-2px) scaleX(1.04); } }
@keyframes tb-snap { 50% { transform: rotate(-12deg); } }
.tb-boat { animation: tb-bob 3s ease-in-out infinite; transform-origin: 27px 14px; transform-box: view-box; }
@keyframes tb-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(6px) rotate(3deg); } }
.tb-lap { animation: tb-lap 5s ease-in-out infinite alternate; }
@keyframes tb-lap { to { transform: translateY(5px); } }
.tb-cl { animation: tb-drift 70s linear infinite; }
.tb-cl1 { animation-duration: 80s; } .tb-cl2 { animation-duration: 55s; animation-delay: -20s; } .tb-cl3 { animation-duration: 110s; animation-delay: -60s; }
@keyframes tb-drift { from { transform: translateX(-120px); } to { transform: translateX(880px); } }
@media (prefers-reduced-motion: reduce) { .tb-boat, .tb-lap, .tb-cl, .tb-crab, .tb-crab-svg, .tb-legs, .tb-cl-l, .tb-cl-r, .tb-cell.win { animation: none; } .tb-cl1 { transform: translateX(150px); } .tb-cl2 { transform: translateX(420px); } .tb-cl3 { transform: translateX(100px); } }
.preview-img { display: block; width: 100%; height: auto; border-radius: 14px; margin-top: .6rem; }

/* Battleships: sunset sea cutaway */
.bsw { position: relative; max-width: 780px; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 3px solid #0c4a6e; box-shadow: 0 10px 24px rgba(0, 40, 80, .25); background: #082f49; }
.bs-sky { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 300; }
.bs-ship-bob { animation: bs-bob 3.2s ease-in-out infinite; transform-origin: 95px 100px; }
.bs-wave { animation: bs-wave 4s ease-in-out infinite alternate; }
.bs-cl { animation: bs-drift 80s linear infinite; }
.bs-cl2 { animation-duration: 55s; animation-delay: -25s; }
.bs-gull { animation: bs-gull 6s ease-in-out infinite alternate; }
@keyframes bs-bob { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(7px) rotate(2.5deg); } }
@keyframes bs-wave { to { transform: translateX(-60px); } }
@keyframes bs-drift { from { transform: translateX(-120px); } to { transform: translateX(1120px); } }
@keyframes bs-gull { to { transform: translateY(8px); } }
.bs-deep { position: relative; padding: 1rem 1rem 2.2rem; background: linear-gradient(#0ea5e9 0, #0369a1 35%, #082f49 100%); overflow: hidden; margin-top: -1px; }
.bs-in { position: relative; z-index: 2; }
.bs-bub { position: absolute; bottom: -20px; width: var(--w); aspect-ratio: 1; border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; animation: bs-rise var(--d) linear infinite; z-index: 1; pointer-events: none; }
@keyframes bs-rise { to { transform: translateY(-520px); opacity: 0; } }
.bs-fish { position: absolute; width: 44px; z-index: 1; pointer-events: none; }
.bs-f1 { top: 30%; left: -50px; animation: bs-swim 26s linear infinite; }
.bs-f2 { top: 68%; left: -50px; animation: bs-swim 34s linear -14s infinite; width: 34px; }
@keyframes bs-swim { to { transform: translateX(900px); } }
.bs-floor { position: relative; aspect-ratio: 1000 / 150; background: #082f49; margin-top: -1px; }
.bs-seabed { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.bs-sub { position: absolute; left: 38%; bottom: 8%; width: 17%; animation: bs-subx 18s ease-in-out infinite alternate; }
.bs-sub-g { animation: bs-subb 3s ease-in-out infinite alternate; }
@keyframes bs-subx { to { transform: translateX(60%); } }
@keyframes bs-subb { to { transform: translateY(-4px); } }
.bs-diver { position: absolute; bottom: 3%; width: 14%; container-type: inline-size; z-index: 3; }
.bs-hugo { left: 3%; } .bs-penny { right: 3%; }
.bs-diver img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.bs-helm { overflow: visible; position: absolute; width: 116.7cqw; left: -8.3cqw; top: -8.3cqw; pointer-events: none; animation: bs-hbob 3s ease-in-out infinite alternate; }
@keyframes bs-hbob { to { transform: translateY(-3px); } }
.bsw .bs-title { color: #fff; }
.bsw .bs-title svg { color: #7dd3fc; }
.bsw .bs-status strong { color: #e0f2fe; }
.bsw .bs-grid { background: rgba(4, 51, 79, .6); border: 2px solid rgba(125, 211, 252, .7); border-radius: 12px; gap: 2px; }
.bsw .bs-cell { background: rgba(14, 116, 144, .5); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .35); }
.bsw .bs-grid.setup .bs-cell:hover { background: rgba(103, 232, 249, .4); }
.bsw .bs-cell.ship { background: #94a3b8; box-shadow: inset 0 0 0 2px #334155, inset 0 3px 0 rgba(255, 255, 255, .45); }
.bsw .bs-grid.setup .bs-cell.ship:hover { background: #cbd5e1; }
.bsw .bs-cell.pv.ok { background: rgba(134, 239, 172, .7); }
.bsw .bs-cell.pv.bad { background: rgba(252, 165, 165, .8); }
.bsw .bs-cell.miss::after { width: 46%; background: transparent; border: 2.5px solid #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .0); }
.bsw .bs-cell.hit { background: #f97316; color: #fef08a; box-shadow: inset 0 0 0 2px #fde047; }
.bsw .bs-cell.ship.hit { background: #ea580c; }
.bsw .bs-cell.sunk { background: #7f1d1d; box-shadow: inset 0 0 0 2px #fca5a5; }
.bsw .bs-cell.reveal { background: rgba(148, 163, 184, .6); }
.bsw .bs-cell.latest { outline: 2px solid #fde047; outline-offset: -2px; }
.bsw .bs-grid.enemy.live button.bs-cell:hover, .bsw .bs-grid.enemy.live button.bs-cell:focus-visible { background: rgba(103, 232, 249, .45); }
@media (prefers-reduced-motion: reduce) { .bs-ship-bob, .bs-wave, .bs-cl, .bs-gull, .bs-bub, .bs-fish, .bs-sub, .bs-sub-g, .bs-helm { animation: none; } .bs-bub, .bs-fish { display: none; } .bs-cl { transform: translateX(200px); } }
.bsw .badge { background: rgba(255, 255, 255, .92); color: #0c4a6e; }
.bsw .badge.badge-warn { background: #fecaca; color: #7f1d1d; }
.bsw .btn-ghost { color: #e0f2fe; }

/* Colour Clash: Paint Studio */
.cc-paint { position: relative; max-width: 700px; padding: 2.6rem 1rem 3.4rem; border-radius: 20px; overflow: hidden; border: 3px solid #d6c7a1; background-color: #fbf3e0; background-image: radial-gradient(#e7dcc4 1.3px, transparent 1.4px); background-size: 28px 28px; box-shadow: 0 10px 24px rgba(90, 60, 20, .18); }
.cc-paint > * { position: relative; z-index: 1; }
.cc-paint > .cc-splats, .cc-paint > .cc-drips, .cc-paint > .cc-pots { position: absolute; z-index: 0; pointer-events: none; }
.cc-splats { inset: 0; width: 100%; height: 100%; opacity: .9; }
.cc-drips { left: 0; top: 0; width: 100%; height: 56px; }
.cc-pots { left: 0; bottom: 0; width: 100%; height: 64px; }
.cc-dr1 { animation: cc-drip 6s ease-in-out infinite alternate; transform-origin: top; }
.cc-dr2 { animation: cc-drip 8s ease-in-out -3s infinite alternate; transform-origin: top; }
@keyframes cc-drip { from { transform: scaleY(.8); } to { transform: scaleY(1.25); } }
.cc-paint .cc-opp { box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.cc-paint .cc-table { position: relative; justify-content: center; padding: 1.4rem 5.5rem; border-radius: 70px; border: 4px solid #5a300f; background: radial-gradient(ellipse at 50% 40%, #c98b4d, #b97b3a 60%, #a16a2c); box-shadow: 0 8px 0 #7c4a1e, 0 14px 18px rgba(0, 0, 0, .25); }
.cc-paint .cc-table::before { content: ''; position: absolute; right: 22%; top: 50%; width: 130px; height: 130px; margin-top: -65px; border-radius: 48% 52% 55% 45% / 52% 45% 55% 48%; background: var(--sp, transparent); opacity: .55; animation: cc-splat .45s ease-out; z-index: 0; }
.cc-t-R { --sp: #ef4444; } .cc-t-B { --sp: #3b82f6; } .cc-t-G { --sp: #22c55e; } .cc-t-Y { --sp: #facc15; }
@keyframes cc-splat { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: .55; } }
.cc-paint .cc-table > * { position: relative; z-index: 1; }
.cc-paint .cc-table .small, .cc-paint .cc-pile .small { color: #fff7e6; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.cc-paint .cc-dir { color: #fff7e6; }
.cc-pet { position: absolute !important; bottom: 6px; width: 15%; max-width: 84px; z-index: 2 !important; }
.cc-hugo { left: 1.5%; } .cc-penny { right: 1.5%; }
.cc-pet img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.cc-beret { position: absolute; left: 8%; top: -9%; width: 84%; pointer-events: none; }
.cc-paint .cc-mine h3 { color: #5a3a12; }
.cc-paint .cc-card { box-shadow: 0 5px 8px rgba(0, 0, 0, .3); }
@media (max-width: 520px) { .cc-paint .cc-table { padding: 1rem 3.2rem; border-radius: 40px; } .cc-pet { width: 17%; } }
@media (prefers-reduced-motion: reduce) { .cc-dr, .cc-paint .cc-table::before { animation: none; } }
.cc-splats { opacity: .5; }
.cc-paint .cc-mine { padding: .7rem .9rem .9rem; border-radius: 16px; background: rgba(255, 249, 234, .88); box-shadow: 0 2px 8px rgba(90, 60, 20, .15); }
.cc-pet { bottom: 12px; }

/* Rock Paper Scissors: Dog Park Showdown */
.rpw { position: relative; width: 100%; max-width: 640px; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 3px solid #15803d; box-shadow: 0 10px 24px rgba(10, 80, 40, .22); background: #86efac; }
.rp-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rp-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .9rem; padding: 1rem 1rem 1.3rem; min-width: 0; }
.rp-cl { animation: rp-drift 80s linear infinite; }
.rp-cl2 { animation-duration: 55s; animation-delay: -22s; } .rp-cl3 { animation-duration: 110s; animation-delay: -60s; }
@keyframes rp-drift { from { transform: translateX(-120px); } to { transform: translateX(1020px); } }
.rp-sign { align-self: center; width: min(100%, 360px); padding: .6rem 1rem .75rem; border-radius: 16px; border: 4px solid #92400e; background: #fde68a; box-shadow: 0 5px 0 #78350f; text-align: center; }
.rp-sign-t { display: block; font-weight: 800; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: #78350f; }
.rp-sign-r { display: flex; justify-content: space-around; gap: .75rem; margin-top: .3rem; }
.rp-sign .rps-side { align-items: center; color: #451a03; }
.rp-sign .rps-pip { background: #fffbeb; border-color: #b45309; }
.rp-stage { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: .5rem; padding-top: 4.2rem; }
.rp-dog { position: relative; display: flex; justify-content: center; }
.rp-dog img { display: block; width: min(100%, 120px); height: auto; image-rendering: pixelated; }
.rp-bub { position: absolute; bottom: 88%; left: 50%; transform: translateX(-50%); width: 92px; height: 78px; display: grid; place-items: center; background: #fff; border: 3px solid #1e293b; border-radius: 50%; }
.rp-bub::after { content: ''; position: absolute; bottom: -12px; left: 50%; margin-left: -8px; width: 14px; height: 14px; background: #fff; border-right: 3px solid #1e293b; border-bottom: 3px solid #1e293b; transform: rotate(45deg); }
.rp-bub svg { width: 64px; height: 52px; }
.rp-bub.q { font: 800 2rem Sora, Manrope, sans-serif; color: #64748b; }
.rp-mid { text-align: center; }
.rp-vs { font: 800 2.6rem Sora, Manrope, sans-serif; color: #fff; -webkit-text-stroke: 3px #1e293b; paint-order: stroke fill; text-shadow: 0 4px 0 #1e293b; }
.rp-status { margin: 0; text-align: center; font-weight: 800; color: #14532d; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); min-height: 1.3em; }
.rp-dog.win img { animation: rp-jump .5s ease-out 3; }
.rp-dog.lose img { transform: rotate(-8deg) translateY(4px); filter: saturate(.7); }
.rp-r.lose img { transform: rotate(8deg) translateY(4px); }
@keyframes rp-jump { 50% { transform: translateY(-16px); } }
.rpw .rps-choices { gap: .9rem; }
.rpw .rps-btn { position: relative; padding: .8rem .3rem .9rem; border: 4px solid #15803d; border-radius: 22px; background: #fff; color: #14532d; box-shadow: 0 7px 0 #166534; transition: transform .1s, box-shadow .1s; }
.rpw .rps-btn.rb-P { border-color: #2563eb; color: #1e3a8a; box-shadow: 0 7px 0 #1e40af; }
.rpw .rps-btn.rb-S { border-color: #dc2626; color: #7f1d1d; box-shadow: 0 7px 0 #991b1b; }
.rpw .rps-btn svg { width: 76px; height: 62px; }
.rpw .rps-btn:hover, .rpw .rps-btn:focus-visible { background: #f0fdf4; transform: translateY(-2px); }
.rpw .rps-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #166534; }
.rpw .rps-history { padding: .7rem .9rem; border-radius: 14px; background: rgba(255, 255, 255, .88); }
@media (max-width: 480px) { .rp-bub { width: 74px; height: 64px; } .rp-bub svg { width: 50px; height: 42px; } .rp-vs { font-size: 2rem; } .rpw .rps-btn svg { width: 56px; height: 46px; } }
@media (prefers-reduced-motion: reduce) { .rp-cl, .rp-dog.win img { animation: none; } }

/* Draw & Guess: Classroom Chalkboard */
.dgc { position: relative; max-width: 700px; padding: 5.4rem 1rem 9.5rem; border-radius: 20px; overflow: hidden; border: 3px solid #8a5a22; background: linear-gradient(#f3e5c5 0, #f3e5c5 calc(100% - 140px), #8a5a22 calc(100% - 140px), #8a5a22 calc(100% - 128px), #d6a05c calc(100% - 128px)); box-shadow: 0 10px 24px rgba(90, 60, 20, .2); }
.dgc > * { position: relative; z-index: 1; }
.dgc > .dg-deco { position: absolute; z-index: 0; left: 0; top: 0; width: 100%; height: 100px; pointer-events: none; }
.dgc .dg-top { padding: .5rem .9rem; border-radius: 12px; background: #fffbeb; border: 3px solid #a8692f; }
.dgc .dg-stage { border: 14px solid #a8692f; border-radius: 12px; box-shadow: inset 0 0 0 3px #5a300f, 0 6px 0 #7c4a1e; background: #1f5d4a; }
.dgc .dg-stage canvas { background: #1f5d4a; }
.dg-tray { display: flex; gap: 10px; align-items: center; height: 14px; margin: -.5rem 1.2rem 0; padding: 0 12px; border-radius: 0 0 6px 6px; background: #7c4a1e; border: 3px solid #5a300f; border-top: 0; }
.dg-tray i { display: block; height: 7px; border-radius: 4px; width: 38px; background: #fff; }
.dg-tray .c2 { background: #f472b6; width: 32px; } .dg-tray .c3 { background: #fde047; width: 30px; }
.dgc .dg-tools, .dgc .dg-guess { padding: .6rem .8rem; border-radius: 12px; background: rgba(255, 251, 235, .92); }
.dgc .dg-feed { padding: .4rem .6rem; border-radius: 12px; background: rgba(255, 251, 235, .85); }
.dgc .dg-feed:empty { display: none; }
.dg-floor { position: absolute !important; left: 0; right: 0; bottom: 0; height: 128px; pointer-events: none; }
.dg-desk { position: absolute; bottom: 12px; width: 30%; height: 70px; }
.dg-desk::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 24px; border-radius: 6px; background: #b97b3a; border: 3px solid #5a300f; }
.dg-desk img { position: absolute; bottom: 14px; left: 50%; width: 62px; height: auto; margin-left: -31px; image-rendering: pixelated; z-index: 1; }
.dg-dl { left: 4%; } .dg-dr { right: 4%; }
@media (max-width: 480px) { .dgc { padding-top: 3.4rem; } .dgc .dg-stage { border-width: 9px; } .dg-desk img { width: 50px; margin-left: -25px; } }

/* Quiz Race: Game Show Stage */
.tvs { position: relative; max-width: 700px; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 3px solid #fde047; background: #1e1b4b; box-shadow: 0 10px 24px rgba(30, 10, 80, .35); }
.tv-bgs { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-beam { animation: tv-sway 7s ease-in-out infinite alternate; transform-origin: 50% 0; transform-box: fill-box; }
.tv-b2 { animation-delay: -3s; animation-direction: alternate-reverse; }
@keyframes tv-sway { from { transform: rotate(-4deg); opacity: .8; } to { transform: rotate(4deg); opacity: 1; } }
.tv-star { animation: tv-tw 2.4s ease-in-out infinite alternate; } .tv-s2 { animation-delay: -1.2s; }
@keyframes tv-tw { to { opacity: .35; } }
.tv-marq { position: absolute; left: 0; right: 0; top: 0; height: 26px; display: flex; justify-content: space-around; align-items: center; background: #fde047; border-bottom: 5px solid #a16207; z-index: 2; }
.tv-marq i { width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: tv-blink 1.2s steps(2) infinite; }
@keyframes tv-blink { 50% { opacity: .35; } }
.tv-in { position: relative; z-index: 1; padding: 2.4rem 3.6rem 0; }
.tvs .tv-wrap { max-width: none; padding: .5rem 0 0; }
.tvs .tv-top { margin-bottom: .5rem; color: #e0e7ff; }
.tvs .tv-top .muted, .tvs .tv-wrap .muted { color: #c7d2fe; }
.tvs .tv-secs { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #dc2626; border: 4px solid #ef4444; box-shadow: 0 0 14px #fde047; font: 800 1.3rem Sora, Manrope, sans-serif; }
.tvs .tv-bar { background: rgba(255, 255, 255, .25); height: 8px; }
.tvs .tv-bar > i { background: linear-gradient(90deg, #fde047, #f97316); }
.tvs .tv-q { padding: 1rem 1.1rem; margin: 0 0 1rem; text-align: center; border-radius: 18px; border: 4px solid #fde047; background: linear-gradient(#fff, #e0e7ff); color: #1e1b4b; box-shadow: 0 0 0 4px #7c3aed, 0 8px 16px rgba(0, 0, 0, .35); }
.tvs .tv-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
@media (max-width: 560px) { .tvs .tv-answers { grid-template-columns: minmax(0, 1fr); } .tv-in { padding: 2.2rem 1rem 0; } }
.tvs .tv-ans { border: 4px solid #fff; border-radius: 16px; color: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .3); font-weight: 700; }
.tvs .tv-ans:nth-child(1) { background: #ef4444; } .tvs .tv-ans:nth-child(2) { background: #2563eb; } .tvs .tv-ans:nth-child(3) { background: #16a34a; } .tvs .tv-ans:nth-child(4) { background: #d97706; }
.tvs .tv-ans:disabled { color: #fff; }
.tvs .tv-letter { background: #fff; border-radius: 50%; color: #1e1b4b; }
.tvs .tv-ans:hover:not(:disabled) { transform: translateY(-2px); border-color: #fde047; }
.tvs .tv-ans.picked { border-color: #fde047; box-shadow: 0 0 0 3px #fde047, 0 6px 0 rgba(0, 0, 0, .3); }
.tvs .tv-ans.right { border-color: #fde047; box-shadow: 0 0 18px 4px #fde047, 0 6px 0 rgba(0, 0, 0, .3); animation: tv-win .5s ease-out 2; }
.tvs .tv-ans.wrong { filter: grayscale(.5) brightness(.75); }
.tvs .tv-ans.dim { opacity: .45; }
@keyframes tv-win { 50% { transform: scale(1.03); } }
.tvs .tv-wrap > h3.h-sm { color: #fde047; }
.tvs .tv-board li { background: rgba(255, 255, 255, .92); color: #1e1b4b; border: 0; border-radius: 12px; }
.tvs .tv-board li.win { background: #fde047; }
.tv-stagefloor { display: flex; align-items: flex-end; justify-content: center; gap: .4rem; margin: 1.2rem -3.6rem 0; padding: 0 .6rem; background: #312e81; border-top: 6px solid #fde047; }
.tv-dog { flex: none; width: 56px; height: auto; margin-bottom: 4px; image-rendering: pixelated; }
.tv-pods { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-width: 0; margin-top: -26px; }
.tv-pod { flex: 1 1 0; max-width: 110px; min-width: 0; padding: .3rem .2rem 0; text-align: center; border-radius: 10px 10px 0 0; color: #fff; box-shadow: inset 0 5px 0 rgba(255, 255, 255, .35); transition: height .5s; background: #64748b; overflow: hidden; }
.tv-pod.me { outline: 3px solid #fde047; outline-offset: -3px; }
.tv-pod .tv-pn { display: block; font-size: .72rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-pod strong { display: block; font: 800 1rem Sora, Manrope, sans-serif; }
.tv-pod.seat-0 { background: #2563eb; } .tv-pod.seat-1 { background: #7c3aed; } .tv-pod.seat-2 { background: #16a34a; } .tv-pod.seat-3 { background: #d97706; } .tv-pod.seat-4 { background: #db2777; }
.tv-pod.seat-5 { background: #0d9488; } .tv-pod.seat-6 { background: #dc2626; } .tv-pod.seat-7 { background: #4f46e5; } .tv-pod.seat-8 { background: #65a30d; } .tv-pod.seat-9 { background: #475569; }
@media (max-width: 560px) { .tv-stagefloor { margin: 1.2rem -1rem 0; } .tv-dog { width: 40px; } }
@media (prefers-reduced-motion: reduce) { .tv-beam, .tv-star, .tv-marq i, .tvs .tv-ans.right { animation: none; } }
.tvs .badge-soft { background: #fff; color: #4c1d95; }
.tv-pod { min-height: 48px; }
.tv-stagefloor { padding-top: 14px; }

/* Word Duel: Wizard's Library */
.wdw { position: relative; max-width: 700px; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 3px solid #a78bfa; background: radial-gradient(ellipse at 50% 0, #4c1d95, #1a0f3a 70%); box-shadow: 0 10px 24px rgba(30, 10, 80, .35); }
.wd-bg { position: absolute; left: 0; top: 0; width: 100%; height: auto; aspect-ratio: 900 / 270; pointer-events: none; }
.wd-in { position: relative; z-index: 1; padding: 8.2rem 1rem 1.2rem; }
.wdw .wd-wrap { max-width: none; }
.wd-halo { animation: wd-glow 2.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.wd-flame { animation: wd-flick .35s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.wd-tw { animation: wd-tw 3s ease-in-out infinite alternate; }
@keyframes wd-glow { from { opacity: .55; transform: scale(.9); } to { opacity: 1; transform: scale(1.18); } }
@keyframes wd-flick { from { transform: scale(1, .92) rotate(-3deg); } to { transform: scale(.94, 1.08) rotate(3deg); } }
@keyframes wd-tw { to { opacity: .25; } }
.wdw .wd-score { justify-content: center; gap: .8rem 1.2rem; padding: .6rem 1rem 1.3rem; background: #7c3aed; border: 3px solid #fde047; border-radius: 12px 12px 50% 50% / 12px 12px 22px 22px; color: #fff; text-align: center; }
.wdw .wd-score .muted { color: #ede9fe; }
.wdw .wd-sc { color: #fff; }
.wdw .wd-sc strong { color: #fde047; }
.wd-duel { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: .3rem; padding: 1.8rem .4rem .2rem; }
.wd-duel::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 0; height: 22px; border-radius: 50%; border: 2px solid rgba(167, 139, 250, .7); box-shadow: 0 0 14px rgba(167, 139, 250, .5); }
.wd-wiz { position: relative; display: block; width: 84px; flex: none; z-index: 1; }
.wd-wiz img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.wd-hat { position: absolute; width: 68%; height: auto; pointer-events: none; transform-origin: 50% 92%; }
.wd-hugo .wd-hat { left: 11%; top: -31%; transform: rotate(-6deg); }
.wd-penny { width: 90px; }
.wd-penny .wd-hat { left: 3%; top: -27%; transform: rotate(6deg); }
.wd-beams { flex: 1; min-width: 0; height: 56px; margin-bottom: 1.6rem; overflow: visible; }
.wd-b1, .wd-b2 { stroke-dasharray: 9 7; animation: wd-dash 1s linear infinite; filter: drop-shadow(0 0 4px currentColor); }
.wd-b2 { animation-direction: reverse; }
@keyframes wd-dash { to { stroke-dashoffset: -32; } }
.wd-spark { position: absolute; left: 50%; top: 52%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: radial-gradient(#fff 20%, rgba(253, 224, 71, .6) 55%, transparent 72%); animation: wd-pulse 1.1s ease-in-out infinite alternate; }
@keyframes wd-pulse { from { transform: scale(.7); opacity: .7; } to { transform: scale(1.35); opacity: 1; } }
.wdw .wd-cat { background: #fff; color: #4c1d95; }
.wdw .wd-hints .muted, .wdw .wd-opp .h-sm { color: #e9d5ff; }
.wdw .wd-t { background: #1e1b4b; border-color: #6366f1; color: #fff; }
.wdw .wd-t.has { border-color: #c4b5fd; }
.wdw .wd-t.g { background: #16a34a; border-color: #bbf7d0; box-shadow: 0 0 10px rgba(74, 222, 128, .55); }
.wdw .wd-t.y { background: #eab308; border-color: #fef08a; box-shadow: 0 0 10px rgba(253, 224, 71, .5); }
.wdw .wd-t.x { background: #475569; border-color: #94a3b8; }
.wdw .wd-t.hint { background: #312e81; }
.wdw .wd-t.hint.has { background: #fef3c7; color: #78350f; border-color: #e0b400; }
.wdw .wd-k { background: #fef3c7; color: #78350f; border: 3px solid #92400e; border-radius: 9px; }
.wdw .wd-k.g { background: #16a34a; color: #fff; border-color: #bbf7d0; }
.wdw .wd-k.y { background: #eab308; color: #fff; border-color: #fef08a; }
.wdw .wd-k.x { background: #475569; color: #cbd5e1; border-color: #94a3b8; }
@media (max-width: 520px) { .wd-in { padding: 6.4rem .7rem 1rem; } .wd-wiz { width: 64px; } .wd-penny { width: 68px; } }
@media (prefers-reduced-motion: reduce) { .wd-halo, .wd-flame, .wd-tw, .wd-b1, .wd-b2, .wd-spark { animation: none; } }

/* Whodunit: Midnight Manor */
.whm { position: relative; max-width: 720px; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 3px solid #1c1917; background: #1e1b4b; box-shadow: 0 10px 24px rgba(10, 5, 40, .4); }
.wh-sky { display: block; width: 100%; height: auto; aspect-ratio: 500 / 140; }
.wh-tw { animation: wh-tw 3s ease-in-out infinite alternate; }
@keyframes wh-tw { to { opacity: .25; } }
.wh-moon { animation: wh-moon 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes wh-moon { to { transform: scale(1.15); } }
.wh-bat { animation: wh-fly 16s linear infinite; }
.wh-bat2 { animation-duration: 22s; animation-delay: -9s; }
.wh-bat1 { animation-name: wh-fly1; }
@keyframes wh-fly1 { from { transform: translate(-40px, 70px); } 50% { transform: translate(250px, 30px); } to { transform: translate(540px, 80px); } }
@keyframes wh-fly { from { transform: translate(540px, 20px) scale(.8); } 50% { transform: translate(260px, 50px) scale(.8); } to { transform: translate(-40px, 30px) scale(.8); } }
.wh-house { background: #292524; padding: 0 6px; margin: -1px 7% 0; border-left: 4px solid #1c1917; border-right: 4px solid #1c1917; position: relative; z-index: 1; }
.whm .wh-manor { gap: 4px; background: #1c1917; border: 0; }
.whm .wh-room { min-height: 112px; border: 0; border-radius: 0; color: #fff; overflow: hidden; background: #312e81; opacity: 1; background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 8px, transparent 8px 20px); box-shadow: inset 0 -20px 0 rgba(0, 0, 0, .25); }
.whm .wh-room:nth-child(1) { background-color: #312e81; } .whm .wh-room:nth-child(2) { background-color: #7c2d12; } .whm .wh-room:nth-child(3) { background-color: #0f766e; }
.whm .wh-room:nth-child(4) { background-color: #581c87; } .whm .wh-room:nth-child(5) { background-color: #166534; } .whm .wh-room:nth-child(6) { background-color: #9f1239; }
.whm .wh-room:nth-child(7) { background-color: #1e3a8a; } .whm .wh-room:nth-child(8) { background-color: #92400e; } .whm .wh-room:nth-child(9) { background-color: #075985; }
.whm .wh-room:disabled { color: #fff; opacity: 1; }
.whm .wh-rname { align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .5); font-size: .72rem; color: #fff; }
.whm .wh-pass svg { color: #fde047; }
.whm .wh-room.here { box-shadow: inset 0 0 0 3px #a78bfa, inset 0 -20px 0 rgba(0, 0, 0, .25); }
.whm .wh-room.can { background-color: inherit; box-shadow: inset 0 0 0 4px #fde047, inset 0 -20px 0 rgba(0, 0, 0, .25); animation: wh-can 1s ease-in-out infinite alternate; cursor: pointer; }
.whm .wh-room.can:hover { filter: brightness(1.2); }
@keyframes wh-can { to { box-shadow: inset 0 0 0 4px #fff7b0, inset 0 -20px 0 rgba(0, 0, 0, .25); } }
.wh-prop { position: absolute; right: 8px; bottom: 6px; width: 46%; max-width: 84px; height: auto; pointer-events: none; opacity: .95; }
.whm .wh-weap { background: #fef3c7; color: #78350f; border-color: #92400e; }
.wh-lawn { position: relative; padding: 1.4rem 1rem 1rem; background: linear-gradient(#166534, #14532d); border-top: 6px solid #292524; min-height: 150px; box-shadow: inset 0 14px 18px rgba(255, 255, 255, .07); }
.wh-lawn-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .5rem; padding: 0 70px; }
.wh-you { margin: 0; text-align: center; color: #dcfce7; }
.wh-pet { position: absolute; bottom: 8px; width: 58px; z-index: 2; }
.wh-pet img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.wh-hugo { left: 8px; } .wh-penny { right: 8px; }
.wh-hat { position: absolute; width: 78%; height: auto; left: 6%; top: -29%; pointer-events: none; }
.wh-mag { position: absolute; width: 50%; height: auto; right: -34%; bottom: -6%; transform-origin: 30% 30%; animation: wh-search 3s ease-in-out infinite alternate; }
@keyframes wh-search { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
.wh-book { position: absolute; width: 60%; height: auto; left: -50%; bottom: -4%; }
.wh-below { padding: 1rem; background: #fdf6e3; border-top: 6px solid #292524; }
.whm .wh-wrap { max-width: none; }
.wh-below:empty { display: none; }
@media (max-width: 520px) { .wh-house { margin: -1px 2%; } .whm .wh-room { min-height: 92px; } .wh-lawn-in { padding: 0 54px; } .wh-pet { width: 46px; } }
@media (prefers-reduced-motion: reduce) { .wh-tw, .wh-moon, .wh-bat, .wh-mag, .whm .wh-room.can { animation: none; } }

/* Deal Street: Toy Town Tabletop */
.dsw { width: 100%; max-width: 780px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #b45309; box-shadow: 0 6px 18px rgba(67, 20, 7, .35); }
.ds-scene { position: relative; height: clamp(90px, 20vw, 150px); overflow: hidden; }
.ds-sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ds-cl { animation: dsCloud 60s linear infinite alternate; }
.ds-cl2 { animation-duration: 80s; animation-direction: alternate-reverse; }
@keyframes dsCloud { from { transform: translateX(-40px); } to { transform: translateX(180px); } }
.ds-dog { position: absolute; bottom: 0; width: clamp(48px, 11vw, 84px); display: block; }
.ds-dog img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.ds-dh { left: 8%; }
.ds-dp { right: 8%; width: clamp(56px, 12.8vw, 98px); }
.ds-hat { position: absolute; pointer-events: none; height: auto; }
.ds-dh .ds-hat { width: 66%; left: 13%; top: -27%; transform: rotate(-5deg); }
.ds-dp .ds-hat { width: 62%; left: 6%; top: 2%; transform: rotate(5deg); }
.ds-notes { position: absolute; width: 60%; bottom: -4%; right: -52%; height: auto; }
.ds-dp .ds-notes { right: auto; left: -52%; }
.ds-table { padding: clamp(8px, 2.4vw, 18px); background: repeating-linear-gradient(90deg, #b45309 0 38px, #a04a08 38px 40px), #b45309; }
.ds-table .ds-wrap { max-width: none; }
.ds-top.cc-opps { gap: .4rem; }
.ds-table .cc-opp { background: #fffbeb; border: 2px solid #78350f; color: #1c1917; box-shadow: 0 2px 0 #78350f; }
.ds-table .cc-opp .muted { color: #44403c; }
.ds-table .cc-opp.is-turn { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .45); }
.ds-table .ds-cash { color: #166534; }
.ds-frame { position: relative; padding: clamp(5px, 1.4vw, 10px); background: #78350f; border-radius: 12px; box-shadow: inset 0 0 0 2px #92400e, 0 4px 10px rgba(0, 0, 0, .35); }
.ds-parksvg { position: absolute; left: calc(clamp(5px, 1.4vw, 10px) + (100% - 2 * clamp(5px, 1.4vw, 10px)) / 11); top: calc(clamp(5px, 1.4vw, 10px) + (100% - 2 * clamp(5px, 1.4vw, 10px)) / 11); width: calc((100% - 2 * clamp(5px, 1.4vw, 10px)) * 9 / 11); height: calc((100% - 2 * clamp(5px, 1.4vw, 10px)) * 9 / 11); display: block; }
.ds-frame .ds-board { position: relative; z-index: 1; background: transparent; border: 0; border-radius: 4px; gap: 2px; }
.ds-frame .ds-center { background: transparent; }
.ds-sq { background: #fffaf0; border-radius: 3px; box-shadow: inset 0 0 0 1px #d6c7a8; color: #1c1917; }
.ds-sq:hover { background: #fff3d6; }
.ds-sq.sel { outline: 3px solid #16a34a; }
.ds-sq.t-go, .ds-sq.t-jail, .ds-sq.t-rest, .ds-sq.t-gojail { background: #fde68a; box-shadow: inset 0 0 0 2px #b45309; }
.ds-sq.t-go { background: #bbf7d0; box-shadow: inset 0 0 0 2px #15803d; }
.ds-sq.t-gojail { background: #fecaca; box-shadow: inset 0 0 0 2px #b91c1c; }
.ds-sq.t-jail { background: #fed7aa; }
.ds-sq.t-fortune { background: #e0f2fe; }
.ds-sq.t-luck { background: #ffedd5; }
.ds-sq.owned { box-shadow: inset 0 -5px 0 var(--own, #2563eb), inset 0 0 0 1px #d6c7a8; }
.ds-sq.t-go .ds-n, .ds-sq.t-jail .ds-n, .ds-sq.t-rest .ds-n, .ds-sq.t-gojail .ds-n { font-size: 2.35cqw; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: normal; word-break: normal; line-height: 1.05; }
.ds-n { font-size: max(6.5px, 1.85cqw); letter-spacing: -.01em; overflow-wrap: break-word; hyphens: manual; color: #1c1917; }
.ds-p { font-size: max(6.5px, 1.85cqw); font-weight: 700; color: #3f3f46; }
.ds-band { height: 20%; border-bottom: 1px solid rgba(0, 0, 0, .35); }
.ds-ic svg { color: #b45309; }
.ds-house { width: 1.8cqw; height: 1.8cqw; background: #16a34a; border: 0; clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%); }
.ds-hotel { width: 3.6cqw; height: 2.4cqw; background: #dc2626; border: 0; clip-path: polygon(0 100%, 0 30%, 18% 30%, 18% 0, 82% 0, 82% 30%, 100% 30%, 100% 100%); }
.ds-houses.pop { animation: dsPop .6s cubic-bezier(.3, 1.7, .5, 1) both; transform-origin: 50% 100%; }
@keyframes dsPop { 0% { transform: translateY(-14px) scale(.3); opacity: 0; } 55% { transform: translateY(0) scale(1.35); opacity: 1; } 100% { transform: scale(1); } }
.ds-title { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 3.4cqw; letter-spacing: .12em; text-transform: uppercase; color: #fffbeb; background: #7f1d1d; -webkit-background-clip: border-box; background-clip: border-box; padding: .15em .7em; border-radius: 6px; border: 2px solid #fde68a; box-shadow: 0 2px 0 #450a0a; position: relative; z-index: 1; }
.ds-event { background: rgba(255, 251, 235, .94); color: #1c1917; padding: .2rem .6rem; border-radius: 999px; font-weight: 600; position: relative; z-index: 1; }
.ds-event:empty { display: none; }
.ds-info { position: relative; z-index: 1; }
.ds-info > .small { background: rgba(255, 251, 235, .94); color: #44403c; padding: .35rem .7rem; border-radius: 999px; }
.ds-info .ds-detail { color: #1c1917; }
.ds-frame .ds-center { padding: 4% 6.5% 5%; gap: .25rem; }
.ds-jet { animation: dsJet 1.6s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes dsJet { from { opacity: .75; stroke-width: 3; } to { opacity: 1; stroke-width: 4.5; } }
.ds-sp { animation: dsSp 1.4s ease-in-out infinite; }
.ds-sp.s2 { animation-delay: .45s; } .ds-sp.s3 { animation-delay: .9s; }
@keyframes dsSp { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ds-cl, .ds-jet, .ds-sp, .ds-houses.pop { animation: none; } .ds-sp { opacity: 1; } }
.ds-below { margin-top: .75rem; }
.ds-below > .ds-box, .ds-below > .alert, .ds-below > p { background-color: #fffbeb; }
.ds-below > p.muted { color: #fffbeb; text-align: center; font-weight: 600; }
.ds-below .ds-cols { background: #fffbeb; border-radius: 10px; padding: .75rem; color: #1c1917; }

.ds-sq:not(.t-go):not(.t-jail):not(.t-rest):not(.t-gojail) .ds-toks { left: auto; right: 1px; bottom: 1px; width: 50%; justify-content: flex-end; }
.ds-sq:not(.t-go):not(.t-jail):not(.t-rest):not(.t-gojail) .ds-tok { width: 2.9cqw; height: 2.9cqw; font-size: 1.6cqw; }
.ds-frame .ds-dice { padding: .15rem 0; }

/* Go Fish: Fishing Pier */
.gfw { width: 100%; max-width: 780px; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px rgba(67, 20, 7, .35); background: #b45309; }
.gf-scene { position: relative; min-height: 340px; display: flex; flex-direction: column; gap: .6rem; padding: .75rem .75rem 5.5rem; overflow: hidden; }
.gf-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.gf-cl { animation: gfCloud 70s linear infinite alternate; }
.gf-cl2 { animation-duration: 95s; animation-direction: alternate-reverse; }
@keyframes gfCloud { from { transform: translateX(-60px); } to { transform: translateX(200px); } }
.gf-rip { transform-origin: 380px 250px; animation: gfRip 4s ease-out infinite; }
.gf-rip.r2 { animation-delay: 2s; }
@keyframes gfRip { from { transform: scale(.3); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.gf-f.f1 { animation: gfSwim 22s linear infinite; }
.gf-f.f2 { animation: gfSwim 30s linear infinite reverse; animation-delay: -9s; }
.gf-f.f3 { animation: gfSwim 26s linear infinite; animation-delay: -15s; }
@keyframes gfSwim { from { transform: translateX(-80px); } to { transform: translateX(800px); } }
.gf-pad { animation: gfBob 3.4s ease-in-out infinite alternate; }
.gf-pad.p1 { animation-delay: -1s; } .gf-pad.p2 { animation-delay: -2s; }
@keyframes gfBob { from { transform: translateY(0); } to { transform: translateY(3px); } }
.gf-jf { opacity: 0; }
.gf-jf.go { animation: gfJump 1.1s ease-out; }
@keyframes gfJump { 0% { opacity: 1; transform: translateY(40px) rotate(0); } 50% { opacity: 1; transform: translateY(-70px) rotate(-25deg); } 100% { opacity: 0; transform: translateY(30px) rotate(20deg); } }
.gf-top, .gf-mid { position: relative; z-index: 1; }
.gf-top.cc-opps { gap: .45rem; }
.gf-mid { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin: auto 0; }
.gf-pool { margin: 0; padding: .35rem .9rem; border: 3px solid #78350f; border-radius: 10px; background: #fffbeb; box-shadow: 0 4px 0 #78350f; color: #1c1917; font-weight: 800; text-align: center; }
.gf-pool svg { width: 1em; height: 1em; vertical-align: -.12em; }
.gf-mid .alert { margin: 0; max-width: 34rem; background: #fffbeb; color: #1c1917; border: 2px solid #78350f; }
.gf-splash { position: absolute; left: 50%; top: 52%; z-index: 2; transform: translate(-50%, -50%); opacity: 0; font: 800 clamp(1.4rem, 6vw, 2.4rem) 'Sora', sans-serif; color: #fff; text-shadow: 0 3px 0 #0c4a6e; pointer-events: none; white-space: nowrap; }
.gf-splash.go { animation: gfSplash 1.4s ease-out; }
@keyframes gfSplash { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.5); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }
.gf-dog { position: absolute; bottom: -2px; z-index: 2; width: clamp(54px, 12vw, 88px); display: block; pointer-events: none; }
.gf-dog img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.gf-dh { left: 3%; } .gf-dp { right: 3%; width: clamp(62px, 14vw, 102px); }
.gf-rod { position: absolute; bottom: 38%; left: 62%; width: 150%; height: auto; overflow: visible; }
.gf-rod.flip { left: auto; right: 62%; transform: scaleX(-1); }
.gf-bob { animation: gfBobber 2.2s ease-in-out infinite alternate; }
@keyframes gfBobber { from { transform: translateY(-2px); } to { transform: translateY(3px); } }
.gf-pier { position: relative; padding: 1rem .9rem 1rem; display: flex; flex-direction: column; gap: .75rem; background: repeating-linear-gradient(180deg, #b45309 0 46px, #7c2d12 46px 49px); border-top: 10px solid #92400e; color: #fffbeb; }
.gf-pier .h-sm { color: #fffbeb; }
.gf-pier .gf-ask p { margin: 0; font-weight: 800; text-shadow: 0 2px 0 #451a03; }
.gf-pier .gf-ask .btn { background: #dc2626; border: 4px solid #fff; border-radius: 999px; color: #fff; font-weight: 800; font-size: 1.2rem; padding: .5rem 2rem; box-shadow: 0 0 0 4px #dc2626, 0 6px 0 4px #7f1d1d; margin-bottom: 6px; }
.gf-pier .gf-ask .btn:disabled { opacity: .55; }
.gf-pier .gf-card { width: 3.1rem; height: 4.3rem; border: 2px solid #1e293b; border-radius: 8px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.gf-pier .gf-card b { font-size: 1.3rem; } .gf-pier .gf-card i { font-size: 1.4rem; }
.gf-pier .gf-group { border-radius: 10px; }
.gf-pier .gf-group.is-picked { border-color: #16a34a; background: rgba(22, 163, 74, .3); }
.gf-pier .wt-log { background: #fffbeb; color: #1c1917; border-radius: 10px; padding: .6rem .8rem; }
.gf-pier .wt-log .h-sm { color: #1c1917; }
.gf-top .cc-opp, .gf-top .gf-opp { background: #fffbeb; border: 3px solid #78350f; border-radius: 12px; color: #1c1917; box-shadow: 0 4px 0 #78350f; }
.gf-top .cc-opp .muted { color: #44403c; }
.gf-top .cc-opp.is-turn { border-color: #16a34a; box-shadow: 0 4px 0 #166534, 0 0 0 4px rgba(22, 163, 74, .4); }
.gf-top .gf-opp.is-picked { border-color: #16a34a; background: #dcfce7; }
.gf-top .gf-opp:not(:disabled):hover { background: #fef3c7; }
@media (prefers-reduced-motion: reduce) { .gf-cl, .gf-rip, .gf-f, .gf-pad, .gf-bob, .gf-jf.go, .gf-splash.go { animation: none; } }
.gf-pier .gf-group { padding-left: 1.9rem; }
.gf-pier .gf-group .gf-card { margin-left: -1.85rem; }

/* Whiteboard: Meeting Room */
.wb-wrap { position: relative; padding: .75rem .75rem 1rem; border-radius: 14px; background: #f5f5f4; color: #1c1917; }
.wb-wall { order: 0; position: relative; height: clamp(42px, 9vw, 64px); }
.wb-win { position: absolute; right: 0; top: 0; height: 100%; width: auto; display: block; }
.wb-clock { position: absolute; left: 0; top: 0; height: 100%; width: auto; display: block; }
.wb-hand { transform-origin: 44px 22px; animation: wbTick 60s steps(60) infinite; }
@keyframes wbTick { to { transform: rotate(360deg); } }
.wb-stage { order: 1; border: clamp(7px, 1.8vw, 14px) solid #cbd5e1; border-radius: 10px; box-shadow: inset 0 0 0 2px #94a3b8, 0 8px 0 #94a3b8, 0 16px 22px rgba(0, 0, 0, .2); margin-bottom: 8px; }
.wb-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent 40%, rgba(186, 230, 253, .28) 50%, transparent 60%); z-index: 2; }
.wb-tray { order: 2; position: relative; height: clamp(46px, 10vw, 72px); margin-top: 6px; }
.wb-ledge { position: absolute; left: 12%; right: 12%; top: 0; height: 14px; background: #94a3b8; border-radius: 4px 4px 10px 10px; box-shadow: 0 4px 0 #64748b; }
.wb-mks { position: absolute; left: 14%; right: 14%; top: -14px; display: flex; justify-content: space-around; }
.wb-mks i { display: block; width: clamp(34px, 11%, 80px); height: 14px; border-radius: 7px; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); position: relative; }
.wb-mks i::before { content: ""; position: absolute; left: 0; top: 0; width: 28%; height: 100%; border-radius: 7px 2px 2px 7px; background: #1e293b; }
.wb-dog { position: absolute; bottom: -4px; width: clamp(46px, 11vw, 84px); display: block; }
.wb-dog img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.wb-dh { left: 0; } .wb-dp { right: 0; width: clamp(54px, 12.5vw, 98px); }
.wb-nm { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 9px; border: 2px solid #78350f; border-radius: 9px; background: #fffbeb; box-shadow: 0 2px 0 #78350f; color: #1c1917; font-weight: 800; font-size: .72rem; }
.wb-tools { order: 3; background: #fffbeb; border: 3px solid #78350f; border-radius: 14px; padding: .5rem .7rem; box-shadow: 0 4px 0 #78350f; }
.wb-opts { order: 4; background: #fffbeb; border: 3px solid #78350f; border-radius: 14px; box-shadow: 0 4px 0 #78350f; color: #1c1917; }
.wb-opts .wb-lbl, .wb-opts .muted { color: #44403c; }
.wb-vote { order: 5; } .wb-sel { order: 6; } .wb-panel { order: 7; } .wb-acts { order: 8; } .wb-status { order: 9; color: #44403c; }
.wb-tool { border: 2px solid #78350f; background: #fff; color: #1c1917; }
.wb-tool.is-on { background: #2563eb; color: #fff; border-color: #78350f; }
.wb-sw { border: 3px solid #fff !important; box-shadow: 0 0 0 2px #78350f; }
.wb-sw.is-on { box-shadow: 0 0 0 4px #16a34a; }
.wb-stage .wb-textin { color: #1c1917; }
@media (prefers-reduced-motion: reduce) { .wb-hand { animation: none; } }

/* Block Battle: Toy Playroom */
.bk-wrap { position: relative; background-color: #bae6fd; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 12l3 8 8 .5-6 5 2 8-7-4.5-7 4.5 2-8-6-5 8-.5z' fill='%23fff' opacity='.7'/%3E%3C/svg%3E"); border: 0; border-radius: 16px; color: #1c1917; padding-top: .5rem; box-shadow: 0 6px 18px rgba(67, 20, 7, .25); }
.bk-wrap .small.muted, .bk-wrap .h-sm { color: #1e3a5f; }
.bk-scene { display: flex; justify-content: space-between; align-items: flex-start; height: clamp(44px, 9vw, 70px); padding: 0 .5rem; }
.bk-shelf { height: 100%; width: auto; display: block; }
.bk-mobile { height: 100%; width: auto; display: block; }
.bk-sway { animation: bkSway 3s ease-in-out infinite alternate; transform-origin: 55px 18px; }
@keyframes bkSway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.bk-box { background: #fffbeb; border: 3px solid #78350f; border-radius: 12px; box-shadow: 0 4px 0 #78350f; }
.bk-lbl { color: #78350f; }
.bk-stats strong { color: #1c1917; }
.bk-cv { border: clamp(7px, 1.6vw, 12px) solid #b45309; border-radius: 14px; background: #fff7ed; box-shadow: inset 0 0 0 2px #92400e, 0 8px 0 #78350f, 0 14px 20px rgba(0, 0, 0, .25); }
.bk-stage::after { content: ""; position: absolute; left: .7rem; right: 0; top: 0; bottom: 0; border-radius: 14px; pointer-events: none; background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .3) 50%, transparent 60%); }
.bk-ovl { color: #1c1917; background: rgba(255, 251, 235, .85); }
.bk-ovl strong { color: #7f1d1d; }
.bk-floor { position: relative; height: clamp(70px, 16vw, 120px); margin: 1.2rem 0 .2rem; }
.bk-rug { position: absolute; left: 3%; right: 3%; bottom: 0; height: 62%; border-radius: 50%; background: #34d399; border: 4px solid #065f46; }
.bk-dog { position: absolute; bottom: 8%; width: clamp(50px, 12vw, 90px); display: block; }
.bk-dog img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.bk-dh { left: 14%; } .bk-dp { right: 14%; width: clamp(58px, 13.5vw, 104px); }
.bk-nm { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 9px; border: 2px solid #78350f; border-radius: 9px; background: #fffbeb; box-shadow: 0 2px 0 #78350f; color: #1c1917; font-weight: 800; font-size: .72rem; }
.bk-tw { position: absolute; bottom: 14%; display: flex; flex-direction: column-reverse; width: clamp(18px, 4.6vw, 34px); }
.bk-tw i { display: block; aspect-ratio: 1; border-radius: 4px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), inset 0 3px 0 rgba(255, 255, 255, .35); border: 2px solid rgba(0, 0, 0, .35); }
.bk-tw1 { left: 3%; } .bk-tw2 { right: 3%; }
.bk-opp { background: #fffbeb; border: 3px solid var(--oc, #78350f); color: #1c1917; }
.bk-opp-b canvas { background: #fff7ed; }
.bk-opp .muted { color: #44403c; }
@media (prefers-reduced-motion: reduce) { .bk-sway { animation: none; } }

/* Solitaire: Cosy Cabin */
.slc { width: 100%; max-width: 760px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #7f1d1d; box-shadow: 0 6px 18px rgba(67, 20, 7, .4); }
.slc-scene { position: relative; aspect-ratio: 760 / 190; overflow: hidden; }
.slc-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.slc-fire { transform-origin: 90px 190px; animation: slcFire .5s ease-in-out infinite alternate; }
@keyframes slcFire { from { transform: scale(1, .94); } to { transform: scale(1.04, 1.06); } }
.slc-snow { animation: slcSnow 6s linear infinite; }
@keyframes slcSnow { from { transform: translateY(-40px); } to { transform: translateY(40px); } }
.slc-in { position: relative; margin: 0 clamp(6px, 3vw, 24px); padding: clamp(8px, 2vw, 16px); border: clamp(8px, 1.8vw, 14px) solid #78350f; border-radius: 18px; background: radial-gradient(#15803d, #14532d); box-shadow: inset 0 0 0 3px #92400e, 0 8px 0 #451a03, 0 16px 22px rgba(0, 0, 0, .4); color: #f0fdf4; }
.slc-in .sl-wrap { margin: 0 auto; padding-bottom: .25rem; max-width: 700px; color: #f0fdf4; }
.slc-in .sl-time, .slc-in .sl-bar .muted, .slc-in .sl-look .small, .slc-in .small.muted, .slc-in .muted { color: #dcfce7; }
.slc-in .sl-chip { background: #fffbeb; color: #1c1917; border: 2px solid #78350f; }
.slc-in .sl-card.sl-slot { border-color: rgba(255, 255, 255, .45); color: rgba(255, 255, 255, .7); }
.slc-in .btn-secondary, .slc-in .btn-ghost { background: #fffbeb; color: #1c1917; border: 2px solid #78350f; box-shadow: 0 3px 0 #78350f; }
.slc-in .btn-primary { border: 2px solid #78350f; box-shadow: 0 3px 0 #78350f; }
.slc-in .aw-results, .slc-in .sl-hint-msg { background: #fffbeb; color: #1c1917; border: 2px solid #78350f; border-radius: 12px; padding: .5rem .8rem; margin-bottom: .6rem; }
.slc-in .aw-results .muted, .slc-in .sl-hint-msg .muted { color: #44403c; }
.slc-floor { position: relative; height: clamp(80px, 17vw, 130px); margin-top: 4px; }
.slc-rug { position: absolute; left: 2%; right: 2%; bottom: 4%; height: 64%; border-radius: 50%; background: #fbbf24; border: 4px solid #92400e; box-shadow: inset 0 0 0 8px #fbbf24, inset 0 0 0 12px #dc2626; }
.slc-dog { position: absolute; bottom: 10%; width: clamp(50px, 12vw, 90px); display: block; }
.slc-dog img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.slc-dh { left: 8%; } .slc-dp { right: 22%; width: clamp(58px, 13.5vw, 104px); }
.slc-nm { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 9px; border: 2px solid #78350f; border-radius: 9px; background: #fffbeb; box-shadow: 0 2px 0 #78350f; color: #1c1917; font-weight: 800; font-size: .72rem; }
.slc-mug { position: absolute; right: 6%; bottom: 16%; width: clamp(32px, 7vw, 52px); height: auto; }
.slc-steam { animation: slcSteam 2.4s ease-in-out infinite alternate; }
@keyframes slcSteam { from { opacity: .3; transform: translateY(2px); } to { opacity: .8; transform: translateY(-3px); } }
/* the 8-bit card style keeps its own look, without the cabin */
.slc.slc-8 { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
.slc.slc-8 .slc-scene, .slc.slc-8 .slc-floor { display: none; }
.slc.slc-8 .slc-in { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .slc-fire, .slc-snow, .slc-steam { animation: none; } }

/* Dominoes: Harbour Cafe */
.dmw { width: 100%; max-width: 760px; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); background: #d6d3d1; }
.dm-scene { position: relative; aspect-ratio: 760 / 200; overflow: hidden; }
.dm-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dm-cl { animation: dmCloud 70s linear infinite alternate; }
.dm-cl2 { animation-duration: 95s; animation-direction: alternate-reverse; }
@keyframes dmCloud { from { transform: translateX(-60px); } to { transform: translateX(220px); } }
.dm-boat { animation: dmBoat 3.4s ease-in-out infinite alternate; transform-origin: 170px 150px; }
.dm-boat.dm-b2 { animation-duration: 4.2s; animation-delay: -1.5s; transform-origin: 550px 150px; }
@keyframes dmBoat { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(4px) rotate(3deg); } }
.dm-in { padding: clamp(8px, 2.4vw, 16px); background: #d6d3d1; background-image: linear-gradient(#a8a29e 2px, transparent 2px), linear-gradient(90deg, #a8a29e 2px, transparent 2px); background-size: 64px 40px; color: #1c1917; }
.dm-in .cc-wrap { max-width: 660px; }
.dm-in .cc-strip, .dm-in .cc-mine { background: #fffbeb; border: 3px solid #78350f; border-radius: 12px; box-shadow: 0 4px 0 #78350f; padding: .5rem .75rem; color: #1c1917; }
.dm-in .muted, .dm-in .small.muted { color: #44403c; }
.dm-in .h-sm { color: #1c1917; }
.dm-table { border: clamp(6px, 1.6vw, 12px) solid #78350f; border-radius: 26px; background-color: #fff; background-image: linear-gradient(45deg, #fca5a5 25%, transparent 25%, transparent 75%, #fca5a5 75%), linear-gradient(45deg, #fca5a5 25%, transparent 25%, transparent 75%, #fca5a5 75%); background-size: 40px 40px; background-position: 0 0, 20px 20px; box-shadow: inset 0 0 0 3px #92400e, 0 8px 0 #451a03; min-height: 170px; }
.dm-table .dm-empty, .dm-table .dm-yard { background: rgba(255, 251, 235, .92); border-radius: 999px; padding: .3rem .9rem; width: fit-content; margin-left: auto; margin-right: auto; color: #1c1917; }
.dm-tile { background: #fffbeb; border: 3px solid #1c1917; box-shadow: 0 3px 0 #78716c; border-radius: 8px; }
.dm-half span.pip, .dm-half[data-n] span.pip { background: #1c1917; }
.dm-div { background: #1c1917; flex-basis: 3px; }
.dm-tile.v .dm-div { height: 3px; }
button.dm-tile.picked { box-shadow: 0 0 0 4px #16a34a, 0 4px 0 #78716c; }
.dm-tile.dm-back { background: linear-gradient(135deg, #b45309, #78350f); border-color: #fffbeb; }
.dm-floor { position: relative; height: clamp(80px, 17vw, 130px); background: #d6d3d1; background-image: linear-gradient(#a8a29e 2px, transparent 2px), linear-gradient(90deg, #a8a29e 2px, transparent 2px); background-size: 64px 40px; }
.dm-dog { position: absolute; bottom: 6%; width: clamp(50px, 12vw, 90px); display: block; }
.dm-dog img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.dm-dh { left: 5%; } .dm-dp { right: 20%; width: clamp(58px, 13.5vw, 104px); }
.dm-nm { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 9px; border: 2px solid #78350f; border-radius: 9px; background: #fffbeb; box-shadow: 0 2px 0 #78350f; color: #1c1917; font-weight: 800; font-size: .72rem; }
.dm-glass { position: absolute; bottom: 10%; width: clamp(18px, 4vw, 30px); height: auto; }
.dm-g0 { left: 24%; } .dm-g1 { right: 40%; }
.dm-fz circle { animation: dmFizz 1.8s ease-in infinite; }
.dm-fz .b2 { animation-delay: .6s; } .dm-fz .b3 { animation-delay: 1.2s; }
@keyframes dmFizz { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-38px); opacity: 0; } }
.dm-pigeon { position: absolute; right: 4%; bottom: 8%; width: clamp(40px, 9vw, 64px); height: auto; }
.dm-peck { animation: dmPeck 2.6s ease-in-out infinite; transform-origin: 28px 22px; }
@keyframes dmPeck { 0%, 55%, 100% { transform: rotate(0); } 62%, 70% { transform: rotate(34deg) translateY(4px); } 76%, 84% { transform: rotate(4deg); } 90% { transform: rotate(30deg) translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .dm-cl, .dm-boat, .dm-fz circle, .dm-peck { animation: none; } }

/* Buy Me a Coffee button (a plain link, no outside script) */
.bmc-btn { display: inline-flex; align-items: center; gap: .5rem; margin-top: .75rem; padding: .5rem 1rem; border: 2px solid #000; border-radius: 10px; background: #ffdd00; color: #000; font-weight: 800; font-size: .95rem; text-decoration: none; box-shadow: 0 3px 0 #000; transition: transform .12s; }
.bmc-btn:hover { transform: translateY(-2px); color: #000; }
.bmc-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #000; }
.bmc-btn:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.bmc-btn svg { width: 1.2rem; height: 1.2rem; }

/* Sudoku: Zen Garden */
.szw { width: 100%; max-width: 760px; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); background: #d9f99d; }
.sz-scene { position: relative; aspect-ratio: 760 / 190; overflow: hidden; }
.sz-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sz-petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sz-petals i { position: absolute; top: -8%; width: 9px; height: 7px; border-radius: 80% 20% 80% 20%; opacity: .9; animation: szFall 11s linear infinite; }
@keyframes szFall { 0% { transform: translate(0, -10px) rotate(0); } 50% { transform: translate(26px, 110px) rotate(180deg); } 100% { transform: translate(-10px, 240px) rotate(360deg); opacity: .2; } }
.sz-in { padding: clamp(8px, 2.4vw, 16px); background-color: #d9f99d; background-image: linear-gradient(#a3b18a 3px, transparent 3px), linear-gradient(90deg, #a3b18a 3px, transparent 3px); background-size: 50% 120px; color: #1c1917; }
.sz-in .sd-info { background: #fffbeb; border: 3px solid #78350f; border-radius: 12px; box-shadow: 0 4px 0 #78350f; padding: .4rem .8rem; }
.sz-in .sd-time, .sz-in .sd-code { color: #1c1917; }
.sz-in .muted, .sz-in .small.muted { color: #44403c; }
.sz-in .sd-grid { background: #fde68a; border: clamp(7px, 1.6vw, 12px) solid #78350f; border-radius: 10px; box-shadow: inset 0 0 0 2px #92400e, 0 8px 0 #451a03, 0 14px 20px rgba(0, 0, 0, .3); }
.sz-in .sd-cell { border-color: rgba(120, 53, 15, .35); color: #2563eb; }
.sz-in .sd-cell.r3 { border-right: 3px solid #78350f; }
.sz-in .sd-cell.b3 { border-bottom: 3px solid #78350f; }
.sz-in .sd-cell.given { color: #1c1917; background: rgba(180, 83, 9, .10); }
.sz-in .sd-cell.peer { background: rgba(187, 247, 208, .5); }
.sz-in .sd-cell.given.peer { background: rgba(187, 247, 208, .6); }
.sz-in .sd-cell.same { background: rgba(134, 239, 172, .65); }
.sz-in .sd-cell.sel { background: #bbf7d0; box-shadow: inset 0 0 0 3px #16a34a; }
.sz-in .sd-cell.clash { color: #dc2626; background: rgba(220, 38, 38, .15); }
.sz-in .sd-cell.wrong { color: #fff; background: #dc2626; }
.sz-in .sd-n { color: #44403c; }
.sz-in .sd-key { background: #fffbeb; border: 3px solid #78350f; border-radius: 10px; box-shadow: 0 4px 0 #78350f; color: #1c1917; }
.sz-in .sd-key small { color: #44403c; }
.sz-in .sd-key:not(:disabled):hover { background: #fef3c7; border-color: #78350f; }
.sz-in .sd-rivals { background: #fffbeb; border: 3px solid #78350f; border-radius: 12px; box-shadow: 0 4px 0 #78350f; color: #1c1917; }
.sz-in .btn-secondary { background: #fffbeb; color: #1c1917; border: 2px solid #78350f; box-shadow: 0 3px 0 #78350f; }
.sz-in .sd-tools .is-on { background: #bbf7d0; border-color: #16a34a; }
.sz-floor { position: relative; height: clamp(90px, 19vw, 140px); background-color: #d9f99d; background-image: linear-gradient(#a3b18a 3px, transparent 3px), linear-gradient(90deg, #a3b18a 3px, transparent 3px); background-size: 50% 120px; }
.sz-cush { position: absolute; bottom: 6%; width: 22%; height: 22%; border-radius: 50%; border: 3px solid rgba(0, 0, 0, .35); }
.sz-c0 { left: 4%; background: #dc2626; } .sz-c1 { right: 16%; background: #2563eb; }
.sz-dog { position: absolute; bottom: 14%; width: clamp(50px, 12vw, 88px); display: block; }
.sz-dog img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.sz-dh { left: 8%; } .sz-dp { right: 19%; width: clamp(58px, 13.5vw, 102px); }
.sz-hat { position: absolute; pointer-events: none; height: auto; width: 122%; left: -13%; top: -34%; transform: rotate(-3deg); }
.sz-dp .sz-hat { left: -17%; top: -35%; transform: rotate(3deg); }
.sz-nm { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 44%; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 9px; border: 2px solid #78350f; border-radius: 9px; background: #fffbeb; box-shadow: 0 2px 0 #78350f; color: #1c1917; font-weight: 800; font-size: .72rem; z-index: 2; }
.sz-lan { position: absolute; top: 0; height: 70%; width: auto; }
.sz-l0 { left: 1%; } .sz-l1 { right: 1%; }
.sz-glow { animation: szGlow 2.6s ease-in-out infinite alternate; }
@keyframes szGlow { from { opacity: .15; } to { opacity: .4; } }
.sz-tea { position: absolute; left: 21%; bottom: 16%; width: clamp(26px, 6vw, 40px); height: auto; }
.sz-steam { animation: szSteam 2.4s ease-in-out infinite alternate; }
@keyframes szSteam { from { opacity: .3; transform: translateY(2px); } to { opacity: .9; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .sz-petals i, .sz-glow, .sz-steam { animation: none; } }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.footer-brand p { margin: 0; }
.footer-brand .bmc-btn { margin-top: 0; }

/* Ko-fi button, next to the coffee button */
.bmc-btn.kofi-btn { background: #72a4f2; }

/* Front page: a different game picture each visit */
.preview-bar { flex-wrap: wrap; }
.preview-name { font-family: 'Sora', sans-serif; font-size: 1.15rem; font-weight: 800; margin-right: auto; }
.preview-link { position: relative; display: block; text-decoration: none; }
.preview-label { position: absolute; left: .75rem; bottom: .75rem; max-width: calc(100% - 1.5rem); padding: .3rem .8rem; border: 2px solid #78350f; border-radius: 10px; background: #fffbeb; color: #1c1917; font-weight: 800; box-shadow: 0 3px 0 #78350f; }
.preview-play { margin-top: .75rem; }

/* ===== Chess: Castle Courtyard and Park at Dusk ===== */
.chw { position: relative; border-radius: var(--radius); overflow: hidden; container-type: inline-size; isolation: isolate; }
.ch-scenebox { position: absolute; inset: 0; z-index: 0; }
.ch-scene { position: absolute; inset: 0; overflow: hidden; }
.chw-in { position: relative; z-index: 1; }
.chw::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .3s; box-shadow: inset 0 0 70px 10px rgba(220, 38, 38, .6); }
.chw.chw-check::after { opacity: 1; animation: chPulse 1s ease-in-out infinite alternate; }
.chw[data-scene="plain"] .ch-dogwrap { display: none; }
.chw:not([data-scene="plain"]) .chw-in { padding: .8rem .6rem 1rem; }
.chw:not([data-scene="plain"]) .ch-wrap { gap: .7rem; }
.chw:not([data-scene="plain"]) .ch-strip .avatar { display: none; }
.ch-seat { display: flex; align-items: flex-end; gap: .5rem; min-width: 0; }
.ch-dogwrap { position: relative; flex: none; }
.ch-dog { display: block; height: 54px; width: auto; image-rendering: pixelated; }
.ch-seat.turn .ch-dog { animation: chBob 1.2s ease-in-out infinite; }
.ch-seat.won .ch-dog { animation: chHop .7s ease-in-out infinite; }
.ch-woof { position: absolute; left: 70%; bottom: 92%; white-space: nowrap; background: #fff; color: #1c1917; border: 3px solid #78350f; border-radius: 12px; padding: 1px 9px; font-weight: 800; font-size: .9rem; animation: chWoof 4s ease-out forwards; z-index: 3; }
.chw:not([data-scene="plain"]) .ch-strip { flex: 1 1 auto; background: #fffbeb; border: 3px solid #78350f; border-radius: 12px; box-shadow: 0 3px 0 #78350f; padding: .3rem .65rem; color: #1c1917; margin-bottom: 4px; }
.chw:not([data-scene="plain"]) .ch-strip .muted { color: #78350f; }
.chw:not([data-scene="plain"]) .ch-seat.turn .ch-strip { box-shadow: 0 3px 0 #78350f, 0 0 0 3px #22c55e; }
.chw:not([data-scene="plain"]) .ch-ranks, .chw:not([data-scene="plain"]) .ch-files { color: #fffbeb; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.chw:not([data-scene="plain"]) .ch-board { border: 10px solid #57534e; border-radius: 6px; box-shadow: inset 0 0 0 2px #78716c, 0 8px 0 #292524, 0 14px 22px rgba(0, 0, 0, .4); }
.chw.chw-check:not([data-scene="plain"]) .ch-board { border-color: #b91c1c; }
.chw[data-scene="castle"] .ch-sq.light { background: #f5f0e1; }
.chw[data-scene="castle"] .ch-sq.dark { background: #64748b; }
.chw[data-scene="dusk"] .ch-sq.light { background: #f5f0e1; }
.chw[data-scene="dusk"] .ch-sq.dark { background: #0f766e; }
.chw:not([data-scene="plain"]) .ch-p.w { color: #fffdf5; --ch-st: #292524; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); }
.chw:not([data-scene="plain"]) .ch-p.b { color: #1f2937; --ch-st: #e7e5e4; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .3)); }
.chw:not([data-scene="plain"]) .ch-caps .ch-p { filter: none; }
.chw:not([data-scene="plain"]) .ch-sq.last::before { background: rgba(56, 189, 248, .38); }
.chw .ch-sq.move::after { background: rgba(22, 163, 74, .75); }
.chw .ch-sq.cap::after { border-color: rgba(22, 163, 74, .85); }
.chw .ch-p { transition: transform .15s ease, filter .15s ease; }
.chw .ch-sq.sel::before { background: rgba(250, 204, 21, .5); box-shadow: inset 0 0 0 3px #f59e0b; }
.chw .ch-sq.sel .ch-p { transform: translateY(-10%) scale(1.12); filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .45)); }
.chw:not([data-scene="plain"]) .ch-tools, .chw:not([data-scene="plain"]) .ch-moves { background: rgba(255, 251, 235, .94); border: 3px solid #78350f; border-radius: 12px; padding: .5rem .7rem; color: #1c1917; }
.chw:not([data-scene="plain"]) .ch-moves h3, .chw:not([data-scene="plain"]) .ch-moves .muted { color: #78350f; }
.ch-scenes { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
/* castle */
.chw[data-scene="castle"] .ch-scene { background: linear-gradient(#7dd3fc 0, #bae6fd 36%, #fef3c7 52%); }
.chs-cloud { position: absolute; left: -140px; height: 18px; width: 90px; border-radius: 20px; background: #fff; opacity: .92; animation: chDrift 70s linear infinite; }
.chs-cloud.c1 { top: 3%; }
.chs-cloud.c2 { top: 8%; width: 60px; animation-duration: 95s; animation-delay: -35s; }
.chs-wall { position: absolute; left: 0; right: 0; top: 13%; height: 42%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='40'%3E%3Crect width='60' height='40' fill='%23a8a29e'/%3E%3Cpath d='M0 0h60M0 20h60M30 0v20M0 20v20M60 20v20' stroke='%2378716c' stroke-width='3' fill='none'/%3E%3C/svg%3E"); }
.chs-wall::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; background: repeating-linear-gradient(90deg, #a8a29e 0 26px, transparent 26px 52px); }
.chw[data-scene="castle"] .chs-grass { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: radial-gradient(circle 3px at 12% 40%, #fff 95%, transparent), radial-gradient(circle 3px at 88% 55%, #fff 95%, transparent), radial-gradient(circle 3px at 6% 80%, #f9a8d4 95%, transparent), radial-gradient(circle 3px at 94% 85%, #f9a8d4 95%, transparent), linear-gradient(#4ade80 0, #4ade80 14px, #86efac 14px); }
.chs-tower { display: none; position: absolute; top: 6%; bottom: 40%; width: 15cqw; background: inherit; border: 3px solid #78716c; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='40'%3E%3Crect width='60' height='40' fill='%23a8a29e'/%3E%3Cpath d='M0 0h60M0 20h60M30 0v20M0 20v20M60 20v20' stroke='%2378716c' stroke-width='3' fill='none'/%3E%3C/svg%3E"); }
.chs-tower::before { content: ''; position: absolute; left: -6px; right: -6px; top: -16px; height: 16px; background: repeating-linear-gradient(90deg, #a8a29e 0 20px, transparent 20px 40px); }
.chs-tower::after { content: ''; position: absolute; left: 50%; top: 22%; width: 28px; height: 56px; margin-left: -14px; border-radius: 14px 14px 0 0; background: #1c1917; }
.chs-tower.tl { left: 1%; } .chs-tower.tr { right: 1%; }
.chs-flag { position: absolute; left: 50%; bottom: calc(100% + 14px); width: 4px; height: 58px; background: #78350f; }
.chs-flag::after { content: ''; position: absolute; left: 4px; top: 2px; width: 46px; height: 30px; background: #2563eb; clip-path: polygon(0 0, 100% 0, 78% 50%, 100% 100%, 0 100%); transform-origin: left center; animation: chFlap 1.6s ease-in-out infinite; }
.chs-flag.r::after { background: #dc2626; animation-delay: -.7s; }
.chs-torch { position: absolute; top: 21%; width: 6px; height: 36px; background: #78350f; }
.chs-torch.tl { left: 3%; } .chs-torch.tr { right: 3%; }
.chs-torch i, .chs-lamp i { position: absolute; left: 50%; bottom: 100%; width: 16px; height: 22px; margin-left: -8px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(#fde047 30%, #f97316 75%); box-shadow: 0 0 26px 10px rgba(251, 191, 36, .45); animation: chFlick .5s ease-in-out infinite alternate; }
@container (min-width: 720px) {
  .chs-tower { display: block; }
  .chs-torch.tl { left: 17cqw; } .chs-torch.tr { right: 17cqw; }
}
/* dusk */
.chw[data-scene="dusk"] .ch-scene { background: linear-gradient(#1e1b4b 0, #4c1d95 20%, #c2410c 42%, #fbbf24 56%); }
.chs-stars { position: absolute; left: 0; right: 0; top: 0; height: 36%; background: radial-gradient(1.6px 1.6px at 8% 22%, #fff, transparent), radial-gradient(1.6px 1.6px at 22% 8%, #fff, transparent), radial-gradient(1.6px 1.6px at 38% 30%, #fff, transparent), radial-gradient(1.6px 1.6px at 55% 12%, #fff, transparent), radial-gradient(1.6px 1.6px at 70% 26%, #fff, transparent), radial-gradient(1.6px 1.6px at 84% 9%, #fff, transparent), radial-gradient(1.6px 1.6px at 93% 30%, #fff, transparent); animation: chTwinkle 4s ease-in-out infinite alternate; }
.chs-sun { position: absolute; left: 68%; top: 41%; width: 90px; height: 90px; border-radius: 50%; background: #fde68a; box-shadow: 0 0 50px 20px rgba(253, 230, 138, .5); animation: chSet 90s ease-in-out infinite alternate; }
.chs-hill { position: absolute; left: -10%; right: -10%; top: 46%; height: 14%; background: #4c1d95; border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: .8; }
.chw[data-scene="dusk"] .chs-grass { position: absolute; left: 0; right: 0; top: 56%; bottom: 0; background: linear-gradient(#65a30d 0, #4d7c0f 14px, #3f6212 100%); }
.chs-tree { position: absolute; top: 33%; width: 150px; height: 130px; border-radius: 50%; background: #14532d; }
.chs-tree::after { content: ''; position: absolute; left: 50%; top: 92%; width: 18px; height: 70px; margin-left: -9px; background: #451a03; }
.chs-tree.tl { left: -50px; } .chs-tree.tr { right: -50px; }
.chs-lamp { position: absolute; top: 34%; width: 6px; height: 26%; background: #1c1917; }
.chs-lamp.tl { left: 5%; } .chs-lamp.tr { right: 5%; }
.chs-lamp i { width: 22px; height: 22px; margin-left: -8px; border-radius: 50%; background: #fde047; box-shadow: 0 0 40px 18px rgba(253, 224, 71, .35); animation-duration: 2.4s; }
.chs-fly { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fde047; box-shadow: 0 0 8px 3px rgba(253, 224, 71, .7); animation: chFly 9s ease-in-out infinite; }
.chs-fly.f1 { left: 14%; top: 70%; } .chs-fly.f2 { left: 82%; top: 66%; animation-delay: -3s; animation-duration: 11s; } .chs-fly.f3 { left: 46%; top: 92%; animation-delay: -6s; } .chs-fly.f4 { left: 90%; top: 86%; animation-delay: -2s; animation-duration: 12s; } .chs-fly.f5 { left: 6%; top: 88%; animation-delay: -8s; animation-duration: 10s; }
.chw.chw-check .chs-torch i, .chw.chw-check .chs-lamp i { background: radial-gradient(#fecaca 25%, #dc2626 75%); box-shadow: 0 0 34px 14px rgba(220, 38, 38, .6); animation: chFlick .28s ease-in-out infinite alternate; }
@keyframes chDrift { to { transform: translateX(calc(100cqw + 300px)); } }
@keyframes chFlap { 0%, 100% { transform: skewY(-5deg) scaleX(1); } 50% { transform: skewY(6deg) scaleX(.86); } }
@keyframes chFlick { from { transform: scale(1) translateY(0); opacity: .9; } to { transform: scale(1.12, 1.2) translateY(-2px); opacity: 1; } }
@keyframes chTwinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes chSet { from { transform: translateY(0); } to { transform: translateY(26px); } }
@keyframes chFly { 0%, 100% { transform: translate(0, 0); opacity: .3; } 25% { transform: translate(20px, -26px); opacity: 1; } 55% { transform: translate(-14px, -12px); opacity: .5; } 80% { transform: translate(10px, -34px); opacity: 1; } }
@keyframes chPulse { from { opacity: .35; } to { opacity: 1; } }
@keyframes chBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes chHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes chWoof { 0% { transform: scale(.4); opacity: 0; } 12% { transform: scale(1.15); opacity: 1; } 22% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chw *, .chw::after { animation: none !important; } .chw .ch-p { transition: none; } .ch-woof { opacity: 1; } }

/* ===== Connect 4: Neon Arcade ===== */
.c4w { position: relative; max-width: 560px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; isolation: isolate; padding: 3.4rem .9rem 1rem; background: linear-gradient(#1e1b4b, #4c1d95); container-type: inline-size; }
.c4-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.c4-neon { position: absolute; left: 0; right: 0; top: .9rem; text-align: center; font-weight: 900; font-size: clamp(1.4rem, 7.5cqw, 2.3rem); letter-spacing: .12em; color: #fff; text-shadow: 0 0 6px #f0abfc, 0 0 18px #d946ef, 0 0 38px #d946ef; animation: c4Neon 4s ease-in-out infinite; }
.c4-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: repeating-conic-gradient(#1e1b4b 0 25%, #312e81 0 50%) 0 0 / 56px 56px; animation: c4Twinkle 3s ease-in-out infinite alternate; }
.c4-star, .c4-spark { position: absolute; width: 14px; height: 14px; background: #fde047; clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); animation: c4Twinkle 2.2s ease-in-out infinite alternate; }
.c4-star.a { left: 3%; top: 30%; } .c4-star.b { right: 3%; top: 24%; background: #67e8f9; animation-delay: -1s; } .c4-star.c { left: 6%; top: 62%; background: #67e8f9; animation-delay: -.5s; } .c4-star.d { right: 5%; top: 58%; animation-delay: -1.6s; }
.c4-spark { width: 7px; height: 7px; border-radius: 50%; clip-path: none; background: #f0abfc; }
.c4-spark.a { left: 12%; top: 14%; } .c4-spark.b { right: 14%; top: 12%; background: #fde047; animation-delay: -.8s; } .c4-spark.c { right: 10%; top: 80%; animation-delay: -1.4s; }
.c4-cab { position: relative; z-index: 1; padding: .8rem .8rem 1.6rem; border-radius: 26px 26px 6px 6px; background: linear-gradient(#4c1d95, #2e1065); box-shadow: inset 0 0 0 4px #7c3aed; }
.c4-cab .c4-wrap { max-width: none; }
.c4-coin { position: absolute; left: 50%; bottom: .35rem; transform: translateX(-50%); padding: 0 .8rem; border: 2px solid #fbbf24; border-radius: 6px; background: #18181b; color: #fbbf24; font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; }
.c4-cab .c4-board { background: linear-gradient(#2563eb, #1d4ed8); padding: 8px; border-radius: 16px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25), 0 6px 0 #1e3a8a, 0 14px 22px rgba(0, 0, 0, .4); }
.c4-cab .c4-cell { padding: 3px; }
.c4-cab .c4-disc { background: #0f172a; box-shadow: inset 0 4px 7px rgba(0, 0, 0, .55); }
.c4-cab .c4-disc.d0, .c4-cab .c4-disc.d1 { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), inset 0 3px 0 rgba(255, 255, 255, .35); }
.c4-cab .c4-drop { color: #e9d5ff; height: 38px; }
.c4-cab .c4-drop.ready { color: #fff; }
.c4-cab .c4-drop.ready:hover, .c4-cab .c4-drop.ready:focus-visible { background: radial-gradient(circle 17px at 50% 50%, var(--pc0, #2563eb) 96%, transparent); }
.c4-cab .c4-drop.ready.seat-1:hover, .c4-cab .c4-drop.ready.seat-1:focus-visible { background: radial-gradient(circle 17px at 50% 50%, var(--pc1, #7c3aed) 96%, transparent); }
.c4-cab .c4-drop.ready svg { animation: c4Hint 1.1s ease-in-out infinite; }
.c4-cab .c4-disc.win { outline: 0; box-shadow: 0 0 0 3px #fff, 0 0 18px 6px #fff; animation: c4Flash .55s ease-in-out infinite alternate; }
.c4-cab .c4-disc.drop { animation: c4Drop .7s cubic-bezier(.45, 0, .8, .6) both, c4Bounce .35s .7s ease-out; }
.c4-seats { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; margin-top: .9rem; }
.c4-seat { display: flex; align-items: flex-end; gap: .4rem; min-width: 0; }
.c4-seat:last-child { flex-direction: row-reverse; }
.c4-sign { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; background: #fffbeb; border: 3px solid #78350f; border-radius: 12px; box-shadow: 0 3px 0 #78350f; padding: .25rem .6rem; color: #1c1917; margin-bottom: 4px; }
.c4-sign strong { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c4-sign .muted { color: #78350f; }
.c4-seat.turn .c4-sign { box-shadow: 0 3px 0 #78350f, 0 0 0 3px #22c55e; }
.c4-seat.turn .ch-dog { animation: chBob 1.2s ease-in-out infinite; }
.c4-seat.won .ch-dog { animation: chHop .7s ease-in-out infinite; }
.c4-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.c4-dot.seat-0 { background: var(--pc0, #2563eb); } .c4-dot.seat-1 { background: var(--pc1, #7c3aed); }
@keyframes c4Drop { 0% { transform: translateY(-420%); } 100% { transform: translateY(0); } }
@keyframes c4Bounce { 0% { transform: translateY(0); } 40% { transform: translateY(-9%); } 100% { transform: translateY(0); } }
@keyframes c4Flash { from { filter: brightness(1); } to { filter: brightness(1.45); } }
@keyframes c4Neon { 0%, 100% { opacity: 1; } 46% { opacity: 1; } 48% { opacity: .75; } 50% { opacity: 1; } 78% { opacity: .85; } }
@keyframes c4Twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes c4Hint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .c4w *, .c4w .c4-disc { animation: none !important; } }
.c4-cab .c4-disc.d0 { background: var(--pc0, #2563eb); }
.c4-cab .c4-disc.d1 { background: var(--pc1, #7c3aed); }
.c4-seat .ch-woof { left: 0; bottom: 105%; }

/* ---- Adverts (our own banners) ---- */
.gn-ad { position: relative; display: block; margin: 1rem auto; width: fit-content; max-width: 100%; border: 1px solid var(--line, rgba(100, 116, 139, .28)); border-radius: 10px; overflow: hidden; background: var(--surface, #fff); line-height: 0; }
.gn-ad a, .gn-ad picture { display: block; }
.gn-ad img { display: block; max-width: 100%; height: auto; }
.gn-ad-tag { position: absolute; top: 4px; left: 4px; z-index: 1; padding: 1px 6px; border-radius: 6px; background: rgba(15, 23, 42, .72); color: #fff; font: 700 10px/1.5 system-ui, sans-serif; letter-spacing: .04em; pointer-events: none; }
.gn-ad-side { display: none; }
@media (min-width: 1760px) {
  .gn-ad-side { display: block; position: fixed; right: 1.25rem; top: 7rem; z-index: 5; width: fit-content; max-width: 300px; margin: 0; }
}
.ad-thumb { width: 96px; max-height: 60px; object-fit: contain; border-radius: 6px; background: rgba(100, 116, 139, .12); }
.ad-aud { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }

.ios-tip { margin: .9rem auto 0; max-width: 26rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--line, rgba(100, 116, 139, .28)); background: var(--surface, #fff); color: var(--g-tx-475569); font-size: .88rem; line-height: 1.5; text-align: left; }
.ios-tip strong { display: block; margin-bottom: .3rem; color: inherit; }
.ios-tip ol { margin: 0 0 .4rem 1.2rem; padding: 0; }
.ios-tip p { margin: 0; }

.live-dot { display: inline-block; width: .5em; height: .5em; margin-right: .35em; border-radius: 50%; background: #22c55e; vertical-align: middle; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: live-pulse 1.8s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 .5em rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.stats-6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .stats-6 { grid-template-columns: repeat(2, 1fr); } }

/* Our pets page and its admin editor */
.pets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.pet-card { display: flex; flex-direction: column; gap: .8rem; }
.pet-card-top { display: flex; gap: .9rem; align-items: center; }
.pet-card h2 { margin: 0; font-size: 1.25rem; }
.pet-pic { width: 120px; height: 124px; border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--line); display: grid; place-items: center; flex: none; overflow: hidden; }
.pet-pic img { max-width: none; image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
.pet-pic svg { width: 32px; height: 32px; color: var(--muted); }
.pet-bio { margin: 0; line-height: 1.55; }
.pet-facts { display: grid; gap: .45rem; margin: 0; }
.pet-facts > div { display: flex; gap: .6rem; justify-content: space-between; border-top: 1px solid var(--line); padding-top: .45rem; }
.pet-facts dt { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .85rem; }
.pet-facts dt svg { width: 15px; height: 15px; }
.pet-facts dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pet-edit { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; display: grid; gap: .6rem; min-width: 0; }
.pet-edit legend { font-weight: 700; padding: 0 .4rem; }
.pet-edit legend img { vertical-align: middle; image-rendering: pixelated; }
.pet-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; }
.pet-edit label { display: grid; gap: .2rem; min-width: 0; }
.pet-edit label.check { display: flex; align-items: center; gap: .5rem; }
.pet-status svg, .pet-status i { color: #e11d48; fill: #e11d48; stroke: #e11d48; }
.pt-wrap { max-width: 480px; margin: 0 auto 1rem; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(20, 16, 50, .18); background: #1b1736; }
.pt-frame { display: block; width: 100%; height: calc(100vh - 190px); height: calc(100dvh - 190px); min-height: 520px; max-height: 820px; border: 0; }

/* Styled confirm box */
.gn-confirm { position: fixed; inset: 0; z-index: 10050; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.gn-confirm-box { background: #fff; color: var(--ink); border-radius: 14px; max-width: 380px; width: 100%; padding: 1.4rem 1.4rem 1.2rem; text-align: center; box-shadow: 0 20px 60px rgba(15, 23, 42, .35); border-top: 5px solid #7c3aed; }
.gn-confirm-pet { display: block; margin: -2.9rem auto .4rem; width: 72px; height: 72px; image-rendering: pixelated; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(15, 23, 42, .3)); }
.gn-confirm-box h2 { font-family: var(--font-head); font-size: 1.2rem; margin: 0 0 .35rem; }
.gn-confirm-box p { margin: 0 0 1.1rem; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.gn-confirm-btns { display: flex; gap: .6rem; }
.gn-confirm-btns button { flex: 1; font: inherit; font-weight: 800; font-size: .92rem; padding: .65rem .8rem; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gn-confirm-btns .gn-no { background: var(--grad); color: #fff; }
.gn-confirm-btns .gn-yes { background: #fff; color: var(--bad); border-color: #fecaca; }
.gn-confirm-btns .gn-yes:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.gn-confirm-btns button:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }

/* Easter season */
.xm-grass { position: fixed; left: 0; right: 0; bottom: 0; height: 36px; background-repeat: repeat-x; background-size: auto 36px; image-rendering: pixelated; z-index: 2; pointer-events: none; }
.xm-bun { position: fixed; bottom: 12px; left: 0; width: 56px; height: 49px; z-index: 2; pointer-events: none; animation: xm-run 34s linear infinite; }
.xm-bun i { display: block; width: 100%; height: 100%; background: center / contain no-repeat; image-rendering: pixelated; filter: drop-shadow(0 0 1px rgba(60, 40, 20, .7)); animation: xm-hop 1.6s ease-out infinite; }
.xm-bun-b { animation-duration: 46s; animation-delay: -20s; animation-direction: reverse; }
.xm-bun-b i { transform: scaleX(-1); animation-delay: -.6s; }
@keyframes xm-run { from { transform: translateX(-80px); } to { transform: translateX(calc(100vw + 80px)); } }
@keyframes xm-hop { 0%, 55%, 100% { translate: 0 0; } 20% { translate: 0 -16px; } 38% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .xm-bun, .xm-bun i { animation: none; } .xm-bun-a { left: 24%; } .xm-bun-b { left: 68%; } }

/* Game settings: toggles in rows instead of one long list */
.game-toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem .75rem; margin-bottom: 1.2rem; }
.game-toggle-grid .check { margin: 0; align-items: center; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
.game-toggle-grid .check:hover { border-color: #c7d2fe; background: #eef2ff; }
.game-toggle-grid .check input { margin-top: 0; }
/* Admin settings: space between the section boxes */
.settings-stack > .card + .card, .settings-stack > section + section, .cs-group > .card + .card, .cs-group > .card + .cs-bar, .cs-bar + .card { margin-top: 1.5rem; }

/* Collapsible settings sections */
.cs-head { cursor: pointer; display: flex; align-items: center; gap: .5rem; user-select: none; margin-bottom: 0; }
.cs-head:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; border-radius: 6px; }
.cs-chev { margin-left: auto; font-style: normal; font-size: 1.1rem; color: var(--muted); transition: transform .15s; }
.cs-closed .cs-chev { transform: rotate(-90deg); }
.cs-closed .cs-body { display: none; }
.cs-open .cs-head { margin-bottom: .75rem; }
.cs-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }

/* Admin: section boxes with a soft gradient so they stand out from the page */
body.admin-page .card { background: linear-gradient(135deg, #f4f8ff 0%, #efeaff 100%); border-color: #d6d0f2; box-shadow: 0 2px 8px rgba(79, 70, 229, .08); }
body.admin-page .card .card { background: #fff; box-shadow: none; }
body.admin-page .cs-head { color: #2b2a6b; }

/* Boxes side by side: each closes to its own heading height and the gap stays even */
.cs-top { align-items: start; }
.cs-side > .card + .card { margin-top: 0; }
/* Admin: anything that follows a section box (stat tiles, grids, headings) gets a gap too */
.cs-group > .card + *:not(.card):not(script):not(style):not([hidden]):not(.cs-bar) { margin-top: 1.5rem; }
/* A group of boxes (for example inside a form) followed by more boxes */
.cs-group + .card, .cs-group + section.card, .cs-group + .cs-group { margin-top: 1.5rem; }
.card + .cs-group { margin-top: 1.5rem; }

/* Analytics: the tall Games by type box sits beside the smaller boxes, so there is no big empty gap */
.an-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
.an-col { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.an-col > .card { margin: 0; }
@media (max-width: 760px) { .an-cols { grid-template-columns: 1fr; } }
/* Analytics two-column layout: columns line up at the top and the flex gap sets the spacing */
.an-cols > .an-col.cs-group { margin-top: 0; }
.an-cols .an-col.cs-group > .card, .an-cols .an-col.cs-group > .card + .card { margin-top: 0; }

/* About page */
.ab-hero .ab-intro { max-width: 40rem; color: var(--muted); }
.ab-hero .ab-intro p { margin: 0 0 .7rem; }
.ab-hero-img { max-width: min(100%, 34rem); border-radius: 14px; margin-top: 1rem; box-shadow: var(--shadow); }
.ab-wrap { display: flex; flex-direction: column; gap: 1.5rem; max-width: 62rem; }
.ab-sec h2, .ab-h2 { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-size: 1.35rem; margin: 0 0 .7rem; }
.ab-sec p { margin: 0 0 .8rem; line-height: 1.6; }
.ab-sec.has-img { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: center; }
.ab-sec.has-img.ab-left .ab-img { order: -1; }
.ab-img { width: 100%; height: auto; max-height: 24rem; object-fit: cover; border-radius: 12px; }
.ab-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }
.ab-feat h3 { font-family: var(--font-head); font-size: 1.05rem; margin: .6rem 0 .3rem; }
.ab-feat p { margin: 0; font-size: .92rem; }
.ab-pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 1rem; margin: 1rem 0; }
.ab-pet { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; padding: .8rem .5rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: inherit; text-decoration: none; }
.ab-pet:hover { border-color: #c7d2fe; background: #f5f7ff; }
.ab-pet-pic { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: var(--grad-soft); overflow: hidden; }
.ab-pet-pic img { width: 76%; height: 76%; object-fit: contain; image-rendering: pixelated; }
.ab-pet-pic.is-photo img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.ab-cta { text-align: center; }
.ab-cta h2 { font-family: var(--font-head); margin: 0 0 .3rem; }
.ab-adm-img { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.ab-adm-img img { border-radius: 8px; max-height: 120px; object-fit: cover; }
@media (max-width: 720px) { .ab-sec.has-img { grid-template-columns: 1fr; } .ab-sec.has-img.ab-left .ab-img { order: 0; } }

/* ===== Roulette: neon casino look with a light haze ===== */
.rl-wrap { position: relative; overflow: hidden; border-radius: 16px; background: radial-gradient(1200px 700px at 50% -10%, #2a0f55 0%, #12082a 55%, #07030f 100%); color: #f4eeff; padding: 0 0 1rem; isolation: isolate; }
.rl-haze { position: absolute; inset: -10%; pointer-events: none; z-index: 0; overflow: hidden; }
.rl-haze i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .28; mix-blend-mode: screen; animation: rl-drift 38s ease-in-out infinite alternate; }
.rl-haze i:nth-child(1) { width: 60%; height: 38%; left: -10%; top: 10%; background: #7c3aed; }
.rl-haze i:nth-child(2) { width: 55%; height: 40%; right: -12%; top: 45%; background: #ff3df0; animation-duration: 46s; animation-delay: -12s; opacity: .18; }
.rl-haze i:nth-child(3) { width: 70%; height: 30%; left: 15%; bottom: -6%; background: #27f0ff; animation-duration: 52s; animation-delay: -25s; opacity: .14; }
.rl-haze i:nth-child(4) { width: 45%; height: 30%; left: 30%; top: 30%; background: #c4b5fd; animation-duration: 60s; animation-delay: -5s; opacity: .12; }
@keyframes rl-drift { 0% { transform: translate(-6%, 2%) scale(1); } 50% { transform: translate(8%, -4%) scale(1.2); } 100% { transform: translate(-2%, 5%) scale(.95); } }
.rl-inner { position: relative; z-index: 1; display: grid; gap: 1rem; }
.rl-top { position: relative; display: flex; align-items: center; justify-content: center; gap: .9rem; padding: 1rem 5.5rem 1rem 1rem; background: linear-gradient(180deg, rgba(40, 10, 80, .9), rgba(15, 6, 32, .6)); border-bottom: 2px solid #ff3df0; box-shadow: 0 0 24px rgba(255, 61, 240, .55), 0 6px 40px rgba(124, 58, 237, .4); }
.rl-top img { image-rendering: pixelated; height: auto; }
.rl-top p { margin: 0; color: #27f0ff; text-shadow: 0 0 8px #27f0ff; font-size: .85rem; }
.rl-title { margin: 0; font: 800 1.9rem 'Sora', 'Manrope', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #ffe9ff; text-shadow: 0 0 6px #fff, 0 0 14px #ff3df0, 0 0 30px #ff3df0, 0 0 60px #ff3df0; animation: rl-flick 7s infinite; }
@keyframes rl-flick { 0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .55; } }
.rl-snd { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .08); color: #fff; border: 1.5px solid #27f0ff; border-radius: 20px; padding: .35rem .8rem; font: 800 .8rem 'Manrope', sans-serif; cursor: pointer; box-shadow: 0 0 10px rgba(39, 240, 255, .5); }
.rl-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 1rem; align-items: start; padding: 0 1rem; }
.rl-card { background: rgba(24, 12, 48, .78); border: 1.5px solid #27f0ff; border-radius: 12px; padding: 1rem; box-shadow: 0 0 14px rgba(39, 240, 255, .35), inset 0 0 22px rgba(124, 58, 237, .25); backdrop-filter: blur(6px); min-width: 0; }
.rl-wheelbox { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
#rl-wheel { max-width: 100%; height: auto; filter: drop-shadow(0 0 14px rgba(255, 61, 240, .7)) drop-shadow(0 0 30px rgba(39, 240, 255, .35)); }
.rl-res { display: flex; align-items: center; gap: .5rem; min-height: 3.2rem; text-align: center; }
.rl-res img { image-rendering: pixelated; }
.rl-say { background: #150a30; border: 2px solid #27f0ff; border-radius: 14px; padding: .4rem .7rem; font: 800 .9rem 'Manrope', sans-serif; color: #d9fbff; box-shadow: 0 0 12px rgba(39, 240, 255, .6); }
.rl-hist { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; min-height: 30px; }
.rl-pill { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 .8rem 'Manrope', sans-serif; box-shadow: 0 0 8px currentColor; }
.rl-red { background: #d62839; } .rl-black { background: #1b1b2a; } .rl-green { background: #188a4a; }
.rl-bar { display: flex; gap: .6rem 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.rl-bal { font: 800 1.1rem 'Sora', sans-serif; color: #fff; text-shadow: 0 0 10px rgba(255, 61, 240, .8); }
.rl-bal small { display: block; font: 700 .72rem 'Manrope', sans-serif; color: #b9a8e6; text-shadow: none; }
.rl-chips { display: flex; gap: .45rem; }
.rl-chip { width: 46px; height: 46px; border-radius: 50%; border: 4px dashed rgba(255, 255, 255, .85); color: #fff; font: 800 .85rem 'Sora', sans-serif; cursor: pointer; box-shadow: 0 0 12px rgba(255, 255, 255, .35), 0 2px 0 rgba(0, 0, 0, .4); padding: 0; }
.rl-chip[data-v="1"] { background: #64748b; } .rl-chip[data-v="5"] { background: #d62839; } .rl-chip[data-v="10"] { background: #2563eb; } .rl-chip[data-v="25"] { background: #188a4a; } .rl-chip[data-v="100"] { background: #1b1b2a; }
.rl-chip.on { outline: 3px solid #ffd23f; box-shadow: 0 0 18px #ffd23f; transform: translateY(-3px); }
.rl-felt { background: radial-gradient(ellipse at 50% 40%, #6d28d9, #4c1d95 70%, #2e1065); border: 6px solid #3b1f6e; border-radius: 14px; padding: .6rem; overflow-x: auto; box-shadow: inset 0 0 40px rgba(0, 0, 0, .55), 0 0 0 2px #ff3df0, 0 0 22px rgba(255, 61, 240, .7), 0 0 50px rgba(255, 61, 240, .35); }
.rl-table { display: grid; grid-template-columns: 44px repeat(12, minmax(34px, 1fr)) 54px; gap: 3px; min-width: 560px; }
.rl-c { position: relative; display: grid; place-items: center; min-height: 42px; color: #fff; font: 800 .9rem 'Sora', sans-serif; border: 1.5px solid rgba(255, 255, 255, .75); border-radius: 4px; cursor: pointer; user-select: none; text-shadow: 0 0 6px rgba(255, 255, 255, .6); }
.rl-c:hover { filter: brightness(1.3); box-shadow: 0 0 14px #27f0ff; }
.rl-c.r { background: #e11d48; box-shadow: 0 0 10px rgba(225, 29, 72, .7); }
.rl-c.b { background: #120a24; box-shadow: 0 0 8px rgba(39, 240, 255, .35); }
.rl-c.zero { background: #0f9d58; box-shadow: 0 0 12px rgba(15, 157, 88, .8); font-size: 1.1rem; }
.rl-c.o { background: transparent; font-size: .74rem; text-align: center; line-height: 1.1; padding: 2px; }
.rl-c.win { outline: 4px solid #ffd23f; z-index: 2; box-shadow: 0 0 22px #ffd23f, 0 0 50px #ffd23f; animation: rl-pulse .8s infinite alternate; }
@keyframes rl-pulse { to { transform: scale(1.07); } }
.rl-dia { display: inline-block; width: 26px; height: 16px; border-radius: 3px; }
.rl-dia-r { background: #d62839; } .rl-dia-b { background: #1b1b2a; border: 1px solid #fff; }
.rl-st { position: absolute; right: -3px; top: -3px; min-width: 22px; height: 22px; border-radius: 11px; background: #ffd23f; color: #3b2a00; font: 800 .68rem 'Manrope', sans-serif; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); text-shadow: none; }
.rl-st[hidden] { display: none; }
.rl-acts { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.rl-btn { font: 800 .9rem 'Manrope', sans-serif; padding: .65rem 1rem; border-radius: 8px; border: 0; cursor: pointer; }
.rl-spin { background: linear-gradient(135deg, #ff3df0, #7c3aed 55%, #27f0ff); color: #fff; font-size: 1.05rem; flex: 1; min-width: 140px; text-shadow: 0 0 8px rgba(0, 0, 0, .6); box-shadow: 0 0 18px rgba(255, 61, 240, .7); }
.rl-spin:disabled { opacity: .5; cursor: default; }
.rl-ghost { background: rgba(255, 255, 255, .06); border: 1.5px solid #ff3df0; color: #ffe9ff; box-shadow: 0 0 8px rgba(255, 61, 240, .4); }
.rl-players { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .3rem; }
.rl-players:empty { display: none; }
.rl-players li { display: flex; justify-content: space-between; gap: .6rem; font-size: .85rem; padding: .3rem .5rem; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.rl-players li.me { box-shadow: inset 0 0 0 1.5px #27f0ff; }
.rl-players .muted { color: #b9a8e6; }
.rl-pay { font-size: .8rem; color: #b9a8e6; margin: .7rem 0 0; line-height: 1.5; }
.rl-results { position: relative; z-index: 2; margin: 1rem 1rem 0; padding: 1rem; border-radius: 12px; border: 2px solid #ffd23f; background: rgba(24, 12, 48, .92); box-shadow: 0 0 22px rgba(255, 210, 63, .5); text-align: center; }
.rl-results h3 { margin: 0 0 .5rem; color: #ffe9ff; text-shadow: 0 0 10px #ff3df0; }
.rl-results .aw-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .3rem; }
.rl-results .aw-list li { display: flex; justify-content: space-between; gap: .6rem; }
@media (max-width: 820px) { .rl-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .rl-title { font-size: 1.3rem; } .rl-top { padding-right: 4.8rem; } .rl-top img:last-of-type { display: none; } }
@media (prefers-reduced-motion: reduce) { .rl-haze i, .rl-title, .rl-c.win { animation: none; } }

/* ===== Casino games: Blackjack, Craps, Poker (they share the Roulette neon look) ===== */
.cz-grid { display: grid; gap: 1rem; padding: 0 1rem; min-width: 0; }
.cz-grid > * { min-width: 0; }
.cz-card { display: inline-grid; place-items: center; width: 58px; height: 82px; border-radius: 8px; background: #fff; color: #141225; border: 1px solid #cfc8ea; box-shadow: 0 3px 8px rgba(0, 0, 0, .5); font-family: 'Sora', sans-serif; line-height: 1; vertical-align: top; }
.cz-card b { font-size: 1.35rem; margin-top: 10px; } .cz-card i { font-style: normal; font-size: 1.7rem; margin-bottom: 8px; }
.cz-card.cz-red { color: #d62839; }
.cz-card.cz-back { background: repeating-linear-gradient(45deg, #4c1d95 0 6px, #7c3aed 6px 12px); border: 3px solid #fff; box-shadow: 0 0 10px rgba(255, 61, 240, .6), 0 3px 8px rgba(0, 0, 0, .5); }
.cz-card.cz-slot { background: rgba(255, 255, 255, .06); border: 1.5px dashed rgba(255, 255, 255, .35); box-shadow: none; }
.cz-card.sm { width: 40px; height: 56px; } .cz-card.sm b { font-size: .95rem; margin-top: 6px; } .cz-card.sm i { font-size: 1.1rem; margin-bottom: 5px; }
.cz-card.cz-new { animation: cz-deal .35s ease-out both; }
@keyframes cz-deal { from { transform: translate(-30px, -40px) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cz-felt, .pq-felt { background: radial-gradient(ellipse at 50% 40%, #6d28d9, #4c1d95 70%, #2e1065); border: 6px solid #3b1f6e; border-radius: 14px; box-shadow: inset 0 0 40px rgba(0, 0, 0, .55), 0 0 0 2px #ff3df0, 0 0 22px rgba(255, 61, 240, .6); padding: 1rem; }
.cz-label { font: 800 .75rem 'Sora', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #27f0ff; text-shadow: 0 0 8px #27f0ff; margin-bottom: .4rem; }
.cz-dealer { text-align: center; padding-bottom: .8rem; border-bottom: 1px dashed rgba(255, 255, 255, .3); margin-bottom: .8rem; }
.cz-hand { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 82px; }
.cz-tot { margin-top: .35rem; font: 800 .95rem 'Sora', sans-serif; color: #fff; text-shadow: 0 0 8px rgba(255, 61, 240, .8); }
.cz-empty { padding: 1rem 0; color: #b9a8e6; font-size: .85rem; }
.cz-seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.cz-seat { text-align: center; padding: .6rem; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 2px solid transparent; }
.cz-seat.me { border-color: rgba(39, 240, 255, .6); } .cz-seat.turn { border-color: #ffd23f; box-shadow: 0 0 16px rgba(255, 210, 63, .7); }
.cz-name { font: 800 .85rem 'Manrope', sans-serif; color: #fff; margin-bottom: .3rem; } .cz-sub { font-size: .78rem; color: #d9cffb; margin-top: .3rem; }
.cz-res { display: inline-block; margin-top: .35rem; padding: .15rem .6rem; border-radius: 12px; font: 800 .78rem 'Manrope', sans-serif; background: #150a30; color: #d9fbff; border: 1.5px solid #27f0ff; }
.cz-res-win, .cz-res-bj { color: #3b2a00; background: #ffd23f; border-color: #fff; box-shadow: 0 0 12px #ffd23f; } .cz-res-lose, .cz-res-bust { color: #fff; background: #9f1239; border-color: #fda4af; }
.cz-ctl { display: grid; gap: .7rem; } .cz-betline { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.cz-betline > span:first-child { font: 800 1rem 'Sora', sans-serif; color: #fff; } .cz-ctl .rl-btn:disabled { opacity: .45; cursor: default; }
.cz-diceBox { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.cz-dice { display: flex; gap: 18px; min-height: 84px; }
.cz-die { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 5px; width: 74px; height: 74px; padding: 9px; border-radius: 14px; background: #fff; box-shadow: 0 0 18px rgba(255, 61, 240, .7), 0 5px 12px rgba(0, 0, 0, .5); }
.cz-die i { border-radius: 50%; } .cz-die i.on { background: #141225; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .5); }
.cz-die.tumble.a { transform: rotate(-9deg); } .cz-die.tumble.b { transform: rotate(11deg); }
.cz-puck { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; align-content: center; font-family: 'Sora', sans-serif; border: 4px solid #fff; }
.cz-puck.off { background: #1b1b2a; color: #fff; } .cz-puck.on { background: #fff; color: #141225; box-shadow: 0 0 20px #ffd23f; }
.cz-puck small { font-size: .65rem; font-weight: 800; letter-spacing: .1em; } .cz-puck strong { font-size: 1.4rem; line-height: 1; }
.cz-felt2 { background: radial-gradient(ellipse at 50% 40%, #6d28d9, #4c1d95 70%, #2e1065); border: 6px solid #3b1f6e; border-radius: 14px; padding: .7rem; box-shadow: inset 0 0 40px rgba(0, 0, 0, .55), 0 0 0 2px #ff3df0, 0 0 22px rgba(255, 61, 240, .6); margin-bottom: .8rem; }
.cz-spots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.cz-spot { position: relative; display: grid; gap: .2rem; text-align: center; padding: .7rem .5rem; border: 1.5px solid rgba(255, 255, 255, .75); border-radius: 8px; background: rgba(0, 0, 0, .18); color: #fff; cursor: pointer; font-family: 'Manrope', sans-serif; }
.cz-spot strong { font: 800 .95rem 'Sora', sans-serif; text-shadow: 0 0 6px rgba(255, 255, 255, .6); } .cz-spot span { font-size: .7rem; color: #e1d8ff; }
.cz-spot:hover:not(:disabled) { box-shadow: 0 0 14px #27f0ff; } .cz-spot:disabled { opacity: .45; cursor: default; } .cz-spot.has { border-color: #ffd23f; }
.cz-spot em { position: absolute; right: -4px; top: -6px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; background: #ffd23f; color: #3b2a00; font: 800 .75rem 'Manrope', sans-serif; display: grid; place-items: center; border: 2px solid #fff; font-style: normal; }
.cz-shoot { font-size: .7rem; padding: .05rem .4rem; border-radius: 8px; background: #27f0ff; color: #06303a; font-weight: 800; }
.pq-mid { text-align: center; padding-bottom: .8rem; border-bottom: 1px dashed rgba(255, 255, 255, .3); margin-bottom: .8rem; }
.pq-pot { font: 800 1.1rem 'Sora', sans-serif; color: #fff; text-shadow: 0 0 8px rgba(255, 61, 240, .8); margin-bottom: .6rem; } .pq-pot strong { color: #ffd23f; } .pq-pot small { display: block; font: 600 .75rem 'Manrope', sans-serif; color: #d9cffb; text-shadow: none; margin-top: .15rem; }
.pq-board { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pq-seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.pq-seat { text-align: center; padding: .6rem; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 2px solid transparent; } .pq-seat.me { border-color: rgba(39, 240, 255, .6); }
.pq-seat.turn { border-color: #ffd23f; box-shadow: 0 0 16px rgba(255, 210, 63, .7); } .pq-seat.folded { opacity: .5; } .pq-seat.gone { opacity: .35; } .pq-seat.won { border-color: #ffd23f; box-shadow: 0 0 22px #ffd23f; }
.pq-top { display: flex; align-items: center; justify-content: center; gap: .4rem; color: #fff; font-size: .9rem; margin-bottom: .35rem; }
.pq-btn { width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #141225; font: 800 .7rem 'Sora', sans-serif; display: grid; place-items: center; }
.pq-cards { display: flex; gap: 4px; justify-content: center; min-height: 56px; } .pq-chips { margin-top: .35rem; font: 800 .85rem 'Sora', sans-serif; color: #fff; } .pq-act { font-size: .74rem; color: #d9fbff; min-height: 1.1em; margin-top: .15rem; }
.pq-raise { display: grid; gap: .5rem; margin-top: .6rem; } .pq-raise input[type=range] { width: 100%; accent-color: #ff3df0; } .pq-presets { display: flex; gap: .4rem; flex-wrap: wrap; }
.rl-btn.sm { padding: .35rem .7rem; font-size: .78rem; }
.pq-log { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .15rem; font-size: .8rem; color: #d9cffb; }
@media (prefers-reduced-motion: reduce) { .cz-card.cz-new { animation: none; } }
@media (max-width: 620px) { .pq-seats { grid-template-columns: repeat(2, 1fr); } .pq-board .cz-card { width: 46px; height: 66px; } .pq-board .cz-card b { font-size: 1.05rem; } .cz-card { width: 50px; height: 72px; } .cz-dice { gap: 12px; } }

/* ===== River Crossing ===== */
.rx-card { max-width: 980px; margin: 0 auto; }
.rx-bar { display: flex; gap: .6rem 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.rx-lv { display: flex; gap: .4rem; flex-wrap: wrap; }
.rx-lv button { font: 800 .85rem 'Manrope', sans-serif; padding: .45rem .8rem; border-radius: 20px; border: 1.5px solid var(--line); background: var(--card, #fff); cursor: pointer; color: inherit; }
.rx-lv button.on { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; border-color: transparent; }
.rx-lv .st { font-size: .7rem; margin-left: .3rem; }
.rx-stats { display: flex; gap: 1rem; align-items: center; font: 800 .95rem 'Sora', sans-serif; } .rx-stats small { display: block; font: 700 .7rem 'Manrope', sans-serif; opacity: .7; }
.rx-btn { font: 800 .9rem 'Manrope', sans-serif; padding: .6rem 1rem; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card, #fff); cursor: pointer; color: inherit; } .rx-btn:disabled { opacity: .5; cursor: default; }
.rx-scene { position: relative; display: grid; grid-template-columns: 27% 1fr 27%; border-radius: 12px; overflow: hidden; border: 3px solid #2a7d3a; min-height: 330px; }
.rx-bank { background: repeating-linear-gradient(0deg, #5cc26a 0 22px, #66cc74 22px 44px); padding: .7rem .4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; position: relative; }
.rx-bank h3 { position: absolute; top: .4rem; left: 0; right: 0; text-align: center; margin: 0; font: 800 .72rem 'Sora', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #14532d; }
.rx-bank.l { border-right: 6px solid #8a6a3a; } .rx-bank.r { border-left: 6px solid #8a6a3a; }
.rx-river { position: relative; background: linear-gradient(180deg, #3aa0ff, #1e6fd0); overflow: hidden; }
.rx-river::before, .rx-river::after { content: ""; position: absolute; left: -50%; width: 200%; height: 14px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 30px, transparent 30px 70px); border-radius: 8px; animation: rx-flow 6s linear infinite; }
.rx-river::before { top: 22%; } .rx-river::after { top: 68%; animation-duration: 9s; animation-direction: reverse; opacity: .7; }
@keyframes rx-flow { to { transform: translateX(70px); } }
.rx-boat { position: absolute; top: 34%; width: 150px; left: 8px; transition: left 1.4s cubic-bezier(.45, .05, .3, 1); z-index: 2; } .rx-boat.right { left: calc(100% - 158px); }
.rx-boat.bob { animation: rx-bob 2.4s ease-in-out infinite; } @keyframes rx-bob { 50% { transform: translateY(5px); } }
.rx-hull { margin-top: -6px; height: 34px; background: #8a5a2b; border-radius: 4px 4px 40px 40px; border: 3px solid #5a3b1e; }
.rx-crew { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 84px; }
.rx-slot { width: 54px; height: 78px; border: 2px dashed rgba(255, 255, 255, .65); border-radius: 8px; display: grid; place-items: end center; background: rgba(255, 255, 255, .12); }
.rx-slot.rx-hugo { border: 0; background: none; } .rx-hugo img { width: 48px; image-rendering: pixelated; }
.rx-row { position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); z-index: 3; font: 800 1rem 'Manrope', sans-serif; padding: .7rem 1.3rem; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); cursor: pointer; box-shadow: 0 4px 12px rgba(30, 40, 120, .4); } .rx-row:disabled { opacity: .55; cursor: default; }
.rx-it { position: relative; cursor: pointer; border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; font: 800 .7rem 'Manrope', sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.rx-it img { width: 51px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); } .rx-it:hover img, .rx-it:hover svg { transform: translateY(-3px); }
.rx-it.far { opacity: .55; cursor: default; } .rx-it.far:hover img, .rx-it.far:hover svg { transform: none; }
.rx-it.hint { animation: rx-hint .7s ease-in-out infinite alternate; } @keyframes rx-hint { to { transform: translateY(-6px); } }
.rx-it.hint::after { content: ""; position: absolute; inset: -4px -6px 10px; border: 3px solid #ffd23f; border-radius: 10px; box-shadow: 0 0 12px #ffd23f; pointer-events: none; }
.rx-msg { margin-top: .8rem; min-height: 3rem; display: flex; align-items: center; gap: .6rem; } .rx-msg img { width: 40px; image-rendering: pixelated; }
.rx-say { background: #fff; border: 2px solid #1e2a78; border-radius: 14px; padding: .5rem .8rem; font-weight: 800; color: #4338ca; font-size: .92rem; } .rx-say.bad { border-color: #d62839; color: #a3122a; } .rx-say.good { border-color: #188a4a; color: #0f6a38; }
.rx-acts { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; } .rx-rules { font-size: .82rem; opacity: .75; line-height: 1.55; margin: .8rem 0 0; }
.rx-win { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; z-index: 5; } .rx-win > div { background: #fff; color: #0f172a; border-radius: 14px; padding: 1.2rem 1.6rem; text-align: center; max-width: 320px; }
.rx-win h2 { margin: 0 0 .3rem; } .rx-stars { font-size: 2rem; color: #ffd23f; letter-spacing: .2em; }
.rx-results { margin: 0 auto .8rem; max-width: 980px; padding: .8rem 1rem; border-radius: 12px; border: 2px solid #ffd23f; text-align: center; } .rx-results h3 { margin: 0 0 .2rem; }
@media (max-width: 640px) { .rx-scene { grid-template-columns: 24% 1fr 24%; min-height: 380px; } .rx-boat { width: 112px; } .rx-boat.right { left: calc(100% - 120px); } .rx-slot { width: 40px; } .rx-it img { width: 40px; } }
@media (prefers-reduced-motion: reduce) { .rx-river::before, .rx-river::after, .rx-boat.bob, .rx-it.hint { animation: none; } }

/* ---- Plinko (gameshow look) ---- */
.pl-wrap { position: relative; overflow: hidden; border-radius: 16px; background: repeating-conic-gradient(from 0deg at 50% 18%, #1d3bd6 0 6deg, #1530b4 6deg 12deg); color: #fff; padding: 0 0 1rem; isolation: isolate; font-family: 'Manrope', system-ui, sans-serif; }
.pl-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(900px 520px at 50% 22%, rgba(255,255,255,.28), transparent 70%), radial-gradient(1200px 500px at 50% 120%, rgba(0,0,20,.55), transparent 70%); }
.pl-top { position: relative; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem 6.5rem 1.1rem 1rem; background: repeating-linear-gradient(90deg, #8d0f26 0 26px, #b3162f 26px 52px); border-bottom: 6px solid #ffc928; box-shadow: 0 8px 0 #7a5a00, 0 14px 24px rgba(0,0,20,.5); margin-bottom: 1.6rem; }
.pl-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 10px; background: radial-gradient(circle at 50% 50%, #fff6b0 30%, #ffb400 38%, transparent 44%) 0 0 / 24px 10px repeat-x; animation: plblink 1.1s steps(1) infinite; }
@keyframes plblink { 50% { filter: brightness(.55); } }
.pl-top img { width: 54px; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.pl-top div { text-align: center; }
.pl-top h2 { margin: 0; font: 800 2.5rem 'Sora', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #ffc928; text-shadow: 0 3px 0 #c2380a, 0 6px 0 #6b0f1c, 0 10px 14px rgba(0,0,0,.45); transform: skewX(-6deg); }
.pl-top p { margin: .15rem 0 0; color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .04em; }
.pl-snd { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: #fff; color: #0a1560; border: 3px solid #ffc928; border-radius: 22px; padding: .35rem .8rem; font: 800 .8rem 'Manrope', sans-serif; cursor: pointer; box-shadow: 0 4px 0 #7a5a00; }
.pl-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 1.2rem; align-items: start; padding: 0 1rem; max-width: 1100px; margin: 0 auto; }
.pl-card { background: linear-gradient(180deg, #1b3fe0, #0f2398); border: 4px solid #ffc928; border-radius: 18px; padding: 1rem; box-shadow: 0 6px 0 #7a5a00, 0 14px 26px rgba(0,0,30,.5); min-width: 0; }
.pl-board { position: relative; padding: 34px 30px 22px; background: linear-gradient(180deg, #14207e, #070d44); border-color: #fff; border-width: 5px; }
.pl-bulbs { position: absolute; inset: 7px; pointer-events: none; }
.pl-bulbs i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fffbe0 0 25%, #ffd23f 55%, #e09a00 100%); box-shadow: 0 0 8px rgba(255,200,40,.9); }
.pl-bulbs i.o { animation: plblink 1.1s steps(1) infinite; } .pl-bulbs i.e { animation: plblink 1.1s steps(1) infinite .55s; }
.pl-ctl { display: grid; gap: .9rem; }
.pl-f { display: grid; gap: .3rem; } .pl-f > label { font: 800 .78rem 'Manrope', sans-serif; color: #ffc928; text-transform: uppercase; letter-spacing: .1em; }
.pl-credits { background: #07091f; border: 3px solid #000; border-radius: 12px; padding: .5rem .8rem; box-shadow: inset 0 0 0 2px #444, inset 0 6px 14px rgba(0,0,0,.8); font: 800 2.2rem 'Sora', sans-serif; color: #ffb21a; text-shadow: 0 0 10px rgba(255,170,0,.8); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.pl-credits small { display: block; font: 800 .72rem 'Manrope', sans-serif; color: #fff; text-shadow: none; letter-spacing: .14em; text-transform: uppercase; }
.pl-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.pl-wrap input[type=number] { flex: 1; min-width: 0; background: #fff; color: #0a1560; border: 3px solid #ffc928; border-radius: 10px; padding: .5rem .6rem; font: 800 1.1rem 'Sora', sans-serif; }
.pl-mini { background: #fff; color: #0a1560; border: 3px solid #ffc928; border-radius: 10px; padding: .45rem .7rem; font: 800 .85rem 'Manrope', sans-serif; cursor: pointer; box-shadow: 0 3px 0 #7a5a00; }
.pl-mini:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #7a5a00; }
.pl-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.pl-chip { width: 40px; height: 40px; border-radius: 50%; border: 4px dashed rgba(255,255,255,.9); color: #fff; font: 800 .72rem 'Sora', sans-serif; cursor: pointer; padding: 0; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.pl-chip[data-v="1"] { background: #64748b; } .pl-chip[data-v="5"] { background: #d62839; } .pl-chip[data-v="10"] { background: #2563eb; } .pl-chip[data-v="25"] { background: #188a4a; } .pl-chip[data-v="100"] { background: #1b1b2a; }
.pl-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.pl-seg button { background: #fff; color: #0a1560; border: 3px solid #fff; border-radius: 10px; padding: .55rem; font: 800 .85rem 'Manrope', sans-serif; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.pl-seg button.on { background: #ffc928; color: #3a1a00; box-shadow: 0 3px 0 #7a5a00, 0 0 0 3px #e8173a; }
.pl-wrap input[type=range] { width: 100%; accent-color: #e8173a; height: 26px; }
.pl-val { float: right; color: #fff; font-family: 'Sora', sans-serif; letter-spacing: 0; text-transform: none; font-size: 1rem; }
.pl-drop { background: linear-gradient(180deg, #ff4a64, #d00f30); color: #fff; border: 4px solid #ffc928; border-radius: 14px; padding: .9rem; font: 800 1.3rem 'Sora', sans-serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-shadow: 0 2px 0 rgba(0,0,0,.4); box-shadow: 0 6px 0 #7a0b1e, 0 10px 18px rgba(0,0,0,.4); }
.pl-drop:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #7a0b1e; }
.pl-drop:disabled { filter: grayscale(.5) brightness(.8); cursor: default; }
.pl-wrap button:disabled, .pl-wrap input:disabled { opacity: .6; cursor: default; }
.pl-skip { display: none; } .pl-skip.show { display: block; }
.pl-tot { font-size: .85rem; color: #cfd8ff; } .pl-tot b { color: #fff; }
.pl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pl-stat { background: #fff; color: #0a1560; border-radius: 10px; padding: .5rem .6rem; font: 800 1.05rem 'Sora', sans-serif; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.pl-stat small { display: block; font: 800 .68rem 'Manrope', sans-serif; color: #4a5599; letter-spacing: .08em; text-transform: uppercase; }
.pl-stat .pos { color: #0b8f55; } .pl-stat .neg { color: #d00f30; }
.pl-wrap canvas { width: 100%; height: auto; display: block; position: relative; }
.pl-hist { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; min-height: 30px; margin-top: .6rem; position: relative; }
.pl-pill { padding: .2rem .55rem; border-radius: 12px; font: 800 .78rem 'Sora', sans-serif; border: 2px solid #fff; }
.pl-say { margin-top: .6rem; text-align: center; font: 800 1.05rem 'Sora', sans-serif; color: #ffc928; min-height: 1.4em; position: relative; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.pl-note { font-size: .78rem; color: #cfd8ff; text-align: center; margin: 1.2rem 1rem .3rem; }
.pl-results { margin: 0 auto .8rem; max-width: 980px; padding: .8rem 1rem; border-radius: 12px; border: 3px solid #ffc928; background: #0f2398; color: #fff; text-align: center; } .pl-results h3 { margin: 0 0 .2rem; }
@media (max-width: 820px) { .pl-grid { grid-template-columns: 1fr; } .pl-top h2 { font-size: 1.7rem; } .pl-top img.pl-m2 { display: none; } .pl-board { padding: 30px 22px 18px; } .pl-top { padding-right: 6.2rem; } }
@media (prefers-reduced-motion: reduce) { .pl-top::after, .pl-bulbs i { animation: none; } }

/* ---- Fruit Dojo (Japanese dojo look) ---- */
.fd-wrap{--cream:#fff3d1;--red:#e8452c;--gold:#f6c453;--muted:#b8bfe6;position:relative;color:#fff3d1;font-family:'Manrope',system-ui,sans-serif;background:radial-gradient(900px 500px at 70% 0,#2b3a86 0,#141a47 55%,#080a20 100%);border-radius:16px;padding:0 1rem 1.5rem;box-sizing:border-box;overflow:hidden}
.fd-wrap *{box-sizing:border-box}
.fd-top{display:flex;align-items:center;justify-content:center;gap:1.2rem;padding:1rem 0 .7rem}
.fd-cat{position:relative;display:block;width:62px}.fd-cat img{width:62px;display:block;image-rendering:pixelated;filter:drop-shadow(0 6px 0 rgba(0,0,0,.35))}
.fd-cat.fd-hit{animation:fd-ouch .5s}.fd-cat.fd-cheer{animation:fd-cheer .5s}
.fd-band{position:absolute;left:14%;right:14%;top:27%;height:8px;background:#d7261a;border-top:1px solid #7a120a;border-bottom:1px solid #7a120a}
.fd-band::before{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;margin:-3px;border-radius:50%;background:#fff3d1}
.fd-band::after{content:"";position:absolute;right:-9px;top:3px;width:12px;height:6px;background:#d7261a;transform:skewY(18deg);box-shadow:3px 5px 0 -1px #d7261a}
.fd-jp{font-family:'Noto Sans JP','Hiragino Sans','Yu Gothic','Meiryo',sans-serif}
.fd-seal{display:inline-grid;place-items:center;width:.95em;height:.95em;margin-left:.35em;vertical-align:.08em;background:#c8321f;color:#fff3d1;border-radius:.12em;font:800 .55em 'Noto Sans JP','Hiragino Sans','Yu Gothic',sans-serif;text-shadow:none;transform:rotate(-7deg);box-shadow:inset 0 0 0 2px rgba(255,243,209,.55),0 3px 0 rgba(0,0,0,.35)}
.fd-kanji{display:block;margin-top:.15rem;color:var(--gold);font-weight:800;letter-spacing:.45em;font-size:.8rem;text-indent:.45em}
@keyframes fd-ouch{0%,100%{transform:translateX(0) rotate(0)}20%{transform:translateX(-8px) rotate(-10deg)}40%{transform:translateX(8px) rotate(10deg)}60%{transform:translateX(-6px) rotate(-6deg)}80%{transform:translateX(5px) rotate(4deg)}}
@keyframes fd-cheer{0%,100%{transform:translateY(0)}40%{transform:translateY(-16px) scale(1.08)}}
.fd-top > div{text-align:center}
.fd-title{margin:0;font:800 2.3rem 'Sora',sans-serif;letter-spacing:.14em;text-transform:uppercase;color:var(--cream);text-shadow:0 3px 0 var(--red),0 6px 0 rgba(0,0,0,.4)}
.fd-top p{margin:.2rem 0 0;color:var(--muted);font-size:.85rem;font-weight:700;letter-spacing:.06em}
.fd-hud{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;justify-content:space-between;background:linear-gradient(180deg,#3a2416,#241409);border:3px solid #c8321f;border-radius:6px;outline:2px solid var(--gold);outline-offset:-7px;padding:.55rem .9rem;margin-bottom:.7rem;box-shadow:0 5px 0 rgba(0,0,0,.4)}
.fd-stat small{display:block;font:800 .66rem 'Manrope';letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.fd-stat span{font:800 1.7rem 'Sora';color:var(--cream);font-variant-numeric:tabular-nums}
.fd-lives{display:flex;gap:.25rem}.fd-lives svg{width:30px;height:30px;transition:transform .2s,opacity .3s}
.fd-lives svg.fd-gone{opacity:.2;transform:scale(.75)}.fd-lives svg.fd-gain{animation:fd-gain .7s}
@keyframes fd-gain{0%{transform:scale(.4)}50%{transform:scale(1.5)}100%{transform:scale(1)}}
.fd-btn{background:var(--red);color:var(--cream);border:0;border-radius:10px;padding:.6rem 1.1rem;font:800 .95rem 'Sora',sans-serif;letter-spacing:.06em;cursor:pointer;box-shadow:0 4px 0 #8c2412}
.fd-btn:active{transform:translateY(3px);box-shadow:0 1px 0 #8c2412}
.fd-btn.fd-ghost{background:transparent;border:2px solid var(--muted);color:var(--cream);box-shadow:none;padding:.4rem .8rem;font-size:.8rem}
.fd-stage{position:relative;border-radius:6px;overflow:hidden;border:7px solid #2a1810;outline:3px solid #c8321f;outline-offset:-3px;box-shadow:0 8px 0 rgba(0,0,0,.45),0 0 40px rgba(232,69,44,.25),inset 0 0 0 2px var(--gold);touch-action:none;user-select:none;-webkit-user-select:none}
.fd-wrap canvas{display:block;width:100%;height:auto;touch-action:none;cursor:crosshair}
.fd-flash{position:absolute;inset:0;pointer-events:none;opacity:0;background:radial-gradient(circle,rgba(120,255,140,.75),rgba(60,200,90,.35) 60%,transparent);}
.fd-flash.fd-on{animation:fd-fl .6s}
@keyframes fd-fl{0%{opacity:1}100%{opacity:0}}
.fd-ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(6,8,28,.72);backdrop-filter:blur(3px);text-align:center;padding:1rem}
.fd-ov[hidden]{display:none}
.fd-card{position:relative;background:repeating-linear-gradient(90deg,rgba(120,90,40,.05) 0 2px,transparent 2px 7px),#f3e6c8;color:#2a1810;border:4px solid #2a1810;border-radius:4px;padding:1.4rem 1.6rem 1.3rem;max-width:430px;box-shadow:0 8px 0 rgba(0,0,0,.45),inset 0 0 0 3px #f3e6c8,inset 0 0 0 5px #c8321f}
.fd-card::before,.fd-card::after{content:"";position:absolute;left:-12px;right:-12px;height:14px;background:#2a1810;border-radius:7px;box-shadow:inset 0 3px 0 #6b4a2a}.fd-card::before{top:-12px}.fd-card::after{bottom:-12px}
.fd-card h3{margin:0 0 .4rem;font:800 1.6rem 'Sora';color:#b3261a}
.fd-card p{margin:.3rem 0 .9rem;color:#2a1810;line-height:1.5;font-size:.95rem}
.fd-diff{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin:.6rem 0 1rem}
.fd-diff button{background:#fff8e4;color:#2a1810;border:2px solid #2a1810;border-radius:10px;padding:.5rem .3rem;font:800 .85rem 'Manrope';cursor:pointer}
.fd-diff button small{display:block;font:700 .66rem 'Manrope';color:#6b5338}
.fd-diff button.fd-on{border-color:#2a1810;background:#f6c453;box-shadow:0 0 0 3px #c8321f}
.fd-legend{display:flex;gap:.4rem 1rem;flex-wrap:wrap;justify-content:center;font-size:.8rem;color:#6b5338;margin:.2rem 0 1rem;font-weight:700}
.fd-legend b{color:#b3261a}
.fd-note{font-size:.78rem;color:var(--muted);text-align:center;margin:1rem 0 0}
@media(max-width:640px){.fd-ov{position:static;backdrop-filter:none;background:#0b0e2a;padding:1.4rem 1rem}.fd-title{font-size:1.5rem}.fd-cat,.fd-cat img{width:46px}.fd-stat span{font-size:1.3rem}.fd-lives svg{width:24px;height:24px}}

/* ===== Type Test (typing.js): an old computer screen and a keyboard ===== */
.ty-room{position:relative;max-width:960px;margin:0 auto;padding:1.1rem 1rem 1.2rem;border-radius:18px;overflow:hidden;background:repeating-linear-gradient(90deg,rgba(255,255,255,.035) 0 2px,transparent 2px 46px),linear-gradient(180deg,#27474a 0,#1b3336 58%,#5b3c26 58%,#3d2615 100%)}
.ty-monitor{position:relative;max-width:820px;margin:0 auto;background:linear-gradient(180deg,#eee7d2,#e2dbc6 40%,#c9c1a7);border-radius:30px 30px 20px 20px;padding:22px 22px 12px;box-shadow:0 14px 0 -2px #a79f86,0 26px 34px rgba(0,0,0,.45),inset 0 -6px 0 rgba(0,0,0,.08),inset 0 3px 0 rgba(255,255,255,.7)}
.ty-bezel{background:#14170f;border-radius:20px;padding:12px;box-shadow:inset 0 0 0 3px #2a2c22,inset 0 8px 18px rgba(0,0,0,.9),0 2px 0 rgba(255,255,255,.6)}
.ty-crt{position:relative;border-radius:14px;overflow:hidden;min-height:420px;background:radial-gradient(120% 100% at 50% 40%,#06200f 0,#031208 70%,#010805 100%);color:#9dffb8;padding:1rem 1.2rem 1.1rem;text-shadow:0 0 6px rgba(120,255,160,.55);animation:ty-flick 5s infinite;cursor:text}
.ty-crt::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:5;background:repeating-linear-gradient(180deg,rgba(0,0,0,.2) 0 1px,transparent 1px 3px);mix-blend-mode:multiply}
.ty-crt::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:6;background:radial-gradient(120% 100% at 50% 50%,transparent 60%,rgba(0,0,0,.55) 100%),linear-gradient(115deg,rgba(255,255,255,.05) 0,transparent 30%)}
@keyframes ty-flick{0%,100%{filter:brightness(1)}48%{filter:brightness(1.03)}50%{filter:brightness(.96)}52%{filter:brightness(1.02)}}
.ty-chin{display:flex;align-items:center;justify-content:space-between;padding:12px 8px 2px;gap:1rem;font:800 .72rem 'Sora',sans-serif;letter-spacing:.18em;color:#6b6450}
.ty-slot{flex:1;max-width:190px;height:9px;border-radius:5px;background:#9a927a;box-shadow:inset 0 2px 3px rgba(0,0,0,.45)}
.ty-led{display:inline-flex;align-items:center;gap:.5rem}.ty-led i{width:10px;height:10px;border-radius:50%;background:#3dff7a;box-shadow:0 0 8px #3dff7a,inset 0 -2px 0 rgba(0,0,0,.25)}
.ty-snd{background:transparent;border:2px solid #6b6450;color:#6b6450;border-radius:4px;padding:.25rem .6rem;font:800 .65rem 'Sora',sans-serif;letter-spacing:.1em;text-transform:uppercase;cursor:pointer}
.ty-neck{width:150px;height:22px;margin:0 auto;background:linear-gradient(180deg,#c9c1a7,#a79f86);box-shadow:inset 0 3px 6px rgba(0,0,0,.25)}
.ty-base{width:300px;max-width:70%;height:20px;margin:0 auto;background:linear-gradient(180deg,#e2dbc6,#c9c1a7);border-radius:6px 6px 14px 14px;box-shadow:0 8px 14px rgba(0,0,0,.45)}
.ty-bar{display:flex;justify-content:space-between;align-items:center;gap:.6rem;font:800 .72rem 'Sora',sans-serif;letter-spacing:.14em;text-transform:uppercase;border-bottom:1px solid rgba(157,255,184,.35);padding-bottom:.45rem;margin-bottom:.8rem}
.ty-bar b{color:#ffd36b;text-shadow:0 0 6px rgba(255,200,80,.5)}
.ty-btn{background:transparent;color:#9dffb8;border:2px solid #9dffb8;border-radius:4px;padding:.45rem .8rem;font:800 .85rem 'Sora',sans-serif;letter-spacing:.08em;cursor:pointer;text-shadow:inherit;text-transform:uppercase}
.ty-btn:hover,.ty-btn:focus-visible{background:rgba(157,255,184,.15);outline:0}
.ty-btn.on{background:#9dffb8;color:#04170b;text-shadow:none}
.ty-btn:disabled{opacity:.35;cursor:not-allowed}
.ty-btn.ty-go{display:block;margin:1rem auto 0;padding:.7rem 1.6rem;font-size:1rem;background:#ffd36b;border-color:#ffd36b;color:#2a1d00;text-shadow:none;box-shadow:0 0 14px rgba(255,200,80,.5)}
.ty-btn.ty-go:disabled{box-shadow:none}
.ty-menu h2{margin:0 0 .15rem;font:800 1.7rem 'Sora',sans-serif;letter-spacing:.12em;color:#d7ffe2}
.ty-menu p.ty-sub{margin:0 0 .9rem;color:#3f8c5a;font-weight:700;font-size:.85rem}
.ty-row{display:grid;grid-template-columns:90px 1fr;gap:.6rem;align-items:center;margin:.55rem 0}
.ty-row label{font:800 .72rem 'Sora',sans-serif;letter-spacing:.14em;color:#ffd36b;text-transform:uppercase}
.ty-opts{display:flex;gap:.4rem;flex-wrap:wrap}
.ty-hint{margin:.6rem 0 0;color:#3f8c5a;font-size:.8rem;font-weight:700;min-height:1.2em}
.ty-who{margin:.2rem 0 .4rem;color:#d7ffe2;font:700 .85rem 'Manrope',sans-serif}.ty-who b{color:#ffd36b}
.ty-hud{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;margin-bottom:.8rem}
.ty-hud div{border:1px solid rgba(157,255,184,.4);border-radius:4px;padding:.3rem .6rem;background:rgba(0,40,15,.4)}
.ty-hud small{display:block;font:800 .62rem 'Sora',sans-serif;letter-spacing:.16em;color:#3f8c5a;text-transform:uppercase}
.ty-hud span{font:800 1.7rem 'Sora',sans-serif;color:#d7ffe2;font-variant-numeric:tabular-nums}
.ty-lanes{display:grid;gap:.35rem;margin-bottom:.8rem}
.ty-lane{display:grid;grid-template-columns:96px 1fr 62px;gap:.5rem;align-items:center;font:800 .7rem 'Sora',sans-serif;letter-spacing:.1em;text-transform:uppercase}
.ty-lane span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ty-lane i{display:block;height:12px;border:1px solid rgba(157,255,184,.5);border-radius:2px;position:relative;background:rgba(0,40,15,.5)}
.ty-lane i u{position:absolute;left:0;top:0;bottom:0;width:0;background:#9dffb8;box-shadow:0 0 8px #9dffb8;transition:width .15s linear}
.ty-lane.f i u{background:#ffd36b;box-shadow:0 0 8px #ffd36b}
.ty-lane em{font-style:normal;text-align:right;color:#ffd36b}
.ty-pass{height:238px;overflow:hidden;position:relative;font:600 1.4rem/2.05 'Sora',sans-serif;letter-spacing:.015em;white-space:pre-wrap;color:#3f8c5a;text-shadow:none;scroll-behavior:smooth}
.ty-pass .ty-ok{color:#d7ffe2;text-shadow:0 0 6px rgba(120,255,160,.6)}
.ty-pass .ty-bad{background:#ff6161;color:#2a0000;text-shadow:none}
.ty-pass .ty-cur{background:rgba(157,255,184,.9);color:#04170b;text-shadow:none;animation:ty-blink 1s steps(1) infinite}
.ty-pass .ty-cur.ty-bad{background:#ff6161;color:#2a0000}
@keyframes ty-blink{50%{background:rgba(157,255,184,.35)}}
.ty-start{position:absolute;left:0;right:0;bottom:10px;text-align:center;font:800 .8rem 'Sora',sans-serif;letter-spacing:.14em;color:#ffd36b;text-transform:uppercase;animation:ty-blink2 1.2s steps(1) infinite;z-index:3}
@keyframes ty-blink2{50%{opacity:.35}}
.ty-big{text-align:center}
.ty-big .ty-n{font:800 5rem/1 'Sora',sans-serif;color:#eafff0;text-shadow:0 0 18px rgba(120,255,160,.8);font-variant-numeric:tabular-nums}
.ty-big .ty-u{font:800 .85rem 'Sora',sans-serif;letter-spacing:.3em;color:#3f8c5a}
.ty-rank{margin:.5rem 0 .9rem;text-align:center;font:800 1.15rem 'Sora',sans-serif;color:#ffd36b;letter-spacing:.08em;text-shadow:0 0 8px rgba(255,200,80,.5)}
.ty-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:.5rem}
.ty-stats div{border:1px solid rgba(157,255,184,.4);border-radius:4px;padding:.4rem .6rem;background:rgba(0,40,15,.4)}
.ty-stats small{display:block;font:800 .6rem 'Sora',sans-serif;letter-spacing:.16em;color:#3f8c5a;text-transform:uppercase}
.ty-stats span{font:800 1.3rem 'Sora',sans-serif;color:#d7ffe2}
.ty-acts{display:flex;gap:.6rem;justify-content:center;flex-wrap:wrap;margin-top:1rem}
.ty-cd{display:grid;place-items:center;min-height:300px;font:800 7rem 'Sora',sans-serif;color:#ffd36b;text-shadow:0 0 22px rgba(255,200,80,.8)}
.ty-desk{max-width:780px;margin:1.5rem auto 0}
.ty-kb{background:linear-gradient(180deg,#e2dbc6,#c9c1a7);border-radius:14px;padding:14px 16px 16px;box-shadow:0 10px 0 -2px #a79f86,0 22px 26px rgba(0,0,0,.45),inset 0 2px 0 rgba(255,255,255,.7);user-select:none;-webkit-user-select:none}
.ty-kr{display:flex;gap:6px;margin-bottom:6px;justify-content:center}
.ty-k{flex:0 0 auto;width:calc((100% - 6px*13)/14);height:38px;border-radius:7px;background:linear-gradient(180deg,#f5f0e0,#dcd5bd);box-shadow:0 4px 0 #9d957b,0 5px 6px rgba(0,0,0,.3);display:grid;place-items:center;font:800 .76rem 'Sora',sans-serif;color:#3a3626;text-transform:uppercase;transition:transform .05s,box-shadow .05s}
.ty-k.w25{width:calc((100% - 6px*13)/14*2 + 6px)}.ty-k.space{width:56%}
.ty-k.down{transform:translateY(3px);box-shadow:0 1px 0 #9d957b;background:linear-gradient(180deg,#bfe8c8,#9bd3a8)}
.ty-k.next{background:linear-gradient(180deg,#ffe9a0,#ffd36b);box-shadow:0 4px 0 #b88a1c,0 0 14px rgba(255,200,80,.85)}
.ty-k.err{background:linear-gradient(180deg,#ffb3b3,#ff7a7a)}
.ty-pet{position:absolute;bottom:10px;width:54px;image-rendering:pixelated;filter:drop-shadow(0 5px 0 rgba(0,0,0,.4))}
.ty-pet.l{left:8px}.ty-pet.r{right:8px}
.ty-cap{position:absolute;opacity:0;left:0;top:0;width:1px;height:1px}
@media(max-width:900px){.ty-pet{display:none}}
@media(max-width:700px){.ty-room{padding:.6rem .5rem}.ty-monitor{padding:12px 10px 8px;border-radius:20px}.ty-crt{padding:.7rem .75rem;min-height:360px}.ty-pass{font-size:1.05rem;height:190px}.ty-big .ty-n{font-size:3.6rem}.ty-row{grid-template-columns:1fr;gap:.3rem}.ty-desk{display:none}.ty-hud span{font-size:1.2rem}.ty-lane{grid-template-columns:70px 1fr 48px}.ty-cd{font-size:5rem;min-height:240px}}
