/* ═══════════════════════════════════════════════════════════
   Bluffy — design system & UI
   ═══════════════════════════════════════════════════════════ */
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-Regular.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-Medium.woff) format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-SemiBold.woff) format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-Bold.woff) format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-ExtraBold.woff) format('woff'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url(/fonts/InterDisplay-ExtraBold.woff) format('woff'); font-weight: 800; font-display: swap; }

:root {
  --bg: #0E1430; --bg-2: #141C40; --bg-3: #1B2552;
  --surface: rgba(255,255,255,.05); --surface-2: rgba(255,255,255,.08); --surface-3: rgba(255,255,255,.13);
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.15);
  --text: #F3F6FF; --text-2: #C6CDEB; --muted: #8C95BF;
  --primary: #FF9F43; --primary-2: #FF7A3D; --accent: #4F7BFF; --pink: #FF6B6B; --on-primary: #0E1430;
  --gold: #FFC93C; --gold-2: #FF9F43; --green: #2BD99F; --red: #FF5470; --blue: #38BDF8;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  --grad-gold: linear-gradient(135deg, #FFD966, var(--gold-2));
  --glow-1: color-mix(in srgb, var(--primary) 26%, transparent); --glow-2: color-mix(in srgb, var(--primary-2) 15%, transparent); --glow-3: color-mix(in srgb, var(--accent) 10%, transparent);
  --modal-bg: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  --r: 18px; --r-sm: 12px; --r-xs: 8px;
  --shadow: 0 12px 34px rgba(3,6,20,.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Inter Display', 'Inter', system-ui, sans-serif;
  --felt1: #10875a; --felt2: #064a33; --rail: #3b2412;
  --top-h: 64px;
}
/* theme presets (owner panel → Appearance); the default "fox" palette lives in :root */
[data-theme="party"] { --primary: #4F7BFF; --primary-2: #2EC4D6; --accent: #FF6B6B; --pink: var(--accent); --on-primary: #fff; }
[data-theme="grape"] { --bg: #120E26; --bg-2: #1A1436; --bg-3: #231B4A; --primary: #8B5CFF; --primary-2: #FF4FA3; --accent: #FF4FA3; --pink: var(--accent); --on-primary: #fff; --muted: #948CBF; }
[data-theme="ocean"] { --bg: #071E29; --bg-2: #0B2A38; --bg-3: #113748; --primary: #14B8C4; --primary-2: #3A86FF; --accent: #FFB443; --pink: var(--accent); --on-primary: #fff; --muted: #85A3B5; }
[data-theme="forest"] { --bg: #0A1C16; --bg-2: #0F281F; --bg-3: #15362A; --primary: #22C994; --primary-2: #8FD14F; --accent: #FFC93C; --pink: var(--accent); --on-primary: #fff; --muted: #86A99A; }
[data-theme="sunset"] { --bg: #1C0E22; --bg-2: #28132E; --bg-3: #351A3B; --primary: #FF6B6B; --primary-2: #FFB443; --accent: #A06BFF; --pink: var(--accent); --on-primary: #fff; --muted: #B08FA8; }
[data-theme="graphite"] { --bg: #111317; --bg-2: #181B21; --bg-3: #21252D; --primary: #5B8CFF; --primary-2: #7B6CFF; --accent: #FF7A59; --pink: var(--accent); --on-primary: #fff; --muted: #8E95A3; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
  font-feature-settings: 'cv11', 'ss01';
}
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(900px 600px at 0% -10%, var(--glow-1), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, var(--glow-2), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, var(--glow-3), transparent 60%); }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.02em; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 700; }
h4 { font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 8px; }
p { margin: 0; }
input, select, textarea {
  font: inherit; color: var(--text); background: rgba(3,6,20,.55); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 14px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
select option { background: var(--bg-2); }
textarea { resize: vertical; }
::selection { background: color-mix(in srgb, var(--primary) 45%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }
.warn { color: var(--gold-2); }
.w100 { width: 100%; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.link { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.link .ic { width: 14px; height: 14px; }

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px; line-height: 1; white-space: nowrap; position: relative;
  transition: transform .12s ease, filter .15s, background .15s, box-shadow .15s; user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; }
.btn .ic { width: 17px; height: 17px; }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15.5px; }
.btn-primary { background: var(--grad); color: var(--on-primary); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 50%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-gold { background: var(--grad-gold); color: #3A1F00; box-shadow: 0 8px 22px color-mix(in srgb, var(--gold-2) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); }
.btn-glass { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); }
.btn-glass:hover:not(:disabled) { background: var(--surface-3); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.btn-danger { background: linear-gradient(135deg, #F43F5E, #BE123C); color: #fff; box-shadow: 0 8px 20px rgba(244,63,94,.3); }
.btn-danger-ghost { border: 1px solid rgba(244,63,94,.45); color: #FDA4AF; }
.btn-danger-ghost:hover { background: rgba(244,63,94,.12); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--text-2); position: relative; transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px var(--bg); animation: pulse 1.6s infinite; }
.icon-btn.on { background: var(--surface-2); color: var(--text); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; font-style: normal; }
.chip-btn { padding: 6px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.chip-btn:hover { background: var(--surface-3); color: var(--text); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pill .ic { width: 14px; height: 14px; }
.pill.gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, transparent); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.pill.red { color: #FDA4AF; border-color: rgba(244,63,94,.4); }
.pill-live { color: #FECDD3; background: rgba(244,63,94,.16); border-color: rgba(244,63,94,.45); }
.pill-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
.pill-wait { color: var(--muted); }
.ok-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(34,197,94,.14); color: #86EFAC; font-weight: 700; border: 1px solid rgba(34,197,94,.35); }
.you-pill, .bot-pill { font-style: normal; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; letter-spacing: .04em; vertical-align: middle; }
.you-pill { background: color-mix(in srgb, var(--primary) 25%, transparent); color: color-mix(in srgb, var(--primary) 35%, #fff); }
.bot-pill { background: rgba(56,189,248,.18); color: #A5E3FF; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #86EFAC; }
.live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: ping 1.8s infinite; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(3,6,20,.5); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button small { opacity: .7; font-weight: 600; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.seg button:hover:not(.on) { color: var(--text-2); }
.seg.sm button { padding: 6px 11px; font-size: 12.5px; }
.seg .ic { width: 15px; height: 15px; }

/* ── chips & avatars ──────────────────────────────────────── */
.coin { width: 1.05em; height: 1.05em; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.chips { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips b { font-weight: 800; }
.chips.big { font-size: 26px; }
.chips.gold b { color: var(--gold); }

.av { --c: var(--primary); position: relative; display: inline-grid; place-items: center; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 70%, #fff 30%), var(--c) 60%, color-mix(in srgb, var(--c) 70%, #000 30%));
  box-shadow: inset 0 -3px 8px rgba(0,0,0,.25), 0 4px 12px rgba(0,0,0,.3); }
.av-e { line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.av-xs { width: 24px; height: 24px; font-size: 13px; }
.av-sm { width: 34px; height: 34px; font-size: 18px; }
.av-md { width: 46px; height: 46px; font-size: 24px; }
.av-lg { width: 64px; height: 64px; font-size: 34px; }
.av-xl { width: 96px; height: 96px; font-size: 52px; }
.av-lvl { position: absolute; bottom: -4px; right: -6px; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--grad-gold); color: #3A1F00; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.av-lg .av-lvl, .av-xl .av-lvl { font-size: 12px; height: 22px; min-width: 24px; border-radius: 11px; }
.av-bot { position: absolute; top: -3px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: #0EA5E9; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.av-bot .ic { width: 11px; height: 11px; color: #fff; stroke-width: 2.5; }
.av.offline { filter: grayscale(.8) opacity(.6); }
.name-tag { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 50%, transparent); transition: width .5s ease; }
.bar.sm { height: 5px; }

/* timer ring */
.ring { --p: 1; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--ring, var(--gold)) calc(var(--p) * 360deg), rgba(255,255,255,.08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); z-index: 2; }
.ring.sm { position: relative; inset: auto; display: inline-block; width: 20px; height: 20px; vertical-align: middle; --ring: var(--primary); }

/* ── layout: top bar, tab bar, page ───────────────────────── */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--top-h); background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1320px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav-link { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; font-weight: 600; color: var(--muted); transition: color .15s, background .15s; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); background: var(--surface-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.balance { display: flex; align-items: center; padding: 7px 14px 7px 10px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); font-size: 15px; }
.balance .chips b { color: #FFE3A3; }
.me-chip { display: flex; padding: 3px; border-radius: 50%; transition: transform .15s; }
.me-chip:hover { transform: scale(1.06); }
.lang-btn { font-size: 12px; font-weight: 800; padding: 7px 9px; border-radius: 10px; color: var(--muted); border: 1px solid var(--line-2); letter-spacing: .04em; }
.lang-btn:hover { color: var(--text); }
.daily-btn.ready { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); animation: wiggle 2.6s infinite; }
.room-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--grad); font-weight: 700; font-size: 13px; color: var(--on-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.room-pill .ic { width: 14px; height: 14px; }
#banners { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
.banner { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-sm); background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 22%, transparent), color-mix(in srgb, var(--accent) 14%, transparent)); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); font-weight: 600; font-size: 14px; }
.banner span { flex: 1; }
.banner.warn { background: color-mix(in srgb, var(--gold-2) 14%, transparent); border-color: color-mix(in srgb, var(--gold-2) 40%, transparent); color: #FFE0B0; }
.banner.event { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 18%, transparent), color-mix(in srgb, var(--gold-2) 12%, transparent)); border-color: color-mix(in srgb, var(--gold) 40%, transparent); color: #FFE7B3; }
.view { min-height: calc(100vh - var(--top-h)); }
.page { max-width: 1320px; margin: 0 auto; padding: 24px 20px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.page-head h1 .ic { width: 32px; height: 32px; color: var(--gold); }
.page-head p { margin-top: 6px; }
.center-page { min-height: 50vh; display: grid; place-items: center; align-content: center; gap: 16px; text-align: center; padding: 40px 20px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }
.tabbar { display: none; }
.boot { min-height: 70vh; display: grid; place-items: center; align-content: center; gap: 22px; }
.boot img { animation: bob 2s ease-in-out infinite; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 20px auto; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card + .card { margin-top: 16px; }
.card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card h3 .ic { color: var(--primary); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; gap: 12px; }
.sec-head:first-child { margin-top: 0; }
.online { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty-e { font-size: 40px; margin-bottom: 8px; }

/* ── home ─────────────────────────────────────────────────── */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: center; padding: 34px 38px; border-radius: 28px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 24%, transparent), color-mix(in srgb, var(--accent) 12%, transparent) 55%, color-mix(in srgb, var(--bg) 40%, transparent)), var(--bg-2); border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow); }
.hero-glow { position: absolute; width: 520px; height: 520px; right: -140px; top: -200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 65%); pointer-events: none; }
.hero-text { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--text); }
.eyebrow .ic { width: 14px; height: 14px; color: var(--gold); }
.hero h1 { font-size: clamp(34px, 5vw, 58px); margin: 16px 0 12px; line-height: 1.02; }
.lead { color: var(--text-2); font-size: 16.5px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin: 22px 0 24px; flex-wrap: wrap; }
.hero-level { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: rgba(3,6,20,.45); border: 1px solid var(--line); max-width: 460px; }
.lvl-info { flex: 1; min-width: 0; }
.lvl-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 7px; flex-wrap: wrap; }
.hero-art { position: relative; height: 300px; display: grid; place-items: center; }
.hero-art img { width: 100%; max-width: 420px; height: auto; animation: floaty 6s ease-in-out infinite; filter: drop-shadow(0 24px 40px rgba(0,0,0,.35)); will-change: transform; }

.perks-card { margin-top: 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--r);
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 13%, transparent), color-mix(in srgb, var(--gold-2) 6%, transparent)); border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent); }
.perks-text { flex: 1 1 260px; }
.perks-text h3 { margin-bottom: 4px; }
.perk-pills { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.perk-pills li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: rgba(3,6,20,.45); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; margin-top: 30px; }
.side-col > * + * { margin-top: 16px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; margin-bottom: 26px; }
.game-card { border-radius: 22px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s, border-color .2s; }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 0 1px color-mix(in srgb, var(--a) 40%, transparent); }
.game-card.disabled { opacity: .5; }
.gc-art { position: relative; height: 128px; background: var(--g); display: grid; place-items: center; overflow: hidden; }
.gc-art .game-art { position: relative; z-index: 1; width: 92%; height: 100%; object-fit: contain; transition: transform .3s; }
.game-card:hover .gc-art .game-art { transform: scale(1.05) rotate(-1.5deg); }
.gc-how { position: absolute; z-index: 2; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.3); color: #fff; }
.gc-how:hover { background: rgba(0,0,0,.4); }
.gc-how .ic { width: 16px; height: 16px; }
.gc-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 55%), linear-gradient(180deg, transparent 50%, rgba(0,0,0,.2)); }
.gc-emoji { font-size: 58px; position: relative; z-index: 1; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); transition: transform .3s; }
.game-card:hover .gc-emoji { transform: scale(1.1) rotate(-6deg); }
.gc-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gc-status { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(8, 12, 36, .7); color: #fff; font-size: 11.5px; font-weight: 700; }
.gc-status.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: ping 1.8s infinite; }
.gc-head h3 { font-size: 18px; }
.gc-body p { color: var(--muted); font-size: 13.5px; flex: 1; }
.gc-actions { display: flex; gap: 8px; margin-top: 4px; }
.gc-actions .btn { flex: 1; }

.tables { display: flex; flex-direction: column; gap: 8px; }
.table-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tr-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; font-weight: 800; }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-players { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }
.tr-players span { display: inline-flex; align-items: center; gap: 3px; }
.tr-players .ic { width: 14px; height: 14px; }
.tr-act { display: flex; gap: 6px; }
.missions { display: flex; flex-direction: column; gap: 10px; }
.mission { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 14px; background: rgba(3,6,20,.4); border: 1px solid var(--line); }
.mission.done:not(.claimed) { border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 7%, transparent); }
.mission.claimed { opacity: .6; }
.m-ic { font-size: 22px; width: 32px; text-align: center; }
.m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.m-reward { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; }
.m-reward small { color: var(--muted); }
.m-claimed { color: var(--green); }
.refill { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.refill h3 { margin-bottom: 4px; }
.tour-mini { display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 14px; transition: background .15s; }
.tour-mini:hover { background: var(--surface-2); }
.feed { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow: auto; }
.feed-item { display: flex; align-items: center; gap: 9px; padding: 7px 4px; font-size: 13px; animation: slideIn .4s ease; }
.feed-item > span { flex: 1; min-width: 0; }
.feed-item time { font-size: 11.5px; white-space: nowrap; }
.feed-ic { width: 24px; text-align: center; }

/* ── play modal ───────────────────────────────────────────── */
.play-modal { display: flex; flex-direction: column; gap: 12px; }
.pm-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--g); margin: -6px -6px 4px; position: relative; overflow: hidden; }
.pm-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.15), transparent); }
.pm-head > * { position: relative; z-index: 1; }
.pm-emoji { font-size: 44px; }
.pm-art { width: 104px; height: 64px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }
.pm-how { margin-left: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.22); white-space: nowrap; }
.pm-how .ic { width: 14px; height: 14px; }
.pm-head p { opacity: .9; font-size: 14px; margin-top: 3px; }
.play-modal h4 { margin: 6px 0 0; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tier { padding: 13px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; text-align: left; transition: border-color .15s, background .15s, transform .12s; }
.tier:hover:not(:disabled) { background: var(--surface-2); }
.tier.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.tier.locked { opacity: .4; }
.tier b { font-size: 15px; }
.tier span { color: var(--gold); font-weight: 800; font-size: 14px; }
.tier small { color: var(--muted); font-size: 12px; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(3,6,20,.5); border: 1px solid var(--line-2); }
.stepper button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.stepper button:hover { background: var(--surface-3); }
.stepper b { min-width: 34px; text-align: center; font-size: 17px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); padding: 0; border: 0; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 60%, transparent), 0 4px 10px rgba(0,0,0,.4); cursor: grab; }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--primary); cursor: grab; }
.range:focus { box-shadow: none; }

