:root {
  --bg: #0a0806;
  --panel: #161209;
  --panel-alt: #1f190d;
  --border: #3a2f14;
  --text: #f3ecd9;
  --text-dim: #b3a37a;
  --gold: #d4af37;
  --gold-light: #f0cf7a;
  --gold-dark: #8a6c1f;
  --accent: var(--gold);
  --accent-dark: var(--gold-dark);
  --win: #3fd17e;
  --danger: #e5533d;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: 2rem;
}

.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(4, 7, 13, 0.92);
}

.splash-overlay[hidden] {
  display: none;
}

/* Welcome splash only: fills the entire viewport (tab and mobile alike)
   instead of sitting in a padded, size-limited box -- it's just the
   logo, so there's no text/injury content that would need room to
   breathe like the week-complete splash still does. */
#splash-overlay {
  padding: 0;
}

#splash-overlay .splash-content {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

#splash-overlay .splash-logo {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

/* Season-complete confetti burst -- see launchConfetti() in app.js.
   Sits above even the week-complete splash (that's exactly when it
   fires) and never intercepts clicks. */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1100;
}

.splash-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  padding: 2.75rem 1.25rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.splash-logo {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  border-radius: 6px;
}

.week-splash-text {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.injury-alert {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ff6b5c;
}

.splash-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 50%;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(160deg, #0a0700 0%, #1a1206 30%, #2b1f08 55%, #1a1206 80%, #0a0700 100%);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 2px 14px rgba(212, 175, 55, 0.18);
  padding: 0.75rem 1rem;
}

.site-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--gold-light), var(--gold) 45%, var(--gold-light) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-light);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .site-header h1 {
    -webkit-text-fill-color: transparent;
  }
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  overflow-x: auto;
}

.nav-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.4rem 0.25rem;
  font-size: 0.72rem;
  line-height: 1.15;
  white-space: normal;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--gold-dark);
  color: #e8d9a8;
}

.nav-btn:not(:disabled):hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.nav-btn.active {
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 70%, var(--gold-dark));
  border-color: var(--gold);
  color: #1a1206;
  font-weight: 700;
}

main#app {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

h2 {
  margin-top: 0;
}

