:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050608;
  color: #f4f5f7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 24%),
    linear-gradient(180deg, #09090b 0%, #050608 100%);
  color: #f4f5f7;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

.player-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.player-back {
  display: inline-block;
  margin-bottom: 24px;
  color: #7c92ff;
}

.player-header-card,
.player-today-card,
.player-summary-card,
.player-bio-card,
.player-tab-card,
.player-stats-card,
.player-extra-card {
  scroll-margin-top: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  backdrop-filter: blur(16px);
  padding: 28px;
  margin-bottom: 24px;
}

.player-header-grid {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.player-avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
}

.player-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 32px;
  font-weight: 700;
  color: #f4f5f7;
}

.player-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-hit-streak-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 3px solid #0a0b0e;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff914d, #ff4b2b);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 75, 43, 0.36);
}

.player-hit-streak-badge svg {
  width: 22px;
  height: 22px;
}

.player-streak-fire-icon {
  fill: currentColor;
}

.player-streak-ice-icon {
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-hit-streak-badge.is-cold {
  background: linear-gradient(145deg, #8fd8ff, #4b7dff);
  box-shadow: 0 8px 22px rgba(75, 125, 255, 0.36);
}

.player-hit-streak-badge.is-cold .player-streak-fire-icon {
  display: none;
}

.player-hit-streak-badge.is-cold .player-streak-ice-icon {
  display: block;
}

.player-hit-streak-badge.is-cold:focus-visible {
  outline-color: rgba(105, 171, 255, 0.78);
}

.player-hit-streak-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: max-content;
  max-width: 190px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(20, 21, 26, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  color: #f4f5f7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.player-hit-streak-badge:hover .player-hit-streak-tooltip,
.player-hit-streak-badge:focus-visible .player-hit-streak-tooltip,
.player-hit-streak-badge.is-tooltip-open .player-hit-streak-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: none) {
  .player-hit-streak-badge:hover:not(.is-tooltip-open) .player-hit-streak-tooltip {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
}

.player-hit-streak-badge:focus-visible {
  outline: 2px solid rgba(255, 145, 77, 0.7);
  outline-offset: 2px;
}

.player-header-content {
  display: grid;
  align-content: center;
  min-height: 128px;
  gap: 14px;
}

.eyebrow {
  margin: 0;
  color: #94a3b8;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-header-content h1 {
  margin: 0;
  font-size: clamp(34px, 3.5vw, 52px);
  line-height: 1;
}

.player-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.player-labels span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.player-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  max-width: 420px;
}

.player-bio-card {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.player-bio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.player-extra-card .table-header p {
  margin: 6px 0 0;
  color: #94a3b8;
}

#today-game-meta,
.today-game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.today-result-card {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.today-result-card:hover,
.today-result-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(124, 146, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.055));
  outline: none;
}

.today-result-card.is-mvp {
  border-color: rgba(245, 190, 78, 0.24);
  background:
    radial-gradient(circle at top left, rgba(245, 190, 78, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
}

.today-result-card.is-mvp:hover,
.today-result-card.is-mvp:focus-visible {
  border-color: rgba(245, 190, 78, 0.34);
  background:
    radial-gradient(circle at top left, rgba(245, 190, 78, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.055));
}

.today-result-card.is-live {
  border-color: rgba(124, 146, 255, 0.4);
  background:
    radial-gradient(circle at top left, rgba(124, 146, 255, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
}

.today-result-card.is-live:hover,
.today-result-card.is-live:focus-visible {
  border-color: rgba(124, 146, 255, 0.5);
  background:
    radial-gradient(circle at top left, rgba(124, 146, 255, 0.25), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.055));
}

.today-result-card.is-save {
  border-color: rgba(168, 85, 247, 0.3);
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
}

.today-result-card.is-save:hover,
.today-result-card.is-save:focus-visible {
  border-color: rgba(168, 85, 247, 0.4);
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.055));
}

.today-result-card.is-hold {
  border-color: rgba(20, 184, 166, 0.3);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
}

.today-result-card.is-hold:hover,
.today-result-card.is-hold:focus-visible {
  border-color: rgba(20, 184, 166, 0.4);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.055));
}

.today-appearance-badge {
  display: inline-grid;
  min-width: 19px;
  height: 18px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  border: 0;
  background: rgba(124, 146, 255, 0.14);
  color: #dfe5ff;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.today-appearance-badge.is-sub {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.13);
  color: #c8f7e3;
}

.today-appearance-badge.is-mvp {
  min-width: 36px;
  height: 24px;
  padding: 0 9px;
  background: rgba(245, 190, 78, 0.15);
  color: #f6c76a;
  font-size: 11px;
  font-weight: 950;
}

.today-appearance-badge.is-win {
  background: rgba(47, 128, 237, 0.18);
  color: #7ab5ff;
}

.today-appearance-badge.is-loss {
  background: rgba(255, 255, 255, 0.08);
  color: #70717a;
}

.today-appearance-badge.is-save {
  background: rgba(168, 139, 250, 0.17);
  color: #c8b8ff;
}

.today-appearance-badge.is-hold {
  background: rgba(20, 184, 166, 0.17);
  color: #8cebe0;
}

.today-stats-text {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.today-stats-text p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  color: #f4f5f7;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.today-stats-text strong {
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 800;
}

.game-log-role-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  color: #d8dee8;
  flex: 0 0 26px;
  align-self: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.game-log-role-icon.is-pitcher {
  border-color: rgba(122, 181, 255, 0.2);
  background: rgba(122, 181, 255, 0.085);
  color: #a9d1ff;
}

.game-log-role-icon.is-batter {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  color: #e2e6ec;
}

.game-log-role-icon svg {
  width: 18px;
  height: 18px;
}

.game-log-role-icon .bat-silhouette {
  fill: currentColor;
  stroke: none;
}

.game-log-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

.game-log-list.is-switching {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(3px);
}

.game-log-load-more {
  width: min(100%, 260px);
  height: 42px;
  margin: 4px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #d8deea;
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.game-log-load-more:hover,
.game-log-load-more:focus-visible {
  border-color: rgba(124, 146, 255, 0.34);
  background: rgba(124, 146, 255, 0.14);
  color: #f5f7ff;
  outline: none;
  transform: translateY(-1px);
}



.game-log-card {
  margin-top: 0 !important;
}


.game-log-card-head {
  display: block;
  min-width: 0;
  margin-bottom: 10px;
}

.game-log-card-head .today-game-meta {
  min-width: 0;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.game-log-card-head .today-game-meta span {
  white-space: nowrap;
}



.game-log-card.today-result-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(128px, 0.55fr) minmax(286px, 0.95fr);
  gap: 14px;
  align-items: center;
}

.game-log-content {
  min-width: 0;
}

.game-log-scoreline {
  display: inline-flex;
  width: min(100%, 286px);
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 12px;
  color: #f4f5f7;
  font-size: 1.44rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.game-log-score-team {
  display: grid;
  min-width: 64px;
  justify-items: center;
  gap: 3px;
  color: #94a3b8;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.game-log-score-team img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.game-log-score-team em {
  display: block;
  max-width: 70px;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-log-score-vs {
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 900;
}

.game-log-scoreline strong.is-loser {
  color: #737782;
}

.game-log-batting-line,
.game-log-pitching-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  white-space: nowrap;
}



.game-log-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  color: #cbd5e1;
  padding-right: 42px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: grid-template-rows 220ms ease, opacity 180ms ease, transform 220ms ease, margin-top 220ms ease;
}

.game-log-card.is-expanded .game-log-detail {
  grid-template-rows: 1fr;
  margin-top: 2px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.game-log-detail-inner {
  min-height: 0;
  overflow: hidden;
}

.game-log-detail-inner span {
  display: block;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.game-log-expand {
  position: absolute;
  right: 18px;
  bottom: 12px;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  cursor: pointer;
  z-index: 3;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.game-log-expand:hover,
.game-log-expand:focus-visible {
  background: rgba(124, 146, 255, 0.16);
  color: #dfe5ff;
  outline: none;
}

.game-log-expand svg {
  width: 16px;
  height: 16px;
  transition: transform 180ms ease;
}

.game-log-card.is-expanded .game-log-expand svg {
  transform: rotate(180deg);
}

.game-log-hr-badge {
  display: inline-grid;
  min-width: 26px;
  height: 20px;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #ff8a8a;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}


.game-log-card:nth-child(-n+6) {
  opacity: 0;
}

.game-log-card.is-revealed:nth-child(-n+6) {
  animation: playerStatIn 360ms ease both;
}

.game-log-card:nth-child(2) { animation-delay: 20ms; }
.game-log-card:nth-child(3) { animation-delay: 40ms; }
.game-log-card:nth-child(4) { animation-delay: 60ms; }
.game-log-card:nth-child(5) { animation-delay: 80ms; }
.game-log-card:nth-child(6) { animation-delay: 100ms; }

.player-tab-panel[hidden],
[hidden] {
  display: none !important;
}

.meta-row {
  display: grid;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  opacity: 0;
}

.player-header-card .meta-row {
  opacity: 1;
}

.meta-row.is-revealed {
  animation: playerStatIn 360ms ease both;
}

.meta-row:nth-child(2) { animation-delay: 30ms; }
.meta-row:nth-child(3) { animation-delay: 60ms; }
.meta-row:nth-child(4) { animation-delay: 90ms; }
.meta-row:nth-child(5) { animation-delay: 120ms; }
.meta-row:nth-child(6) { animation-delay: 150ms; }
.meta-row:nth-child(n + 7) { animation-delay: 180ms; }

.meta-row span {
  color: #94a3b8;
  font-size: 0.95rem;
}

.meta-row strong {
  font-size: 1rem;
  color: #f4f5f7;
}

.player-toggle {
  margin-top: 22px;
  display: flex;
  gap: 12px;
}

.mode-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4f5f7;
  cursor: pointer;
}

.mode-button.active {
  background: #7c92ff;
  color: #060b16;
}

#player-mode-toggle.hidden {
  display: none;
}

.summary-header,
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.summary-header h2,
.table-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.summary-header-title {
  min-width: 160px;
  display: flex;
  align-items: center;
}

.summary-mode-label {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

@media (max-width: 800px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.summary-item {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.summary-item.is-revealed {
  animation: playerStatIn 360ms ease both;
}

.summary-item.is-leader {
  border-color: rgba(47, 128, 237, 0.3);
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.18), rgba(255, 255, 255, 0.07)),
    rgba(255, 255, 255, 0.035);
}

.summary-item.is-leader > span {
  color: #b8d8ff;
}

.summary-item.is-leader strong {
  color: #9fcbff;
}

.summary-rank-label {
  color: rgba(238, 246, 255, 0.74);
  font-size: 0.68em;
  font-weight: 500;
}

.summary-item:nth-child(2) {
  animation-delay: 28ms;
}

.summary-item:nth-child(3) {
  animation-delay: 56ms;
}

.summary-item:nth-child(4) {
  animation-delay: 84ms;
}

.summary-item:nth-child(5) {
  animation-delay: 112ms;
}

.summary-item:nth-child(6) {
  animation-delay: 140ms;
}

.summary-item:nth-child(7) {
  animation-delay: 168ms;
}

.summary-item:nth-child(8) {
  animation-delay: 196ms;
}

.summary-item:nth-child(9) {
  animation-delay: 224ms;
}

.summary-item:nth-child(10) {
  animation-delay: 252ms;
}

.summary-item > span {
  display: block;
  color: #94a3b8;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.summary-item strong {
  display: block;
  font-size: 1.2rem;
}

.player-tab-card {
  padding: 0 0 8px;
  margin-bottom: 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4f5f7;
}

.tab.active {
  background: rgba(124, 146, 255, 0.18);
  color: #f4f5f7;
  border-color: rgba(124, 146, 255, 0.3);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-table thead th {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-weight: 600;
}

.stats-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.stats-table tbody tr {
  opacity: 0;
}

.stats-table tbody tr.is-revealed {
  animation: playerStatIn 360ms ease both;
}

.stats-table tbody tr:nth-child(2) {
  animation-delay: 24ms;
}

.stats-table tbody tr:nth-child(3) {
  animation-delay: 48ms;
}

.stats-table tbody tr:nth-child(4) {
  animation-delay: 72ms;
}

.stats-table tbody tr:nth-child(5) {
  animation-delay: 96ms;
}

.stats-table tbody tr:nth-child(n + 6) {
  animation-delay: 120ms;
}

.stats-table .career-row {
  background: rgba(124, 146, 255, 0.12);
  font-weight: 700;
}

.table-note {
  margin-top: 16px;
  color: #94a3b8;
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

#season-select,
#table-mode-label {
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

.summary-grid.is-switching,
.table-wrap.is-switching,
.table-note.is-switching,
#season-select.is-switching,
#table-mode-label.is-switching {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(3px);
}

@keyframes playerStatIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.season-select-wrap {
  display: grid;
  justify-items: end;
}

.season-select-wrap label {
  color: #94a3b8;
  font-size: 0.95rem;
}

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

.season-select-wrap select {
  min-width: 110px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f5f7;
}

.player-disclaimer {
  color: #94a3b8;
  font-size: 0.93rem;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .player-page {
    padding: 24px 16px 32px;
  }

  .player-header-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .player-header-content {
    min-height: 0;
    justify-items: center;
  }

  .player-labels {
    justify-content: center;
  }

  .player-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .season-select-wrap {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  .player-header-grid {
    gap: 18px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .player-toggle {
    justify-content: center;
    flex-wrap: wrap;
  }

  .stats-table {
    min-width: 1040px;
  }
}

.player-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-favorite-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-favorite-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.player-favorite-btn svg {
  width: 20px;
  height: 20px;
}

.player-favorite-btn.is-active {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
  color: #ffd700;
}

.player-favorite-btn.is-active svg {
  fill: currentColor;
}

@media (max-width: 700px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(255, 255, 255, 0.07), transparent 18rem),
      linear-gradient(180deg, #09090b 0%, #050608 100%);
  }

  .player-page {
    width: 100%;
    padding: 14px 12px 112px;
  }

  .player-back {
    min-height: 36px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
  }

  .player-header-card,
  .player-today-card,
  .player-summary-card,
  .player-bio-card,
  .player-tab-card,
  .player-stats-card,
  .player-extra-card {
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 20px;
  }

  .player-header-grid {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    justify-items: stretch;
    text-align: left;
  }

  .player-header-grid > .player-avatar-wrap {
    align-self: start;
  }

  .player-avatar-wrap,
  .player-avatar {
    width: 72px;
    height: 72px;
    font-size: 20px;
  }

  .player-hit-streak-badge {
    right: -3px;
    bottom: -3px;
    width: 27px;
    height: 27px;
    border-width: 2px;
  }

  .player-hit-streak-badge svg {
    width: 17px;
    height: 17px;
  }

  .player-header-content {
    min-height: 0;
    gap: 10px;
    justify-items: stretch;
  }

  .player-header-content h1 {
    font-size: 26px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .player-labels {
    justify-content: flex-start;
    gap: 6px;
    font-size: 12px;
  }

  .player-labels span {
    max-width: 100%;
    padding: 6px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: none;
  }

  .player-bio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .meta-row {
    gap: 4px;
    min-width: 0;
    padding: 10px 8px;
  }

  .meta-row span {
    font-size: 11px;
  }

  .meta-row strong {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .player-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  .mode-button {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 800;
  }

  .summary-header,
  .table-header {
    align-items: flex-start;
    gap: 10px;
  }

  .summary-header h2,
  .table-header h2 {
    font-size: 18px;
  }

  .summary-header-title {
    min-width: 0;
  }

  .season-select-wrap {
    justify-items: end;
  }

  .season-select-wrap select {
    min-width: 96px;
    height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 13px;
  }

  .summary-mode-label {
    margin-top: 10px;
    font-size: 12px;
  }

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


  .game-log-card.today-result-card {
    grid-template-columns: minmax(0, 1.16fr) minmax(146px, 0.74fr);
    gap: 10px;
    align-items: center;
    padding: 16px 14px;
  }

  .game-log-card .game-log-content {
    display: contents;
  }

  .game-log-card .game-log-card-head {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 2px;
    padding-right: 34px;
  }

  .game-log-card .game-log-expand {
    top: 12px;
    right: 12px;
    bottom: auto;
  }

  .game-log-card .today-stats-text {
    grid-column: 1;
    min-width: 0;
    margin-top: 0;
  }

  .game-log-scoreline {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    gap: 3px;
    justify-self: stretch;
    font-size: 0.9rem;
  }

  .game-log-score-team {
    min-width: 38px;
    font-size: 0.5rem;
  }

  .game-log-score-team img {
    width: 24px;
    height: 24px;
  }

  .game-log-score-team em {
    max-width: 43px;
  }

  .game-log-score-vs {
    font-size: 0.64rem;
  }

  .today-stats-text {
    margin-top: 12px;
  }

  .today-stats-text p {
    font-size: 16px;
    line-height: 1.45;
  }

  .game-log-card .today-stats-text p {
    width: 100%;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    font-size: clamp(12px, 3.4vw, 14px);
    white-space: nowrap;
  }

  .game-log-pitching-line,
  .game-log-batting-line {
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
  }

  .today-stats-text strong {
    font-size: 12px;
  }

  .game-log-role-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-basis: 24px;
  }

  .game-log-role-icon svg {
    width: 17px;
    height: 17px;
  }

  .summary-item {
    min-height: 70px;
    padding: 12px;
    border-radius: 15px;
  }

  .summary-item > span {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .summary-item strong {
    font-size: 17px;
    overflow-wrap: anywhere;
  }

  .player-tab-card {
    padding: 0 0 8px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    margin-bottom: 10px;
  }

  .tabs {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 0 2px 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    scroll-snap-align: start;
  }

  .table-header p {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 12px;
  }

  .table-wrap {
    margin-top: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-overflow-scrolling: touch;
  }

  .stats-table {
    min-width: 860px;
    font-size: 12px;
  }

  .stats-table th,
  .stats-table td {
    padding: 11px 12px;
    white-space: nowrap;
  }

  .stats-table th:first-child,
  .stats-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #101116;
  }

  .stats-table thead th:first-child {
    z-index: 2;
    background: #15161c;
  }

  .table-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
  }

  .player-disclaimer {
    font-size: 11px;
    line-height: 1.55;
  }
}

@media (max-width: 390px) {
  .player-page {
    padding-right: 10px;
    padding-left: 10px;
  }

  .player-header-card,
  .player-summary-card,
  .player-bio-card,
  .player-stats-card,
  .player-extra-card {
    padding: 14px;
  }

  .player-header-grid {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
  }

  .player-avatar-wrap,
  .player-avatar {
    width: 62px;
    height: 62px;
    font-size: 18px;
  }

  .player-header-content h1 {
    font-size: 23px;
  }

  .player-meta-grid {
    gap: 6px;
  }

  .meta-row {
    padding: 8px;
  }

  .meta-row strong {
    font-size: 12px;
  }

  .summary-grid {
    gap: 7px;
  }

  .summary-item {
    padding: 10px;
  }
}

/* Player profile story */
.player-story-trigger {
  position: absolute;
  inset: -6px;
  z-index: 3;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(from 205deg, #2f80ed, #74b4ff, #d5e8ff, #2f80ed);
  cursor: pointer;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  transition: filter 180ms ease, transform 180ms ease;
}

.player-story-trigger:hover,
.player-story-trigger:focus-visible {
  filter: brightness(1.16);
  outline: none;
  transform: scale(1.025);
}

.player-story-trigger.is-viewed {
  background: rgba(147, 160, 180, 0.42);
  filter: none;
}

.player-avatar {
  position: relative;
  z-index: 1;
}

.player-hit-streak-badge {
  z-index: 4;
}

.player-story-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 14px;
}

.player-story-modal.is-open {
  display: grid;
}

.player-story-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.player-story-viewer {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  height: min(92vh, 780px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: #0b0c0f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

.player-story-progress {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  z-index: 8;
  display: flex;
  gap: 4px;
}

.player-story-progress-track {
  height: 2px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.player-story-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.player-story-progress-fill.is-complete { width: 100%; }

.player-story-progress-fill.is-active {
  animation: player-story-progress var(--player-story-duration, 5s) linear forwards;
}

.player-story-viewer.is-paused .player-story-progress-fill.is-active {
  animation-play-state: paused;
}

@keyframes player-story-progress {
  from { width: 0; }
  to { width: 100%; }
}

.player-story-head {
  position: absolute;
  top: 22px;
  right: 12px;
  left: 14px;
  z-index: 8;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  color: #fff;
}

.player-story-author-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: #24262c;
  font-size: 10px;
  font-weight: 800;
}

.player-story-author-avatar img,
.player-story-author-avatar span {
  width: 100%;
  height: 100%;
}

.player-story-author-avatar img { object-fit: cover; }
.player-story-author-avatar span { display: grid; place-items: center; }

.player-story-author-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.72);
}

.player-story-author-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-story-author-copy time {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
}

.player-story-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  cursor: pointer;
}

.player-story-close svg { width: 20px; height: 20px; }

.player-story-media,
.player-story-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.player-story-visual {
  display: grid;
  place-items: center;
  background: #080a0c;
}

.player-story-visual::before {
  position: absolute;
  inset: -24px;
  background: var(--player-story-image) center / cover no-repeat;
  content: '';
  filter: blur(30px) brightness(0.4);
  opacity: 0.72;
  transform: scale(1.08);
}

.player-story-media.is-plate-3d .player-story-visual::before { display: none; }

.player-story-visual > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.player-story-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f5f7;
  font-size: 30px;
  font-weight: 800;
}

.player-story-nav {
  position: absolute;
  top: 76px;
  bottom: 88px;
  z-index: 6;
  width: 34%;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.player-story-media.is-plate-3d .player-story-nav { width: 12%; }
.player-story-nav.is-prev { left: 0; }
.player-story-nav.is-next { right: 0; }

.player-story-nav svg {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.26);
  opacity: 0;
  transition: opacity 160ms ease;
}

.player-story-nav.is-prev svg { left: 10px; }
.player-story-nav.is-next svg { right: 10px; }

.player-story-viewer:hover .player-story-nav svg,
.player-story-nav:focus-visible svg { opacity: 1; }

.player-story-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 7;
  padding: 110px 22px 24px;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 7, 0.9) 56%, rgba(5, 5, 7, 0.98));
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.56);
}

.player-story-copy h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.player-story-copy p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.6;
}

