/* Homepage: Home Run Pool (also used by tools/home-run-pool.html), MLB Category Leaders, All-Star Week, and the dashboard layout at the end of the file. */

/* ---------- Home Run Pool (also used by tools/home-run-pool.html) ---------- */
.home-run-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.home-run-card {
  background: linear-gradient(180deg, rgb(var(--rgb-white) / 0.05) 0%, rgb(var(--rgb-white) / 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.home-run-card-leader {
  border: 2px solid rgb(var(--rgb-teal) / 0.35);
}

.home-run-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.home-run-rank {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.home-run-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.15;
}

.home-run-team span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-run-team-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 2px solid rgb(var(--rgb-teal) / 0.3);
  background: rgb(var(--rgb-white) / 0.05);
}

.home-run-total {
  min-width: 68px;
  text-align: center;
  border-radius: 16px;
  padding: 10px;
  background: rgb(var(--rgb-white) / 0.05);
  color: var(--accent-dark);
  border: 1px solid rgb(var(--rgb-teal) / 0.35);
}

.home-run-total strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.home-run-total span {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.home-run-player-list {
  display: grid;
  gap: 8px;
}

.home-run-player-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgb(var(--rgb-teal) / 0.1);
  border: 1px solid rgb(var(--rgb-teal) / 0.3);
}

.home-run-player-name {
  font-weight: 850;
  line-height: 1.15;
}

.home-run-player-team {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.home-run-player-hr {
  color: var(--accent-dark);
  font-weight: 950;
  font-size: 1.2rem;
  line-height: 1;
}

.home-run-player-missing {
  opacity: .62;
}

.home-run-player-missing .home-run-player-team {
  color: var(--color-orange);
}

@media (max-width: 520px) {
  .home-run-pool-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-run-card {
    padding: 14px;
  }
}

@media (max-width: 700px) {
  .home-run-pool-preview .home-run-pool-grid {
    gap: 10px;
  }

  .home-run-pool-preview .home-run-card {
    padding: 12px;
    border-radius: 16px;
  }

  .home-run-pool-preview .home-run-card-top {
    margin-bottom: 8px;
    align-items: center;
  }

  .home-run-pool-preview .home-run-rank {
    font-size: 0.7rem;
    margin-bottom: 2px;
  }

  .home-run-pool-preview .home-run-team {
    font-size: 1rem;
  }

  .home-run-team-logo {
    width: 28px;
    height: 28px;
  }

  .home-run-pool-preview .home-run-total {
    min-width: 58px;
    padding: 8px;
    border-radius: 14px;
  }

  .home-run-pool-preview .home-run-total strong {
    font-size: 1.45rem;
  }

  .home-run-pool-preview .home-run-total span {
    font-size: 0.65rem;
  }

  .home-run-pool-preview .home-run-player-list {
    gap: 5px;
  }

  .home-run-pool-preview .home-run-player-row {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 6px 8px;
    border-radius: 10px;
  }

  .home-run-pool-preview .home-run-player-name {
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-run-pool-preview .home-run-player-team {
    display: none;
  }

  .home-run-pool-preview .home-run-player-hr {
    font-size: 1rem;
  }
}

/* Hard fallback: the homepage preview should never show more than 3 teams,
   even if an older cached script renders the full pool. */
.home-run-pool-preview .home-run-pool-grid > .home-run-card:nth-of-type(n+4) {
  display: none !important;
}

/* ---------- MLB Category Leaders ---------- */
.leader-section-header {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .leader-header-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .leader-mode-toggle {
      display: inline-flex;
      gap: 6px;
      padding: 4px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: rgb(var(--rgb-white) / 0.05);
    }

    .leader-mode-btn {
      border: 0;
      background: transparent;
      color: var(--accent-dark);
      border-radius: 999px;
      padding: 7px 12px;
      font-size: 0.78rem;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
    }

    .leader-mode-btn.active {
      background: var(--accent);
      color: var(--color-white);
      box-shadow: 0 8px 18px rgb(var(--rgb-teal) / 0.2);
    }

    .available-badge {
      width: 100%;
      max-width: 100%;
    }

    .available-badge {
      display: inline-flex;
      justify-content: center;
      padding: 4px 8px;
      border-radius: 999px;
      background: rgb(var(--rgb-green) / 0.19);
      color: var(--color-green);
      border: 1px solid rgb(var(--rgb-green) / 0.3);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    @media (max-width: 520px) {
      #top-pickups .leader-header-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
      }

      #availableStudsModeTag {
        width: auto;
        font-size: 0.58rem;
        padding: 4px 7px;
      }
    }

    .available-studs-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 8px;
      margin-top: 10px;
    }

    .available-stud-card {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 4px;
      min-height: 96px;
      padding: 9px 10px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgb(var(--rgb-white) / 0.05);
      box-shadow: 0 4px 12px rgb(var(--rgb-black) / 0.24);
    }

    @media (max-width: 520px) {
      #top-pickups .section-subtitle {
        font-size: 0.78rem;
        line-height: 1.25;
      }

      #top-pickups .leader-section-header {
        gap: 6px;
      }

      .available-studs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 8px;
      }

      .available-stud-card {
        min-height: 82px;
        padding: 7px 8px;
        border-radius: 10px;
        gap: 3px;
      }
    }

    @media (max-width: 360px) {
      .available-studs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
      }

      .available-stud-card {
        min-height: 76px;
        padding: 6px 7px;
      }
    }

    @media (max-width: 520px) {

      .leader-section-header,
.leader-header-actions,
.leader-mode-toggle {
        width: 100%;
      }

      .leader-header-actions {
        justify-content: stretch;
      }

      .leader-mode-btn {
        flex: 1;
      }

      #weeklyLeaderRange {
        text-align: center;
        width: 100%;
      }
    }

