/* ==========================================================================
   rlv.arcade — design system
   Calm dark surfaces, one warm accent, colour reserved for the games.
   ========================================================================== */
:root {
  --bg: #0e0f13;
  --bg-soft: #121419;
  --surface: #171a21;
  --surface-2: #1e222b;
  --surface-3: #262b36;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eef0f4;
  --muted: #9aa1b0;
  --faint: #656c7c;
  --accent: #ffcc4d;
  --accent-soft: rgba(255, 204, 77, 0.14);
  --accent-ink: #1c1606;
  --red: #ff5d5d;
  --blue: #4c9dff;
  --green: #35c97f;
  --yellow: #ffc93c;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 11px;
  --header-h: 60px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fredoka", "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
em { font-style: normal; color: var(--muted); font-weight: 500; }

/* ---------- shell ---------- */
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(20px, calc((100vw - 1200px) / 2));
  background: rgba(14, 15, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.brand-word { font: 600 21px/1 var(--font-display); letter-spacing: -0.02em; }
.brand-word span { color: var(--accent); }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 7px 14px; border-radius: 999px;
  color: var(--muted); font-size: 14px; font-weight: 600;
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active { color: var(--text); background: var(--surface-2); }
main { flex: 1; }
.site-footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 28px max(20px, calc((100vw - 1200px) / 2));
  border-top: 1px solid var(--line);
  color: var(--faint); font-size: 13px;
}
body.in-game .site-footer { display: none; }
@media (min-width: 1200px) {
  .uno-game.chat-open .table, .uno-game.chat-open .hand { padding-right: 356px; }
}

.page { width: min(1200px, 100% - 40px); margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 24px rgba(255, 204, 77, 0.25); }
.btn-quiet { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-3); }
.btn-text { color: var(--muted); padding: 0 10px; }
.btn-text:hover { color: var(--text); }
.btn-danger { background: rgba(255, 107, 107, 0.14); color: #ff8f8f; border: 1px solid rgba(255, 107, 107, 0.35); }
.btn-uno { background: var(--red); color: #fff; font: 700 16px var(--font-display); letter-spacing: 0.02em; animation: uno-pulse 1.1s ease-in-out infinite; }
.btn-uno.done { animation: none; background: var(--surface-2); color: var(--green); opacity: 1; }
@keyframes uno-pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 93, 93, 0.18); } }
.icon-btn {
  position: relative;
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center;
  color: var(--muted); transition: background 0.2s, color 0.2s;
}
.icon-btn:hover, .icon-btn.on { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm svg { width: 16px; height: 16px; }
.badge {
  position: absolute; top: 2px; right: 1px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 10px/17px var(--font); text-align: center;
}
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 600; }
.back:hover { color: var(--text); }
.back svg { width: 16px; height: 16px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-size: 12px; font-weight: 600;
}
.live-dot, .kicker .dot, .pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px rgba(53, 201, 127, 0.18);
}
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- panels & forms ---------- */
.card-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card-panel > h2 { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.field-label em { color: var(--faint); font-weight: 500; }
input[type="text"], input:not([type]) {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: var(--faint); }
input:focus { border-color: rgba(255, 204, 77, 0.6); box-shadow: 0 0 0 3px var(--accent-soft); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.segmented button { height: 36px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.segmented button.active { background: var(--surface-3); color: var(--text); }
.toggle { display: flex; align-items: center; gap: 12px; margin: 4px 0 22px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--surface-3); flex: none; transition: background 0.2s; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-text strong { display: block; font-size: 14px; }
.toggle-text small { color: var(--muted); font-size: 12px; }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-pick button { border-radius: 50%; padding: 3px; border: 2px solid transparent; transition: border-color 0.2s, transform 0.15s; }
.avatar-pick button:hover { transform: translateY(-2px); }
.avatar-pick .avatar { width: 44px; height: 44px; opacity: 0.55; transition: opacity 0.2s; }
.avatar-pick button.active { border-color: var(--accent); }
.avatar-pick button.active .avatar, .avatar-pick button:hover .avatar { opacity: 1; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(460px, calc(100vw - 32px));
  padding: 11px 18px; border-radius: 12px;
  background: #f4f5f7; color: #111; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Home
   ========================================================================== */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
  padding: 72px 0 56px;
}
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -0.035em; line-height: 1.02; }
.hero p { margin-top: 18px; max-width: 440px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.hero-art { position: relative; height: 340px; }
.hc {
  position: absolute; top: 50%; left: 50%;
  width: 176px; border-radius: 14px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  transition: transform 0.5s var(--ease);
}
.hc-1 { transform: translate(-50%, -50%) translateX(-104px) rotate(-14deg); }
.hc-2 { transform: translate(-50%, -50%) translateX(104px) rotate(14deg); }
.hc-3 { transform: translate(-50%, -54%) rotate(0deg); z-index: 1; }
.hero-art:hover .hc-1 { transform: translate(-50%, -50%) translateX(-124px) rotate(-18deg); }
.hero-art:hover .hc-2 { transform: translate(-50%, -50%) translateX(124px) rotate(18deg); }
.hero-art:hover .hc-3 { transform: translate(-50%, -58%); }

.section-title { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 16px; }
.games { padding: 8px 0 56px; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.game-tile {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; transition: border-color 0.25s, transform 0.25s var(--ease);
}
a.game-tile:hover { border-color: var(--line-2); transform: translateY(-3px); }
.game-tile-art { position: relative; height: 200px; overflow: hidden; }
.tile-uno .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(53, 201, 127, 0.22), transparent 60%), var(--bg-soft); }
.tile-2048 .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(246, 149, 99, 0.22), transparent 60%), var(--bg-soft); display: grid; place-items: center; }
.gt-card { position: absolute; top: 34px; left: 50%; width: 118px; border-radius: 10px; box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45); transition: transform 0.4s var(--ease); }
.gt-a { transform: translateX(-84%) rotate(-10deg); }
.gt-b { transform: translateX(-16%) rotate(8deg); }
a.game-tile:hover .gt-a { transform: translateX(-92%) rotate(-14deg) translateY(-6px); }
a.game-tile:hover .gt-b { transform: translateX(-8%) rotate(12deg) translateY(-6px); }
.mini-2048 {
  display: grid; grid-template-columns: repeat(4, 34px); gap: 5px; padding: 6px;
  background: #1f232c; border-radius: 12px; transform: rotate(-6deg);
  transition: transform 0.4s var(--ease);
}
a.game-tile:hover .mini-2048 { transform: rotate(-2deg) scale(1.04); }
.mini-2048 i {
  height: 34px; border-radius: 6px; background: rgba(255, 255, 255, 0.05);
  display: grid; place-items: center; font: 700 12px var(--font-display); font-style: normal; color: #776e65;
}
.mini-2048 .t2 { background: #eee4da; } .mini-2048 .t4 { background: #ede0c8; }
.mini-2048 .t8 { background: #f2b179; color: #fff; } .mini-2048 .t16 { background: #f59563; color: #fff; }
.mini-2048 .t32 { background: #f67c5f; color: #fff; } .mini-2048 .t64 { background: #f65e3b; color: #fff; }
.mini-2048 .t128 { background: #edcf72; color: #fff; font-size: 10px; } .mini-2048 .t2048 { background: #edc22e; color: #fff; font-size: 9px; }
.game-tile-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-tile-head { display: flex; align-items: center; justify-content: space-between; }
.game-tile h3 { font: 600 26px/1 var(--font-display); letter-spacing: -0.01em; }
.game-tile p { color: var(--muted); font-size: 14px; }
.go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); transition: background 0.2s, color 0.2s; }
a.game-tile:hover .go { background: var(--accent); color: var(--accent-ink); }
.meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 13px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 15px; height: 15px; }
.meta .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.tile-soon { border-style: dashed; background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 240px; }
.soon-inner { padding: 24px; display: grid; justify-items: center; gap: 6px; color: var(--muted); }
.soon-inner strong { color: var(--text); font-size: 15px; }
.soon-inner p { font-size: 13px; }
.soon-plus { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); margin-bottom: 6px; }

