/* ─── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark:   #0f0e0c;
  --bg-panel:  #1a1814;
  --bg-card:   #231f1a;
  --border:    #3d3528;
  --gold:      #c8a84b;
  --gold-light:#e8c97a;
  --text:      #e8dcc8;
  --text-muted:#8a7d66;
  --red:       #c0392b;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,0.6);
}

html, body {
  height: 100%;
  font-family: 'Crimson Text', Georgia, serif;
  background: var(--bg-dark);
  color: var(--text);
}

/* ─── Landing page ───────────────────────────────────────────────── */
.landing-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(200,168,75,0.15) 0%, transparent 70%),
    url('/static/images/board.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.landing-overlay {
  position: absolute; inset: 0;
  background: rgba(10,8,5,0.82);
}

.landing-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.logo-area {
  text-align: center;
}
.logo-subtitle {
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  margin-bottom: 0.5rem;
}
.logo-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(200,168,75,0.4), 3px 3px 0 rgba(0,0,0,0.5);
  letter-spacing: -0.02em;
}
.logo-to {
  font-style: italic;
  font-size: 0.7em;
  color: var(--gold);
}
.logo-stars { color: var(--gold); font-size: 1.2rem; letter-spacing: 0.8em; margin-top: 0.5rem; }

.landing-panels {
  display: flex;
  gap: 0;
  width: 100%;
  align-items: stretch;
}

.panel {
  flex: 1;
  background: rgba(26,24,20,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(8px);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.panel-icon { font-size: 1.8rem; }
.panel-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

.panel-body label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  margin-top: 1rem;
  font-family: 'Cinzel', serif;
}
.panel-body label:first-child { margin-top: 0; }

.panel-body input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  font-family: 'Crimson Text', serif;
  transition: border-color 0.2s;
}
.panel-body input:focus {
  outline: none;
  border-color: var(--gold);
}

.btn-primary, .btn-secondary {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #c8a84b, #a8822b);
  color: #0f0e0c;
}
.btn-primary:hover { background: linear-gradient(135deg, #e8c97a, #c8a84b); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn-secondary:hover { background: rgba(200,168,75,0.15); }

.panel-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
}
.panel-divider span {
  background: var(--bg-dark);
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-msg {
  color: #e74c3c;
  background: rgba(231,76,60,0.15);
  border: 1px solid rgba(231,76,60,0.4);
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
}
.hidden { display: none !important; }

/* ─── Lobby page (waiting room) ──────────────────────────────────── */
.lobby-bg {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(200,168,75,0.2) 0%, transparent 60%),
    var(--bg-dark);
}

/* Top bar: back link + title centered */
.lobby-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}
.lobby-top-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Cinzel', serif;
}
.lobby-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}
.lobby-map-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  background: rgba(200,168,75,0.12);
  color: var(--gold);
  border: 1px solid rgba(200,168,75,0.3);
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
}

/* Two-column grid */
.lobby-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem;
  overflow-y: auto;
  min-height: 0;
}
.lobby-left, .lobby-right {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
}
.lobby-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}

/* Legacy class kept for compat */
.lobby-container {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lobby-header { text-align: center; padding: 0.5rem 0 0; }
.lobby-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: var(--gold-light);
  letter-spacing: 0.1em;
}
.lobby-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  font-family: 'Cinzel', serif;
  margin-top: 0.2rem;
}

.code-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
}
.code-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.code-display {
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 0.5em;
  text-shadow: 0 0 20px rgba(200,168,75,0.3);
  margin-bottom: 0.6rem;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: background 0.2s;
}
.copy-btn:hover { background: rgba(200,168,75,0.15); }
.copy-feedback {
  font-size: 0.8rem;
  color: #22c55e;
  margin-top: 0.4rem;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.lobby-players, .lobby-rules, .scoring-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
}

.player-list { display: flex; flex-direction: column; gap: 0.5rem; }
.player-entry {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
}
.player-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.player-name { flex: 1; font-size: 1.1rem; }
.player-elo { font-size: 0.78rem; color: var(--text-muted); font-family: 'Cinzel', serif; }
.host-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  background: var(--gold);
  color: #000;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
}
.bot-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  background: rgba(99,102,241,0.2);
  color: #818cf8;
  border: 1px solid #818cf8;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
}
.you-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  background: rgba(200,168,75,0.2);
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

.rules-list { padding-left: 1.2rem; }
.rules-list li { margin-bottom: 0.3rem; font-size: 0.88rem; color: var(--text-muted); line-height: 1.4; }
.rules-list li strong { color: var(--text); }