/* ---------- Homepage (index.html) ---------- */
/* Rendered by scripts/home-dashboard.js, category-leaders.js, homerun-pool.js, and prize-money.js.
   The hero is the only loud element; everything else uses the quiet ui- components in theme.css. */

/* Hero: latest recap + latest result */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 28px;
  padding: 30px;
  border-radius: 18px;
  background: var(--gradient-hero);
  border: 1px solid var(--color-accent-border);
  box-shadow: var(--shadow-glow);
}

.home-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  font-stretch: var(--font-wide);
  line-height: 1.05;
  color: var(--color-text);
  text-wrap: balance;
}

.home-deck {
  margin: 0 0 18px;
  max-width: 48ch;
  color: var(--color-text-soft);
}

.home-button {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
}

.home-button:hover {
  color: var(--color-bg);
  filter: brightness(1.08);
}

.home-scoreboard {
  display: grid;
  gap: 8px;
}

.home-score-label,
.home-score-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.home-score-matchup {
  display: grid;
  gap: 8px;
}

.home-score-matchup + .home-score-matchup {
  margin-top: 10px;
}

.home-score-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgb(var(--rgb-black) / 0.22);
}

.home-score-row .ui-team-photo {
  width: 40px;
  height: 40px;
}

.home-score-name {
  min-width: 0;
  font-weight: 700;
  color: var(--color-text);
}

