:root {
  --bg: #07111f;
  --panel: rgba(8, 19, 38, 0.74);
  --panel-strong: rgba(7, 18, 34, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.06);
  --text: #f4f7fb;
  --muted: #9eb3cb;
  --blue: #0e4fa8;
  --blue-bright: #49a4ff;
  --red: #df2e38;
  --red-soft: #ff7f87;
  --gold: #ffd166;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  --record-blue-alpha: 0.15;
  --record-red-alpha: 0.18;
  --record-blue-ambient: 0.22;
  --record-red-ambient: 0.22;
  --record-blue-mid: #07111f;
  --record-red-mid: #0b1930;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(73, 164, 255, var(--record-blue-alpha)), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(223, 46, 56, var(--record-red-alpha)), transparent 25%),
    linear-gradient(140deg, #040a13 10%, var(--record-blue-mid) 50%, var(--record-red-mid) 100%);
  transition:
    background 500ms ease,
    color 220ms ease;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 88%);
  pointer-events: none;
  opacity: 0.35;
}

button,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.hero-copy,
.hero-actions,
.section-heading > div,
.detail-headline-copy,
.detail-card,
.month-row-header,
.month-games,
.game-tile,
.tile-top,
.tile-date,
.tile-opponent,
.tile-meta {
  min-width: 0;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: floatGlow 16s ease-in-out infinite;
}

.ambient-left {
  top: -8rem;
  left: -10rem;
  background: rgba(73, 164, 255, var(--record-blue-ambient));
}

.ambient-right {
  right: -9rem;
  bottom: 12rem;
  background: rgba(223, 46, 56, var(--record-red-ambient));
}

.app {
  position: relative;
  z-index: 1;
  width: min(1260px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  animation: riseIn 600ms ease-out;
}

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 48%);
  pointer-events: none;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.hero::after {
  content: "";
  position: absolute;
  right: -4rem;
  top: -4rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.18), transparent 62%);
  pointer-events: none;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.5rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 0.96;
  text-wrap: balance;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(3rem, 8vw, 6rem);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-width: 220px;
}

.season-control {
  display: grid;
  gap: 0.6rem;
  width: 100%;
  color: var(--muted);
}

.season-control span {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.season-control select,
.refresh-button {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 1rem;
}

.refresh-button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), #0b2a67);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.refresh-button:hover,
.refresh-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14, 79, 168, 0.35);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  padding: 1.35rem 1.4rem 1.45rem;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  margin: 0.6rem 0 0.25rem;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.stat-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.lower-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.lower-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.82fr);
}

