/* Mille Bornes — La Grande Route
   Vintage French road poster, accessible by design. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-regular-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-bold-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-regular-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-bold-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --cream: #f7edd5;
  --paper: #fbf5e6;
  --paper-2: #f1e3c6;
  --ink: #102b2b;
  --ink-soft: #2d4a48;
  --muted: #5d6e66;
  --teal: #0b4a4a;
  --teal-2: #14706b;
  --teal-3: #1e8c82;
  --red: #c9412d;
  --red-dark: #9e2e20;
  --gold: #c19137;
  --gold-soft: #e4c987;
  --line: #d7c39c;
  --line-strong: #b99b68;
  --ok: #2f7d4f;
  --warn: #b56a1e;
  --bg: var(--cream);
  --surface: var(--paper);
  --surface-2: var(--paper-2);
  --text: var(--ink);
  --text-muted: var(--muted);
  --border: var(--line);
  --accent: var(--red);
  --accent-2: var(--teal);
  --focus: #1b6f9c;
  --shadow: 0 18px 45px rgba(16, 43, 43, 0.16);
  --shadow-soft: 0 8px 24px rgba(16, 43, 43, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --font-body: "Atkinson Hyperlegible Next", "Noto Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --card-w: clamp(98px, 12.5vw, 138px);
  --card-h: calc(var(--card-w) * 1.45);
  --header-h: 74px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --cream: #0e1f1e;
  --paper: #142c2a;
  --paper-2: #1b3936;
  --ink: #f5ead2;
  --ink-soft: #d8cbb1;
  --muted: #a9bcb2;
  --teal: #7ed0c5;
  --teal-2: #4eb3a9;
  --teal-3: #2a8b82;
  --red: #ef6a52;
  --red-dark: #c44732;
  --gold: #e3b65a;
  --gold-soft: #6d562b;
  --line: #3d5c55;
  --line-strong: #63887e;
  --ok: #6fd18e;
  --warn: #f0ae5e;
  --bg: #091615;
  --surface: #102523;
  --surface-2: #193532;
  --text: #f5ead2;
  --text-muted: #a9bcb2;
  --border: #3d5c55;
  --accent: #ef6a52;
  --accent-2: #7ed0c5;
  --focus: #8ecdf0;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.32);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --cream: #0e1f1e;
    --paper: #142c2a;
    --paper-2: #1b3936;
    --ink: #f5ead2;
    --ink-soft: #d8cbb1;
    --muted: #a9bcb2;
    --teal: #7ed0c5;
    --teal-2: #4eb3a9;
    --teal-3: #2a8b82;
    --red: #ef6a52;
    --red-dark: #c44732;
    --gold: #e3b65a;
    --gold-soft: #6d562b;
    --line: #3d5c55;
    --line-strong: #63887e;
    --ok: #6fd18e;
    --warn: #f0ae5e;
    --bg: #091615;
    --surface: #102523;
    --surface-2: #193532;
    --text: #f5ead2;
    --text-muted: #a9bcb2;
    --border: #3d5c55;
    --accent: #ef6a52;
    --accent-2: #7ed0c5;
    --focus: #8ecdf0;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.32);
  }
}

:root[data-contrast="high"] {
  --muted: var(--ink-soft);
  --border: var(--ink);
  --line: var(--ink);
  --line-strong: var(--ink);
  --shadow: 0 0 0 2px var(--ink);
  --shadow-soft: 0 0 0 2px var(--ink);
}

:root[data-text-size="125"] { font-size: 125%; }
:root[data-text-size="150"] { font-size: 150%; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(201, 145, 55, 0.11), transparent 34rem),
    radial-gradient(circle at 88% 22%, rgba(20, 112, 107, 0.09), transparent 32rem),
    var(--bg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.012em;
}

h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-2); }
img { max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  pointer-events: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-weight: 700;
}
.skip-link:focus { transform: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(0.9rem, 3vw, 2rem);
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--teal);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.05em;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--teal);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-text strong { font-family: var(--font-display); font-size: 1.08rem; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.11em; text-transform: uppercase; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-field select {
  min-height: 44px;
  padding: 0.45rem 2rem 0.45rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.conn-status {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}
.conn-status.ok { color: var(--ok); }
.conn-status.bad { color: var(--red); }

/* ---------- Buttons ---------- */