.how { padding: 0 0 72px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { display: flex; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.steps li > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; flex: none; }
.steps strong { display: block; margin-bottom: 2px; }
.steps p { color: var(--muted); font-size: 14px; }

/* ==========================================================================
   Lobby (game landing)
   ========================================================================== */
.lobby { padding: 32px 0 64px; max-width: 980px; }
.lobby-head { margin-bottom: 28px; }
.lobby-head h1 { font: 600 48px/1 var(--font-display); letter-spacing: -0.01em; margin: 14px 0 10px; }
.lobby-head p { color: var(--muted); max-width: 560px; }
.lobby-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 16px; align-items: start; }
.lobby-side { display: grid; gap: 16px; }
.join-form { display: flex; gap: 8px; }
.join-form input { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; }
.join-form input::placeholder { letter-spacing: 0.2em; }
.invite-note { padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.rooms-panel h2 { justify-content: flex-start; }
.rooms-list { display: grid; gap: 6px; max-height: 340px; overflow: auto; margin: 0 -8px; padding: 0 8px; }
.room-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: var(--radius-sm); text-align: left;
  background: var(--bg-soft); border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
}
.room-row:hover { border-color: var(--line-2); background: var(--surface-2); }
.room-row-info { flex: 1; min-width: 0; }
.room-row-info strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-row-info small { color: var(--muted); font-size: 12px; }
.room-seats { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.room-join { color: var(--accent); font-size: 13px; font-weight: 700; }
.rooms-empty { padding: 26px 10px; text-align: center; color: var(--faint); font-size: 14px; }

/* ==========================================================================
   Waiting room
   ========================================================================== */
.waiting { max-width: 620px; padding: 28px 0 64px; }
.waiting-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.waiting-card { padding: 28px; }
.waiting-title h1 { font-size: 28px; }
.waiting-title p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.invite {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 22px 0 26px; padding: 16px 18px;
  border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line);
}
.invite-code small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.invite-code strong { font: 600 32px/1.15 var(--font-display); letter-spacing: 0.14em; color: var(--accent); }
.invite-actions { display: flex; gap: 8px; }
.invite-actions .btn { min-height: 38px; padding: 0 14px; font-size: 13px; }
.invite-actions svg { width: 16px; height: 16px; }
.seats-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.seats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seat {
  display: flex; align-items: center; gap: 10px; min-height: 58px;
  padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  animation: seat-in 0.35s var(--ease);
}
.seat.me { border-color: rgba(255, 204, 77, 0.35); }
.seat-info { flex: 1; min-width: 0; }
.seat-info strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-info small { color: var(--muted); font-size: 12px; }
.seat.empty { background: transparent; border-style: dashed; color: var(--faint); font-size: 13px; animation: none; }
.seat-hole { width: 40px; height: 40px; border-radius: 50%; border: 1px dashed var(--line-2); flex: none; }
.bot-settings { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.duel-mode-settings { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.duel-mode-settings .seats-head { margin-bottom: 12px; }
.duel-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.duel-mode-options button { display: grid; gap: 3px; text-align: left; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-3); color: var(--text); cursor: pointer; }
.duel-mode-options button small { color: var(--muted); }
.duel-mode-options button:hover:not(:disabled), .duel-mode-options button.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-3)); }
.duel-mode-options button:disabled { cursor: default; }
.bot-settings .seats-head { margin-bottom: 12px; }
.bot-profiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bot-profile { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 10px 5px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface-3); color: var(--text); cursor: pointer; }
.bot-profile:hover, .bot-profile.active { border-color: var(--accent); }
.bot-profile.active { box-shadow: inset 0 0 0 1px var(--accent); }
.bot-profile .avatar { width: 48px; height: 48px; margin-bottom: 3px; }
.bot-profile strong { font-size: 13px; }
.bot-profile small { color: var(--muted); font-size: 11px; }
.bot-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.bot-levels button { padding: 8px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface-3); color: var(--muted); font: 600 12px var(--font); cursor: pointer; }
.bot-levels button:hover, .bot-levels button.active { border-color: var(--accent); color: var(--text); }
.bot-levels button.active { background: color-mix(in srgb, var(--accent) 16%, var(--surface-3)); }
@keyframes seat-in { from { opacity: 0; transform: translateY(6px); } }
.waiting-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 22px; }
.waiting-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; padding: 14px; border-radius: 12px; background: var(--bg-soft); color: var(--muted); font-size: 14px; }
.hint { margin-top: 10px; color: var(--faint); font-size: 13px; text-align: center; }