.player-story-detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.25fr);
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(10, 11, 14, 0.7);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  text-shadow: none;
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

.player-story-detail-item span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.player-story-detail-item {
  display: grid;
  min-width: 0;
  gap: 5px;
  align-content: center;
  padding: 11px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(10, 11, 14, 0.76);
}

.player-story-detail-item:last-child {
  border-right: 0;
}

.player-story-detail-item strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.player-story-detail-item.is-score strong {
  color: #fff;
  font-weight: 760;
}

.player-story-loading,
.player-story-media .plate-3d-fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  background: #080a0c;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  text-align: center;
}

.player-story-loading span {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  animation: player-story-spin 700ms linear infinite;
}

.player-story-loading em { font-style: normal; }
@keyframes player-story-spin { to { transform: rotate(360deg); } }

.player-story-media .plate-appearance-3d {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #080a0c;
  touch-action: none;
  user-select: none;
}

.player-story-media .plate-appearance-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.player-story-media .plate-appearance-3d canvas:active { cursor: grabbing; }

.player-story-media .plate-appearance-3d::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 6, 8, 0.22), transparent 24%),
    linear-gradient(0deg, rgba(5, 6, 8, 0.76), transparent 38%);
  content: '';
  pointer-events: none;
}

.player-story-media .plate-3d-hud {
  position: absolute;
  top: 70px;
  left: 16px;
  z-index: 4;
  display: flex;
  max-width: calc(100% - 80px);
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.player-story-media .plate-3d-mark,
.player-story-media .plate-3d-pitch {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(12, 13, 16, 0.58);
  color: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.player-story-media .plate-3d-mark {
  padding: 0 8px;
  font-size: 9px;
  font-weight: 850;
}

.player-story-media .plate-3d-pitch {
  min-width: 0;
  overflow: hidden;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-story-media .plate-3d-reset {
  position: absolute;
  top: 68px;
  right: 16px;
  z-index: 5;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: rgba(12, 13, 16, 0.58);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.player-story-media .plate-3d-reset svg { width: 16px; height: 16px; }

@media (max-width: 680px) {
  .player-story-modal { padding: 0; }

  .player-story-viewer {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .player-story-copy {
    padding-right: 18px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    padding-left: 18px;
  }

  .player-story-nav svg { display: none; }

  .player-story-media .plate-3d-hud {
    top: calc(66px + env(safe-area-inset-top));
    left: 14px;
  }

  .player-story-media .plate-3d-reset {
    top: calc(64px + env(safe-area-inset-top));
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-story-progress-fill.is-active,
  .player-story-loading span { animation: none; }
}
