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

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

/* ── Design tokens ────────────────────────────────────────────────── */
:root {
  --bg:           #0d0d0f;
  --bg-2:         #141417;
  --bg-3:         #1c1c21;
  --bg-4:         #242429;
  --border:       rgba(255,255,255,0.07);
  --border-2:     rgba(255,255,255,0.13);
  --text:         #f0f0f4;
  --text-2:       #9898a8;
  --text-3:       #55555f;
  --accent:       #b80000;
  --accent-dim:   rgba(0,212,255,0.12);
  --accent-glow:  rgba(0,212,255,0.25);
  --live:         #ff3b3b;
  --live-dim:     rgba(255,59,59,0.15);
  --win:          #00e676;
  --win-dim:      rgba(0,230,118,0.1);
  --cond:         'Barlow Condensed', sans-serif;
  --body:         'Barlow', sans-serif;
  --max:          1200px;
  --radius:       10px;
  --radius-sm:    6px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--body); background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--body); cursor: pointer; border: none; background: none; }

/* ── Layout ───────────────────────────────────────────────────────── */
.site-wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ══════════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,13,15,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}

.site-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--cond); font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; flex-shrink: 0; letter-spacing: -0.02em;
}
.logo-text {
  font-family: var(--cond); font-weight: 700; font-size: 20px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
.logo-text em { font-style: normal; color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 12px; }
.header-date { font-size: 12px; color: var(--text-2); letter-spacing: 0.03em; }

.live-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--live-dim);
  border: 1px solid rgba(255,59,59,0.3);
  border-radius: 20px; padding: 3px 10px;
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--live);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--live);
  animation: pulse 1.4s ease-in-out infinite;
}

.search-trigger {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  border: 1px solid var(--border-2);
  transition: all 0.15s;
}
.search-trigger:hover { color: var(--accent); border-color: rgba(0,212,255,0.3); background: var(--accent-dim); }

/* ══════════════════════════════════════════════════════════════════
   SEARCH OVERLAY
══════════════════════════════════════════════════════════════════ */
.search-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.search-overlay.is-open { opacity: 1; pointer-events: all; }

.search-modal {
  width: 100%; max-width: 560px;
  margin: 0 16px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  transform: translateY(-8px);
  transition: transform 0.18s ease;
}
.search-overlay.is-open .search-modal { transform: translateY(0); }

.search-bar-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.search-icon { color: var(--text-3); flex-shrink: 0; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--body); font-size: 16px; color: var(--text);
}
.search-input::placeholder { color: var(--text-3); }
.search-close {
  color: var(--text-3); padding: 4px;
  border-radius: 4px; transition: color 0.15s;
}
.search-close:hover { color: var(--text); }

.search-results {
  max-height: 420px; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}
.search-hint {
  padding: 24px 20px; text-align: center;
  font-size: 13px; color: var(--text-3);
}

.search-empty {
  padding: 32px 20px; text-align: center;
  color: var(--text-3);
}
.search-empty svg { margin-bottom: 12px; display: block; margin-left: auto; margin-right: auto; }
.search-empty p { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.search-empty p strong { color: var(--text); }
.search-empty span { font-size: 12px; }

.search-result-item {
  display: block; width: 100%;
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-4); }

