@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/style.min.css');

:root {
  --font-display: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --bg-0: #070b14;
  --bg-1: #0c1424;
  --bg-2: #13233b;
  --panel: rgba(16, 29, 48, 0.78);
  --panel-strong: rgba(20, 36, 60, 0.9);
  --line: rgba(104, 148, 194, 0.28);
  --line-strong: rgba(111, 177, 239, 0.52);
  --text: #eef5ff;
  --muted: #9cb0ca;
  --primary: #45b9ff;
  --primary-strong: #2a9fea;
  --secondary: #27d5ad;
  --secondary-strong: #14b68f;
  --warning: #ffc978;
  --danger: #ff8799;
  --ok: #44e5ae;
  --shadow-lg: 0 16px 44px rgba(2, 8, 19, 0.34);
  --shadow-md: 0 8px 24px rgba(4, 11, 24, 0.28);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  /* Alias tokens — referenced in components, defined here for theming */
  --accent: #45b9ff;
  --accent-orange: #f0ad55;
  --green: #27d5ad;
  --bg-card: #0e1b2d;
  --border-subtle: #1e2a3a;
  --text-dim: #6b7a90;
  --ink: #0c1424;
  --text-muted: #9cb0ca;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  font: 15px/1.6 'Inter', 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background:
    radial-gradient(980px 460px at 8% -16%, rgba(69, 185, 255, 0.1), transparent 64%),
    radial-gradient(840px 460px at 92% -18%, rgba(39, 213, 173, 0.06), transparent 68%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 56%, #101d33 100%);
}

body::before,
body::after {
  content: '';
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  filter: blur(88px);
  opacity: 0.14;
}

body::before {
  top: -190px;
  right: -140px;
  background: #3ab4ff;
}

body::after {
  bottom: -240px;
  left: -160px;
  background: #00cb9b;
}

body.page-play,
body.page-feed,
body.page-docs {
  background:
    radial-gradient(980px 460px at 8% -16%, rgba(69, 185, 255, 0.1), transparent 64%),
    radial-gradient(840px 460px at 92% -18%, rgba(39, 213, 173, 0.06), transparent 68%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 56%, #101d33 100%);
}

body.page-docs {
  color: #253348;
  background:
    radial-gradient(900px 420px at 4% -10%, rgba(255, 166, 93, 0.18), transparent 62%),
    radial-gradient(760px 420px at 95% -12%, rgba(255, 214, 151, 0.28), transparent 64%),
    linear-gradient(180deg, #f6efe2 0%, #fbf7ef 48%, #f2e6d5 100%);
}

body.page-docs::before {
  background: rgba(255, 176, 110, 0.7);
  opacity: 0.12;
}

body.page-docs::after {
  background: rgba(255, 214, 122, 0.72);
  opacity: 0.16;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topnav {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
  background: rgba(9, 18, 31, 0.84);
  box-shadow: 0 8px 24px rgba(4, 11, 24, 0.2);
}

body.page-docs .topnav {
  border-color: rgba(127, 92, 52, 0.14);
  background: rgba(255, 249, 239, 0.88);
  backdrop-filter: blur(14px);
}

body.page-docs .brand,
body.page-docs .nav-links a.active,
body.page-docs .nav-links a:hover {
  color: #1d2d45;
}

body.page-docs .nav-links a {
  color: #7a634a;
}

body.page-docs .nav-links a:hover,
body.page-docs .nav-links a.active {
  background: rgba(245, 225, 190, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 140ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(33, 61, 91, 0.68);
}

.hero-simple,
.hero {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(20, 35, 57, 0.84), rgba(12, 24, 43, 0.86));
  box-shadow: var(--shadow-lg);
  padding: clamp(28px, 4.2vw, 48px);
}

.hero-simple h1,
.hero h1 {
  margin-top: 8px;
  max-width: 22ch;
  font-size: clamp(2rem, 4.1vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.hero-simple .sub,
.hero .sub,
.panel .sub,
.card .sub {
  margin-top: 10px;
  max-width: 66ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.kicker,
.section-title,
.field-label,
.mission-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9db8dd;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.card,
.panel,
.dev-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

body.page-docs .card,
body.page-docs .panel,
body.page-docs .dev-panel {
  border-color: rgba(130, 102, 71, 0.12);
  background: rgba(255, 250, 242, 0.84);
  box-shadow: 0 18px 42px rgba(129, 99, 69, 0.1);
}

.card::before,
.panel::before,
.dev-panel::before,
.hero-simple::before,
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%);
}

body.page-docs .card::before,
body.page-docs .panel::before,
body.page-docs .dev-panel::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 22%);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.feed-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
}

.match-hud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.match-chip {
  border: 1px solid #2f557c;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(18, 34, 56, 0.86), rgba(12, 23, 40, 0.86));
  padding: 10px;
}

.match-chip h3 {
  margin-top: 6px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.cards3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.row,
.actions-grid,
.checklist,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.command-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.command-actions .btn {
  width: 100%;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.dashboard-match-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dashboard-match-row:hover {
  transform: translateY(-1px);
}

.checklist {
  flex-direction: column;
  align-items: flex-start;
}

.checklist-item {
  font-size: 0.82rem;
  color: var(--muted);
}

.checklist-item.done {
  color: #98f3cd;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(30, 50, 79, 0.68);
  color: var(--text);
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #4f82b2;
  background: rgba(35, 62, 98, 0.82);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible,
.nav-hamburger:focus-visible,
.nav-drawer-close:focus-visible,
.segmented-btn:focus-visible,
.nav-links a:focus-visible,
.section-action:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(122, 193, 255, 0.9);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(140deg, #69c8ff, #3aa9eb);
  color: #0c1424;
  box-shadow: 0 4px 12px rgba(50, 139, 201, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(140deg, #78d0ff, #4ab4ee);
  transform: translateY(-1px);
}

/* btn-soft: subtle contained secondary button */
.btn-soft {
  color: #d8e8ff;
  border-color: #345c84;
  background: rgba(21, 40, 67, 0.68);
}

/* btn-ghost: text-style button, minimal presence */
.btn-ghost {
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(21, 40, 67, 0.38);
}

.btn-win {
  border-color: rgba(47, 227, 166, 0.55);
  background: rgba(15, 90, 67, 0.5);
  color: #bbf9df;
}

.btn-sm {
  min-height: 40px;
  font-size: 0.72rem;
  padding: 7px 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.section-action {
  border: none;
  background: none;
  color: #93ccff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

input[type='text'],
input[type='email'],
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #34577f;
  border-radius: var(--radius-md);
  background: rgba(10, 20, 35, 0.82);
  color: var(--text);
  font: 500 0.88rem/1.4 'Sora', sans-serif;
}

input::placeholder {
  color: #6f87aa;
}

input:focus,
select:focus {
  outline: 2px solid rgba(58, 180, 255, 0.42);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(58, 180, 255, 0.6);
  outline-offset: 2px;
}

article {
  border: 1px solid #2a4f75;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(20, 37, 61, 0.88), rgba(14, 28, 49, 0.88));
  padding: 11px;
}

body.page-docs article {
  border-color: rgba(167, 128, 89, 0.18);
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.96), rgba(248, 239, 226, 0.92));
}

article h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

article p {
  color: var(--muted);
  font-size: 0.76rem;
}

.player-card {
  display: grid;
  gap: 7px;
}

.player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.player-pill {
  border-radius: 999px;
  border: 1px solid #44719c;
  padding: 3px 8px;
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
}

.pill-human {
  background: rgba(58, 180, 255, 0.15);
  color: #b9e8ff;
}

.pill-bot {
  background: rgba(0, 203, 155, 0.16);
  color: #b8f8e8;
  border-color: rgba(0, 203, 155, 0.46);
}

.player-meta {
  color: #7f99bd;
  font-size: 0.72rem;
}

.player-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-state {
  border-radius: 999px;
  border: 1px solid #3b6289;
  padding: 2px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #bdd8fb;
}

.state-alive,
.state-online {
  border-color: rgba(47, 227, 166, 0.5);
  color: #bdf8df;
}

.state-dead,
.state-offline {
  border-color: rgba(255, 125, 143, 0.5);
  color: #ffc4cd;
}

.state-host {
  border-color: rgba(255, 190, 98, 0.5);
  color: #ffdfb0;
}

.player-role {
  color: #a9c4e8;
  font-size: 0.74rem;
}

.player-card.is-me {
  border-color: #4ea5df;
  box-shadow: 0 0 0 1px rgba(78, 165, 223, 0.22);
}

.player-card.is-host {
  background: linear-gradient(145deg, rgba(25, 45, 72, 0.92), rgba(17, 31, 53, 0.92));
}

.player-card.is-dead {
  opacity: 0.78;
}

.action-danger {
  border-color: rgba(255, 125, 143, 0.5);
  color: #ffd4da;
  background: rgba(92, 29, 40, 0.48);
}

.action-vote {
  border-color: rgba(255, 190, 98, 0.5);
}

.action-task {
  border-color: rgba(0, 203, 155, 0.42);
  box-shadow: 0 8px 18px rgba(0, 203, 155, 0.2);
}

.code-block,
.state-dump {
  display: block;
  width: 100%;
  border: 1px solid #33587e;
  border-radius: var(--radius-md);
  background: rgba(7, 15, 27, 0.9);
  color: #d4f6ff;
  padding: 10px;
  font: 0.76rem/1.5 'Space Mono', monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

body.page-docs .code-block,
body.page-docs .state-dump {
  border-color: rgba(109, 83, 52, 0.18);
  background: #1f2835;
  color: #f5efe3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.state-dump {
  max-height: 300px;
  overflow: auto;
}

.status,
.status-bar {
  min-height: 20px;
  font-size: 0.8rem;
  color: #abdbff;
}

.status-bar {
  border: 1px solid rgba(69, 114, 154, 0.52);
  border-radius: var(--radius-md);
  background: rgba(14, 27, 45, 0.62);
  padding: 8px 10px;
}

.status-info {
  color: #abdbff;
}

.status-warn {
  color: #ffd38a;
}

.status-error {
  color: #ff96a7;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ok);
  display: inline-block;
  box-shadow: 0 0 8px rgba(47, 227, 166, 0.88);
  animation: pulse-dot 1.7s ease-in-out infinite;
}

.text-muted,
.text-ink2 {
  color: var(--muted);
}

body.page-docs .text-muted,
body.page-docs .text-ink2,
body.page-docs .sub,
body.page-docs article p,
body.page-docs .checklist-item,
body.page-docs .player-meta {
  color: #6e5d4b;
}

body.page-docs h1,
body.page-docs h2,
body.page-docs h3,
body.page-docs .mvp-play-title,
body.page-docs .section-title {
  color: #1f2e44;
}

body.page-docs .field-label,
body.page-docs .mvp-kicker,
body.page-docs .mission-kicker {
  color: #8c6536;
}

body.page-docs .section-action {
  color: #8a4c25;
}

body.page-docs a {
  color: #994c24;
}

body.page-docs .btn-ghost {
  color: #6a533c;
}

body.page-docs .btn-ghost:hover {
  color: #1f2e44;
  background: rgba(233, 212, 182, 0.56);
}

.text-sm {
  font-size: 0.82rem;
}

.text-xs {
  font-size: 0.73rem;
}

.font-bold {
  font-weight: 700;
}

.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

.dev-panel {
  background: rgba(11, 21, 37, 0.9);
}

body.page-docs .dev-panel {
  background: rgba(255, 246, 234, 0.88);
}

.dev-panel-toggle {
  cursor: pointer;
  list-style: none;
  font-size: 0.78rem;
  color: #9db8dd;
  font-weight: 700;
}

body.page-docs .dev-panel-toggle {
  color: #8a6339;
}

.dev-panel-body {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.steps.onecol {
  grid-template-columns: 1fr;
}

.steps article {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.steps article > div {
  min-width: 0;
}

.steps article .code-block {
  max-width: 100%;
  overflow: auto;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.steps article span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 180, 255, 0.15);
  border: 1px solid rgba(58, 180, 255, 0.45);
  font-size: 0.72rem;
  color: #b8e7ff;
  font-weight: 700;
}

.villa-hero {
  margin-bottom: 12px;
}

.villa-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.villa-tab {
  border: 1px solid #335a81;
  border-radius: 999px;
  padding: 8px 13px;
  font: 700 0.75rem/1 'Sora', sans-serif;
  letter-spacing: 0.03em;
  color: #d0e6ff;
  background: rgba(21, 39, 66, 0.75);
  cursor: pointer;
  transition: all 120ms ease;
}

.villa-tab:hover,
.villa-tab.is-active {
  background: rgba(58, 180, 255, 0.2);
  border-color: #56bdff;
  color: #ecf8ff;
}

.villa-state-card {
  display: grid;
  gap: 12px;
}

.villa-state-card h3 {
  font-size: 1.2rem;
}

.villa-ui-list ul {
  margin-top: 8px;
  padding-left: 18px;
  color: var(--muted);
}

.villa-ui-list li + li {
  margin-top: 6px;
}

.villa-cta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.villa-text-link {
  color: #9fd2ff;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── Hero redesign ─────────────────────────────────────────── */

.hero-simple {
  position: relative;
  overflow: hidden;
  min-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vw, 96px) clamp(28px, 4.2vw, 64px);
}

.hero-simple h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-top: 12px;
  text-shadow: 0 2px 40px rgba(69, 185, 255, 0.15);
}

.text-gradient {
  background: linear-gradient(135deg, #45b9ff 0%, #27d5ad 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Arena grid background */
.arena-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.arena-grid::before {
  content: '';
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(69, 185, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 185, 255, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(20deg);
  transform-origin: center bottom;
  animation: grid-drift 8s ease-in-out infinite alternate;
}

.arena-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 100%, transparent 40%, rgba(7, 11, 20, 0.9) 80%);
}

/* Battle ticker */
.battle-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  max-width: 100%;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* Live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(39, 213, 173, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(39, 213, 173, 0.08);
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
}

.live-badge .live-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
}

/* Hero content z-index */
.hero-simple .hero-content {
  position: relative;
  z-index: 1;
}

.hero-simple .sub {
  max-width: 54ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-top: 16px;
}

/* Stat hero — large display variant */
.stat-hero {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  margin-top: 28px;
}

.stat-hero-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-hero-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.stat-hero-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 2px 0;
}

/* Enhanced btn-primary with glow ring */
.btn-primary {
  position: relative;
}

.btn-hero::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(69,185,255,0.4), rgba(39,213,173,0.3));
  filter: blur(8px);
  opacity: 0.14;
  z-index: -1;
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(28, 154, 235, 0.2);
}

/* Card base — transition for border/shadow, no universal lift */
.card,
.panel {
  transition: box-shadow 200ms ease, border-color 200ms ease;
  backdrop-filter: blur(4px);
  background: rgba(13, 24, 42, 0.88);
}

/* Lift only on explicitly interactive cards */
.card--interactive,
.card[href],
.card[role="button"] {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.card--interactive:hover,
.card[href]:hover,
.card[role="button"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(2, 8, 19, 0.4), 0 0 24px rgba(69, 185, 255, 0.08);
  border-color: var(--line-strong);
}

/* [data-animate] entrance stagger */
[data-animate] {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

[data-animate="1"] { animation-delay: 0s; }
[data-animate="2"] { animation-delay: 0.15s; }
[data-animate="3"] { animation-delay: 0.3s; }
[data-animate="4"] { animation-delay: 0.45s; }
[data-animate="5"] { animation-delay: 0.6s; }
[data-animate="6"] { animation-delay: 0.75s; }

/* Keyframes */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow-ring {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes grid-drift {
  from {
    transform: perspective(600px) rotateX(18deg) translateY(0);
  }
  to {
    transform: perspective(600px) rotateX(22deg) translateY(-12px);
  }
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.62;
    transform: scale(1.16);
  }
}

@media (max-width: 980px) {
  .feed-shell {
    grid-template-columns: 1fr;
  }

  .hero-simple h1,
  .hero h1 {
    max-width: 100%;
  }

  .stat-hero {
    gap: 16px;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(1180px, calc(100% - 24px));
    padding-top: 18px;
  }

  .topnav {
    position: static;
    border-radius: 14px;
    padding: 11px 12px;
  }

  .nav-links {
    display: none;
  }

  .hero-simple,
  .hero,
  .card,
  .panel,
  .dev-panel {
    border-radius: 14px;
  }

  .hero-simple {
    min-height: unset;
    padding: clamp(36px, 8vw, 56px) 20px;
  }

  .stat-hero {
    flex-direction: row;
    gap: 12px;
  }

  .stat-divider {
    display: none;
  }

  .btn {
    min-height: 44px;
    font-size: 0.82rem;
    padding: 8px 13px;
  }

  .btn-sm {
    min-height: 40px;
    font-size: 0.74rem;
  }

  .grid-2,
  .cards3,
  .input-row,
  .steps,
  .command-actions {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header .row {
    width: 100%;
  }

  .section-header .row .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .phase-timeline {
    flex-direction: column;
    gap: 0.25rem;
  }

  .phase-line {
    width: 2px;
    height: 12px;
    min-width: unset;
  }
}

/* ── Phase Timeline ── */
.phase-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.phase-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim, #6b7a90);
  white-space: nowrap;
}

.phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-subtle, #1e2a3a);
  flex-shrink: 0;
}

.phase-step.active .phase-dot {
  background: var(--accent, #45b9ff);
  box-shadow: 0 0 8px var(--accent, #45b9ff);
}

.phase-step.active {
  color: var(--accent, #45b9ff);
  font-weight: 600;
}

.phase-step.done .phase-dot {
  background: var(--green, #27d5ad);
}

.phase-step.done {
  color: var(--green, #27d5ad);
}

.phase-line {
  width: 24px;
  height: 2px;
  background: var(--border-subtle, #1e2a3a);
  flex-shrink: 0;
}

/* ── Enhanced Player Cards ── */
.player-card.is-me {
  border-color: var(--accent, #45b9ff);
  box-shadow: 0 0 0 1px var(--accent, #45b9ff);
}

.player-card.is-dead {
  opacity: 0.5;
}

/* ── Game Showcase ── */
.game-showcase {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Mini game cards (homepage) ── */
.game-card-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.game-card-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(2, 8, 19, 0.35), 0 0 18px rgba(69, 185, 255, 0.06);
  border-color: var(--line-strong);
}

.game-card-mini-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.game-card-mini-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-card-mini-text strong {
  font-size: 0.92rem;
}

.game-card-mini-text .text-muted {
  font-size: 0.78rem;
}

.game-card-mini .btn {
  flex-shrink: 0;
}

.game-card-mini.game-card-mafia {
  border-left: 3px solid var(--danger);
}

.game-card-mini.game-card-amongus {
  border-left: 3px solid var(--warning);
}

.game-card-mini.game-card-villa {
  border-left: 3px solid var(--secondary);
}


/* ── Hero glow accent ── */
.hero-glow-accent {
  position: absolute;
  bottom: -80px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(39, 213, 173, 0.12);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* ── Battle ticker track ── */
.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 24s linear infinite;
  gap: 32px;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-track span {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 700;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Leaderboard rank accents ── */
.lb-rank-1 {
  border-color: #ffc978;
  background: linear-gradient(145deg, rgba(255, 201, 120, 0.1), var(--panel));
}

.lb-rank-2 {
  border-color: #c0cfe0;
  background: linear-gradient(145deg, rgba(192, 207, 224, 0.08), var(--panel));
}

.lb-rank-3 {
  border-color: #d4956a;
  background: linear-gradient(145deg, rgba(212, 149, 106, 0.08), var(--panel));
}

.segmented-controls {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.segmented-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  min-height: 40px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.segmented-btn.is-active {
  color: var(--ink);
  border-color: var(--secondary);
  background: rgba(39, 213, 173, 0.12);
}

.badge-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(39, 213, 173, 0.25);
  background: rgba(39, 213, 173, 0.1);
  color: #bbf9df;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.leaderboard-self {
  border-color: rgba(39, 213, 173, 0.45) !important;
  box-shadow: 0 0 0 1px rgba(39, 213, 173, 0.15);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(244, 239, 230, 0.9));
  margin-top: 0.75rem;
}

.leaderboard-row:first-child {
  margin-top: 0;
}

.leaderboard-row-rank {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
}

.leaderboard-row-head h3 {
  margin: 0 0 0.25rem;
}

.leaderboard-row-meta {
  min-width: 160px;
  text-align: right;
}

.leaderboard-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-end;
}

.leaderboard-live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 201, 120, 0.12);
  color: #ffc978;
  border: 1px solid rgba(255, 201, 120, 0.25);
}

.leaderboard-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 239, 230, 0.94));
}

@media (max-width: 900px) {
  .leaderboard-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .leaderboard-row-meta {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 48px;
  }

  .leaderboard-row-actions {
    align-items: flex-start;
  }
}

/* ── Post-game mini leaderboard ── */
.post-game-leaderboard {
  margin-top: 1.25rem;
}

.lb-mini-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  max-width: 320px;
  margin: 0 auto;
  transition: border-color 0.2s;
}

.lb-mini-link:hover {
  border-color: var(--line-strong);
}

.lb-mini-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.lb-mini-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.lb-mini-row + .lb-mini-row {
  margin-top: 2px;
}

.lb-mini-me {
  background: rgba(69, 185, 255, 0.1);
  border: 1px solid rgba(69, 185, 255, 0.25);
}

.lb-mini-rank-1 .lb-mini-pos { color: #ffc978; }
.lb-mini-rank-2 .lb-mini-pos { color: #c0cfe0; }
.lb-mini-rank-3 .lb-mini-pos { color: #d4956a; }

.lb-mini-pos {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 2rem;
  color: var(--muted);
}

.lb-mini-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-provisional-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(240, 240, 245, 0.16);
  background: rgba(240, 240, 245, 0.06);
  color: #B9B9CB;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.lb-provisional-badge--mini {
  margin-left: 6px;
  padding: 1px 5px;
  font-size: 9px;
}

.lb-mini-mmr {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lb-mini-sep {
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  padding: 0.1rem 0;
}

.lb-mini-footer {
  font-size: 0.68rem;
  color: var(--primary);
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Spacing utilities ── */
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ── Section title accent ── */
.section-title {
  border-left: 2px solid var(--primary);
  padding-left: 10px;
}

/* ── Game Picker (play.html) ── */
.game-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.game-picker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(20, 37, 61, 0.88), rgba(14, 28, 49, 0.88));
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.game-picker-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(2, 8, 19, 0.4), 0 0 18px rgba(69, 185, 255, 0.08);
  border-color: var(--line-strong);
}

.game-picker-icon {
  font-size: 2rem;
  line-height: 1;
}

.game-picker-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.game-picker-card .text-sm {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.game-picker-mafia { border-top: 3px solid var(--danger); }
.game-picker-amongus { border-top: 3px solid var(--warning); }
.game-picker-villa { border-top: 3px solid var(--secondary); }

@media (max-width: 760px) {
  .game-picker-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Post-game Rematch CTA ── */
.btn-rematch-cta {
  min-height: 52px;
  padding: 14px 48px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 28px rgba(28, 154, 235, 0.4);
}

.btn-rematch-cta:hover {
  box-shadow: 0 0 48px rgba(69, 185, 255, 0.45), 0 8px 28px rgba(28, 154, 235, 0.4);
}

.rematch-countdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.rematch-countdown strong {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.rematch-cancel-btn {
  min-height: 40px;
  padding: 4px 10px;
  font-size: 0.68rem;
}

/* Recent Games widget */
.recent-games-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-game-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
}

.recent-game-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.recent-game-result {
  font-weight: 700;
  min-width: 32px;
  text-align: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.recent-game-result.win {
  color: #bbf9df;
  background: rgba(15, 90, 67, 0.5);
}

.recent-game-result.loss {
  color: #fbb;
  background: rgba(120, 30, 30, 0.5);
}

.recent-game-mode {
  color: var(--muted);
  min-width: 70px;
}

.recent-game-meta {
  color: var(--muted);
  margin-left: auto;
  font-size: 0.7rem;
}

.win-streak-badge {
  color: #bbf9df;
  font-weight: 600;
}

/* ── Reconnect Banner ── */
.reconnect-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  background: #b8860b;
  color: #fff;
  animation: reconnect-pulse 1.5s ease-in-out infinite;
}

@keyframes reconnect-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Auth Section ── */
.auth-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.profile-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #bbf9df;
  background: rgba(187, 249, 223, 0.1);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  cursor: default;
}

.auth-modal {
  background: var(--bg-card, #0e1b2d);
  color: var(--ink, #e8edf4);
  border: 1px solid rgba(69, 114, 154, 0.52);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  max-width: 380px;
  width: 90vw;
}

.auth-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.auth-modal input {
  width: 100%;
  box-sizing: border-box;
}

/* ── Player Profile Card ── */
.profile-card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.profile-card {
  background: var(--bg-card, #0e1b2d);
  border: 1px solid rgba(69, 114, 154, 0.52);
  border-radius: var(--radius-lg, 12px);
  padding: 20px 24px;
  min-width: 260px;
  max-width: 340px;
}

.profile-card h3 {
  margin: 0 0 12px;
}

.profile-card-stat {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
}

.profile-card-stat .label {
  color: #8ca4be;
}

.profile-card-stat .value {
  font-weight: 600;
}

/* ── Tutorial Overlay ── */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.tutorial-card {
  background: var(--bg-card, #0e1b2d);
  border: 1px solid rgba(69, 114, 154, 0.52);
  border-radius: var(--radius-lg, 12px);
  padding: 28px 32px;
  max-width: 400px;
  width: 90vw;
  text-align: center;
}

.tutorial-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.tutorial-dots {
  display: flex;
  gap: 6px;
}

.tutorial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.tutorial-dot.active {
  background: #abdbff;
}

/* ── Waiting / Matchmaking Overlay ── */
.waiting-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9997;
  animation: waiting-fade-in 0.4s ease forwards;
}

.waiting-overlay.waiting-exit {
  animation: waiting-fade-out 0.5s ease forwards;
}

.waiting-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 40px 36px 32px;
  max-width: 400px;
  width: 90vw;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(69, 185, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.waiting-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%);
}

/* Orbiting player indicators */
.waiting-orb-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.waiting-orb {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  top: 50%;
  left: 50%;
  margin: -7px 0 0 -7px;
  animation: waiting-orbit 3.6s linear infinite;
}

.waiting-orb-1 {
  background: var(--primary);
  box-shadow: 0 0 12px rgba(69, 185, 255, 0.7);
  animation-delay: 0s;
}

.waiting-orb-2 {
  background: var(--secondary);
  box-shadow: 0 0 12px rgba(39, 213, 173, 0.7);
  animation-delay: -0.9s;
}

.waiting-orb-3 {
  background: var(--warning);
  box-shadow: 0 0 12px rgba(255, 201, 120, 0.7);
  animation-delay: -1.8s;
}

.waiting-orb-4 {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 135, 153, 0.6);
  animation-delay: -2.7s;
  opacity: 0.4;
}

.waiting-orb.orb-found {
  opacity: 1 !important;
  animation: waiting-orbit 3.6s linear infinite, waiting-orb-glow 1s ease forwards;
}

.waiting-center-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 999px;
  border: 2px solid rgba(69, 185, 255, 0.3);
  animation: waiting-center-breathe 2.4s ease-in-out infinite;
}

.waiting-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.waiting-player-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  min-height: 1.4em;
}

.waiting-player-count.count-updated {
  animation: waiting-count-pop 0.4s ease;
}

/* Progress track */
.waiting-progress-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(69, 185, 255, 0.12);
  overflow: hidden;
}

.waiting-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  animation: waiting-progress-sweep 8s ease-in-out infinite;
}

.waiting-eta {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Tip container */
.waiting-tip-container {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 15, 27, 0.6);
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.waiting-tip-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
}

.waiting-tip-text {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  transition: opacity 0.3s ease;
}

.waiting-tip-text.tip-fading {
  opacity: 0;
}

.waiting-cancel-btn {
  margin-top: 4px;
  color: var(--muted);
  border-color: rgba(104, 148, 194, 0.2);
}

/* Keyframes — waiting overlay */
@keyframes waiting-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes waiting-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes waiting-orbit {
  from {
    transform: rotate(0deg) translateX(46px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(46px) rotate(-360deg);
  }
}

@keyframes waiting-center-breathe {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(69, 185, 255, 0.2);
    box-shadow: 0 0 0 0 rgba(69, 185, 255, 0);
  }
  50% {
    transform: scale(1.15);
    border-color: rgba(69, 185, 255, 0.45);
    box-shadow: 0 0 20px rgba(69, 185, 255, 0.15);
  }
}

@keyframes waiting-count-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes waiting-progress-sweep {
  0% { width: 5%; }
  50% { width: 70%; }
  100% { width: 5%; }
}

@keyframes waiting-orb-glow {
  from {
    box-shadow: 0 0 12px currentColor;
    transform: scale(1);
  }
  to {
    box-shadow: 0 0 20px currentColor;
    transform: scale(1.2);
  }
}

@media (max-width: 760px) {
  .waiting-card {
    padding: 32px 20px 24px;
    gap: 12px;
  }

  .waiting-orb-ring {
    width: 100px;
    height: 100px;
  }

  .waiting-title {
    font-size: 1.1rem;
  }
}
/* ── Step 11: Game detail articles ── */
.game-detail-article {
  margin-top: 16px;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.game-detail-article + .game-detail-article { margin-top: 16px; }
.game-detail-h4 {
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
}

/* ── Step 12: Coming Soon Badge ── */
.coming-soon-badge {
  font-size: 0.62rem;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 999px;
  padding: 2px 8px;
  color: #c4b5fd;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ── Step 13: Game picker selected state ── */
.game-picker-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(69,185,255,0.2);
}

/* ── Step 21: Roast card (index) ── */
.game-card-roast { border-left: 3px solid #a78bfa; }

/* ── Step 22: Roast card (play picker) ── */
.game-picker-roast {
  border-top: 3px solid #a78bfa;
  opacity: 0.85; /* slightly muted to signal unavailable, but still readable */
  cursor: default;
  pointer-events: none;
}

/* ── Step 14: Mobile Nav Hamburger ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  line-height: 1;
  border-radius: 8px;
  transition: background 120ms ease;
}
.nav-hamburger:hover { background: rgba(69,185,255,0.08); }

@media (max-width: 760px) {
  .nav-links { display: none !important; }
  .nav-hamburger { display: flex; align-items: center; }
}

.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(7,11,20,0.96);
  backdrop-filter: blur(12px);
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  padding-top: 80px;
}
.nav-drawer a {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(104,148,194,0.1);
}
.nav-drawer a:hover { color: var(--primary); }
.nav-drawer-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

body.nav-mobile-open .nav-drawer { display: flex; }
body.nav-mobile-open { overflow: hidden; }

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

/* ── Step 15: Stat Skeleton Loading ── */
.stat-skeleton {
  display: inline-block;
  min-width: 32px;
  height: 1em;
  background: linear-gradient(90deg,
    rgba(69,185,255,0.08) 25%,
    rgba(69,185,255,0.16) 50%,
    rgba(69,185,255,0.08) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── arena-review-ui-002 fixes ────────────────────────────── */

/* Fix: inline <code> elements — styled for documentation readability */
:not(.code-block) > code,
p code,
li code,
td code,
h3 code,
h4 code {
  font-family: 'Space Mono', monospace;
  font-size: 0.82em;
  background: rgba(69, 185, 255, 0.08);
  border: 1px solid rgba(69, 185, 255, 0.18);
  border-radius: 4px;
  padding: 1px 5px;
  color: #b8e7ff;
  white-space: nowrap;
}

body.page-docs :not(.code-block) > code,
body.page-docs p code,
body.page-docs li code,
body.page-docs td code,
body.page-docs h3 code,
body.page-docs h4 code {
  background: rgba(132, 90, 42, 0.08);
  border-color: rgba(132, 90, 42, 0.18);
  color: #7e3f19;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Fix: minimum label sizes — raise floor to 0.72rem (~11.5px) */
.kicker,
.section-title,
.field-label,
.mission-kicker {
  font-size: 0.72rem;
}

.live-badge {
  font-size: 0.72rem;
}

.battle-ticker {
  font-size: 0.72rem;
}

.coming-soon-badge {
  font-size: 0.68rem; /* badge-only context, slightly smaller is ok */
}

.player-pill {
  font-size: 0.68rem;
}

.player-state {
  font-size: 0.69rem;
}

/* Fix: reconnect banner — use design tokens, match site theme */
.reconnect-banner {
  background: rgba(255, 201, 120, 0.1);
  border-bottom: 1px solid rgba(255, 201, 120, 0.35);
  color: var(--warning);
  backdrop-filter: blur(8px);
  animation: none; /* remove jarring pulse on a persistent banner */
}

/* Fix: battle ticker overflow — was an inline style on index.html */
.battle-ticker-wrap {
  overflow: hidden;
  max-width: 100%;
}

/* Fix: h2/h3 vertical rhythm inside .panel — replaces inline styles */
.panel h2,
.panel h3 {
  margin-top: 20px;
  margin-bottom: 6px;
}

.panel h2:first-child,
.panel h3:first-child,
.panel h1:first-child {
  margin-top: 0;
}

/* Fix: guide.html table — remove need for inline styles */
.event-table {
  width: 100%;
  font-size: 0.82rem;
  border-collapse: collapse;
  margin-top: 8px;
}

.event-table thead tr {
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.event-table td,
.event-table th {
  padding: 7px 10px;
  vertical-align: top;
}

.event-table tbody tr:hover {
  background: rgba(69, 185, 255, 0.03);
}

/* Fix: theme-color meta fallback (applied via JS) */
/* Note: add <meta name="theme-color" content="#070b14"> to all pages */

body.page-mvp {
  color: #1f2933;
  background:
    radial-gradient(760px 320px at 0% 0%, rgba(216, 186, 130, 0.2), transparent 60%),
    radial-gradient(680px 280px at 100% 0%, rgba(129, 168, 153, 0.18), transparent 58%),
    linear-gradient(180deg, #f8f3ea, #f3eee3 48%, #efe7d8 100%);
}

body.page-mvp::before,
body.page-mvp::after {
  display: none;
}

body.page-mvp .topnav {
  border-color: rgba(110, 88, 54, 0.12);
  background: rgba(255, 251, 245, 0.88);
  box-shadow: 0 10px 24px rgba(68, 54, 33, 0.08);
}

body.page-mvp .nav-links a,
body.page-mvp .btn-ghost,
body.page-mvp .text-muted,
body.page-mvp .field-label,
body.page-mvp .section-title {
  color: #6c655c;
}

body.page-mvp .nav-links a:hover,
body.page-mvp .nav-links a.active,
body.page-mvp .btn-ghost:hover {
  color: #1f2933;
  background: rgba(79, 71, 57, 0.08);
}

body.page-mvp .card,
body.page-mvp .panel,
body.page-mvp .dev-panel,
body.page-mvp .match-chip {
  border-color: rgba(110, 88, 54, 0.12);
  background: rgba(255, 251, 245, 0.9);
  box-shadow: 0 16px 30px rgba(68, 54, 33, 0.08);
}

body.page-mvp .card::before,
body.page-mvp .panel::before,
body.page-mvp .dev-panel::before,
body.page-mvp .hero-simple::before,
body.page-mvp .hero::before {
  background: none;
}

body.page-mvp .btn {
  border-color: rgba(110, 88, 54, 0.14);
  background: rgba(255, 249, 240, 0.92);
  color: #1f2933;
}

body.page-mvp .btn:hover {
  border-color: rgba(110, 88, 54, 0.24);
  background: rgba(255, 246, 234, 0.98);
}

body.page-mvp .btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #1f5f4a, #2f7d62);
  color: #f8f6f0;
  box-shadow: 0 8px 20px rgba(47, 125, 98, 0.2);
}

body.page-mvp .btn-primary:hover {
  background: linear-gradient(135deg, #246e55, #39866b);
}

body.page-mvp input[type='text'],
body.page-mvp input[type='email'],
body.page-mvp select {
  border-color: rgba(110, 88, 54, 0.15);
  background: #fffdf8;
  color: #1f2933;
}

.mvp-home {
  display: grid;
  gap: 18px;
}

.mvp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 60vh;
  padding: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 44px);
}

.mvp-play-shell {
  padding: clamp(28px, 4vw, 44px);
}

.mvp-kicker {
  margin-bottom: 10px;
  color: #7b7368;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mvp-hero h1,
.mvp-play-title {
  max-width: 18ch;
  font-size: clamp(2.25rem, 4.4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.mvp-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36ch;
  line-height: 1.5;
}

.mvp-copy {
  max-width: 52ch;
  margin-top: 12px;
  color: #5f5a53;
  font-size: 1rem;
}

.mvp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  justify-content: center;
}

.mvp-setup-note {
  margin-top: 14px;
  color: #6c655c;
  font-size: 0.85rem;
}

/* ── page-home: Dark "Claw of Deceit" homepage ── */
body.page-home {
  background: #0A0A0F;
  color: #F0F0F5;
  font-family: 'Geist', 'Inter', sans-serif;
}
body.page-home::before,
body.page-home::after { display: none; }

/* Nav overrides */
body.page-home .topnav {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
body.page-home .brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 3px;
  color: #F0F0F5;
  display: flex;
  align-items: center;
  gap: 12px;
}
body.page-home .nav-links a {
  color: #8888A0;
  font-family: 'Geist', 'Inter', sans-serif;
}
body.page-home .nav-links a:hover { color: #F0F0F5; background: rgba(255,255,255,0.05); }
body.page-home .btn-primary.btn-sm {
  background: #DC2626;
  border-color: transparent;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}
body.page-home .btn-primary.btn-sm:hover { background: #ef4444; }

/* Nav drawer */
body.page-home .nav-drawer {
  background: #12121A;
  border-color: #2A2A3A;
}
body.page-home .nav-drawer a { color: #F0F0F5; }

/* Hero */
body.page-home .home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 100px 0 60px;
  min-height: 80vh;
}
body.page-home .home-hero-content {
  flex: 1;
  max-width: 600px;
}
body.page-home .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #10B981;
  margin-bottom: 32px;
}
body.page-home .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
body.page-home .home-hero h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #F0F0F5;
  margin: 0 0 24px;
}
body.page-home .text-red { color: #DC2626; }
body.page-home .home-hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #8888A0;
  max-width: 480px;
  margin: 0 0 36px;
}
body.page-home .home-hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
body.page-home .btn-red-glow {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: #DC2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.35);
  transition: all 0.2s;
}
body.page-home .btn-red-glow:hover {
  background: #ef4444;
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.5);
  transform: translateY(-1px);
}
body.page-home .btn-outlined {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: transparent;
  color: #F0F0F5;
  border: 1px solid #2A2A3A;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
body.page-home .btn-outlined:hover {
  border-color: #55556A;
  background: rgba(255, 255, 255, 0.03);
}

/* Arena Viz */
body.page-home .arena-viz {
  width: 420px;
  min-width: 360px;
  background: #12121A;
  border: 1px solid #2A2A3A;
  border-radius: 16px;
  padding: 20px;
  position: relative;
  flex-shrink: 0;
}
body.page-home .arena-viz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
body.page-home .arena-viz-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10B981;
}
body.page-home .arena-viz-round { color: #55556A; }
body.page-home .arena-viz-ring {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 20px;
}
body.page-home .arena-agent {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-110px) rotate(calc(-1 * var(--angle)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
body.page-home .agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
body.page-home .agent-avatar.dead { opacity: 0.4; }
body.page-home .agent-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #8888A0;
  letter-spacing: 0.02em;
}
body.page-home .dead-label { color: #55556A; text-decoration: line-through; }
body.page-home .arena-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #2A2A3A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: #55556A;
}
body.page-home .arena-chat {
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid #2A2A3A;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
body.page-home .chat-msg {
  font-size: 0.75rem;
  color: #8888A0;
  line-height: 1.4;
}
body.page-home .chat-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  margin-right: 4px;
}
body.page-home .arena-viewers {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #55556A;
}

/* Stats strip */
body.page-home .home-stats {
  display: flex;
  justify-content: space-between;
  padding: 32px 0;
  border-top: 1px solid #2A2A3A;
  border-bottom: 1px solid #2A2A3A;
}
body.page-home .home-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
body.page-home .home-stats .stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: #F0F0F5;
}
body.page-home .home-stats .stat-num.stat-red { color: #DC2626; }
body.page-home .home-stats .stat-num.stat-green { color: #10B981; }
body.page-home .home-stats .stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #55556A;
}

/* How It Works */
body.page-home .home-how {
  padding: 100px 0;
  text-align: center;
}
body.page-home .home-how-label {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #DC2626;
  margin-bottom: 16px;
}
body.page-home .home-how-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #F0F0F5;
  margin: 0 0 12px;
}
body.page-home .home-how-sub {
  font-size: 1.05rem;
  color: #8888A0;
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.6;
}
body.page-home .home-how-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
body.page-home .home-how-card {
  background: #12121A;
  border: 1px solid #2A2A3A;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: left;
}
body.page-home .home-how-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #DC2626;
  display: block;
  margin-bottom: 16px;
}
body.page-home .home-how-icon {
  color: #8888A0;
  margin-bottom: 16px;
}
body.page-home .home-how-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #F0F0F5;
  margin: 0 0 10px;
}
body.page-home .home-how-card p {
  font-size: 0.9rem;
  color: #8888A0;
  line-height: 1.6;
  margin: 0;
}

/* Final CTA */
body.page-home .home-cta-final {
  text-align: center;
  padding: 100px 0;
  background: linear-gradient(180deg, #0A0A0F 0%, #1a0a0a 50%, #0A0A0F 100%);
  margin: 0 calc(-1 * max(0px, (100vw - 1200px) / 2 + 24px));
  padding-left: max(24px, (100vw - 1200px) / 2);
  padding-right: max(24px, (100vw - 1200px) / 2);
}
body.page-home .home-cta-quote {
  font-family: 'Geist', 'Inter', sans-serif;
  font-size: 1rem;
  font-style: italic;
  color: #55556A;
  margin: 0 0 24px;
}
body.page-home .home-cta-final h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  color: #F0F0F5;
  margin: 0 0 12px;
}
body.page-home .home-cta-sub {
  font-size: 1.05rem;
  color: #8888A0;
  margin: 0 0 36px;
}
body.page-home .home-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
body.page-home .home-footer {
  padding: 60px 0 0;
}
body.page-home .home-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
}
body.page-home .home-footer-brand { max-width: 260px; }
body.page-home .home-footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #F0F0F5;
  margin-bottom: 10px;
}
body.page-home .home-footer-tagline {
  font-size: 0.85rem;
  color: #55556A;
  line-height: 1.5;
  margin: 0;
}
body.page-home .home-footer-columns {
  display: flex;
  gap: 60px;
}
body.page-home .home-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.page-home .home-footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #55556A;
  margin: 0 0 4px;
}
body.page-home .home-footer-col a {
  font-size: 0.85rem;
  color: #8888A0;
  text-decoration: none;
}
body.page-home .home-footer-col a:hover { color: #F0F0F5; }
body.page-home .home-footer-divider {
  height: 1px;
  background: #2A2A3A;
}
body.page-home .home-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 32px;
  font-size: 0.78rem;
  color: #55556A;
}
body.page-home .home-footer-legal {
  display: flex;
  gap: 20px;
}
body.page-home .home-footer-legal a {
  color: #55556A;
  text-decoration: none;
}
body.page-home .home-footer-legal a:hover { color: #8888A0; }

/* Responsive */
@media (max-width: 1024px) {
  body.page-home .home-hero {
    flex-direction: column;
    text-align: center;
    padding: 80px 0 40px;
    min-height: auto;
  }
  body.page-home .home-hero-content { max-width: 100%; }
  body.page-home .home-hero-sub { margin-left: auto; margin-right: auto; }
  body.page-home .home-hero-ctas { justify-content: center; }
  body.page-home .arena-viz { width: 100%; max-width: 420px; min-width: auto; }
  body.page-home .home-footer-top { flex-direction: column; }
}

@media (max-width: 768px) {
  body.page-home .home-how-cards { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  body.page-home .home-stats { flex-wrap: wrap; gap: 24px; justify-content: center; }
  body.page-home .home-stats .stat { min-width: 120px; }
  body.page-home .home-footer-columns { flex-wrap: wrap; gap: 32px; }
  body.page-home .home-cta-final { padding: 60px 24px; margin: 0 -24px; }
}

@media (max-width: 480px) {
  body.page-home .home-hero h1 { font-size: 2.2rem; }
  body.page-home .home-stats .stat-num { font-size: 1.5rem; }
  body.page-home .arena-viz-ring { width: 220px; height: 220px; }
  body.page-home .arena-agent { transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-85px) rotate(calc(-1 * var(--angle))); }
  body.page-home .home-footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  body.page-home .home-hero-ctas { flex-direction: column; align-items: stretch; }
  body.page-home .btn-red-glow,
  body.page-home .btn-outlined { justify-content: center; }
}


body.page-docs .mvp-sub {
  font-size: 1.35rem;
  max-width: 42ch;
}

body.page-docs #mafia {
  padding: 26px;
}

body.page-docs #mafia h2 {
  font-size: 1.55rem;
}

body.page-docs #mafia .text-sm {
  font-size: 1.02rem;
  line-height: 1.55;
}

body.page-docs .game-detail-article {
  padding: 26px;
}

body.page-docs .game-detail-article h3 {
  font-size: 1.25rem;
}

body.page-docs .game-detail-article .text-sm {
  font-size: 1.02rem;
  line-height: 1.55;
}

.stats-strip {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 32px 0;
  margin: -8px 0 24px;
}
.stat {
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
}
.stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-top: 2px;
}

.mvp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.owner-watch-shell {
  display: grid;
  gap: 16px;
}

body.page-watch-owner #ownerWatchCard {
  border-color: rgba(39, 213, 173, 0.16);
  background: linear-gradient(145deg, rgba(5, 12, 20, 0.96), rgba(9, 18, 29, 0.94));
}

.owner-watch-header {
  align-items: flex-start;
  gap: 12px;
}

.owner-watch-kicker {
  margin: 0 0 4px;
  color: #4a6a5a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: 'Space Mono', monospace;
}

.owner-watch-status {
  margin: 8px 0 0;
  color: #c5ddd3;
  max-width: 62ch;
}

.owner-watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.owner-switcher-shell {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(39, 213, 173, 0.14);
  border-radius: 18px;
  background: rgba(8, 16, 26, 0.92);
}

.owner-switcher-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.owner-switcher-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.owner-switcher-pill {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(197, 221, 211, 0.12);
  background: rgba(11, 19, 30, 0.96);
  color: #f5fbf8;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.owner-switcher-pill:hover {
  border-color: rgba(39, 213, 173, 0.34);
  transform: translateY(-1px);
}

.owner-switcher-pill.is-selected {
  border-color: rgba(39, 213, 173, 0.56);
  background: linear-gradient(145deg, rgba(13, 31, 33, 0.98), rgba(10, 24, 32, 0.94));
  box-shadow: 0 10px 30px rgba(12, 24, 20, 0.24);
}

.owner-switcher-pill-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
}

.owner-switcher-pill-meta {
  color: #8db5a7;
  font-size: 0.76rem;
}

.owner-upgrade-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  background: linear-gradient(150deg, rgba(24, 11, 16, 0.95), rgba(14, 17, 28, 0.94));
}

.owner-upgrade-card h3 {
  margin: 6px 0 4px;
  font-size: 1rem;
}

.owner-upgrade-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.owner-upgrade-field {
  display: grid;
  gap: 6px;
}

.owner-upgrade-field input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(197, 221, 211, 0.14);
  background: rgba(7, 12, 21, 0.94);
  color: #f5fbf8;
  padding: 11px 12px;
}

.owner-upgrade-field input::placeholder {
  color: rgba(197, 221, 211, 0.32);
}

.owner-quote-chip {
  grid-column: 1 / -1;
}

body.page-watch-owner #ownerWatchCard .match-chip {
  border-color: rgba(39, 213, 173, 0.14);
  background: rgba(7, 15, 24, 0.94);
}

.owner-replay-shell {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(39, 213, 173, 0.12);
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(6, 14, 24, 0.96), rgba(8, 18, 30, 0.92));
}

