/* GCCC Contest Dashboard — CSS
   Uses the same token set as the main GCCC website (style.css):
   Barlow / Barlow Condensed · green-dark #0f3d28 · green-primary #1a5c3a
   Extends it with dashboard-specific big-screen rules. */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Barlow:wght@300;400;500;600&display=swap');

/* ── Tokens (matches GCCC site) ───────────────────────────────────────── */
:root {
  --green-dark:    #0f3d28;
  --green-primary: #1a5c3a;
  --green-mid:     #226b45;
  --green-light:   #2d8a58;
  --green-muted:   #a8d5b5;
  --green-tint:    #eaf3de;
  --off-white:     #f4f3ef;
  --white:         #ffffff;
  --text-dark:     #1a1a18;
  --text-mid:      #3d3d39;
  --text-muted:    #6b6b66;
  --text-light:    #9b9b96;
  --border:        rgba(0,0,0,0.08);
  --border-dark:   rgba(0,0,0,0.15);

  /* Dashboard extras */
  --dash-bg:       #0a1f12;
  --dash-surface:  #0f2e1b;
  --dash-card:     #142a1c;
  --dash-border:   rgba(45,138,88,0.25);
  --dash-accent:   #2d8a58;
  --dash-text:     #e8f5ed;
  --dash-text-sub: #7ab895;
  --dash-gold:     #e8c040;
  --dash-red:      #e05050;
  --dash-blue:     #4a9edd;

  --font-cond:  'Barlow Condensed', sans-serif;
  --font-body:  'Barlow', sans-serif;
}

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

/* ── Dashboard body ───────────────────────────────────────────────────── */
.dashboard-body {
  background: var(--dash-bg);
  color: var(--dash-text);
  font-family: var(--font-body);
  font-size: 16px;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen { display: flex; flex-direction: column; height: 100dvh; }
.screen.hidden { display: none !important; }

/* ── Idle screen ──────────────────────────────────────────────────────── */
.idle-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 1rem;
}
.idle-logo  { width: 120px; opacity: 0.9; }
.idle-call  { font-family: var(--font-cond); font-size: 3.5rem; font-weight: 700;
               color: var(--white); letter-spacing: 0.06em; }
.idle-name  { font-size: 1.2rem; color: var(--dash-text-sub); }
.idle-msg   { margin-top: 1rem; font-size: 1.5rem; color: var(--dash-text-sub); }
.idle-admin-link { margin-top: 1rem; color: var(--green-muted); font-size: 1rem;
                   text-decoration: none; border-bottom: 1px solid currentColor; }

/* ── Dashboard header ─────────────────────────────────────────────────── */
.dash-header {
  background: var(--green-dark);
  border-bottom: 2px solid var(--green-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  flex-shrink: 0;
}
.dash-header-left { display: flex; align-items: center; gap: 1rem; }
.dash-logo { height: 40px; width: auto; }
.dash-title-block { display: flex; flex-direction: column; line-height: 1.1; }
.dash-contest-name {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  letter-spacing: 0.05em;
}
.dash-callsign { font-size: 0.75rem; color: var(--green-muted); }

.dash-header-right { display: flex; align-items: center; gap: 2rem; }
.hdr-stat { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.hdr-stat-val {
  font-family: var(--font-cond);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}
.hdr-stat-lbl { font-size: 0.65rem; color: var(--green-muted); text-transform: uppercase;
                 letter-spacing: 0.08em; margin-top: 2px; }

/* ── Dashboard main area ──────────────────────────────────────────────── */
.dash-main { flex: 1; overflow: hidden; position: relative; }

.dash-view {
  position: absolute; inset: 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: hidden;
}
.dash-view.hidden { display: none; }
.dash-view.active { display: flex; }

/* ── Score row ────────────────────────────────────────────────────────── */
.score-row {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}
.score-tile {
  flex: 1;
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.score-tile.accent {
  background: var(--green-dark);
  border-color: var(--green-light);
}
.score-tile-val {
  font-family: var(--font-cond);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.02em;
}
.score-tile.accent .score-tile-val { color: var(--dash-gold); }
.score-tile-lbl {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--dash-text-sub);
}

/* ── Mid grid ─────────────────────────────────────────────────────────── */
.mid-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 0.85fr;
  gap: 1rem;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.panel {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}
.panel-title {
  font-family: var(--font-cond);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dash-text-sub);
  border-bottom: 1px solid var(--dash-border);
  padding-bottom: 0.5rem;
}

/* Band grid */
.band-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  flex: 1;
}
.band-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 0.75rem;
}
.band-label {
  font-family: var(--font-cond);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dash-text);
}
.band-bar-wrap { position: relative; height: 20px; background: var(--dash-surface); border-radius: 3px; }
.band-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green-mid); border-radius: 3px; transition: width 0.4s ease; min-width: 4px; }
.band-count {
  font-family: var(--font-cond);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--white);
  text-align: right;
  min-width: 3ch;
}