.home-score-total {
  font-size: 2rem;
  font-weight: 900;
  font-stretch: var(--font-wide);
  line-height: 1;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.home-score-row.is-winner .home-score-total {
  color: var(--color-accent);
}

/* Hero after the championship: gold trim, falling confetti, and a spotlight on the champion */
.home-hero.is-championship {
  position: relative;
  overflow: hidden;
  border-color: rgb(var(--rgb-gold) / 0.5);
  background:
    radial-gradient(60% 80% at 85% 20%, rgb(var(--rgb-gold) / 0.22), transparent 65%),
    radial-gradient(50% 70% at 0% 100%, rgb(var(--rgb-gold-deep) / 0.2), transparent 70%),
    var(--gradient-hero);
  box-shadow: 0 0 0 1px rgb(var(--rgb-gold) / 0.12), 0 20px 60px rgb(var(--rgb-gold) / 0.16);
}

.home-hero.is-championship > :not(.home-confetti) {
  position: relative;
  z-index: 1;
}

.home-hero.is-championship .ui-kicker {
  color: var(--color-gold);
}

.home-hero.is-championship h1 {
  background: linear-gradient(100deg, var(--color-text) 30%, var(--color-gold) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero.is-championship .home-button {
  background: var(--color-gold);
}

.home-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-confetti i {
  position: absolute;
  top: -16px;
  left: var(--x);
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--c, var(--color-gold));
  opacity: 0.8;
  animation: home-confetti-fall var(--t, 7s) linear var(--d, 0s) infinite;
}

.home-confetti i:nth-child(1) { --x: 4%; --d: -1s; --t: 8s; }
.home-confetti i:nth-child(2) { --x: 10%; --d: -4s; --t: 6.5s; --c: var(--color-accent); }
.home-confetti i:nth-child(3) { --x: 17%; --d: -2.5s; --t: 9s; --c: var(--color-text); }
.home-confetti i:nth-child(4) { --x: 23%; --d: -6s; --t: 7s; }
.home-confetti i:nth-child(5) { --x: 30%; --d: -0.5s; --t: 8.5s; --c: var(--color-accent); }
.home-confetti i:nth-child(6) { --x: 36%; --d: -5s; --t: 6s; }
.home-confetti i:nth-child(7) { --x: 42%; --d: -3s; --t: 9.5s; --c: var(--color-text); }
.home-confetti i:nth-child(8) { --x: 48%; --d: -7s; --t: 7.5s; }
.home-confetti i:nth-child(9) { --x: 54%; --d: -1.5s; --t: 6.8s; --c: var(--color-accent); }
.home-confetti i:nth-child(10) { --x: 60%; --d: -4.5s; --t: 8.2s; }
.home-confetti i:nth-child(11) { --x: 65%; --d: -2s; --t: 7.2s; --c: var(--color-text); }
.home-confetti i:nth-child(12) { --x: 71%; --d: -6.5s; --t: 9s; }
.home-confetti i:nth-child(13) { --x: 76%; --d: -3.5s; --t: 6.4s; --c: var(--color-accent); }
.home-confetti i:nth-child(14) { --x: 81%; --d: -0.8s; --t: 8.8s; }
.home-confetti i:nth-child(15) { --x: 86%; --d: -5.5s; --t: 7.6s; --c: var(--color-text); }
.home-confetti i:nth-child(16) { --x: 91%; --d: -2.8s; --t: 6.2s; }
.home-confetti i:nth-child(17) { --x: 95%; --d: -7.5s; --t: 8.4s; --c: var(--color-accent); }
.home-confetti i:nth-child(18) { --x: 99%; --d: -4.2s; --t: 7s; }

@keyframes home-confetti-fall {
  /* top (not translate) so pieces fall the full height on tall phone layouts too */
  from { top: -16px; transform: rotate(0deg); }
  to { top: 100%; transform: rotate(540deg); }
}

.home-champ {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.home-champ-photo {
  position: relative;
  margin-bottom: 8px;
}

.home-champ-img {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-gold);
  box-shadow: 0 0 0 8px rgb(var(--rgb-gold) / 0.16), 0 0 40px rgb(var(--rgb-gold) / 0.45);
  animation: home-champ-glow 3s ease-in-out infinite;
}

.home-champ-img.ui-team-initials {
  display: grid;
  place-items: center;
  font-size: 2.2rem;
}

.home-champ-trophy {
  position: absolute;
  right: -8px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface-solid);
  border: 2px solid var(--color-gold);
  font-size: 1.35rem;
}

@keyframes home-champ-glow {
  50% { box-shadow: 0 0 0 12px rgb(var(--rgb-gold) / 0.1), 0 0 60px rgb(var(--rgb-gold) / 0.6); }
}

.home-champ-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.home-champ h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 900;
  font-stretch: var(--font-wide);
  line-height: 1.05;
  color: var(--color-text);
  text-wrap: balance;
}

.home-champ-score {
  margin: 2px 0 0;
  color: var(--color-text-soft);
}

.home-champ-score strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--color-gold);
  font-variant-numeric: tabular-nums;
}

/* Phones: the spotlight tells the story, so the recap headline and summary give way to just the link */
@media (max-width: 600px) {
  .home-hero.is-championship {
    gap: 18px;
    padding: 22px 18px;
  }

  .home-hero.is-championship .home-hero-copy {
    order: 1;
  }

  .home-hero.is-championship .home-hero-copy > :not(.home-button) {
    display: none;
  }

  .home-hero.is-championship .home-button {
    display: block;
    text-align: center;
  }

  .home-champ-img {
    width: 96px;
    height: 96px;
  }

  .home-champ-trophy {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-confetti {
    display: none;
  }

  .home-champ-img {
    animation: none;
  }
}

/* Standings + side column */
.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.home-columns .ui-panel {
  margin-bottom: 0;
}

.home-stack {
  display: grid;
  gap: 24px;
}

.home-columns + .ui-panel {
  margin-top: 24px;
}

.home-standings {
  width: 100%;
  border-collapse: collapse;
  color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}

.home-standings th {
  padding: 8px 6px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
  color: var(--color-text-muted);
}

.home-standings th:nth-child(-n + 2) {
  text-align: left;
}

.home-standings td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--color-border);
  text-align: right;
  white-space: nowrap;
}