.sri-state {
  font-family: var(--cond); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.sri-state.is-live { color: var(--live); }
.sri-state.is-live .live-dot { display: inline-block; }

.sri-matchup { display: flex; flex-direction: column; gap: 4px; }
.sri-team {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.sri-name { font-size: 14px; font-weight: 500; color: var(--text-2); }
.sri-score {
  font-family: var(--cond); font-size: 18px; font-weight: 700;
  color: var(--text-2);
}
.sri-team.is-match .sri-name { color: var(--text); }
.sri-team.is-winner .sri-score { color: var(--win); }

/* Highlight matched text */
.search-results mark {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 2px; padding: 0 1px;
}

/* Keyboard shortcut hint */
.search-trigger::after {
  content: '⌘K';
  font-size: 10px; font-weight: 600;
  color: var(--text-3);
  margin-left: 2px;
  display: none;
}
@media (min-width: 900px) { .search-trigger::after { display: inline; } }

/* ══════════════════════════════════════════════════════════════════
   CONTROLS STRIP
══════════════════════════════════════════════════════════════════ */
.controls-strip {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 56px; z-index: 190;
}
.controls-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 52px;
}

/* Sport pills */
.sport-pills {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; flex: 1;
  scrollbar-width: none;
}
.sport-pills::-webkit-scrollbar { display: none; }

.sport-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid transparent;
  font-size: 12px; font-weight: 500;
  color: var(--text-2); white-space: nowrap;
  transition: all 0.15s; flex-shrink: 0;
}
.sport-pill svg { opacity: 0.6; transition: opacity 0.15s; flex-shrink: 0; }
.sport-pill:hover { color: var(--text); background: var(--bg-3); border-color: var(--border-2); }
.sport-pill:hover svg { opacity: 1; }
.sport-pill.is-active { background: var(--accent-dim); border-color: rgba(0,212,255,0.3); color: var(--accent); }
.sport-pill.is-active svg { opacity: 1; }

/* More dropdown */
.sport-more-wrap { position: relative; flex-shrink: 0; }
.sport-more-btn { gap: 4px; }

.sport-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 190px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.65);
  z-index: 400;
  display: none;
}
.sport-dropdown.is-open { display: block; }

.dropdown-group { margin-bottom: 8px; }
.dropdown-group:last-child { margin-bottom: 0; }
.dropdown-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); padding: 4px 8px 2px;
}
.dropdown-item {
  display: block; width: 100%; text-align: left;
  font-size: 13px; color: var(--text-2);
  padding: 7px 10px; border-radius: var(--radius-sm);
  transition: all 0.1s;
}
.dropdown-item:hover { background: var(--bg-4); color: var(--text); }
.dropdown-item.is-active { color: var(--accent); }

/* Controls right */
.controls-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.date-input {
  height: 34px; padding: 0 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--body); font-size: 13px;
  outline: none; transition: border-color 0.15s;
  color-scheme: dark; width: 140px;
}
.date-input:focus { border-color: var(--accent); }

.btn-load {
  height: 34px; padding: 0 16px;
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  transition: all 0.15s; white-space: nowrap;
}
.btn-load:hover { background: #33ddff; }
.btn-load:active { transform: scale(0.97); }
.btn-load:disabled { opacity: 0.4; pointer-events: none; }

/* ══════════════════════════════════════════════════════════════════
   DIVISION STRIP
══════════════════════════════════════════════════════════════════ */
.division-strip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 108px; z-index: 180;
}
.division-strip::-webkit-scrollbar { display: none; }

.div-chip {
  font-family: var(--cond);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 16px; border-radius: 20px;
  border: 1px solid var(--border-2);
  color: var(--text-2); background: transparent;
  cursor: pointer; transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
}
.div-chip:hover { color: var(--text); background: var(--bg-3); }
.div-chip.is-active { background: var(--accent-dim); border-color: rgba(0,212,255,0.35); color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════
   STATUS BAR
══════════════════════════════════════════════════════════════════ */
.status-bar {
  padding: 14px 0 0;
  font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
  min-height: 36px; letter-spacing: 0.02em;
}
.status-bar.error { color: var(--live); }
.spinner {
  width: 14px; height: 14px;
  border: 1.5px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.25; } }