/* Station panels */
.station-list { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; overflow-y: auto; }
.station-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  align-items: start;
}
.station-card.active-run { border-left: 3px solid var(--dash-accent); }
.station-name {
  font-family: var(--font-cond);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}
.station-mode-band {
  font-size: 1rem;
  color: var(--dash-text-sub);
  font-family: var(--font-cond);
}
.station-qsos {
  font-family: var(--font-cond);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--dash-gold);
  line-height: 1;
  text-align: right;
}
.station-rate {
  font-size: 0.85rem;
  color: var(--dash-text-sub);
  text-align: right;
}

/* ── Leaderboard ──────────────────────────────────────────────────────── */
#view-leaderboard {
  justify-content: flex-start;
}
.lb-header {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--dash-border);
}
.lb-title {
  font-family: var(--font-cond);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
}
.lb-subtitle { font-size: 1.1rem; color: var(--dash-text-sub); }

/* Two-column layout: large donut left, table right */
.lb-body-grid {
  display: grid;
  grid-template-columns: 1fr 560px;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.lb-donut-panel {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.lb-table-wrap { flex: 1; overflow-y: auto; }
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-cond);
}
.lb-table th {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dash-text-sub);
  text-align: left;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--dash-border);
}
.lb-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(45,138,88,0.1);
  vertical-align: middle;
}
.lb-table tbody tr:hover { background: var(--dash-surface); }
.lb-table tbody tr:first-child td.lb-op   { font-size: 1.75rem; }
.lb-table tbody tr:first-child td.lb-qsos { font-size: 2rem; }

.lb-rank { width: 2.5rem; color: var(--dash-text-sub); font-size: 1.1rem; }
.lb-op { font-size: 1.45rem; font-weight: 700; color: var(--white); letter-spacing: 0.04em; }
.lb-qsos { font-size: 1.65rem; font-weight: 900; color: var(--dash-gold); text-align: right; }
.lb-bands { font-size: 0.9rem; color: var(--dash-text-sub); }

.lb-table td { padding: 0.55rem 0.9rem; }
.lb-table td.lb-rank { font-size: 1.1rem; color: var(--dash-text-sub); }
.lb-table td.lb-op  { font-size: 1.45rem; }
.lb-table td.lb-qsos { font-size: 1.65rem; }

