/* =========================================================
   NFL Week 1 Pick'em — Styles
   Mobile-first, dark, NFL-inspired.
   ========================================================= */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #090c11;
  --bg-gradient: radial-gradient(120% 100% at 50% -10%, #142234 0%, #090c11 55%);
  --bg-elevated: #11161f;
  --bg-card: #161c27;
  --bg-card-hover: #1b2230;
  --border: #262f3f;
  --border-strong: #37435a;

  /* Text */
  --text-primary: #f5f7fa;
  --text-secondary: #9aa7ba;
  --text-tertiary: #6b7688;

  /* Brand accents */
  --accent: #22e08a;         /* field green — selected state */
  --accent-ink: #052012;     /* dark text on top of accent */
  --accent-soft: rgba(34, 224, 138, 0.14);
  --gold: #ffb020;           /* locked-in / emphasis */
  --danger: #ff5c5c;
  --focus-ring: #6fb7ff;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(34, 224, 138, 0.5), 0 8px 20px rgba(34, 224, 138, 0.18);

  /* Layout */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --max-width: 640px;
  --progress-bar-height: 122px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  background: var(--bg-gradient), var(--bg);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, li, fieldset, legend, pre {
  margin: 0;
  padding: 0;
}

fieldset {
  border: none;
  min-width: 0;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

input {
  font: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- App shell ---------- */
.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.1rem calc(var(--progress-bar-height) + 2rem);
  min-height: 100vh;
  min-height: 100dvh;
}

.app-header {
  padding-bottom: 1.25rem;
  animation: fade-in-down 0.5s ease both;
}

.app-header__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.app-header__title {
  font-size: clamp(2.2rem, 8vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.15rem;
}

.app-header__title-accent {
  color: var(--accent);
}

.app-header__subtitle {
  color: var(--text-secondary);
  margin-top: 0.35rem;
  font-size: 0.98rem;
  max-width: 32ch;
}

.app-footer {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  padding: 2rem 0 1rem;
}

/* ---------- Screens ---------- */
.screen {
  animation: fade-in-up 0.45s ease both;
}

.screen[hidden] {
  display: none !important;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Panel (name screen / summary screen) ---------- */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.4rem;
  box-shadow: var(--shadow-md);
}

.panel--centered {
  margin-top: 1rem;
}

.panel__kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.panel__heading {
  font-size: clamp(1.4rem, 6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.panel__body {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ---------- Player picker (choose-your-name screen) ---------- */
.player-picker {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.player-picker__empty {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  font-style: italic;
}

.player-option {
  appearance: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  min-height: 3.4rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.player-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.player-option:active {
  transform: scale(0.98);
}

.player-option__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  min-width: 2.4rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 1rem;
}

#show-new-name-btn {
  display: block;
  margin: 1rem auto 0;
  text-align: center;
}

/* ---------- Name form ---------- */
.name-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-input {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  font-size: 1.05rem;
  min-height: 3.1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-input::placeholder {
  color: var(--text-tertiary);
}

.field-error {
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.3rem;
  min-height: 3.1rem;
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--block {
  width: 100%;
  margin-top: 0.9rem;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px rgba(34, 224, 138, 0.25);
}

.btn--primary:hover {
  background: #3cec9e;
}

.btn--primary:disabled {
  background: var(--bg-card);
  color: var(--text-tertiary);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
}

.btn--ghost:hover {
  background: var(--bg-card);
}

.btn--danger {
  color: var(--danger);
  border-color: rgba(255, 92, 92, 0.4);
}

.btn--danger:hover {
  background: rgba(255, 92, 92, 0.08);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0.25rem 0;
}

.link-btn:hover {
  color: var(--text-primary);
}

/* ---------- Picks screen header ---------- */
.picks-header {
  padding: 0.25rem 0 1.1rem;
}

.picks-header__greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.picks-header__hello {
  font-weight: 700;
  font-size: 1.05rem;
}

.picks-header__title {
  margin-top: 0.4rem;
  font-size: clamp(1.3rem, 5.5vw, 1.6rem);
  font-weight: 800;
  color: var(--text-secondary);
}

/* ---------- Games list ---------- */
.games-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.games-list > li {
  animation: fade-in-up 0.4s ease both;
}

/* Stagger card entrance a bit */
.games-list > li:nth-child(1) { animation-delay: 0.02s; }
.games-list > li:nth-child(2) { animation-delay: 0.04s; }
.games-list > li:nth-child(3) { animation-delay: 0.06s; }
.games-list > li:nth-child(4) { animation-delay: 0.08s; }
.games-list > li:nth-child(5) { animation-delay: 0.10s; }
.games-list > li:nth-child(6) { animation-delay: 0.12s; }
.games-list > li:nth-child(7) { animation-delay: 0.14s; }
.games-list > li:nth-child(8) { animation-delay: 0.16s; }
.games-list > li:nth-child(9) { animation-delay: 0.18s; }
.games-list > li:nth-child(10) { animation-delay: 0.20s; }
.games-list > li:nth-child(11) { animation-delay: 0.22s; }
.games-list > li:nth-child(12) { animation-delay: 0.24s; }
.games-list > li:nth-child(13) { animation-delay: 0.26s; }
.games-list > li:nth-child(14) { animation-delay: 0.28s; }

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.game-card:has(.team-option__input:checked) {
  border-color: var(--border-strong);
}

.game-card__legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  width: 100%;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border);
}

.game-card__matchup {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.game-card__at {
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 0.85rem;
}

.game-card__spread {
  margin-left: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.game-card__kickoff {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.game-card__teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

/* ---------- Team option (radio button, styled as big tappable card) ---------- */
.team-option {
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.team-option__input {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.team-option__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-align: center;
  min-height: 5.25rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.team-option:hover .team-option__content {
  background: var(--bg-card-hover);
  border-color: var(--text-tertiary);
}

.team-option:active .team-option__content {
  transform: scale(0.97);
}

.team-option__input:focus-visible ~ .team-option__content {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.team-option__tag {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary);
}

.team-option__name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}

.team-option__city {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.team-option__status {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.team-option__check {
  line-height: 1;
}

/* Checked state — not relying on color alone: border weight, background,
   a "Selected" pill with checkmark, and bold text all change together. */
.team-option__input:checked ~ .team-option__content {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.team-option__input:checked ~ .team-option__content .team-option__status {
  display: inline-flex;
}

.team-option__input:checked ~ .team-option__content .team-option__name {
  color: var(--text-primary);
}

/* Locked state (kickoff has passed) — dimmed + not-allowed cursor, but the
   checked/selected styling above still applies so a locked-in pick stays
   visible, just not editable. */
.team-option__input:disabled ~ .team-option__content {
  cursor: not-allowed;
  opacity: 0.65;
}

.team-option--locked {
  cursor: not-allowed;
}

.game-card--locked {
  border-color: var(--border);
}

.game-card__lock-badge {
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Sticky progress / CTA bar ---------- */
.progress-region {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(9, 12, 17, 0) 0%, var(--bg-elevated) 22%);
  padding-top: 1.5rem;
}

.progress-region[hidden] {
  display: none !important;
}

.progress-region__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 0.85rem 1.1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-card);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-track__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #59f0ae);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-region__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 0.65rem;
}

.progress-region__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

#save-status {
  margin: 0.3rem 0 0;
  min-height: 1.1rem;
}

.progress-region__actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.btn--save {
  flex: 2;
}

.btn--generate {
  flex: 1;
  max-width: 10rem;
}

/* ---------- Summary screen ---------- */
.summary-output {
  margin-top: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
  max-height: 55vh;
  overflow-y: auto;
}

.summary-actions {
  margin-top: 1.25rem;
}

.copy-confirm {
  text-align: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  min-height: 1.3rem;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copy-confirm.is-visible {
  opacity: 1;
}

.summary-secondary-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.summary-secondary-actions .btn {
  flex: 1;
}

/* ---------- Small screens fine-tuning ---------- */
@media (max-width: 360px) {
  .team-option__content {
    min-height: 4.6rem;
  }
}

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .app-shell {
    padding-top: 2.5rem;
  }

  .game-card {
    padding: 1.25rem 1.25rem 1.4rem;
  }

  .team-option__content {
    min-height: 6rem;
  }
}

/* =========================================================
   Shared: nav, misc utilities
   ========================================================= */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-shell--no-sticky-bar {
  padding-bottom: 2rem;
}

.top-nav {
  margin-top: 0.9rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-nav__link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border: 1.5px solid var(--border-strong);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.top-nav__link:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}

.site-footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.site-footer-nav a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-nav a:hover,
.site-footer-nav a[aria-current="page"] {
  color: var(--accent);
}

.panel__heading--sm {
  font-size: 1.15rem;
}

.panel--warning {
  border-color: rgba(255, 176, 32, 0.4);
  background: rgba(255, 176, 32, 0.08);
}

.panel + .panel {
  margin-top: 1rem;
}

.section-heading {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 1.5rem 0 0.75rem;
}

.section-heading--spaced {
  margin-top: 2rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.field-hint--warn {
  color: var(--gold);
}

.field-textarea {
  min-height: 8rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.7rem;
}

.inline-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.inline-actions .btn {
  flex: 1;
  min-width: 8rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  vertical-align: middle;
}

.help-details {
  margin: 1rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
}

.help-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

.help-steps {
  margin: 0.75rem 0 0.25rem 1.1rem;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

.help-steps code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-size: 0.82em;
}

/* =========================================================
   Scoreboard
   ========================================================= */

.week-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 1rem;
  padding-bottom: 0.25rem;
}

.week-tab {
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.week-tab:hover {
  border-color: var(--accent);
}

.week-tab.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text-primary);
}

.week-tab__badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-top: 1rem;
  padding: 0.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.view-tab {
  appearance: none;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.view-tab.is-active {
  background: var(--accent-soft);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.section-note {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0.5rem 0 0.75rem;
}

.leaderboard-item__sub {
  display: block;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.week-grid-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.week-grid {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}

.week-grid th,
.week-grid td {
  padding: 0.6rem 0.7rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.week-grid tbody tr:last-child td,
.week-grid tbody tr:last-child th {
  border-bottom: 0;
}

.week-grid thead th {
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elevated);
}

.week-grid th:first-child {
  position: sticky;
  left: 0;
  text-align: left;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}

.week-grid__win {
  color: var(--gold);
  font-weight: 800;
}

.week-grid__empty {
  color: var(--text-tertiary);
}

.status-banner {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-top: 1rem;
}

.status-banner__text {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.progress-track--static {
  position: static;
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.leaderboard-item__rank {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-radius: 999px;
  min-width: 2.4rem;
  text-align: center;
  padding: 0.3rem 0.4rem;
}

.leaderboard-item__name {
  font-weight: 700;
  font-size: 1rem;
}

.leaderboard-item__score {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.leaderboard-item__score strong {
  font-size: 1.2rem;
  color: var(--accent);
}

.leaderboard-item__score-of {
  color: var(--text-secondary);
}

.leaderboard-item__score-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.game-breakdown {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.game-breakdown__summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 2.25rem 0.9rem 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 0.92rem;
}

.game-breakdown__summary::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  transition: transform 0.15s ease;
}

.game-breakdown[open] .game-breakdown__summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.game-breakdown__summary::-webkit-details-marker {
  display: none;
}

.game-breakdown__summary::marker {
  content: "";
}

.game-breakdown__result-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.game-breakdown__result-badge.is-decided {
  background: var(--accent-soft);
  color: var(--accent);
}

.game-breakdown__result-badge.is-pending {
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  border: 1px solid var(--border-strong);
}

.pick-list {
  list-style: none;
  margin: 0;
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pick-list__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.pick-list__name {
  font-weight: 600;
}

.pick-list__pick {
  color: var(--text-secondary);
  text-align: right;
}

.pick-list__mark {
  font-weight: 800;
}

.pick-list__status-text {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pick-list__item--correct {
  border-color: rgba(34, 224, 138, 0.4);
}
.pick-list__item--correct .pick-list__mark,
.pick-list__item--correct .pick-list__status-text {
  color: var(--accent);
}

.pick-list__item--incorrect {
  border-color: rgba(255, 92, 92, 0.35);
}
.pick-list__item--incorrect .pick-list__mark,
.pick-list__item--incorrect .pick-list__status-text {
  color: var(--danger);
}

.pick-list__item--pending {
  opacity: 0.7;
}
.pick-list__item--pending .pick-list__status-text {
  color: var(--text-tertiary);
}

/* A pick that's been made but is withheld until its game locks at kickoff
   — keeps friends from seeing (and copying) each other's picks early. */
.pick-list__item--hidden {
  opacity: 0.7;
  border-style: dashed;
}
.pick-list__item--hidden .pick-list__status-text {
  color: var(--text-tertiary);
}
.pick-list__lock-icon {
  font-size: 0.8em;
}

/* =========================================================
   Admin / Commissioner
   ========================================================= */

.parsed-preview {
  margin-top: 1rem;
}

.parsed-preview__heading {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.parsed-preview__list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.parsed-preview__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.staged-picks-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.staged-picks-list__empty {
  color: var(--text-tertiary);
  font-size: 0.88rem;
  font-style: italic;
}

.staged-picks-list__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
}

.staged-picks-list__name {
  font-weight: 700;
}

.staged-picks-list__count {
  color: var(--text-secondary);
  font-size: 0.82rem;
  white-space: nowrap;
}

.staged-picks-list__remove {
  color: var(--danger);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.result-card__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.result-option {
  appearance: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  min-height: 3.6rem;
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.result-option:hover {
  background: var(--bg-card-hover);
}

.result-option:active {
  transform: scale(0.97);
}

.result-option.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.result-option__hint {
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.result-card > .link-btn {
  margin-top: 0.6rem;
}

.panel--publish {
  border-color: rgba(34, 224, 138, 0.35);
}

.publish-status {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 1.3rem;
}

.publish-status--loading {
  color: var(--text-secondary);
}

.publish-status--success {
  color: var(--accent);
}

.publish-status--error {
  color: var(--danger);
}
