/* ─── Variables & Reset ──────────────────────────────────── */

:root {
  --color-start-end: #1a1a1a;
  --color-correct: #16a34a;
  --color-clue: #bf3294;
  --color-guess: #1e3a8a;
  --color-wrong: #ea0c0c;
  --color-border: #e5e7eb;
  --color-bg: #f9fafb;
  --color-card: #ffffff;
  --color-text: #111827;
  --color-muted: #6b7280;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --cell-gap: 40px;
  --cell-border: 12px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: monospace;
  background-color: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

/* ─── Flash Messages ─────────────────────────────────────── */

.flash {
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  font-family: monospace;
}
.flash-notice {
  background: #d1fae5;
  color: #065f46;
}
.flash-alert {
  background: #fee2e2;
  color: #991b1b;
}
/* ─── Shared Layout & Header ─────────────────────────────── */

.grundl-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.grundl-header {
  text-align: center;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.grundl-logo {
  font-family: 'Silkscreen', monospace;
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.logo-black {
  color: var(--color-text);
}

.logo-green {
  color: var(--color-correct);
}

.grundl-tagline {
  font-size: 14px;
  color: var(--color-muted);
  margin: 6px 0 0;
}

.how-to-play-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--color-muted);
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  padding: 4px;
  margin-top: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.how-to-play-btn:hover {
  color: var(--color-text);
}

@media (max-width: 620px) {
  .grundl-logo {
    font-size: 2.2rem;
  }
}
/* ─── User Nav ───────────────────────────────────────────── */

.user-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-family: monospace;
  color: #888;
  position: relative;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.nav-greeting {
  font-size: 13px;
  font-family: monospace;
  color: #555;
  white-space: nowrap;
}

.nav-streak {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 16px;
  vertical-align: middle;
}

.nav-streak-fire {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% - 1px), calc(-50% - 2px));
  font-size: 30px;
  line-height: 1;
}

.nav-streak-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -38%);
  font-family: 'Silkscreen', monospace;
  font-size: 12px;
  font-weight: 400;
  color: #000;
  line-height: 1;
}

.nav-signin-btn {
  display: inline-block;
  padding: 6px 14px;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-family: monospace;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-signin-btn:hover {
  background: #15803d;
}

/* ─── Sport Mini Cards ───────────────────────────────────── */

.sport-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-card);
  transition: border-color 0.15s, transform 0.1s;
}

.sport-mini-card:hover {
  transform: translateY(-1px);
}