.score-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.score-chip {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  text-align: center;
  flex: 1;
  min-width: 50px;
}
.score-chip span:first-child {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold);
}
.score-chip span:last-child {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.lobby-actions { text-align: center; }
.host-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.btn-add-bot {
  padding: 1rem 1.5rem;
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid #818cf8;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add-bot:hover { background: rgba(99,102,241,0.3); transform: translateY(-2px); }

/* Add-bot row: personality dropdown + button */
.add-bot-row { display: inline-flex; align-items: stretch; gap: 0.5rem; flex-wrap: wrap; }
.bot-type-select {
  padding: 1rem 0.9rem;
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid #818cf8;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s;
}
.bot-type-select:hover { background: rgba(99,102,241,0.3); }
.bot-type-select option { background: #1e1b2e; color: #e5e7eb; font-weight: 600; }

/* Split "Add Bot" button: random + caret dropdown to pick a specific bot */
.add-bot-split { position: relative; display: inline-flex; align-items: stretch; }
.add-bot-split .btn-add-bot {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.btn-add-bot-caret {
  padding: 1rem 0.7rem;
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid #818cf8;
  border-left: none;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add-bot-caret:hover { background: rgba(99,102,241,0.3); }
.add-bot-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  padding: 0.3rem;
  background: #1e1b2e;
  border: 1px solid #818cf8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.add-bot-menu.hidden { display: none; }
.add-bot-menu-item {
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: #c7d2fe;
  border: none;
  border-radius: 6px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.add-bot-menu-item:hover { background: rgba(99,102,241,0.25); color: #fff; }
.btn-start {
  padding: 1rem 3rem;
  background: linear-gradient(135deg, #c8a84b, #a8822b);
  color: #000;
  border: none;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(200,168,75,0.3);
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(200,168,75,0.5); }
.start-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }

.waiting-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Game Shell ─────────────────────────────────────────────────── */
.game-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-dark);
}

.sidebar {
  width: 262px;
  min-width: 210px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}
.right-sidebar {
  border-right: none;
  border-left: 1px solid var(--border);
  overflow-y: hidden; /* let children handle their own scroll */
}

.sidebar-section {
  padding: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* Board area */
.board-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.board-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f0e0c;
}

#board-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  width: 100%;
  height: 100%;
}

#board-svg {
  position: absolute;
  pointer-events: none;
}

#board-svg .route-seg {
  pointer-events: all;
  cursor: pointer;
  transition: filter 0.1s, opacity 0.1s;
}
#board-svg .route-seg.claimed { pointer-events: all; cursor: default; }
#board-svg .route-seg.route-hover {
  filter: brightness(1.7) drop-shadow(0 0 3px rgba(255,255,255,0.7));
  opacity: 1 !important;
}
#board-svg .route-seg:not(.claimed):not(.route-hover) { opacity: 0.9; }
#board-svg .city-circle { pointer-events: none; }
#board-svg .city-label {
  font-family: 'Cinzel', serif;
  font-size: 7px;
  fill: #fff;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
  dominant-baseline: central;
  text-anchor: middle;
}

.status-bar {
  height: 36px;
  background: rgba(0,0,0,0.7);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  padding: 0 1rem;
}

/* Players panel */
.player-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.3rem;
  border-radius: 5px;
  margin-bottom: 0.2rem;
}
.player-row.active-turn {
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.3);
}
.player-color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.player-row-name { font-size: 0.9rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-row-score {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
}
.player-row-trains { font-size: 0.72rem; color: var(--text-muted); margin-left: 2px; }
.player-row-tickets { font-size: 0.72rem; color: var(--text-muted); margin-left: 4px; }
.player-card-count { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; font-family: 'Cinzel', serif; }
.kick-btn {
  margin-left: 0.3rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.kick-btn:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }

/* Face-up cards */
.face-up-area {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-bottom: 0.5rem;
}

.train-card {
  border-radius: 5px;
  border: 1.5px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2/3;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}
.train-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.train-card .card-label {
  position: absolute;
  bottom: 2px;
  font-size: 0.55rem;
  font-family: 'Cinzel', serif;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
  text-align: center;
  width: 100%;
  text-shadow: 0 1px 2px #000;
}
.train-card.selected {
  outline: 2px solid var(--gold);
  transform: translateY(-2px);
}
.train-card .card-train-emoji {
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}

/* Hand cards */
.hand-area {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hand-card-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  width: 100%;
  box-sizing: border-box;
}
.hand-card-chip:hover { transform: translateX(2px); }
.hand-card-chip.selected { outline: 2px solid var(--gold); }
.hand-card-chip .chip-icon {
  font-size: 0.8rem;
  line-height: 1;
}
.hand-card-chip .chip-count {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: bold;
  color: #fff;
}
.hand-card-chip .chip-name {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.75);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
}