.owner-replay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.owner-replay-copy {
  margin: 8px 0 0;
  max-width: 66ch;
  color: #c5ddd3;
}

.owner-replay-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.owner-replay-feed {
  display: grid;
  gap: 12px;
}

.replay-empty-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(39, 213, 173, 0.2);
  background: rgba(8, 16, 26, 0.88);
}

.replay-story-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(39, 213, 173, 0.12);
  background: rgba(8, 16, 26, 0.94);
}

.replay-story-card.is-win {
  border-color: rgba(39, 213, 173, 0.22);
}

.replay-story-card.is-loss {
  border-color: rgba(220, 38, 38, 0.18);
}

.replay-story-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.replay-story-header h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.replay-story-kicker {
  margin: 0;
  color: #4a6a5a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Space Mono', monospace;
}

.replay-story-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(39, 213, 173, 0.2);
  background: rgba(39, 213, 173, 0.08);
  color: #dff9ef;
  font-family: 'Space Mono', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.replay-story-card.is-loss .replay-story-badge {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.08);
}

.replay-story-copy {
  margin: 0;
  color: #e3f3ea;
  line-height: 1.55;
}

.replay-story-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.replay-story-meta span {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #8db5a7;
  font-size: 0.78rem;
}

.replay-story-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.replay-story-panel {
  border-top: 1px solid rgba(39, 213, 173, 0.1);
  padding-top: 14px;
}

