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

:root {
  --bg:           #0f172a;
  --surface:      #1e293b;
  --surface2:     #273549;
  --border:       #334155;
  --accent:       #f97316;
  --accent-dim:   #7c3a12;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --green:        #22c55e;
  --green-dim:    #14532d;
  --red:          #ef4444;
  --red-dim:      #7f1d1d;
  --yellow:       #fbbf24;
  --yellow-dim:   #78350f;
  --radius:       10px;
  --radius-sm:    6px;
}

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-icon { font-size: 1.5rem; }
.year { color: var(--accent); }

.user-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-selector label { white-space: nowrap; }

#user-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 110px;
}

/* ── Tab nav ─────────────────────────────────────────────────────────────── */
.tab-nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 53px; /* sits just below the site-header */
  z-index: 90;
  background: var(--bg);
}
body.admin-bar-visible .tab-nav { top: 93px; } /* admin toolbar (40px) + header (53px) */
body.admin-bar-visible .picks-day-nav { top: 140px; }
body.admin-bar-visible .day-header    { top: 188px; }

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover   { color: var(--text); }
.tab-btn.active  { color: var(--accent); border-bottom-color: var(--accent); }

.refresh-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.refresh-btn:hover { color: var(--accent); border-color: var(--accent); }
.refresh-btn.spinning { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Main content ────────────────────────────────────────────────────────── */
main { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; }

.tab-content        { display: none; }
.tab-content.active { display: block; }

.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 1rem;
}

/* ── Day group ───────────────────────────────────────────────────────────── */
.day-group { margin-bottom: 32px; }

/* ── Picks day nav (sticky pill row) ─────────────────────────────────────── */
.picks-day-nav {
  position: sticky;
  top: 100px; /* below site-header (53px) + tab-nav (47px) */
  z-index: 85;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.picks-day-nav::-webkit-scrollbar { display: none; }
.picks-day-nav:empty { display: none; }
.picks-day-nav.dragging { cursor: grabbing; }

.day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  line-height: 1.2;
}
.day-pill:hover { border-color: var(--accent); color: var(--text); }
.day-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-pill-date  { font-size: 0.72rem; font-weight: 700; }
.day-pill-round { font-size: 0.65rem; color: var(--text-muted); }
.day-pill.active .day-pill-round { color: rgba(255,255,255,0.8); }

.day-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 148px; /* site-header (53px) + tab-nav (47px) + day-nav (48px) */
  z-index: 80;
  background: var(--bg);
}