/* ══════════════════════════════════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: baseline; gap: 14px;
  padding: 24px 0 14px;
}
.section-title {
  font-family: var(--cond); font-size: 28px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
.section-sub { font-size: 13px; color: var(--text-2); }
.game-count {
  margin-left: auto;
  font-family: var(--cond); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px;
}

/* ══════════════════════════════════════════════════════════════════
   GAMES GRID
══════════════════════════════════════════════════════════════════ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px; padding-bottom: 8px;
}

@keyframes cardIn {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:none; }
}

.game-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  position: relative; overflow: hidden;
  animation: cardIn 0.25s ease both;
}
.game-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: transparent; transition: background 0.2s;
}
.game-card:hover { border-color: var(--border-2); background: var(--bg-3); transform: translateY(-1px); }
.game-card.is-selected { border-color: rgba(0,212,255,0.4); background: var(--bg-3); }
.game-card.is-selected::before { background: var(--accent); }
.game-card.is-live-card { border-color: rgba(255,59,59,0.2); }
.game-card.is-live-card::before { background: var(--live); animation: pulse 1.4s ease-in-out infinite; }

.game-state {
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.game-state.is-live { color: var(--live); }
.game-state.is-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--live); flex-shrink: 0;
  animation: pulse 1.4s ease-in-out infinite;
}

.matchup { display: flex; flex-direction: column; }
.team-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.team-name {
  font-size: 14px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.team-rank {
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-dim);
  border-radius: 4px; padding: 1px 5px; flex-shrink: 0;
}
.team-score {
  font-family: var(--cond); font-size: 26px; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em; line-height: 1; flex-shrink: 0;
}
.score-win { color: var(--win); }
.game-divider { height: 1px; background: var(--border); margin: 2px 0; }
.game-meta { margin-top: 10px; font-size: 11px; color: var(--text-3); }

/* ══════════════════════════════════════════════════════════════════
   DEEP DIVE
══════════════════════════════════════════════════════════════════ */
.deep-dive {
  margin-top: 24px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border);
  overflow: hidden; animation: fadeUp 0.2s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

.dive-header {
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
}
.dive-matchup {
  font-family: var(--cond); font-size: 32px; font-weight: 800;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--text); line-height: 1.1; margin-bottom: 4px;
}
.dive-matchup em { font-style: normal; color: var(--text-3); font-weight: 400; font-size: 24px; }
.dive-meta { font-size: 12px; color: var(--text-2); margin-bottom: 16px; }

.tab-bar { display: flex; gap: 0; margin-top: 4px; }
.tab-btn {
  padding: 10px 20px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active { color: var(--accent); border-bottom-color: var(--accent); }

#tab-panel { padding: 24px; }

/* ══════════════════════════════════════════════════════════════════
   BOX SCORE
══════════════════════════════════════════════════════════════════ */
.panel-section { margin-bottom: 28px; }
.panel-section-title {
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); padding-bottom: 8px;
  border-bottom: 1px solid var(--border); margin-bottom: 0;
}

.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  font-family: var(--cond); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--bg-2);
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-2); white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-3); color: var(--text); }
.col-name { font-weight: 500; color: var(--text) !important; white-space: normal; min-width: 140px; }
.col-pos { color: var(--text-3) !important; font-size: 11px; }

/* ══════════════════════════════════════════════════════════════════
   PLAY-BY-PLAY
══════════════════════════════════════════════════════════════════ */
.pbp-period-label {
  font-family: var(--cond); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3);
  padding: 14px 0 8px; border-bottom: 1px solid var(--border);
}
.pbp-play {
  display: flex; gap: 14px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; line-height: 1.5;
}
.pbp-play:last-child { border-bottom: none; }
.pbp-time {
  font-family: var(--cond); font-size: 12px; font-weight: 600;
  color: var(--text-3); min-width: 48px;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.pbp-team {
  font-family: var(--cond); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); min-width: 72px; flex-shrink: 0; padding-top: 2px;
}
.pbp-desc { color: var(--text-2); flex: 1; }
.pbp-scoring {
  background: var(--win-dim); border-radius: 4px;
  padding-left: 6px; margin-left: -6px;
}
.pbp-scoring .pbp-desc { color: var(--text); font-weight: 500; }
.pbp-score {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--cond); font-size: 13px; font-weight: 700;
  color: var(--win); padding-left: 12px;
}