.replay-story-expanded {
  display: grid;
  gap: 14px;
}

.replay-story-expanded-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.replay-highlight-list,
.replay-turn-list {
  display: grid;
  gap: 10px;
}

.replay-highlight-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.replay-highlight-item h4 {
  margin: 4px 0;
  font-size: 0.98rem;
}

.replay-highlight-item p {
  margin: 0;
  color: #c5ddd3;
}

.replay-highlight-time,
.replay-turn-time {
  color: #4a6a5a;
  font-size: 0.72rem;
  font-family: 'Space Mono', monospace;
}

.replay-turn-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.replay-turn-row p {
  margin: 4px 0 0;
  color: #c5ddd3;
}

.owner-watch-quote {
  margin: 8px 0 0;
  color: #e3f3ea;
  line-height: 1.5;
}

.mvp-card {
  min-height: 100%;
}

body.page-mvp .mvp-card .section-title {
  font-size: 1rem;
}

.mafia-launch-grid {
  margin-top: 18px;
}

.mvp-steps {
  margin-left: 18px;
  color: #3f4449;
}

.mvp-steps li + li {
  margin-top: 6px;
}

.mvp-advanced-panel summary {
  cursor: pointer;
  list-style: none;
  color: #3d4652;
  font-size: 0.9rem;
  font-weight: 700;
}