.primary-btn,
.secondary-btn,
.ghost-btn,
.text-btn,
.icon-btn,
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.primary-btn {
  background: var(--accent);
  color: #fff8ea;
  border-color: color-mix(in srgb, var(--accent) 60%, black);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 65%, black);
}
.primary-btn:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.primary-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 65%, black); }
.secondary-btn {
  background: var(--teal-2);
  color: #fff8ea;
  border-color: color-mix(in srgb, var(--teal-2) 65%, black);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--teal-2) 65%, black);
}
.secondary-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--teal-2) 65%, black); }
.ghost-btn {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.ghost-btn:hover { background: var(--surface-2); }
.text-btn {
  min-height: 40px;
  padding: 0.3rem 0.4rem;
  background: transparent;
  color: var(--accent-2);
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: var(--text);
  border-color: transparent;
  border-radius: 50%;
}
.icon-btn:hover { background: var(--surface-2); }
.back-btn {
  padding-left: 0.65rem;
  background: transparent;
  color: var(--accent-2);
  border-color: var(--border);
  margin-bottom: 1rem;
}
.big-btn { min-height: 52px; padding: 0.8rem 1.25rem; font-size: 1.05rem; }
button:disabled,
button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
button[aria-busy="true"] { opacity: 0.7; }

/* ---------- Screens and layout ---------- */

#main {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.8rem, 3vw, 2rem) 3rem;
}
.screen { animation: fade-in 260ms ease both; }
.screen[hidden] { display: none !important; }
.narrow-screen { max-width: 780px; margin: 0 auto; }
.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 70ch; }
.muted { color: var(--text-muted); }
.small { font-size: 0.86rem; }
.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hero / menu ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(440px, 62vh, 660px);
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  padding: clamp(1.4rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  isolation: isolate;
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("/art/hero.webp");
  background-size: cover;
  background-position: center 58%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(247, 237, 213, 0.96) 0%, rgba(247, 237, 213, 0.86) 38%, rgba(247, 237, 213, 0.18) 72%, rgba(247, 237, 213, 0.05) 100%);
}
:root[data-theme="dark"] .hero::before {
  background: linear-gradient(100deg, rgba(9, 22, 21, 0.96) 0%, rgba(9, 22, 21, 0.82) 42%, rgba(9, 22, 21, 0.18) 75%, rgba(9, 22, 21, 0.05) 100%);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .hero::before {
    background: linear-gradient(100deg, rgba(9, 22, 21, 0.96) 0%, rgba(9, 22, 21, 0.82) 42%, rgba(9, 22, 21, 0.18) 75%, rgba(9, 22, 21, 0.05) 100%);
  }
}
.hero-copy {
  max-width: 640px;
}
.hero h1 {
  font-size: clamp(3rem, 9vw, 6.8rem);
  margin: 0;
  color: var(--text);
  letter-spacing: -0.045em;
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  font-style: italic;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero-lead { max-width: 48ch; font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.menu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.2rem;
}
.paper-card {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.32), transparent 40%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.2vw, 1.6rem);
  box-shadow: var(--shadow-soft);
}
.paper-card h2 { margin-top: 0; }
.session-list, .room-list, .seat-list, .discard-list, .steps, .hand, .game-log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.session-item, .room-item, .seat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.session-item:last-child, .room-item:last-child, .seat-item:last-child { border-bottom: 0; }
.session-item .meta, .room-item .meta { display: flex; flex-direction: column; min-width: 0; }
.session-item strong, .room-item strong { overflow-wrap: anywhere; }
.session-item small, .room-item small { color: var(--text-muted); }
.steps { counter-reset: step; display: grid; gap: 0.55rem; }
.steps li { position: relative; padding-left: 2.1rem; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 800;
}

/* ---------- Forms ---------- */

