/* =====================================================
   Gin Rummy Score & Stats — styles.css  (v2)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg:          #060c18;
  --bg2:         #0c1425;
  --bg3:         #111e35;
  --bg4:         #182338;
  --accent:      #22c55e;
  --accent-soft: rgba(34,197,94,0.14);
  --accent-glow: rgba(34,197,94,0.07);
  --text:        #e2e8f0;
  --muted:       #64748b;
  --danger:      #f87171;
  --border:      rgba(148,163,184,0.1);
  --border2:     rgba(148,163,184,0.18);
  --radius:      14px;
  --shadow:      0 8px 32px rgba(0,0,0,0.45);
  --font-head:   'Syne', sans-serif;
  --font-body:   'Inter', sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(34,197,94,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(56,189,248,0.04) 0%, transparent 55%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  /* Leave room for bottom nav on mobile */
  padding-bottom: 72px;
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
}

/* ── APP WRAPPER ─────────────────────────────────── */
.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 10px;
}

/* ── HEADER ──────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 10px;
  margin-bottom: 6px;
}

.app-header h1 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

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

/* ── LANGUAGE BUTTONS ────────────────────────────── */
.lang-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── SMALL BUTTON ────────────────────────────────── */
.small-btn {
  border-radius: 999px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.small-btn:hover { background: var(--bg4); }

.hidden { display: none !important; }

main { padding: 0 2px 16px; }

/* ── CARDS ───────────────────────────────────────── */
.card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.card h2, .card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.card h2 { font-size: 1.1rem; }
.card h3 { font-size: 0.95rem; }

/* ── RESUME BANNER ───────────────────────────────── */
#resume-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--accent);
}
#resume-banner strong { font-weight: 600; }
#resume-banner .resume-actions { display: flex; gap: 8px; margin-left: auto; }
.resume-yes-btn {
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  color: #022c22;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-body);
}
.resume-no-btn {
  background: transparent;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ── ERROR / MUTED TEXT ──────────────────────────── */
.error-text {
  color: var(--danger);
  font-size: 0.8rem;
  min-height: 1.1rem;
}
.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── AUTH PAGE ───────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.1);
  margin: 12px 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Left branding panel */
.auth-brand {
  flex: 1;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(34,197,94,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(56,189,248,0.1) 0%, transparent 55%),
    linear-gradient(160deg, #0a1628 0%, #060c18 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  text-align: center;
  border-right: 1px solid rgba(148,163,184,0.08);
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 40px,
    rgba(34,197,94,0.015) 40px, rgba(34,197,94,0.015) 41px
  );
}
.auth-brand-suits {
  font-size: 1.3rem;
  letter-spacing: 0.4em;
  color: rgba(34,197,94,0.4);
  margin-bottom: 20px;
  position: relative;
}
.auth-brand-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(34,197,94,0.3));
  position: relative;
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.auth-brand-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
  position: relative;
}
.auth-brand-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 28px;
  position: relative;
}
.auth-brand-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.auth-brand-fact {
  font-size: 0.75rem;
  color: rgba(34,197,94,0.7);
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 999px;
  padding: 4px 14px;
}