/* ══════════════════════════════════════════════════════════════════
   TEAM STATS
══════════════════════════════════════════════════════════════════ */
.stats-header {
  display: grid; grid-template-columns: 1fr 180px 1fr;
  gap: 8px; align-items: center; margin-bottom: 16px;
}
.stats-team-name {
  font-family: var(--cond); font-size: 16px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text);
}
.stats-team-name.right { text-align: right; }
.stats-spacer { font-size: 10px; text-align: center; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; }

.stat-row {
  display: grid; grid-template-columns: 1fr 180px 1fr;
  gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-val-left { font-size: 14px; font-weight: 600; color: var(--text); text-align: right; padding-right: 8px; }
.stat-val-right { font-size: 14px; font-weight: 600; color: var(--text); text-align: left; padding-left: 8px; }
.stat-bars { display: flex; gap: 4px; align-items: center; height: 22px; }
.stat-bar-l {
  flex: 1; height: 4px; background: var(--bg-4);
  border-radius: 2px; overflow: hidden; display: flex; justify-content: flex-end;
}
.stat-bar-r { flex: 1; height: 4px; background: var(--bg-4); border-radius: 2px; overflow: hidden; }
.stat-bar-fill-l {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}
.stat-bar-fill-r {
  height: 100%; background: var(--text-3); border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* ══════════════════════════════════════════════════════════════════
   EMPTY / ERROR STATES
══════════════════════════════════════════════════════════════════ */
.state-empty {
  padding: 56px 0; text-align: center;
  font-size: 14px; color: var(--text-3);
}
.state-empty strong {
  display: block; font-family: var(--cond); font-size: 22px; font-weight: 700;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 6px;
}
.notice {
  margin-top: 16px; padding: 12px 16px;
  background: rgba(255,200,0,0.06); border: 1px solid rgba(255,200,0,0.2);
  border-radius: var(--radius-sm); font-size: 12px; color: rgba(255,200,0,0.7);
  line-height: 1.6; text-align: left;
  max-width: 480px; margin-left: auto; margin-right: auto;
}
.notice code {
  font-family: monospace; font-size: 11px;
  background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════ */
.site-footer { margin-top: 80px; border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-logo { font-family: var(--cond); font-size: 15px; font-weight: 700; text-transform: uppercase; color: var(--text-3); letter-spacing: 0.06em; }
.footer-logo em { font-style: normal; color: var(--accent); }
.footer-links { font-size: 12px; color: var(--text-3); }
.footer-links a { color: var(--text-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════
   SCROLLBARS
══════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .header-date { display: none; }
  .controls-inner { height: auto; padding: 8px 16px; flex-wrap: wrap; gap: 8px; }
  .sport-pills { order: 1; width: 100%; }
  .controls-right { order: 2; width: 100%; justify-content: flex-end; }
  .date-input { flex: 1; min-width: 0; }
  .division-strip { top: 104px; padding: 8px 16px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .dive-matchup { font-size: 24px; }
  .dive-matchup em { font-size: 18px; }
  #tab-panel { padding: 16px; }
  .stats-header, .stat-row { grid-template-columns: 1fr 130px 1fr; }
  .search-modal { margin: 0 12px; }
}

@media (max-width: 480px) {
  .site-wrap { padding: 0 12px; }
  .header-inner { padding: 0 12px; }
  .controls-inner { padding: 8px 12px; }
  .division-strip { padding: 8px 12px; }
  .games-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .game-card { padding: 12px 14px; }
  .team-score { font-size: 22px; }
  .team-name { font-size: 13px; }
  .stats-header, .stat-row { grid-template-columns: 1fr 100px 1fr; }
  .search-overlay { padding-top: 40px; }
}