.home-standings tr:last-child td {
  border-bottom: 0;
}

.home-rank {
  width: 28px;
  text-align: left !important;
  font-weight: 700;
  color: var(--color-text-muted);
}

.home-team-cell {
  text-align: left !important;
  white-space: normal !important;
  font-weight: 600;
  color: var(--color-text);
}

/* Prize pool card (in season only) */
.home-prize-total {
  display: block;
  margin: 2px 0 10px;
  font-size: 2.2rem;
  font-weight: 900;
  font-stretch: var(--font-wide);
  line-height: 1;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.home-prize-bar {
  display: flex;
  gap: 2px;
  height: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
}

.home-prize-bar span {
  display: block;
}

.home-prize-base {
  background: rgb(var(--rgb-text-muted) / 0.5);
}

.home-prize-waivers {
  background: var(--color-teal);
}

.home-prize-extra-1 {
  background: var(--color-coral);
}

.home-prize-extra-2 {
  background: var(--color-gold);
}

.home-prize-extra-3 {
  background: var(--color-purple);
}

.home-prize-winner {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* Latest recaps */
.ui-link-row.is-recap {
  grid-template-columns: 3rem minmax(0, 1fr);
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.35;
}

.ui-link-row.is-recap:hover {
  color: var(--color-accent);
}

.home-recap-week {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Top MLB players */
.home-leader-modes {
  display: flex;
  gap: 14px;
}

.home-leader-modes button {
  padding: 0 0 3px;
  border: 0;
  background: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
}

.home-leader-modes button.active {
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

.home-week-select {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.85rem;
}

/* Top MLB players: one small card per category */
.home-leaders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-leaders li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.home-leader-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-leader-cat {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.home-leader-value {
  margin-left: auto;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.home-leader-who {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.home-leader-who > span {
  min-width: 0;
}

.home-leader-headshot {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-raised);
}

.home-leader-who strong,
.home-leader-who small {
  display: block;
}

/* Long names wrap onto a second line instead of being cut off */
.home-leader-who strong {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.home-leader-who small {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* The UTI team that owns him, pinned to the bottom so cards line up */
.home-leader-owner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--color-border);
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-accent);
}

.home-leader-owner > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-leader-owner.is-available {
  font-weight: 600;
  color: var(--color-text-muted);
}

.home-leader-flip {
  padding: 1px 6px;
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
  cursor: pointer;
}

.home-leader-flip:hover,
.home-leader-flip:focus-visible {
  background: rgb(var(--rgb-teal) / 0.24);
}

.home-leaders li.home-leader-message {
  display: block;
  grid-column: 1 / -1;
  border: 0;
  background: none;
  padding: 0;
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .home-hero,
  .home-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero {
    gap: 22px;
    padding: 22px;
  }

  /* One column: the Home Run Pool champion goes above the draft order / standings */
  .home-stack:has(#homeRunChampion:not([hidden])) {
    order: -1;
  }
}

@media (max-width: 600px) {
  .home-hero h1 {
    font-size: 1.75rem;
  }

  .home-leaders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Draft order card (offseason): replaces the standings */
.home-draft-card {
  position: relative;
  overflow: hidden;
  border-color: var(--color-accent-border);
  background:
    radial-gradient(90% 60% at 100% 0%, rgb(var(--rgb-coral) / 0.16), transparent 60%),
    radial-gradient(80% 60% at 0% 0%, rgb(var(--rgb-teal) / 0.14), transparent 60%),
    var(--color-surface);
  box-shadow: var(--shadow-glow);
}

.home-clock {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin: 6px 0 22px;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgb(var(--rgb-coral) / 0.45);
  background: var(--gradient-hero);
  box-shadow: 0 0 0 1px rgb(var(--rgb-coral) / 0.12), 0 14px 44px rgb(var(--rgb-coral) / 0.18);
}

/* Light sweep across the banner */
.home-clock::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(var(--rgb-white) / 0.08) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: home-clock-sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

.home-clock-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-coral);
  box-shadow: 0 0 0 6px rgb(var(--rgb-coral) / 0.18);
  animation: home-clock-ring 2s ease-out infinite;
}

.home-clock-photo.ui-team-initials {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-text);
  background: var(--color-navy);
}

.home-clock-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-coral);
}

.home-clock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-coral);
  animation: home-clock-blink 1.2s ease-in-out infinite;
}