/* Right form panel */
.auth-form-panel {
  width: 360px;
  flex-shrink: 0;
  background: var(--bg2);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-lang-row {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.auth-form-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 18px;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 3px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 7px 0;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--bg4);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.auth-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-input {
  background: var(--bg3);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
}
.auth-submit-btn {
  margin-top: 6px;
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #022c22;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 14px rgba(34,197,94,0.3);
}
.auth-submit-btn:hover  { opacity: 0.92; transform: translateY(-1px); }
.auth-submit-btn:active { transform: scale(0.98); }

/* Hide header lang buttons on auth view, show in auth panel instead */
#auth-view ~ * .header-right .lang-btn { display: none; }

/* Mobile — stack vertically */
@media (max-width: 640px) {
  .auth-page {
    flex-direction: column;
    margin: 6px 0;
    border-radius: 14px;
  }
  .auth-brand {
    padding: 28px 20px 22px;
    border-right: none;
    border-bottom: 1px solid rgba(148,163,184,0.08);
  }
  .auth-brand-img   { width: 70px; height: 70px; }
  .auth-brand-title { font-size: 1.5rem; }
  .auth-brand-facts { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .auth-form-panel  { width: 100%; padding: 24px 20px; }
}

/* Old auth-card kept for compat */
.auth-card { max-width: 420px; margin: 20px auto; }

/* ── INPUTS ──────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="number"] {
  background: var(--bg3);
  border-radius: 10px;
  border: 1px solid var(--border2);
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.15s;
  width: 100%;
}
input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── PRIMARY BUTTON ──────────────────────────────── */
.primary-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #022c22;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity 0.15s, transform 0.1s;
  width: 100%;
}
.primary-btn:hover  { opacity: 0.92; }
.primary-btn:active { transform: scale(0.98); }
.primary-btn.disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* ── TABS (auth) — legacy kept for compat ────────── */
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 6px 0;
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}
.tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── TOP NAV TABS (desktop) ──────────────────────── */
.nav-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.nav-tab {
  flex: 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  padding: 8px 4px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(34,197,94,0.35);
}
/* Hide top nav on mobile in favour of bottom nav */
@media (max-width: 767px) { .nav-tabs { display: none; } }

/* ── BOTTOM NAV (mobile only) ────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(6,12,24,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 50;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}
@media (max-width: 767px) { .bottom-nav { display: flex; } }

.bottom-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.62rem;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 6px 4px 2px;
  cursor: pointer;
  transition: color 0.15s;
}
.bottom-nav-btn .bn-icon { font-size: 1.2rem; line-height: 1; }
.bottom-nav-btn.active { color: var(--accent); }

/* ── LISTS & CHIPS ───────────────────────────────── */
.simple-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.simple-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.simple-list li:last-child { border-bottom: none; }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(34,197,94,0.4);
}

/* ── INLINE FORM ─────────────────────────────────── */
.inline-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.inline-form input { flex: 1; }

/* ── GAME AREA ───────────────────────────────────── */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.focus-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

/* Round info bar */
#round-info {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 0 0 12px;
}

/* ── ROUND PICKER STRIP ──────────────────────────── */
#round-picker {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.round-pip-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.round-pip-btn.done {
  background: var(--accent-soft);
  border-color: rgba(34,197,94,0.3);
  color: var(--accent);
}
.round-pip-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #022c22;
  font-weight: 700;
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
}

/* ── SCORE ROWS with stepper buttons ─────────────── */
.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.score-row-name {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 500;
}
.score-row-running {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 52px;
  text-align: right;
}
.score-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stepper-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--bg4);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  font-family: var(--font-body);
}
.stepper-btn:hover  { background: var(--bg2); }
.stepper-btn:active { transform: scale(0.93); }
.score-row input[type="number"] {
  width: 64px;
  text-align: center;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
}
/* Hide browser number spinners */
.score-row input[type="number"]::-webkit-inner-spin-button,
.score-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.score-row input[type="number"] { -moz-appearance: textfield; }

/* ── ROUND PROGRESS TEXT ─────────────────────────── */
#round-progress {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

/* ── SUMMARY TABLE ───────────────────────────────── */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.summary-table th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 4px;
  border-bottom: 1px solid var(--border2);
  text-align: left;
}
.summary-table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
}
.summary-table tbody tr:first-child td {
  font-weight: 600;
  color: var(--accent);
}
.summary-table tbody tr:last-child td { border-bottom: none; }

/* ── HISTORY DETAIL ──────────────────────────────── */
.history-expand-btn { margin-bottom: 8px; }
.round-header {
  cursor: pointer;
  background: var(--bg3);
}
.round-header:hover { background: var(--accent-glow); }
.round-toggle { font-size: 0.8rem; opacity: 0.7; }
.round-detail.round-winner td {
  font-weight: 600;
  color: var(--accent);
}

/* ── CHARTS ──────────────────────────────────────── */
.chart-block { margin-top: 14px; }
.chart-block h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Chart heading label */
.chart-heading {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 8px;
}
.stats-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

/* Stats chart layout grid */
.stats-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.stats-chart-block {
  margin-bottom: 20px;
}
.stats-chart-full { margin-bottom: 20px; }