.sport-mini-nfl { color: #16a34a; }
.sport-mini-nba { color: #f97316; }
.sport-mini-stats { color: #1d4ed8; }


.sport-mini-archive { color: #bf3294; }
.sport-mini-nfl:hover { border-color: #16a34a; }
.sport-mini-nba:hover { border-color: #f97316; }
.sport-mini-leaderboard:hover { border-color: #d2c104; }
.sport-mini-stats:hover { border-color: #1d4ed8; }
.sport-mini-archive:hover { border-color: #bf3294; }
.sport-mini-nfl.sport-mini-active { border-color: #16a34a; }
.sport-mini-nba.sport-mini-active { border-color: #f97316; }
.sport-mini-stats.sport-mini-active { border-color: #1d4ed8; }
.sport-mini-archive.sport-mini-active { border-color: #bf3294; }

.sport-mini-archive-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

@media (min-width: 501px) {
  .sport-mini-archive-icon {
    width: 1.65rem;
    height: 1.65rem;
  }
}

.sport-mini-ranks {
  display: flex;
  gap: 2px;
  font-family: 'Silkscreen', monospace;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.rank-gold   { color: #d2c104; }
.rank-silver { color: #9ca3af; }
.rank-bronze { color: #b45309; }

@media (min-width: 501px) {
  .sport-mini-ranks { font-size: 0.825rem; }
}

.sport-mini-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.sport-mini-name {
  font-family: 'Silkscreen', monospace;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media (max-width: 799px) {
  .user-nav {
    justify-content: space-between;
  }
  .nav-right {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
  }
}

@media (max-width: 400px) {
  .nav-greeting {
    display: none;
  }
}

@media (max-width: 500px) {
  .sport-mini-name,
  .sport-mini-ranks {
    display: none;
  }
  .sport-mini-icon {
    font-size: 1.5rem;
  }
  .sport-mini-archive-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  .sport-mini-card {
    padding: 6px 8px;
  }
}

@media (min-width: 501px) {
  .sport-mini-card {
    gap: 3px;
    padding: 8px 15px;
    border-radius: 10px;
  }
  .sport-mini-stats {
    padding-left: 10px;
    padding-right: 10px;
  }
  .sport-mini-icon {
    font-size: 1.65rem;
  }
  .sport-mini-name {
    font-size: 0.825rem;
  }
  .nav-hamburger {
    gap: 8px;
    padding: 9px;
  }
  .nav-hamburger span {
    width: 33px;
    height: 3px;
  }
  .nav-right.open .nav-hamburger span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }
  .nav-right.open .nav-hamburger span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }
}

/* ─── Hamburger ──────────────────────────────────────────── */

.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #555;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-links {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 200;
}

.nav-links .nav-email {
  display: block;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
  color: #888;
  width: 100%;
}

.nav-links a {
  display: block;
  padding: 10px 16px;
  width: 100%;
  color: #555;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

.nav-right.open .nav-links {
  display: flex;
}

.nav-right.open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-right.open .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-right.open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
/* ─── Homepage & Shared Sport Selector ───────────────────── */

.home-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  text-align: center;
}

.sport-selector {
  margin-top: 32px;
}

.sport-selector-prompt {
  font-family: 'Silkscreen', monospace;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 20px;
  text-transform: lowercase;
}

.sport-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.sport-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, transform 0.1s;
  flex: 1;
  max-width: 180px;
}

.sport-card:hover {
  transform: translateY(-2px);
}

.sport-card-nfl:hover { border-color: #16a34a; }
.sport-card-nba:hover { border-color: #f97316; }

.sport-card-icon {
  font-size: 2.5rem;
}

.sport-card-name {
  font-family: 'Silkscreen', monospace;
  font-size: 1.2rem;
  font-weight: 700;
}

.sport-card-desc {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-align: center;
  line-height: 1.4;
}

/* Sport card as button */
button.sport-card {
  cursor: pointer;
  font: inherit;
  border: 2px solid var(--color-border);
}

/* ─── Difficulty Picker Modal ──────────────────────────────── */

.difficulty-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.difficulty-modal {
  background: var(--color-card);
  border-radius: 16px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 360px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.difficulty-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--color-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}

.difficulty-modal-close:hover {
  color: var(--color-text);
}

.difficulty-modal-sport {
  font-family: 'Silkscreen', monospace;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.difficulty-modal-title {
  font-family: 'Silkscreen', monospace;
  font-size: 1rem;
  margin: 0 0 20px;
  color: var(--color-text);
}

.difficulty-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.difficulty-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, transform 0.1s;
}

.difficulty-option:hover {
  transform: translateX(2px);
}

.diff-name {
  font-family: 'Silkscreen', monospace;
  font-size: 0.85rem;
  text-transform: lowercase;
}

.diff-desc {
  font-size: 0.7rem;
  color: var(--color-muted);
  text-align: right;
  max-width: 60%;
  line-height: 1.3;
}

.diff-easy    { border-color: #16a34a; }
.diff-easy:hover { border-color: #16a34a; background: rgba(22, 163, 74, 0.04); }

.diff-medium  { border-color: #2563eb; }
.diff-medium:hover { border-color: #2563eb; background: rgba(37, 99, 235, 0.04); }

.diff-hard    { border-color: #d97706; }
.diff-hard:hover { border-color: #d97706; background: rgba(217, 119, 6, 0.04); }

.diff-painful { border-color: #dc2626; }
.diff-painful:hover { border-color: #dc2626; background: rgba(220, 38, 38, 0.04); }
/* ─── Difficulty Bar ─────────────────────────────────────── */

.difficulty-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.difficulty-tab {
  font-family: 'Silkscreen', monospace;
  font-size: 0.65rem;
  text-transform: lowercase;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  color: var(--color-muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.difficulty-tab:hover {
  color: var(--color-text);
  border-color: #9ca3af;
}

.difficulty-tab-active {
  color: var(--color-text);
  border-color: var(--color-text);
  font-weight: 700;
}

/* ─── Game Info Bar / Scoreboard ─────────────────────────── */

:root {
  --scoreboard-accent: var(--color-correct);
}

.game-nba {
  --scoreboard-accent: #f97316;
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
  background: var(--color-card);
  border-radius: 10px;
  border: 2px solid var(--scoreboard-accent);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.scoreboard-stats {
  display: flex;
  justify-content: stretch;
}

.info-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 12px 8px;
  position: relative;
  gap: 4px;
}

.info-item + .info-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 1px;
  background: var(--color-border);
}

.info-item .label {
  display: block;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-muted);
  font-weight: 600;
  font-family: monospace;
  order: 2;
}

.info-item .value {
  font-family: 'Silkscreen', monospace;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  order: 1;
}

.value-time {
  color: var(--color-text);
}

.value-guesses {
  color: var(--color-correct);
}

.value-strikes {
  color: var(--color-wrong);
}

/* ─── Scoreboard Clues Section ────────────────────────────── */

.scoreboard-clues {
  border-top: 1px solid var(--color-border);
}

.scoreboard-clues .clues-panel {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 12px;
  margin: 0;
}

.scoreboard-clues .clue-button {
  background: white;
  border: 2px solid var(--color-clue);
  color: var(--color-clue);
  font-weight: 700;
  font-family: 'Silkscreen', monospace;
}

.scoreboard-clues .clue-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-clue) 8%, white);
  border-color: var(--color-clue);
}

.scoreboard-clues .clue-button--revealed {
  background: var(--color-clue);
  color: white;
  border-color: var(--color-clue);
}

.scoreboard-clues .clue-button--disabled {
  background: white;
  border-color: #d1d5db;
  color: #9ca3af;
  opacity: 0.6;
}

/* ─── Chain Grid ─────────────────────────────────────────── */

.chain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--cell-gap);
  position: relative;
  margin-bottom: 20px;
}

/* Base cell */
.chain-cell {
  position: relative;
  background: transparent;
  border-radius: 8px;
  border: var(--cell-border) solid transparent;
  padding: 10px 8px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: visible;
  transition: border-color 0.2s;
}

/* Cell type colors */
.cell-start,
.cell-end {
  border-color: var(--color-start-end);
}

.cell-guess {
  border-color: #9ca3af;
  background: rgba(156, 163, 175, 0.04);
  animation: pulseGuess 2.5s ease-in-out infinite;
}

@keyframes pulseGuess {
  0%, 100% { box-shadow: 0 0 10px 2px rgba(22, 163, 74, 0.5), 0 0 24px 4px rgba(22, 163, 74, 0.25); }
  50%       { box-shadow: 0 0 20px 6px rgba(22, 163, 74, 0.75), 0 0 48px 8px rgba(22, 163, 74, 0.35); }
}

.cell-correct {
  border-color: var(--color-correct);
}

.cell-wrong {
  border-color: var(--color-wrong);
}

.cell-failed {
  border-color: var(--color-wrong);
}

/* Cell content */
.cell-type-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.cell-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  word-break: break-word;
  text-transform: uppercase;
}

.cell-meta {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 3px;
  font-weight: 500;
  border-radius: 3px;
  transition: background-color 1s ease-out;
}

@starting-style {
  .cell-meta {
    background-color: color-mix(in srgb, var(--color-clue) 35%, transparent);
  }
}

.cell-x {
  font-size: 28px;
  color: var(--color-wrong);
  font-weight: 700;
  line-height: 1;
}

/* G box input */
.guess-form {
  width: 100%;
  position: relative;
}

.guess-cell-input {
  width: 100%;
  border: 3px solid rgba(22, 163, 74, 0.7);
  border-radius: 6px;
  background: white;
  text-align: center;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  padding: 7px 6px;
  outline: none;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.guess-cell-input:focus {
  border-color: var(--color-correct);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.guess-cell-input::placeholder {
  color: #4ade80;
  font-size: 11px;
  font-weight: 400;
}

/* Autocomplete dropdown anchored to guess cell */
.chain-cell .autocomplete-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
}

.chain-cell .autocomplete-results:empty {
  display: none;
}

/* ─── Connectors (::after pseudo-element) ────────────────── */

.chain-cell::after {
  content: none;
}

.chain-cell.connects-right::after,
.chain-cell.connects-left::after,
.chain-cell.connects-down::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 2;
  border-radius: 2px;
}

.chain-cell.connects-right::after {
  top: 50%;
  left: calc(100% + var(--cell-border));
  width: var(--cell-gap);
  height: 3px;
  transform: translateY(-50%);
}

.chain-cell.connects-left::after {
  top: 50%;
  right: calc(100% + var(--cell-border));
  width: var(--cell-gap);
  height: 3px;
  transform: translateY(-50%);
}

.chain-cell.connects-down::after {
  top: calc(100% + var(--cell-border));
  left: 50%;
  width: 3px;
  height: var(--cell-gap);
  transform: translateX(-50%);
}

.chain-cell.link-established::after {
  background: var(--color-correct);
}

.chain-cell.link-pending::after {
  background: #d1d5db;
}

/* ─── Connector Team Logo ────────────────────────────────── */

.link-logo {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

.chain-cell.connects-right .link-logo {
  top: 50%;
  left: calc(100% + var(--cell-border));
  width: var(--cell-gap);
  transform: translateY(-50%);
}

.chain-cell.connects-left .link-logo {
  top: 50%;
  right: calc(100% + var(--cell-border));
  width: var(--cell-gap);
  transform: translateY(-50%);
}

.chain-cell.connects-down .link-logo {
  top: calc(100% + var(--cell-border));
  left: 50%;
  height: var(--cell-gap);
  transform: translateX(-50%);
}

.connector-logo-img {
  width: 34px;
  height: 34px;
  padding: 2px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
  box-sizing: border-box;
  border: 2.5px solid transparent;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* ─── Clues Panel ────────────────────────────────────────── */

.clues-panel {
  margin: 12px 0;
  background: var(--color-card);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.clue-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.clue-button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.clue-button-wrapper form {
  width: 100%;
}

.clue-button {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clue-button:hover:not(:disabled) {
  background: var(--color-card);
  border-color: var(--color-clue);
}

.clue-button:disabled,
.clue-button--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.clue-button--revealed,
.clue-button--revealed:disabled {
  background: var(--color-clue);
  color: white;
  border-color: var(--color-clue);
  opacity: 1;
  cursor: default;
}

.clue-cost {
  font-size: 10px;
  color: var(--color-wrong);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.clue-revealed-label {
  font-size: 11px;
  color: var(--color-clue);
  font-weight: 600;
  text-align: center;
}

.cell-meta-line {
  display: block;
}

.cell-meta-history-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 5px;
}

.team-history-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 4px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.team-pill-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-pill-years {
  color: #000;
  letter-spacing: 0.01em;
}

.clues-data {
  margin-bottom: 12px;
}

.clues-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.clues-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 600;
  padding: 4px 8px 4px 0;
  border-bottom: 1px solid var(--color-border);
}

.clues-table td {
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

.clues-table tr:last-child td {
  border-bottom: none;
}

.clue-player-name {
  font-weight: 600;
}

.clue-team-history {
  font-size: 11px;
  color: var(--color-muted);
}

/* ─── Wrong Guesses Panel ────────────────────────────────── */

.wrong-guesses-section {
  margin-top: 8px;
}

.wrong-guesses-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.wrong-guesses-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wrong-guess-row {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-wrong);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 52px;
  background: transparent;
}

.wrong-guess-side {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wrong-guess-from {
  text-align: left;
  align-items: flex-start;
}

.wrong-guess-to {
  text-align: right;
  align-items: flex-end;
}

.wrong-guess-x {
  flex: 0 0 auto;
  font-size: 22px;
  color: var(--color-wrong);
  font-weight: 700;
  padding: 0 16px;
  line-height: 1;
}

.wrong-guess-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

.wrong-guess-meta {
  font-size: 10px;
  color: var(--color-muted);
  margin-top: 2px;
}

/* ─── Game Over Modal ─────────────────────────────────────── */

.game-over-panel {
  background: var(--color-card);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-top: 24px;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-over-panel h2 {
  font-family: 'Silkscreen', monospace;
  font-size: 3rem;
  margin: 0 0 16px;
}

.game-over-panel.completed h2 {
  color: var(--color-correct);
}

.game-over-panel h2 .logo-black { color: var(--color-text); }
.game-over-panel h2 .logo-green { color: var(--color-correct); }

.game-over-panel.failed h2 {
  color: var(--color-wrong);
}

.game-over-panel p {
  color: var(--color-muted);
  margin: 0 0 8px;
  font-size: 15px;
}

.game-over-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 8px;
}

.game-over-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  padding: 12px 8px;
  flex: 1;
  height: 86px;
}

.game-over-stat .stat-value {
  font-size: 40px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.stat-denom {
  font-size: 10px;
  font-weight: 400;
  color: var(--color-muted);
  margin-left: 1px;
}

.game-over-stat .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-top: 4px;
}

.scoring-breakdown {
  margin: 16px auto;
  width: fit-content;
  min-width: 160px;
}

.scoring-breakdown-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}

.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.breakdown-label {
  color: var(--color-muted);
}

.breakdown-value {
  font-weight: 600;
}

.breakdown-value.has-deduction {
  color: var(--color-wrong);
}

.breakdown-value.no-deduction {
  color: var(--color-correct);
}

.game-over-stat .stat-value.score-red     { color: #dc2626; }
.game-over-stat .stat-value.score-orange  { color: #ea0c0c; }
.game-over-stat .stat-value.score-yellow  { color: #ca8a04; }
.game-over-stat .stat-value.score-green   { color: #16a34a; }
.game-over-stat .stat-value.score-fuchsia { color: #bf3294; }

.win-modal-overlay .game-over-panel.score-red     { border: 3px solid #dc2626; }
.win-modal-overlay .game-over-panel.score-orange  { border: 3px solid #ea0c0c; }
.win-modal-overlay .game-over-panel.score-yellow  { border: 3px solid #ca8a04; }
.win-modal-overlay .game-over-panel.score-green   { border: 3px solid #16a34a; }
.win-modal-overlay .game-over-panel.score-fuchsia { border: 3px solid #bf3294; }

.share-button {
  padding: 12px 36px;
  background: var(--color-correct);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: opacity 0.2s;
  font-family: 'Silkscreen', monospace;
}

.share-button:hover {
  opacity: 0.85;
}

/* ─── How to Play Modal ───────────────────────────────────── */

.how-to-play-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.how-to-play-panel {
  background: var(--color-card);
  border-radius: 12px;
  padding: 32px 28px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow);
}

.how-to-play-panel h2 {
  font-family: 'Silkscreen', monospace;
  font-size: 1.4rem;
  color: var(--color-text);
  margin: 0 0 16px;
  text-align: center;
}

.how-to-play-content p {
  font-size: 14px;
  color: var(--color-text);
  margin: 0 0 14px;
  line-height: 1.5;
  text-align: center;
}

.how-to-play-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.how-to-play-content li {
  font-size: 13px;
  color: var(--color-muted);
  padding: 8px 0 8px 20px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  line-height: 1.4;
}

.how-to-play-content li:last-child {
  border-bottom: none;
}

.how-to-play-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-correct);
  font-weight: 700;
}

/* ─── Win Modal ───────────────────────────────────────────── */

.win-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.win-modal-overlay .game-over-panel {
  margin-top: 0;
  max-width: 400px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--color-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-family: inherit;
}

.modal-close:hover {
  color: var(--color-text);
}

/* ─── How to Play Details (pre-game inline) ──────────────── */

.how-to-play-details {
  margin-top: 28px;
  text-align: left;
}

.how-to-play-summary {
  font-size: 12px;
  color: var(--color-muted);
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-align: center;
  list-style: none;
  display: block;
}

.how-to-play-summary::-webkit-details-marker {
  display: none;
}

.how-to-play-summary:hover {
  color: var(--color-text);
}

.how-to-play-details .how-to-play-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border, #e5e7eb);
}

/* ─── Splash (pre-game) ───────────────────────────────────── */

.splash-panel {
  background: var(--color-card);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.splash-text {
  font-size: 17px;
  color: var(--color-text);
  margin: 0 0 10px;
  line-height: 1.5;
}

.splash-warning {
  font-size: 13px;
  color: var(--color-muted);
  margin: 0 0 28px;
}

.play-button {
  padding: 16px 56px;
  background: var(--color-correct);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.02em;
}

.play-button:hover {
  opacity: 0.85;
}

.play-button:active {
  transform: scale(0.97);
}

/* ─── Autocomplete (shared) ──────────────────────────────── */

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
  font-size: 13px;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: #eff6ff;
}

.autocomplete-item .player-name {
  font-weight: 600;
  color: var(--color-text);
}

.autocomplete-item .player-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--color-muted);
}

.autocomplete-item .player-team {
  font-weight: 600;
}

.no-results {
  padding: 12px;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
  font-style: italic;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 620px) {
  :root {
    --cell-gap: 28px;
    --cell-border: 8px;
  }

  .connector-logo-img {
    width: 26px;
    height: 26px;
  }

  .grundl-container {
    padding: 16px 12px 32px;
  }

  .cell-name {
    font-size: 15px;
  }

  .cell-meta {
    font-size: 10px;
  }

  .team-history-pill {
    font-size: 8px;
    padding: 2px 6px 2px 3px;
  }

  .team-pill-logo {
    width: 14px;
    height: 14px;
  }

  .cell-type-label {
    font-size: 9px;
  }

  .guess-cell-input {
    font-size: 16px;
    padding: 5px 4px;
  }

  .guess-cell-input::placeholder {
    font-size: 12px;
  }

  .chain-cell {
    padding: 6px 5px;
  }
}

@media (max-width: 780px) {
  .chain-grid {
    grid-template-columns: 1fr;
  }

  .chain-cell {
    grid-column: 1 !important;
    grid-row: auto !important;
    aspect-ratio: auto;
    min-height: 72px;
  }

  .chain-cell.connects-right::after,
  .chain-cell.connects-left::after {
    top: calc(100% + var(--cell-border));
    left: 50%;
    right: auto;
    width: 3px;
    height: var(--cell-gap);
    transform: translateX(-50%);
  }

  .chain-cell.connects-right .link-logo,
  .chain-cell.connects-left .link-logo {
    top: calc(100% + var(--cell-border));
    left: 50%;
    right: auto;
    width: auto;
    height: var(--cell-gap);
    transform: translateX(-50%);
  }

  .connector-logo-img {
    width: 22px;
    height: 22px;
  }

  .chain-cell .autocomplete-results {
    width: 240px;
  }

  .clue-buttons {
    flex-direction: column;
    gap: 6px;
  }

  .clue-button-wrapper {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .clue-button-wrapper form {
    flex: 1;
  }

  .clue-cost {
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
  }
}

@media (max-width: 400px) {
  .game-over-stat .stat-value {
    font-size: 30px;
  }
}
/* ─── NBA Game Theme (orange) ────────────────────────────── */

.game-nba {
  --color-correct: #f97316;
  --color-clue: #06b6d4;
  --color-wrong: #9ca3af;
}

.game-nba .cell-guess {
  animation: pulseGuessNba 2.5s ease-in-out infinite;
}

@keyframes pulseGuessNba {
  0%, 100% { box-shadow: 0 2px 12px rgba(249, 115, 22, 0.45); }
  50%       { box-shadow: 0 2px 28px rgba(249, 115, 22, 0.75); }
}

.game-nba .guess-cell-input {
  border-color: rgba(249, 115, 22, 0.45);
}

.game-nba .guess-cell-input:focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.game-nba .guess-cell-input::placeholder {
  color: #fb923c;
}

/* ─── Admin Sport Badges ─────────────────────────────────── */

.badge-nfl { background: #1a3a6e; color: #fff; }
.badge-nba { background: #c9243f; color: #fff; }
/* ─── Auth Pages (sign in / sign up) ─────────────────────── */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: var(--color-bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px 36px 32px;
  box-shadow: var(--shadow);
}

.auth-logo {
  display: block;
  text-align: center;
  font-family: 'Silkscreen', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  margin-bottom: 6px;
}

.auth-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
  margin: 0 0 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: var(--color-correct);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.auth-hint {
  font-size: 11px;
  color: var(--color-muted);
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.auth-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--color-correct);
  cursor: pointer;
}

.auth-remember-label {
  font-size: 13px;
  color: var(--color-muted);
  cursor: pointer;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  background: var(--color-correct);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Silkscreen', monospace;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.auth-submit--mono {
  font-family: monospace;
  letter-spacing: 0;
}

.auth-submit:hover {
  background: #15803d;
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
}

.auth-links a {
  color: var(--color-muted);
  text-decoration: none;
}

.auth-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.auth-links-sep {
  color: var(--color-border);
}

.auth-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
}

.auth-error-item {
  font-size: 13px;
  color: #991b1b;
  margin: 0;
}

.auth-error-item + .auth-error-item {
  margin-top: 4px;
}

/* ─── Settings Page ──────────────────────────────────────── */

.auth-notice {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #065f46;
  margin-bottom: 4px;
  text-align: center;
}
/* ─── Leaderboard Page ───────────────────────────────────── */

.leaderboard-page {
  max-width: 600px;
}

.leaderboard-nfl {
  --leaderboard-accent: var(--color-correct);
}

.leaderboard-nba {
  --leaderboard-accent: #f97316;
  --color-correct: #f97316;
}

/* "Not played" state — single wider sport card */
.leaderboard-page .sport-cards {
  justify-content: center;
}

.leaderboard-page .sport-card {
  max-width: 260px;
  padding: 28px 24px;
}

.leaderboard-page .sport-card-name {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Username missing banner */
.leaderboard-username-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #78350f;
  margin-bottom: 20px;
  text-align: center;
}

.leaderboard-username-banner a {
  color: #78350f;
  font-weight: 600;
  text-decoration: underline;
}

/* Empty state */
.leaderboard-empty {
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
  padding: 48px 0;
}

/* Table */
.leaderboard-container {
  background: var(--color-card);
  border-radius: 12px;
  border: 4px solid var(--leaderboard-accent, var(--color-correct));
  overflow: hidden;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.leaderboard-th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 600;
  padding: 12px 12px 12px 0;
  border-bottom: 3px solid var(--leaderboard-accent, var(--color-correct));
  background: var(--color-bg);
  white-space: nowrap;
}

.th-compact { display: none; }
.th-compact-chain { display: none; }
.th-strikes-icon { color: var(--color-wrong); font-weight: 700; }

@media (max-width: 500px) {
  .th-full { display: none; }
  .th-compact { display: inline; font-size: 1rem; }
}

@media (max-width: 400px) {
  .th-full-chain { display: none; }
  .th-compact-chain { display: inline; font-size: 1rem; }
}

.leaderboard-th:first-child,
.leaderboard-td:first-child {
  padding-left: 16px;
}

.leaderboard-th:last-child,
.leaderboard-td:last-child {
  padding-right: 16px;
}

.leaderboard-row {
  border-bottom: 2px solid var(--color-border);
  transition: background 0.1s;
}

.leaderboard-row:last-child {
  border-bottom: none;
}

.leaderboard-row:hover {
  background: var(--color-bg);
}

.leaderboard-row--me {
  background: color-mix(in srgb, var(--leaderboard-accent, var(--color-correct)) 10%, transparent);
}

.leaderboard-row--me:hover {
  background: color-mix(in srgb, var(--leaderboard-accent, var(--color-correct)) 16%, transparent);
}

.leaderboard-td {
  padding: 14px 12px 14px 0;
  color: var(--color-text);
  vertical-align: middle;
  text-align: left;
  font-family: 'Silkscreen', monospace;
  font-size: 12px;
}

.leaderboard-td.leaderboard-username {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
}

.leaderboard-rank-cell {
  font-family: 'Silkscreen', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
  width: 36px;
}

/* Gold / silver / bronze for top 3 */
.leaderboard-row:nth-child(1) .leaderboard-rank-cell { color: #d2c104; }
.leaderboard-row:nth-child(2) .leaderboard-rank-cell { color: #9ca3af; }
.leaderboard-row:nth-child(3) .leaderboard-rank-cell { color: #b45309; }

.leaderboard-score {
  font-family: 'Silkscreen', monospace;
  font-size: 14px;
  font-weight: 700;
}

.leaderboard-score.score-red     { color: #dc2626; }
.leaderboard-score.score-orange  { color: #ea0c0c; }
.leaderboard-score.score-yellow  { color: #ca8a04; }
.leaderboard-score.score-green   { color: #16a34a; }
.leaderboard-score.score-fuchsia { color: #bf3294; }

/* Back link */
.leaderboard-back {
  margin-top: 20px;
  text-align: center;
}

.leaderboard-back-link {
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
}

.leaderboard-back-link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ─── Leaderboard elements in win modal ──────────────────── */

.leaderboard-rank-prompt {
  font-size: 14px;
  color: var(--color-muted);
  margin: 14px 0 4px;
  line-height: 1.4;
}

.leaderboard-rank-prompt strong {
  color: var(--color-correct);
}

.leaderboard-rank-prompt a {
  color: var(--color-correct);
  text-decoration: underline;
}

.win-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 8px 0;
}

.win-modal-buttons-row {
  display: flex;
  gap: 10px;
}

.win-modal-buttons-row .share-button {
  margin-top: 0;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.leaderboard-button {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 36px;
  background: var(--color-clue);
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Silkscreen', monospace;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  cursor: pointer;
}

.leaderboard-button:hover {
  opacity: 0.85;
}

.archives-button {
  width: 100%;
  padding: 12px 36px;
  background: #7c3aed;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Silkscreen', monospace;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  cursor: pointer;
  box-sizing: border-box;
}

.archives-button:hover {
  opacity: 0.85;
}

@media (max-width: 500px) {
  .win-modal-buttons-row .share-button,
  .win-modal-buttons-row .leaderboard-button {
    width: 100%;
    text-align: center;
  }
}
/* ─── Archives / Calendar ────────────────────────────────── */

.archives-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ── Month Navigation ── */

.archives-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.archives-month-title {
  font-family: 'Silkscreen', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.05em;
  margin: 0;
  flex: 1;
  text-align: center;
}

.archives-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-card);
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  user-select: none;
}

.archives-nav-btn:not(.archives-nav-btn-disabled):hover {
  border-color: #bf3294;
  transform: translateY(-1px);
}

.archives-nav-btn-disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* ── Calendar Grid ── */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-header {
  font-family: 'Silkscreen', monospace;
  font-size: 0.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-muted);
  padding: 4px 0 8px;
  letter-spacing: 0.08em;
}

@media (min-width: 501px) {
  .calendar-day-header {
    font-size: 0.65rem;
  }
}

.calendar-day {
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 3px 4px;
  background: var(--color-card);
  min-height: 52px;
  box-sizing: border-box;
}

.calendar-day-empty {
  border-color: transparent;
  background: transparent;
}

.calendar-day-future {
  opacity: 0.35;
}

.calendar-day-today .calendar-day-num {
  color: #16a34a;
}

.calendar-day-has-games {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.calendar-day-has-games:hover {
  border-color: #bf3294;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(191, 50, 148, 0.15);
}

.calendar-day-num {
  font-family: 'Silkscreen', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

@media (min-width: 501px) {
  .calendar-day {
    min-height: 64px;
    padding: 7px 4px 5px;
    border-radius: 10px;
  }
  .calendar-day-num {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }
}

/* ── Game-type indicators inside day cells ── */

.calendar-day-indicators {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.calendar-day-indicator {
  font-family: 'Silkscreen', monospace;
  font-size: 0.38rem;
  font-weight: 700;
  text-align: center;
  padding: 2px 3px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  line-height: 1.3;
  border: 1px solid transparent;
}

@media (min-width: 501px) {
  .calendar-day-indicator {
    font-size: 0.48rem;
    padding: 2px 4px;
  }
}

.cal-nfl {
  background: #dcfce7;
  color: #16a34a;
  border-color: #16a34a;
}

.cal-nba {
  background: #ffedd5;
  color: #f97316;
  border-color: #f97316;
}

.cal-completed {
  opacity: 0.45;
}

/* ── Day Modal ── */

.archives-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.archives-modal {
  background: var(--color-card);
  border-radius: 16px;
  padding: 28px 24px 24px;
  max-width: 360px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  animation: fadeInUp 0.3s ease-out;
}

.archives-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
  padding: 0 4px;
  transition: color 0.1s;
}

.archives-modal-close:hover {
  color: var(--color-text);
}

.archives-modal-date {
  font-family: 'Silkscreen', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 20px;
  letter-spacing: 0.05em;
}

.archives-modal-games {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Archive game links (styled like sport-cards) ── */

.archives-game-card {
  position: relative;
}

.archives-game-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s, transform 0.1s;
}

.archives-game-nfl {
  border-color: #16a34a;
}

.archives-game-nba {
  border-color: #f97316;
}

.archives-game-link:not(.archives-game-link-completed):hover {
  transform: translateY(-2px);
}

.archives-game-nfl:not(.archives-game-link-completed):hover {
  border-color: #15803d;
}

.archives-game-nba:not(.archives-game-link-completed):hover {
  border-color: #ea6c00;
}

.archives-game-link-completed {
  opacity: 0.35;
  pointer-events: none;
}

.archives-game-icon {
  font-size: 2rem;
  line-height: 1;
}

.archives-game-name {
  font-family: 'Silkscreen', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.archives-game-label {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-left: auto;
}

.archives-completed-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Silkscreen', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text);
  background: white;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid var(--color-border);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
/* ─── Stats Page ──────────────────────────────────────────── */

.stats-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.stats-title {
  font-family: 'Silkscreen', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1d4ed8;
  letter-spacing: 0.05em;
  text-align: center;
  margin: 0 0 28px;
}

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

.stat-card {
  background: var(--color-card);
  border: 1.5px solid #1d4ed8;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-card .stat-value {
  font-family: 'Silkscreen', monospace;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}

.stat-card .stat-label {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-empty {
  text-align: center;
  color: var(--color-muted);
  font-family: monospace;
  font-size: 1rem;
  margin-top: 40px;
}
/*
 * Stylesheet manifest — explicit require order ensures correct cascade.
 *











 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