.draw-blind-btn, .action-btn {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}
.draw-blind-btn:hover, .action-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,168,75,0.07);
}
.draw-blind-btn.active-turn, .action-btn.active-turn {
  border-color: var(--gold);
  color: var(--gold);
}
.deck-count {
  margin-left: auto;
  background: rgba(200,168,75,0.2);
  color: var(--gold);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Tickets */
#tickets-section {
  flex-shrink: 0;
  max-height: 46vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tickets-area {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding-right: 2px;
}
.ticket-item {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.5rem 0.6rem;
  font-size: 0.82rem;
}
.ticket-cities { color: var(--text); line-height: 1.4; }
.ticket-points {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 700;
}
.ticket-item.completed { border-color: #22c55e; }
.ticket-item.completed .ticket-points { color: #22c55e; }
.ticket-item.failed { border-color: #ef4444; }
.ticket-item.failed .ticket-points { color: #ef4444; text-decoration: line-through; }
.ticket-item.long-ticket { background: #0d1520; border-color: #1e3248; }
.ticket-item.long-ticket.completed { border-color: #22c55e; }
.ticket-item.ticket-tapped { border-color: var(--gold, #eab308); box-shadow: 0 0 8px rgba(234,179,8,0.5); }

/* Action log — fills all remaining space, newest entries at bottom */
.action-log-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  justify-content: flex-end;
}
.action-log {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.action-log p { margin-bottom: 0.2rem; }
.action-log p:last-child { color: var(--text); }

/* ─── Modals ─────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
}
.modal-box {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 540px;
  width: 90%;
  box-shadow: var(--shadow);
}
.modal-box.wide { max-width: 700px; }
.modal-box h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}
.modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.modal-close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.modal-close-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.modal-footer {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.modal-footer .btn-primary, .modal-footer .btn-secondary {
  width: auto;
  margin-top: 0;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

/* Ticket choices */
.ticket-choices { display: flex; flex-direction: column; gap: 0.6rem; }
.long-ticket-card { background: #0d1f3a; border-color: #2a5a9a; border-width: 2px; }
.long-ticket-card.selected { border-color: #3b82f6; background: #0d2a52; }
.ticket-long-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #60a5fa;
  text-transform: uppercase;
  margin-bottom: 1px;
}
.ticket-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.ticket-choice:hover { border-color: var(--gold); }
.ticket-choice.selected {
  border-color: var(--gold);
  background: rgba(200,168,75,0.1);
}
.ticket-choice input[type=checkbox] { display: none; }
.ticket-choice-check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.ticket-choice.selected .ticket-choice-check {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}
.ticket-choice-info { flex: 1; }
.ticket-choice-route { font-size: 0.78rem; color: var(--text); }
.ticket-choice-route span { color: var(--text-muted); margin: 0 0.3rem; }
.ticket-choice-pts {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
  margin-left: auto;
  white-space: nowrap;
}

/* Card selector in claim modal */
.claim-info {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.claim-info strong { color: var(--text); }

.card-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.card-selector .csel-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.15s;
}
.csel-chip:hover { border-color: rgba(255,255,255,0.4); }
.csel-chip.selected { border-color: var(--gold); outline: 1px solid var(--gold); }
.csel-chip-count {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.csel-chip-name {
  font-size: 0.72rem;
  font-family: 'Cinzel', serif;
  color: rgba(255,255,255,0.75);
}

/* Final scores */
.final-scores { display: flex; flex-direction: column; gap: 0.6rem; }
.score-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.score-row.winner {
  border-color: var(--gold);
  background: rgba(200,168,75,0.08);
}
.score-row-place {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--text-muted);
  width: 2rem;
}
.score-row.winner .score-row-place { color: var(--gold); }
.score-row-name { font-size: 1.05rem; flex: 1; }
.score-row-detail { font-size: 0.8rem; color: var(--text-muted); }
.score-row-total {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-light);
}

/* ─── City highlight on ticket hover ────────────────────────────────── */
.city-circle.city-highlight {
  fill: #f59e0b !important;
  stroke: #fde68a !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 7px #f59e0b) drop-shadow(0 0 14px rgba(245,158,11,0.5));
  animation: city-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes city-pulse {
  from { filter: drop-shadow(0 0 5px #f59e0b); }
  to   { filter: drop-shadow(0 0 12px #f59e0b) drop-shadow(0 0 20px rgba(245,158,11,0.6)); }
}

/* ─── Ticket path highlight ──────────────────────────────────────────────── */
.route-seg.path-highlight {
  filter: drop-shadow(0 0 6px gold) brightness(1.8) !important;
  opacity: 1 !important;
  animation: path-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes path-pulse {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

/* ─── Closed double-route (2-3 player games) ─────────────────────────── */
.route-seg.closed {
  cursor: not-allowed;
  opacity: 0.3 !important;
}
.route-seg.closed:hover { filter: none !important; }

/* ─── Ticket completion ──────────────────────────────────────────────── */
.ticket-item.completed {
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,0.35), 0 0 3px rgba(34,197,94,0.2);
  animation: ticket-glow 2s ease-in-out infinite alternate;
}
@keyframes ticket-glow {
  from { box-shadow: 0 0 6px rgba(34,197,94,0.3); }
  to   { box-shadow: 0 0 14px rgba(34,197,94,0.6), 0 0 4px rgba(34,197,94,0.3); }
}
.ticket-item.completed .ticket-points { color: #22c55e; }
.ticket-check {
  color: #22c55e;
  font-weight: 700;
  margin-left: 4px;
  font-size: 0.85rem;
}

/* ─── Toast notifications ────────────────────────────────────────────── */
.game-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15,14,12,0.95);
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 0.75rem 1.4rem;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  z-index: 5000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.game-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Card draw animation (player row flash) ─────────────────────────── */
.player-row.card-received {
  animation: card-recv 0.45s ease;
}
@keyframes card-recv {
  0%   { background: rgba(200,168,75,0.12); }
  40%  { background: rgba(200,168,75,0.45); }
  100% { background: rgba(200,168,75,0.12); }
}

/* ─── Fixed card selector in claim modal ────────────────────────────── */
.csel-chip.empty {
  opacity: 0.3;
  cursor: default !important;
}
.card-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

/* ─── Ticket modal as side panel ─────────────────────────────────────── */
#ticket-modal {
  justify-content: flex-end;
  align-items: stretch;
}
#ticket-modal .modal-backdrop {
  background: rgba(0,0,0,0.25);
}
#ticket-view-board-btn { display: none; }

#ticket-modal .modal-box {
  max-width: 262px;
  width: 262px;
  max-height: 100vh;
  height: 100%;
  overflow-y: auto;
  border-radius: 0;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-left: 1px solid var(--border);
  margin: 0;
  padding: 1rem 0.9rem;
}
#ticket-modal .modal-box h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
#ticket-modal .modal-desc {
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
}
#ticket-modal .ticket-choices {
  gap: 0.4rem;
}
#ticket-modal .ticket-choice-check {
  width: 14px;
  height: 14px;
  font-size: 0.7rem;
}
#ticket-modal .modal-footer {
  margin-top: 0.8rem;
}

/* ─── Scoring reference section (inside right sidebar) ──────────────── */
.scoring-section {
  border-top: 1px solid var(--border);
  border-bottom: none;
}
.scoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  margin-bottom: 8px;
}
.scoring-grid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.7rem;
  color: #a09078;
  gap: 6px;
}
.sc-label { flex: 1; }
.sc-pts {
  color: #e0d0a8;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.72rem;
}
.sc-pos { color: #86efac; }
.sc-neg { color: #fca5a5; }
.scoring-bonuses {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.scoring-bonus-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #a09078;
}

/* ─── Settings footer ───────────────────────────────────────────────── */
.settings-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  border-bottom: none;
  padding: 0.5rem 0.9rem 1rem;
}
.settings-btn-row { display: flex; gap: 0.4rem; justify-content: center; }
.settings-btn {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ─── Rules modal content ───────────────────────────────────────────── */
.rules-list { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.5rem; }
.rules-row { font-size: 0.75rem; color: var(--text); padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.rules-row:last-child { border-bottom: none; }
.rules-note { color: var(--text-muted); font-size: 0.68rem; display: block; margin-top: 1px; }
.rules-special { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.rules-special-row { display: flex; flex-direction: column; gap: 0.15rem; }
.rules-special-label { font-size: 0.7rem; color: var(--gold); font-family: 'Cinzel', serif; letter-spacing: 0.05em; }
.rules-special-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; }
.rules-endgame { font-size: 0.7rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.5rem; line-height: 1.4; }

/* ─── Settings modal list ───────────────────────────────────────────── */
.settings-list { display: flex; flex-direction: column; gap: 0; }
.settings-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.settings-row:last-child { border-bottom: none; }
.settings-row input[type=checkbox] {
  width: 17px; height: 17px;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.settings-row-label { font-size: 0.92rem; color: var(--text); }
.settings-row-desc  { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ─── Draw tickets button inside tickets section ────────────────────── */
.tickets-draw-btn {
  flex-shrink: 0;
  margin-top: 0.4rem;
  width: 100%;
}

/* ─── Spectator mode ─────────────────────────────────────────────────── */
body.spectating #hand-section,
body.spectating #tickets-section { display: none; }

body.spectating #draw-blind-btn { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── Login page ─────────────────────────────────────────────────── */
.login-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(200,168,75,0.15) 0%, transparent 70%),
    url('/static/images/board.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1.5rem 1rem;
}
.login-overlay {
  position: absolute; inset: 0;
  background: rgba(10,8,5,0.85);
}
.login-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.login-logo { text-align: center; }
.login-panel {
  width: 100%;
  background: rgba(26,24,20,0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.login-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.login-tab {
  flex: 1;
  padding: 0.9rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.login-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(200,168,75,0.05);
}
.login-form {
  padding: 1.8rem;
  display: none;
}
.login-form.active { display: block; }
.login-field { margin-bottom: 1rem; }
.login-field label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.login-field input {
  width: 100%;
  padding: 0.72rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  font-family: 'Crimson Text', serif;
  transition: border-color 0.2s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--gold);
}
.login-error {
  color: #e74c3c;
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.3);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}
.login-error.visible { display: block; }
.login-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}
.login-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 1rem 0;
  position: relative;
}
.login-divider::before, .login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.72rem;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-google:hover { background: #f0f0f0; }

/* ─── Login two-column panels ───────────────────────────────────── */
.login-panels {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
}
.login-panels .login-panel {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.login-or-divider {
  position: relative;
  width: 0;
  flex-shrink: 0;
  overflow: visible;
  z-index: 2;
}
.login-or-divider span {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  background: #1a1814;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.4rem 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  white-space: nowrap;
  z-index: 2;
}
.guest-panel {
  flex: 1;
  min-width: 0;
  background: rgba(26,24,20,0.97);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
}
.guest-panel-header {
  padding: 0.9rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(200,168,75,0.05);
  text-align: center;
}
.guest-panel-body {
  padding: 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.guest-panel-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
  line-height: 1.5;
}
.guest-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 1rem;
  line-height: 1.5;
  opacity: 0.7;
}

/* ─── Guest badge + create account link in lobbies ──────────────── */
.guest-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid #94a3b8;
  color: #94a3b8;
  background: rgba(148,163,184,0.1);
  vertical-align: middle;
  margin-left: 0.35rem;
}
.btn-create-account {
  padding: 0.4rem 0.9rem;
  background: rgba(200,168,75,0.12);
  border: 1px solid var(--gold);
  border-radius: 5px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-block;
}
.btn-create-account:hover { background: rgba(200,168,75,0.22); }

/* ─── Lobby page updates ─────────────────────────────────────────── */
.lobby-back-link {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.15s;
}
.lobby-back-link:hover { color: var(--gold); }

.lobby-privacy-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-left: 0.6rem;
  border: 1px solid;
  vertical-align: middle;
}
.badge-public-pill  { color: #22c55e; border-color: #22c55e; background: rgba(34,197,94,0.1); }
.badge-private-pill { color: #94a3b8; border-color: #94a3b8; background: rgba(148,163,184,0.1); }

.passcode-display {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0.7rem;
}
.passcode-value {
  color: var(--gold);
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ─── Lobbies page ──────────────────────────────────────────────── */
.lobbies-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(200,168,75,0.1) 0%, transparent 55%),
    var(--bg-dark);
}
/* ─── Shared site nav ────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}
.site-nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.site-nav-logo:hover { color: var(--gold); }
.site-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-nav-user {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.site-nav-link {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.site-nav-link:hover { color: var(--gold); background: rgba(200,168,75,0.08); }
.site-nav-link.active { color: var(--gold); }

.lobbies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.lobbies-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.lobbies-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.lobbies-username {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.lobbies-username strong { color: var(--text); }
.btn-logout {
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-block;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

.btn-notify {
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-notify:hover { border-color: var(--gold); color: var(--gold); }
.btn-notify.active { border-color: var(--gold); color: var(--gold); background: rgba(200,168,75,0.12); }

.lobbies-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.lobbies-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.lobbies-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.lobby-list { display: flex; flex-direction: column; gap: 0.75rem; }
.lobby-card {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  gap: 1rem;
  transition: border-color 0.15s;
  flex-wrap: wrap;
}
.lobby-card:hover { border-color: rgba(200,168,75,0.4); }
.lobby-card-info { flex: 1; min-width: 140px; }
.lobby-card-host { font-size: 1rem; color: var(--text); margin-bottom: 0.2rem; }
.lobby-card-host strong { color: var(--gold-light); }
.lobby-card-meta { font-size: 0.8rem; color: var(--text-muted); }
.lobby-card-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
}
.badge-public   { color: #22c55e; border-color: #22c55e; background: rgba(34,197,94,0.1); }
.badge-private  { color: #94a3b8; border-color: #94a3b8; background: rgba(148,163,184,0.1); }
.badge-ongoing  { color: #f97316; border-color: #f97316; background: rgba(249,115,22,0.1); }
.btn-spectate-lobby {
  padding: 0.55rem 1.3rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.btn-spectate-lobby:hover { border-color: var(--gold); color: var(--gold); }
.btn-join-lobby {
  padding: 0.55rem 1.3rem;
  background: linear-gradient(135deg, #c8a84b, #a8822b);
  color: #000;
  border: none;
  border-radius: 6px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-join-lobby:hover { filter: brightness(1.15); transform: translateY(-1px); }
.lobby-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}
.code-join-form { display: flex; gap: 0.5rem; align-items: center; }
.code-join-input {
  padding: 0.65rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  width: 9rem;
  text-align: center;
  transition: border-color 0.2s;
}
.code-join-input:focus { outline: none; border-color: var(--gold); }
.code-join-input::placeholder { letter-spacing: 0.05em; }

/* Create game modal */
.create-modal-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.create-modal-overlay.visible { display: flex; }
.create-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
}
.create-modal-box {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow);
  z-index: 1;
}
.create-modal-box h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}
.create-field-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.visibility-toggle { display: flex; gap: 0.5rem; }
.vis-btn {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-dark);
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}
.vis-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,168,75,0.1);
}
.passcode-field { margin-top: 1rem; display: none; }
.passcode-field.visible { display: block; }
.create-passcode-input {
  width: 100%;
  padding: 0.72rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.create-passcode-input:focus { outline: none; border-color: var(--gold); }

/* ─── Mobile game: tab bar & scrollable board ─────────────────────── */
.mobile-tab-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  z-index: 500;
}
.mobile-actions-panel { display: none; }
.mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.mobile-tab.active { color: var(--gold); }
.mobile-tab-icon { font-size: 1.3rem; line-height: 1.2; position: relative; }
.mobile-chat-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  font-size: 0.5rem;
  color: #22c55e;
  line-height: 1;
  pointer-events: none;
}

.mobile-zoom-controls {
  display: none;
  position: fixed;
  right: 10px;
  bottom: 66px;
  z-index: 400;
  flex-direction: column;
  gap: 5px;
}
.mobile-zoom-btn {
  width: 38px; height: 38px;
  background: rgba(26,24,20,0.95);
  border: 1px solid var(--border);
  color: var(--gold);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: border-color 0.15s;
}
.mobile-zoom-btn:hover { border-color: var(--gold); }

/* ─── Responsive: mobile breakpoint ─────────────────────────────── */
@media (max-width: 768px) {
  /* Landing page panels: stack vertically */
  .landing-panels { flex-direction: column; }
  .panel-divider { padding: 0.3rem 0; flex-direction: row; }

  /* Login two-column: stack vertically on mobile */
  .login-panels { flex-direction: column; gap: 0; }
  .login-panels .login-panel {
    border-radius: var(--radius) var(--radius) 0 0;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  .login-or-divider {
    width: 100%;
    height: 0;
  }
  .login-or-divider span {
    top: 0;
    left: 50%;
    padding: 0.1rem 0.5rem;
    transform: translate(-50%, -50%);
  }
  .guest-panel {
    border-left: 1px solid var(--border);
    border-top: none;
  }
  .guest-panel { border-radius: 0 0 var(--radius) var(--radius); }

  /* Lobby waiting room: stack to single column on mobile */
  .lobby-bg { height: auto; min-height: 100vh; overflow-y: auto; }
  .lobby-grid {
    grid-template-columns: 1fr;
    padding: 0.75rem 1rem;
    overflow-y: visible;
  }
  .lobby-top-bar { padding: 0.5rem 1rem; }
  .code-display {
    font-size: clamp(1.8rem, 9vw, 3rem);
    letter-spacing: 0.25em;
  }
  .lobby-container { padding: 1rem; }

  /* Lobbies page tweaks */
  .lobbies-body { padding: 1rem; }
  .lobbies-actions { flex-direction: column; align-items: stretch; }
  .code-join-form { width: 100%; }
  .code-join-input { flex: 1; min-width: 0; }

  /* Site nav on mobile: wrap to two lines, smaller text */
  .site-nav { padding: 0.5rem 1rem; gap: 0.4rem; }
  .site-nav-user { font-size: 0.68rem; }
  .site-nav-link { font-size: 0.65rem; padding: 0.2rem 0.4rem; }

  /* Show mobile tab bar and zoom controls */
  .mobile-tab-bar { display: flex; }
  .mobile-zoom-controls { display: flex; }

  /* Game shell: full dynamic viewport height, column layout */
  .game-shell {
    height: 100dvh;
    flex-direction: column;
  }

  /* Hide desktop sidebars */
  .sidebar { display: none !important; }

  /* Hide action log and settings from Tickets tab — they live in Actions tab instead */
  .sidebar.mobile-open .action-log-section { display: none !important; }
  .sidebar.mobile-open .settings-footer { display: none !important; }

  /* Sidebar as slide-up panel when activated */
  .sidebar.mobile-open {
    display: flex !important;
    position: fixed;
    bottom: 92px; /* 56px tab bar + 36px status bar */
    left: 0; right: 0;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 450;
    border-top: 2px solid var(--gold);
    border-right: none;
    border-left: none;
  }

  /* Board takes full remaining space, scrollable for panning */
  .board-wrapper {
    flex: 1;
    min-height: 0;
    padding-bottom: 56px; /* room for tab bar */
  }
  .board-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    touch-action: pan-x pan-y;
  }
  #board-img {
    max-width: none !important;
    max-height: none !important;
    object-fit: initial !important;
  }

  /* Status bar sits just above tab bar */
  .status-bar {
    position: fixed;
    bottom: 56px;
    left: 0; right: 0;
    z-index: 400;
    font-size: 0.7rem;
  }

  /* Ticket modal: center on mobile instead of side panel */
  #ticket-view-board-btn { display: block; }
  #ticket-modal {
    justify-content: center !important;
    align-items: center !important;
  }
  #ticket-modal .modal-box {
    max-width: 92% !important;
    width: 92% !important;
    height: auto !important;
    max-height: 88vh !important;
    overflow-y: auto;
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
  }

  /* Modals: ensure they fit on small screens */
  .modal-box { padding: 1.2rem; }
  .modal-box.wide { max-width: 96% !important; }
  .card-selector { grid-template-columns: repeat(2, 1fr) !important; }

  /* Account page: stack panels */
  .account-body { flex-direction: column; padding: 1rem; }
}