/* Rank medal colors */
.rank-1 td.lb-rank { color: #ffd700; }
.rank-2 td.lb-rank { color: #c0c0c0; }
.rank-3 td.lb-rank { color: #cd7f32; }

/* Per-operator per-band mini row */
.lb-band-breakdown {
  font-size: 0.75rem;
  color: var(--dash-text-sub);
  letter-spacing: 0.03em;
}
.lb-band-breakdown span { margin-right: 0.6em; }
.lb-band-breakdown .bb-val { color: var(--dash-text); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 44px;
  background: var(--dash-surface);
  border-top: 1px solid var(--dash-border);
  flex-shrink: 0;
}
.view-indicator { display: flex; gap: 4px; }
.view-btn {
  font-family: var(--font-cond);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  background: transparent;
  color: var(--dash-text-sub);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.view-btn.active { color: var(--white); border-color: var(--dash-border); background: var(--dash-card); }
.view-btn:hover:not(.active) { color: var(--dash-text); }

.dash-footer-right { display: flex; align-items: center; gap: 1rem; }
.footer-status { font-size: 0.75rem; color: var(--dash-text-sub); }
.footer-status.ok { color: var(--green-muted); }
.footer-status.err { color: var(--dash-red); }
.footer-admin { font-size: 0.75rem; color: var(--dash-text-sub); text-decoration: none; }
.footer-admin:hover { color: var(--white); }

/* ── Admin body ───────────────────────────────────────────────────────── */
.admin-body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100dvh;
}

/* Reuse GCCC nav styles */
.site-nav {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--green-light);
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-brand-call { font-family: var(--font-cond); font-weight: 700; font-size: 18px;
                  color: var(--white); letter-spacing: 0.04em; }
.nav-brand-name { font-size: 11px; color: var(--green-muted); }
.nav-link { color: var(--green-muted); text-decoration: none; font-size: 0.9rem; }
.nav-link:hover { color: var(--white); }

.admin-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-section { display: flex; flex-direction: column; gap: 1rem; }
.admin-section-title {
  font-family: var(--font-cond);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-dark);
  border-bottom: 2px solid var(--green-primary);
  padding-bottom: 0.4rem;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.card-title {
  font-family: var(--font-cond);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-hint { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.admin-hint code { background: var(--green-tint); padding: 1px 4px; border-radius: 3px;
                   font-family: monospace; font-size: 0.85em; }

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.form-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
}
.form-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-dark);
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--off-white);
  color: var(--text-dark);
}
.form-input:focus { outline: 2px solid var(--green-light); border-color: var(--green-light); }
.form-textarea { resize: vertical; min-height: 60px; }

select.form-input { appearance: none; cursor: pointer; }

.form-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

/* Buttons */
.btn {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 1.4rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary { background: var(--green-primary); color: var(--white); }
.btn-primary:hover { background: var(--green-mid); }
.btn-success { background: #27863f; color: var(--white); }
.btn-success:hover { background: #1f6b32; }
.btn-danger  { background: #c0392b; color: var(--white); }
.btn-danger:hover  { background: #a93226; }
.btn-outline { background: transparent; color: var(--green-primary);
               border: 1px solid var(--green-primary); }
.btn-sm { padding: 0.3rem 0.9rem; font-size: 0.8rem; }

/* Contest list */
.contest-list { display: flex; flex-direction: column; gap: 0.75rem; }
.contest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  background: var(--off-white);
}
.contest-item-info { display: flex; flex-direction: column; gap: 2px; }
.contest-item-name { font-weight: 600; color: var(--text-dark); }
.contest-item-meta { font-size: 0.8rem; color: var(--text-muted); }
.contest-item-actions { display: flex; gap: 0.5rem; align-items: center; }

.status-badge {
  display: inline-block;
  font-family: var(--font-cond);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 20px;
}
.status-draft    { background: #e0ddd5; color: var(--text-muted); }
.status-live     { background: #d4edda; color: #1a5c3a; }
.status-complete { background: #cfe2ff; color: #0a3d80; }

/* Live banner */
.live-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #d4edda;
  border: 1px solid #a8d5b5;
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-dark);
}
.live-banner.hidden { display: none; }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green-light);
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Toast notifications */
.toast-area {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
}
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slide-in 0.2s ease;
}
.toast-ok  { background: var(--green-primary); color: var(--white); }
.toast-err { background: #c0392b; color: var(--white); }
@keyframes slide-in { from { transform: translateX(100%); opacity: 0; } }

.muted { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }

/* Utility */
.hidden { display: none !important; }

/* Tava One credit */
.tava-credit {
  text-align: center;
  font-size: 0.72rem;
  padding: 6px;
  color: var(--text-muted);
}
.tava-credit a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.tava-credit a:hover { opacity: 0.8; }

/* QSO Ticker */
.qso-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
  background: #0a1628;
  border-top: 1px solid var(--dash-border);
  border-bottom: 1px solid var(--dash-border);
  overflow: hidden;
  flex-shrink: 0;
}
.ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dash-accent);
  text-transform: uppercase;
  border-right: 1px solid var(--dash-border);
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  position: relative;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  animation: ticker-scroll 75s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  height: 100%;
  font-size: 1.05rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  color: var(--dash-text);
  border-right: 1px solid var(--dash-border);
}
.ticker-item .ti-call {
  color: var(--dash-accent);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ticker-item .ti-op {
  color: var(--dash-text-sub);
  font-size: 0.9rem;
}
.ticker-item .ti-sep {
  color: var(--dash-border);
}
.ticker-item .ti-band {
  background: var(--dash-accent);
  color: #000;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.ticker-item .ti-mode {
  color: var(--dash-text-sub);
  font-size: 0.9rem;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Charts row */
/* Donut panels in mid-grid */
.panel-bands-donut,
.panel-modes-donut {
  overflow: hidden;
}

/* Donut chart — wrap is a flex row; circle-wrap stretches to panel height */
.donut-wrap {
  display: flex;
  align-items: stretch;
  gap: 20px;
  flex: 1;
  min-height: 0;
  padding: 6px 0;
}
/* War-room donuts: 62% of row width → legend gets 38% */
.donut-circle-wrap {
  flex: 0 0 62%;
  aspect-ratio: 1 / 1;
  align-self: center;
  min-width: 0;
}
/* Leaderboard operator donut: fill panel height instead */
.lb-donut-panel .donut-circle-wrap {
  flex: 0 0 auto;
  align-self: stretch;
  aspect-ratio: 1 / 1;
}
.donut-circle-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-size: 1.05rem;
  font-family: 'Barlow Condensed', sans-serif;
}
.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.donut-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}
.donut-legend-label { color: var(--dash-text); font-weight: 600; }
.donut-legend-val   { color: var(--dash-text-sub); }

/* ── Mobile responsive (≤ 768px) ─────────────────────────────────────── */
@media (max-width: 768px) {

  /* Allow page to scroll on mobile instead of fixed viewport */
  .dashboard-body {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }
  .screen { height: auto; min-height: 100dvh; }

  /* Compact header */
  .dash-header {
    height: auto;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .dash-logo { height: 28px; }
  .dash-contest-name { font-size: 1rem; }
  .dash-header-right { gap: 0.75rem; }
  .hdr-stat-val { font-size: 1.3rem; }
  .hdr-stat-lbl { font-size: 0.6rem; }

  /* Views: stack normally, no absolute positioning */
  .dash-main { overflow: visible; }
  .dash-view {
    position: static;
    padding: 0.75rem;
    gap: 0.75rem;
    overflow: visible;
  }

  /* Score row: 2-column grid on mobile */
  .score-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  /* Total Score tile spans full width */
  .score-tile.accent { grid-column: 1 / -1; }
  .score-tile-val { font-size: 2rem; }
  .score-tile { padding: 0.6rem 0.75rem; }

  /* Mid grid: single column stack */
  .mid-grid {
    grid-template-columns: 1fr;
    overflow: visible;
    flex: none;
  }
  .panel { overflow: visible; }

  /* Donuts: stack circle above legend on mobile */
  .donut-wrap { flex-direction: column; align-items: center; gap: 12px; }
  .donut-circle-wrap { flex: 0 0 auto; width: 70%; max-width: 260px; }
  .donut-legend { font-size: 0.9rem; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }

  /* Leaderboard: single column */
  .lb-body-grid {
    grid-template-columns: 1fr;
    overflow: visible;
    flex: none;
  }
  .lb-title { font-size: 1.75rem; }
  .lb-table td.lb-op  { font-size: 1.1rem; }
  .lb-table td.lb-qsos { font-size: 1.25rem; }
  .lb-table tbody tr:first-child td.lb-op   { font-size: 1.35rem; }
  .lb-table tbody tr:first-child td.lb-qsos { font-size: 1.5rem; }

  /* Footer: bigger tap targets */
  .dash-footer { height: auto; padding: 0.5rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .view-btn { font-size: 0.85rem; padding: 6px 14px; }

  /* Ticker: slightly smaller */
  .qso-ticker { height: 38px; }
  .ticker-item { font-size: 0.9rem; padding: 0 16px; }

  /* Map view */
  .map-view-body { min-height: 300px; }
  #dash-map-wrap { min-height: 260px; }
}

/* ── Very small phones (≤ 400px) ─────────────────────────────────────── */
@media (max-width: 400px) {
  .hdr-stat { gap: 0; }
  .hdr-stat-val { font-size: 1.1rem; }
  .dash-header-right { gap: 0.5rem; }
  .score-tile-val { font-size: 1.6rem; }
}
