/* spades.live — styles */
:root {
  --bg: #0a0e0c;
  --bg-2: #111814;
  --ink: #f5f0e4;
  --muted: #a3ada5;
  --faint: #6c776f;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --panel: rgba(13, 19, 16, 0.82);
  --panel-solid: #121a16;
  --gold: #f2c15b;
  --gold-2: #d39a2c;
  --gold-ink: #2b1d05;
  --live: #ff3d5a;
  --good: #3ddc97;
  --bad: #ff6b6b;
  --felt-1: #1c7c4c;
  --felt-2: #0c4429;
  --felt-3: #072a19;
  --rim-1: #5a3417;
  --rim-2: #2d1709;
  --back-1: #b3243a;
  --back-2: #7c1426;
  --red: #cf1f3a;
  --black: #15161c;
  --dia: var(--red);
  --club: var(--black);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --cw: 84px;
  --ch: 118px;
  color-scheme: dark;
}
body[data-felt='blue'] { --felt-1: #1f63ad; --felt-2: #0f3566; --felt-3: #081d3a; }
body[data-felt='crimson'] { --felt-1: #a02340; --felt-2: #55101f; --felt-3: #2c0810; }
body[data-felt='purple'] { --felt-1: #6441a8; --felt-2: #301c58; --felt-3: #190e30; }
body[data-felt='charcoal'] { --felt-1: #474d55; --felt-2: #23272c; --felt-3: #121417; }
body[data-back='blue'] { --back-1: #2456b3; --back-2: #122e6b; }
body[data-back='black'] { --back-1: #2a2a30; --back-2: #0e0e12; }
body[data-back='green'] { --back-1: #1f8a55; --back-2: #0c4a2b; }
body[data-back='gold'] { --back-1: #d3a034; --back-2: #7a5410; }
body.four-color { --dia: #1d5fd1; --club: #13874b; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.06);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.28); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, #ffd57a, var(--gold-2)); color: var(--gold-ink); border-color: transparent;
  box-shadow: 0 6px 20px rgba(242, 193, 91, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 8px 28px rgba(242, 193, 91, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn.big { padding: 14px 26px; font-size: 16.5px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.danger { color: #ffb3b3; border-color: rgba(255, 107, 107, 0.35); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 0.15s, transform 0.15s; position: relative; flex: none;
}
.icon-btn:hover { background: rgba(40, 52, 45, 0.95); }
.icon-btn.off { background: rgba(255, 61, 90, 0.18); border-color: rgba(255, 61, 90, 0.5); color: #ffb3bf; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--live); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.input, select.input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 193, 91, 0.18); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: #16201b; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 21px; line-height: 1;
  background: linear-gradient(145deg, #ffd57a, var(--gold-2)); color: var(--gold-ink); box-shadow: 0 4px 14px rgba(242, 193, 91, 0.3);
  transform: rotate(-8deg);
}
.logo .dot { color: var(--live); position: relative; }
.logo em { font-style: italic; font-weight: 500; color: var(--gold); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 61, 90, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(255, 61, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0); } }

/* ================================================================
   LANDING
   ================================================================ */
.landing { min-height: 100%; background:
  radial-gradient(1200px 700px at 78% 18%, rgba(28, 124, 76, 0.28), transparent 60%),
  radial-gradient(900px 600px at 5% 90%, rgba(242, 193, 91, 0.08), transparent 60%), var(--bg); overflow-x: hidden; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 16px; }
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--muted); font-weight: 500; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 48px 0 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255, 61, 90, 0.1); border: 1px solid rgba(255, 61, 90, 0.3); color: #ffc2cc; font-weight: 600; font-size: 13px; }
.hero h1, .hero .display-h { font-family: var(--display); font-size: clamp(42px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.025em; margin: 22px 0 18px; font-weight: 700; }
.hero h1 em, .hero .display-h em { color: var(--gold); font-weight: 500; }
.hero p.lede { font-size: 19px; color: #cfd6cf; max-width: 520px; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.join-inline { display: flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; background: rgba(0, 0, 0, 0.25); }
.join-inline input { border: 0; background: transparent; outline: none; width: 118px; padding: 8px 12px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; }
.join-inline input::placeholder { letter-spacing: 0.04em; text-transform: none; font-weight: 500; color: var(--faint); }
.hero-note { margin-top: 18px; color: var(--faint); font-size: 13.5px; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span::before { content: '✓ '; color: var(--good); }

.hero-art { position: relative; aspect-ratio: 1 / 0.9; }
.hero-felt {
  position: absolute; inset: 6% 2% 4%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 42%, var(--felt-1), var(--felt-2) 62%, var(--felt-3));
  box-shadow: inset 0 0 0 10px var(--rim-2), inset 0 0 0 14px #8a5a2b, inset 0 0 80px rgba(0, 0, 0, 0.55), 0 40px 90px rgba(0, 0, 0, 0.6);
}
.hero-felt::after { content: 'spades.live'; position: absolute; left: 0; right: 0; top: 57%; text-align: center; font-family: var(--display); font-style: italic; font-size: 26px; color: rgba(255, 255, 255, 0.1); }
.hero-cards { position: absolute; left: 50%; top: 42%; width: 0; height: 0; }
.hero-cards .card { position: absolute; left: calc(var(--cw) / -2); top: calc(var(--ch) / -2); transform-origin: 50% 120%; animation: fanIn 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fanIn { from { transform: translateY(60px) rotate(0deg); opacity: 0; } }
.hero-tile { position: absolute; width: 23%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.14); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); display: grid; place-items: center; animation: floaty 6s ease-in-out infinite; }
.hero-tile .ini { font-family: var(--display); font-size: 30px; font-weight: 700; color: rgba(255, 255, 255, 0.92); }
.hero-tile .nm { position: absolute; left: 8px; bottom: 6px; font-size: 11.5px; font-weight: 600; background: rgba(0, 0, 0, 0.45); padding: 2px 8px; border-radius: 99px; }
.hero-tile.speaking { box-shadow: 0 0 0 3px var(--gold), 0 16px 40px rgba(0, 0, 0, 0.5); }
@keyframes floaty { 50% { transform: translateY(-8px); } }

.section { padding: 70px 0; }
.section h2 { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; margin: 0 0 10px; line-height: 1.1; }
.section .sub { color: var(--muted); font-size: 17px; margin: 0 0 36px; max-width: 620px; }
.games-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.games-grid .game-card { grid-column: span 2; }
.games-grid .game-card:nth-child(4) { grid-column: 2 / span 2; }
.game-card {
  position: relative; border-radius: 22px; padding: 26px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(242, 193, 91, 0.4); box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4); }
.game-card .gicon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 32px; font-family: var(--display); font-weight: 700; background: #fffdf6; color: var(--black); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); margin-bottom: 18px; }
.game-card .gicon.red { color: var(--red); }
.game-card h3 { font-family: var(--display); font-size: 26px; margin: 0 0 6px; }
.game-card p { color: var(--muted); margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: #cfd6cf; }
.game-card .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.feat .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(242, 193, 91, 0.12); color: var(--gold); margin-bottom: 14px; }
.feat .fi svg { width: 22px; height: 22px; }
.feat h4 { margin: 0 0 6px; font-size: 16.5px; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; }
.rules-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rule-pill { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.rule-pill b { display: block; font-size: 14.5px; }
.rule-pill span { color: var(--muted); font-size: 13.5px; }
.rule-pill i { font-style: normal; font-size: 20px; line-height: 1.2; }
.footer { padding: 40px 0 50px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch);
  transform-origin: 50% 50%; will-change: transform;
  transition: transform var(--dur, 480ms) cubic-bezier(.2, .8, .2, 1) var(--delay, 0ms), opacity 300ms ease var(--delay, 0ms);
  pointer-events: none; perspective: 900px;
}
.card .lift { width: 100%; height: 100%; transition: transform 0.18s ease, filter 0.2s; position: relative; }
.card .flip { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 420ms cubic-bezier(.3, .7, .2, 1) calc(var(--delay, 0ms) + var(--flipDelay, 120ms)); }
.card.down .flip { transform: rotateY(180deg); }
.card .face {
  position: absolute; inset: 0; border-radius: calc(var(--cw) * 0.085); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  overflow: hidden; container-type: size;
}
.card .front { background: linear-gradient(160deg, #fffefa, #f6f1e4); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.18); color: var(--black); }
.card .back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16) 0 13%, transparent 13.5%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.09) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.09) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, var(--back-1), var(--back-2));
  box-shadow: inset 0 0 0 calc(var(--cw) * 0.05) #fbf7ec, inset 0 0 0 calc(var(--cw) * 0.065) rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.card .back::after { content: '♠'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 26cqw; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.card .front.red, .card .front .red { color: var(--red); }
.card .front.suit-D { color: var(--dia); }
.card .front.suit-C { color: var(--club); }
.idx { position: absolute; top: 4.5cqw; left: 5cqw; display: flex; flex-direction: column; align-items: center; line-height: 0.92; width: 20cqw; }
.idx.br { top: auto; left: auto; bottom: 4.5cqw; right: 5cqw; transform: rotate(180deg); }
.idx .r { font-family: var(--display); font-weight: 700; font-size: 21cqw; letter-spacing: -0.04em; }
.idx .s { font-size: 16cqw; margin-top: 1cqw; }
.pips { position: absolute; inset: 14cqw 18cqw; }
.pip { position: absolute; font-size: 19cqw; line-height: 1; transform: translate(-50%, -50%); }
.pip.flip180 { transform: translate(-50%, -50%) rotate(180deg); }
.ace { position: absolute; inset: 0; display: grid; place-items: center; font-size: 52cqw; line-height: 1; }
.ace.S { font-size: 62cqw; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15)); }
.ace.S::after { content: ''; position: absolute; width: 60cqw; height: 60cqw; border-radius: 50%; border: 0.8cqw solid rgba(211, 154, 44, 0.55); }
.court {
  position: absolute; inset: 16cqw 17cqw; border-radius: 3cqw; border: 0.9cqw solid currentColor; opacity: 1;
  background: linear-gradient(160deg, rgba(242, 193, 91, 0.25), rgba(242, 193, 91, 0.05) 45%, rgba(207, 31, 58, 0.08));
  display: grid; place-items: center; overflow: hidden;
}
.court .cl { font-family: var(--display); font-weight: 700; font-size: 44cqw; line-height: 1; font-style: italic; }
.court .cs { position: absolute; font-size: 16cqw; }
.court .cs.a { top: 4cqw; right: 6cqw; }
.court .cs.b { bottom: 4cqw; left: 6cqw; transform: rotate(180deg); }
.court::before { content: ''; position: absolute; inset: 3cqw; border: 0.5cqw solid currentColor; border-radius: 2cqw; opacity: 0.35; }
.joker { position: absolute; inset: 0; display: grid; place-items: center; }
.joker .star { font-size: 46cqw; line-height: 1; }
.joker .jt { position: absolute; top: 6cqw; left: 6cqw; writing-mode: vertical-rl; text-orientation: upright; font-family: var(--display); font-weight: 700; font-size: 11cqw; letter-spacing: -0.1em; }
.joker .jt.b { top: auto; left: auto; bottom: 6cqw; right: 6cqw; transform: rotate(180deg); }
.joker .jl { position: absolute; bottom: 22cqw; font-size: 9cqw; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.card.BJ .front { color: var(--red); background: radial-gradient(circle at 50% 45%, #fff6d8, #fffefa 60%); }
.card.LJ .front { color: var(--black); }

/* interactive states */
.card.playable { pointer-events: auto; cursor: pointer; }
.card.playable:hover .lift, .card.lifted .lift { transform: translateY(calc(var(--ch) * -0.16)); }
.card.playable .front { box-shadow: 0 0 0 2px rgba(242, 193, 91, 0.0), 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.18); }
.card.playable:hover .front, .card.lifted .front { box-shadow: 0 0 0 2px var(--gold), 0 14px 26px rgba(0, 0, 0, 0.45); }
.card.dim .lift { filter: brightness(0.62) saturate(0.7); }
.card.selected .lift { transform: translateY(calc(var(--ch) * -0.22)); }
.card.selected .front { box-shadow: 0 0 0 3px var(--gold), 0 14px 26px rgba(0, 0, 0, 0.45); }
.card.win .front { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(242, 193, 91, 0.7); }
.card.exiting { opacity: 0; }
.card.static { transition: none; }

/* ================================================================
   ROOM
   ================================================================ */
body.in-room { overflow: hidden; overscroll-behavior: none; }
.room { position: fixed; inset: 0; overflow: hidden; background:
  radial-gradient(ellipse at 50% 40%, #1a231e, #0b0f0d 70%); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.table-surface {
  position: absolute; border-radius: 50% / 46%;
  background: radial-gradient(ellipse at 50% 38%, var(--felt-1), var(--felt-2) 60%, var(--felt-3));
  box-shadow: inset 0 0 0 calc(var(--rim, 16px)) var(--rim-2), inset 0 0 0 calc(var(--rim, 16px) + 3px) #9a6a36, inset 0 0 120px rgba(0, 0, 0, 0.55), 0 40px 120px rgba(0, 0, 0, 0.65);
  transition: all 0.5s ease;
}
.table-surface::before { /* wood grain rim */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: repeating-radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 7px);
  -webkit-mask: radial-gradient(ellipse at 50% 50%, transparent calc(100% - 1px), #000 0); mask: none;
}
.table-surface::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 4px); pointer-events: none; }
.felt-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--display); font-style: italic; font-size: clamp(22px, 3.2vw, 42px); color: rgba(255, 255, 255, 0.07); pointer-events: none; white-space: nowrap; letter-spacing: -0.01em; }
.stage { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.seats-layer { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.center-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.center-layer > * { pointer-events: auto; }

/* ---------- video tiles ---------- */
.seat {
  position: absolute; left: 0; top: 0; transition: transform 0.55s cubic-bezier(.2, .8, .2, 1), width 0.4s, height 0.4s; pointer-events: auto;
}
.tile {
  position: relative; width: 100%; height: 100%; border-radius: 16px; overflow: hidden; background: #1a211d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1); transition: box-shadow 0.3s;
}
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.tile video.mirror { transform: scaleX(-1); }
.tile .avatar { position: absolute; inset: 0; display: grid; place-items: center; }
.tile .avatar .ini { width: 44%; aspect-ratio: 1; max-width: 84px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: clamp(16px, 2.2vw, 32px); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.tile .avatar .bot-face { font-size: clamp(26px, 3.4vw, 48px); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
.tile .tl { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; }
.tile .tr { position: absolute; right: 8px; top: 8px; display: flex; gap: 5px; }
.tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; text-transform: uppercase; backdrop-filter: blur(6px); }
.tag.dealer { background: #fffdf6; color: #1a1a1a; border-radius: 50%; width: 20px; height: 20px; padding: 0; display: grid; place-items: center; font-size: 11px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.tag.host { background: rgba(242, 193, 91, 0.9); color: var(--gold-ink); }
.tag.off { background: rgba(255, 61, 90, 0.85); }
.tag.muted { background: rgba(255, 61, 90, 0.85); padding: 2px 5px; }
.tag.muted svg { width: 12px; height: 12px; display: block; }
.plate {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 7px; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); font-size: 13px;
}
.plate .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.plate .nm small { font-weight: 500; color: var(--muted); }
.plate .info { flex: none; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); font-variant-numeric: tabular-nums; }
.plate .info.good { background: rgba(61, 220, 151, 0.25); color: #b5f5d8; }
.plate .info.bad { background: rgba(255, 107, 107, 0.25); color: #ffc9c9; }
.plate .info.gold { background: rgba(242, 193, 91, 0.9); color: var(--gold-ink); }
.seat.turn .tile { box-shadow: 0 0 0 3px var(--gold), 0 0 30px rgba(242, 193, 91, 0.5), 0 12px 30px rgba(0, 0, 0, 0.5); animation: turnGlow 1.6s ease-in-out infinite; }
@keyframes turnGlow { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 44px rgba(242, 193, 91, 0.75), 0 12px 30px rgba(0, 0, 0, 0.5); } }
.seat.speaking .tile { box-shadow: 0 0 0 3px var(--good), 0 12px 30px rgba(0, 0, 0, 0.5); }
.seat.turn.speaking .tile { box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px var(--good), 0 12px 30px rgba(0, 0, 0, 0.5); }
.seat.away .tile { filter: grayscale(0.8) brightness(0.7); }
.seat .team-bar { position: absolute; left: 12px; right: 12px; top: -5px; height: 4px; border-radius: 4px; }
.seat.team-0 .team-bar { background: #5ab0ff; }
.seat.team-1 .team-bar { background: #ff8a5a; }
.seat .thinking { position: absolute; left: 50%; top: 0; transform: translate(-50%, -60%); background: var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 99px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); letter-spacing: 0.02em; }
.empty-seat { width: 100%; height: 100%; border-radius: 16px; border: 2px dashed rgba(255, 255, 255, 0.22); background: rgba(0, 0, 0, 0.25); display: grid; place-items: center; gap: 6px; align-content: center; padding: 8px; text-align: center; }
.empty-seat .lbl { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.empty-seat .row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.seat-actions { position: absolute; right: 6px; bottom: 34px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.seat:hover .seat-actions { opacity: 1; }
.mini-btn { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; border: 0; background: rgba(0, 0, 0, 0.65); color: #fff; }
.mini-btn:hover { background: rgba(0, 0, 0, 0.9); }
.bubble {
  position: absolute; z-index: 45; max-width: 220px; padding: 8px 12px; border-radius: 14px; background: #fffdf6; color: #1b1b1b; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); animation: pop 0.25s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: none; overflow-wrap: anywhere;
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.float-emoji { position: absolute; font-size: 40px; pointer-events: none; z-index: 60; animation: floatUp 2.2s ease-out forwards; }
@keyframes floatUp { 0% { transform: translate(-50%, 0) scale(0.4); opacity: 0; } 15% { transform: translate(-50%, -20px) scale(1.2); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx, 0px)), var(--dy, -150px)) scale(1); opacity: 0; } }

/* ---------- HUD ---------- */
.hud { position: absolute; z-index: 40; display: flex; gap: 8px; align-items: center; }
.hud.tl { left: 14px; top: 14px; }
.hud.tr { right: 14px; top: 14px; align-items: flex-start; }
.hud.br { right: 14px; bottom: 14px; flex-direction: column-reverse; }
.room-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.room-chip .code { font-weight: 800; letter-spacing: 0.14em; font-size: 13px; }
.room-chip .logo { font-size: 16px; gap: 7px; }
.room-chip .logo-mark { width: 24px; height: 24px; font-size: 15px; border-radius: 7px; }
.scoreboard { min-width: 200px; padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; font-size: 13px; }
.scoreboard .sb-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; gap: 12px; }
.sb-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; padding: 3px 0; }
.sb-row .sw { width: 10px; height: 10px; border-radius: 3px; }
.sb-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.sb-row .sc { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; }
.sb-row .sub { color: var(--muted); font-size: 11.5px; font-weight: 500; margin-left: 4px; }
.sb-row.lead .sc { color: var(--gold); }
.sb-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.menu { position: absolute; z-index: 70; min-width: 230px; padding: 6px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.menu button { display: flex; width: 100%; text-align: left; gap: 10px; padding: 9px 12px; border: 0; background: transparent; border-radius: 9px; align-items: center; }
.menu button:hover { background: rgba(255, 255, 255, 0.07); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.emoji-bar { display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.emoji-bar button { border: 0; background: transparent; font-size: 24px; width: 42px; height: 42px; border-radius: 50%; transition: transform 0.15s, background 0.15s; }
.emoji-bar button:hover { background: rgba(255, 255, 255, 0.08); transform: scale(1.18); }

/* ---------- center panels ---------- */
.panel {
  position: absolute; transform: translate(-50%, -50%); width: max-content; border-radius: 20px; padding: 18px 20px;
  background: var(--panel); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow); animation: panelIn 0.35s cubic-bezier(.2, .8, .2, 1) both; max-width: calc(100vw - 24px); z-index: 25;
}
@keyframes panelIn { from { opacity: 0; transform: translate(-50%, -44%) scale(0.96); } }
.panel h3 { margin: 0 0 4px; font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }
.panel .hint { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.bid-grid { display: grid; grid-template-columns: repeat(7, 44px); gap: 7px; margin: 10px 0 12px; justify-content: center; }
.bid-grid button { height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.06); font-weight: 800; font-size: 16px; transition: all 0.15s; font-variant-numeric: tabular-nums; }
.bid-grid button:hover:not(:disabled) { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); transform: translateY(-2px); }
.bid-grid button.sug { border-color: rgba(242, 193, 91, 0.6); }
.bid-grid button:disabled { opacity: 0.25; cursor: not-allowed; }
.bid-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.turn-pill { position: absolute; transform: translate(-50%, -50%); padding: 7px 16px; border-radius: 99px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 13.5px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); animation: pop 0.3s cubic-bezier(.2, 1.4, .4, 1) both; white-space: nowrap; pointer-events: none; }
.status-pill { position: absolute; transform: translate(-50%, -50%); padding: 7px 16px; border-radius: 99px; background: rgba(0, 0, 0, 0.5); color: #e8ece8; font-weight: 600; font-size: 13.5px; white-space: nowrap; pointer-events: none; backdrop-filter: blur(6px); }
.table-info { position: absolute; transform: translate(-50%, -50%); display: flex; gap: 10px; pointer-events: none; }
.table-info .ti { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.32); font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.table-info .ti.on { background: rgba(242, 193, 91, 0.85); color: var(--gold-ink); }
.suit-badge { position: absolute; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: #fffdf6; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); pointer-events: none; animation: pop 0.35s cubic-bezier(.2, 1.4, .4, 1) both; }
.dir-badge { position: absolute; transform: translate(-50%, -50%); font-size: 28px; color: rgba(255, 255, 255, 0.35); pointer-events: none; transition: transform 0.5s; }
.draw-badge { position: absolute; transform: translate(-50%, -50%); padding: 4px 12px; border-radius: 99px; background: var(--live); color: #fff; font-weight: 900; font-size: 18px; pointer-events: none; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); animation: pop 0.3s both; }
.stock-hit { position: absolute; transform: translate(-50%, -50%); border-radius: 12px; cursor: pointer; z-index: 20; }
.stock-hit.on { box-shadow: 0 0 0 3px var(--gold), 0 0 30px rgba(242, 193, 91, 0.6); animation: turnGlow 1.6s infinite; }
.stock-hit .cnt { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, 0.75); white-space: nowrap; }
.suit-pick { display: grid; grid-template-columns: repeat(4, 64px); gap: 10px; margin-top: 10px; }
.suit-pick button { height: 76px; border-radius: 14px; border: 0; background: #fffdf6; font-size: 40px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.suit-pick button:hover { transform: translateY(-4px) scale(1.04); }

/* ---------- lobby ---------- */
.lobby {
  position: absolute; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100% - 32px); overflow: auto;
  border-radius: 22px; background: var(--panel); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow);
  animation: panelIn 0.4s cubic-bezier(.2, .8, .2, 1) both; scrollbar-width: thin;
}
.lobby-head { padding: 18px 20px 0; }
.lobby-head h2 { margin: 0; font-family: var(--display); font-size: 26px; letter-spacing: -0.01em; }
.lobby-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.game-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; padding: 14px 20px 0; }
.game-tab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); text-align: left; transition: all 0.15s; }
.game-tab:hover:not(:disabled) { border-color: var(--line-2); background: rgba(255, 255, 255, 0.06); }
.game-tab.on { border-color: var(--gold); background: rgba(242, 193, 91, 0.12); }
.game-tab:disabled { cursor: default; }
.game-tab .gi { width: 32px; height: 32px; border-radius: 9px; background: #fffdf6; color: var(--black); display: grid; place-items: center; font-weight: 800; font-family: var(--display); font-size: 19px; flex: none; }
.game-tab .gi.red { color: var(--red); }
.game-tab b { font-size: 14px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 20px 0; }
.preset { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; font-size: 12.5px; font-weight: 600; color: #d8ded8; }
.preset:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.preset.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.rules { padding: 10px 20px 4px; display: grid; gap: 2px; }
.rule { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule .rl b { font-size: 14px; font-weight: 600; display: block; }
.rule .rl span { color: var(--muted); font-size: 12.5px; display: block; line-height: 1.35; }
.rule select.input { padding: 7px 34px 7px 12px; font-size: 13.5px; width: auto; max-width: 250px; border-radius: 10px; }
.rule .val { font-weight: 700; font-size: 13.5px; color: #e9ede9; text-align: right; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); border: 0; transition: background 0.2s; flex: none; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); }
.switch.on { background: var(--gold-2); }
.switch.on::after { transform: translateX(18px); }
.switch:disabled { cursor: default; }
.lobby-foot { position: sticky; bottom: 0; padding: 14px 20px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(transparent, rgba(13, 19, 16, 0.96) 30%); border-top: 1px solid var(--line); }
.lobby-foot .note { color: var(--muted); font-size: 13px; }
.invite { display: flex; gap: 8px; align-items: center; padding: 12px 20px 0; }
.invite .link { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); font-size: 13px; color: #d7ddd7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; -webkit-user-select: all; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(4, 8, 6, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade 0.2s both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 22px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); padding: 22px; animation: panelIn2 0.35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes panelIn2 { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.modal h2 { margin: 0 0 4px; font-family: var(--display); font-size: 28px; letter-spacing: -0.015em; }
.modal .sub { color: var(--muted); margin: 0 0 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.modal-actions .spacer { flex: 1; }
table.score { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.score th { text-align: right; color: var(--muted); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
table.score th:first-child, table.score td:first-child { text-align: left; }
table.score td { text-align: right; padding: 8px; border-bottom: 1px solid var(--line); }
table.score tr.total td { font-weight: 800; font-size: 16px; border-bottom: 0; }
table.score .pos { color: var(--good); }
table.score .neg { color: var(--bad); }
.ready-dots { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.ready-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.ready-dots i.on { background: var(--good); }
.winner-banner { text-align: center; padding: 6px 0 14px; }
.winner-banner .trophy { font-size: 64px; line-height: 1; animation: pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.winner-banner h2 { font-size: 34px; margin-top: 8px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.settings-grid { display: grid; gap: 18px; }

/* ---------- chat drawer ---------- */
.drawer { position: absolute; z-index: 50; right: 70px; bottom: 14px; width: min(340px, calc(100vw - 28px)); height: min(440px, calc(100% - 150px)); border-radius: 20px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: panelIn2 0.25s both; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); font-weight: 700; }
.drawer-body { flex: 1; overflow: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; user-select: text; -webkit-user-select: text; }
.msg { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.msg b { color: var(--gold); margin-right: 6px; font-weight: 700; }
.msg.sys { color: var(--muted); font-style: italic; font-size: 13px; }
.drawer form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.people { display: grid; gap: 4px; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; font-size: 14px; }
.person .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.person .dot.off { background: var(--faint); }
.person .sp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .role { color: var(--muted); font-size: 12px; }

/* ---------- spectators rail ---------- */
.spec-rail { position: absolute; z-index: 9; left: 14px; top: 70px; display: flex; flex-direction: column; gap: 8px; }
.spec-rail .seat { position: relative; transform: none !important; width: 96px; height: 72px; }
.spec-rail .plate { padding: 12px 6px 4px; font-size: 11px; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 100; left: 50%; top: 16px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 99px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; animation: panelIn2 0.25s both; }
.toast.err { border-color: rgba(255, 107, 107, 0.5); color: #ffd0d0; }

/* ---------- green room ---------- */
.greenroom { min-height: 100%; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1000px 600px at 70% 10%, rgba(28, 124, 76, 0.3), transparent 60%), var(--bg); }
.gr-card { width: min(880px, 100%); display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px; padding: 26px; border-radius: 26px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gr-preview { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #151c18; box-shadow: inset 0 0 0 1px var(--line); }
.gr-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.gr-preview .avatar { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; gap: 6px; align-content: center; }
.gr-preview .gr-ctrls { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 10px; }
.meter { position: absolute; left: 14px; top: 14px; display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.meter i { width: 4px; border-radius: 2px; background: var(--good); height: 3px; transition: height 0.08s; }
.gr-side { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.gr-side h1 { font-family: var(--display); font-size: 34px; margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
.gr-side .who { color: var(--muted); margin: -8px 0 0; }
.devices { display: grid; gap: 10px; }
.devices select.input { padding: 8px 34px 8px 12px; font-size: 13.5px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 20px; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
  .games-grid { grid-template-columns: 1fr; }
  .games-grid .game-card, .games-grid .game-card:nth-child(4) { grid-column: auto; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .gr-card { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 720px) {
  .hud.tl { left: 8px; top: 8px; }
  .hud.tr { right: 8px; top: 8px; }
  .hud.br { right: 8px; gap: 6px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 17px; height: 17px; }
  .room-chip .logo span.word { display: none; }
  .scoreboard { min-width: 0; padding: 7px 9px; font-size: 12px; }
  .scoreboard .sb-foot, .scoreboard .sb-head span:last-child, .sb-row .sub { display: none; }
  .sb-row { grid-template-columns: 8px 1fr auto; gap: 5px; padding: 1px 0; }
  .sb-row .sw { width: 8px; height: 8px; }
  .room-chip .icon-btn { display: none; }
  .room-chip { padding: 5px 10px 5px 6px; }
  .sb-row .nm { max-width: 54px; }
  .sb-row .sc { font-size: 13px; }
  .tile { border-radius: 11px; }
  .plate { padding: 10px 6px 4px; font-size: 11px; }
  .plate .info { font-size: 10.5px; padding: 1px 6px; }
  .tile .tl, .tile .tr { left: 4px; top: 4px; }
  .tile .tr { left: auto; right: 4px; }
  .tag { font-size: 9px; padding: 1px 5px; }
  .tag.dealer { width: 16px; height: 16px; font-size: 9px; }
  .bid-grid { grid-template-columns: repeat(7, 36px); gap: 5px; }
  .bid-grid button { height: 38px; font-size: 14px; }
  .panel { padding: 14px; }
  .panel h3 { font-size: 18px; }
  .feat-grid { grid-template-columns: 1fr; }
  .rule { grid-template-columns: 1fr; gap: 6px; }
  .rule select.input { max-width: 100%; width: 100%; }
  .rule .switch { justify-self: start; }
  .spec-rail { top: 56px; left: 8px; }
  .spec-rail .seat { width: 64px; height: 48px; }
  .game-tab { padding: 8px; gap: 6px; }
  .game-tab .gi { width: 26px; height: 26px; font-size: 15px; }
  .game-tab b { font-size: 12.5px; }
  .suit-pick { grid-template-columns: repeat(4, 56px); }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card .flip, .seat { transition-duration: 1ms !important; }
  .live-dot, .seat.turn .tile, .hero-tile { animation: none !important; }
}
.hud.tl.offline .room-chip { border-color: rgba(255, 61, 90, 0.6); }
.hud.tl.offline .room-chip::after { content: 'Reconnecting…'; font-size: 12px; font-weight: 700; color: #ffb3bf; padding-right: 6px; }

/* ---------- Bid Whist bidding grid ---------- */
.bw-grid { display: grid; gap: 6px; margin: 10px 0 12px; justify-content: center; align-items: center; }
.bw-grid .bw-lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: right; padding-right: 6px; }
.bw-grid button { height: 40px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.06); font-weight: 800; font-size: 15px; transition: all 0.15s; }
.bw-grid button:hover:not(:disabled) { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); transform: translateY(-2px); }
.bw-grid button:disabled { opacity: 0.22; cursor: not-allowed; }

/* ---------- Tunk action bar ---------- */
.action-bar { position: absolute; transform: translate(-50%, -50%); width: max-content; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); white-space: nowrap; animation: pop 0.3s cubic-bezier(.2, 1.4, .4, 1) both; max-width: calc(100vw - 16px); flex-wrap: wrap; justify-content: center; }
.action-bar .ab-total { font-weight: 800; font-size: 13.5px; color: var(--gold); }
.action-bar .ab-hint { font-size: 12.5px; color: var(--muted); }
@media (max-width: 720px) {
  .bw-grid { grid-template-columns: 70px repeat(5, 34px) !important; gap: 4px; }
  .bw-grid button { height: 34px; font-size: 13px; }
  .action-bar { border-radius: 16px; padding: 6px 8px; gap: 6px; }
  .action-bar .ab-hint { display: none; }
}

/* ---------- lobby seat picker ---------- */
.seat-block { margin: 14px 20px 0; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.seat-block.attn { border-color: rgba(242, 193, 91, 0.65); background: rgba(242, 193, 91, 0.08); box-shadow: 0 0 0 4px rgba(242, 193, 91, 0.08); }
.seat-block .sb-title { font-weight: 800; font-size: 14.5px; margin-bottom: 8px; }
.seat-block.attn .sb-title { color: var(--gold); }
.seat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.sp-seat { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); min-height: 42px; }
.sp-seat.open { border-style: dashed; border-color: rgba(255, 255, 255, 0.22); }
.sp-seat.mine { border-color: var(--gold); }
.sp-seat .sp-num { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); flex: none; }
.sp-seat .sp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.sp-seat.open .sp-name { color: var(--faint); font-weight: 500; }
.rules-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 0; }
.rules-sum { padding: 8px 20px 6px; }
.rules-sum .chips { margin: 0; }
.chip.dim { color: var(--muted); }
.room.unseated .empty-seat .btn.primary { animation: seatPulse 1.6s ease-in-out infinite; }
@keyframes seatPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 193, 91, 0.6); } 50% { box-shadow: 0 0 0 8px rgba(242, 193, 91, 0); } }
@media (max-width: 720px) {
  .seat-block { margin: 12px 12px 0; padding: 10px; }
  .seat-pick { grid-template-columns: 1fr; }
  .rules-head, .rules-sum { padding-left: 12px; padding-right: 12px; }
}

/* ---------- turn timer ---------- */
.seat .clock { position: absolute; left: 10px; right: 10px; bottom: -9px; height: 5px; border-radius: 5px; background: rgba(0, 0, 0, 0.45); overflow: hidden; z-index: 2; }
.seat .clock i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ffe29a); border-radius: 5px; }
.seat.clock-low .clock i { background: var(--live); }
.seat .clock-num { position: absolute; right: -8px; top: -8px; z-index: 3; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; display: grid; place-items: center;
  background: var(--gold); color: var(--gold-ink); font-weight: 900; font-size: 13px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); font-variant-numeric: tabular-nums; }
.seat.clock-low .clock-num { background: var(--live); color: #fff; animation: pulse 1s infinite; }
@keyframes clockDrain { to { width: 0%; } }
.my-clock { position: absolute; transform: translate(-50%, -50%); padding: 4px 12px; border-radius: 99px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 13px; font-weight: 700;
  pointer-events: none; backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.my-clock.clock-low { background: var(--live); animation: pulse 1s infinite; }
.timer-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin: 8px 20px 4px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.timer-row .rl b { font-size: 14px; display: block; }
.timer-row .rl span { color: var(--muted); font-size: 12.5px; }
.timer-row select.input { padding: 7px 34px 7px 12px; font-size: 13.5px; width: auto; border-radius: 10px; }
.timer-row .val { font-weight: 700; font-size: 13.5px; }
@media (max-width: 720px) { .timer-row { margin: 8px 12px 4px; } }

/* ---------- public lobby ---------- */
.pl-head { padding: 26px 0 18px; }
.pl-head h1 { font-family: var(--display); font-size: clamp(38px, 5vw, 60px); letter-spacing: -0.02em; margin: 16px 0 8px; line-height: 1.05; }
.pl-head .lede { font-size: 17px; color: #cfd6cf; margin: 0 0 22px; max-width: 600px; }
.pl-quick { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pl-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 18px; }
.pl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pl-card { border-radius: 18px; padding: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); display: flex; flex-direction: column; gap: 12px; transition: border-color 0.2s, transform 0.2s; }
.pl-card:hover { border-color: rgba(242, 193, 91, 0.4); transform: translateY(-2px); }
.pl-card.full { opacity: 0.7; }
.pl-top { display: flex; align-items: center; gap: 10px; }
.pl-top .gi { width: 38px; height: 38px; border-radius: 11px; background: #fffdf6; color: var(--black); display: grid; place-items: center; font-weight: 800; font-family: var(--display); font-size: 22px; flex: none; }
.pl-top .gi.red { color: var(--red); }
.pl-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-title b { font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.pl-title span { color: var(--muted); font-size: 12.5px; }
.pl-seats { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); white-space: nowrap; }
.pl-seats.open { background: rgba(61, 220, 151, 0.18); color: #b5f5d8; }
.pl-people { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pl-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; flex: none; border: 2px solid #121a16; }
.pl-av.bot { background: #2c3a33; font-size: 14px; }
.pl-names { margin-left: 6px; color: #cfd6cf; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pl-card .chips { margin: 0; }
.pl-actions { display: flex; justify-content: flex-end; margin-top: auto; }
.pl-empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; border: 1px dashed var(--line-2); border-radius: 20px; }
.pl-empty h3 { font-family: var(--display); font-size: 24px; margin: 8px 0 4px; }
.pl-empty p { color: var(--muted); margin: 0 0 16px; }
.pl-note { color: var(--faint); font-size: 13px; margin: 26px 0 50px; max-width: 720px; }
.pub-note { font-size: 13.5px; color: #d8ded8; padding: 10px 12px; border-radius: 12px; background: rgba(90, 176, 255, 0.1); border: 1px solid rgba(90, 176, 255, 0.35); }

/* ---------- report dialog ---------- */
.report-opts { display: grid; gap: 6px; margin-bottom: 12px; }
.report-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); cursor: pointer; font-weight: 500; }
.report-opt:has(input:checked) { border-color: var(--gold); background: rgba(242, 193, 91, 0.1); }
.report-opt input { accent-color: var(--gold); }
textarea.input { resize: vertical; min-height: 70px; }

/* ---------- update notice ---------- */
.update-pill { position: absolute; z-index: 45; left: 50%; top: 14px; transform: translateX(-50%); border: 0; padding: 8px 16px; border-radius: 99px;
  background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 13px; box-shadow: var(--shadow); animation: pop 0.3s both; white-space: nowrap; }
@media (max-width: 720px) { .update-pill { top: auto; bottom: 8px; left: 8px; transform: none; } }

/* ---------- phone-sized card faces: big corner index, smaller centre art ---------- */
.room.compact .idx { width: 32cqw; top: 3cqw; left: 3cqw; }
.room.compact .idx.br { top: auto; left: auto; bottom: 3cqw; right: 3cqw; }
.room.compact .idx .r { font-size: 31cqw; letter-spacing: -0.06em; }
.room.compact .idx .s { font-size: 26cqw; margin-top: 0; }
.room.compact .pips { inset: 26cqw 24cqw; }
.room.compact .pip { font-size: 15cqw; }
.room.compact .ace { font-size: 40cqw; }
.room.compact .ace.S { font-size: 46cqw; }
.room.compact .court { inset: 30cqw 22cqw; }
.room.compact .court .cl { font-size: 34cqw; }
.room.compact .court .cs { display: none; }
.room.compact .plate { font-size: 12px; }

/* ---------- small screens by layout (not just width): compact HUD, landscape control row ---------- */
.room.compact .scoreboard { min-width: 0; padding: 7px 9px; font-size: 12px; }
.room.compact .scoreboard .sb-foot, .room.compact .scoreboard .sb-head span:last-child, .room.compact .sb-row .sub { display: none; }
.room.compact .sb-row { grid-template-columns: 8px 1fr auto; gap: 5px; padding: 1px 0; }
.room.compact .sb-row .sw { width: 8px; height: 8px; }
.room.compact .sb-row .nm { max-width: 72px; }
.room.compact .sb-row .sc { font-size: 13px; }
.room.compact .room-chip .logo span.word, .room.compact .room-chip .icon-btn { display: none; }
.room.compact .room-chip { padding: 5px 10px 5px 6px; }
.room.compact .hud.tl { left: 8px; top: 8px; }
.room.compact .hud.tr { right: 8px; top: 8px; }
.room.compact .icon-btn { width: 40px; height: 40px; }
.room.compact .hud.br { right: 8px; gap: 6px; }
.room.short .hud.br { flex-direction: row; }
.room.short .drawer { right: 8px; bottom: 56px; height: min(300px, calc(100% - 70px)); }

/* ---------- SEO: kicker H1, game/legal pages, FAQ, footer, consent ---------- */
.hero h1.kicker { font-family: var(--font); font-size: 13px; line-height: 1.4; letter-spacing: 0; margin: 0; font-weight: 600; display: inline-flex; }
.hero .kicker + .display-h { margin-top: 22px; }
.landing details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 820px; }
.landing details summary { cursor: pointer; font-weight: 700; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.landing details summary::after { content: '+'; color: var(--gold); font-size: 20px; line-height: 1; }
.landing details[open] summary::after { content: '–'; }
.landing details p { color: #cfd6cf; margin: 10px 0 0; }
.seo-foot { display: block; }
.foot-cols { display: flex; gap: 60px; flex-wrap: wrap; margin-bottom: 20px; }
.foot-cols div { display: flex; flex-direction: column; gap: 6px; }
.foot-cols b { color: var(--ink); margin-bottom: 4px; }
.foot-cols a { color: var(--muted); }
.foot-cols a:hover { color: var(--ink); }
.game-card h3 a { color: inherit; }
.doc { max-width: 820px; padding: 10px 0 40px; }
.doc .crumbs { color: var(--faint); font-size: 13px; margin: 0 0 14px; }
.doc .crumbs a { color: var(--muted); }
.doc-hero { padding: 10px 0 20px; }
.doc-hero .gicon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 32px; font-family: var(--display); font-weight: 700; background: #fffdf6; color: var(--black); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.doc-hero .gicon.red, .more-games .gicon.red { color: var(--red); }
.doc h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -0.02em; margin: 18px 0 12px; }
.doc .lede { font-size: 18px; color: #cfd6cf; max-width: 680px; margin: 0 0 24px; }
.doc section { margin: 34px 0; }
.doc h2 { font-family: var(--display); font-size: 28px; letter-spacing: -0.01em; margin: 0 0 12px; }
.doc p, .doc li { color: #d8ded8; font-size: 16.5px; line-height: 1.65; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .rules-list li .opts { display: block; color: var(--muted); font-size: 14px; }
.cta-box { padding: 26px; border-radius: 22px; border: 1px solid rgba(242, 193, 91, 0.4); background: rgba(242, 193, 91, 0.07); }
.cta-box p { margin: 0 0 16px; }
.more-games { display: flex; gap: 10px; flex-wrap: wrap; }
.mg { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--ink); font-weight: 600; }
.mg:hover { border-color: var(--gold); text-decoration: none; }
.mg .gicon { width: 30px; height: 30px; border-radius: 9px; background: #fffdf6; color: var(--black); display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.legal h2 { font-size: 22px; margin-top: 30px; }
.legal .updated { color: var(--faint); font-size: 13px; margin-top: 30px; }
.consent { position: fixed; z-index: 120; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between;
  padding: 14px 16px; border-radius: 18px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: panelIn2 0.3s both; }
.consent p { margin: 0; font-size: 14px; color: #d8ded8; flex: 1; min-width: 220px; }
.consent-btns { display: flex; gap: 8px; }

a.btn { color: var(--ink); }
a.btn:hover { text-decoration: none; }

/* ---------- guides + ad slots ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 10px 0 30px; }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--ink); transition: border-color 0.2s, transform 0.2s; }
.guide-card:hover { border-color: rgba(242, 193, 91, 0.45); transform: translateY(-2px); text-decoration: none; }
.guide-card h2 { font-size: 21px !important; margin: 0 !important; line-height: 1.2; }
.guide-card p { color: var(--muted) !important; font-size: 14.5px !important; margin: 0; }
.guide-card span { color: var(--gold); font-weight: 700; font-size: 14px; margin-top: auto; }
.guide-links li { margin: 8px 0; }
.doc .byline { color: var(--faint); font-size: 13.5px; margin: -8px 0 0; }
.contact-email { font-size: 22px; font-weight: 800; }
.ad-slot { margin: 30px 0; padding: 10px 0; min-height: 280px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ad-slot.ad-article { min-height: 200px; }
.ad-label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