.home-clock h3 {
  margin: 6px 0 4px;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 900;
  font-stretch: var(--font-wide);
  line-height: 1.08;
  color: var(--color-text);
  text-wrap: balance;
}

.home-clock h3 .ui-team-link {
  color: var(--color-teal);
}

.home-clock p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-soft);
}

.home-draft {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-draft li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.92rem;
  color: var(--color-text);
}

.home-draft-pick {
  font-weight: 800;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* On deck */
.home-draft li:first-child .home-draft-pick {
  color: var(--color-accent);
}

/* Opening Day / Draft Day strip across the bottom of the on-the-clock banner */
.home-clock-dates {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgb(var(--rgb-coral) / 0.25);
}

/* One row: label, date, then the countdown at the right edge */
.home-clock .home-countdown {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.home-countdown[hidden] {
  display: none;
}

/* Same neon orange as "On the clock" */
.home-countdown b {
  font-weight: 700;
  color: var(--color-coral);
}

.home-countdown-time {
  grid-column: 3;
  font-weight: 700;
  color: var(--color-coral);
  text-shadow: 0 0 10px rgb(var(--rgb-coral) / 0.45);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-countdown-time.is-tbd {
  color: var(--color-text-soft);
  text-shadow: none;
}

@keyframes home-clock-sweep {
  0%, 30% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

@keyframes home-clock-ring {
  0% { box-shadow: 0 0 0 0 rgb(var(--rgb-coral) / 0.45); }
  100% { box-shadow: 0 0 0 14px rgb(var(--rgb-coral) / 0); }
}

@keyframes home-clock-blink {
  50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .home-clock::after,
  .home-clock-photo,
  .home-clock-dot {
    animation: none;
  }
}

@media (max-width: 560px) {
  .home-clock {
    gap: 14px;
    padding: 16px;
  }

  .home-clock-photo {
    width: 60px;
    height: 60px;
  }
}

/* Home Run Pool champion card (homepage, once the pool is final) */
.home-hr-champ {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  border-color: rgb(var(--rgb-gold) / 0.45);
  background:
    radial-gradient(90% 70% at 100% 0%, rgb(var(--rgb-gold) / 0.2), transparent 60%),
    linear-gradient(160deg, rgb(var(--rgb-gold-deep) / 0.18), transparent 55%),
    var(--color-surface-solid);
  box-shadow: 0 0 0 1px rgb(var(--rgb-gold) / 0.1), 0 16px 48px rgb(var(--rgb-gold) / 0.14);
}

/* Light sweep, same rhythm as the draft banner */
.home-hr-champ::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(var(--rgb-white) / 0.07) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: home-clock-sweep 5s ease-in-out infinite;
  pointer-events: none;
}

.home-hr-champ-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.home-hr-champ-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.home-hr-champ-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-gold);
  box-shadow: 0 0 0 5px rgb(var(--rgb-gold) / 0.16);
}

.home-hr-champ h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  font-stretch: var(--font-wide);
  line-height: 1.1;
  color: var(--color-text);
}

.home-hr-champ-total {
  display: grid;
  justify-items: center;
  line-height: 1;
}

.home-hr-champ-total strong {
  font-size: 2.6rem;
  font-weight: 900;
  font-stretch: var(--font-wide);
  background: linear-gradient(180deg, var(--color-gold), var(--color-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hr-champ-total span {
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-gold);
}

.home-hr-champ-note {
  margin: -4px 0 0;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.home-hr-champ-hitters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-hr-champ-hitters li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--color-text-soft);
}

.home-hr-champ-hitters b {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.home-hr-champ-link {
  position: relative;
  z-index: 1;
  justify-self: start;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-gold);
  text-decoration: none;
}

.home-hr-champ-link:hover {
  text-decoration: underline;
}

.home-hr-champ-next {
  position: absolute;
  right: 22px;
  bottom: 22px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .home-hr-champ::after {
    animation: none;
  }
}

@media (max-width: 560px) {
  .home-hr-champ-hitters {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hr-champ-photo {
    width: 52px;
    height: 52px;
  }

  .home-hr-champ-total strong {
    font-size: 2.1rem;
  }
}