.form-stack { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field > span { font-weight: 700; }
.field small { color: var(--text-muted); }
input[type="text"], select, input[type="range"] {
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
input[type="text"]:focus, select:focus { border-color: var(--focus); }
input[type="range"] { padding: 0.5rem 0; accent-color: var(--accent); }
.checkbox-field { display: flex; align-items: flex-start; gap: 0.65rem; min-height: 44px; padding: 0.35rem 0; }
.checkbox-field input { width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; accent-color: var(--accent); }
.difficulty-fieldset { border: 0; padding: 0; margin: 0; }
.difficulty-fieldset legend { font-weight: 700; margin-bottom: 0.5rem; }
.difficulty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.radio-card { position: relative; display: block; }
.radio-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-card-body {
  display: grid;
  gap: 0.2rem;
  min-height: 100%;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  transition: border-color 140ms ease, background 140ms ease;
}
.radio-card input:checked + .radio-card-body {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--accent);
}
.radio-card input:focus-visible + .radio-card-body { outline: 3px solid var(--focus); outline-offset: 3px; }
.radio-card-body span { color: var(--text-muted); font-size: 0.88rem; }

.online-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.2rem; }
.lobby-card { margin-top: 0.2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head h2 { margin-bottom: 0.5rem; }
.waiting-card { max-width: 620px; }
.room-code-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.room-code {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--accent-2);
}
.small-code { font-size: 1.15rem; letter-spacing: 0.12em; }
.seat-item { justify-content: flex-start; }
.seat-index {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--cream);
  font-weight: 800;
  font-size: 0.8rem;
  flex: 0 0 auto;
}
.seat-name { font-weight: 700; }
.seat-tag { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
.waiting-controls { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }

/* ---------- Game screen ---------- */

.game-screen { display: grid; gap: 1rem; }
.game-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.game-top-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.turn-status {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  text-align: center;
}
.turn-status.your-turn { color: var(--accent); }
.turn-timer {
  margin: 0;
  min-width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--accent-2);
}
.turn-timer.warning { color: var(--red); }

.table-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1.05fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.side-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  min-width: 0;
}
.side-panel > h2 { font-size: 1.15rem; margin-bottom: 0.7rem; }
.side-block { border-top: 1px solid var(--border); padding-top: 0.8rem; margin-top: 0.8rem; }
.side-block:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.side-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.side-sub { color: var(--text-muted); font-size: 0.82rem; }
.players-line { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0 0.5rem; }
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
}
.player-chip .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); }
.player-chip.offline .dot { background: var(--muted); }
.player-chip.bot .dot { background: var(--gold); }

.road {
  display: grid;
  gap: 0.25rem;
  margin: 0.5rem 0 0.7rem;
}
.road progress {
  width: 100%;
  height: 0.75rem;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}
.road progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.road progress::-webkit-progress-value { background: linear-gradient(90deg, var(--teal-2), var(--gold)); border-radius: 999px; }
.road progress::-moz-progress-bar { background: linear-gradient(90deg, var(--teal-2), var(--gold)); border-radius: 999px; }
.road-meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 32px;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge.danger { border-color: color-mix(in srgb, var(--red) 55%, var(--border)); color: var(--red); background: color-mix(in srgb, var(--red) 9%, var(--surface)); }
.badge.ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--border)); color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); }
.badge.gold { border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
.badge .icon { width: 1rem; height: 1rem; }

.safety-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.45rem; }
.safety-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--border));
  font-size: 0.74rem;
  font-weight: 700;
}
.safety-chip .icon { width: 0.95rem; height: 0.95rem; }