h3 {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.hint {
  color: var(--text-dim);
  font-size: 0.9rem;
}

button,
input[type="text"],
select {
  font: inherit;
  color: var(--text);
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
}

button {
  cursor: pointer;
  background: var(--panel-alt);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1206;
  font-weight: 600;
}

.btn-primary:not(:disabled):hover {
  background: var(--accent-dark);
}

.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-small {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

input[type="text"],
select {
  width: 100%;
}

/* Setup */

.team-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.setup-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Draft */

.on-the-clock {
  font-size: 1.05rem;
}

.testing-row {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border: 1px dashed var(--danger);
  border-radius: var(--radius);
}

/* The site-wide h3 rule (section-divider top border) looks redundant
   stacked right under a .panel's own border -- suppress it only when
   the h3 is the panel's very first child, as in the Dev toggle box
   above. */
.panel > h3:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.dev-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.dev-toggle-row input {
  width: auto;
}

.draft-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.draft-filters input[type="text"] {
  flex: 2 1 10rem;
}

.draft-filters select {
  flex: 1 1 6rem;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.player-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.6rem;
  align-items: center;
}

.player-main {
  grid-column: 1;
  font-weight: 600;
}

.player-season,
.player-points {
  grid-column: 1;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.player-card button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}

.pos-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  margin-right: 0.4rem;
  background: var(--panel-alt);
  border: 1px solid var(--border);
}

.pos-QB { color: #ff9f4f; border-color: #ff9f4f; }
.pos-RB { color: #4fd6ff; border-color: #4fd6ff; }
.pos-WR { color: #7dff4f; border-color: #7dff4f; }
.pos-TE { color: #d38bff; border-color: #d38bff; }
.pos-COACH { color: #ffd54f; border-color: #ffd54f; }
.pos-K { color: #ff7dc4; border-color: #ff7dc4; }
.pos-DEF { color: #9fb0d0; border-color: #9fb0d0; }
.pos-FLEX { color: var(--gold-light); border-color: var(--gold-light); }
.pos-SUPERFLEX { color: var(--gold); border-color: var(--gold); }
.pos-BENCH { color: var(--text-dim); border-color: var(--border); }

.bye-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.injury-prone-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.player-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  border: 1px solid var(--gold-dark);
  color: var(--text);
  flex-shrink: 0;
  overflow: hidden;
  vertical-align: middle;
}

.player-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.injury-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  border: 1px solid;
}

.injury-badge.injury-q {
  color: #ffd54f;
  border-color: #ffd54f;
}

.injury-badge.injury-d {
  color: #ffb84f;
  border-color: #ffb84f;
}

.injury-badge.injury-o,
.injury-badge.injury-ir {
  color: #ff6b5c;
  border-color: #ff6b5c;
}

.coach-bonus-suffix {
  color: var(--win);
  font-weight: 700;
  font-size: 0.8rem;
}

.champion-banner {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.playoff-seeds {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.playoff-seeds li {
  padding: 0.1rem 0;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.player-cell select {
  flex: 1 1 0;
  min-width: 0;
}

.tag-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.tag-badge.hof-tag {
  color: #1a1206;
  background: #e8b84f;
  border-color: #e8b84f;
}

.tag-badge.hovg-tag {
  color: var(--text-dim);
  background: transparent;
  border-style: dashed;
}

.tag-badge.active-tag {
  color: #0f2419;
  background: #4fd68a;
  border-color: #4fd68a;
}

.tag-badge.drafted-badge {
  color: var(--danger);
  background: transparent;
  border-color: var(--danger);
}

.on-the-clock {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.draft-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
}

.draft-timer.timer-warning {
  color: #ffb84f;
  border-color: #ffb84f;
}

.draft-timer.timer-danger {
  color: #ff6b5c;
  border-color: #ff6b5c;
}

/* Setup: League Settings' 3-column layout (Team Names / Roster /
   Scoring Settings) -- shown both pre-draft (Scoring Settings is an
   editable form, see .format-row below) and post-draft (read-only, see
   .scoring-settings-list) so the screen keeps the same shape once a
   draft starts. */

.league-team-count {
  font-weight: 700;
  margin: 0.2rem 0 0;
}

.league-settings-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  align-items: start;
  margin: 1rem 0;
}

.league-settings-col h3 {
  margin-top: 0;
}

.roster-slot-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.roster-slot-tile {
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border-width: 1px;
  border-style: solid;
  background: var(--panel-alt);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
}

.scoring-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}

.scoring-settings-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.scoring-settings-list dt {
  color: var(--text-dim);
  font-weight: 400;
}

.scoring-settings-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

/* Setup: league format */

.format-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.format-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Nested in the League Settings column layout, .format-row stacks
   vertically instead of wrapping as a row -- the column's too narrow
   for side-by-side fields once there are a dozen of them. */
.league-settings-col .format-row {
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 0;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.mini-roster {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
}

/* Draft order (3-column scrollable pick list) */

.draft-order-list {
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.draft-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.draft-order-table th {
  position: sticky;
  top: 0;
  background: var(--panel-alt);
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.draft-order-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.draft-order-table td:first-child {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  width: 2.5rem;
}

.coach-bonus-line {
  color: var(--win);
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

.bench-header-row td {
  padding-top: 0.6rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: none;
}

.bench-row {
  opacity: 0.6;
}

.schedule-row {
  color: var(--text-dim);
  font-style: italic;
}

.mini-roster h4 {
  margin: 0 0 0.4rem 0;
}

.mini-roster ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.mini-roster li {
  display: flex;
  gap: 0.4rem;
  padding: 0.1rem 0;
}

.slot-label {
  color: var(--text-dim);
  font-size: 0.75rem;
  min-width: 3.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Generic collapsible panel: team rosters, FAQ items, NFL schedule weeks */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  padding: 0.6rem 0.8rem;
}

.panel summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.3rem 0;
}

.panel p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0.4rem 0 0.2rem;
}

.week-panel {
  margin-bottom: 0.5rem;
}

.week-panel summary {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nfl-week-games {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.leaders-panel {
  margin-bottom: 0.5rem;
}

.leaders-panel summary {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.leaders-table {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.leaders-table td:first-child {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  width: 2rem;
}

.leaders-table td:last-child {
  font-variant-numeric: tabular-nums;
}

.nfl-game {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.nfl-game .at {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.nfl-game .home-team {
  font-weight: 600;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.roster-table th,
.roster-table td {
  text-align: left;
  padding: 0.4rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

.season-line {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Season */

.week-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.6rem;
}

.week-block h4 {
  margin: 0 0 0.4rem 0;
}

.matchup-panel {
  margin-bottom: 0.6rem;
}

.matchup-panel summary {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.matchup-panel summary .vs {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.matchup-panel summary .win {
  color: var(--win);
  font-weight: 700;
}

/* ------------------------------------------------- Hall of Fame matchup
   Full-screen game detail (see buildGameDetailHtml() in app.js): dark
   card, mirrored team score blocks, and a mirrored roster with
   position-tinted chips/headshots/score boxes. Position color is
   passed per-cell as inline --p-l/--p-c/--p-h (oklch components) so a
   single set of rules below covers every position and both sides. */

.hof-matchup {
  position: relative;
  background: #101215;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.4rem 1.3rem 1.6rem;
  color: #f2f0ec;
  overflow: hidden;
}

.hof-matchup::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(255, 214, 120, 0.09), transparent 70%);
  pointer-events: none;
}

.hof-matchup-eyebrow-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.hof-matchup-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hof-eyebrow-brand {
  font: 700 0.8rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.14em;
  color: var(--gold-light);
}

.hof-eyebrow-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.18);
}

.hof-eyebrow-week {
  font: 500 0.8rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
  color: rgba(242, 240, 236, 0.5);
}

.hof-final-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(63, 209, 126, 0.14);
  border: 1px solid rgba(63, 209, 126, 0.3);
  font: 700 0.62rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  color: var(--win);
}

.hof-final-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--win);
}

.hof-score-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hof-score-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hof-score-block.hof-side-a {
  align-items: flex-end;
  text-align: right;
}

.hof-score-block.hof-side-b {
  align-items: flex-start;
  text-align: left;
}

.hof-team-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hof-side-b .hof-team-identity {
  flex-direction: row-reverse;
}

.hof-team-record {
  font: 500 0.68rem/1 "IBM Plex Mono", monospace;
  color: rgba(242, 240, 236, 0.45);
}

.hof-team-name {
  font: 600 0.95rem/1 "Public Sans", sans-serif;
}

.hof-team-badge {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: #101215;
  font: 800 0.85rem/2rem "Big Shoulders Display", sans-serif;
  text-align: center;
  letter-spacing: 0.04em;
}

.hof-badge-a {
  background: var(--gold-light);
}

.hof-badge-b {
  background: #4fb3ff;
}

.hof-team-score {
  font: 800 3.4rem/0.85 "Big Shoulders Display", sans-serif;
  font-variant-numeric: tabular-nums;
}

.hof-team-score-trail {
  color: rgba(242, 240, 236, 0.72);
}

.hof-team-statline {
  font: 500 0.68rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  color: rgba(242, 240, 236, 0.5);
  display: flex;
  gap: 0.5rem;
}

.hof-side-a .hof-team-statline {
  justify-content: flex-end;
}

.hof-result-win {
  color: var(--gold-light);
}

.hof-result-loss,
.hof-result-tie {
  color: rgba(242, 240, 236, 0.5);
}

.hof-coach-quote {
  max-width: 26rem;
  width: 100%;
  padding-top: 0.55rem;
  margin-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.hof-coach-quote-text {
  font: italic 400 0.8rem/1.5 "Public Sans", sans-serif;
  color: rgba(247, 245, 241, 0.7);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  transition: color 0.13s ease;
}

.hof-coach-quote.expanded .hof-coach-quote-text {
  -webkit-line-clamp: 6;
  color: rgba(247, 245, 241, 0.92);
}

.hof-coach-quote-author {
  font: 500 0.6rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
  color: rgba(242, 240, 236, 0.4);
  margin-top: 0.25rem;
}

/* ---- roster ---- */

.hof-roster {
  margin-top: 0.2rem;
}

.hof-roster-headrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.9rem 0 0.4rem;
  font: 600 0.62rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  color: rgba(242, 240, 236, 0.32);
}

.hof-roster-head {
  display: flex;
  gap: 0.6rem;
}

.hof-head-left {
  padding-left: 0.9rem;
}

.hof-head-right {
  justify-content: flex-end;
  padding-right: 0.9rem;
}

.hof-head-center {
  justify-content: center;
  text-align: center;
}

.hof-head-pos {
  width: 2.6rem;
}

.hof-head-right .hof-head-pos {
  text-align: right;
}

.hof-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: stretch;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.hof-row-bench {
  opacity: 0.75;
}

.hof-bench-divider {
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font: 600 0.62rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 240, 236, 0.4);
}

.hof-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  min-width: 0;
  transition: background 0.13s ease, box-shadow 0.13s ease;
}

.hof-cell:hover,
.hof-cell.expanded {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11);
}

.hof-cell.hof-side-b {
  flex-direction: row-reverse;
}

/* No align-items override here on purpose: the default `stretch`
   keeps .hof-name-row (and the plain-text stat/quote/credit divs)
   full-width, which is what lets the name's overflow/ellipsis actually
   clip instead of just hugging its own content size and overflowing
   past the cell -- text-align (block text) and the name row's own
   justify-content: flex-end (flex text) handle the right-alignment. */
.hof-cell.hof-side-b .hof-textcol {
  text-align: right;
}

.hof-chip {
  flex: none;
  width: 2.2rem;
  text-align: center;
  padding: 0.25rem 0;
  margin-top: 1px;
  border-radius: 6px;
  font: 600 0.6rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.05em;
  color: oklch(var(--p-l) var(--p-c) var(--p-h));
  background: oklch(var(--p-l) var(--p-c) var(--p-h) / 0.12);
  border: 1px solid oklch(var(--p-l) var(--p-c) var(--p-h) / 0.45);
}

.hof-headshot {
  position: relative;
  flex: none;
  width: 2.1rem;
  height: 2.4rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.13s ease;
}

.hof-cell:hover .hof-headshot,
.hof-cell.expanded .hof-headshot {
  border-color: oklch(var(--p-l) var(--p-c) var(--p-h) / 0.5);
}

.hof-headshot-label {
  font: 500 0.45rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.05em;
  color: rgba(242, 240, 236, 0.28);
}

.hof-headshot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.hof-textcol {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.hof-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  min-width: 0;
}

.hof-side-b .hof-name-row {
  justify-content: flex-end;
}

.hof-name-row .player-name {
  font: 600 0.9rem/1.1 "Public Sans", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.hof-tag {
  flex: none;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font: 600 0.55rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
}

.hof-tag-legend {
  color: #101215;
  background: var(--gold-light);
}

.hof-tag-active {
  color: rgba(242, 240, 236, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.hof-stat {
  font: 400 0.7rem/1 "IBM Plex Mono", monospace;
  color: rgba(242, 240, 236, 0.44);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Slot-machine reel digits (see startSlotMachineReels() in app.js):
   .reel-pad reserves a real digit's width but stays invisible, so a
   short number's reel never reflows once it lands and never flashes a
   misleading leading "0". */
.reel-pad {
  visibility: hidden;
}

/* One flash when a reel lands (see startSlotMachineReels() in app.js):
   a brief glow burst rather than a color change, so it reads correctly
   regardless of the number's own color (default dim white, or a
   position tint when hovered/expanded). */
.reel-group {
  display: inline-block;
}

@keyframes reel-flash {
  0% {
    text-shadow: 0 0 10px rgba(255, 214, 120, 0.9), 0 0 2px rgba(255, 255, 255, 0.9);
  }
  100% {
    text-shadow: none;
  }
}

.reel-group.reel-flash {
  animation: reel-flash 0.5s ease-out;
}

/* Team-score header placeholders while the roster's reels are still
   rolling (see the `animate` branch of renderHofScoreBlock() and
   revealHofTeamScores() in app.js) -- dimmed so the em-dashes read as
   "pending" rather than as odd stray punctuation. */
.hof-score-pending,
.hof-result-pending {
  opacity: 0.35;
}

.hof-quote {
  font: italic 400 0.78rem/1.5 "Public Sans", sans-serif;
  color: rgba(242, 240, 236, 0.55);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  transition: color 0.13s ease;
}

.hof-cell.expanded .hof-quote {
  -webkit-line-clamp: 6;
  color: rgba(247, 245, 241, 0.92);
}

.hof-credit {
  display: none;
  padding-top: 0.1rem;
  font: 500 0.58rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  color: rgba(242, 240, 236, 0.4);
}

.hof-cell.expanded .hof-credit {
  display: block;
}

.hof-coach-bonus-line {
  color: var(--win);
  font-size: 0.7rem;
}

.hof-score-rail {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 0;
}

.hof-score-box {
  flex: none;
  width: 2.7rem;
  height: 2.3rem;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.13s ease;
}

.hof-row:has(.hof-side-a:hover) .hof-score-a,
.hof-row:has(.hof-side-a.expanded) .hof-score-a,
.hof-row:has(.hof-side-b:hover) .hof-score-b,
.hof-row:has(.hof-side-b.expanded) .hof-score-b {
  border-color: oklch(var(--p-l) var(--p-c) var(--p-h) / 0.5);
}

.hof-score-inner {
  font: 800 1.25rem/1 "Big Shoulders Display", sans-serif;
  font-variant-numeric: tabular-nums;
  color: rgba(242, 240, 236, 0.92);
  transition: color 0.13s ease;
}

.hof-row:has(.hof-side-a:hover) .hof-score-a .hof-score-inner,
.hof-row:has(.hof-side-a.expanded) .hof-score-a .hof-score-inner,
.hof-row:has(.hof-side-b:hover) .hof-score-b .hof-score-inner,
.hof-row:has(.hof-side-b.expanded) .hof-score-b .hof-score-inner {
  color: oklch(var(--p-l) var(--p-c) var(--p-h));
}

@media (max-width: 720px) {
  .hof-score-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .hof-score-block.hof-side-b {
    align-items: flex-end;
    text-align: right;
  }

  .hof-side-b .hof-team-identity {
    flex-direction: row;
  }

  .hof-roster-headrow,
  .hof-row {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    gap: 0.35rem;
  }

  .hof-cell {
    padding: 0.55rem;
    gap: 0.4rem;
  }

  .hof-headshot {
    display: none;
  }

  .hof-name-row {
    flex-wrap: nowrap;
  }

  .hof-stat,
  .hof-quote,
  .hof-credit {
    display: none;
  }
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.link-btn:hover {
  color: var(--accent-dark);
}

.bye-note {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.standings-table td:nth-child(4),
.standings-table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
}

.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  padding: 1rem;
}

/* Player avatar/name as a click target (player card) */

.player-avatar[data-action] {
  cursor: pointer;
}

.player-name[data-action] {
  cursor: pointer;
}

.player-name[data-action]:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Box scores + player quotes (matchup breakdown, player card) */

.player-row-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.box-score-line {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

.player-quote {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-style: italic;
  margin-top: 0.1rem;
}

/* Playoff bracket results list (Season tab) */

.playoff-results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.9rem;
}

.playoff-results li {
  padding: 0.15rem 0;
}

.win {
  color: var(--win);
  font-weight: 700;
}

/* Playoff bracket diagram (Season tab) */

.bracket {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.1rem;
  margin-top: 0.75rem;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 1.5rem;
  min-width: 10rem;
  flex: 1 0 auto;
}

.bracket-round-title {
  font-size: 0.7rem;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 0.2rem;
}

.bracket-game {
  position: relative;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.bracket-team {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.bracket-team + .bracket-team {
  border-top: 1px dashed var(--border);
}

.bracket-team.win {
  color: var(--gold-light);
  text-shadow: 0 0 6px rgba(240, 207, 122, 0.7);
}

.bracket-team-score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bracket-team.tbd {
  color: var(--text-dim);
  font-style: italic;
}

/* Free Agency (Teams tab) */

.free-agent-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-self: center;
}

.free-agent-actions select {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}

.free-agent-actions button {
  align-self: stretch;
}

/* Games tab: week navigator + compact game rows */

.week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.week-nav-label {
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 9rem;
  text-align: center;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.game-row-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.game-row-label {
  display: flex;
  justify-content: center;
}

.game-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.game-row:hover {
  border-color: var(--accent);
}

.game-row.game-row-preview {
  cursor: default;
  opacity: 0.75;
}

.game-row.game-row-preview:hover {
  border-color: var(--border);
}

.game-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The right-hand team's name is the outer (last) column now that
   scores sit clustered around "vs" in the middle -- push it flush to
   the row's right edge to mirror the left-hand name's flush-left. */
.game-row-name:last-child {
  text-align: right;
}

.game-row-score {
  min-width: 2.6rem;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.game-row-vs {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-align: center;
  padding: 0 0.35rem;
}

.game-row-name.win,
.game-row-score.win {
  color: var(--gold-light);
  font-weight: 800;
  text-shadow: 0 0 6px rgba(240, 207, 122, 0.85), 0 0 14px rgba(212, 175, 55, 0.55);
}

/* Fullscreen overlays: player card, single-game detail */

.fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
}

/* While any full-screen overlay is open (see syncBodyScrollLock() in
   app.js): the page behind it can't scroll or rubber-band past the
   overlay's own edges -- overscroll-behavior above keeps a scroll that
   reaches the top/bottom of the overlay's content from "chaining" into
   scrolling the page underneath. */
body.body-scroll-locked {
  overflow: hidden;
}

.fullscreen-overlay[hidden] {
  display: none;
}

/* Player card can open on top of the game-detail fullscreen view (a
   box score row's player name/avatar is clickable) -- it needs a
   higher z-index than the base .fullscreen-overlay so it visually
   stacks above, regardless of which one opened first. */
#player-card-overlay {
  z-index: 950;
}

.fullscreen-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 5;
}

.fullscreen-body {
  clear: both;
  max-width: 900px;
  margin: 0 auto;
}

.fullscreen-body:has(.hof-matchup) {
  max-width: 1100px;
}

.player-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.player-avatar-lg {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}

.player-avatar-lg svg {
  width: 28px;
  height: 28px;
}

.player-card-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.3rem 0;
}

@media (max-width: 480px) {
  .site-header h1 {
    font-size: 1.05rem;
  }
  .nav-btn {
    font-size: 0.62rem;
    padding: 0.35rem 0.15rem;
  }
}