.mvp-advanced-panel summary::-webkit-details-marker {
  display: none;
}

.mvp-advanced-panel[open] summary {
  margin-bottom: 10px;
}

.mvp-join-form,
.mvp-inline-join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.mvp-inline-join {
  margin-top: 18px;
}

.status-inline {
  min-height: 24px;
  margin-top: 14px;
  color: #615b53;
}

.status-inline-warn {
  color: #945900;
}

body.page-mvp .status-bar {
  border-color: rgba(110, 88, 54, 0.12);
  background: rgba(255, 251, 245, 0.9);
  color: #3a3d42;
}

body.page-mvp .player-card {
  background: rgba(249, 245, 237, 0.96);
}

body.page-mvp .roadmap-card {
  border-style: dashed;
  opacity: 0.88;
}

body.page-mvp .roadmap-card .coming-soon-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  background: rgba(116, 96, 67, 0.1);
  border-color: rgba(116, 96, 67, 0.26);
  color: #6f5d46;
}

body.page-mvp .status-bar a,
body.page-mvp .text-muted a {
  color: #1f5f4a;
}

body.page-mvp .status-bar a:hover,
body.page-mvp .text-muted a:hover {
  color: #153f32;
}

body.page-mvp .stat-num {
  color: #1f2933;
}
body.page-mvp .stat-label {
  color: #5f5a53;
}