.mini-row { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.mini-card {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 3.1rem;
  min-height: 4.2rem;
  padding: 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 0.62rem;
  line-height: 1.1;
  text-align: center;
  font-weight: 700;
  overflow: hidden;
}
.mini-card .icon { width: 1.1rem; height: 1.1rem; margin-bottom: 0.12rem; }
.mini-card.distance { background: color-mix(in srgb, var(--teal-2) 12%, var(--surface)); }
.mini-card.hazard { background: color-mix(in srgb, var(--red) 12%, var(--surface)); border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.mini-card.remedy { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.mini-card.safety { background: color-mix(in srgb, var(--gold) 14%, var(--surface)); border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.empty-mini { opacity: 0.45; font-style: italic; }

.table-center {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 145, 55, 0.13), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}
.piles { display: flex; align-items: flex-start; justify-content: center; gap: clamp(1rem, 4vw, 2.4rem); }
.pile-block { display: grid; justify-items: center; gap: 0.35rem; }
.pile-label { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.pile-count { font-size: 0.78rem; font-weight: 800; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.card-back, .discard-pile {
  position: relative;
  width: clamp(74px, 9vw, 96px);
  aspect-ratio: 2 / 3;
  border-radius: 11px;
  border: 2px solid var(--line-strong);
  background: var(--surface-2);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(16, 43, 43, 0.13);
}
.card-back-art {
  position: absolute;
  inset: 6px;
  border-radius: 7px;
  border: 1px solid var(--gold);
  background:
    repeating-linear-gradient(45deg, transparent 0 9px, rgba(201, 145, 55, 0.28) 9px 11px),
    radial-gradient(circle at 50% 35%, var(--teal-2) 0 18%, transparent 19%),
    var(--teal);
}
.card-back-art::after {
  content: "1000";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}
.discard-pile { display: grid; place-items: center; background: var(--surface); }
.discard-pile .mini-card { width: 100%; height: 100%; border: 0; border-radius: 9px; }
.last-action {
  margin: 0;
  font-weight: 700;
  max-width: 46ch;
  min-height: 3em;
}
#table-hint { margin: 0; }

.hand-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 0.8rem 1rem 1rem;
}
.hand {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.4rem 0.2rem 0.8rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.hand li { flex: 0 0 auto; scroll-snap-align: center; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--card-w);
  height: var(--card-h);
  min-height: 142px;
  padding: 0.55rem;
  border-radius: 14px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(16, 43, 43, 0.13);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  isolation: isolate;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(16, 43, 43, 0.14); }
.card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold), 0 9px 0 rgba(16, 43, 43, 0.14);
  transform: translateY(-4px);
}
.card[aria-disabled="true"] { opacity: 0.62; }
.card[aria-disabled="true"]:hover { transform: none; }
.card .card-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card.distance::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(247, 237, 213, 0.09) 0%, rgba(247, 237, 213, 0.35) 55%, rgba(247, 237, 213, 0.92) 100%);
}
:root[data-theme="dark"] .card.distance::after {
  background: linear-gradient(180deg, rgba(9, 22, 21, 0.15) 0%, rgba(9, 22, 21, 0.55) 55%, rgba(9, 22, 21, 0.94) 100%);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .card.distance::after {
    background: linear-gradient(180deg, rgba(9, 22, 21, 0.15) 0%, rgba(9, 22, 21, 0.55) 55%, rgba(9, 22, 21, 0.94) 100%);
  }
}
.card.hazard { background: color-mix(in srgb, var(--red) 10%, var(--surface)); border-color: color-mix(in srgb, var(--red) 50%, var(--line-strong)); }
.card.remedy { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 45%, var(--line-strong)); }
.card.safety { background: color-mix(in srgb, var(--gold) 13%, var(--surface)); border-color: color-mix(in srgb, var(--gold) 55%, var(--line-strong)); }
.card-hotkey {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  display: grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 800;
}
.card-type {
  align-self: flex-end;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.card-value {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.card-value .unit { font-size: 0.48em; letter-spacing: 0; }
.card-name {
  font-family: var(--font-display);
  font-size: clamp(0.86rem, 1.6vw, 1rem);
  font-weight: 700;
  line-height: 1.1;
  margin-top: 0.15rem;
}
.card-effect {
  margin-top: 0.25rem;
  font-size: 0.62rem;
  line-height: 1.15;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-icon {
  width: 2.2rem;
  height: 2.2rem;
  margin-top: 0.2rem;
  color: var(--accent);
}
.card.safety .card-icon { color: var(--gold); }
.card.remedy .card-icon { color: var(--ok); }
.card.distance .card-icon { color: var(--teal-2); }
.card-playable-dot {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 2px var(--surface);
}
.card[aria-disabled="true"] .card-playable-dot { background: var(--muted); }

.action-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.4rem;
}
.selection-status { margin: 0; min-height: 1.4em; color: var(--text-muted); font-size: 0.9rem; flex: 1 1 14rem; }

.game-log-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
}
.game-log { max-height: 18rem; overflow: auto; display: grid; gap: 0.35rem; }
.game-log li {
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.88rem;
}
.game-log li.assertive { border-left: 3px solid var(--accent); }

/* ---------- Coup / result ---------- */

.coup-panel {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 0%, rgba(228, 201, 135, 0.4), transparent 60%),
    color-mix(in srgb, var(--gold) 10%, var(--surface));
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  animation: coup-glow 900ms ease both;
}
.coup-panel h2 { color: var(--red); margin-bottom: 0.3rem; }
.coup-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@keyframes coup-glow {
  from { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(201, 145, 55, 0.5); }
  to { transform: none; box-shadow: var(--shadow); }
}