/* ==========================================================================
   Game chrome (shared by UNO and 2048)
   ========================================================================== */
.game {
  position: relative;
  height: calc(100dvh - var(--header-h));
  min-height: 560px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.gamebar {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 max(12px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--line);
  flex: none;
}
.gamebar-title { min-width: 0; line-height: 1.2; }
.gamebar-title strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gamebar-title span { color: var(--faint); font-size: 12px; }
.gamebar-center { flex: 1; display: flex; justify-content: center; }
.gamebar-tools { display: flex; gap: 2px; }
.game-body { position: relative; flex: 1; min-height: 0; display: flex; }

/* chat drawer */
.chat {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 20;
  width: min(340px, 100%);
  display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.3);
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.28s var(--ease), visibility 0.28s;
}
.chat.open { transform: none; visibility: visible; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.chat-head small { color: var(--green); font-size: 12px; flex: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { margin: auto; color: var(--faint); font-size: 14px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg .avatar { width: 28px; height: 28px; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg-meta strong { font-size: 13px; }
.msg-meta time { color: var(--faint); font-size: 11px; }
.msg p { font-size: 14px; color: #d7dae1; word-break: break-word; }
.msg.own .msg-meta strong { color: var(--accent); }
.reactions { display: flex; gap: 4px; padding: 8px 12px 0; border-top: 1px solid var(--line); }
.reactions button { flex: 1; height: 36px; border-radius: 9px; font-size: 17px; font-weight: 700; transition: background 0.15s, transform 0.15s; }
.reactions button:hover { background: var(--surface-2); transform: translateY(-2px); }
.chat-form { display: flex; gap: 6px; padding: 10px 12px 12px; }
.chat-form input { height: 40px; }
.chat-form .icon-btn { width: 40px; height: 40px; background: var(--accent); color: var(--accent-ink); }

/* speech bubbles above players */
.bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 5;
  transform: translateX(-50%);
  max-width: 200px; width: max-content;
  padding: 6px 11px; border-radius: 12px;
  background: #f4f5f7; color: #15171c; font-size: 13px; font-weight: 600; line-height: 1.3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: bubble 4.2s var(--ease) forwards;
  pointer-events: none;
}
.bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #f4f5f7; }
.bubble.emoji { font-size: 26px; padding: 4px 10px; background: transparent; box-shadow: none; }
.bubble.emoji::after { display: none; }
@keyframes bubble {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(0.9); }
  8%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

/* ==========================================================================
   UNO
   ========================================================================== */
.uno-game { --active: var(--muted); }
.uno-game.color-red { --active: var(--red); }
.uno-game.color-blue { --active: var(--blue); }
.uno-game.color-green { --active: var(--green); }
.uno-game.color-yellow { --active: var(--yellow); }

.uno-card {
  --cw: 104px;
  position: relative; display: block; flex: none;
  width: var(--cw); aspect-ratio: 320 / 488;
  border-radius: calc(var(--cw) * 0.09);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  transition: transform 0.18s var(--ease), filter 0.2s, opacity 0.2s;
  user-select: none; -webkit-user-select: none;
}
.uno-card img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; pointer-events: none; }
.card-face {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 calc(var(--cw) * 0.5) / 1 var(--font-display); color: #fff;
  -webkit-text-stroke: calc(var(--cw) * 0.035) rgba(8, 8, 14, 0.9); paint-order: stroke fill;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.card-face.wide { font-size: calc(var(--cw) * 0.42); }
.card-idx {
  position: absolute; top: 7%; left: 10%;
  font: 700 calc(var(--cw) * 0.17) / 1 var(--font-display); color: #fff;
  -webkit-text-stroke: calc(var(--cw) * 0.02) rgba(8, 8, 14, 0.85); paint-order: stroke fill;
  pointer-events: none;
}
.uno-card.back { --cw: 104px; }

/* table */
.table {
  position: relative; flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px 8px;
  background:
    radial-gradient(60% 55% at 50% 58%, color-mix(in srgb, var(--active) 11%, transparent), transparent 70%),
    radial-gradient(90% 80% at 50% 60%, #151821, var(--bg) 75%);
  transition: background 0.6s;
}
.opps { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; max-width: 100%; }
.opp {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.opp-avatar { position: relative; }
.opp .avatar { width: 38px; height: 38px; }
.opp-info strong { display: block; font-size: 14px; line-height: 1.2; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-info > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.opp-info b { font-variant-numeric: tabular-nums; }
.fan { display: inline-flex; }
.fan i { width: 9px; height: 13px; border-radius: 2px; background: linear-gradient(160deg, #8a5cff, #4b2aa8); border: 1px solid rgba(255, 255, 255, 0.35); }
.fan i + i { margin-left: -5px; }
.opp.active { border-color: var(--accent); background: var(--surface-2); transform: translateY(2px); }
.turn-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); animation: ring 1.4s ease-in-out infinite; }
@keyframes ring { 50% { transform: scale(1.12); opacity: 0.35; } }
.opp.finished { opacity: 0.55; }
.opp.offline .avatar { filter: grayscale(1); opacity: 0.5; }
.opp-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.opp-tag.warn { background: rgba(255, 107, 107, 0.15); color: #ff8f8f; }
.opp-tag.uno { background: var(--red); color: #fff; }
.opp-tag.done { background: var(--accent-soft); color: var(--accent); }

.center { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; width: 100%; }
.piles { position: relative; display: flex; align-items: flex-end; gap: clamp(28px, 6vw, 72px); }
.pile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pile .uno-card { --cw: clamp(86px, 10.5vh, 124px); }
.pile-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.pile-label em { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.draw-pile { cursor: pointer; }
.deck { position: relative; display: block; }
.deck .stack-2, .deck .stack-3 { position: absolute; top: 0; left: 0; }
.deck .stack-3 { transform: translate(-7px, 7px) rotate(-5deg); opacity: 0.55; }
.deck .stack-2 { transform: translate(-3px, 3px) rotate(-2deg); opacity: 0.8; }
.draw-pile:not(:disabled):hover .stack-1 { transform: translateY(-6px); }
.draw-pile:not(:disabled) .pile-label { color: var(--text); }
.draw-pile:disabled { cursor: default; }
.draw-pile:disabled .uno-card { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35)) brightness(0.8); }
.my-turn .draw-pile:not(:disabled) .stack-1 { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }
.discard .top { cursor: default; z-index: 1; }
.discard .top.played { animation: play-in 0.4s var(--ease); }
@keyframes play-in { from { transform: translateY(-40px) rotate(-10deg) scale(1.1); opacity: 0.2; } }
.color-halo {
  position: absolute; top: 50%; left: 50%; width: 190%; aspect-ratio: 1; margin-top: -30px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--active) 38%, transparent), transparent 62%);
  pointer-events: none; transition: background 0.5s;
}
.swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--active); box-shadow: 0 0 10px var(--active); }
.combo {
  position: absolute; top: -10px; right: -16px; z-index: 2;
  padding: 4px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font: 700 15px var(--font-display); animation: pop 0.5s var(--ease);
}
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }
.direction {
  position: absolute; left: 50%; bottom: calc(50% + 6px); transform: translateX(-50%);
  color: var(--faint); opacity: 0.8;
}
.direction svg { width: 22px; height: 22px; animation: spin 6s linear infinite; }
.direction.ccw svg { transform: scaleX(-1); animation-direction: reverse; }
@keyframes spin { to { rotate: 360deg; } }
.direction.ccw svg { animation-name: spin-ccw; }
@keyframes spin-ccw { to { rotate: -360deg; } }

.status { text-align: center; display: grid; gap: 4px; min-height: 72px; }
.status strong { font-size: 22px; letter-spacing: -0.02em; }
.my-turn .status strong { color: var(--accent); }
.status span { color: var(--muted); font-size: 14px; }
.last-action { color: var(--faint); font-size: 12px; }

/* hand */
.hand {
  position: relative; flex: none;
  padding: 12px max(16px, calc((100vw - 1320px) / 2)) 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.hand-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.me { position: relative; display: flex; align-items: center; gap: 10px; }
.me .avatar { width: 36px; height: 36px; }
.me strong { display: block; font-size: 14px; line-height: 1.2; }
.me small { color: var(--muted); font-size: 12px; }
.me .bubble { left: 18px; }
.hand-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hand-cards {
  --cw: clamp(78px, 13vh, 112px);
  container-type: inline-size;
  display: flex; justify-content: center;
  padding: 18px 8px 0; margin: 0 auto; max-width: 1100px;
}
.hand-cards .uno-card {
  --cw: inherit;
  width: clamp(78px, 13vh, 112px);
  margin-left: min(8px, calc((100cqw - var(--n) * clamp(78px, 13vh, 112px)) / (var(--n) - 1)));
}
.hand-cards .uno-card:first-child { margin-left: 0; }
.hand-cards .uno-card.playable { cursor: pointer; transform: translateY(-10px); }
.hand-cards .uno-card.playable:hover, .hand-cards .uno-card.playable:focus-visible { transform: translateY(-24px); z-index: 2; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.45)); }
.hand-cards .uno-card.dim { filter: brightness(0.55) saturate(0.5); }
.hand-cards .uno-card:not(.playable):not(.dim):hover { transform: translateY(-6px); z-index: 2; }
.uno-card.enter { animation: deal 0.45s var(--ease) backwards; }
.hand-cards .uno-card.enter:nth-last-child(2) { animation-delay: 0.06s; }
.hand-cards .uno-card.enter:nth-last-child(3) { animation-delay: 0.12s; }
@keyframes deal { from { transform: translateY(-80px) scale(0.8); opacity: 0; } }
.uno-card.nope { animation: nope 0.35s; }
@keyframes nope { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }
.hand.spectating { padding-bottom: 20px; }

/* ==========================================================================
   Results
   ========================================================================== */
.results { max-width: 560px; padding: 36px 0 64px; }
.result-card { text-align: center; padding: 32px 28px; }
.trophy { position: relative; width: 84px; margin: 22px auto 16px; }
.trophy .avatar { width: 84px; height: 84px; box-shadow: 0 0 0 4px var(--accent), 0 10px 40px rgba(255, 204, 77, 0.3); }
.trophy span { position: absolute; bottom: -6px; right: -6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; border: 3px solid var(--surface); }
.trophy.win { animation: win 0.8s var(--ease); }
@keyframes win { from { transform: scale(0.5) rotate(-20deg); opacity: 0; } }
.result-card h1 { font-size: 28px; }
.result-card > p { color: var(--muted); margin-top: 8px; font-size: 14px; }
.res-head { display: grid; grid-template-columns: 1fr 64px 80px; margin: 26px 0 8px; padding: 0 12px; color: var(--faint); font-size: 12px; font-weight: 600; text-align: right; }
.res-head span:first-child { text-align: left; }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.res-list li { display: grid; grid-template-columns: 24px 36px 1fr 56px 80px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); }
.res-list li.me { box-shadow: inset 0 0 0 1px rgba(255, 204, 77, 0.35); }
.res-list .rank { color: var(--muted); font-weight: 700; text-align: center; }
.res-list li.first .rank { color: var(--accent); }
.res-list .avatar { width: 36px; height: 36px; }
.res-name { min-width: 0; }
.res-name strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-name small { color: var(--faint); font-size: 12px; }
.res-round { text-align: right; color: var(--green); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.res-total { text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.result-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.result-actions .waiting-note { width: 100%; margin-top: 0; }

/* ==========================================================================
   Tournament
   ========================================================================== */
.tile-tournament .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(255, 204, 77, 0.2), transparent 60%), var(--bg-soft); display: grid; place-items: center; }
.trn-art { display: flex; align-items: center; gap: 14px; transform: rotate(-4deg); transition: transform 0.4s var(--ease); }
a.game-tile:hover .trn-art { transform: rotate(0deg) scale(1.04); }
.trn-art .gt-card { position: static; width: 92px; transform: rotate(-6deg); }
.trn-plus { font: 600 28px var(--font-display); color: var(--faint); }
.trn-tile { width: 92px; height: 92px; border-radius: 14px; display: grid; place-items: center; background: #edc22e; color: #fff; font: 700 26px var(--font-display); box-shadow: 0 0 34px rgba(237, 194, 46, 0.35); transform: rotate(6deg); }
.trn-explain p { color: var(--muted); font-size: 14px; }
.trn-explain p.muted { color: var(--faint); font-size: 13px; margin-top: 12px; }
.trn-scale { display: flex; gap: 6px; margin-top: 14px; }
.trn-scale span { flex: 1; padding: 10px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: center; }
.trn-scale b { color: var(--text); }
.trn-scale span:first-child { color: var(--accent); border-color: rgba(255, 204, 77, 0.3); }

.plan { margin: -4px 0 24px; padding: 16px 18px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.plan .seats-head { margin-bottom: 6px; }
.plan-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.plan-row:first-of-type { border-top: 0; }
.plan-game { flex: 1; font-weight: 600; font-size: 14px; }
.plan-row small { width: 38px; color: var(--muted); font-size: 12px; }
.plan-val { font: 600 18px var(--font-display); }
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.stepper button { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; font-weight: 600; color: var(--muted); }
.stepper button:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.stepper button:disabled { opacity: 0.3; }
.stepper strong { min-width: 26px; text-align: center; font: 600 17px var(--font-display); }
.segmented.sm { grid-template-columns: repeat(4, auto); padding: 3px; }
.segmented.sm button { height: 30px; padding: 0 10px; font-size: 12px; }
.plan-toggle { margin: 8px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.plan-order { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.plan-order li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.plan-order li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--surface-3); color: var(--text); }
.plan-order li.g-uno span { background: rgba(255, 93, 93, 0.25); color: #ff9c9c; }
.plan-order li.g-2048 span { background: rgba(237, 194, 46, 0.25); color: #f3d36a; }
.track { justify-content: center; margin: 20px 0 4px; }
.track li.done { opacity: 0.55; }
.track li.done span::after { content: "✓"; }
.track li.done span { font-size: 0; }
.track li.done span::after { font-size: 11px; }
.track li.now { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 204, 77, 0.35); }
.round-title { margin-top: 18px; }
.result-card.final .trophy .avatar { box-shadow: 0 0 0 4px var(--accent), 0 10px 60px rgba(255, 204, 77, 0.45); }
.result-card.final .trophy span { font-size: 14px; }

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: rgba(5, 6, 9, 0.65); backdrop-filter: blur(6px);
  animation: fade 0.2s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; width: min(520px, 100%); max-height: calc(100dvh - 40px); overflow: auto;
  padding: 28px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: rise 0.28s var(--ease);
}
.modal-sm { width: min(380px, 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal h2 { font-size: 22px; margin-bottom: 10px; padding-right: 30px; }
.modal > p { color: var(--muted); font-size: 14px; }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.color-choice {
  height: 92px; border-radius: 16px; display: flex; align-items: flex-end; padding: 12px 14px;
  color: #fff; font-weight: 700; font-size: 14px;
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
}
.color-choice:hover { transform: translateY(-3px); }
.color-choice.c-red { background: var(--red); }
.color-choice.c-blue { background: var(--blue); }
.color-choice.c-green { background: var(--green); }
.color-choice.c-yellow { background: var(--yellow); color: #2a2104; }
.color-choice:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.tx-red { color: var(--red); } .tx-blue { color: var(--blue); } .tx-green { color: var(--green); } .tx-yellow { color: var(--yellow); }
.multi-cards { display: flex; justify-content: center; padding: 22px 0 6px; }
.multi-cards .uno-card { --cw: 86px; width: 86px; cursor: default; }
.multi-cards .uno-card + .uno-card { margin-left: -28px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.rules { margin: 18px 0; display: grid; gap: 2px; }
.rules div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.rules dt { font-weight: 700; font-size: 14px; }
.rules dd { margin: 0; color: var(--muted); font-size: 14px; }
.modal > p.muted { font-size: 13px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 8px; }
  .hero-art { height: 260px; order: -1; }
  .hc { width: 130px; }
  .hc-1 { transform: translate(-50%, -50%) translateX(-78px) rotate(-14deg); }
  .hc-2 { transform: translate(-50%, -50%) translateX(78px) rotate(14deg); }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .tile-tournament { grid-column: 1 / -1; }
  .lobby-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 54px; }
  body { font-size: 14px; }
  .page { width: calc(100% - 32px); }
  .site-header { padding: 0 12px 0 16px; }
  .brand-word { font-size: 19px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 6px 8px; font-size: 13px; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 15px; }
  .hero-actions .btn { flex: 1; }
  .game-grid, .steps { grid-template-columns: 1fr; }
  .game-tile-art { height: 170px; }
  .lobby { padding-top: 20px; }
  .lobby-head h1 { font-size: 38px; }
  .card-panel { padding: 18px; }
  .seats { grid-template-columns: 1fr; }
  .bot-profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .waiting-card { padding: 20px; }
  .invite-code strong { font-size: 26px; }
  .waiting-actions { grid-template-columns: 1fr; }
  .res-head { grid-template-columns: 1fr 50px 64px; }
  .res-list li { grid-template-columns: 20px 32px 1fr 44px 64px; gap: 8px; padding: 8px 10px; }
  .res-list .avatar { width: 32px; height: 32px; }

  .game { min-height: 0; }
  .gamebar { height: 50px; gap: 6px; }
  .gamebar-title span { display: none; }
  .icon-btn { width: 34px; height: 34px; }
  .table { padding: 12px 10px 4px; }
  .opps { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: 100%; padding: 36px 2px 6px; margin-top: -30px; scrollbar-width: none; }
  .opps::-webkit-scrollbar { display: none; }
  .opps:has(.opp:only-child), .opps:has(.opp:nth-child(2):last-child) { justify-content: center; }
  .opp { flex: none; padding: 5px 10px 5px 5px; gap: 7px; }
  .opp .avatar { width: 30px; height: 30px; }
  .opp-info strong { max-width: 72px; font-size: 13px; }
  .opp .fan { display: none; }
  .opp-tag { display: none; }
  .opp.active .opp-info > span b::after { content: " · gra"; color: var(--accent); }
  .pile .uno-card { --cw: clamp(70px, 11vh, 96px); }
  .center { gap: 14px; }
  .status strong { font-size: 18px; }
  .status { min-height: 0; }
  .hand { padding: 10px 10px 12px; }
  .hand-actions .btn { min-height: 38px; padding: 0 12px; font-size: 13px; }
  .hand-cards { padding: 14px 4px 2px; justify-content: safe center; overflow-x: auto; scrollbar-width: none; }
  .hand-cards::-webkit-scrollbar { display: none; }
  .hand-cards .uno-card { width: clamp(64px, 11vh, 80px); margin-left: max(-38px, min(4px, calc((100cqw - var(--n) * clamp(64px, 11vh, 80px)) / (var(--n) - 1)))); }
  .hand-cards .uno-card.playable { transform: translateY(-8px); }
  .hand-cards .uno-card.playable:hover { transform: translateY(-14px); }
  .chat { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