/* ─── Leaderboard ──────────────────────────────────────────── */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.leaderboard-table th {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.leaderboard-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid rgba(61,53,40,0.5); }
.lb-row:hover { background: rgba(200,168,75,0.05); }
.lb-row.lb-me { background: rgba(200,168,75,0.1); border: 1px solid rgba(200,168,75,0.3); }
.lb-rank { color: var(--text-muted); font-family: 'Cinzel', serif; width: 50px; }
.lb-name { color: var(--text); font-weight: 600; }
.lb-tier { color: var(--text-muted); font-size: 0.8rem; }
.lb-elo { font-family: 'Cinzel', serif; color: var(--gold-light); font-weight: 700; }
.lb-games, .lb-won, .lb-winrate { color: var(--text-muted); text-align: center; }

/* ─── Account page ──────────────────────────────────────────── */
.account-body {
  display: flex;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  align-items: flex-start;
}

/* ── Stats panel (left) ── */
.account-stats-panel {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.elo-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.elo-tier {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.elo-number {
  font-family: 'Cinzel', serif;
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 0 30px rgba(200,168,75,0.35);
}
.elo-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 0.6rem;
  text-align: center;
}
.stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.03em;
}

.tier-ladder {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.tier-ladder-title {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.2rem;
  border-radius: 4px;
  font-size: 0.82rem;
}
.tier-row.tier-current {
  background: rgba(200,168,75,0.1);
  border: 1px solid rgba(200,168,75,0.3);
  padding: 0.3rem 0.5rem;
}
.tier-name { font-weight: 600; }
.tier-threshold { color: var(--text-muted); font-size: 0.72rem; font-family: 'Cinzel', serif; }

/* ── Settings panel (right) ── */
.account-settings-panel {
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.account-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.account-field-group { display: flex; flex-direction: column; gap: 0.3rem; }
.account-field-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.account-field-optional {
  font-family: 'Crimson Text', serif;
  font-size: 0.8em;
  letter-spacing: 0;
  color: var(--text-muted);
  font-style: italic;
}
.account-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.account-input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Crimson Text', serif;
  transition: border-color 0.2s;
  min-width: 0;
}
.account-input:focus { outline: none; border-color: var(--gold); }
.account-save-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.account-save-btn:hover { background: rgba(200,168,75,0.15); }
.account-field-hint {
  font-size: 0.8rem;
  min-height: 1.1em;
  transition: color 0.2s;
}
.hint-ok  { color: #22c55e; }
.hint-err { color: #ef4444; }

.account-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
}

.account-notify-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.notify-toggle {
  padding: 0.45rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.notify-toggle:hover { border-color: var(--gold); color: var(--gold); }
.notify-toggle.notify-on { border-color: var(--gold); color: var(--gold); background: rgba(200,168,75,0.12); }

.account-danger-link {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.15s;
}
.account-danger-link:hover { color: var(--red); }

/* ─── Friend rows ─────────────────────────────────────────────────── */
.friend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(61,53,40,0.4);
  font-size: 0.88rem;
}
.friend-online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.friend-name { font-weight: 600; color: var(--text); }
.friend-elo { font-family: 'Cinzel', serif; font-size: 0.72rem; color: var(--text-muted); }

/* ─── Chat panel ─────────────────────────────────────────────────── */
.chat-panel {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 262px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  z-index: 150;
  display: flex;
  flex-direction: column;
}
.chat-panel.chat-collapsed .chat-messages,
.chat-panel.chat-collapsed .chat-input-row {
  display: none;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  min-height: 28px;
}
.chat-header-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  flex: 1;
}
.chat-unread {
  background: #22c55e;
  color: #000;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.05rem 0.38rem;
  line-height: 1.4;
}
.chat-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.chat-toggle-btn:hover { color: var(--gold); }
.chat-messages {
  height: 140px;
  overflow-y: auto;
  padding: 0.45rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.chat-msg { font-size: 0.78rem; line-height: 1.35; word-break: break-word; }
.chat-msg-name {
  font-weight: 700;
  color: var(--gold);
  margin-right: 0.25rem;
  font-size: 0.72rem;
}
.chat-msg-text { color: var(--text-muted); }
.chat-mine .chat-msg-name { color: #22c55e; }
.chat-input-row {
  display: flex;
  gap: 0.3rem;
  padding: 0.4rem 0.5rem;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1;
  padding: 0.32rem 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.78rem;
  font-family: 'Crimson Text', serif;
  min-width: 0;
}
.chat-input:focus { outline: none; border-color: var(--gold); }
.chat-send-btn {
  padding: 0.28rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: rgba(200,168,75,0.15); }

@media (max-width: 768px) {
  .chat-panel {
    width: 100%;
    border-right: none;
    border-top: 2px solid var(--gold);
    bottom: 56px;
    display: none;
    max-height: 78vh;
    z-index: 600;
  }
  .chat-panel.mobile-open {
    display: flex;
    height: 78vh;
  }
  .chat-messages {
    height: auto;
    flex: 1;
    overflow-y: auto;
  }

  /* Mobile Actions panel */
  .mobile-actions-panel {
    display: none;
    position: fixed;
    bottom: 56px;
    left: 0; right: 0;
    width: 100%;
    height: 58vh;
    background: var(--bg-panel);
    border-top: 2px solid var(--gold);
    flex-direction: column;
    z-index: 600;
    padding: 0.6rem 0.9rem 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  .mobile-actions-panel.mobile-open { display: flex; }
  .mobile-action-log-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 0.25rem;
  }
  .mobile-actions-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.6rem 0 0.5rem;
    border-top: 1px solid var(--border);
  }
  .leave-game-btn {
    border-color: rgba(239,68,68,0.35) !important;
    color: rgba(239,68,68,0.7) !important;
  }
  .leave-game-btn:hover {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: rgba(239,68,68,0.08) !important;
  }
}

/* Leave confirm modal danger button */
.leave-confirm-ok-btn {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.5);
  color: #ef4444;
}
.leave-confirm-ok-btn:hover:not(:disabled) {
  background: rgba(239,68,68,0.22);
  border-color: #ef4444;
}

/* A flag on a leaderboard row. The hairline matters: a white field - Japan,
   and half the US state flags - otherwise dissolves into the page and reads as
   an image that failed to load. Fixed size rather than `1em`, so a row's
   height does not depend on whether that player has set one. */
.flag {
  height: 13px;
  width: 18px;
  object-fit: cover;
  vertical-align: -1px;
  margin-right: .38em;
  border: 1px solid rgba(0, 0, 0, .28);
  border-radius: 2px;
  background: #f2f2f2;
}

/* A name on a board is a link now, but it is still first of all a name: it
   takes the colour of the row it is in and only underlines when you go for it.
   A board is a table of results, and forty blue underlines down a column read
   as navigation rather than as standings. */
.player-link { color: inherit; text-decoration: none; }
.player-link:hover { text-decoration: underline; }

/* --- who is on, on the lobbies page ---------------------------------------
   The same green dot cgovind.com/accounts uses, because it means the same
   thing in both places and a second visual language for "here" would be one
   too many. No red half: this list is only ever people who are on, and the
   offline story - and how long ago - belongs on a profile. */
.online-now { margin-bottom: 1.5rem; }
.online-row {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.75rem; border-radius: 8px;
  color: inherit; text-decoration: none;
}
.online-row:hover { background: rgba(255, 255, 255, 0.07); }
.online-row .dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%; flex: none;
  background: #38c172; box-shadow: 0 0 0 3px rgba(56, 193, 114, 0.22);
}
.online-what { margin-left: auto; opacity: 0.7; font-size: 0.9rem; }