.onboarding-glance article h3 {
  margin-bottom: 8px;
}

.onboarding-rail {
  display: grid;
  gap: 10px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(126, 98, 69, 0.12);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.72);
}

.onboarding-step h3 {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.onboarding-step p {
  color: #5f513f;
  font-size: 0.8rem;
}

.onboarding-step .code-block {
  display: block;
  width: 100%;
}

.onboarding-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(129, 99, 69, 0.1);
  color: #6b553d;
}

.onboarding-step-current {
  border-color: rgba(77, 126, 170, 0.22);
  background: rgba(246, 251, 255, 0.86);
}

.onboarding-step-current .onboarding-step-num {
  background: rgba(58, 169, 235, 0.14);
  color: #195178;
}

.onboarding-step-complete {
  border-color: rgba(67, 149, 107, 0.22);
  background: rgba(243, 251, 246, 0.9);
}

.onboarding-step-complete .onboarding-step-num {
  background: rgba(39, 213, 173, 0.14);
  color: #1f6b57;
}

.onboarding-step-blocked {
  opacity: 0.82;
}

.onboarding-state-card h2 {
  margin-top: 8px;
}

.onboarding-main-cta {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}

.onboarding-troubleshooting {
  border-style: dashed;
}

.onboarding-help-list {
  margin-left: 18px;
}

.onboarding-help-list li + li {
  margin-top: 6px;
}

#postConnectBanner {
  display: grid;
  gap: 8px;
}

body.page-docs.page-mvp {
  color: #213047;
  background:
    radial-gradient(900px 420px at 4% -10%, rgba(255, 166, 93, 0.16), transparent 62%),
    radial-gradient(760px 420px at 95% -12%, rgba(255, 214, 151, 0.24), transparent 64%),
    linear-gradient(180deg, #f7f0e4 0%, #fbf6ee 48%, #f2e7d7 100%);
}

body.page-docs.page-mvp .topnav {
  border-color: rgba(127, 92, 52, 0.14);
  background: rgba(255, 249, 239, 0.92);
  box-shadow: 0 12px 28px rgba(109, 83, 52, 0.08);
}

body.page-docs.page-mvp .brand,
body.page-docs.page-mvp h1,
body.page-docs.page-mvp h2,
body.page-docs.page-mvp h3,
body.page-docs.page-mvp .mvp-play-title,
body.page-docs.page-mvp .section-title {
  color: #1f2e44;
}

body.page-docs.page-mvp .nav-links a,
body.page-docs.page-mvp .field-label,
body.page-docs.page-mvp .mvp-kicker,
body.page-docs.page-mvp .mission-kicker {
  color: #7a634a;
}

body.page-docs.page-mvp .nav-links a:hover,
body.page-docs.page-mvp .nav-links a.active {
  color: #1d2d45;
  background: rgba(245, 225, 190, 0.72);
}

body.page-docs.page-mvp .text-muted,
body.page-docs.page-mvp .text-ink2,
body.page-docs.page-mvp .sub,
body.page-docs.page-mvp article p,
body.page-docs.page-mvp .checklist-item,
body.page-docs.page-mvp .player-meta {
  color: #5f513f;
}

body.page-docs.page-mvp .card,
body.page-docs.page-mvp .panel,
body.page-docs.page-mvp .dev-panel,
body.page-docs.page-mvp .match-chip {
  border-color: rgba(130, 102, 71, 0.14);
  background: rgba(255, 250, 242, 0.96);
  box-shadow: 0 18px 42px rgba(129, 99, 69, 0.1);
}

body.page-docs.page-mvp .btn-soft {
  color: #6a533c;
  border-color: rgba(127, 92, 52, 0.16);
  background: rgba(246, 237, 224, 0.96);
}

body.page-docs.page-mvp .btn-soft:hover,
body.page-docs.page-mvp .btn-ghost:hover {
  color: #1f2e44;
  background: rgba(233, 212, 182, 0.56);
}

body.page-docs.page-mvp table {
  width: 100%;
  table-layout: fixed;
}

body.page-docs.page-mvp td,
body.page-docs.page-mvp th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── Terminal-style spectator experience ─────────────────── */

.spectator-summary {
  display: grid;
  gap: 0.6rem;
}

.spectator-summary-card,
.spectator-baseline-card,
.spectator-feed-item {
  border: 1px solid rgba(39, 213, 173, 0.15);
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.92);
  padding: 0.75rem 1rem;
  font-family: 'Space Mono', monospace;
}

.spectator-summary-card h3,
.spectator-baseline-card h3,
.spectator-feed-item h3 {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
  font-family: 'Space Mono', monospace;
  color: #27d5ad;
}

.spectator-summary-card p,
.spectator-baseline-card p,
.spectator-feed-item p {
  margin: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.76rem;
}

.spectator-stat-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.spectator-stat-value {
  color: #27d5ad;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
}

/* Terminal feed container */
.spectator-feed {
  display: grid;
  gap: 0;
  background: rgba(3, 8, 16, 0.95);
  border: 1px solid rgba(39, 213, 173, 0.12);
  border-radius: 10px;
  padding: 0.5rem;
  max-height: 520px;
  overflow-y: auto;
}

.spectator-feed-item {
  display: grid;
  gap: 0.15rem;
  border: none;
  border-radius: 4px;
  border-left: 3px solid rgba(39, 213, 173, 0.2);
  background: transparent;
  padding: 0.5rem 0.75rem;
  transition: background 150ms ease;
}

.spectator-feed-item:hover {
  background: rgba(39, 213, 173, 0.04);
}

.spectator-feed-item h3 {
  color: #9cb0ca;
  font-size: 0.82rem;
}

.spectator-feed-item .text-sm {
  color: #6b7a90;
  font-size: 0.74rem;
}

/* ── Own agent highlighting: bright green with glow ── */
.spectator-feed-item.is-owner {
  border-left-color: #27d5ad;
  background: rgba(39, 213, 173, 0.06);
  box-shadow: inset 0 0 12px rgba(39, 213, 173, 0.05);
}

.spectator-feed-item.is-owner h3 {
  color: #27d5ad;
  text-shadow: 0 0 8px rgba(39, 213, 173, 0.4);
}

.spectator-feed-item.is-owner .spectator-feed-kicker {
  color: #27d5ad;
}

.spectator-feed-item.is-owner .text-sm {
  color: #9cb0ca;
}

/* Phase change / system events: amber */
.spectator-feed-item.is-system {
  border-left-color: #ffc978;
}

.spectator-feed-item.is-system h3 {
  color: #ffc978;
}

.spectator-feed-item.is-system .spectator-feed-kicker {
  color: #ffc978;
}

/* Elimination events: red */
.spectator-feed-item.is-elimination {
  border-left-color: #ff8799;
}

.spectator-feed-item.is-elimination h3 {
  color: #ff8799;
}

.spectator-feed-item.is-elimination .spectator-feed-kicker {
  color: #ff8799;
}

.spectator-feed-kicker {
  color: #4a6a5a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Space Mono', monospace;
}

/* Terminal scanline effect on feed container */
body.page-watch-owner #spectatorReadSection .card {
  background: rgba(5, 12, 20, 0.95);
  border-color: rgba(39, 213, 173, 0.12);
}

body.page-watch-owner #spectatorReadSection .section-title {
  color: #27d5ad;
  font-family: 'Space Mono', monospace;
}

body.page-watch-owner #spectatorReadSection .text-muted {
  color: #4a6a5a;
  font-family: 'Space Mono', monospace;
}

/* ── Persona viewer on watch page ─────────────────────────── */
.persona-viewer {
  border: 1px solid rgba(39, 213, 173, 0.15);
  border-radius: 10px;
  background: rgba(5, 12, 20, 0.92);
  padding: 1rem;
  font-family: 'Space Mono', monospace;
}

.persona-viewer .section-title {
  color: #27d5ad;
  font-family: 'Space Mono', monospace;
}

.persona-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(39, 213, 173, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(39, 213, 173, 0.08);
  color: #27d5ad;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.persona-field {
  padding: 8px;
  border-radius: 6px;
  background: rgba(39, 213, 173, 0.04);
}

.persona-field .field-label {
  color: #4a6a5a;
  font-family: 'Space Mono', monospace;
}

.persona-field-value {
  color: #9cb0ca;
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ── Strategy guidance panel ─────────────────────────────── */
.strategy-guidance {
  border: 1px solid rgba(255, 201, 120, 0.15);
  border-radius: 10px;
  background: rgba(5, 12, 20, 0.92);
  padding: 1rem;
  font-family: 'Space Mono', monospace;
}

.strategy-guidance .section-title {
  color: #ffc978;
  font-family: 'Space Mono', monospace;
}

.strategy-guidance p {
  color: #9cb0ca;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
}

.strategy-guidance code {
  background: rgba(255, 201, 120, 0.08);
  border: 1px solid rgba(255, 201, 120, 0.15);
  border-radius: 4px;
  padding: 1px 6px;
  color: #ffc978;
  font-size: 0.74rem;
}

/* ── Atmospheric waiting state ───────────────────────────── */
.terminal-waiting {
  font-family: 'Space Mono', monospace;
  text-align: center;
  padding: 2rem 1rem;
}

.terminal-waiting .waiting-scanner {
  color: #27d5ad;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #27d5ad;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.waiting-flavor {
  color: #4a6a5a;
  font-size: 0.74rem;
  margin-top: 12px;
  min-height: 1.2em;
  transition: opacity 300ms ease;
}

.waiting-flavor.fading {
  opacity: 0;
}

/* ── Celebratory connect moment ──────────────────────────── */
.connect-celebration {
  text-align: center;
  padding: 1.5rem;
  animation: celebrate-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes celebrate-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.connect-celebration h3 {
  font-size: 1.1rem;
  color: #27d5ad;
  margin-bottom: 6px;
}

.connect-celebration p {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Customization / character creation section ──────────── */
.preset-showcase {
  margin-top: 20px;
}

.preset-showcase .section-title {
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.preset-card {
  border: 1px solid rgba(39, 213, 173, 0.18);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(20, 37, 61, 0.88), rgba(14, 28, 49, 0.88));
  padding: 12px;
  text-align: center;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.preset-card:hover {
  border-color: rgba(39, 213, 173, 0.4);
  box-shadow: 0 0 16px rgba(39, 213, 173, 0.08);
}

.preset-card h4 {
  font-size: 0.85rem;
  color: #27d5ad;
  margin-bottom: 4px;
  text-transform: capitalize;
}

.preset-card p {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}

.copy-success {
  color: #27d5ad !important;
  font-weight: 700;
}

/* ── Post-game coaching nudge ────────────────────────────── */
.coaching-nudge {
  border: 1px solid rgba(255, 201, 120, 0.15);
  border-radius: 10px;
  background: rgba(5, 12, 20, 0.92);
  padding: 0.75rem 1rem;
  font-family: 'Space Mono', monospace;
  margin-top: 12px;
}

.coaching-nudge .coaching-label {
  color: #ffc978;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.coaching-nudge p {
  color: #9cb0ca;
  font-size: 0.78rem;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .mvp-join-form,
  .mvp-inline-join {
    grid-template-columns: 1fr;
  }

  .mvp-hero h1,
  .mvp-play-title {
    max-width: none;
  }

  .stats-strip { gap: 20px; flex-wrap: wrap; }
  .stat-num { font-size: 1.5rem; }

  .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
}

/* ===== CLAW PAGE — Dark "How It Works" / Join Redesign ===== */

.claw-page {
  --claw-bg: #0A0A0F;
  --claw-surface: #12121A;
  --claw-border: #2A2A3A;
  --claw-text: #F0F0F5;
  --claw-text-secondary: #8888A0;
  --claw-text-muted: #55556A;
  --claw-red: #DC2626;
  --claw-green: #10B981;
  --claw-amber: #F59E0B;
  --claw-orange: #FF8400;
  font-family: 'Geist', 'Inter', sans-serif;
  color: var(--claw-text);
  background: var(--claw-bg);
  min-height: 100vh;
}

.claw-page *,
.claw-page *::before,
.claw-page *::after {
  box-sizing: border-box;
}

/* — Nav — */
.claw-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 80px;
  width: 100%;
}

.claw-nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.claw-nav-logo svg {
  width: 28px;
  height: 28px;
  color: var(--claw-red);
}

.claw-nav-logo span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--claw-text);
}

.claw-nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.claw-nav-links a {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--claw-text-secondary);
  text-decoration: none;
  transition: color 150ms;
}