.result-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-soft);
}
.result-panel h2 { margin-top: 0; }
.result-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.result-table caption { text-align: left; font-weight: 800; padding-bottom: 0.4rem; }
.result-table th, .result-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); text-align: right; }
.result-table th:first-child, .result-table td:first-child { text-align: left; }
.result-table tr.total { font-weight: 800; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }

/* ---------- Dialogs ---------- */

.modal {
  width: min(780px, calc(100vw - 2rem));
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal::backdrop { background: rgba(6, 18, 17, 0.68); backdrop-filter: blur(3px); }
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem 0.7rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 1.4rem; }
.modal-body { padding: 1rem 1.2rem 1.4rem; overflow: auto; max-height: calc(90dvh - 4.5rem); }
.rules-body section { margin-bottom: 1.2rem; }
.rules-body h3 { color: var(--accent-2); }
.rules-cards { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 0.8rem; }
.rules-cards dt { font-weight: 800; }
.rules-cards dd { margin: 0; }
.score-table { width: 100%; border-collapse: collapse; }
.score-table th, .score-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.score-table th { width: 40%; }
.shortcut-list { display: grid; gap: 0.45rem; }
.shortcut-list > div { display: grid; grid-template-columns: minmax(5.5rem, max-content) 1fr; gap: 0.7rem; align-items: baseline; }
.shortcut-list dt { white-space: nowrap; }
.shortcut-list dd { margin: 0; color: var(--text-muted); }
kbd {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: var(--surface-2);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}
.settings-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.credits-body ul { padding-left: 1.2rem; }
.confirm-modal { width: min(480px, calc(100vw - 2rem)); }
.confirm-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.discard-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.discard-list li { list-style: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.2rem + env(safe-area-inset-bottom));
  z-index: 80;
  transform: translateX(-50%) translateY(150%);
  max-width: min(92vw, 36rem);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: transform 220ms ease;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 1rem clamp(0.8rem, 3vw, 2rem) calc(1.5rem + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
.site-footer p { margin: 0; }
.noscript { padding: 1rem; background: var(--surface); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .table-layout { grid-template-columns: 1fr; }
  .opponent-panel { order: 1; }
  .table-center { order: 2; }
  .own-panel { order: 3; }
  .game-screen { display: flex; flex-direction: column; }
  .game-top {
    order: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "room actions" "status timer";
  }
  .game-top > div:first-child { grid-area: room; }
  .game-top-actions { grid-area: actions; justify-content: flex-end; }
  .turn-status { grid-area: status; text-align: left; }
  .turn-timer { grid-area: timer; text-align: right; }
  .result-panel { order: 2; }
  .coup-panel { order: 3; }
  .hand-section { order: 4; }
  .table-layout { order: 5; }
  .game-log-panel { order: 6; }
}
@media (max-width: 900px) {
  .game-top-actions .ghost-btn span {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
  }
  .game-top-actions .ghost-btn { width: 44px; padding: 0; }
}

@media (max-width: 860px) {
  .menu-grid, .online-grid { grid-template-columns: 1fr; }
  .hero { min-height: 480px; align-items: flex-end; }
  .hero-copy { background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: var(--radius); padding: 1rem; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 4.8rem); }
  .difficulty-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --card-w: clamp(94px, 26vw, 118px); }
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  .header-actions { justify-content: flex-start; width: 100%; }
  .header-actions .ghost-btn span { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; position: absolute; white-space: nowrap; }
  .header-actions .ghost-btn { width: 44px; padding: 0; }
  .conn-status { order: -1; }
  #main { padding-top: 1rem; }
  .hero { min-height: 430px; padding: 1rem; }
  .hero-actions .big-btn { width: 100%; }
  .hand-section { padding: 0.7rem 0.5rem 0.8rem; }
  .hand { gap: 0.5rem; padding-left: 0.4rem; padding-right: 0.4rem; }
  .action-bar { position: sticky; bottom: 0; z-index: 5; background: var(--surface); padding: 0.5rem 0 calc(0.4rem + env(safe-area-inset-bottom)); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-top: 1px solid var(--border); }
  .action-bar .primary-btn, .action-bar .secondary-btn, .action-bar .ghost-btn { flex: 1 1 auto; }
  .selection-status { flex-basis: 100%; }
  .game-top { padding: 0.6rem; gap: 0.5rem; }
  .game-top-actions .ghost-btn span { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; position: absolute; white-space: nowrap; }
  .game-top-actions .ghost-btn { width: 44px; padding: 0; }
  .table-center { min-height: 220px; padding: 0.8rem; }
  .side-panel { padding: 0.8rem; }
  .modal { width: calc(100vw - 1rem); max-height: 94dvh; }
  .modal-body { max-height: calc(94dvh - 4.5rem); }
  .shortcut-list > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  :root { --card-w: 88px; }
  .brand-text strong { font-size: 0.98rem; }
  .brand-text small { font-size: 0.62rem; }
  .room-code { font-size: 2rem; }
  .game-top-actions { gap: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
:root[data-reduce-motion="true"] *,
:root[data-reduce-motion="true"] *::before,
:root[data-reduce-motion="true"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

@media (forced-colors: active) {
  .card, .paper-card, .side-panel, .table-center, .hand-section, .game-top, .modal, .badge, .mini-card {
    border: 1px solid ButtonText;
    background: Canvas;
    color: CanvasText;
    forced-color-adjust: auto;
  }
  .primary-btn, .secondary-btn { border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; box-shadow: none; }
  .card[aria-disabled="true"] { opacity: 1; border-style: dashed; }
  .card.selected { outline: 3px solid Highlight; }
  .hero-art { display: none; }
  .hero { background: Canvas; }
  .hero::before { display: none; }
  .card-playable-dot { background: Highlight; }
}

@media print {
  .site-header, .site-footer, .action-bar, .game-top-actions { display: none; }
  .screen[hidden] { display: none !important; }
  .card, .paper-card, .side-panel { box-shadow: none; }
}

/* Small additions */
.session-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.session-item { align-items: flex-start; }
.inline-select { width: auto; min-height: 44px; }
.result-winner { font-weight: 800; color: var(--accent-2); margin: 0.6rem 0 0.25rem; }
.discard-pile .mini-card { min-height: 100%; }
@media (max-width: 720px) {
  .session-item { flex-wrap: wrap; }
  .session-actions { width: 100%; justify-content: flex-start; }
}
.pile-empty { margin: 0.25rem 0; }
.side-sub { white-space: nowrap; }
.game-screen > * { min-width: 0; }
.game-top > * { min-width: 0; }
.table-layout > * { min-width: 0; }
.hand-section { min-width: 0; }
.hand { max-width: 100%; }
.card-type {
  padding-left: 1.6rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
@media (max-width: 720px) {
  .conn-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .header-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.3rem;
  }
  .header-actions::-webkit-scrollbar { display: none; }
  .language-field select {
    max-width: 132px;
    min-height: 40px;
    padding-right: 1.4rem;
  }
  .header-actions .ghost-btn {
    width: 40px;
    min-height: 40px;
  }
  .game-top {
    padding: 0.55rem 0.7rem;
    gap: 0.3rem;
  }
  .game-top .eyebrow { display: none; }
  .game-top .room-code { font-size: 1.05rem; }
  .game-top .turn-status { font-size: 1rem; }
  .game-top .turn-timer { font-size: 0.9rem; }
}
@media (max-width: 720px) {
  .card-type { display: none; }
}