/* ── modal, forms, toasts ─────────────────────────────────── */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(5,6,18,.74); display: grid; place-items: center; padding: 18px; animation: fadeIn .18s ease; overflow-y: auto; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--modal-bg); border: 1px solid var(--line-2); border-radius: 24px; padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: popIn .22s cubic-bezier(.2,1.3,.4,1); }
.modal-sm { width: min(420px, 100%); }
.modal-md { width: min(620px, 100%); }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.auth { display: flex; flex-direction: column; align-items: stretch; gap: 14px; text-align: center; }
.auth-logo { margin: 0 auto; }
.auth .seg { align-self: center; }
.perks { list-style: none; margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); text-align: left; display: grid; gap: 7px; font-size: 14px; }
.perks li { display: flex; align-items: center; gap: 9px; }
.form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.form label small { font-weight: 500; }
.form-err { color: #FDA4AF; font-size: 13.5px; font-weight: 600; text-align: center; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-input { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; }
.switch { width: 46px; height: 26px; border-radius: 99px; background: rgba(255,255,255,.14); position: relative; transition: background .2s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch.on { background: var(--grad); }
.switch.on i { transform: translateX(20px); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-row > span { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 14px; }
.set-row small { font-weight: 500; font-size: 12px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.chk input { width: 18px; height: 18px; accent-color: var(--primary); }

.toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 13px 12px 13px 16px; border-radius: 16px; background: rgba(28,22,64,.96); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0,0,0,.5); animation: toastIn .3s cubic-bezier(.2,1.2,.4,1); }
.toast-ic { font-size: 26px; }
.toast-body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.toast-body b { font-size: 14.5px; }
.toast-success { border-color: rgba(34,197,94,.5); box-shadow: 0 14px 40px rgba(0,0,0,.5), inset 3px 0 0 var(--green); }
.toast-error { border-color: rgba(244,63,94,.5); box-shadow: 0 14px 40px rgba(0,0,0,.5), inset 3px 0 0 var(--red); }
.toast-warn { border-color: color-mix(in srgb, var(--gold-2) 50%, transparent); box-shadow: 0 14px 40px rgba(0,0,0,.5), inset 3px 0 0 var(--gold-2); }
.toast-info { box-shadow: 0 14px 40px rgba(0,0,0,.5), inset 3px 0 0 var(--primary); }

/* daily wheel */
.daily { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.streak { display: flex; gap: 6px; margin-top: 4px; }
.st { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.st.on { background: var(--grad-gold); color: #3A1F00; box-shadow: 0 4px 12px color-mix(in srgb, var(--gold-2) 35%, transparent); }
.wheel-wrap { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: 10px 0; }
.wheel-rot { width: 100%; height: 100%; transition: transform 4.2s cubic-bezier(.12,.8,.18,1); filter: drop-shadow(0 16px 30px rgba(0,0,0,.5)); }
.wheel-svg { width: 100%; height: 100%; }
.wheel-txt { font: 800 15px var(--font); fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.25); stroke-width: 2px; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 2; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 26px solid var(--gold); filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.wheel-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70px; height: 70px; border-radius: 50%; background: var(--grad-gold); color: #3A1F00; font-weight: 900; font-size: 15px; box-shadow: 0 0 0 5px var(--bg), 0 8px 20px rgba(0,0,0,.4); display: grid; place-items: center; z-index: 3; }
.wheel-btn:disabled { opacity: 1; filter: grayscale(.4); }
.daily-win { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: popIn .4s cubic-bezier(.2,1.4,.4,1); }
.daily-win small { color: var(--muted); }

/* confetti, emotes */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
.float-emote { position: absolute; left: 50%; top: 0; font-size: 34px; transform: translateX(-50%); animation: emoteUp 2.1s ease-out forwards; pointer-events: none; z-index: 20; }
.shout { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); padding: 7px 12px; border-radius: 12px; background: var(--grad-gold); color: #3A1F00; font-weight: 900; font-size: 13px; white-space: nowrap; animation: popIn .3s cubic-bezier(.2,1.4,.4,1), fadeOut .4s 2.2s forwards; z-index: 21; box-shadow: 0 8px 20px rgba(0,0,0,.4); }

/* ── tables & lists ───────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th.right, .tbl td.right { text-align: right; }
.tbl tr.me td { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.tbl .rk { width: 44px; font-weight: 800; color: var(--muted); text-align: center; }
.lb-user { display: inline-flex; align-items: center; gap: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0 0 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }

/* ── room shell ───────────────────────────────────────────── */
.room { display: flex; flex-direction: column; min-height: calc(100vh - var(--top-h)); }
.room-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 50%, transparent); }
.rh-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.rh-title > div { display: flex; flex-direction: column; min-width: 0; }
.rh-title b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-title .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; flex: none; }
.rh-right { display: flex; align-items: center; gap: 6px; }
.code-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 15%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); font-weight: 800; letter-spacing: .12em; font-size: 13px; color: #E2D7FF; }
.code-btn .ic { width: 14px; height: 14px; }
.side-toggle { display: none; }
.room-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.room-main { position: relative; padding: 16px; min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.room-side { border-left: 1px solid var(--line); background: rgba(10,7,26,.4); display: flex; flex-direction: column; gap: 10px; padding: 12px; height: calc(100vh - var(--top-h) - 61px); position: sticky; top: calc(var(--top-h)); }
.room-side .seg { align-self: stretch; }
.room-side .seg button { flex: 1; justify-content: center; }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; min-height: 120px; }
.chat-msg { font-size: 13.5px; padding: 7px 10px; border-radius: 12px; background: var(--surface); max-width: 92%; word-wrap: break-word; animation: slideIn .25s ease; }
.chat-msg b { display: block; font-size: 12px; color: var(--primary); margin-bottom: 1px; }
.chat-msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--primary) 20%, transparent); }
.chat-msg.mine b { color: #E2D7FF; }
.chat-sys { font-size: 12px; color: var(--muted); text-align: center; padding: 2px 0; }
.emote-bar { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.emote-bar button { font-size: 19px; width: 34px; height: 34px; border-radius: 10px; transition: transform .1s, background .1s; }
.emote-bar button:hover { background: var(--surface-2); transform: scale(1.18); }
.chat-form { display: flex; gap: 6px; }
.chat-form input { padding: 10px 12px; border-radius: 12px; }
.people { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface); }
.p-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* lobby / results for match games */
.lobby-panel { max-width: 860px; width: 100%; margin: 10px auto; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.lobby-title { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lt-emoji { font-size: 54px; animation: bob 2.6s ease-in-out infinite; }
.seats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; width: 100%; }
.seat-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); animation: popIn .3s ease; }
.seat-card.empty { border-style: dashed; background: transparent; justify-content: center; min-height: 150px; }
.seat-plus { width: 46px; height: 46px; border-radius: 50%; border: 2px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); }
.seat-x { position: absolute; top: 6px; right: 6px; }
.invite { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; font-weight: 600; color: var(--text-2); }
.invite > span { display: inline-flex; align-items: center; gap: 6px; }
.invite-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(3,6,20,.55); border: 1px solid var(--line-2); max-width: 100%; }
.invite-box code { font-size: 13px; color: #E2D7FF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-ctrl { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); width: 100%; }
.host-ctrl h4 { margin: 0 0 6px; }
.results { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.results h2 { font-size: 28px; }
.podium { list-style: none; padding: 0; margin: 4px 0 0; width: min(460px, 100%); display: flex; flex-direction: column; gap: 6px; }
.podium li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--surface); text-align: left; }
.podium li b { flex: 1; }
.podium li.first { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 20%, transparent), color-mix(in srgb, var(--gold-2) 6%, transparent)); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.podium li.me { box-shadow: inset 0 0 0 1.5px var(--primary); }
.podium .place { font-size: 22px; width: 32px; text-align: center; font-weight: 800; }
.result-overlay { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8,8,24,.78); padding: 16px; animation: fadeIn .3s; }
.ro-card { width: min(640px, 100%); max-height: 100%; overflow: auto; padding: 22px; border-radius: 24px; background: var(--modal-bg); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.ro-card .lobby-panel { margin: 0; }

/* action bar (shared by games) */
.action-bar { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; padding: 14px 16px; border-radius: 20px; background: rgba(16,18,44,.95); border: 1px solid var(--line-2); box-shadow: 0 -6px 30px rgba(0,0,0,.25); position: sticky; bottom: 10px; z-index: 10; }
.action-bar.active { border-color: color-mix(in srgb, var(--primary) 50%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 25%, transparent), 0 -6px 30px rgba(0,0,0,.3); }
.ab-main { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.ab-raise { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 640px; }
.ab-raise .range { flex: 1 1 200px; }
.my-hand { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); color: #FFE3A3; font-weight: 800; font-size: 13px; }
.bet-line { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bet-line > span { display: inline-flex; align-items: center; gap: 6px; }
.bet-now { font-size: 18px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.bet-chip { --cc: var(--primary); width: 54px; height: 54px; border-radius: 50%; position: relative; font-weight: 900; font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5);
  background: radial-gradient(circle, var(--cc) 54%, transparent 55%), repeating-conic-gradient(#fff 0 15deg, var(--cc) 15deg 45deg);
  box-shadow: 0 0 0 3px var(--cc), 0 6px 14px rgba(0,0,0,.4); transition: transform .12s; }
.bet-chip::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.55); }
.bet-chip:hover:not(:disabled) { transform: translateY(-3px); }
.bet-chip.sel { transform: translateY(-5px); box-shadow: 0 0 0 3px var(--cc), 0 0 0 7px rgba(255,255,255,.7), 0 10px 18px rgba(0,0,0,.4); }
.bet-chip:disabled { opacity: .45; }
.cc0 { --cc: #6366F1; } .cc1 { --cc: #EC4899; } .cc2 { --cc: #F59E0B; } .cc3 { --cc: #10B981; } .cc4 { --cc: #0EA5E9; } .cc5 { --cc: #1F2937; }
.your-turn { color: var(--gold); font-size: 16px; animation: pulse 1.2s infinite; }
.table-info { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; flex-wrap: wrap; }

/* ── playing cards ────────────────────────────────────────── */
.pc { --w: 52px; width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .13); background: linear-gradient(160deg, #fff 0%, #F1EEF9 100%); color: #16193A; position: relative; flex: none;
  box-shadow: 0 6px 14px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.06); animation: deal .35s cubic-bezier(.2,1.1,.4,1); transition: transform .2s, box-shadow .2s, opacity .2s; }
.pc.red { color: #E11D48; }
.pc.sm { --w: 36px; }
.pc.md { --w: 52px; }
.pc.lg { --w: 70px; }
.pc-r { position: absolute; top: 3%; left: 8%; font-weight: 800; font-size: calc(var(--w) * .34); line-height: 1; letter-spacing: -.04em; }
.pc-s { position: absolute; top: 30%; left: 8%; width: calc(var(--w) * .26); height: calc(var(--w) * .26); }
.pc-big { position: absolute; right: 8%; bottom: 7%; width: calc(var(--w) * .52); height: calc(var(--w) * .52); opacity: .95; }
.pc.back { background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 50%), repeating-linear-gradient(45deg, rgba(255,255,255,.09) 0 4px, transparent 4px 9px), var(--grad); box-shadow: 0 6px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.55), inset 0 0 0 4px rgba(14,20,48,.45); }
.pc-logo { position: absolute; left: 50%; top: 50%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: url(/assets/logo-mark.svg) 50% 55% / 74% no-repeat, rgba(14,20,48,.85); box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.pc.slot { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); animation: none; }
.pc.glow { box-shadow: 0 0 0 3px var(--gold), 0 0 22px color-mix(in srgb, var(--gold) 70%, transparent), 0 6px 14px rgba(0,0,0,.35); transform: translateY(-4px); }
.pc.dim { opacity: .45; }

/* ── felt themes ──────────────────────────────────────────── */
.theme-emerald { --felt1: #10875a; --felt2: #06402c; }
.theme-ocean { --felt1: #1170b8; --felt2: #08355e; }
.theme-royal { --felt1: #6747df; --felt2: #2a1a73; }
.theme-crimson { --felt1: #b3243f; --felt2: #560c1d; }
.theme-midnight { --felt1: #2b2f4a; --felt2: #0c0e1a; }
.theme-gold { --felt1: #a77d1b; --felt2: #4a3608; }

/* ── poker ────────────────────────────────────────────────── */
.pk-wrap { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pk-table { position: relative; width: min(100%, 1040px, calc((100vh - 330px) * 1.7)); margin: 0 auto; aspect-ratio: 16 / 9.4; min-height: 380px; }
.felt { position: absolute; inset: 9% 7% 11%; border-radius: 999px; background: radial-gradient(ellipse at 50% 40%, var(--felt1) 0%, var(--felt2) 100%);
  box-shadow: 0 0 0 12px var(--rail), 0 0 0 14px #5b3a1d, 0 0 0 16px rgba(255,255,255,.06), inset 0 0 60px rgba(0,0,0,.45), 0 30px 60px rgba(0,0,0,.5); }
.felt::before { content: ''; position: absolute; inset: 7%; border-radius: 999px; border: 2px solid rgba(255,255,255,.08); }
.felt-logo { position: absolute; left: 50%; top: 70%; width: 140px; height: 40px; transform: translate(-50%, -50%); background: url(/assets/logo.svg) center / contain no-repeat; opacity: .14; }
.pk-center { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; width: 80%; }
.board { display: flex; gap: 6px; }
.pot { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.35); font-size: 15px; border: 1px solid rgba(255,255,255,.12); }
.win-banner { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 14px; border-radius: 14px; background: rgba(0,0,0,.45); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); font-size: 13.5px; animation: popIn .35s cubic-bezier(.2,1.4,.4,1); text-align: center; }
.idle-msg { color: rgba(255,255,255,.7); font-weight: 600; font-size: 14px; }
.pk-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 3; transition: opacity .3s; }
.pk-seat.out .pk-plate, .pk-seat.folded .pk-plate { opacity: .55; }
.pk-seat.folded .pk-cards { opacity: .3; filter: grayscale(.6); }
.pk-seat.away .pk-plate { filter: grayscale(.7); }
.pk-cards { display: flex; gap: 3px; height: 50px; align-items: flex-end; }
.pk-seat.you .pk-cards { height: 72px; }
.pk-cards .pc:nth-child(1) { transform: rotate(-5deg); }
.pk-cards .pc:nth-child(2) { transform: rotate(5deg); margin-left: -8px; }
.pk-cards .pc.glow:nth-child(1) { transform: rotate(-5deg) translateY(-6px); }
.pk-cards .pc.glow:nth-child(2) { transform: rotate(5deg) translateY(-6px); }
.pk-plate { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(12,9,30,.88); border: 1px solid var(--line-2); box-shadow: 0 8px 20px rgba(0,0,0,.45); min-width: 130px; }
.pk-seat.acting .pk-plate { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 40%, transparent), 0 0 24px color-mix(in srgb, var(--gold) 35%, transparent); }
.pk-seat.winner .pk-plate { border-color: var(--green); box-shadow: 0 0 0 2px rgba(34,197,94,.45), 0 0 26px rgba(34,197,94,.45); }
.pk-av { position: relative; }
.pk-info { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pk-name { font-size: 13px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-stack { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: #FFE3A3; font-variant-numeric: tabular-nums; }
.dealer-btn { position: absolute; right: -10px; top: -8px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #111; font-size: 11px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.pk-act { position: absolute; bottom: -12px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; background: #334155; color: #fff; text-transform: uppercase; letter-spacing: .04em; animation: popIn .25s ease; z-index: 4; }
.a-fold { background: #64748B; } .a-check { background: #0EA5E9; } .a-call { background: #10B981; } .a-bet, .a-raise { background: #F59E0B; color: #2b1700; }
.a-allin { background: linear-gradient(90deg, #F43F5E, var(--accent)); } .a-sb, .a-bb { background: #475569; } .a-out { background: #374151; color: #cbd5e1; }
.pk-hand { position: absolute; top: -18px; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 95%, transparent); color: #3A1F00; font-size: 11px; font-weight: 800; white-space: nowrap; z-index: 5; }
.pk-win { position: absolute; top: 40%; font-size: 18px; font-weight: 900; color: #86EFAC; text-shadow: 0 2px 8px rgba(0,0,0,.7); animation: emoteUp 2.6s ease-out forwards; z-index: 6; }
.pk-bet { --dx: 0; --dy: -1; position: absolute; left: 50%; top: 50%; transform: translate(calc(-50% + var(--dx) * 95px), calc(-50% + var(--dy) * 78px)); display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 99px; background: rgba(0,0,0,.45); font-size: 12.5px; font-weight: 800; white-space: nowrap; animation: popIn .25s ease; z-index: 2; }
.pk-seat.empty { z-index: 1; }
.sit-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 78px; height: 78px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.3); justify-content: center; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.8); background: rgba(0,0,0,.25); transition: background .15s, border-color .15s; }
.sit-btn:hover { background: color-mix(in srgb, var(--primary) 30%, transparent); border-color: var(--primary); }
.seat-empty { width: 56px; height: 56px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.12); display: block; }
.buy-amt { display: flex; justify-content: center; }

/* ── blackjack ────────────────────────────────────────────── */
.bj-wrap { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bj-table { position: relative; width: min(100%, 1000px, calc((100vh - 360px) * 1.82)); margin: 0 auto; aspect-ratio: 16 / 8.8; min-height: 380px; }
.bj-felt { position: absolute; inset: 0 2% 3%; border-radius: 0 0 50% 50% / 0 0 72% 72%; background: radial-gradient(ellipse at 50% 0%, var(--felt1), var(--felt2) 85%);
  box-shadow: inset 0 0 70px rgba(0,0,0,.45), 0 0 0 12px var(--rail), 0 0 0 14px #5b3a1d, 0 30px 60px rgba(0,0,0,.45); overflow: visible; }
.bj-arc { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font-size: 11px; font-weight: 800; letter-spacing: .2em; color: rgba(255,255,255,.28); white-space: nowrap; }
.bj-dealer { position: absolute; left: 50%; top: 6%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bj-cards { display: flex; }
.bj-cards .pc + .pc { margin-left: -18px; }
.bj-cards.dealer .pc + .pc { margin-left: -14px; }
.dealer-label { font-size: 11px; font-weight: 800; letter-spacing: .15em; color: rgba(255,255,255,.5); text-transform: uppercase; }
.bj-shoe { position: absolute; right: 7%; top: 7%; width: 62px; height: 46px; border-radius: 8px; background: linear-gradient(135deg, #3b2412, #20130a); box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 6px 14px rgba(0,0,0,.4); }
.bj-shoe::after { content: ''; position: absolute; left: 8px; top: 8px; right: 8px; bottom: 8px; border-radius: 4px; background: var(--grad); opacity: .7; }
.bj-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 3; }
.bj-seat.empty .seat-ring { width: 62px; height: 62px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.18); display: block; }
.bj-hands { display: flex; gap: 10px; min-height: 52px; align-items: flex-end; }
.bj-hand { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px; border-radius: 12px; transition: box-shadow .2s; }
.bj-hand.cur { box-shadow: 0 0 0 2px var(--gold), 0 0 18px color-mix(in srgb, var(--gold) 40%, transparent); }
.bj-total { position: absolute; top: -10px; right: -12px; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 11px; background: #111827; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); z-index: 3; }
.bj-total.big { position: static; height: 26px; font-size: 14px; }
.bj-res { position: absolute; bottom: -10px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 900; text-transform: uppercase; white-space: nowrap; animation: popIn .3s ease; z-index: 3; }
.bj-res.r-win, .bj-res.r-blackjack { background: var(--green); color: #052e16; }
.bj-res.r-blackjack { background: var(--grad-gold); color: #3A1F00; }
.bj-res.r-push { background: #64748B; color: #fff; }
.bj-res.r-bust, .bj-res.r-lose { background: var(--red); color: #fff; }
.bj-x2 { position: absolute; top: -10px; left: -8px; font-size: 11px; font-weight: 900; padding: 1px 5px; border-radius: 6px; background: var(--gold); color: #3A1F00; }
.bj-bet { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 99px; background: rgba(0,0,0,.4); font-size: 12.5px; font-weight: 800; }
.bj-plate { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(12,9,30,.85); border: 1px solid var(--line-2); font-size: 12.5px; max-width: 150px; }
.bj-plate b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bj-plate .ring { inset: auto; left: -1px; top: -1px; width: 36px; height: 36px; }
.bj-seat.you .bj-plate { border-color: color-mix(in srgb, var(--primary) 60%, transparent); }
.bj-seat.acting .bj-plate { border-color: var(--gold); }
.bj-net { font-weight: 900; font-size: 14px; animation: emoteUp 2.8s ease-out forwards; position: absolute; top: -30px; }
.bj-net.pos { color: #86EFAC; } .bj-net.neg { color: #FDA4AF; }

/* ── roulette ─────────────────────────────────────────────── */
.rl-wrap { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.rl-top { display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap; }
.rl-wheel-box { position: relative; width: 270px; height: 270px; flex: none; }
.rl-wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 6px #4a3110, 0 0 0 8px #c99a3e; }
.rl-wheel-svg { width: 100%; height: 100%; }
.rl-num { font: 800 10px var(--font); fill: #fff; }
.rl-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 2; width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--gold); filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.rl-result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: #fff; box-shadow: 0 0 0 4px var(--gold), 0 10px 30px rgba(0,0,0,.6); animation: popIn .4s cubic-bezier(.2,1.5,.4,1); z-index: 3; }
.rl-result.red, .num-badge.red { background: #d1202f; } .rl-result.black, .num-badge.black { background: #16141f; } .rl-result.green, .num-badge.green { background: #0f9b58; }
.rl-side { display: flex; flex-direction: column; gap: 12px; min-width: 260px; max-width: 420px; flex: 1; }
.rl-status { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.pulse { animation: pulse 1s infinite; color: var(--gold); }
.rl-history { display: flex; gap: 5px; flex-wrap: wrap; }
.num-badge { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; color: #fff; font-weight: 800; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.num-badge.latest { box-shadow: 0 0 0 2px var(--gold); animation: popIn .3s ease; }
.rl-winners { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.rl-winners span { display: flex; justify-content: space-between; gap: 10px; }
.rl-players { display: flex; flex-wrap: wrap; gap: 6px; }
.rl-p { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 99px; background: var(--surface); font-size: 12px; }
.rl-p i { font-style: normal; color: var(--gold); font-weight: 800; }
.rl-p em { font-style: normal; font-weight: 800; }
.rl-p em.pos { color: #86EFAC; } .rl-p em.neg { color: #FDA4AF; }
.rl-board-wrap { overflow-x: auto; padding-bottom: 4px; }
.rl-board { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto auto; gap: 4px; min-width: 720px; max-width: 1000px; margin: 0 auto; padding: 12px; border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, var(--felt1), var(--felt2)); box-shadow: 0 0 0 8px var(--rail), 0 20px 40px rgba(0,0,0,.4); }
.rl-board > .zero { grid-row: 1; grid-column: 1; }
.rl-nums { grid-column: 2; display: flex; flex-direction: column; gap: 4px; }
.rl-row { display: grid; grid-template-columns: repeat(12, 1fr) 46px; gap: 4px; }
.rl-dozens { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr) 46px; gap: 4px; }
.rl-dozens::after { content: ''; }
.rl-outside { grid-column: 2; display: grid; grid-template-columns: repeat(6, 1fr) 46px; gap: 4px; }
.rl-outside::after { content: ''; }
.rl-cell { position: relative; min-height: 44px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; transition: transform .1s, box-shadow .15s, filter .15s; }
.rl-cell:hover { filter: brightness(1.2); transform: translateY(-1px); }
.rl-cell.red { background: #c81e2c; } .rl-cell.black { background: #1b1924; } .rl-cell.green { background: #0f9b58; }
.rl-cell.zero { height: 100%; min-height: 140px; }
.rl-cell.col, .rl-cell.out { background: rgba(0,0,0,.18); font-size: 13px; }
.rl-cell.win { box-shadow: 0 0 0 3px var(--gold), 0 0 18px color-mix(in srgb, var(--gold) 80%, transparent); z-index: 1; }
.rl-chip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 30px; height: 30px; padding: 0 4px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 900; background: radial-gradient(circle, var(--primary) 55%, transparent 56%), repeating-conic-gradient(#fff 0 15deg, var(--primary) 15deg 45deg); box-shadow: 0 0 0 2px var(--primary), 0 4px 8px rgba(0,0,0,.5); animation: popIn .2s ease; }
.rl-board-v { display: grid; grid-template-columns: 34px repeat(3, minmax(0, 1fr)) 46px; grid-template-rows: 42px repeat(12, 34px) 36px; gap: 3px; padding: 10px; margin: 6px 4px 4px; border-radius: 16px; background: radial-gradient(ellipse at 50% 30%, var(--felt1), var(--felt2)); box-shadow: 0 0 0 6px var(--rail), 0 14px 30px rgba(0,0,0,.4); }
.rl-board-v .rl-cell { min-height: 0; font-size: 13.5px; border-radius: 7px; }
.rl-board-v .rl-cell.zero { min-height: 0; height: auto; }
.rl-board-v .rl-cell.out, .rl-board-v .rl-cell.col { font-size: 11.5px; }
.rl-board-v .vtext > span:first-child { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.rl-board-v .rl-chip { min-width: 26px; height: 26px; font-size: 9.5px; }
.rl-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.diamond { display: block; width: 20px; height: 20px; transform: rotate(45deg); border-radius: 3px; }
.diamond.red { background: #e02233; } .diamond.black { background: #111; box-shadow: 0 0 0 1px rgba(255,255,255,.4); }

/* ── chroma ───────────────────────────────────────────────── */
.ch-wrap { display: flex; flex-direction: column; gap: 10px; flex: 1; --cr: #FF4D6D; --cy: #FFB020; --cg: #22C55E; --cb: #3B82F6; }
.ch-opps { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding-top: 6px; }
.ch-opp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 16px; transition: background .2s; min-width: 120px; }
.ch-opp.acting { background: color-mix(in srgb, var(--gold) 8%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 50%, transparent); }
.ch-opp.left { opacity: .4; }
.ch-fan { position: relative; height: 46px; width: 110px; }
.ch-back { --i: 0; --n: 1; position: absolute; left: 50%; bottom: 0; width: 30px; height: 44px; border-radius: 6px; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.3), transparent 50%), linear-gradient(135deg, var(--bg-3), color-mix(in srgb, var(--primary) 55%, var(--bg-3))); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 3px 8px rgba(0,0,0,.4);
  transform-origin: 50% 160%; transform: translateX(-50%) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 7deg)); }
.ch-back::after { content: ''; position: absolute; inset: 8px 5px; border-radius: 50%; background: conic-gradient(var(--cr) 0 25%, var(--cy) 0 50%, var(--cg) 0 75%, var(--cb) 0); opacity: .9; transform: rotate(-20deg); }
.ch-plate { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: rgba(12,9,30,.85); border: 1px solid var(--line-2); font-size: 13px; }
.ch-plate > div { display: flex; flex-direction: column; line-height: 1.15; }
.ch-plate .ring { inset: auto; left: -1px; top: -1px; width: 36px; height: 36px; }
.ch-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.ch-count.one { color: #FDA4AF; font-weight: 800; }
.ch-last { position: absolute; top: -4px; right: 0; padding: 2px 7px; border-radius: 8px; background: var(--grad-gold); color: #3A1F00; font-size: 10px; font-weight: 900; }
.ch-center { position: relative; display: flex; align-items: center; justify-content: center; gap: 34px; padding: 26px 10px; margin: 6px auto; width: min(560px, 100%); border-radius: 50%; }
.ch-center::before { content: ''; position: absolute; inset: 0; border-radius: 40px; background: radial-gradient(ellipse, rgba(255,255,255,.05), transparent 70%); }
.ch-dir { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.09); animation: spin 18s linear infinite; pointer-events: none; }
.ch-dir.ccw { animation-direction: reverse; }
.ch-dir svg { position: absolute; top: -13px; left: 50%; width: 24px; height: 24px; margin-left: -12px; color: rgba(255,255,255,.25); background: var(--bg); border-radius: 50%; }
.ch-dir.ccw svg { transform: scaleX(-1); }
.ch-pile { position: relative; width: 84px; height: 120px; }
.ch-pile .ch-back.big { width: 84px; height: 120px; border-radius: 12px; transform: none; left: 0; bottom: 0; }
.ch-pile .off1 { transform: translate(-3px, -3px) !important; } .ch-pile .off2 { transform: translate(-6px, -6px) !important; }
.ch-pile:not(:disabled):hover .off2 { transform: translate(-6px, -12px) !important; }
.ch-pile:not(:disabled) { cursor: pointer; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gold) 40%, transparent)); }
.ch-pile-n { position: absolute; bottom: -24px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); }
.ch-discard { position: relative; border-radius: 14px; transition: box-shadow .3s; }
.ch-discard .ch-card { width: 84px; height: 120px; }
.glow-r { box-shadow: 0 0 40px 6px color-mix(in srgb, var(--cr) 50%, transparent); }
.glow-y { box-shadow: 0 0 40px 6px color-mix(in srgb, var(--cy) 50%, transparent); }
.glow-g { box-shadow: 0 0 40px 6px color-mix(in srgb, var(--cg) 50%, transparent); }
.glow-b { box-shadow: 0 0 40px 6px color-mix(in srgb, var(--cb) 50%, transparent); }
.ch-chosen { position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; color: #fff; white-space: nowrap; }
.ch-turn { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.ch-card { --cc: #888; position: relative; width: 70px; height: 102px; border-radius: 11px; background: var(--cc); color: #fff; flex: none;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.9), 0 6px 14px rgba(0,0,0,.35); display: grid; place-items: center; animation: deal .3s cubic-bezier(.2,1.1,.4,1); }
.ch-card.c-r { --cc: var(--cr); } .ch-card.c-y { --cc: var(--cy); } .ch-card.c-g { --cc: var(--cg); } .ch-card.c-b { --cc: var(--cb); }
.ch-card.c-w { --cc: #18122E; }
.ch-oval { width: 74%; height: 62%; border-radius: 50%; background: rgba(255,255,255,.95); transform: rotate(-24deg); display: grid; place-items: center; }
.ch-mid { transform: rotate(24deg); font-size: 30px; font-weight: 900; color: var(--cc); line-height: 1; display: grid; place-items: center; text-shadow: none; }
.ch-card.c-w .ch-oval { background: #fff; }
.ch-mid svg { width: 30px; height: 30px; }
.ch-corner { position: absolute; font-size: 13px; font-weight: 900; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.ch-corner svg { width: 13px; height: 13px; }
.ch-corner.tl { top: 7px; left: 8px; }
.ch-corner.br { bottom: 7px; right: 8px; transform: rotate(180deg); }
.wild-dot { display: grid; grid-template-columns: 1fr 1fr; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; transform: rotate(45deg); }
.wild-dot i { display: block; }
.wild-dot .r { background: var(--cr); } .wild-dot .y { background: var(--cy); } .wild-dot .g { background: var(--cb); } .wild-dot .b { background: var(--cg); }
.w4 { position: absolute; font-size: 14px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.ch-card.small { width: 26px; height: 36px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.9); display: inline-grid; vertical-align: middle; animation: none; }
.ch-card.small .ch-corner { display: none; }
.ch-card.small .ch-oval { width: 100%; height: 100%; background: transparent; transform: none; }
.ch-card.small .ch-mid { font-size: 13px; color: #fff; transform: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ch-card.small.c-w .ch-oval { background: transparent; }
.ch-card.small .ch-mid svg { width: 11px; height: 11px; }
.ch-card.small .wild-dot { width: 13px; height: 13px; }
.ch-card.small .w4 { font-size: 8px; }
.ch-log { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); min-height: 66px; justify-content: flex-end; }
.ch-log span { display: inline-flex; align-items: center; gap: 5px; animation: slideIn .3s ease; }
.dot-c { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-c.c-r, .ch-chosen.c-r, .chp.c-r { background: var(--cr); } .dot-c.c-y, .ch-chosen.c-y, .chp.c-y { background: var(--cy); }
.dot-c.c-g, .ch-chosen.c-g, .chp.c-g { background: var(--cg); } .dot-c.c-b, .ch-chosen.c-b, .chp.c-b { background: var(--cb); }
.ch-me { margin-top: auto; position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; border-radius: 22px; background: rgba(16,12,40,.6); border: 1px solid var(--line); }
.ch-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; min-height: 42px; }
.ch-hand { --n: 7; display: flex; justify-content: center; padding: 18px 10px 4px; max-width: 100%; overflow-x: auto; }
.ch-hand { --cw: 70px; --avail: min(100vw - 60px, 880px); }
.ch-slot { --i: 0; margin-left: calc(min(var(--cw) - 6px, (var(--avail) - var(--cw)) / max(var(--n) - 1, 1)) - var(--cw)); transition: transform .15s; }
.ch-slot:first-child { margin-left: 0; }
.ch-hand .ch-card { cursor: default; }
.ch-hand .ch-card.playable { cursor: pointer; }
.ch-hand.my-turn .ch-card:not(.playable) { filter: brightness(.55) saturate(.6); }
.ch-hand.my-turn .ch-card.playable { transform: translateY(-12px); box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--gold), 0 12px 24px rgba(0,0,0,.45); }
.ch-hand .ch-card.playable:hover { transform: translateY(-22px) scale(1.05); }
.color-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chp { height: 70px; border-radius: 16px; font-weight: 800; color: #fff; font-size: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .12s; }
.chp:hover { transform: scale(1.04); }

/* ── dice ─────────────────────────────────────────────────── */
.die { width: 34px; height: 34px; flex: none; }
.die rect { fill: #fff; stroke: rgba(0,0,0,.15); stroke-width: 2; }
.die circle { fill: #16193A; }
.die.hl rect { fill: var(--gold); }
.die.xs { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
.die.sm { width: 26px; height: 26px; }
.die.md { width: 40px; height: 40px; }
.die.lg { width: 52px; height: 52px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.dc-wrap { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.dc-table { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 18px; border-radius: 28px; background: radial-gradient(ellipse at 50% 40%, var(--felt1), var(--felt2)); box-shadow: 0 0 0 10px var(--rail), inset 0 0 60px rgba(0,0,0,.4), 0 30px 60px rgba(0,0,0,.4); margin: 8px; }
.dc-players { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.dc-player { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 18px; background: rgba(0,0,0,.22); min-width: 128px; transition: background .2s, box-shadow .2s; }
.dc-player.acting { background: color-mix(in srgb, var(--gold) 12%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 60%, transparent); }
.dc-player.out { opacity: .4; }
.dc-player.you { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 70%, transparent); }
.dc-player.loser { animation: shake .5s ease 2; }
.dc-plate { position: relative; }
.dc-dice { display: flex; gap: 4px; min-height: 26px; flex-wrap: wrap; justify-content: center; max-width: 160px; }
.die-hidden { width: 22px; height: 22px; border-radius: 6px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 12px; font-weight: 900; color: rgba(255,255,255,.65); }
.dc-bubble { position: absolute; top: -14px; right: -6px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 12px; background: #fff; color: #16193A; font-weight: 900; font-size: 13px; box-shadow: 0 6px 14px rgba(0,0,0,.35); animation: popIn .25s ease; }
.dc-center { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; margin-bottom: auto; text-align: center; }
.dc-bid { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; }
.dc-bid.big { font-size: 40px; animation: popIn .3s cubic-bezier(.2,1.4,.4,1); }
.dc-current { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 76px; justify-content: center; }
.dc-reveal { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 22px; border-radius: 20px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.15); animation: popIn .35s ease; }
.dc-reveal.bid-false { border-color: rgba(34,197,94,.6); }
.dc-reveal.bid-true { border-color: rgba(244,63,94,.6); }
.dc-liar { font-weight: 900; font-size: 18px; color: var(--gold); }
.dc-info { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dc-hist { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; color: rgba(255,255,255,.75); }
.dc-hist span { display: inline-flex; align-items: center; gap: 3px; }
.dc-mine { display: flex; gap: 8px; }
.dc-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.dc-faces { display: flex; gap: 6px; }
.face-btn { padding: 4px; border-radius: 10px; border: 2px solid transparent; transition: transform .1s; }
.face-btn:hover { transform: translateY(-2px); }
.face-btn.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, transparent); }
.times { font-size: 22px; font-weight: 900; color: var(--muted); }

/* ── tournaments ──────────────────────────────────────────── */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 18px 0; }
.tour-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.tour-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tc-art { height: 90px; display: grid; place-items: center; font-size: 44px; position: relative; }
.tc-kind { position: absolute; top: 10px; left: 12px; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.35); letter-spacing: .05em; text-transform: uppercase; }
.tc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tc-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 12px; background: var(--surface); }
.tc-stats small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.how { margin-top: 10px; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.how-grid b { display: block; margin-bottom: 4px; }
.tour-hero { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 26px; border-radius: 26px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line-2); }
.tour-hero::before { content: ''; position: absolute; inset: 0; background: var(--g); opacity: .28; }
.tour-hero > * { position: relative; }
.th-emoji { font-size: 70px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); }
.th-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.th-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pool { display: flex; flex-direction: column; align-items: flex-end; }
.pool small { color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.detail-grid .card { margin: 0; }
.detail-grid .wide { grid-column: 1 / -1; }
.entrants { display: flex; flex-wrap: wrap; gap: 6px; }
.entrant { padding: 5px 11px; border-radius: 99px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.entrant.me { background: color-mix(in srgb, var(--primary) 30%, transparent); }

/* ── leaderboard ──────────────────────────────────────────── */
.podium-row { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin: 22px 0 16px; }
.podium-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); text-align: center; transition: transform .2s; }
.podium-card:hover { transform: translateY(-3px); }
.podium-card.p1 { padding-top: 32px; background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 18%, transparent), color-mix(in srgb, var(--gold-2) 4%, transparent)); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.podium-card.me { box-shadow: inset 0 0 0 2px var(--primary); }
.medal { position: absolute; top: -18px; font-size: 34px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }

/* ── profile ──────────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 22px; padding: 24px; border-radius: 26px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, transparent), color-mix(in srgb, var(--accent) 8%, transparent)), var(--bg-2); border: 1px solid var(--line-2); flex-wrap: wrap; }
.ph-main { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 10px; }
.ph-main h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 30px; }
.balance-big { font-size: 20px; }
.balance-big .chips b { color: #FFE3A3; }
.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin: 16px 0; }
.profile-grid .card { margin: 0; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.pick-av { position: relative; aspect-ratio: 1; border-radius: 14px; background: var(--surface-2); font-size: 26px; display: grid; place-items: center; border: 2px solid transparent; transition: transform .12s, border-color .15s; }
.pick-av:hover:not(:disabled) { transform: scale(1.08); }
.pick-av.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 20%, transparent); }
.pick-av.locked span { filter: grayscale(1) opacity(.35); }
.pick-av i { position: absolute; bottom: 2px; right: 3px; font-style: normal; font-size: 10px; font-weight: 800; display: flex; align-items: center; gap: 1px; color: var(--muted); }
.pick-av i .ic { width: 10px; height: 10px; }
.pick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pick-color { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid transparent; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.pick-color.on { border-color: #fff; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 14px; background: var(--surface); border: 2px solid transparent; font-size: 13px; }
.theme-pick.on { border-color: var(--primary); }
.theme-pick.locked { opacity: .5; }
.theme-pick small { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; }
.theme-pick small .ic { width: 11px; height: 11px; }
.felt-mini { width: 100%; height: 38px; border-radius: 999px; background: radial-gradient(ellipse, var(--felt1), var(--felt2)); box-shadow: 0 0 0 4px var(--rail); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface); }
.stat > span { font-size: 20px; }
.stat b { font-size: 20px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ach { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ach.got { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, transparent), color-mix(in srgb, var(--primary) 8%, transparent)); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.ach.locked .ach-ic { filter: grayscale(1) opacity(.4); }
.ach-ic { font-size: 30px; }
.ach small { color: var(--muted); font-size: 12px; }
.ach-rw { position: absolute; top: 12px; right: 12px; font-size: 12px; }
.ach.got .ach-rw { color: var(--green); }

/* ── admin ────────────────────────────────────────────────── */
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.adm-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.adm-tabs a.on { color: var(--text); background: color-mix(in srgb, var(--primary) 18%, transparent); border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.adm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.adm-card .ic { color: var(--primary); width: 22px; height: 22px; margin-bottom: 4px; }
.adm-card b { font-size: 26px; font-variant-numeric: tabular-nums; }
.adm-card span { color: var(--muted); font-size: 13px; }
.adm-card.wide { grid-column: span 2; }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.adm-grid .card { margin: 0; }
.adm-grid .wide { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.fld small { font-weight: 500; font-size: 11.5px; }
.fld input, .fld select, .fld textarea { padding: 9px 12px; }
.fld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
.fld-grid.four { grid-template-columns: repeat(4, 1fr); }
.fld.wide { grid-column: 1 / -1; }
.save-bar { position: sticky; top: calc(var(--top-h) + 8px); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 16px; background: rgba(28,22,64,.92); border: 1px solid var(--line-2); margin-bottom: 16px; }
.save-bar span { flex: 1; color: var(--muted); font-weight: 600; font-size: 14px; }
.save-bar.dirty { border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.save-bar.dirty span { color: #FFE3A3; }
.stakes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.stakes-block { padding: 12px; border-radius: 14px; background: rgba(3,6,20,.35); overflow-x: auto; }
.stakes-block h4 { margin-top: 0; }
.tbl.stakes input { padding: 6px 8px; font-size: 13px; min-width: 70px; }
.tbl.stakes td, .tbl.stakes th { padding: 5px 4px; }
.adm-tbl td { font-size: 13.5px; }
.adm-tbl tr.banned td { opacity: .55; }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell > * { margin-left: 4px; display: inline-flex; vertical-align: middle; }
.search { max-width: 360px; }
.tour-form { display: flex; flex-direction: column; gap: 12px; }
.tour-form .seg { align-self: flex-start; }

/* ── animations ───────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes ping { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes bob { 0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(-2deg); } 50% { transform: translate(-50%, -50%) translateY(-12px) rotate(2deg); } }
.boot img, .lt-emoji { animation-name: bob2; }
@keyframes bob2 { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes deal { from { opacity: 0; transform: translateY(-26px) scale(.7) rotate(-8deg); } }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); } }
@keyframes emoteUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }
.pk-win, .bj-net { left: 50%; }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-12deg); } 94% { transform: rotate(10deg); } 97% { transform: rotate(-6deg); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 50%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 0%, transparent); } }
@keyframes glowGold { 0%, 100% { box-shadow: 0 0 0 2px var(--gold); } 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 18px color-mix(in srgb, var(--gold) 90%, transparent); } }
@keyframes roll { 0% { transform: rotate(-200deg) scale(.4); opacity: 0; } 100% { transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
/* ── house rules widgets ──────────────────────────────────── */
.switch { display: inline-block; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch:has(input:checked) { background: var(--grad); }
.switch input:checked + i { transform: translateX(20px); }
.switch:has(input:disabled) { opacity: .5; }
.opts { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 10px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; }
.opt-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-l b { font-size: 14px; }
.opt-l small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.opt .seg { flex: none; justify-content: flex-end; }
.opt-multi { flex-wrap: wrap; }
.opt-multi .opt-l { flex: 1; }
.opt-count { flex: none; font-size: 12px; font-weight: 800; color: var(--text-2); padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.opt-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.opt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--muted); transition: background .15s, border-color .15s, color .15s, transform .12s; }
.opt-chip i { font-style: normal; font-size: 15px; line-height: 1; filter: grayscale(.85); opacity: .6; transition: filter .15s, opacity .15s; }
.opt-chip:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); }
.opt-chip.on { background: color-mix(in srgb, var(--primary) 20%, transparent); border-color: color-mix(in srgb, var(--primary) 65%, transparent); color: var(--text); }
.opt-chip.on i { filter: none; opacity: 1; }
.opt-chip:active:not(:disabled) { transform: scale(.94); }
.opt-chip:disabled { opacity: .35; cursor: not-allowed; }
.cats-box { padding: 4px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cats-box .opt { border-bottom: 0; }
.cats-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.rules-toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 14px 0 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.rules-toggle .ic:first-child { color: var(--gold); }
.rules-toggle span { flex: 1; }
.rules-toggle .ic:last-child { transition: transform .2s; }
.rules-toggle.open .ic:last-child { transform: rotate(90deg); }
.rules-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.rule-pill b { color: var(--text); }
.rules-box { width: 100%; text-align: left; border-radius: 16px; background: rgba(3,6,20,.35); border: 1px solid var(--line); padding: 4px 14px; }
.rules-box summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; }
.rules-box summary::-webkit-details-marker { display: none; }
.rules-box summary .ic { color: var(--gold); }
.rules-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.rules-modal h2 { display: flex; align-items: center; gap: 10px; }
.rules-modal h2 .ic { color: var(--gold); }

/* ── language menu ────────────────────────────────────────── */
.lang-wrap { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 5px; }
.lang-btn .ic { width: 15px; height: 15px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 190px; padding: 6px; border-radius: 16px; background: var(--bg-3); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.55); animation: popIn .16s ease; }
.lang-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--text-2); }
.lang-item:hover { background: var(--surface-2); color: var(--text); }
.lang-item.on { color: var(--text); background: color-mix(in srgb, var(--primary) 18%, transparent); }
.lang-item .flag { font-size: 18px; width: 24px; text-align: center; }
.lang-item .ic { margin-left: auto; width: 16px; height: 16px; color: var(--primary); }
.lang-select { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; }

/* ── home: new game decorations ───────────────────────────── */
.ge-four { filter: saturate(1.2); }

/* ── slots ────────────────────────────────────────────────── */
.sl-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 20px; }
.sl-cabinet { --cell: 92px; width: min(560px, 100%); padding: 18px 18px 20px; border-radius: 30px; background: linear-gradient(180deg, #3B1D73, #1E1046 60%, #170D38); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold-2) 12%, transparent), 0 30px 70px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.12); position: relative; }
.sl-cabinet.big-win { animation: cabinetGlow 1s ease-in-out 3; }
@keyframes cabinetGlow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 60%, transparent), 0 0 60px color-mix(in srgb, var(--gold) 55%, transparent), 0 30px 70px rgba(0,0,0,.55); } }
.sl-marquee { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; padding: 8px; border-radius: 16px; background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--gold-2)); color: #3B1D00; font-family: var(--display); letter-spacing: .14em; font-size: 18px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.sl-marquee span { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.sl-window { display: flex; align-items: stretch; gap: 8px; }
.sl-paylines { display: flex; flex-direction: column; justify-content: space-around; gap: 4px; }
.sl-paylines i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.08); color: var(--muted); }
.sl-paylines i.on { background: var(--gold); color: #3B1D00; box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 80%, transparent); }
.sl-reels { position: relative; flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; border-radius: 18px; background: #0B0820; box-shadow: inset 0 6px 18px rgba(0,0,0,.7); }
.sl-reel { position: relative; height: calc(var(--cell) * 3); overflow: hidden; border-radius: 12px; background: linear-gradient(180deg, #E9E4FF, #fff 18%, #fff 82%, #E9E4FF); box-shadow: inset 0 10px 14px -8px rgba(0,0,0,.45), inset 0 -10px 14px -8px rgba(0,0,0,.45); }
.sl-strip { display: flex; flex-direction: column; }
.sl-strip.spin { animation: reelSpin var(--d) cubic-bezier(.25,.1,.25,1.04) forwards; transform: translateY(calc(var(--n) * var(--cell) * -1)); filter: blur(0); }
@keyframes reelSpin {
  0% { transform: translateY(calc(var(--n) * var(--cell) * -1)); filter: blur(2px); }
  85% { filter: blur(1px); }
  100% { transform: translateY(0); filter: blur(0); }
}
.sl-sym { height: var(--cell); display: grid; place-items: center; font-size: calc(var(--cell) * .58); line-height: 1; flex: none; }
.sl-seven { font-family: var(--display); font-weight: 900; font-size: calc(var(--cell) * .7); color: #E11D48; -webkit-text-stroke: 3px var(--gold); paint-order: stroke fill; text-shadow: 0 4px 0 #7F1D1D; }
.sl-wild { display: flex; flex-direction: column; align-items: center; gap: 0; }
.sl-wild img { width: calc(var(--cell) * .55); height: auto; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.sl-wild i { font-style: normal; font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--on-primary); background: var(--grad); padding: 1px 7px; border-radius: 6px; margin-top: -4px; }
.sl-hit { position: absolute; inset: 8px; pointer-events: none; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); column-gap: 8px; }
.sl-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 2; }
.sl-lines polyline { fill: none; stroke: var(--gold); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-width: 4px; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold-2) 90%, transparent)); stroke-dasharray: 400; stroke-dashoffset: 400; animation: drawLine .6s ease forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.sl-glow { grid-column: calc(var(--x) + 1); grid-row: calc(var(--y) + 1); border-radius: 12px; box-shadow: inset 0 0 0 3px var(--gold), 0 0 18px color-mix(in srgb, var(--gold) 70%, transparent); animation: pulse 1s ease-in-out infinite; z-index: 1; }
.sl-display { margin: 14px 0 12px; min-height: 46px; display: grid; place-items: center; border-radius: 14px; background: #0B0820; box-shadow: inset 0 3px 10px rgba(0,0,0,.6); font-weight: 700; font-size: 15px; padding: 8px; text-align: center; }
.sl-win { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-size: 18px; animation: popIn .3s cubic-bezier(.2,1.3,.4,1); }
.sl-win.big { font-family: var(--display); font-size: 24px; letter-spacing: .04em; text-shadow: 0 0 18px color-mix(in srgb, var(--gold) 60%, transparent); }
.sl-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.sl-bet { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sl-bet .stepper b { min-width: 74px; font-size: 15px; }
.sl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sl-spin { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 21px; letter-spacing: .06em; color: #3B1D00; background: radial-gradient(circle at 35% 30%, #FFF1C1, var(--gold) 35%, var(--gold-2) 75%, #C2410C); box-shadow: 0 8px 0 #9A3412, 0 16px 30px rgba(0,0,0,.5), inset 0 -6px 12px rgba(0,0,0,.18); transition: transform .08s, box-shadow .08s, filter .2s; }
.sl-spin:hover:not(:disabled) { filter: brightness(1.08); }
.sl-spin:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 #9A3412, 0 8px 18px rgba(0,0,0,.5); }
.sl-spin:disabled { filter: grayscale(.5) brightness(.75); cursor: default; }
.sl-spin.busy span { animation: pulse .6s ease-in-out infinite; }
.sl-history { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 560px; }
.sl-history span { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-2); }
.sl-history .up { color: #86EFAC; } .sl-history .down { color: var(--muted); }
.sl-paytable { width: min(560px, 100%); padding: 16px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.sl-paytable h4 { margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sl-pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sl-pt { --cell: 30px; display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 12px; background: #fff; color: #16193A; }
.sl-pt span { display: flex; }
.sl-pt .sl-sym { width: 30px; font-size: 20px; }
.sl-pt .sl-seven { font-size: 24px; -webkit-text-stroke: 2px var(--gold); text-shadow: none; }
.sl-pt .sl-wild img { width: 20px; } .sl-pt .sl-wild i { font-size: 6px; padding: 0 3px; }
.sl-pt b { font-size: 15px; }

/* ── rocket (crash) ───────────────────────────────────────── */
.cr-wrap { display: flex; flex-direction: column; gap: 12px; }
.cr-history { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cr-h { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--surface-2); }
.cr-h.bad { color: #FDA4AF; } .cr-h.good { color: #86EFAC; } .cr-h.gold { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.cr-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; }
.cr-stage { position: relative; border-radius: 24px; overflow: hidden; background: radial-gradient(ellipse at 20% 100%, color-mix(in srgb, var(--primary) 35%, transparent), transparent 60%), radial-gradient(ellipse at 90% 0%, rgba(56,189,248,.22), transparent 60%), linear-gradient(180deg, var(--bg-2), #070B1C); border: 1px solid var(--line); min-height: 320px; }
.cr-stage::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 20%, #fff6, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff5, transparent), radial-gradient(1px 1px at 85% 60%, #fff7, transparent), radial-gradient(1px 1px at 10% 80%, #fff5, transparent); opacity: .8; }
.cr-graph { position: absolute; inset: 0; }
.cr-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cr-grid { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.cr-line { fill: none; stroke: url(#crg); stroke: var(--accent); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 70%, transparent)); }
.cr-fill { fill: url(#crg); }
.ph-crashed .cr-line { stroke: #F43F5E; }
.cr-rocket { position: absolute; font-size: 38px; transform: translate(-50%, -50%) rotate(calc(var(--a) - 45deg)); filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--gold-2) 60%, transparent)); z-index: 2; line-height: 1; }
.ph-betting .cr-rocket, .ph-waiting .cr-rocket { animation: hover 1.4s ease-in-out infinite; }
@keyframes hover2 { 50% { transform: translateY(-6px); } }
.ph-crashed .cr-rocket { transform: translate(-50%, -50%) scale(1.4); animation: popIn .3s ease; }
@keyframes hover { 50% { translate: 0 -6px; } }
.cr-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none; z-index: 3; text-align: center; }
.cr-mult { font-family: var(--display); font-size: clamp(46px, 9vw, 84px); line-height: 1; color: #fff; text-shadow: 0 6px 30px color-mix(in srgb, var(--primary) 60%, transparent); font-variant-numeric: tabular-nums; }
.cr-mult.boom { color: #FB7185; text-shadow: 0 6px 30px rgba(244,63,94,.6); animation: shake .4s ease; }
.cr-label { font-weight: 700; color: var(--text-2); font-size: 14px; letter-spacing: .02em; }
.cr-count { font-family: var(--display); font-size: 54px; line-height: 1; }
.cr-progress { position: absolute; left: 14px; top: 14px; z-index: 3; }
.cr-bets { border-radius: 24px; background: var(--bg-2); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 0; max-height: 360px; }
.cr-bets-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cr-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.cr-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 13px; background: rgba(255,255,255,.03); }
.cr-row.me { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 60%, transparent); }
.cr-row.won { background: rgba(34,197,94,.12); }
.cr-row.won .cr-res { color: #86EFAC; }
.cr-row.lost { opacity: .55; }
.cr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cr-amt { color: var(--gold); font-weight: 700; }
.cr-res { min-width: 70px; text-align: right; color: var(--muted); font-weight: 700; }
.cr-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); }
.cr-inputs { display: flex; gap: 18px; flex-wrap: wrap; }
.cr-inputs > div { display: flex; flex-direction: column; gap: 5px; }
.cr-inputs .stepper b { min-width: 76px; font-size: 15px; }
.cr-auto { display: flex; align-items: center; gap: 8px; height: 44px; }
.cr-auto-in { width: 84px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-weight: 700; }
.cr-auto-in:disabled { opacity: .45; }
.cr-cashout { min-width: 220px; font-size: 18px; animation: pulseScale 1s ease-in-out infinite; }
@keyframes pulseScale { 50% { transform: scale(1.04); } }
@keyframes pulseGold { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 25%, transparent), 0 10px 30px color-mix(in srgb, var(--gold-2) 50%, transparent); } }
.cr-done { font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; }
.cr-done.win { color: #86EFAC; background: rgba(34,197,94,.12); }
.cr-done.lose { color: #FDA4AF; background: rgba(244,63,94,.12); }

/* ── yacht dice (yatzy) ───────────────────────────────────── */
.yz-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.yz-tray { display: flex; flex-direction: column; gap: 16px; align-items: center; padding: 20px 16px; border-radius: 28px; background: radial-gradient(ellipse at 50% 40%, var(--felt1), var(--felt2)); box-shadow: 0 0 0 10px var(--rail), inset 0 0 60px rgba(0,0,0,.4), 0 30px 60px rgba(0,0,0,.4); margin: 8px; }
.yz-top { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.yz-turn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.yz-dice { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 10px 0; }
.yz-die { position: relative; border-radius: 16px; padding: 0; transition: transform .15s; }
.yz-die:not(:disabled):hover { transform: translateY(-4px); }
.yz-die.held { transform: translateY(-8px); }
.yz-die.held .die rect { fill: #FFE7A3; stroke: var(--gold-2); stroke-width: 5; }
.yz-die.idle .die { opacity: .45; }
.die.xl { width: 64px; height: 64px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); }
.die.rolled { animation: roll .55s cubic-bezier(.2,1.3,.4,1); }
.yz-lock { position: absolute; right: -6px; top: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-2); color: #3B1D00; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
.yz-lock .ic { width: 13px; height: 13px; }
.yz-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-height: 64px; }
.ys-wrap { overflow-x: auto; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.ys-sheet { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ys-sheet th, .ys-sheet td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.ys-sheet tbody th { text-align: left; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.ys-sheet tbody th small { margin-left: 6px; color: var(--muted); font-weight: 600; font-size: 11px; }
.ys-p { font-size: 12px; font-weight: 700; vertical-align: bottom; }
.ys-p > span:last-child { display: block; max-width: 84px; margin: 3px auto 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-p.acting { background: color-mix(in srgb, var(--gold) 10%, transparent); color: var(--gold); }
.ys-p.left { opacity: .4; }
.ys-v { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; }
.ys-v.fresh { animation: popIn .4s ease; color: var(--gold); }
.ys-pick { width: 100%; min-width: 40px; padding: 4px 6px; border-radius: 8px; background: color-mix(in srgb, var(--primary) 22%, transparent); color: color-mix(in srgb, var(--primary) 30%, #fff); font-weight: 800; border: 1px dashed color-mix(in srgb, var(--primary) 70%, transparent); }
.ys-pick:hover { background: var(--primary); color: var(--on-primary); }
.ys-pick.zero { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--line-2); }
.ys-sub th, .ys-sub td { background: rgba(255,255,255,.03); font-size: 12px; }
.ys-total th, .ys-total td { font-size: 15px; border-bottom: 0; background: color-mix(in srgb, var(--primary) 12%, transparent); }

/* ── four in a row ────────────────────────────────────────── */
.f4-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 16px; }
.f4-players { display: flex; align-items: center; gap: 14px; }
.f4-vs { font-family: var(--display); color: var(--muted); }
.f4-player { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.f4-player.acting { border-color: color-mix(in srgb, var(--gold) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 12%, transparent); }
.f4-player.you { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 60%, transparent); }
.f4-player.left { opacity: .45; }
.f4-av { position: relative; }
.f4-status { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: center; height: 34px; max-width: 100%; overflow: hidden; white-space: nowrap; }
.f4-status > * { flex: none; }
.f4-status .pill { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.f4-board { --cell: min(64px, calc((100vw - 60px) / var(--cols)), calc((100vh - 330px) / var(--rows))); display: grid; grid-template-columns: repeat(var(--cols), var(--cell)); padding: 10px; border-radius: 22px; background: linear-gradient(180deg, #2563EB, #1E40AF); box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.25), inset 0 -6px 0 rgba(0,0,0,.25); }
.f4-col { position: relative; display: flex; flex-direction: column; padding: 0; border-radius: 12px; }
.f4-col.can:hover { background: rgba(255,255,255,.1); }
.f4-cell { width: var(--cell); height: var(--cell); display: grid; place-items: center; position: relative; }
.f4-cell::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; background: #0B1440; box-shadow: inset 0 4px 8px rgba(0,0,0,.6); }
.f4-disc { position: relative; z-index: 1; width: 76%; height: 76%; border-radius: 50%; display: block; }
.f4-disc.red { background: radial-gradient(circle at 35% 30%, #FCA5A5, #EF4444 45%, #991B1B); box-shadow: inset 0 -4px 6px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.4); }
.f4-disc.yellow { background: radial-gradient(circle at 35% 30%, #FEF9C3, #FACC15 45%, #A16207); box-shadow: inset 0 -4px 6px rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.4); }
.f4-disc.drop { animation: discDrop .45s cubic-bezier(.4,0,.6,1.35); }
@keyframes discDrop { from { transform: translateY(calc(var(--h) * var(--cell) * -1)); } }
.f4-disc.win { animation: winDisc .8s ease-in-out infinite; box-shadow: 0 0 0 4px #fff, 0 0 20px #fff; }
@keyframes winDisc { 50% { transform: scale(.86); } }
.f4-disc.mini { width: 16px; height: 16px; }
.f4-ghost { position: absolute; z-index: 2; top: -4px; left: 50%; width: calc(var(--cell) * .62); height: calc(var(--cell) * .62); transform: translate(-50%, -100%); border-radius: 50%; opacity: 0; transition: opacity .15s; pointer-events: none; }
.f4-ghost.red { background: #EF4444; } .f4-ghost.yellow { background: #FACC15; }
.f4-col.can:hover .f4-ghost { opacity: .85; }
.f4-col:disabled { cursor: default; }

/* ── chroma: multi-play & stacking ────────────────────────── */
.ch-card.selected { transform: translateY(-26px) !important; box-shadow: 0 0 0 3px #fff, 0 0 24px rgba(255,255,255,.6); z-index: 5; }
.ch-card.selectable { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 90%, transparent); }
.ch-pending { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 12px; border-radius: 999px; background: rgba(244,63,94,.2); color: #FECDD3; font-family: var(--display); font-size: 18px; animation: pulse 1.2s infinite; }
.ch-pending small { font-family: var(--font); font-size: 12px; font-weight: 700; }

@media (max-width: 980px) {
  .cr-main { grid-template-columns: minmax(0, 1fr); }
  .cr-bets { max-height: 220px; }
  .yz-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .sl-cabinet { --cell: 72px; padding: 14px 10px 16px; border-radius: 24px; }
  .sl-controls { grid-template-columns: 1fr auto; }
  .sl-side { grid-column: 1 / -1; flex-direction: row; justify-content: center; }
  .sl-spin { width: 92px; height: 92px; font-size: 18px; }
  .sl-paylines { display: none; }
  .cr-stage { min-height: 250px; }
  .cr-rocket { font-size: 30px; }
  .cr-panel { padding: 12px; gap: 10px; }
  .die.xl { width: 52px; height: 52px; }
  .yz-dice { gap: 7px; }
  .yz-tray { margin: 4px; padding: 16px 10px; }
  .ys-sheet { font-size: 12.5px; }
  .ys-sheet th, .ys-sheet td { padding: 5px 5px; }
  .opt { flex-direction: column; align-items: flex-start; gap: 8px; }
  .opt-multi { flex-direction: row; align-items: center; }
  .opt .seg { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .sl-cabinet { --cell: 62px; }
  .sl-sym { font-size: calc(var(--cell) * .55); }
}

/* ── tables lobby & table rows ────────────────────────────── */
.table-row.custom { border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.tr-seats { display: flex; align-items: center; gap: 0; flex: none; }
.tr-seats .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg-2); }
.tr-seats .av:first-child { margin-left: 0; }
.tr-seats .more { margin-left: 4px; font-size: 11px; font-weight: 800; color: var(--muted); }
.tr-count { margin-left: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); min-width: 34px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; vertical-align: 2px; color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, transparent); }
.pill-go { color: #1B2B00; background: var(--gold); border-color: transparent; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 6px 0 8px; scrollbar-width: thin; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.fchip small { color: var(--muted); font-weight: 700; }
.fchip.on { background: var(--grad); color: var(--on-primary); border-color: transparent; }
.fchip.on small { color: rgba(255,255,255,.8); }
.tables-page .tables { margin: 14px 0; }
.tables-page .row.between { margin-bottom: 4px; }
.rh-name { font-weight: 600; color: var(--text-2); }
.result-reason { font-weight: 700; color: var(--gold); margin: -4px 0 6px; }
.result-overlay .btn-ghost { margin-top: 8px; }

/* ── create table / play modals ───────────────────────────── */
.game-pick { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.gp { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 72px; padding: 8px 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--muted); }
.gp .ge { font-size: 22px; }
.gp span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp.on { background: color-mix(in srgb, var(--primary) 22%, transparent); border-color: var(--primary); color: var(--text); }
.seg.w100 { display: flex; width: 100%; }
.seg.w100 button { flex: 1; justify-content: center; }
.create-modal .fld { margin: 6px 0; }
.link { color: var(--primary); font-weight: 700; background: none; padding: 0; }
.link.small { font-size: 12.5px; }
.map-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; width: 100%; }
.map-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); }
.map-card .mc-ic { font-size: 22px; }
.map-card small { color: var(--muted); font-size: 11.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.map-card .mc-meta { font-size: 11px; font-weight: 700; color: var(--text-2); margin-top: auto; }
.map-card.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, transparent); box-shadow: 0 0 0 1px var(--primary); }
.opt-maps { flex-direction: column; align-items: stretch; }

/* ── how to play ──────────────────────────────────────────── */
.howto .pm-head { margin-bottom: 12px; }
.rich h4 { margin: 14px 0 6px; font-size: 15px; color: var(--text); }
.rich p { margin: 6px 0; color: var(--text-2); line-height: 1.55; }
.rich ul { margin: 6px 0 6px 2px; padding-left: 18px; color: var(--text-2); line-height: 1.55; }
.rich li { margin: 3px 0; }
.rich li::marker { color: var(--primary); }
.rich b { color: var(--text); }
.howto-maps { display: grid; gap: 8px; margin-top: 12px; }
.howto-maps h4 { margin: 4px 0; }
.hm { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.hm.on { border-color: var(--primary); }
.howto-rules { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.howto-rules h4 { margin: 0 0 8px; }
.howto-rules .rules-line { justify-content: flex-start; }

/* ── owner panel additions ────────────────────────────────── */
.adm-tabs { scrollbar-width: thin; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.theme-sw { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; text-align: left; }
.theme-sw .sw { display: flex; gap: 4px; }
.theme-sw .sw i { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.2); }
.theme-sw.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 10px; cursor: pointer; }
.color-row code { font-size: 12px; color: var(--muted); }
.lang-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 12px; margin-top: 8px; }
.adm-sub { margin: 26px 0 10px; }
.game-cfgs, .maps-list { display: flex; flex-direction: column; gap: 10px; }
.game-cfg, .map-cfg { padding: 12px 14px; }
.game-cfg.off, .map-cfg.off { opacity: .6; }
.gcfg-head { display: flex; align-items: center; gap: 10px; }
.gcfg-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; flex-wrap: wrap; }
.gcfg-title b { font-size: 16px; }
.gcfg-title > .ic:last-child { margin-left: auto; transition: transform .2s; color: var(--muted); }
.game-cfg.open .gcfg-title > .ic:last-child, .map-cfg.open .gcfg-title > .ic:last-child { transform: rotate(90deg); }
.gcfg-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.gcfg-body h4 { margin: 10px 0 2px; }
.map-ic { font-size: 24px; }
.map-cfg > p { margin: 6px 0 0; }
.map-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.map-tbl input { width: 100%; min-width: 70px; padding: 6px 8px; font-size: 13px; }
.map-tbl td:nth-child(3) input { min-width: 150px; }
.grp { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.g-brown { background: #9A6B3F; } .g-lblue { background: #7DD3FC; } .g-pink { background: #F472B6; } .g-orange { background: #FB923C; }
.g-red { background: #EF4444; } .g-yellow { background: #FACC15; } .g-green { background: #22C55E; } .g-dblue { background: #3B82F6; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl input[type=number] { width: 96px; padding: 6px 8px; }
.switch.sm { width: 38px; height: 22px; }
.switch.sm i { width: 16px; height: 16px; }
.switch.sm.on i { transform: translateX(16px); }
.texts-bar { margin: 10px 0; align-items: center; }
.texts-bar select, .texts-bar .search { max-width: 260px; }
.texts-list { display: flex; flex-direction: column; gap: 8px; }
.tx-row { display: grid; grid-template-columns: 230px 1fr; gap: 10px; align-items: start; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tx-row.changed { border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.tx-key { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tx-key code { font-size: 12px; color: var(--muted); word-break: break-all; }
.tx-row textarea { width: 100%; min-height: 38px; resize: vertical; font-size: 13.5px; }

/* ── chess ────────────────────────────────────────────────── */
.cx-wrap { display: grid; grid-template-columns: minmax(0, min(640px, calc(100svh - 330px))) 270px; gap: 18px; justify-content: center; align-items: start; padding: 4px 0 16px; }
.cx-main { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; }
.cx-frame { padding: 10px; border-radius: 16px; background: linear-gradient(145deg, #4A3323, #2C1D13); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(0,0,0,.4), 0 26px 50px rgba(0,0,0,.5); }
.cx-board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.cx-sq { position: relative; display: grid; place-items: center; padding: 0; min-width: 0; min-height: 0; }
.cx-sq.l { background: linear-gradient(135deg, #F4E4C8, #EBD5B0); }
.cx-sq.d { background: linear-gradient(135deg, #B9875D, #A5744B); }
.cx-sq::before { content: ''; position: absolute; inset: 0; pointer-events: none; }
.cx-sq.last::before { background: rgba(255, 214, 79, .45); }
.cx-sq.sel::before { background: rgba(255, 145, 50, .55); box-shadow: inset 0 0 0 3px rgba(255,120,30,.75); }
.cx-sq.check::before { background: radial-gradient(circle, rgba(255,60,80,.95) 0%, rgba(255,60,80,.55) 40%, transparent 72%); }
.cx-sq.dot::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: rgba(28,32,60,.3); pointer-events: none; }
.cx-sq.cap::after { content: ''; position: absolute; inset: 3%; border-radius: 50%; border: max(3px, .55vmin) solid rgba(28,32,60,.32); pointer-events: none; }
.cx-sq.dot:hover::after { background: rgba(28,32,60,.5); }
.cx-sq em { position: absolute; font-style: normal; font-size: max(9px, 1.2vmin); font-weight: 800; pointer-events: none; z-index: 1; }
.cx-sq.l em { color: #A5744B; } .cx-sq.d em { color: #F4E4C8; }
.cx-sq em.rk { left: 4%; top: 3%; } .cx-sq em.fl { right: 5%; bottom: 2%; }
.cp { position: relative; z-index: 2; width: 88%; height: 88%; overflow: visible; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.38)); transition: transform .15s ease; }
.cp.moving { z-index: 8; }
.cp-w { fill: url(#cpgw); stroke: #262A40; stroke-width: 1.5; stroke-linejoin: round; }
.cp-b { fill: url(#cpgb); stroke: #0B0D18; stroke-width: 1.5; stroke-linejoin: round; }
.cp .cp-ln { fill: none; }
.cp-w .cp-ln { stroke: #262A40; stroke-width: 1.3; }
.cp-w .cp-dt { fill: #262A40; stroke: none; }
.cp-b .cp-ln { stroke: #AEB4CF; stroke-width: 1.3; }
.cp-b .cp-dt { fill: #E6E9F5; stroke: none; }
.cx-sq.mv { cursor: pointer; }
.cx-sq.mv:hover .cp { transform: translateY(-4%) scale(1.06); }
.cx-sq.sel .cp { transform: translateY(-6%) scale(1.1); }
.fx-ghost.cx-ghost .cp { width: 88%; height: 88%; }
.cx-player { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.cx-player.acting { border-color: color-mix(in srgb, var(--gold) 60%, transparent); background: color-mix(in srgb, var(--gold) 7%, var(--surface)); }
.cx-av { position: relative; display: inline-flex; }
.cx-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cx-dot.w { background: #F4EFE4; box-shadow: 0 0 0 1.5px #262A40; }
.cx-dot.b { background: #2E3350; box-shadow: 0 0 0 1.5px #AEB4CF; }
.cx-av .cx-dot { position: absolute; right: -3px; bottom: -2px; }
.cx-pi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-pi b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-caps { display: flex; flex-wrap: wrap; align-items: center; gap: 0; min-height: 18px; }
.cx-caps .cp { width: 17px; height: 17px; margin-right: -5px; filter: none; }
.cx-caps em { margin-left: 8px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--green); }
.cx-clock { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 22px; padding: 4px 10px; border-radius: 10px; background: rgba(3,6,20,.5); color: var(--muted); min-width: 84px; text-align: center; }
.cx-clock.run { color: #fff; background: color-mix(in srgb, var(--primary) 40%, rgba(3,6,20,.5)); }
.cx-clock.low.run { background: color-mix(in srgb, var(--red) 55%, transparent); }
.cx-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); max-height: min(72vh, 660px); }
.cx-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 30px; }
.cx-turn { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 600; }
.cx-h { margin: 4px 0 0; }
.cx-moves { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 90px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cx-moves li { display: grid; grid-template-columns: 34px 1fr 1fr; padding: 4px 8px; border-radius: 8px; }
.cx-moves li:nth-child(odd) { background: var(--surface); }
.cx-moves li.now { box-shadow: inset 2px 0 0 var(--primary); }
.cx-moves span { color: var(--muted); }
.cx-moves .cx-empty { display: block; color: var(--muted); background: none !important; padding: 8px 4px; }
.cx-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.promo { text-align: center; }
.promo-row { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.promo-row .cx-sq { width: 68px; height: 68px; border-radius: 14px; }

/* ── checkers & reversi ───────────────────────────────────── */
.ck-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 16px; }
.ck-board, .rv-board { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: repeat(var(--n), minmax(0, 1fr)); aspect-ratio: 1; width: 100%; border-radius: 6px; overflow: hidden; }
.ck-frame, .rv-frame { width: min(100%, 620px, calc(100svh - 260px)); min-width: 260px; padding: 10px; border-radius: 16px; }
.ck-frame { background: linear-gradient(145deg, #5A3824, #2E1C11); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(0,0,0,.4), 0 26px 50px rgba(0,0,0,.5); }
.ck-board { box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.ck-sq { position: relative; display: grid; place-items: center; padding: 0; aspect-ratio: 1; }
.ck-sq.l { background: linear-gradient(135deg, #F4E4C8, #EAD3AE); cursor: default; }
.ck-sq.d { background: linear-gradient(135deg, #7A5238, #66432D); }
.ck-sq::before { content: ''; position: absolute; inset: 0; pointer-events: none; }
.ck-sq.last::before { background: rgba(255, 214, 79, .28); }
.ck-sq.gone::before { background: rgba(255, 90, 90, .18); }
.ck-sq.sel::before { background: rgba(255, 145, 50, .45); box-shadow: inset 0 0 0 3px rgba(255,140,40,.85); }
.ck-sq.dot::after { content: ''; width: 32%; height: 32%; border-radius: 50%; background: color-mix(in srgb, var(--gold) 80%, transparent); box-shadow: 0 0 12px var(--gold); pointer-events: none; animation: popIn .25s ease; }
.ck-sq.mv { cursor: pointer; }
.ck-sq.mv .ck-man { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 75%, transparent), 0 5px 6px rgba(0,0,0,.45); }
.ck-man { position: relative; z-index: 2; width: 80%; height: 80%; border-radius: 50%; display: grid; place-items: center; transition: transform .15s; }
.ck-man.moving { z-index: 8; }
.ck-man.w { background: radial-gradient(circle at 35% 28%, #FFFFFF, #F1EADB 55%, #CFC4AE); box-shadow: inset 0 -4px 0 rgba(120,95,60,.35), inset 0 2px 0 rgba(255,255,255,.9), 0 5px 6px rgba(0,0,0,.45); }
.ck-man.b { background: radial-gradient(circle at 35% 28%, #E05A4F, #B3261E 55%, #7A1712); box-shadow: inset 0 -4px 0 rgba(60,8,6,.45), inset 0 2px 0 rgba(255,180,170,.5), 0 5px 6px rgba(0,0,0,.45); }
.ck-man::before { content: ''; position: absolute; inset: 17%; border-radius: 50%; border: 2px solid rgba(0,0,0,.13); box-shadow: inset 0 0 0 3px rgba(255,255,255,.12); }
.ck-man.b::before { border-color: rgba(0,0,0,.25); }
.ck-man svg { position: relative; width: 52%; height: 52%; color: #E8B53A; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.ck-man.king { box-shadow: inset 0 -4px 0 rgba(0,0,0,.3), 0 0 0 2px #E8B53A, 0 5px 6px rgba(0,0,0,.45); }
.ck-man.mini { width: 16px; height: 16px; }
.ck-man.mini::before { display: none; }
.fx-ghost.ck-ghost .ck-man { width: 80%; height: 80%; }
.ck-sq.sel .ck-man { transform: translateY(-4%) scale(1.08); }
.ck-sq:hover .ck-man { transform: scale(1.04); }
.ck-player { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.ck-player.acting { border-color: color-mix(in srgb, var(--gold) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 12%, transparent); }
.ck-player.you { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 60%, transparent); }
.rv-frame { background: linear-gradient(145deg, #3B2A1C, #20160D); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 26px 50px rgba(0,0,0,.5); }
.rv-board { background: #0B5B42; gap: 2px; padding: 4px; }
.rv-sq { position: relative; display: grid; place-items: center; padding: 0; border-radius: 3px; background: radial-gradient(circle at 50% 40%, #1DAA77, #138A5E); aspect-ratio: 1; perspective: 300px; }
.rv-sq.dot::after { content: ''; width: 26%; height: 26%; border-radius: 50%; background: rgba(0,0,0,.25); }
.rv-sq.dot:hover::after { background: rgba(255,255,255,.55); }
.rv-sq.last { box-shadow: inset 0 0 0 3px var(--gold); }
.rv-disc { width: 82%; height: 82%; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 4px 5px rgba(0,0,0,.4); }
.rv-disc.b { background: radial-gradient(circle at 35% 30%, #4A5070, #15182C 70%); }
.rv-disc.w { background: radial-gradient(circle at 35% 30%, #fff, #DADDE8 70%); }
.rv-disc.flip { animation: flipDisc .45s ease; }
.rv-disc.new { animation: popIn .25s ease; }
@keyframes flipDisc { 0% { transform: rotateY(180deg) scale(1); filter: brightness(.6); } 50% { transform: rotateY(90deg) scale(1.15); } 100% { transform: rotateY(0) scale(1); filter: brightness(1); } }
.rv-disc.flip { animation-delay: calc(var(--fd, 0) * 1ms); animation-fill-mode: both; }
.rv-disc.mini { width: 16px; height: 16px; }
.rv-count { font-family: var(--display); font-size: 18px; margin-left: 4px; }

/* ── ludo ─────────────────────────────────────────────────── */
.ld-wrap { display: grid; grid-template-columns: minmax(0, min(620px, calc(100svh - 200px))) 260px; gap: 16px; justify-content: center; align-items: start; padding-bottom: 16px; }
.ld-frame { width: 100%; min-width: 0; padding: 10px; border-radius: 24px; background: linear-gradient(145deg, #2A3366, #161C3D); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 26px 50px rgba(0,0,0,.5); }
.ld-board { position: relative; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-template-rows: repeat(11, minmax(0, 1fr)); gap: 3px; aspect-ratio: 1; width: 100%; min-width: 0; padding: 8px; border-radius: 16px; background: radial-gradient(circle at 50% 50%, #FFFDF7, #F3ECDD); }
.ld-yard { --cc: #FF5A5F; position: relative; z-index: 0; margin: -4px; border-radius: 18px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cc) 75%, #fff), var(--cc)); box-shadow: inset 0 -5px 0 rgba(0,0,0,.15), inset 0 0 0 3px rgba(255,255,255,.35); }
.ld-yard::after { content: ''; position: absolute; inset: 18%; border-radius: 50%; background: rgba(255,255,255,.88); box-shadow: inset 0 3px 8px rgba(0,0,0,.15); }
.ld-yard.unused { filter: grayscale(.85) opacity(.45); }
.ld-yard.turn { box-shadow: inset 0 -5px 0 rgba(0,0,0,.15), inset 0 0 0 3px rgba(255,255,255,.35), 0 0 0 3px var(--cc), 0 0 22px var(--cc); }
.ld-cell { z-index: 1; }
.ld-cell.base { background: transparent; box-shadow: inset 0 0 0 2.5px color-mix(in srgb, var(--cc) 70%, #000); }
.ld-center { border-radius: 8px; background: conic-gradient(from 45deg, #3A86FF 0 25%, #FFC93C 0 50%, #2BD99F 0 75%, #FF5A5F 0); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.ld-pawn.moving { z-index: 9; }
.ld-pawn { border-radius: 50% 50% 44% 44%; box-shadow: 0 4px 5px rgba(0,0,0,.45), inset 0 -3px 0 rgba(0,0,0,.22), inset 0 2px 0 rgba(255,255,255,.45); }
.ld-pawn::after { content: ''; position: absolute; left: 30%; top: 18%; width: 40%; height: 30%; border-radius: 50%; background: rgba(255,255,255,.55); }
.ld-die { padding: 6px 0 10px; }
.ld-die .d3.idle { opacity: .5; }
.ld-cell { --cc: #fff; position: relative; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #D9D2C3; }
.ld-cell.start { background: var(--cc); box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); }
.ld-cell.home { background: color-mix(in srgb, var(--cc) 75%, #fff); box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.ld-cell.base { background: color-mix(in srgb, var(--cc) 30%, #fff); box-shadow: inset 0 0 0 3px var(--cc); }
.ld-cell.base.unused { opacity: .35; }
.ld-cell.target::after { content: ''; position: absolute; inset: 28%; border-radius: 50%; border: 3px dashed #16193A; opacity: .55; animation: spin 4s linear infinite; }
.ld-center { display: grid; place-items: center; font-size: clamp(14px, 2.6vw, 24px); }
.ld-pawn { --pc: #FF5A5F; position: relative; z-index: 2; width: 80%; height: 80%; border-radius: 50% 50% 46% 46%; padding: 0; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--pc) 40%, #fff), var(--pc) 55%, color-mix(in srgb, var(--pc) 70%, #000)); box-shadow: 0 3px 5px rgba(0,0,0,.45), inset 0 -2px 0 rgba(0,0,0,.2); }
.ld-pawn:disabled { cursor: default; }
.ld-pawn.can { animation: hop .8s ease-in-out infinite; box-shadow: 0 0 0 3px #fff, 0 0 14px var(--pc), 0 3px 5px rgba(0,0,0,.45); }
.ld-pawn.moved { animation: popIn .35s ease; }
@keyframes hop { 50% { transform: translateY(-14%); } }
.ld-side { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.ld-dice { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ld-die .die.idle { opacity: .45; }
.ld-players { display: flex; flex-direction: column; gap: 6px; }
.ld-pl { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; }
.ld-pl.acting { background: color-mix(in srgb, var(--gold) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.ld-pl.left { opacity: .45; }
.ld-pl b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--pc); flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.ld-log { margin: 0; text-align: center; }

.ge-chess { filter: invert(1) drop-shadow(0 2px 3px rgba(0,0,0,.35)); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1180px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .side-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
  .side-col > * + * { margin-top: 0; }
}
@media (max-width: 980px) {
  .room-layout { grid-template-columns: minmax(0, 1fr); }
  .side-toggle { display: inline-grid; }
  .room-side { position: fixed; z-index: 60; right: 0; top: var(--top-h); bottom: 0; width: min(360px, 92vw); height: auto; background: color-mix(in srgb, var(--bg-2) 98%, transparent); border-left: 1px solid var(--line-2); transform: translateX(100%); transition: transform .25s ease; box-shadow: -20px 0 50px rgba(0,0,0,.5); }
  .room-side.open { transform: none; }
  .hero { grid-template-columns: 1fr; padding: 26px 22px; }
  .hero-art { display: none; }
  .detail-grid, .adm-grid, .profile-grid { grid-template-columns: 1fr; }
  .tour-hero { grid-template-columns: 1fr; text-align: left; }
  .th-cta, .pool { align-items: flex-start; }
  .nav-link span { display: none; }
}
@media (max-width: 720px) {
  :root { --top-h: 58px; }
  body { font-size: 14.5px; }
  .topbar-in { gap: 10px; padding: 0 12px; }
  .brand img { height: 28px; width: auto; }
  .nav { display: none; }
  .hide-sm { display: none !important; }
  .balance { padding: 6px 10px 6px 7px; font-size: 14px; }
  .tabbar { display: flex; position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 97%, transparent); border-top: 1px solid var(--line); }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 700; color: var(--muted); border-radius: 12px; }
  .tab.active { color: var(--text); background: var(--surface-2); }
  .tab .ic { width: 21px; height: 21px; }
  body.in-room .tabbar { display: none; }
  .page { padding: 16px 12px 110px; }
  .games-grid { grid-template-columns: minmax(0, 1fr); }
  .gc-art { height: 100px; }
  .side-col { grid-template-columns: minmax(0, 1fr); }
  .room-main { padding: 10px 8px; }
  .room-head { padding: 8px 10px; gap: 8px; }
  .rh-ic { width: 32px; height: 32px; font-size: 16px; }
  .code-btn { padding: 6px 9px; font-size: 12px; letter-spacing: .04em; }
  .rh-right .pill, .rh-right [data-act=toggleSound] { display: none; }
  .pk-table { aspect-ratio: auto; height: clamp(400px, calc(100svh - 410px), 600px); min-height: 0; }
  .felt { inset: 10% 9% 12%; border-radius: 160px; }
  .pk-plate { min-width: 0; padding-right: 9px; }
  .pk-name { max-width: 64px; font-size: 12px; }
  .av-md { width: 38px; height: 38px; font-size: 20px; }
  .pc.md { --w: 40px; }
  .pk-seat.you .pk-cards { height: 64px; }
  .pk-bet { transform: translate(calc(-50% + var(--dx) * 92px), calc(-50% + var(--dy) * 74px)); }
  .bj-table { aspect-ratio: 3 / 3.6; min-height: 420px; }
  .bj-felt { border-radius: 0 0 46% 46% / 0 0 40% 40%; }
  .bj-plate { max-width: 88px; font-size: 11px; }
  .bj-arc { font-size: 8.5px; top: 36%; }
  .bet-chip { width: 46px; height: 46px; font-size: 11.5px; }
  .rl-bar { gap: 6px; padding: 8px 10px; }
  .rl-bar .chip-row { gap: 5px; flex-wrap: nowrap; }
  .rl-bar .bet-chip { width: 42px; height: 42px; font-size: 10.5px; }
  .rl-bar .bet-chip::after { inset: 7px; }
  .rl-bar .ab-main { gap: 6px; flex-wrap: nowrap; }
  .rl-bar .ab-main .btn { padding: 7px 10px; font-size: 12.5px; }
  .rl-bar .bet-now { font-size: 13px; white-space: nowrap; }
  .rl-bar > small { display: none; }
  .rl-wheel-box { width: 220px; height: 220px; }
  .rl-side { min-width: 0; }
  .ch-card { width: 58px; height: 86px; }
  .ch-hand { --cw: 58px; }
  .ch-discard .ch-card, .ch-pile, .ch-pile .ch-back.big { width: 70px; height: 100px; }
  .ch-mid { font-size: 24px; }
  .ch-opp { min-width: 92px; padding: 4px; }
  .ch-fan { width: 80px; height: 40px; }
  .ch-back { width: 24px; height: 36px; }
  .dc-player { min-width: 104px; padding: 8px; }
  .dc-bid.big { font-size: 30px; }
  .die.lg { width: 42px; height: 42px; }
  .podium-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .podium-card { padding: 18px 6px 12px; }
  .podium-card b { font-size: 13px; }
  .how-grid { grid-template-columns: 1fr; }
  .modal { padding: 22px 18px; border-radius: 22px; }
  .toasts { bottom: 76px; right: 10px; width: calc(100vw - 20px); }
  body.in-room .toasts { bottom: 12px; }
  .adm-card.wide { grid-column: span 1; }
  .fld-grid.four { grid-template-columns: repeat(2, 1fr); }
  .stakes-grid { grid-template-columns: 1fr; }
  .action-bar { padding: 10px; gap: 8px; border-radius: 16px; }
  .btn-lg { padding: 12px 18px; font-size: 14.5px; }
}
@media (max-width: 420px) {
  .hide-xs { display: none !important; }
  .code-btn span, .rh-name { display: none; }
  .code-btn { padding: 8px; }
  .hero h1 { font-size: 34px; }
}
.ge { display: inline-block; line-height: 1; }
.ge-poker { filter: invert(1) drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.lbl { display: inline-flex; align-items: center; gap: 6px; }
.ic { display: inline-block; vertical-align: -0.2em; }
.pm-grid small { display: block; margin-top: 6px; }
.create-modal .pm-grid { grid-template-columns: 1fr 1fr; }
.create-modal .pm-grid > div:nth-child(3) { grid-column: 1 / -1; }
.create-modal .pm-grid .seg { width: 100%; }
.create-modal .pm-grid .seg button { flex: 1; }

@media (max-width: 980px) {
  .cx-wrap, .ld-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .cx-main { width: min(100%, 620px); }
  .ld-board { width: min(100%, 600px); }
  .cx-side, .ld-side { width: min(100%, 620px); max-height: none; }
  .cx-moves { max-height: 160px; }
  .tx-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gc-art { height: 92px; }
  .gc-body { padding: 10px 10px 12px; gap: 6px; }
  .gc-head h3 { font-size: 15px; }
  .gc-status { font-size: 10.5px; padding: 3px 8px; left: 8px; top: 8px; }
  .gc-body p { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .gc-actions { flex-direction: column; gap: 6px; }
  .gc-actions .btn { width: 100%; padding: 8px 10px; }
  .hero-art { display: none; }
  .table-row { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; grid-template-areas: "ic main main act" "ic seats pill act"; gap: 6px 10px; }
  .table-row .tr-ic { grid-area: ic; }
  .table-row .tr-main { grid-area: main; }
  .table-row .tr-seats { grid-area: seats; }
  .table-row > .pill { grid-area: pill; justify-self: start; }
  .table-row .tr-act { grid-area: act; }
  .table-row .tr-count { min-width: 0; }
  .table-row .tr-seats .av:nth-child(n+5), .table-row .tr-seats .more { display: none; }
  .sec-head { flex-wrap: wrap; row-gap: 6px; margin: 22px 0 12px; }
  .sec-head h2 { flex: 1 1 100%; font-size: 20px; }
  .pm-art { width: 72px; height: 46px; }
  .pm-head h2 { font-size: 20px; }
  .pm-how span, .pm-how { font-size: 11.5px; padding: 5px 8px; }
  .map-cards { grid-template-columns: 1fr; }
  .cx-main { width: 100%; }
  .cx-clock { font-size: 18px; min-width: 70px; }
  .ck-board, .rv-board, .ld-board { width: 100%; min-width: 0; }
  .ck-board > *, .rv-board > * { min-width: 0; min-height: 0; }
  .ld-board { padding: 6px; gap: 2px; }
  .f4-players { gap: 6px; max-width: 100%; }
  .f4-players .f4-vs { font-size: 13px; }
  .f4-player, .ck-player { padding: 4px 10px 4px 5px; gap: 6px; min-width: 0; }
  .f4-player b, .ck-player b { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
  .ck-player { padding: 6px 10px 6px 8px; }
  .adm-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px 16px; padding: 0 12px 6px; -webkit-overflow-scrolling: touch; }
  .adm-tabs a { flex: none; padding: 8px 12px; font-size: 13px; }
  .texts-bar select, .texts-bar .search { max-width: none; flex: 1 1 100%; }
  .gcfg-title .muted { flex-basis: 100%; }
}
@media (min-width: 721px) and (max-width: 1100px) {
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ═══════════════════════════════════════════════════════════
   v2 — animations toolkit, 3D dice, Tycoon board, end-game & trade windows
   ═══════════════════════════════════════════════════════════ */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 140; overflow: hidden; }
.fx-fly { position: absolute; left: 0; top: 0; will-change: transform; }
.fx-float { position: absolute; font-weight: 900; font-size: 18px; white-space: nowrap; text-shadow: 0 2px 6px rgba(0,0,0,.65), 0 0 2px rgba(0,0,0,.8); will-change: transform, opacity; font-variant-numeric: tabular-nums; }
.fx-float.up { color: #4ADE80; }
.fx-float.down { color: #FF6B81; }
.fx-float.gold { color: var(--gold); }
.fx-float.info { color: #fff; }
.fx-float.lg { font-size: 26px; }
.fx-ghost { position: absolute; display: grid; place-items: center; }

/* 3D dice */
.d3 { --s: 44px; position: relative; display: inline-block; width: var(--s); height: var(--s); perspective: calc(var(--s) * 9); flex: none; padding: 0; border: 0; background: none; color: inherit; }
.d3.sm { --s: 30px; } .d3.md { --s: 40px; } .d3.lg { --s: 52px; } .d3.xl { --s: 64px; }
.d3::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: -18%; height: 24%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.42), transparent); pointer-events: none; }
.d3-t { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-17deg) rotateY(24deg); }
.d3-c { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.d3-f { position: absolute; inset: 0; border-radius: 17%; background: radial-gradient(circle at 30% 25%, #fff, #F3F3F8 58%, #D9DAE6); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), inset 0 -2px 5px rgba(0,0,0,.08); backface-visibility: hidden; }
.d3-f.f1 { transform: translateZ(calc(var(--s) / 2)); }
.d3-f.f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.d3-f.f2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.d3-f.f5 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.d3-f.f3 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.d3-f.f4 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.d3-f b { position: absolute; width: 18%; height: 18%; margin: -9% 0 0 -9%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #424866, #12152B); box-shadow: inset 0 1px 1px rgba(0,0,0,.5), 0 .5px 0 rgba(255,255,255,.8); }
.d3-f.f1 b { width: 25%; height: 25%; margin: -12.5% 0 0 -12.5%; background: radial-gradient(circle at 40% 35%, #FF7A6B, #D7263D); }
.d3-core, .d3-c::before, .d3-c::after { content: ''; position: absolute; inset: 2%; background: #D3D4E1; border-radius: 8%; }
.d3-core { transform: rotateY(90deg); }
.d3-c::before { transform: rotateX(90deg); }
.d3.roll { animation: d3hop .95s ease-out var(--dl, 0ms) both; }
.d3.roll .d3-c { animation: d3spin .95s cubic-bezier(.18,.7,.25,1) var(--dl, 0ms) both; }
.d3.held .d3-f { background: radial-gradient(circle at 30% 25%, #FFF8E1, #FFE7A3 58%, #F2C25A); }
.d3.held::before { content: ''; position: absolute; inset: -6px; border-radius: 26%; box-shadow: 0 0 0 2.5px var(--gold), 0 0 16px color-mix(in srgb, var(--gold) 55%, transparent); }
button.d3 { cursor: pointer; }
button.d3:disabled { cursor: default; }
@keyframes d3spin { from { transform: rotateX(calc(var(--rx) + var(--sx) * 360deg)) rotateY(calc(var(--ry) + var(--sy) * 360deg)); } to { transform: rotateX(var(--rx)) rotateY(var(--ry)); } }
@keyframes d3hop { 0% { transform: translate(-70%, -110%) scale(.7); opacity: 0; } 14% { opacity: 1; } 48% { transform: translate(0, 0) scale(1); } 60% { transform: translateY(-24%); } 74% { transform: translateY(0); } 85% { transform: translateY(-7%); } 100% { transform: none; } }

/* ── Tycoon board ─────────────────────────────────────────── */
.ty-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.ty-board-col { position: relative; min-width: 0; }
.ty-board-scroll { width: min(100%, calc(100svh - var(--top-h) - 96px)); min-width: min(100%, 300px); margin: 0 auto; padding: 9px; }
.ty-board { --cream: #FBF5E6; --ink: #1B1F3B; --lines: rgba(27,31,59,.34);
  position: relative; display: grid; width: 100%; aspect-ratio: 1; container-type: inline-size; color: var(--ink);
  background: var(--cream); border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 2px #D8B56A, 0 0 0 8px #18204A, 0 0 0 9px rgba(255,255,255,.1), 0 26px 60px rgba(0,0,0,.55); }
.ty-t { position: relative; display: flex; min-width: 0; min-height: 0; padding: 0; border: 0; background: var(--cream); color: var(--ink); text-align: center;
  box-shadow: inset 0 0 0 .5px var(--lines); overflow: hidden; font-family: var(--font); line-height: 1.1; cursor: pointer; }
.ty-t:hover { background: #FFFBF0; z-index: 2; }
.ty-t.s-b { flex-direction: column; }
.ty-t.s-t { flex-direction: column-reverse; }
.ty-t.s-l { flex-direction: row-reverse; }
.ty-t.s-r { flex-direction: row; }
.ty-band { flex: none; display: flex; align-items: center; justify-content: center; gap: 5%; background: var(--gc); box-shadow: inset 0 0 0 .5px var(--lines); }
.s-b .ty-band, .s-t .ty-band { height: 22%; width: 100%; }
.s-l .ty-band, .s-r .ty-band { width: 22%; height: 100%; flex-direction: column; }
.ty-body { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: 4% 4%; gap: 1px; }
.s-t .ty-body { flex-direction: column-reverse; }
/* side columns: icon on the outer edge (tokens stand there), name & price towards the band */
.s-l .ty-body, .s-r .ty-body { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: center; column-gap: 4%; padding: 4% 5%; }
.s-r .ty-body { grid-template-columns: minmax(0, 1fr) auto; }
.s-l .ty-ic, .s-r .ty-ic { grid-row: 1 / 3; }
.s-l .ty-ic { grid-column: 1; }
.s-r .ty-ic { grid-column: 2; }
.s-l .ty-nm, .s-l .ty-code, .s-l .ty-pr, .s-l .ty-own { grid-column: 2; }
.s-r .ty-nm, .s-r .ty-code, .s-r .ty-pr, .s-r .ty-own { grid-column: 1; }
.s-l .ty-nm, .s-r .ty-nm, .s-l .ty-code, .s-r .ty-code { grid-row: 1; }
.s-l .ty-pr, .s-r .ty-pr, .s-l .ty-own, .s-r .ty-own { grid-row: 2; }
.s-l .ty-nm, .s-r .ty-nm, .s-l .ty-code, .s-r .ty-code { align-self: end; }
.s-l .ty-pr, .s-r .ty-pr, .s-l .ty-own, .s-r .ty-own { align-self: start; justify-self: center; margin-top: 2px; }
.ty-ic { font-size: max(11px, 2.15cqi); line-height: 1; }
.ty-nm { font-size: max(6.5px, 1.08cqi); font-weight: 800; text-transform: uppercase; letter-spacing: .015em; line-height: 1.08; overflow-wrap: anywhere; max-width: 100%; }
.ty-code { display: none; font-size: max(7px, 2.05cqi); font-weight: 900; letter-spacing: .02em; line-height: 1; }
.ty-pr { font-size: max(6.5px, 1.05cqi); font-weight: 700; color: #4A5072; font-variant-numeric: tabular-nums; }
.ty-own { display: grid; place-items: center; min-width: max(13px, 2.5cqi); height: max(13px, 2.5cqi); padding: 0 2px; border-radius: 999px; background: var(--own); color: #fff; font-size: max(8px, 1.35cqi); font-weight: 900; box-shadow: 0 0 0 max(1.5px, .22cqi) #fff, 0 1px 3px rgba(0,0,0,.3); line-height: 1; }
.ty-t.owned { background: color-mix(in srgb, var(--own) 13%, var(--cream)); }
.ty-t.owned.s-b { box-shadow: inset 0 calc(-1 * max(3px, .45cqi)) 0 var(--own), inset 0 0 0 .5px var(--lines); }
.ty-t.owned.s-t { box-shadow: inset 0 max(3px, .45cqi) 0 var(--own), inset 0 0 0 .5px var(--lines); }
.ty-t.owned.s-l { box-shadow: inset max(3px, .45cqi) 0 0 var(--own), inset 0 0 0 .5px var(--lines); }
.ty-t.owned.s-r { box-shadow: inset calc(-1 * max(3px, .45cqi)) 0 0 var(--own), inset 0 0 0 .5px var(--lines); }
.ty-t.mort .ty-body { opacity: .5; }
.ty-t.mort::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(27,31,59,.13) 0 3px, transparent 3px 8px); pointer-events: none; }
.ty-t.here::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,201,60,.35), transparent 70%); pointer-events: none; }
.ty-t.pending { z-index: 3; }
.ty-t.pending::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 max(2px, .45cqi) #F59E0B; animation: pendingO .9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes pendingO { from { opacity: .25; } to { opacity: 1; } }
.ty-t.stamp { z-index: 6; }
.k-chance .ty-body { background: linear-gradient(180deg, rgba(255,159,67,.14), rgba(255,159,67,.05)); }
.k-chest .ty-body { background: linear-gradient(180deg, rgba(79,123,255,.12), rgba(79,123,255,.04)); }
.k-chance .ty-ic, .k-chest .ty-ic, .k-teleport .ty-ic { font-size: max(13px, 2.9cqi); }
.k-tax .ty-ic { font-size: max(12px, 2.5cqi); }
.house, .hotel { display: block; flex: none; }
.ty-band .house { width: max(4px, 1.05cqi); height: max(4px, 1.05cqi); background: #16A34A; clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%); animation: popIn .4s cubic-bezier(.2,1.6,.4,1); }
.ty-band .hotel { width: max(8px, 2.2cqi); height: max(5px, 1.25cqi); background: #DC2626; clip-path: polygon(50% 0, 100% 35%, 100% 100%, 0 100%, 0 35%); animation: popIn .45s cubic-bezier(.2,1.6,.4,1); }
.s-l .ty-band .hotel, .s-r .ty-band .hotel { width: max(5px, 1.25cqi); height: max(8px, 2.2cqi); clip-path: none; border-radius: 2px; }
/* corners */
.ty-corner { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3%; padding: 6%; }
.ty-corner b { font-size: max(7px, 1.45cqi); font-weight: 900; text-transform: uppercase; line-height: 1.05; }
.ty-corner small { font-size: max(6.5px, 1.15cqi); font-weight: 800; color: #4A5072; }
.cc-ic { font-size: max(16px, 4.4cqi); line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.c-start { background: radial-gradient(circle at 70% 70%, rgba(229,72,77,.16), transparent 70%); }
.c-start b { font-size: max(11px, 3.1cqi); color: #D7263D; letter-spacing: .02em; font-family: var(--display); }
.c-start small { color: #16A34A; font-size: max(7px, 1.35cqi); }
.cs-arrow { display: block; width: 62%; height: 18%; background: #D7263D; clip-path: polygon(0 50%, 28% 0, 28% 30%, 100% 30%, 100% 70%, 28% 70%, 28% 100%); }
.c-jail { display: block; padding: 0; }
.cj-cell { position: absolute; right: 0; top: 0; width: 64%; height: 64%; display: grid; place-items: center; background: #F7903A; box-shadow: inset 0 0 0 .5px var(--lines), inset 0 -6px 12px rgba(0,0,0,.12); }
.cj-bars { position: absolute; inset: 12%; background: repeating-linear-gradient(90deg, rgba(27,31,59,.85) 0 7%, transparent 7% 22%); border-radius: 2px; opacity: .55; }
.cj-ic { position: relative; font-size: max(14px, 3.3cqi); }
.c-jail > b { position: absolute; right: 0; top: 66%; width: 64%; text-align: center; font-size: max(6.5px, 1.2cqi); }
.c-jail > small { position: absolute; left: 0; bottom: 7%; width: 100%; text-align: center; font-size: max(6px, 1.05cqi); text-transform: uppercase; color: #6B5B3E; }
.c-park .pot { padding: 1px 6px; border-radius: 999px; background: #16A34A; color: #fff; }
.c-go .cc-ic { transform: rotate(-12deg); }
/* centre */
.ty-center { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 42%, #FFFDF7 0%, #F5ECD7 72%, #EADCBC 100%); box-shadow: inset 0 0 0 .5px var(--lines), inset 0 0 5cqi rgba(150,110,50,.18); }
.ty-center-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: max(6px, 1.9cqi); padding: 5cqi 6cqi; }
.ty-deck { position: absolute; width: 19cqi; height: 12cqi; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3cqi; border-radius: 1.4cqi; border: max(1.5px, .3cqi) dashed rgba(27,31,59,.28); background: rgba(255,255,255,.45); color: rgba(27,31,59,.6); transform: rotate(-45deg); }
.ty-deck span { font-size: 3.3cqi; line-height: 1; }
.ty-deck b { font-size: 1.25cqi; text-transform: uppercase; letter-spacing: .08em; }
.ty-deck.d-chance { left: 3cqi; top: 6cqi; }
.ty-deck.d-chest { right: 3cqi; bottom: 6cqi; }
.ty-emblem { display: flex; flex-direction: column; align-items: center; gap: .5cqi; transform: rotate(-5deg); }
.te-ic { font-size: max(18px, 4.6cqi); line-height: 1; filter: drop-shadow(0 3px 3px rgba(0,0,0,.18)); }
.ty-emblem b { font-family: var(--display); font-weight: 800; font-size: max(15px, 5.4cqi); letter-spacing: .1em; line-height: 1; color: #FFE9B8; padding: .7cqi 2.6cqi .8cqi; border-radius: 1.6cqi;
  background: linear-gradient(135deg, #1F2A5C, #2E3E80); box-shadow: 0 .55cqi 0 #0E1430, 0 1.4cqi 2.4cqi rgba(14,20,48,.3), inset 0 1px 0 rgba(255,255,255,.2); text-shadow: 0 .3cqi 0 rgba(0,0,0,.35); }
.ty-emblem small { font-size: max(9px, 1.35cqi); font-weight: 800; color: #7A6744; text-transform: uppercase; letter-spacing: .05em; margin-top: .6cqi; text-align: center; }
.ty-dice { display: flex; gap: max(10px, 2.6cqi); margin: max(2px, .6cqi) 0; }
.ty-dice .d3.lg { --s: max(30px, 6.8cqi); }
.ty-stage { display: flex; flex-direction: column; align-items: center; gap: 9px; width: 100%; }
.ty-act { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: popIn .3s ease; }
.ty-act .your-turn { display: inline-flex; align-items: center; gap: 6px; color: #C2410C; animation: none; }
.ty-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ty-center .btn-ghost { color: var(--ink); border-color: rgba(27,31,59,.28); background: rgba(255,255,255,.55); }
.ty-center .btn-ghost:hover:not(:disabled) { background: #fff; color: var(--ink); }
.ty-center .ring.sm { --ring: #F7903A; }
.ty-roll { box-shadow: 0 8px 22px rgba(247,144,58,.45), inset 0 1px 0 rgba(255,255,255,.3); }
.ty-wait { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: rgba(27,31,59,.07); font-weight: 700; font-size: 13.5px; }
.ty-hint { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #7A6744; text-align: center; }
.ty-hint .ic { width: 14px; height: 14px; }
.ty-log { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: max(10px, 1.32cqi); color: #8A7A58; text-align: center; max-width: 92%; }
.ty-log span { animation: slideIn .35s ease; }
.ty-log span:first-child { color: var(--ink); font-weight: 650; }
.ty-pending { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 999px; background: rgba(79,123,255,.13); color: #26368A; font-weight: 700; font-size: 12.5px; }
.ty-pending .ic { width: 15px; height: 15px; }
.ty-card { width: min(100%, 280px); border-radius: 14px; overflow: hidden; background: #fff; text-align: center; box-shadow: 0 12px 26px rgba(90,60,20,.28), 0 0 0 1px rgba(0,0,0,.05); animation: tyCardIn .75s cubic-bezier(.2,1.1,.3,1) both; }
.tc-head { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; color: #fff; font-weight: 900; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.tc-head span { font-size: 17px; }
.deck-chance .tc-head { background: linear-gradient(135deg, #FFA94D, #F2672E); }
.deck-chest .tc-head { background: linear-gradient(135deg, #5B86FF, #2F4FD9); }
.ty-card p { padding: 10px 14px 4px; font-weight: 750; font-size: 14px; line-height: 1.32; }
.ty-card small { display: block; padding: 0 10px 9px; color: #9A8C6E; font-size: 11px; font-weight: 600; }
@keyframes tyCardIn { 0% { transform: perspective(700px) translate(-40%, -60%) rotate(-45deg) rotateY(180deg) scale(.5); opacity: 0; } 55% { transform: perspective(700px) rotateY(-10deg) scale(1.04); opacity: 1; } 100% { transform: none; } }
.ty-mdeed { width: 168px; border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 10px 22px rgba(90,60,20,.24), 0 0 0 1px rgba(0,0,0,.05); animation: popIn .35s cubic-bezier(.2,1.4,.4,1); }
.md-band { width: 100%; padding: 5px; background: var(--gc); font-size: 18px; line-height: 1.2; }
.ty-mdeed b { padding: 6px 8px 0; font-size: 13.5px; text-transform: uppercase; line-height: 1.15; }
.md-price { font-weight: 900; font-size: 17px; color: #15803D; }
.ty-mdeed small { padding: 0 8px 8px; color: #7A6744; font-size: 11.5px; font-weight: 600; }
/* tokens */
.ty-tokens { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.ty-tk { position: absolute; width: max(17px, 4cqi); height: max(17px, 4cqi); transform: translate(-50%, -50%); transition: left var(--td, .45s) cubic-bezier(.35,.7,.35,1), top var(--td, .45s) cubic-bezier(.35,.7,.35,1); }
.ty-tk i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font-style: normal; font-size: max(10px, 2.3cqi); line-height: 1;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--tc) 55%, #fff), var(--tc) 58%, color-mix(in srgb, var(--tc) 65%, #000));
  box-shadow: 0 0 0 max(1.5px, .3cqi) #fff, 0 max(2px, .5cqi) max(4px, 1cqi) rgba(0,0,0,.45); }
.ty-tk.cur { z-index: 2; }
.ty-tk.cur::before { content: ''; position: absolute; inset: -32%; border-radius: 50%; border: max(2px, .35cqi) solid var(--tc); animation: tkRing 1.4s ease-out infinite; }
@keyframes tkRing { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.ty-tk.jailed i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-linear-gradient(90deg, rgba(27,31,59,.7) 0 2px, transparent 2px 6px); }
.ty-toolbar { display: none; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 4px 0; }
/* compact board (phones): icons + short codes */
@container (max-width: 560px) {
  .ty-nm { display: none; }
  .ty-code { display: block; }
  .ty-pr { font-size: max(6.5px, 1.6cqi); }
  .ty-body { padding: 3% 2%; justify-content: center; gap: 4%; }
  .s-l .ty-body, .s-r .ty-body { gap: 1px; }
  .ty-deck, .ty-log { display: none; }
  .ty-emblem b { letter-spacing: .06em; }
  .ty-corner b { font-size: max(6.5px, 1.75cqi); }
  .c-jail > b, .c-jail > small { display: none; }
  .ty-center-in { padding: 3cqi; }
}
@container (max-width: 400px) {
  .ty-emblem small { display: none; }
  .ty-pr { display: none; }
  .k-tax .ty-ic, .k-rail .ty-ic, .k-util .ty-ic { font-size: 11px; }
}
/* side panel */
.ty-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ty-players { display: flex; flex-direction: column; gap: 8px; }
.ty-pl { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 9px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, background .25s; }
.ty-pl.acting { border-color: color-mix(in srgb, var(--tc) 75%, transparent); background: color-mix(in srgb, var(--tc) 13%, var(--bg-2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 16%, transparent); }
.ty-pl.you .ty-pl-name::after { content: ''; flex: none; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: var(--primary); }
.ty-pl.out { opacity: .45; }
.ty-pl-tk { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--tc) 55%, #fff), var(--tc) 58%, color-mix(in srgb, var(--tc) 65%, #000)); box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,.35); }
.ty-pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ty-pl-name { display: flex; align-items: center; gap: 4px; font-size: 14.5px; min-width: 0; }
.ty-pl-name span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-pl-name i { font-style: normal; font-size: 13px; flex: none; }
.ty-sets { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 14px; }
.ts { display: inline-flex; gap: 1.5px; padding: 2px; border-radius: 5px; background: rgba(0,0,0,.28); }
.ts i { width: 7px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--gc) 28%, transparent); }
.ts i.on { background: var(--gc); }
.ts.full { box-shadow: 0 0 0 1.5px var(--gc); }
.ts-ic { font-size: 12px; line-height: 1; }
.ty-pl-money { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ty-pl-money b { font-size: 16px; color: #8EF0BE; font-variant-numeric: tabular-nums; display: inline-block; }
.ty-pl-money small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ty-pl-trade { flex: none; color: var(--text-2); border: 1px solid var(--line-2); }
.ty-mine { padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ty-mine-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ty-mine-head h4 { margin: 0; display: flex; align-items: center; gap: 6px; }
.ty-mine-head h4 small { padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.ty-sets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
.ty-set { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(3,6,20,.35); border: 1px solid color-mix(in srgb, var(--gc) 38%, transparent); }
.ty-set.full { border-color: var(--gc); box-shadow: 0 0 16px color-mix(in srgb, var(--gc) 22%, transparent); }
.ty-set-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--text-2); font-weight: 700; }
.ty-set-head span { display: flex; gap: 3px; }
.ty-set-head i { width: 10px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--gc) 25%, transparent); }
.ty-set-head i.on { background: var(--gc); }
.ty-deed { position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; border-radius: 10px; overflow: hidden; background: #FBF5E6; color: #1B1F3B; box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform .15s; }
.ty-deed:hover { transform: translateY(-2px); }
.dd-band { height: 18px; display: flex; align-items: center; justify-content: center; gap: 3px; background: var(--gc); color: #fff; font-size: 12px; }
.dd-band .house { width: 9px; height: 9px; background: #16A34A; clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%); filter: drop-shadow(0 0 1px #fff); }
.dd-band .hotel { width: 16px; height: 10px; background: #DC2626; clip-path: polygon(50% 0, 100% 35%, 100% 100%, 0 100%, 0 35%); }
.dd-name { padding: 6px 8px 0; font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .015em; line-height: 1.15; }
.dd-name em { font-style: normal; margin-right: 4px; }
.dd-rent { padding: 2px 8px 7px; font-size: 11.5px; color: #4A5072; font-weight: 650; }
.ty-deed.mort { filter: grayscale(.75); opacity: .7; }
.ty-deed.can { box-shadow: 0 0 0 2px #16A34A, 0 3px 8px rgba(0,0,0,.3); }
.dd-plus { position: absolute; right: 5px; top: 22px; width: 18px; height: 18px; border-radius: 50%; background: #16A34A; color: #fff; font-style: normal; font-weight: 900; font-size: 14px; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.ty-rules { display: flex; flex-wrap: wrap; gap: 6px; }
/* title deed window */
.modal.deed-modal { padding: 0 0 4px; overflow: auto; }
.deed { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 18px; }
.deed-head { margin: 0 -20px; padding: 28px 46px 16px; background: var(--gc); color: #fff; text-align: center; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.deed-head.plain { background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); }
.deed-head small { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.deed-head h2 { margin-top: 4px; font-size: 23px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.deed-own { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.deed-own b { font-size: 21px; color: var(--gold); }
.deed-owner { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.deed-owner i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; background: var(--tc); box-shadow: 0 0 0 2px #fff; }
.deed-note { font-size: 13px; color: var(--text-2); text-align: center; }
.deed-here { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.deed-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.rent-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rent-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rent-table td:last-child { text-align: right; font-weight: 800; }
.rent-table tr.on td { background: color-mix(in srgb, var(--primary) 18%, transparent); }
/* trading */
.trade { display: flex; flex-direction: column; gap: 14px; }
.trade h2 { display: flex; align-items: center; gap: 8px; padding-right: 30px; }
.tr-who { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tr-person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); transition: background .15s, transform .15s; }
.tr-person:hover { background: var(--surface-2); transform: translateY(-2px); }
.tr-person i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 24px; background: var(--tc); box-shadow: 0 0 0 3px #fff; }
.tr-person small { color: #8EF0BE; font-weight: 700; }
.tr-cols { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.tr-arrow { align-self: center; font-size: 22px; color: var(--muted); }
.tr-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border-radius: 16px; background: rgba(3,6,20,.35); border: 1px solid var(--line); }
.tr-col h4 { margin: 0; }
.tr-deeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; max-height: 250px; overflow: auto; padding: 3px; }
.tr-deed { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 8px 7px; border-radius: 9px; overflow: hidden; background: #FBF5E6; color: #1B1F3B; text-align: left; opacity: .78; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .12s, opacity .12s, box-shadow .12s; }
.tr-deed:hover { opacity: 1; }
.trd-band { align-self: stretch; height: 8px; margin: 0 -8px 4px; background: var(--gc); }
.trd-ic { position: absolute; right: 6px; top: 12px; font-size: 13px; }
.tr-deed b { font-size: 11px; text-transform: uppercase; line-height: 1.12; padding-right: 16px; }
.tr-deed small { font-size: 10.5px; color: #4A5072; font-weight: 650; }
.tr-deed.on { opacity: 1; transform: translateY(-1px); box-shadow: 0 0 0 2.5px var(--primary), 0 6px 14px rgba(0,0,0,.35); }
.tr-deed.mort { filter: grayscale(.6); }
.trd-check { position: absolute; right: 4px; bottom: 4px; width: 17px; height: 17px; border-radius: 50%; display: none; place-items: center; background: var(--primary); color: var(--on-primary); }
.tr-deed.on .trd-check { display: grid; }
.trd-check .ic { width: 11px; height: 11px; stroke-width: 3; }
.tr-cash { display: flex; align-items: center; gap: 6px; font-weight: 800; flex-wrap: wrap; }
.tr-cash .ic { width: 15px; height: 15px; color: var(--muted); }
.tr-cash input { width: 110px; padding: 8px 10px; }
.tr-cash small { color: var(--muted); font-weight: 600; }
.tr-cards { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.tr-cards .stepper button { width: 28px; height: 28px; }
.tro-box { padding: 12px; border-radius: 14px; background: rgba(3,6,20,.35); border: 1px solid var(--line); }
.tro-box h4 { margin: 0 0 8px; }
.tro-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tro-deed { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px 6px 10px; border-radius: 8px; background: #FBF5E6; color: #1B1F3B; font-weight: 800; font-size: 12.5px; box-shadow: inset 5px 0 0 var(--gc); }
.tro-cash { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--green) 16%, transparent); color: #9FF0C9; font-weight: 800; }
@media (max-width: 640px) {
  .tr-cols { grid-template-columns: minmax(0, 1fr); }
  .tr-arrow { justify-self: center; transform: rotate(90deg); }
}
/* end of game */
.end-modal { display: flex; flex-direction: column; gap: 12px; }
.end-modal h2 { display: flex; align-items: center; gap: 8px; padding-right: 30px; }
.end-opts { display: flex; flex-direction: column; gap: 8px; }
.end-opt { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); text-align: left; transition: background .15s, border-color .15s, transform .12s; }
.end-opt:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.end-opt:active { transform: scale(.99); }
.end-opt > .ic { color: var(--muted); }
.end-opt.danger:hover { border-color: rgba(244,63,94,.6); background: rgba(244,63,94,.08); }
.eo-ic { width: 38px; font-size: 26px; text-align: center; flex: none; }
.eo-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eo-txt small { color: var(--muted); font-size: 12.5px; }
.end-shares { padding: 10px 12px; border-radius: 14px; background: rgba(3,6,20,.35); border: 1px solid var(--line); }
.end-shares h4 { margin: 0 0 6px; }
.es-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.es-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-mode { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); font-size: 16px; }
.vote-mode span { font-size: 26px; }
.vote-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.vote-list li { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 10px; background: var(--surface); font-weight: 600; }
.vote-list .ic { width: 16px; height: 16px; }
.end-btn .ic { width: 15px; height: 15px; }
@media (max-width: 1180px) {
  .ty-wrap { grid-template-columns: minmax(0, 1fr); }
  .ty-board-scroll { width: min(100%, 720px, calc(100svh - var(--top-h) - 70px)); }
  .ty-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
}
@media (max-width: 700px) {
  .ty-board-scroll { width: 100%; padding: 5px; }
  .ty-board { border-radius: 6px; box-shadow: 0 0 0 1.5px #D8B56A, 0 0 0 5px #18204A, 0 16px 34px rgba(0,0,0,.5); }
  .ty-toolbar { display: flex; }
  .ty-wrap.zoomed .ty-board-scroll { overflow: auto; max-height: 72svh; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .ty-wrap.zoomed .ty-board { width: 820px; }
  .ty-act .btn-lg { padding: 11px 18px; font-size: 14.5px; }
  .ty-act .btn { padding: 9px 13px; font-size: 13px; }
  .ty-mdeed { width: 140px; }
  .ty-mdeed b { font-size: 12px; }
  .ty-card { width: min(100%, 230px); }
  .ty-card p { font-size: 12.5px; padding: 7px 10px 3px; }
  .ty-wait { font-size: 12.5px; }
  .ty-stage { gap: 6px; }
  .ty-side { grid-template-columns: minmax(0, 1fr); }
  .ty-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr)); }
  .ty-pl { padding: 8px; gap: 8px; }
  .ty-pl-tk { width: 32px; height: 32px; font-size: 17px; }
  .ty-pl-money b { font-size: 14.5px; }
  .ty-pl-money small { display: none; }
  .ty-pl .ty-sets { display: none; }
  .ty-sets-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 420px) {
  .ty-act .your-turn { font-size: 13px; }
  .ty-mdeed { width: 120px; }
  .md-band { font-size: 14px; padding: 3px; }
  .md-price { font-size: 14px; }
  .ty-mdeed small { display: none; }
  .ty-btns { gap: 6px; }
  .ty-act .btn { padding: 8px 11px; font-size: 12.5px; }
  .ty-act .btn-lg { padding: 10px 15px; font-size: 14px; }
}
@media (max-width: 480px) {
  .rh-ic { display: none; }
  .room-head .btn-sm { padding: 8px 10px; }
  .rh-right { gap: 2px; }
}
.auth-mail { width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent); }
.auth-mail .ic { width: 32px; height: 32px; }
.auth .form > p.small { display: flex; gap: 6px; align-items: flex-start; }
.auth .form > p.small .ic { width: 15px; height: 15px; margin-top: 1px; }
.form-ok { color: #86EFAC; font-size: 13.5px; font-weight: 600; text-align: center; }
.center-row { justify-content: center; flex-wrap: wrap; }
.code-input { font-variant-numeric: tabular-nums; }
/* owner panel: Tycoon cards, icons, e-mails */
.cards-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 14px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; margin-bottom: 14px; }
.cardx { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.cardx.off { opacity: .55; }
.ce-top { display: flex; gap: 10px; align-items: flex-start; }
.ce-icon { width: 54px; height: 54px; flex: none; border-radius: 14px; font-size: 30px; display: grid; place-items: center; background: #FBF5E6; box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform .12s; }
.ce-icon:hover { transform: scale(1.06); }
.ce-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ce-amounts { display: flex; gap: 8px; flex-wrap: wrap; }
.ce-amounts .fld { flex: 1 1 110px; }
.ce-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ce-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ce-preview { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: #FBF5E6; color: #1B1F3B; font-weight: 650; font-size: 13px; }
.ce-preview span { font-size: 17px; line-height: 1; }
.fld.sm { font-size: 12px; gap: 4px; }
.fld.sm input, .fld.sm select, .fld.sm textarea { padding: 7px 9px; font-size: 13.5px; border-radius: 10px; }
.icon-modal { display: flex; flex-direction: column; gap: 12px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; max-height: 320px; overflow: auto; padding: 2px; }
.emoji-grid button { height: 40px; border-radius: 10px; font-size: 22px; transition: background .1s, transform .1s; }
.emoji-grid button:hover { background: var(--surface-2); transform: scale(1.15); }
.ico-btn { width: 36px; height: 34px; border-radius: 10px; font-size: 19px; background: var(--surface-2); border: 1px solid var(--line-2); }
.ico-btn.set { border-color: var(--primary); }
.mail-status { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; margin: 8px 0; }
.mail-status .ic { flex: none; margin-top: 1px; }
.mail-status.log { background: color-mix(in srgb, var(--gold-2) 13%, transparent); color: #FFD9A8; border: 1px solid color-mix(in srgb, var(--gold-2) 35%, transparent); }
.mail-status.smtp, .mail-status.resend { background: rgba(34,197,94,.12); color: #86EFAC; border: 1px solid rgba(34,197,94,.35); }
.mail-prev { display: flex; flex-direction: column; gap: 8px; }
.mp-meta { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: rgba(3,6,20,.35); font-size: 13px; }
.mp-meta small { color: var(--muted); }
.mp-card { border-radius: 16px; overflow: hidden; background: #fff; color: #2A3250; }
.mp-head { background: #0E1430; padding: 14px 18px; }
.mp-body { padding: 18px 18px 6px; font: 14.5px/1.55 Arial, Helvetica, sans-serif; }
.mp-body p { margin: 0 0 12px; }
.mp-code { margin: 4px auto 16px; width: fit-content; padding: 10px 18px; border-radius: 12px; background: #0E1430; color: #fff; font: 800 26px/1 'Courier New', monospace; letter-spacing: 8px; }
.mp-foot { padding: 10px 18px 14px; border-top: 1px solid #E6E9F2; font: 12px Arial, sans-serif; color: #7A829E; }
@media (max-width: 640px) { .ce-texts { grid-template-columns: 1fr; } }
/* blackjack: chips on the felt */
.chip3d { --cc: #6366F1; display: block; width: 26px; height: 26px; border-radius: 50%; position: relative;
  background: radial-gradient(circle, var(--cc) 52%, transparent 53%), repeating-conic-gradient(#fff 0 14deg, var(--cc) 14deg 45deg);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--cc) 70%, #000), 0 2px 0 color-mix(in srgb, var(--cc) 55%, #000), 0 3px 5px rgba(0,0,0,.45); }
.chip3d::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.6); }
.chip3d.cc0 { --cc: #6366F1; } .chip3d.cc1 { --cc: #EC4899; } .chip3d.cc2 { --cc: #F59E0B; } .chip3d.cc3 { --cc: #10B981; } .chip3d.cc4 { --cc: #0EA5E9; } .chip3d.cc5 { --cc: #1F2937; }
.fx-fly.chip-fly { filter: drop-shadow(0 6px 6px rgba(0,0,0,.4)); }
.bj-spot { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.22); background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%); }
.bj-spot.has { border-color: rgba(255,214,79,.55); }
.bj-stack { position: relative; width: 26px; height: 26px; }
.bj-stack .chip3d { position: absolute; left: 0; top: 0; transform: translateY(calc(var(--k) * -3.2px)); animation: chipIn .28s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes chipIn { from { transform: translateY(calc(var(--k) * -3.2px - 14px)); opacity: 0; } }
.bj-spot > b { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.65); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.bj-seat { gap: 8px; }
.bj-cards .pc { transform-origin: 50% 80%; }
@media (max-width: 720px) {
  .bj-spot { width: 44px; height: 44px; }
  .chip3d, .bj-stack { width: 20px; height: 20px; }
  .chip3d::after { inset: 4.5px; }
}
/* chroma: messy discard pile, flying cards, fanned hand */
.ch-discard { width: 84px; height: 120px; }
.ch-under { position: absolute; inset: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
.ch-under .ch-card { width: 84px; height: 120px; animation: none; filter: brightness(.82) saturate(.9); }
.ch-topcard { position: relative; z-index: 2; transform: rotate(var(--rot)); }
.ch-topcard .ch-card { animation: none; box-shadow: inset 0 0 0 3px rgba(255,255,255,.95), 0 10px 22px rgba(0,0,0,.45); }
.fx-fly.ch-fly { width: 30px; height: 44px; }
.ch-back.fly { position: relative; display: block; left: 0; bottom: 0; width: 30px; height: 44px; margin: 0; transform: none; }
.ch-slot { --mid: calc((var(--n) - 1) / 2); --off: calc(var(--i) - var(--mid)); transform-origin: 50% 130%;
  transform: rotate(calc(var(--off) * 2.4deg)) translateY(calc(var(--off) * var(--off) * 10px / var(--n))); }
.ch-hand { padding: 26px 28px 16px; }
.ch-hand .ch-card.selected { transform: translateY(-22px); box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--primary), 0 14px 26px rgba(0,0,0,.5); }
/* poker: tall table on phones, compact plates, chips */
.pk-bet { gap: 5px; }
.pk-bet .coin { width: 16px; height: 16px; }
.pk-wrap.narrow .pk-table { aspect-ratio: auto; width: 100%; height: clamp(380px, min(136vw, calc(100svh - 330px)), 640px); min-height: 0; max-height: none; }
.pk-wrap.narrow .table-info { display: none; }
.pk-wrap.narrow .felt { inset: 12% 14% 13%; border-radius: 200px; box-shadow: 0 0 0 9px var(--rail), 0 0 0 11px #5b3a1d, inset 0 0 50px rgba(0,0,0,.45), 0 24px 50px rgba(0,0,0,.5); }
.pk-wrap.narrow .felt-logo { top: 66%; width: 110px; }
.pk-wrap.narrow .pk-center { top: 47%; width: 92%; gap: 8px; }
.pk-wrap.narrow .board { gap: 4px; }
.pk-wrap.narrow .board .pc { --w: 38px; }
.pk-wrap.narrow .pk-plate { min-width: 0; padding: 3px 9px 3px 3px; gap: 6px; }
.pk-wrap.narrow .pk-plate .av-md { width: 34px; height: 34px; font-size: 18px; }
.pk-wrap.narrow .pk-plate .ring { inset: -4px; }
.pk-wrap.narrow .pk-name { max-width: 62px; font-size: 11.5px; }
.pk-wrap.narrow .pk-stack { font-size: 11.5px; }
.pk-wrap.narrow .pk-act { font-size: 9.5px; padding: 2px 7px; bottom: -11px; }
.pk-wrap.narrow .pk-hand { font-size: 10px; top: -14px; }
.pk-wrap.narrow .pk-cards { height: 38px; }
.pk-wrap.narrow .pk-cards .pc.sm { --w: 26px; }
.pk-wrap.narrow .pk-seat.you .pk-cards { height: 62px; }
.pk-wrap.narrow .pk-bet { transform: translate(calc(-50% + var(--dx) * 74px), calc(-50% + var(--dy) * 62px)); font-size: 11px; padding: 2px 7px 2px 3px; }
.pk-wrap.narrow .dealer-btn { width: 18px; height: 18px; font-size: 10px; right: -6px; top: -6px; }
.pk-wrap.narrow .pot { font-size: 13px; padding: 4px 11px; }
.pk-wrap.narrow .win-banner { font-size: 12px; padding: 5px 10px; }
.pk-wrap.narrow .sit-btn { width: 58px; height: 58px; font-size: 11px; }
/* 3D dice inside Yatzy / Bluff Dice */
.yz-die { background: none; border: 0; padding: 6px; border-radius: 18px; }
.yz-die .d3.xl { --s: clamp(44px, 9vw, 64px); }
.yz-die.idle .d3 { opacity: .55; }
.dc-mine { gap: 12px; }
.dc-mine .d3.lg { --s: clamp(38px, 8vw, 50px); }
.d3.match .d3-f { background: radial-gradient(circle at 30% 25%, #FFF8E1, #FFE7A3 58%, #F2C25A); }
/* ── countries & cities (words) ───────────────────────────── */
.wd-wrap { width: 100%; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.wd-top { display: flex; align-items: center; gap: 18px; padding: 14px 16px; border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, #FFB443 16%, var(--bg-2)), var(--bg-2)); border: 1px solid var(--line); }
.wd-letter { --h: 92px; position: relative; width: 92px; height: var(--h); flex: none; overflow: hidden; border-radius: 22px; color: #1B1F3B;
  background: linear-gradient(145deg, #FFFDF5, #F3E3C0); box-shadow: 0 6px 0 #C79A55, 0 14px 26px rgba(0,0,0,.4), inset 0 2px 0 #fff; }
.wd-strip span { display: grid; place-items: center; height: var(--h); font-family: var(--display); font-weight: 800; font-size: calc(var(--h) * .64); line-height: 1; }
.wd-letter.rolling .wd-strip { animation: wdRoll 2.4s cubic-bezier(.12,.72,.2,1) both; }
.wd-letter:not(.rolling) { animation: popIn .35s cubic-bezier(.2,1.5,.4,1); }
@keyframes wdRoll { from { transform: translateY(0); } to { transform: translateY(calc((var(--n) - 1) * var(--h) * -1)); } }
.wd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.wd-info h3 { font-size: 20px; line-height: 1.2; }
.wd-hurry { color: #FF8A9A; }
.wd-bar { align-self: stretch; height: 10px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.wd-bar i { display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(var(--p, 1)); background: linear-gradient(90deg, #2BD99F, #FFC93C 60%, #FF6B6B); transition: transform .2s linear; }
.wd-bar.idle i { transform: scaleX(0); }
.wd-bar.hurry i { background: linear-gradient(90deg, #FF5470, #FF8A5B); }
.wd-players { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wd-pl { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.wd-pl.you { border-color: color-mix(in srgb, var(--primary) 55%, transparent); }
.wd-pl.left { opacity: .45; }
.wd-pl-main { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.wd-pl-main b { font-size: 13px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-pl-main small { font-size: 11.5px; color: var(--muted); }
.wd-badge { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.08); white-space: nowrap; }
.wd-badge .ic { width: 13px; height: 13px; }
.wd-badge.stop { background: #FF5470; color: #fff; }
.wd-badge.ok { background: rgba(43,217,159,.2); color: #8EF0BE; }
.wd-badge.pts { background: var(--grad-gold); color: #3A1F00; }
.wd-sheet { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; padding: 16px; border-radius: 22px;
  background: radial-gradient(circle at 20% 0%, #FFFFFF, #FFF8E8 70%); box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 18px 40px rgba(0,0,0,.35); }
.wd-field { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 40px 9px 12px; border-radius: 14px; background: repeating-linear-gradient(180deg, transparent 0 31px, #DCE6F5 31px 32px), #FFFEFA; border: 2px solid #EADFC6; transition: border-color .15s, background-color .15s; }
.wd-field.good { border-color: #34B36A; background-color: #F3FCF5; }
.wd-field.wrong { border-color: #E5484D; }
.wd-cat { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #8A7652; }
.wd-cat i { font-style: normal; font-size: 16px; }
input.wd-in { width: 100%; padding: 2px 0; border: 0; border-radius: 0; background: transparent; color: #1B1F3B; font-size: 21px; font-weight: 700; letter-spacing: .01em; box-shadow: none; }
input.wd-in:focus { box-shadow: none; border: 0; }
input.wd-in::placeholder { color: #CDBF9C; font-weight: 600; }
input.wd-in:disabled { color: #4A5072; cursor: default; }
.wd-mark { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 15px; font-weight: 900; color: #fff; }
.wd-field.good .wd-mark { background: #34B36A; animation: popIn .3s cubic-bezier(.2,1.6,.4,1); }
.wd-field.good .wd-mark .ic { width: 15px; height: 15px; stroke-width: 3; }
.wd-field.wrong .wd-mark { background: #E5484D; }
.wd-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-height: 64px; }
.wd-stop { min-width: 230px; font-size: 18px; letter-spacing: .02em; }
.wd-stop.btn-danger:not(:disabled) { animation: pulseScale 1.1s ease-in-out infinite; }
.wd-review { display: flex; flex-direction: column; gap: 12px; }
.wd-scroll { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); }
.wd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wd-table th, .wd-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.wd-table thead th { background: var(--bg-3); font-size: 12.5px; }
.wd-table thead th .av { vertical-align: middle; }
.wd-table thead th span { display: inline-block; vertical-align: middle; max-width: 96px; overflow: hidden; text-overflow: ellipsis; margin-left: 5px; }
.wd-table thead th.you span { color: var(--primary); }
.wd-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--bg-2); color: var(--text-2); font-weight: 700; }
.wd-table tbody th i { font-style: normal; }
.wd-table tbody tr:nth-child(even) td { background: rgba(255,255,255,.025); }
.wd-cell { min-width: 120px; }
.wd-word { font-weight: 700; }
.v-bad .wd-word, .v-down .wd-word { text-decoration: line-through; color: var(--muted); }
.v-empty .wd-word { color: var(--muted); font-weight: 500; }
.wd-cards { display: none; }
.wd-card { border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.wd-card-h { display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: var(--bg-3); font-size: 13px; font-weight: 800; color: var(--text-2); }
.wd-card-h i { font-style: normal; font-size: 15px; }
.wd-row { display: grid; grid-template-columns: auto minmax(0, .85fr) minmax(0, 1.3fr) 54px; align-items: center; gap: 8px; min-height: 42px; padding: 5px 10px 5px 12px; border-top: 1px solid var(--line); font-size: 15px; }
.wd-row-n { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-row.you .wd-row-n { color: var(--primary); font-weight: 700; }
.wd-row .wd-word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-row-x { display: flex; justify-content: flex-end; min-width: 34px; }
.wd-row-x .wd-flag { padding: 5px 10px; font-size: 14px; }
.wd-flag { margin-left: 6px; padding: 2px 7px; border-radius: 99px; font-size: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line-2); opacity: .65; transition: opacity .15s, background .15s; }
.wd-flag:hover { opacity: 1; }
.wd-flag.on { opacity: 1; background: rgba(244,63,94,.2); border-color: rgba(244,63,94,.6); }
.wd-flag i { font-style: normal; margin-left: 3px; font-weight: 800; }
.wd-flags { margin-left: 6px; font-size: 12px; color: var(--muted); }
.wd-pts { margin-left: 6px; display: inline-grid; place-items: center; min-width: 34px; padding: 2px 6px; border-radius: 8px; font-size: 12.5px; animation: popIn .45s cubic-bezier(.2,1.5,.4,1) both; }
.wd-pts.p15 { background: var(--grad-gold); color: #3A1F00; }
.wd-pts.p10 { background: rgba(43,217,159,.2); color: #8EF0BE; }
.wd-pts.p5 { background: rgba(79,123,255,.22); color: #B9C8FF; }
.wd-pts.p0 { background: rgba(255,255,255,.06); color: var(--muted); }
.wd-table tbody tr:nth-child(2) .wd-pts { animation-delay: .12s; } .wd-table tbody tr:nth-child(3) .wd-pts { animation-delay: .24s; }
.wd-table tbody tr:nth-child(4) .wd-pts { animation-delay: .36s; } .wd-table tbody tr:nth-child(5) .wd-pts { animation-delay: .48s; }
.wd-table tbody tr:nth-child(n+6) .wd-pts { animation-delay: .6s; }
.wd-sum { color: var(--gold); font-size: 15px; }
@media (max-width: 900px) and (min-width: 641px) { .wd-sheet { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wd-scroll { display: none; }
  .wd-cards { display: grid; gap: 10px; }
  .wd-top { gap: 12px; padding: 10px 12px; }
  .wd-letter { --h: 70px; width: 70px; border-radius: 18px; }
  .wd-info h3 { font-size: 16px; }
  .wd-sheet { padding: 10px; gap: 8px; grid-template-columns: 1fr; }
  input.wd-in { font-size: 19px; }
  .wd-pl-main b { max-width: 76px; }
}

/* Countries & Cities — choosing the categories */
.wd-letter.wd-q span { color: #C79A55; }
.wd-pick { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); }
.wd-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wd-pick-head p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.wd-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.wd-pc { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line-2); color: var(--muted); font-size: 14px; text-align: left; transition: background .15s, border-color .15s, color .15s, transform .12s; }
.wd-pc i { font-style: normal; font-size: 20px; line-height: 1; filter: grayscale(.9); opacity: .55; transition: filter .15s, opacity .15s; }
.wd-pc { min-height: 48px; }
.wd-pc b { min-width: 0; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.wd-pc.on { background: linear-gradient(135deg, rgba(43,217,159,.24), rgba(43,217,159,.08)); border-color: rgba(43,217,159,.75); color: var(--text); }
.wd-pc.on i, .wd-pc.fixed i { filter: none; opacity: 1; }
.wd-pc.on::after { content: '✓'; position: absolute; top: 4px; right: 7px; font-size: 11px; font-weight: 900; color: #2BD99F; }
.wd-pc.fixed { background: rgba(255,201,60,.1); border: 1.5px dashed rgba(255,201,60,.55); color: var(--text); }
.wd-pc.fixed .ic { width: 14px; height: 14px; margin-left: auto; flex: none; color: var(--gold); }
.wd-pc:disabled:not(.on) { opacity: .45; cursor: not-allowed; }
.wd-pc:disabled.on { cursor: default; }
.wd-pc:active:not(:disabled) { transform: scale(.96); }
.wd-pick-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wd-go { min-width: 240px; }
@media (max-width: 640px) {
  .wd-pick { padding: 12px; }
  .wd-pick-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wd-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .wd-pc { padding: 9px 10px; font-size: 13.5px; gap: 7px; }
  .wd-pc i { font-size: 18px; }
}
.host-ctrl .cats-box .opt-chips { justify-content: center; }

/* ── plain-HTML copy of the page for search engines (replaced as soon as the app starts) ── */
.seo-pre { max-width: 860px; margin: 0 auto; padding: 48px 22px 80px; color: var(--text-2); line-height: 1.55; }
.seo-pre h1 { font-size: 30px; color: var(--text); margin-bottom: 12px; }
.seo-pre h2 { font-size: 19px; color: var(--text); margin: 22px 0 8px; }
.seo-pre ul { padding-left: 20px; display: grid; gap: 6px; }
.seo-pre a { color: var(--gold); }

/* ── footer ── */
.sitefoot { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, #000); }
.sitefoot:empty { display: none; }
body.in-room .sitefoot { display: none; }
.sitefoot-in { max-width: 1320px; margin: 0 auto; padding: 22px 20px 26px; display: flex; flex-direction: column; gap: 12px; }
.sf-top { display: flex; align-items: flex-start; gap: 22px; }
.sf-brand { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--text); font-family: var(--display); font-size: 16px; }
.sf-games { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; padding-top: 4px; }
.sf-games a { color: var(--muted); transition: color .15s; }
.sf-games a:hover { color: var(--text); }
.sf-note { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); opacity: .85; max-width: 760px; }
.sf-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.sf-bottom .link { font-size: 12.5px; }

/* ── "install the app" ── */
.install-card { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px; border-radius: 20px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line-2); box-shadow: 0 18px 44px rgba(0,0,0,.55); animation: slideUpIn .45s cubic-bezier(.2,1.2,.4,1) both; }
.install-card img { width: 50px; height: 50px; border-radius: 13px; flex: none; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.install-card .ic-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-card .ic-txt b { font-size: 14.5px; }
.install-card .ic-txt span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.install-card .btn { flex: none; }
.install-card .ic-x { position: absolute; top: -9px; right: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line-2); }
.install-card .ic-x .ic { width: 14px; height: 14px; }
@keyframes slideUpIn { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
.pwa-modal { display: flex; flex-direction: column; gap: 16px; }
.pwa-head { display: flex; align-items: center; gap: 14px; }
.pwa-head img { width: 64px; height: 64px; border-radius: 16px; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.pwa-head h2 { font-size: 21px; margin-bottom: 3px; }
.pwa-head p { margin: 0; font-size: 13.5px; }
.pwa-perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.pwa-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pwa-step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.pwa-step div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pwa-step b { font-size: 14.5px; }
.pwa-step small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.pwa-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad-gold); color: #3A1F00; font-weight: 900; font-size: 14px; }
.pwa-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(56,189,248,.14); color: #6CC8FF; font-size: 20px; }
.pwa-ic .ic { width: 20px; height: 20px; }

/* ── game page ── */
.game-page { display: flex; flex-direction: column; gap: 18px; max-width: 1100px; }
.gp-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 26px; align-items: center; padding: 28px; border-radius: 28px; overflow: hidden; background: var(--g); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.gp-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,10,30,.05), rgba(8,10,30,.55)); pointer-events: none; }
.gp-art, .gp-text { position: relative; z-index: 1; }
.gp-art .game-art { width: 100%; max-height: 280px; object-fit: contain; filter: drop-shadow(0 16px 26px rgba(0,0,0,.35)); }
.gp-text h1 { font-size: clamp(30px, 4.4vw, 50px); margin: 12px 0 10px; line-height: 1.05; color: #fff; }
.gp-text p { color: rgba(255,255,255,.88); font-size: 16px; line-height: 1.5; margin: 0; }
.gp-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.gp-facts .pill { background: rgba(0,0,0,.25); color: #fff; border-color: rgba(255,255,255,.18); }
.gp-text .hero-cta { margin: 18px 0 0; }
.gp-h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 12px; }
.gp-h2 .ic { width: 18px; height: 18px; color: var(--gold); }
.gp-how .rich { max-width: 760px; }
.gp-tables { display: grid; gap: 8px; }
.gp-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gp-link { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; text-align: center; transition: transform .15s, border-color .15s; }
.gp-link:hover { transform: translateY(-2px); border-color: var(--line-2); }
.gp-link .gp-mini { width: 100%; height: 70px; object-fit: contain; }
@media (max-width: 720px) {
  .page { padding-bottom: 24px; }
  .sitefoot-in { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .sf-top { flex-direction: column; gap: 10px; }
  .gp-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 10px; }
  .gp-art .game-art { max-height: 170px; }
  .gp-text .hero-cta .btn { flex: 1; }
}