.claw-nav-links a:hover,
.claw-nav-links a.active {
  color: var(--claw-red);
  font-weight: 600;
}

.claw-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--claw-orange);
  color: #111;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  height: 40px;
  transition: filter 150ms;
}

.claw-nav-cta:hover {
  filter: brightness(1.1);
}

/* — Hero — */
.claw-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 80px 80px;
  gap: 24px;
  width: 100%;
}

.claw-hero h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--claw-text);
  margin: 0;
  text-align: center;
}

.claw-hero p {
  font-family: 'Geist', sans-serif;
  font-size: 26px;
  color: var(--claw-text-secondary);
  line-height: 1.5;
  text-align: center;
  max-width: 800px;
  margin: 0;
}

.claw-hero-accent {
  width: 80px;
  height: 4px;
  background: var(--claw-red);
  border-radius: 2px;
}

/* — Overview — */
.claw-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 120px;
  gap: 24px;
  width: 100%;
}

.claw-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--claw-red);
  text-transform: uppercase;
}

.claw-overview p {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  color: var(--claw-text-secondary);
  line-height: 1.7;
  text-align: center;
  max-width: 900px;
  margin: 0;
}

/* — Steps Section — */
.claw-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 80px;
  gap: 48px;
  width: 100%;
}

.claw-steps h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 42px;
  font-weight: 700;
  color: var(--claw-text);
  margin: 0;
}

.claw-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.claw-step-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 28px;
  background: var(--claw-surface);
  border: 1px solid var(--claw-border);
  border-radius: 12px;
}

.claw-step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 64px;
  font-weight: 700;
  color: var(--claw-red);
  opacity: 0.3;
  line-height: 1;
}

.claw-step-card svg {
  width: 32px;
  height: 32px;
  color: var(--claw-red);
}

.claw-step-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--claw-text);
  margin: 0;
}

.claw-step-card p {
  font-family: 'Geist', sans-serif;
  font-size: 18px;
  color: var(--claw-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* — Divider — */
.claw-divider {
  width: 100%;
  height: 1px;
  background: var(--claw-border);
}

/* — Roles Section — */
.claw-roles {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 80px;
  gap: 64px;
  width: 100%;
}

.claw-roles-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.claw-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid var(--claw-border);
  border-radius: 999px;
}

.claw-badge svg {
  width: 14px;
  height: 14px;
}

.claw-badge span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--claw-text-secondary);
}

.claw-roles h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 64px;
  font-weight: 800;
  color: var(--claw-text);
  text-align: center;
  margin: 0;
}

.claw-roles-header > p {
  font-family: 'Geist', sans-serif;
  font-size: 24px;
  color: #BEBECE;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0;
}

.claw-roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  width: 100%;
}

.claw-role-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px;
  background: var(--claw-surface);
  border-radius: 16px;
}

.claw-role-card--claw {
  border: 1px solid var(--claw-red);
  box-shadow: 0 0 80px #DC262640;
}

.claw-role-card--prey {
  border: 1px solid var(--claw-green);
  box-shadow: 0 0 80px #10B98140;
}

.claw-role-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.claw-role-card--claw .claw-role-icon {
  background: #DC262620;
}

.claw-role-card--prey .claw-role-icon {
  background: #10B98120;
}

.claw-role-icon svg {
  width: 32px;
  height: 32px;
}

.claw-role-card--claw .claw-role-icon svg { color: var(--claw-red); }
.claw-role-card--prey .claw-role-icon svg { color: var(--claw-green); }

.claw-role-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 38px;
  font-weight: 800;
  margin: 0;
}

.claw-role-card--claw h3 { color: var(--claw-red); }
.claw-role-card--prey h3 { color: var(--claw-green); }

.claw-role-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
}

.claw-role-card--claw .claw-role-tag { color: var(--claw-red); }
.claw-role-card--prey .claw-role-tag { color: var(--claw-green); }

.claw-role-card > p {
  font-family: 'Geist', sans-serif;
  font-size: 19px;
  color: #C8C8D8;
  line-height: 1.7;
  margin: 0;
}

.claw-traits {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.claw-trait {
  display: flex;
  align-items: center;
  gap: 12px;
}

.claw-trait svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.claw-role-card--claw .claw-trait svg { color: var(--claw-red); }
.claw-role-card--prey .claw-trait svg { color: var(--claw-green); }

.claw-trait span {
  font-family: 'Geist', sans-serif;
  font-size: 18px;
  color: #C8C8D8;
}

/* — Mechanics Section — */
.claw-mechanics {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 80px;
  gap: 64px;
  width: 100%;
}

.claw-mechanics-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.claw-mechanics h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 64px;
  font-weight: 800;
  color: var(--claw-text);
  text-align: center;
  margin: 0;
}

.claw-mechanics-header > p {
  font-family: 'Geist', sans-serif;
  font-size: 24px;
  color: #BEBECE;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0;
}

.claw-phases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
}

.claw-phase-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--claw-surface);
  border: 1px solid var(--claw-border);
  border-radius: 16px;
}

.claw-phase-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 60px;
  font-weight: 800;
  color: #F59E0B20;
  line-height: 1;
}

.claw-phase-card svg {
  width: 28px;
  height: 28px;
  color: var(--claw-amber);
}

.claw-phase-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--claw-text);
  margin: 0;
}

.claw-phase-card p {
  font-family: 'Geist', sans-serif;
  font-size: 17px;
  color: #C8C8D8;
  line-height: 1.7;
  margin: 0;
}

/* — CTA Section — */
.claw-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 80px;
  gap: 32px;
  width: 100%;
  background: linear-gradient(180deg, #0A0A0F 0%, #1A0A0A 50%, #0A0A0F 100%);
}

.claw-cta blockquote {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-style: italic;
  color: var(--claw-text-muted);
  line-height: 1.6;
  text-align: center;
  max-width: 700px;
  margin: 0;
}

.claw-cta h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 58px;
  font-weight: 800;
  color: var(--claw-text);
  text-align: center;
  margin: 0;
}

.claw-cta > p {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  color: var(--claw-text-secondary);
  line-height: 1.6;
  text-align: center;
  max-width: 750px;
  margin: 0;
}

.claw-cta-spacer {
  height: 16px;
}

.claw-cta-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.claw-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 36px;
  background: var(--claw-red);
  color: var(--claw-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 32px #DC262640;
  transition: filter 150ms, transform 150ms;
  text-decoration: none;
}

.claw-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.claw-btn-primary svg {
  width: 18px;
  height: 18px;
  color: var(--claw-text);
}

.claw-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 36px;
  background: transparent;
  color: var(--claw-text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid var(--claw-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 150ms, color 150ms;
  text-decoration: none;
}

.claw-btn-secondary:hover {
  border-color: var(--claw-text-secondary);
  color: var(--claw-text);
}

/* — Footer — */
.claw-footer {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 48px 80px;
  width: 100%;
}

.claw-footer-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.claw-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 300px;
}

.claw-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.claw-footer-logo svg {
  width: 22px;
  height: 22px;
  color: var(--claw-red);
}

.claw-footer-logo span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--claw-text);
}

.claw-footer-tagline {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  color: var(--claw-text-muted);
  line-height: 1.5;
  margin: 0;
}

.claw-footer-links {
  display: flex;
  gap: 80px;
}

.claw-footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.claw-footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--claw-text-muted);
  margin: 0;
  text-transform: uppercase;
}

.claw-footer-col a {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: var(--claw-text-secondary);
  text-decoration: none;
  transition: color 150ms;
}

.claw-footer-col a:hover {
  color: var(--claw-text);
}

.claw-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--claw-border);
}

.claw-footer-bottom span {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  color: var(--claw-text-muted);
}

.claw-footer-meta {
  display: flex;
  gap: 24px;
}

.claw-footer-meta a {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  color: var(--claw-text-muted);
  text-decoration: none;
  transition: color 150ms;
}

.claw-footer-meta a:hover {
  color: var(--claw-text-secondary);
}

/* — Hamburger / Drawer overrides for claw-page — */
.claw-page .nav-hamburger {
  color: var(--claw-text);
}

.claw-page .nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.05);
}

.claw-page .nav-drawer {
  background: rgba(10, 10, 15, 0.96);
}

.claw-page .nav-drawer a {
  color: var(--claw-text-secondary);
}

.claw-page .nav-drawer a:hover {
  color: var(--claw-text);
}

/* — Deploy Modal — */
.claw-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.claw-modal.active {
  display: flex;
}

.claw-modal-content {
  position: relative;
  background: var(--claw-surface);
  border: 1px solid var(--claw-border);
  border-radius: 16px;
  padding: 40px;
  max-width: 640px;
  width: calc(100% - 48px);
  max-height: 90vh;
  overflow-y: auto;
  color: var(--claw-text);
}

.claw-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--claw-border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--claw-text-secondary);
  cursor: pointer;
  font-size: 20px;
  transition: border-color 150ms, color 150ms;
}

.claw-modal-close:hover {
  border-color: var(--claw-text-secondary);
  color: var(--claw-text);
}

.claw-modal-content .section-header {
  margin-bottom: 10px;
}

.claw-modal-content .section-title {
  color: var(--claw-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.claw-modal-content .text-xs {
  color: var(--claw-text-muted) !important;
}

.claw-modal-content .text-muted,
.claw-modal-content .text-sm {
  color: var(--claw-text-secondary) !important;
}

.claw-modal-content .checklist-item {
  color: var(--claw-text-secondary);
  font-size: 0.82rem;
}

.claw-modal-content .checklist-item.done {
  color: var(--claw-green);
}

.claw-modal-content h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--claw-text);
  margin: 0 0 8px;
}

.claw-modal-content h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--claw-text);
  margin: 0;
}

.claw-modal-content p {
  color: var(--claw-text-secondary);
  font-size: 14px;
}

.claw-modal-content .code-block {
  background: var(--claw-bg);
  border: 1px solid var(--claw-border);
  color: var(--claw-text);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  word-break: break-all;
  display: block;
}

.claw-modal-content .onboarding-rail {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
}

.claw-modal-content .onboarding-step {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--claw-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.claw-modal-content .onboarding-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--claw-red);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.claw-modal-content .onboarding-main-cta {
  background: var(--claw-red) !important;
  border-color: var(--claw-red) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

.claw-modal-content .onboarding-main-cta:hover {
  filter: brightness(1.1);
}

.claw-modal-content .btn {
  border-color: var(--claw-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--claw-text);
  border-radius: 8px;
  font-size: 0.82rem;
}

.claw-modal-content .btn:hover {
  border-color: var(--claw-text-secondary);
  background: rgba(255, 255, 255, 0.08);
}

.claw-modal-content .btn-primary {
  background: var(--claw-red);
  border-color: var(--claw-red);
  color: #fff;
}

.claw-modal-content .btn-primary:hover {
  filter: brightness(1.1);
}

.claw-modal-content .status {
  color: var(--claw-text-secondary);
  font-size: 0.85rem;
  padding: 12px 16px;
  border: 1px solid var(--claw-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.claw-modal-content .mvp-cta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* — Responsive — */
@media (max-width: 1100px) {
  .claw-phases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .claw-nav { padding: 16px 24px; }
  .claw-hero { padding: 80px 24px 60px; }
  .claw-hero h1 { font-size: 36px; }
  .claw-overview { padding: 40px 24px; }
  .claw-steps { padding: 40px 24px; }
  .claw-steps-grid { grid-template-columns: 1fr; }
  .claw-roles { padding: 60px 24px; }
  .claw-roles h2 { font-size: 36px; }
  .claw-roles-grid { grid-template-columns: 1fr; }
  .claw-mechanics { padding: 60px 24px; }
  .claw-mechanics h2 { font-size: 36px; }
  .claw-phases-grid { grid-template-columns: 1fr; }
  .claw-cta { padding: 80px 24px; }
  .claw-cta h2 { font-size: 32px; }
  .claw-footer { padding: 32px 24px; }
  .claw-footer-top { flex-direction: column; gap: 32px; }
  .claw-footer-links { gap: 40px; flex-wrap: wrap; }
  .claw-nav-links { display: none; }
  .claw-nav-cta { display: none; }
  .claw-role-card { padding: 32px; }
}

@media (max-width: 600px) {
  .claw-hero h1 { font-size: 28px; }
  .claw-roles h2 { font-size: 28px; }
  .claw-mechanics h2 { font-size: 28px; }
  .claw-cta h2 { font-size: 24px; }
  .claw-cta-buttons { flex-direction: column; width: 100%; }
  .claw-btn-primary, .claw-btn-secondary { width: 100%; justify-content: center; }
  .claw-footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}


/* ── Arena Page ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

.page-arena {
  --claw-bg: #0a0a0f;
  --claw-surface: #111318;
  --claw-surface-2: #1a1d24;
  --claw-text: #e8e8ed;
  --claw-text-secondary: #8b8d98;
  --claw-text-muted: #5a5c66;
  --claw-red: #e53935;
  --claw-red-glow: rgba(229,57,53,0.4);
  --claw-border: #2a2d35;
  --claw-emerald: #27d5ad;
  --claw-amber: #ffc978;
}

/* Status Bar */
.arena-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 80px;
  border-bottom: 1px solid var(--claw-border);
  background: var(--claw-bg);
  font-family: 'JetBrains Mono', monospace;
}

.arena-status-left {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.arena-status-right {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.arena-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--claw-red);
}

.arena-status-left .arena-mono:nth-child(3) {
  color: var(--claw-text-muted);
  letter-spacing: 1.5px;
  font-weight: 500;
}

.arena-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--claw-red);
  animation: arena-pulse 2s ease-in-out infinite;
}

