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

: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 */
.hm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; justify-items: center; }
.hm > * { max-width: 100%; }
.hm-top { display: flex; gap: 1.5rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.hm-fig { width: min(210px, 60vw); height: auto; }
.hm-fig .gallows { stroke: #cbd5e1; stroke-width: 6; stroke-linecap: round; fill: none; }
.hm-fig .body { stroke: url(#hmGrad); stroke-width: 5; stroke-linecap: round; fill: none; }
.hm-fig .body.lost { stroke: #dc2626; }
.hm-info { display: grid; gap: .6rem; justify-items: start; }
.hm-lives { display: flex; gap: .25rem; align-items: center; }
.hm-lives .life { color: #e11d48; }
.hm-lives .life.lost { color: #cbd5e1; }
.hm-word { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; }
.hm-letter { width: 2.3rem; height: 3rem; display: grid; place-items: center; border-bottom: 3px solid var(--indigo); font: 700 1.6rem var(--font-head); text-transform: uppercase; }
.hm-letter.missed { color: var(--bad); border-bottom-color: var(--g-bd-fca5a5); }
.hm-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(2.6rem, 1fr)); gap: .4rem; max-width: 560px; width: 100%; }
.hm-key { padding: .65rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--g-bg-ffffff); font: 700 1rem var(--font); cursor: pointer; color: var(--ink); transition: background .12s, border-color .12s; }
.hm-key:not(:disabled):hover { border-color: var(--indigo); background: rgba(79, 70, 229, .06); }
.hm-key:disabled { cursor: default; opacity: .55; }
.hm-key.hit { background: var(--g-bg-dcfce7); border-color: var(--g-bd-86efac); color: var(--ok); opacity: 1; }
.hm-key.miss { background: var(--g-bg-fee2e2); border-color: var(--g-bd-fca5a5); color: var(--bad); opacity: 1; }

@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; }

.hm-hint { display: flex; justify-content: center; margin-top: .25rem; }

/* ---- 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; }
.resume-trash { border: 1px solid var(--g-bd-fecdd3); background: var(--g-bg-ffffff); color: var(--g-tx-be123c); border-radius: 5px; padding: 0 .55rem; cursor: pointer; display: inline-flex; align-items: center; }
.resume-trash:hover { background: var(--g-bg-fff1f2); border-color: var(--g-bd-fb7185); }
.resume-trash svg { width: 1rem; height: 1rem; }
.resume-trash { min-width: 2.1rem; justify-content: center; }

/* 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; }