/* Chart canvas wrapper — height controlled here so Chart.js fills it */
.chart-wrap          { position: relative; height: 200px; }
.chart-wrap-doughnut { position: relative; height: 200px; }
.chart-wrap-hbar     { position: relative; height: 180px; }
.chart-wrap-radar    { position: relative; height: 240px; }

/* Leaderboard table — horizontally scrollable */
#adv-player-stats {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#adv-player-stats table { min-width: 500px; }

/* ── STATS PAGE MOBILE ───────────────────────────── */
@media (max-width: 640px) {
  .stats-chart-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .chart-wrap          { height: 180px; }
  .chart-wrap-doughnut { height: 210px; }
  .chart-wrap-hbar     { height: 160px; }
  .chart-wrap-radar    { height: 220px; }
  #adv-player-stats table { min-width: 420px; }
  #view-stats .card { padding: 12px; }
  #view-stats h2 { font-size: 1rem; }
}

/* ── STATS PAGE TABLET ───────────────────────────── */
@media (min-width: 641px) and (max-width: 860px) {
  .chart-wrap       { height: 190px; }
  .chart-wrap-radar { height: 230px; }
}

/* ── STATS LEADERBOARD TABLE ─────────────────────── */
.stats-leaderboard {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.stats-leaderboard th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border2);
  text-align: left;
}
.stats-leaderboard td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.stats-leaderboard tbody tr:last-child td { border-bottom: none; }
.stats-leaderboard tbody tr:first-child td { color: var(--accent); }
.stats-rank {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  width: 32px;
}
.stats-name { font-weight: 500; }
.win-rate-bar-wrap {
  width: 80px;
  height: 5px;
  background: var(--bg3);
  border-radius: 999px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}
.win-rate-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

/* Charts toggle */
.charts-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--font-body);
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.15s;
}
.charts-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── FOCUS MODE ──────────────────────────────────── */
body.focus-mode .nav-tabs,
body.focus-mode #view-home,
body.focus-mode #view-players,
body.focus-mode #view-stats,
body.focus-mode #game-summary { display: none !important; }
body.focus-mode #view-new-game { display: block; }
body.focus-mode .app-header h1 { font-size: 0.95rem; }

/* ── HOME PAGE ───────────────────────────────────── */
.home-card { display: flex; flex-direction: column; gap: 14px; }
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.home-hero-text { flex: 1; }
.home-hero-image-wrap { flex-shrink: 0; }
.home-hero-image {
  display: block;
  width: 160px;
  max-width: 38vw;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.7);
  border: none;
}

.home-section, .home-columns {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.home-section-title {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.home-stats-row { display: flex; flex-wrap: wrap; gap: 8px; }
.home-stat-pill {
  min-width: 130px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.home-stat-label { color: var(--muted); font-size: 0.72rem; }
.home-stat-value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

.home-last-game { margin-top: 6px; font-size: 0.8rem; }
.home-columns { display: flex; flex-wrap: wrap; gap: 14px; }
.home-column { flex: 1; min-width: 200px; }

.home-leaders-list { list-style: none; margin: 6px 0 0; padding: 0; }
.home-leader-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 10px;
}
.home-leader-item:first-child {
  background: var(--accent-soft);
}
.home-leader-icon { width: 18px; font-size: 0.9rem; text-align: center; }
.home-leader-rank { width: 28px; font-size: 0.8rem; color: var(--muted); }
.home-leader-name { flex: 1; font-weight: 500; }
.home-leader-detail { font-size: 0.78rem; color: var(--muted); }
.home-leader-empty { font-size: 0.85rem; color: var(--muted); }

.home-funfact-text {
  font-size: 0.85rem;
  margin-top: 6px;
  font-style: italic;
  border-left: 2px solid rgba(34,197,94,0.4);
  padding-left: 10px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── FOOTER ──────────────────────────────────────── */
.app-footer {
  margin-top: 10px;
  padding: 8px 10px 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── DESKTOP TWEAKS ──────────────────────────────── */
@media (min-width: 768px) {
  .app { padding: 14px 20px 28px; }
  .app-header h1 { font-size: 1.25rem; }
  .score-row input[type="number"] { width: 72px; }
}

@media (max-width: 640px) {
  .home-hero { align-items: flex-start; }
  .home-hero-image { width: 120px; }
}