.arena-live-dot-sm {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--claw-red);
}

.arena-live-dot-emerald {
  background: var(--claw-emerald);
}

@keyframes arena-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.arena-divider {
  width: 1px;
  height: 24px;
  background: var(--claw-border);
}

.arena-phase-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--claw-text-secondary);
  padding: 4px 12px;
  border: 1px solid var(--claw-border);
  border-radius: 999px;
}

.arena-phase-badge.phase-night { color: var(--claw-red); border-color: var(--claw-red); }
.arena-phase-badge.phase-discussion { color: var(--claw-emerald); border-color: var(--claw-emerald); }
.arena-phase-badge.phase-voting { color: var(--claw-amber); border-color: var(--claw-amber); }

.arena-timer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--claw-surface-2);
  border-radius: 8px;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--claw-text);
}

.arena-timer-badge svg { color: var(--claw-text-secondary); }

.arena-spectators {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--claw-text-muted);
}

.arena-leave-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--claw-border);
  border-radius: 8px;
  background: none;
  color: var(--claw-text-secondary);
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.arena-leave-btn:hover {
  color: var(--claw-text);
  border-color: var(--claw-text-muted);
}

/* Main Content */
.arena-main {
  display: flex;
  gap: 32px;
  padding: 32px 80px;
  background: var(--claw-bg);
  min-height: 520px;
}

/* Arena Visualization Card */
.arena-viz-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--claw-surface);
  border: 1px solid var(--claw-border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.arena-viz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.arena-viz-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--claw-text-muted);
}

.arena-viz-label svg { color: var(--claw-red); }

.arena-view-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--claw-surface-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--claw-text-muted);
}

.arena-viz-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Agent Grid */
.arena-agent-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 16px 24px 24px;
  align-content: start;
}

.arena-agent-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: 12px;
  transition: opacity 0.3s;
}

.arena-agent-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--claw-bg);
}

.arena-agent-avatar.color-emerald { background: var(--claw-emerald); }
.arena-agent-avatar.color-red { background: var(--claw-red); }
.arena-agent-avatar.color-amber { background: var(--claw-amber); }

.arena-agent-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--claw-text);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-agent-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
}

.arena-agent-status.status-alive { color: var(--claw-emerald); }
.arena-agent-status.status-eliminated { color: var(--claw-red); }
.arena-agent-status.status-suspicious { color: var(--claw-amber); }

.arena-agent-node.is-eliminated {
  opacity: 0.4;
}

.arena-agent-node.is-you .arena-agent-avatar {
  box-shadow: 0 0 20px 4px var(--claw-red-glow);
  border: 2px solid var(--claw-red);
}

.arena-you-tag {
  display: inline-block;
  background: var(--claw-red);
  color: var(--claw-bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 999px;
}

.arena-agent-x {
  color: var(--claw-red);
  font-size: 18px;
  line-height: 1;
}

/* Mini Chat Log */
.arena-mini-chat {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(10, 10, 15, 0.85);
  border: 1px solid var(--claw-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow: hidden;
}

.arena-mini-chat:empty { display: none; }

.arena-mini-msg {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.arena-mini-msg-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.arena-mini-msg-name.color-emerald { color: var(--claw-emerald); }
.arena-mini-msg-name.color-red { color: var(--claw-red); }
.arena-mini-msg-name.color-amber { color: var(--claw-amber); }

.arena-mini-msg-text {
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  color: var(--claw-text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Discussion Panel */
.arena-discussion-card {
  width: 400px;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  background: var(--claw-surface);
  border: 1px solid var(--claw-border);
  border-radius: 16px;
  overflow: hidden;
}

.arena-discussion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--claw-border);
}

.arena-discussion-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--claw-text-muted);
}

.arena-discussion-label svg { color: var(--claw-red); }

.arena-autoscroll-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--claw-surface-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--claw-text-muted);
}

.arena-discussion-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  max-height: 600px;
}

.arena-placeholder-msg {
  color: var(--claw-text-muted);
  font-size: 13px;
  font-family: 'Geist', sans-serif;
}

.arena-empty-state {
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 80px 16px;
}

.arena-placeholder-kicker {
  margin: 0;
  color: rgba(224, 229, 240, 0.52);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.arena-placeholder-title {
  margin: 0;
  color: #f6f7fb;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.arena-empty-state a {
  color: var(--primary);
}

.arena-empty-state a:hover {
  color: var(--primary-hover);
}

.arena-msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arena-msg.is-yours {
  background: rgba(220, 38, 38, 0.06);
  border-radius: 10px;
  padding: 12px;
}

.arena-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arena-msg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.arena-msg-dot.color-emerald { background: var(--claw-emerald); }
.arena-msg-dot.color-red { background: var(--claw-red); }
.arena-msg-dot.color-amber { background: var(--claw-amber); }

.arena-msg-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}

.arena-msg-name.color-emerald { color: var(--claw-emerald); }
.arena-msg-name.color-red { color: var(--claw-red); }
.arena-msg-name.color-amber { color: var(--claw-amber); }

.arena-msg-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--claw-text-muted);
  margin-left: auto;
}

.arena-msg-body {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  color: var(--claw-text-secondary);
  line-height: 1.5;
}

.arena-msg-system {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--claw-text-muted);
}

.arena-msg-system svg { color: var(--claw-text-muted); }

/* Voting Footer */
.arena-voting-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--claw-border);
  gap: 12px;
  flex-wrap: wrap;
}

.arena-vote-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--claw-text-muted);
}

.arena-vote-tallies {
  display: flex;
  align-items: center;
  gap: 12px;
}

.arena-vote-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}

.arena-vote-item.color-amber { color: var(--claw-amber); }
.arena-vote-item.color-emerald { color: var(--claw-emerald); }
.arena-vote-item.color-red { color: var(--claw-red); }
.arena-vote-item.color-muted { color: var(--claw-text-muted); font-weight: 500; }

/* Agent Status Strip */
.arena-agent-strip {
  display: flex;
  gap: 16px;
  padding: 24px 80px;
  border-top: 1px solid var(--claw-border);
  background: var(--claw-bg);
  overflow-x: auto;
}

.arena-agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--claw-surface);
  border: 1px solid var(--claw-border);
  border-radius: 12px;
  padding: 14px 16px;
  flex: 1;
  min-width: 180px;
}

.arena-agent-card.is-you {
  background: rgba(220, 38, 38, 0.06);
  border-color: var(--claw-red);
}

.arena-agent-card.is-eliminated {
  opacity: 0.5;
}

.arena-card-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--claw-bg);
  flex-shrink: 0;
}

.arena-card-avatar.color-emerald { background: var(--claw-emerald); }
.arena-card-avatar.color-red { background: var(--claw-red); }
.arena-card-avatar.color-amber { background: var(--claw-amber); }

.arena-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.arena-card-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--claw-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.arena-card-name .arena-you-tag { margin-left: 0; }

.arena-card-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
}

.arena-card-status.status-alive { color: var(--claw-emerald); }
.arena-card-status.status-eliminated { color: var(--claw-red); }

.arena-card-votes {
  display: flex;
  align-items: center;
  background: var(--claw-surface-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--claw-text-muted);
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .arena-status-bar { padding: 0 24px; }
  .arena-main { flex-direction: column; padding: 24px; }
  .arena-discussion-card { width: 100%; min-width: 0; }
  .arena-agent-strip { padding: 16px 24px; }
}

@media (max-width: 640px) {
  .arena-status-bar { padding: 0 16px; flex-wrap: wrap; height: auto; gap: 8px; padding: 12px 16px; }
  .arena-main { padding: 16px; }
  .arena-agent-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .arena-agent-strip { padding: 12px 16px; }
  .arena-agent-card { min-width: 160px; }
}

/* ═══════════════════════════════════════════════════════════
   REVAMPED LEADERBOARD PAGE
   Scoped under body.page-leaderboard
   ═══════════════════════════════════════════════════════════ */

body.page-leaderboard {
  margin: 0;
  padding: 0;
  background: #0A0A0F;
  color: #F0F0F5;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.page-leaderboard::before,
body.page-leaderboard::after {
  display: none;
}

/* ── Nav ── */
.lb-nav {
  background: #0A0A0F;
  padding: 0;
}

.lb-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 80px;
  max-width: 1440px;
  margin: 0 auto;
}

.lb-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.lb-logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #F0F0F5;
}

.lb-nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.lb-nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #8888A0;
  text-decoration: none;
  transition: color 150ms;
}

.lb-nav-links a:hover {
  color: #F0F0F5;
}

.lb-nav-links .lb-nav-active {
  color: #DC2626;
  font-weight: 600;
}

.lb-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #FF8400 !important;
  color: #F0F0F5 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  text-decoration: none !important;
  transition: background 150ms, box-shadow 150ms;
}

.lb-nav-cta:hover {
  background: #FF9520 !important;
  box-shadow: 0 0 20px rgba(255, 132, 0, 0.3);
}

/* ── Hero ── */
.lb-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 80px 40px;
  max-width: 1440px;
  margin: 0 auto;
}

.lb-hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #F0F0F5;
  margin: 0;
}

.lb-hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #8888A0;
  text-align: center;
  max-width: 600px;
  margin: 0;
  line-height: 1.5;
}

/* ── Tabs ── */
.lb-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 80px;
  max-width: 1440px;
  margin: 0 auto;
}

.lb-tab {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #8888A0;
  background: #12121A;
  border: 1px solid #2A2A3A;
  border-radius: 8px;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 150ms;
}

.lb-tab:hover {
  border-color: #55556A;
}

.lb-tab.is-active {
  background: #DC2626;
  border-color: #DC2626;
  color: #F0F0F5;
  font-weight: 600;
}

/* ── Podium ── */
.lb-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 32px;
  padding: 40px 120px;
  max-width: 1440px;
  margin: 0 auto;
}

.lb-podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  border-radius: 16px;
  background: #12121A;
  border: 1px solid #2A2A3A;
  width: 280px;
  text-align: center;
}

.lb-podium-card--first {
  width: 320px;
  padding: 40px 28px;
  border-color: #DC2626;
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.25), 0 12px 40px rgba(220, 38, 38, 0.15);
}

.lb-podium-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: #8888A0;
}

.lb-podium-card--first .lb-podium-rank {
  font-size: 28px;
  font-weight: 800;
  color: #DC2626;
}

.lb-podium-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #1A1A25;
  border: 2px solid #8888A0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #F0F0F5;
}

.lb-podium-card--first .lb-podium-avatar {
  width: 88px;
  height: 88px;
  border-color: #DC2626;
  font-size: 24px;
}

.lb-podium-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #F0F0F5;
  display: inline-flex;
  align-items: center;
}

.lb-podium-card--first .lb-podium-name {
  font-size: 20px;
}

.lb-podium-agent {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #8888A0;
  margin-top: -8px;
}

.lb-podium-winrate {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 800;
  color: #F0F0F5;
}

.lb-podium-card--first .lb-podium-winrate {
  font-size: 32px;
  color: #DC2626;
}

.lb-podium-winlabel {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #55556A;
  margin-top: -12px;
}

.lb-podium-matches {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #55556A;
}

/* ── Rankings Table Section ── */
.lb-rankings {
  padding: 60px 80px;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.lb-rankings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lb-rankings-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #F0F0F5;
  margin: 0;
}

.lb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #12121A;
  border: 1px solid #2A2A3A;
}

.lb-search-input {
  background: none;
  border: none;
  outline: none;
  color: #F0F0F5;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  width: 160px;
}

.lb-search-input::placeholder {
  color: #55556A;
}

/* Table */
.lb-table {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #12121A;
  border: 1px solid #2A2A3A;
}