.day-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.day-round {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

/* ── Game card ───────────────────────────────────────────────────────────── */
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.game-card.live-card   { border-color: var(--red); }
.game-card.final-card  { opacity: 0.85; }

/* status badge row */
.card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.badge-scheduled { background: var(--surface2); color: var(--text-muted); }
.badge-live      { background: var(--red);     color: #fff; animation: pulse 1.4s ease-in-out infinite; }
.badge-final     { background: var(--surface2); color: var(--text-muted); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.card-clock { color: var(--text-muted); font-size: 0.78rem; font-weight: 600; }
.card-round { color: var(--text-muted); font-size: 0.72rem; margin-left: auto; }

/* matchup row */
.matchup {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.team-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-slot.slot-right { text-align: right; align-items: flex-end; }

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 24px;
}

/* team name display */
.team-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.team-slot.slot-right .team-name { flex-direction: row-reverse; }

.seed {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface2);
  border-radius: 4px;
  padding: 1px 4px;
  flex-shrink: 0;
}

/* score display (live / final) */
.team-score {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.team-score.score-winning { color: var(--green); }
.team-score.score-losing  { color: var(--text-muted); }

/* pick indicator under team name */
.pick-indicator {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
}

.pick-correct   { background: var(--green-dim); color: var(--green); }
.pick-wrong     { background: var(--red-dim);   color: var(--red); }
.pick-live-win  { background: var(--green-dim); color: var(--green); }
.pick-live-loss { background: var(--red-dim);   color: var(--red); }
.pick-pending   { background: var(--surface2);  color: var(--text-muted); }
.pick-locked    { background: var(--surface2);  color: var(--text-muted); }

/* ── Pick buttons ────────────────────────────────────────────────────────── */
.pick-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pick-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  text-align: center;
  line-height: 1.3;
}

.pick-btn:hover          { background: var(--accent-dim); border-color: var(--accent); color: var(--text); }
.pick-btn.selected       { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick-btn.not-selected   { opacity: 0.45; }

/* points badge on day header */
.pts-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ── No picks prompt ─────────────────────────────────────────────────────── */
.no-games {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 0.95rem;
}

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.leaderboard-wrap { overflow-x: auto; }

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.leaderboard-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.leaderboard-table th.num,
.leaderboard-table td.num { text-align: right; }

.leaderboard-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.leaderboard-table tr:hover td { background: var(--surface2); }
.leaderboard-table tr.me td    { background: var(--surface2); }

.rank-num   { color: var(--text-muted); font-size: 0.85rem; }
.rank-1 .rank-num { color: var(--yellow); font-weight: 700; }
.rank-2 .rank-num { color: #d1d5db; font-weight: 700; }
.rank-3 .rank-num { color: #cd7c32; font-weight: 700; }

.total-pts { font-size: 1.05rem; font-weight: 800; color: var(--text); }

.live-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-dim);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

.round-pts { color: var(--text-muted); font-size: 0.85rem; }
.round-pts.has-pts { color: var(--text); font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 6px 16px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  padding-bottom: 4px;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar.dragging { cursor: grabbing; }

.filter-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  line-height: 1.2;
}
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-pill.active .pill-round,
.filter-pill.active .pill-date { color: #fff; }

.pill-round { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; }
.pill-date  { font-size: 0.68rem; color: var(--text-muted); }
.filter-pill.active .pill-date { color: rgba(255,255,255,0.8); }

/* ── All Picks grid ──────────────────────────────────────────────────────── */
.picks-grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.picks-grid-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  white-space: nowrap;
  width: 100%;
}

/* Sticky left columns — horizontal scroll only */
.picks-grid-table .sticky-col {
  position: sticky;
  z-index: 2;
  background: var(--surface);
}
.picks-grid-table tbody tr:hover .sticky-col { background: var(--surface2); }
.picks-grid-table tbody tr.me     .sticky-col { background: var(--surface2); }
/* thead sticky cells need higher z-index to stay above body sticky cells */
.picks-grid-table thead .sticky-col { z-index: 4; }

.sticky-rank  { left: 0;     min-width: 34px;  padding: 8px 6px; text-align: center; }
.sticky-name  { left: 34px;  min-width: 115px; padding: 8px 10px; }
.sticky-total { left: 149px; min-width: 50px;  padding: 8px 8px; text-align: center;
                border-right: 2px solid var(--border); }

.you-tag { color: var(--accent); font-size: 0.7rem; margin-left: 3px; }

/* Game column headers */
.game-col-header {
  min-width: 72px;
  max-width: 72px;
  padding: 5px 4px;
  text-align: center;
  vertical-align: bottom;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.game-col-time {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  padding: 4px;
}

.gh-team {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.55;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gh-team.winner { color: var(--text); font-weight: 700; }

.gh-seed { font-size: 0.6rem; color: var(--text-muted); margin-right: 2px; }
.gh-team.winner .gh-seed { color: var(--accent); }

.gh-live-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
  margin-right: 2px;
  animation: pulse 1.4s ease-in-out infinite;
}

.gh-clock       { color: var(--text-muted); font-size: 0.6rem; }
.gh-final-score { font-weight: 700; color: var(--text); }
.gh-final-label { color: var(--text-muted); font-size: 0.6rem; font-weight: 600; }

/* thead rows */
.picks-grid-table thead th { background: var(--surface); }
.picks-grid-table thead tr:first-child th { border-bottom: none; }

/* Body rows */
.picks-grid-table tbody tr { transition: background 0.1s; }
.picks-grid-table tbody tr:hover td { background: var(--surface2); }
.picks-grid-table tbody tr.me td    { background: var(--surface2); }
.picks-grid-table tbody tr.me .sticky-col { background: var(--surface2); }

/* Pick cells */
.pick-cell {
  min-width: 72px;
  max-width: 72px;
  padding: 7px 4px;
  text-align: center;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-cell-scheduled { background: var(--bg); }
.pick-cell-none      { color: var(--text-muted); opacity: 0.35; }
.pick-cell-correct   { background: var(--green-dim); color: var(--green); }
.pick-cell-wrong     { background: var(--red-dim);   color: var(--red);   }
.pick-cell-live-win  { background: var(--green-dim); color: var(--green); animation: pulse 1.4s ease-in-out infinite; }
.pick-cell-live-loss { background: var(--red-dim);   color: var(--red);   }

/* ── Game odds line ──────────────────────────────────────────────────────── */
.game-odds {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.odds-spread { color: var(--yellow); }
.odds-sep    { color: var(--border); }
.odds-ou     { color: var(--text-muted); }

/* ── Score prediction (My Picks) ─────────────────────────────────────────── */
.score-pred {
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.score-pred-active {
  background: var(--surface2);
  border: 1px solid var(--border);
}

.score-pred-saved {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.score-pred-locked {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.score-pred-final {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.score-pred-impossible {
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: var(--red);
  flex-wrap: wrap;
}

.pred-label { color: var(--text-muted); white-space: nowrap; }

.pred-input {
  width: 72px;
  padding: 4px 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}
.pred-input:focus { outline: none; border-color: var(--accent); }
.pred-input.pred-input-error { border-color: var(--red); }

.pred-save-btn {
  padding: 4px 10px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.pred-save-btn:hover { opacity: 0.85; }

.pred-clear-btn, .pred-edit-btn {
  padding: 4px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
}
.pred-clear-btn:hover { border-color: var(--red); color: var(--red); }
.pred-edit-btn:hover  { border-color: var(--accent); color: var(--accent); }

.pred-flag-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.pred-flag-btn:hover { border-color: var(--accent); color: var(--accent); }

.pred-note        { font-size: 0.72rem; font-weight: 600; }
.pred-locked-note { color: var(--text-muted); font-size: 0.7rem; }
.pred-exact       { color: var(--green); font-weight: 700; }
.pred-diff        { color: var(--text-muted); }
.pred-actual      { color: var(--text-muted); font-size: 0.72rem; }

/* Predicted total in All Picks grid cell */
.cell-pred {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.cell-pred-delta { color: var(--yellow); font-weight: 700; }

/* Correct / incorrect / % columns on leaderboard */
.lb-correct   { color: var(--green);      font-weight: 700; }
.lb-incorrect { color: var(--red);        font-weight: 700; }
.lb-pct       { color: var(--text);       font-weight: 700; }

/* Pred Δ column on leaderboard */
.pred-delta-cell { color: var(--yellow); font-weight: 700; }
.pred-delta-cell.muted { color: var(--text-muted); font-weight: 400; }

/* ── Day confirm button (full-width below games grid) ────────────────────── */
@keyframes confirm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.day-confirm-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid;
  transition: opacity 0.15s;
  text-align: center;
}
.day-confirm-complete {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
  animation: confirm-pulse 1.8s ease-in-out infinite;
}
.day-confirm-partial {
  background: var(--yellow-dim);
  border-color: var(--yellow);
  color: var(--yellow);
}
.day-confirm-btn:hover { opacity: 0.8; animation: none; }

/* ── Score prediction modal ──────────────────────────────────────────────── */
.score-pred-modal-body {
  padding: 18px 18px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-pred-modal-matchup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex-wrap: wrap;
  text-align: center;
}

.score-pred-modal-vs {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.score-pred-modal-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.score-pred-modal-ou {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.score-pred-modal-input {
  width: 100%;
  padding: 12px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}
.score-pred-modal-input:focus { outline: none; border-color: var(--accent); }

.score-pred-modal-error {
  font-size: 0.78rem;
  color: var(--red);
  text-align: center;
}

/* Day confirm / warning modal content */
.dcm-date {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text);
}
.dcm-rows { display: flex; flex-direction: column; gap: 6px; }
.dcm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.dcm-row-missing { background: var(--red-dim); }
.dcm-matchup { flex: 1; color: var(--text-muted); }
.dcm-matchup strong { color: var(--text); }
.dcm-arrow { color: var(--text-muted); }
.dcm-pick { color: var(--green); font-weight: 700; }
.dcm-vs { color: var(--text-muted); font-size: 0.8rem; }
.dcm-warn-icon { color: var(--red); font-weight: 700; width: 16px; text-align: center; }
.dcm-warning-header { color: var(--yellow) !important; }
.dcm-warning-msg {
  background: var(--yellow-dim);
  color: var(--yellow);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.88rem;
  margin-bottom: 10px;
}
.dcm-missing-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.dcm-got-it { background: var(--yellow-dim) !important; color: var(--yellow) !important; }

/* ── Admin confirm modal ─────────────────────────────────────────────────── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.admin-modal {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  width: min(420px, 92vw);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.admin-modal-header {
  background: #1a0a00;
  border-bottom: 2px solid var(--accent);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}
.admin-modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  gap: 8px;
}
.admin-modal-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}
.admin-modal-change {
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-modal-from { color: var(--text-muted); text-decoration: line-through; }
.admin-modal-to   { color: var(--green); }
.admin-modal-warning {
  background: var(--red-dim);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
}
.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.admin-modal-cancel {
  padding: 8px 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.admin-modal-confirm {
  padding: 8px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.15s;
}
.admin-modal-confirm:hover { opacity: 0.85; }

/* ── Admin toolbar ───────────────────────────────────────────────────────── */
.admin-toolbar {
  background: #1a0a00;
  border-bottom: 2px solid var(--accent);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 53px;
  z-index: 98;
}
.admin-toggle-btn {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-dim);
  background: var(--surface2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-toggle-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-owners-btn {
  margin-left: auto;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.admin-owners-btn:hover { border-color: var(--text-muted); color: var(--text); }
.admin-new-season-btn {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--red-dim);
  background: transparent;
  color: var(--red);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-new-season-btn:hover { background: var(--red-dim); color: var(--text); }
.admin-modal-danger { background: var(--red) !important; }
.admin-modal-danger:hover:not(:disabled) { opacity: 0.85; }
.new-season-warning {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--red-dim);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.83rem;
  padding: 10px 12px;
  margin-top: 0.5rem;
  line-height: 1.5;
}
.admin-label { color: var(--accent); font-size: 0.82rem; font-weight: 600; }

.owners-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.owners-table th, .owners-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.owners-table th { color: var(--text-muted); font-weight: 600; }
.owner-grant-btn, .owner-revoke-btn {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.82rem;
  cursor: pointer;
  font-weight: 600;
}
.owner-grant-btn { background: var(--accent); color: #fff; }
.owner-grant-btn:disabled { opacity: 0.4; cursor: default; }
.owner-revoke-btn { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.admin-toolbar select {
  background: var(--bg);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  padding: 4px 8px;
}
.admin-hint { color: var(--text-muted); font-size: 0.75rem; font-style: italic; }
.admin-pick-actions {
  border: 1px dashed var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.admin-override-tag {
  font-size: 0.7rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-self: center;
}

/* ── Props ───────────────────────────────────────────────────────────────── */
.props-lb-section {
  margin-bottom: 20px;
}
.props-lb-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.props-lb-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.props-lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.props-lb-table th,
.props-lb-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.props-lb-table th { background: var(--surface); color: var(--text-muted); font-weight: 600; }
.props-lb-table td.num { text-align: right; }
.props-lb-table tr.me { background: rgba(249,115,22,0.08); }
.props-lb-table tbody tr:last-child td { border-bottom: none; }
.prop-lb-correct { color: var(--green); font-weight: 700; }

.prop-create-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.prop-create-label {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.prop-create-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 12px;
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  line-height: 1.5;
}
.prop-create-form textarea:focus { outline: none; border-color: var(--accent); }
.prop-create-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.char-count { color: var(--text-muted); font-size: 0.8rem; }
.prop-closes-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.prop-closes-row input[type="datetime-local"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  padding: 5px 8px;
}
.prop-submit-btn {
  margin-left: auto;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.15s;
}
.prop-submit-btn:hover { opacity: 0.85; }

.props-list { display: flex; flex-direction: column; gap: 12px; }
.props-resolved-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 4px;
}

.prop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.prop-card.prop-resolved-yes { border-left-color: var(--green); }
.prop-card.prop-resolved-no  { border-left-color: var(--red);   }
.prop-card.prop-closed       { border-left-color: var(--text-muted); opacity: 0.85; }

.prop-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.prop-meta { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; }

.badge-prop-open        { background: var(--green-dim); color: var(--green);      font-size: 0.72rem; }
.badge-prop-closed      { background: var(--surface2);  color: var(--text-muted); font-size: 0.72rem; }
.badge-prop-yes         { background: var(--green-dim); color: var(--green);      font-size: 0.72rem; }
.badge-prop-no          { background: var(--red-dim);   color: var(--red);        font-size: 0.72rem; }

.prop-question-text {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.prop-my-result { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 10px; }
.prop-my-correct { color: var(--green); }
.prop-my-wrong   { color: var(--red);   }

.prop-answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.prop-vote-summary {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.prop-vote-summary.muted { font-style: italic; }

.prop-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}
.prop-btn-yes:hover:not(:disabled)               { border-color: var(--green); background: var(--green-dim); }
.prop-btn-yes.prop-btn-active                    { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.prop-btn-no:hover:not(:disabled)                { border-color: var(--red);   background: var(--red-dim);   }
.prop-btn-no.prop-btn-active                     { border-color: var(--red);   background: var(--red-dim);   color: var(--red);   }
.prop-btn.prop-btn-locked, .prop-btn:disabled    { opacity: 0.45; cursor: not-allowed; }

.prop-resolve-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.prop-resolve-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.prop-resolve-btn {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.prop-resolve-yes:hover { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.prop-resolve-no:hover  { border-color: var(--red);   background: var(--red-dim);   color: var(--red);   }

/* ── Survivor Pool ───────────────────────────────────────────────────────── */
.surv-status {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.95rem;
}
.surv-status-alive { background: var(--green-dim); color: var(--green); }
.surv-status-out   { background: var(--red-dim);   color: var(--red);   }

.surv-today {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.surv-today-label {
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.surv-lock-time {
  color: var(--text-muted);
  font-weight: normal;
  font-size: 0.85rem;
}

.surv-teams-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.surv-team-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s;
}
.surv-team-btn:hover { border-color: var(--accent); background: var(--accent-dim); }

.surv-seed {
  background: var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.72rem;
  font-weight: 700;
}

.surv-pick-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
}
.surv-pick-won     { background: var(--green-dim);  color: var(--green);  }
.surv-pick-lost    { background: var(--red-dim);    color: var(--red);    }
.surv-pick-live    { background: var(--accent-dim); color: var(--accent); }
.surv-pick-pending { background: var(--surface2);   color: var(--text);   }
.surv-lock-note    { color: var(--text-muted); font-size: 0.8rem; font-weight: normal; }

.surv-locked-msg   { color: var(--text-muted); font-style: italic; }
.surv-no-teams     { color: var(--text-muted); font-style: italic; font-size: 0.9rem; }

.surv-standings-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.surv-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.surv-standings-table th,
.surv-standings-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

.surv-standings-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.surv-name-col   { text-align: left !important; min-width: 90px; }
.surv-status-col { min-width: 60px; }
.surv-streak-col { min-width: 40px; }
.surv-date-col   { min-width: 56px; }

.surv-standings-table tr.me { background: rgba(249, 115, 22, 0.08); }
.surv-standings-table tbody tr:hover { background: var(--surface2); }

.surv-cell-won    { color: var(--green);      font-weight: 700; }
.surv-cell-lost   { color: var(--red);        font-weight: 700; }
.surv-cell-live   { color: var(--accent);     font-weight: 700; }
.surv-cell-alive  { color: var(--green);      font-weight: 700; font-size: 1rem; }
.surv-cell-out    { color: var(--red);        font-weight: 700; font-size: 1rem; }
.surv-cell-hidden { color: var(--text-muted); }
.surv-cell-empty  { color: var(--border);     }

/* ── User display (prod mode) ────────────────────────────────────────────── */
.user-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

#user-display-name {
  font-weight: 600;
  color: var(--accent);
}

.edit-name-btn {
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
  line-height: 1;
}
.edit-name-btn:hover { opacity: 1; }

.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.logout-btn:hover { border-color: var(--text-muted); color: var(--text); }

/* ── Winner modal ────────────────────────────────────────────────────────── */
.winner-modal {
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.25);
}
.winner-trophy  { font-size: 3.5rem; margin-bottom: 0.5rem; }
.winner-title   { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em;
                  color: var(--accent); font-weight: 700; margin-bottom: 0.75rem; }
.winner-name    { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: 0.4rem; }
.winner-score   { font-size: 1rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.winner-you     { font-size: 1.1rem; color: var(--green); font-weight: 700; margin-bottom: 0.25rem; }

/* ── Auth overlay ────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.auth-logo .header-icon { font-size: 1.6rem; }

.auth-logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 0;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}
.auth-tab:hover:not(.active) { color: var(--text); }

.auth-field {
  margin-bottom: 0.9rem;
}
.auth-field label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.auth-field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.auth-field input:focus { border-color: var(--accent); }

.auth-submit-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity 0.15s;
}
.auth-submit-btn:hover:not(:disabled) { opacity: 0.88; }
.auth-submit-btn:disabled { opacity: 0.5; cursor: default; }

.auth-link-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.83rem;
  cursor: pointer;
  padding: 10px 0 2px;
  text-align: center;
  transition: color 0.15s;
}
.auth-link-btn:hover { color: var(--text); }

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid var(--red-dim);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.auth-msg {
  font-size: 0.85rem;
  padding: 8px 0;
  border-radius: var(--radius-sm);
}

.auth-success {
  color: var(--green);
  font-size: 0.88rem;
  padding: 8px 0 4px;
}

.auth-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.auth-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .header-title { font-size: 1rem; }
  .games-grid { grid-template-columns: 1fr; }
  .team-score { font-size: 1.2rem; }
  .auth-box { padding: 1.5rem 1.25rem 1.25rem; }
}