.sidebar-panel,
.lower-grid > .panel {
  padding: 1.4rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading-secondary {
  margin-top: 1.6rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
  line-height: 1.4;
  text-wrap: pretty;
}

.interaction-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.live-game-banner {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(73, 164, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(10, 21, 39, 0.82);
}

.live-game-shell {
  display: grid;
  gap: 1.25rem;
}

.live-game-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.live-game-heading h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
  text-wrap: balance;
}

.live-game-meta,
.live-game-updated {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 38px;
  padding: 0 0.95rem;
  border-radius: 999px;
  background: rgba(223, 46, 56, 0.18);
  border: 1px solid rgba(255, 127, 135, 0.22);
  color: #ffd7da;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
}

.live-game-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.live-team-card,
.live-state-card {
  padding: 1rem 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.live-team-card {
  display: grid;
  gap: 0.35rem;
  align-content: center;
}

.live-team-card.cubs {
  background: linear-gradient(180deg, rgba(73, 164, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.live-team-card.opponent {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.live-team-name,
.live-team-line,
.live-state-inning,
.live-state-status,
.live-state-count {
  margin: 0;
}

.live-team-name {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-team-score {
  margin: 0.15rem 0;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.live-team-line {
  color: var(--muted);
  font-size: 0.92rem;
}

.live-state-card {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.3rem;
  background:
    linear-gradient(180deg, rgba(255, 209, 102, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.live-state-inning {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1;
}

.live-state-status {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.live-state-count {
  color: var(--muted);
  font-size: 0.94rem;
}

.game-detail {
  display: grid;
  gap: 1rem;
}

.game-detail-modal {
  max-height: min(76vh, 980px);
  overflow-y: auto;
  padding-right: 0.35rem;
}

.detail-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border-radius: 22px;
  font-weight: 700;
  font-size: 1.5rem;
}

.detail-result.win {
  background: linear-gradient(135deg, rgba(73, 164, 255, 0.24), rgba(73, 164, 255, 0.08));
  color: #9ad8ff;
}

.detail-result.loss {
  background: linear-gradient(135deg, rgba(223, 46, 56, 0.22), rgba(223, 46, 56, 0.08));
  color: #ffb4ba;
}

.detail-headline {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.detail-subtitle,
.detail-footnote {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.detail-card {
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-card p {
  margin: 0;
}

.detail-card .label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-card .value {
  margin-top: 0.45rem;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.scoreband {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.scoreband-team {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.scoreband-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.score-pill {
  min-width: 68px;
  padding: 0.55rem 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

.score-pill-label,
.detail-metric-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-pill-value,
.detail-metric-value {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.detail-cluster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.detail-cluster-grid-standouts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-cluster {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-cluster-label {
  margin: 0 0 0.85rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.detail-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.detail-metric {
  padding: 0.8rem 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-metric p {
  margin: 0;
}

.detail-spotlight-card {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-spotlight-card p {
  margin: 0;
}

.detail-spotlight-name {
  margin-top: 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.detail-spotlight-summary {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.linescore-panel {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.linescore-table {
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.linescore-row {
  display: grid;
  gap: 0.45rem;
  align-items: center;
  min-width: 420px;
}

.linescore-row + .linescore-row {
  margin-top: 0.45rem;
}

.linescore-row span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.linescore-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.linescore-team {
  justify-items: start;
  padding-left: 0.8rem;
  font-weight: 700;
  text-align: left;
}

.detail-inline-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  --modal-origin-x: 50vw;
  --modal-origin-y: 50vh;
}

.game-modal[hidden] {
  display: none;
}

.game-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(73, 164, 255, 0.16), transparent 30%),
    rgba(3, 8, 18, 0.22);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 260ms ease;
}

.game-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 1.3rem 1.3rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(29, 39, 58, 0.94), rgba(12, 20, 36, 0.96)),
    rgba(9, 16, 29, 0.94);
  transform-origin: var(--modal-origin-x) var(--modal-origin-y);
  transform: translateY(26px) scale(0.84);
  opacity: 0;
  transition:
    transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 220ms ease;
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.game-modal.is-open .game-modal-backdrop {
  opacity: 1;
}

.game-modal.is-open .game-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.game-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-modal-header h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.modal-close-button {
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.modal-close-button:hover,
.modal-close-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .game-modal-backdrop,
  .game-modal-dialog {
    transition: none;
  }
}

.results-grid {
  display: grid;
  gap: 1rem;
}

.month-group {
  display: grid;
  gap: 0.9rem;
}

.month-label {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.month-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 0.7rem;
}

.game-tile {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 0.8rem;
  min-height: 104px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.game-tile:hover,
.game-tile:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
}

.game-tile.active {
  outline: 2px solid rgba(255, 255, 255, 0.18);
}

.game-tile.win {
  background: linear-gradient(180deg, rgba(73, 164, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.game-tile.loss {
  background: linear-gradient(180deg, rgba(223, 46, 56, 0.18), rgba(255, 255, 255, 0.04));
}

.game-tile .tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.game-tile .tile-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-weight: 700;
}

.game-tile.win .tile-result {
  color: #bfe7ff;
  background: rgba(73, 164, 255, 0.18);
}

.game-tile.loss .tile-result {
  color: #ffd2d5;
  background: rgba(223, 46, 56, 0.18);
}

.tile-date,
.tile-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.tile-opponent {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.monthly-breakdown,
.trend-panel {
  display: grid;
  gap: 0.8rem;
}

.trend-panel {
  padding: 0.1rem 0;
}

.trend-graphic {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at top right, rgba(73, 164, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(7, 15, 27, 0.34);
  overflow: hidden;
}

.trend-graphic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 46%);
  pointer-events: none;
}

.trend-graphic.up {
  box-shadow: inset 0 0 0 1px rgba(73, 164, 255, 0.05);
}

.trend-graphic.down {
  box-shadow: inset 0 0 0 1px rgba(255, 127, 135, 0.05);
}

.trend-graphic-header,
.trend-graphic-footer,
.trendline-axis {
  position: relative;
  z-index: 1;
}

.trend-graphic-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: end;
}

.trend-graphic-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.trend-graphic-value {
  margin: 0.32rem 0 0;
  font-size: clamp(2.25rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.trend-graphic-note {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.trend-graphic-score {
  min-width: 136px;
  padding: 0.8rem 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
}

.trend-graphic-score-value {
  margin: 0.24rem 0 0;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #f7fbff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.24);
}

.trend-graphic-score .trend-graphic-label,
.trend-graphic-score .trend-graphic-note {
  color: rgba(247, 251, 255, 0.82);
}

.trend-graphic.up .trend-graphic-score {
  background: linear-gradient(135deg, rgba(73, 164, 255, 0.34), rgba(73, 164, 255, 0.18));
  border-color: rgba(120, 193, 255, 0.28);
}

.trend-graphic.down .trend-graphic-score {
  background: linear-gradient(135deg, rgba(255, 127, 135, 0.3), rgba(223, 46, 56, 0.18));
  border-color: rgba(255, 164, 170, 0.24);
}

.trend-graphic.steady .trend-graphic-score {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.28), rgba(255, 209, 102, 0.15));
  border-color: rgba(255, 220, 142, 0.24);
}

.trendline-fit.up,
.legend-swatch.trend.up,
.trendline-endpoint.fit.up {
  stroke: var(--blue-bright);
  background: var(--blue-bright);
  fill: var(--blue-bright);
}

.trendline-fit.down,
.legend-swatch.trend.down,
.trendline-endpoint.fit.down {
  stroke: #ff8f97;
  background: #ff8f97;
  fill: #ff8f97;
}

.trendline-fit.steady,
.legend-swatch.trend.steady,
.trendline-endpoint.fit.steady {
  stroke: var(--gold);
  background: var(--gold);
  fill: var(--gold);
}

.trend-graphic.up .trend-graphic-score-value,
.trendline-fit.up,
.legend-swatch.trend.up,
.trendline-endpoint.fit.up {
  color: #f7fbff;
}

.trend-graphic.down .trend-graphic-score-value,
.trendline-fit.down,
.legend-swatch.trend.down,
.trendline-endpoint.fit.down {
  color: #fff6f7;
}

.trend-graphic.steady .trend-graphic-score-value,
.trendline-fit.steady,
.legend-swatch.trend.steady,
.trendline-endpoint.fit.steady {
  color: #fffdf7;
}

.trendline-chart-shell {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
  padding: 0.45rem 0.55rem 0.35rem;
}

.trendline-svg {
  display: block;
  width: 100%;
  height: 176px;
}

.trendline-grid {
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 1;
}

.trendline-y-label {
  fill: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
}

.trendline-area {
  fill: rgba(73, 164, 255, 0.08);
}

.trendline-actual {
  fill: none;
  stroke: rgba(255, 255, 255, 0.64);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trendline-fit {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trendline-endpoint.actual {
  fill: rgba(255, 255, 255, 0.92);
}

.trend-graphic-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

.trend-graphic-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-swatch {
  display: inline-flex;
  width: 16px;
  height: 3px;
  border-radius: 999px;
}

.legend-swatch.actual {
  background: rgba(255, 255, 255, 0.75);
}

.trendline-footnote,
.trendline-axis {
  color: var(--muted);
  font-size: 0.84rem;
}

.trendline-axis {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.trendline-axis span:nth-child(2) {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.month-row {
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.month-row-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.month-row-header p {
  margin: 0;
}

.month-name {
  font-weight: 700;
}

.month-record {
  color: var(--muted);
}

.bar-track {
  position: relative;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.bar-win,
.bar-loss {
  position: absolute;
  top: 0;
  bottom: 0;
}

.bar-win {
  left: 0;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue));
}

.bar-loss {
  right: 0;
  background: linear-gradient(135deg, var(--red), var(--red-soft));
}

.status-banner {
  min-height: 26px;
  padding: 0.35rem 0.4rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 1rem;
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, 20px, 0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .stats-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .hero-actions {
    align-items: stretch;
  }

  .detail-grid,
  .detail-cluster-grid-standouts {
    grid-template-columns: 1fr;
  }

  .detail-cluster-grid {
    grid-template-columns: 1fr;
  }

  .detail-scoreboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app {
    width: min(100vw - 1rem, 1260px);
    padding: 0.5rem 0 2rem;
  }

  .panel,
  .hero {
    border-radius: 24px;
  }

  .hero,
  .sidebar-panel,
  .live-game-banner,
  .lower-grid > .panel {
    padding: 1.1rem;
  }

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

  .detail-grid,
  .detail-mini-grid,
  .trend-graphic-header {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-meta {
    text-align: left;
  }

  .scoreband {
    align-items: start;
    flex-direction: column;
  }

  .scoreband-metrics {
    justify-content: start;
  }

  .live-game-heading,
  .live-game-scoreboard {
    grid-template-columns: 1fr;
  }

  .live-game-heading {
    align-items: start;
  }

  .game-modal {
    padding: 0.6rem;
  }

  .game-modal-dialog {
    width: calc(100vw - 1.2rem);
    max-height: calc(100vh - 1.2rem);
    padding: 1rem;
  }

  .game-modal-header {
    flex-direction: column;
  }

  .modal-close-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .stats-grid,
  .detail-grid,
  .detail-scoreboard,
  .detail-mini-grid,
  .trend-graphic-header,
  .month-games {
    grid-template-columns: 1fr;
  }

  .trend-graphic-score {
    text-align: left;
  }

  .trendline-axis,
  .trend-graphic-footer {
    flex-direction: column;
    align-items: start;
  }

  .live-badge {
    min-width: 0;
    width: fit-content;
  }

  .detail-result {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .tile-date {
    text-align: right;
  }
}