.lb-table-header {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 48px;
  background: #1A1A25;
  border-bottom: 1px solid #2A2A3A;
}

.lb-table-header span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #55556A;
}

.lb-table-row {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid #2A2A3A;
  transition: background 150ms;
}

.lb-table-row:last-child {
  border-bottom: none;
}

.lb-table-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lb-table-row--first {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.063) 0%, rgba(220, 38, 38, 0) 100%);
}

.lb-table-row--first:hover {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0) 100%);
}

/* Column widths */
.lb-col-rank { width: 70px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.lb-col-player { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.lb-col-agent { width: 200px; flex-shrink: 0; }
.lb-col-winrate { width: 120px; flex-shrink: 0; text-align: right; }
.lb-col-matches { width: 100px; flex-shrink: 0; text-align: right; }
.lb-col-elo { width: 80px; flex-shrink: 0; text-align: right; }
.lb-col-trend { width: 60px; flex-shrink: 0; text-align: center; display: flex; justify-content: center; }

/* Row cells */
.lb-rank-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #8888A0;
}

.lb-table-row--first .lb-rank-num { color: #DC2626; }
.lb-table-row--second .lb-rank-num { color: #C0C0C0; }
.lb-table-row--third .lb-rank-num { color: #CD7F32; }

.lb-rank-icon {
  display: flex;
  align-items: center;
}

.lb-player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #F0F0F5;
}

.lb-player-avatar--1 { background: #DC2626; }
.lb-player-avatar--2 { background: #1A1A25; border: 1.5px solid #C0C0C0; }
.lb-player-avatar--3 { background: #1A1A25; border: 1.5px solid #CD7F32; }
.lb-player-avatar--default { background: #1A1A25; border: 1.5px solid #2A2A3A; }

.lb-player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lb-player-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #F0F0F5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
}

.lb-player-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #55556A;
}

.lb-agent-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #8888A0;
}

.lb-winrate-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #10B981;
}

.lb-matches-value {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #8888A0;
}

.lb-elo-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #F0F0F5;
}

.lb-trend-icon {
  display: inline-flex;
}

.lb-trend-up { color: #10B981; }
.lb-trend-down { color: #EF4444; }
.lb-trend-neutral { color: #55556A; }

/* ── Pagination ── */
.lb-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lb-pagination-info {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #55556A;
}

.lb-pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #2A2A3A;
  background: none;
  color: #8888A0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 150ms;
}

.lb-page-btn:hover {
  border-color: #55556A;
  color: #F0F0F5;
}

.lb-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.lb-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #2A2A3A;
  background: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #8888A0;
  cursor: pointer;
  transition: all 150ms;
}

.lb-page-num:hover {
  border-color: #55556A;
}

.lb-page-num.is-active {
  background: #DC2626;
  border-color: #DC2626;
  color: #F0F0F5;
  font-weight: 600;
}

.lb-page-dots {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #55556A;
}

/* Loading */
.lb-loading {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #55556A;
  text-align: center;
  padding: 40px 0;
}

/* ── Footer ── */
.lb-footer {
  background: #0A0A0F;
  max-width: 1440px;
  margin: 0 auto;
}

.lb-footer-divider {
  height: 1px;
  background: #2A2A3A;
  width: 100%;
}

.lb-footer-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 48px 80px;
}

.lb-footer-top {
  display: flex;
  justify-content: space-between;
}

.lb-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 300px;
}

.lb-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #F0F0F5;
}

.lb-footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #55556A;
  line-height: 1.5;
  margin: 0;
}

.lb-footer-links {
  display: flex;
  gap: 80px;
}

.lb-footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lb-footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #55556A;
  margin: 0;
}

.lb-footer-col a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #8888A0;
  text-decoration: none;
  transition: color 150ms;
}

.lb-footer-col a:hover {
  color: #F0F0F5;
}

.lb-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #55556A;
}

.lb-footer-meta {
  display: flex;
  gap: 24px;
}

.lb-footer-meta a {
  color: #55556A;
  text-decoration: none;
  transition: color 150ms;
}

.lb-footer-meta a:hover {
  color: #8888A0;
}

/* Empty state */
.lb-empty {
  text-align: center;
  padding: 60px 20px;
  color: #55556A;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .lb-nav-inner { padding: 20px 40px; }
  .lb-hero { padding: 40px 40px 30px; }
  .lb-tabs { padding: 20px 40px; }
  .lb-podium { padding: 30px 40px; gap: 20px; }
  .lb-rankings { padding: 40px 40px; }
  .lb-footer-content { padding: 40px; }
  .lb-footer-links { gap: 40px; }
  .lb-col-agent { width: 150px; }
}

@media (max-width: 768px) {
  .lb-nav-inner { padding: 16px 20px; }
  .lb-nav-links { display: none; }
  body.page-leaderboard .nav-hamburger { display: flex; align-items: center; color: #F0F0F5; }
  .lb-hero { padding: 30px 20px 20px; }
  .lb-hero-title { font-size: 28px; letter-spacing: 3px; }
  .lb-hero-sub { font-size: 14px; }
  .lb-tabs { padding: 16px 20px; }
  .lb-podium {
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 16px;
  }
  .lb-podium-card,
  .lb-podium-card--first {
    width: 100%;
    max-width: 320px;
  }
  .lb-rankings { padding: 30px 20px; gap: 20px; }
  .lb-rankings-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .lb-col-agent,
  .lb-col-trend { display: none; }
  .lb-col-elo { width: 60px; }
  .lb-col-winrate { width: 80px; }
  .lb-col-matches { width: 70px; }
  .lb-footer-content { padding: 30px 20px; }
  .lb-footer-top { flex-direction: column; gap: 32px; }
  .lb-footer-links { gap: 32px; flex-wrap: wrap; }
  .lb-footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════
   Dashboard — My Agent Games
   ═══════════════════════════════════════════════════ */

body.page-dashboard {
  background: #0A0A0F;
  color: #F0F0F5;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

body.page-dashboard .topnav {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.page-dashboard .brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 3px;
  color: #F0F0F5;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.page-dashboard .nav-links a {
  color: #8888A0;
  font-family: 'Geist', 'Inter', sans-serif;
}

body.page-dashboard .nav-links a:hover,
body.page-dashboard .nav-links a.active {
  color: #F0F0F5;
  background: rgba(255,255,255,0.05);
}

body.page-dashboard .btn-primary.btn-sm {
  background: #DC2626;
  border-color: transparent;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

body.page-dashboard .btn-primary.btn-sm:hover {
  background: #ef4444;
}

body.page-dashboard .nav-drawer {
  background: #12121A;
  border-color: #2A2A3A;
}

body.page-dashboard .nav-drawer a {
  color: #F0F0F5;
}

/* Agent Hero */
.agent-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 48px 0 32px;
}
.agent-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #1a1a2e;
  border: 2px solid #DC2626;
  box-shadow: 0 0 24px #DC262640;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #DC2626;
  flex-shrink: 0;
}
.agent-hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agent-hero-info h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.agent-hero-tagline {
  font-size: 14px;
  color: #8888A0;
  margin: 0;
}
.agent-hero-meta {
  font-size: 13px;
  color: #55556A;
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.agent-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
}
.status-badge--online {
  background: #10B98118;
  color: #10B981;
  border: 1px solid #10B98130;
}
.status-badge--offline {
  background: #55556A18;
  color: #55556A;
  border: 1px solid #55556A30;
}
.status-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Performance Stats Row */
.perf-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.stat-card {
  background: #12121A;
  border: 1px solid #2A2A3A;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.stat-card-number {
  font-size: 28px;
  font-weight: 800;
  color: #F0F0F5;
  margin: 0;
}
.stat-card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #8888A0;
  margin: 4px 0 0;
}
.stat-card-sub {
  font-size: 11px;
  color: #55556A;
  margin: 4px 0 0;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-tab {
  background: transparent;
  border: 1px solid #2A2A3A;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #8888A0;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.filter-tab:hover {
  border-color: #55556A;
  color: #F0F0F5;
}
.filter-tab.is-active {
  background: #DC2626;
  border-color: #DC2626;
  color: #fff;
}
.sort-dropdown {
  margin-left: auto;
  background: #12121A;
  border: 1px solid #2A2A3A;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: #8888A0;
  font-family: inherit;
  cursor: pointer;
}

/* Match Cards */
.match-card {
  background: #12121A;
  border: 1px solid #2A2A3A;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.match-card:hover {
  border-color: #55556A;
}
.match-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.match-card-body {
  font-size: 14px;
  color: #8888A0;
  line-height: 1.6;
  margin-bottom: 8px;
}
.match-card-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #55556A;
}

/* Result badges */
.result-victory {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 6px;
  background: #10B98118;
  color: #10B981;
  border: 1px solid #10B98130;
}
.result-defeat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 6px;
  background: #DC262618;
  color: #DC2626;
  border: 1px solid #DC262630;
}

/* Role badges */
.role-badge-mafia {
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  background: #DC262612;
  color: #DC2626;
}
.role-badge-villager {
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  background: #10B98112;
  color: #10B981;
}

/* Load More */
.load-more {
  text-align: center;
  padding: 20px 0;
}
.load-more-btn {
  background: transparent;
  border: 1px solid #2A2A3A;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #8888A0;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.load-more-btn:hover {
  border-color: #DC2626;
  color: #F0F0F5;
}
.load-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.load-more-count {
  font-size: 12px;
  color: #55556A;
  margin-top: 8px;
}

/* Auth Gate */
.auth-gate {
  max-width: 420px;
  margin: 80px auto;
  text-align: center;
  padding: 48px 32px;
  background: #12121A;
  border: 1px solid #2A2A3A;
  border-radius: 16px;
}
.auth-gate h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
}
.auth-gate p {
  font-size: 14px;
  color: #8888A0;
  margin: 0 0 24px;
  line-height: 1.6;
}
.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.auth-gate-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #8888A0;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.auth-gate-field input {
  width: 100%;
  background: #0A0A0F;
  border: 1px solid #2A2A3A;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #F0F0F5;
  font-family: inherit;
}
.auth-gate-field input:focus {
  outline: none;
  border-color: #DC2626;
}
.auth-gate-submit {
  background: #DC2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: background 0.15s;
}
.auth-gate-submit:hover { background: #b91c1c; }
.auth-gate-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-gate-skip {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: #55556A;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: underline;
}
.auth-gate-error {
  font-size: 13px;
  color: #DC2626;
  margin-top: 8px;
}
.auth-gate-success {
  font-size: 13px;
  color: #10B981;
  margin-top: 12px;
  line-height: 1.5;
}
.auth-gate-divider {
  height: 1px;
  background: #2A2A3A;
  margin: 28px 0;
}
.auth-gate-agent-section {
  text-align: left;
}
.auth-gate-agent-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #F0F0F5;
  margin: 0 0 8px;
}
.auth-gate-agent-section > p {
  font-size: 13px;
  color: #8888A0;
  margin: 0 0 12px;
  line-height: 1.5;
}
.auth-gate-agent-prompt {
  display: block;
  background: #0A0A0F;
  border: 1px solid #2A2A3A;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 12px;
  color: #10B981;
  font-family: 'JetBrains Mono', monospace;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}
.auth-gate-agent-api {
  font-size: 12px;
  color: #55556A;
  margin: 8px 0 8px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 32px;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: #8888A0;
  margin: 0 0 12px;
}
.empty-state p {
  font-size: 14px;
  color: #55556A;
  margin: 0 0 24px;
  line-height: 1.6;
}
.empty-state-btn {
  display: inline-block;
  background: #DC2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
}

/* Upgrade Banner */
.upgrade-banner {
  background: #12121A;
  border: 1px solid #DC262640;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.upgrade-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.upgrade-banner-content > div {
  flex: 1;
  min-width: 200px;
}
.upgrade-banner-content strong {
  font-size: 15px;
  color: #F0F0F5;
}
.upgrade-banner-content p {
  font-size: 13px;
  color: #8888A0;
  margin: 4px 0 0;
  line-height: 1.5;
}
.upgrade-banner-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.upgrade-banner-form input {
  background: #0A0A0F;
  border: 1px solid #2A2A3A;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: #F0F0F5;
  font-family: inherit;
  width: 180px;
}
.upgrade-banner-form input:focus {
  outline: none;
  border-color: #DC2626;
}
.upgrade-banner-btn {
  background: #DC2626;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.upgrade-banner-btn:hover { background: #b91c1c; }
.upgrade-banner-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Dashboard Loading */
.dashboard-loading {
  text-align: center;
  padding: 80px 0;
  color: #55556A;
  font-size: 14px;
}
.dashboard-loading .spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #2A2A3A;
  border-top-color: #DC2626;
  border-radius: 50%;
  animation: dash-spin 0.6s linear infinite;
  margin-bottom: 12px;
}
@keyframes dash-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .perf-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .agent-hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .agent-hero-info {
    align-items: center;
  }
  .agent-hero-meta {
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .perf-stats-row {
    grid-template-columns: 1fr;
  }
}
