:root {
  color-scheme: dark;
  --bg: #08080a;
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f7f7f8;
  --muted: #a1a1aa;
  --quiet: #70717a;
  --blue: #2f80ed;
  --danger: #ff453a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 32rem),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

.team-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 86px;
}

.team-status {
  min-height: 22px;
  margin-bottom: 14px;
  color: color-mix(in srgb, var(--team-color, #2f80ed) 38%, var(--muted));
  font-size: 13px;
  font-weight: 700;
}

.team-status:empty {
  display: none;
}

.team-status.is-error {
  color: #ffb4ad;
}

.team-hero,
.team-section,
.team-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.064) 0%, rgba(255, 255, 255, 0.027) 100%),
    var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.team-hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 28px;
  min-height: 280px;
  overflow: hidden;
  padding: 30px;
  border-color: color-mix(in srgb, var(--team-color, #2f80ed) 45%, rgba(255, 255, 255, 0.11));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--team-color, #2f80ed) 24%, transparent), rgba(255, 255, 255, 0.04) 46%, color-mix(in srgb, var(--team-color, #2f80ed) 12%, transparent)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.064) 0%, rgba(255, 255, 255, 0.027) 100%),
    var(--card);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.24),
    0 0 44px color-mix(in srgb, var(--team-color, #2f80ed) 22%, transparent);
}

.team-hero::before {
  position: absolute;
  inset: 50% 7% auto auto;
  width: min(380px, 42vw);
  height: min(380px, 42vw);
  background: var(--team-logo) center / contain no-repeat;
  content: "";
  opacity: 0.22;
  pointer-events: none;
  transform: translate(0, -50%);
}

.team-hero-main {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  align-self: end;
  align-content: end;
  gap: 16px;
  padding-top: 48px;
}

.team-hero-kicker {
  position: absolute;
  top: 30px;
  left: 30px;
  display: inline-flex;
  width: fit-content;
  max-width: min(520px, 72vw);
  align-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-hero-main h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  letter-spacing: 0;
  line-height: 0.92;
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.team-tags span,
.team-season-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.052);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.team-hero-summary {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.team-hero-stat {
  display: inline-grid;
  min-height: 38px;
  align-content: center;
  justify-items: center;
  padding: 0 14px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--team-color, #2f80ed) 18%, transparent), rgba(0, 0, 0, 0.18));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.team-hero-stat strong {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}


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

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

.team-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.team-tab.active {
  border-color: color-mix(in srgb, var(--active-team-color, #2f80ed) 48%, rgba(255, 255, 255, 0.16));
  background: color-mix(in srgb, var(--active-team-color, #2f80ed) 22%, rgba(255, 255, 255, 0.045));
  color: #f8fbff;
}

.team-tab-panel[hidden],
[data-overview-extra][hidden] {
  display: none !important;
}

.team-section {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
}

.team-roster-panel {
  display: grid;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.064) 0%, rgba(255, 255, 255, 0.027) 100%),
    var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.team-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-section h2,
.team-card h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}


.team-overview-summary {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.026)),
    rgba(255, 255, 255, 0.035);
}

@property --win-pct-animated {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

.team-win-donut {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #2f80ed calc(var(--win-pct-animated, var(--win-pct, 0)) * 1%), rgba(255, 255, 255, 0.14) 0);
  animation: team-donut-fill 980ms cubic-bezier(0.18, 0.85, 0.2, 1) 180ms both;
}

.team-win-donut::before {
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: #1a1c21;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 0 0 1px rgba(0, 0, 0, 0.16);
  content: "";
}

.team-win-donut strong {
  position: relative;
  z-index: 1;
  color: #7ab5ff;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.team-overview-text {
  min-width: 0;
}

.team-overview-title {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 950;
  line-height: 1;
}

.team-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-overview-item {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 86px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.team-overview-item span {
  display: block;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.team-overview-item strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #f8fbff;
  font-size: 1.2rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.team-tab-panel:not([hidden]) {
  animation: team-panel-enter 360ms ease both;
}

.team-overview-summary {
  animation: team-overview-card-enter 480ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.team-overview-recent {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  animation: team-overview-card-enter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms both;
}

.team-overview-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-overview-subhead h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.team-overview-game-list .team-game-row {
  animation: team-game-row-enter 420ms ease both;
}

.team-overview-game-list .team-game-row:nth-child(2) {
  animation-delay: 40ms;
}

.team-overview-game-list .team-game-row:nth-child(3) {
  animation-delay: 80ms;
}

.team-overview-game-list .team-game-row:nth-child(4) {
  animation-delay: 120ms;
}

.team-overview-game-list .team-game-row:nth-child(5) {
  animation-delay: 160ms;
}



.team-overview-recent-section {
  animation: team-overview-card-enter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms both;
}

.team-recent-result-list {
  display: grid;
  gap: 10px;
}

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

.team-recent-load-more:hover,
.team-recent-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);
}

.team-recent-result-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(128px, 0.55fr) minmax(286px, 0.95fr);
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045));
  color: var(--text);
  text-decoration: none;
  animation: team-game-row-enter 420ms ease both;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.team-recent-result-card:hover,
.team-recent-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;
}

.team-recent-result-card.is-win {
  border-color: rgba(91, 157, 255, 0.24);
}

.team-recent-result-card.is-loss {
  border-color: rgba(255, 99, 118, 0.24);
}

.team-recent-result-card.is-win::before,
.team-recent-result-card.is-loss::before {
  position: absolute;
  inset: 16px auto 16px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  content: '';
}

.team-recent-result-card.is-win::before {
  background: linear-gradient(180deg, rgba(91, 157, 255, 0.9), rgba(91, 157, 255, 0.18));
}

.team-recent-result-card.is-loss::before {
  background: linear-gradient(180deg, rgba(255, 99, 118, 0.86), rgba(255, 99, 118, 0.16));
}

.team-recent-result-card.is-win:hover,
.team-recent-result-card.is-win:focus-visible {
  border-color: rgba(91, 157, 255, 0.36);
}

.team-recent-result-card.is-loss:hover,
.team-recent-result-card.is-loss:focus-visible {
  border-color: rgba(255, 99, 118, 0.36);
}

.team-recent-result-card:nth-child(2) {
  animation-delay: 40ms;
}

.team-recent-result-card:nth-child(3) {
  animation-delay: 80ms;
}

.team-recent-result-card:nth-child(4) {
  animation-delay: 120ms;
}

.team-recent-result-card:nth-child(5) {
  animation-delay: 160ms;
}

.team-recent-content {
  min-width: 0;
  overflow: visible;
}

.team-recent-game-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}

.team-recent-game-meta span {
  white-space: nowrap;
}

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



.team-recent-pitcher-line {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
}

.team-recent-pitcher-photo {
  display: inline-grid;
  width: 28px;
  height: 28px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.team-recent-pitcher-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-recent-pitcher-name {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

.team-recent-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;
}

.team-recent-score-team {
  display: grid;
  min-width: 64px;
  justify-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

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

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

.team-recent-score-vs {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.team-recent-scoreline strong.is-loser {
  color: #737782;
}

@media (max-width: 700px) {
  .team-recent-result-card {
    grid-template-columns: minmax(96px, 0.58fr) minmax(190px, 0.92fr);
    gap: 9px;
    padding: 16px;
    border-radius: 20px;
  }

  .team-recent-game-meta {
    font-size: 0.84rem;
  }

  

.team-recent-pitcher-line {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
}

.team-recent-pitcher-photo {
  display: inline-grid;
  width: 28px;
  height: 28px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.team-recent-pitcher-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-recent-pitcher-name {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

.team-recent-scoreline {
    width: min(100%, 190px);
    gap: 7px;
    font-size: 1.12rem;
  }

  .team-recent-score-team {
    min-width: 52px;
    font-size: 0.58rem;
  }

  .team-recent-score-team img {
    width: 29px;
    height: 29px;
  }

  .team-recent-score-team em {
    max-width: 58px;
  }

  .team-recent-score-vs {
    font-size: 0.74rem;
  }
}

@keyframes team-panel-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes team-overview-card-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes team-game-row-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes team-donut-fill {
  from {
    --win-pct-animated: 0;
  }
  to {
    --win-pct-animated: var(--win-pct);
  }
}

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.team-metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.team-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.team-metric strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
}

.team-games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-schedule-calendar {
  display: grid;
  min-width: 0;
  color-scheme: dark;
}

#team-schedule-section {
  overflow: hidden;
  padding: 0;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.064) 0%, rgba(255, 255, 255, 0.027) 100%),
    var(--card);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

#team-schedule-section .team-section-head {
  display: none;
}

.team-schedule-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: 42px auto 42px;
  width: fit-content;
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.team-schedule-toolbar::after {
  position: absolute;
  right: -100vw;
  bottom: 0;
  left: -100vw;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  content: "";
}

.team-schedule-nav {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.team-schedule-nav svg {
  width: 21px;
  height: 21px;
}

.team-schedule-nav:hover,
.team-schedule-nav:focus-visible {
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  outline: none;
  transform: scale(1.04);
}

.team-schedule-month-picker {
  display: inline-flex;
  min-width: 116px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  border: 0;
  background: transparent;
}

.team-schedule-month-picker:focus-visible {
  border-radius: 10px;
  outline: 2px solid rgba(122, 181, 255, 0.62);
  outline-offset: 2px;
}

.team-schedule-month-picker svg {
  width: 15px;
  height: 15px;
  color: var(--quiet);
}

.team-schedule-month-picker-wrap {
  position: relative;
}

.team-schedule-month-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 100;
  width: min(292px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(22, 24, 30, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(20px);
  transform-origin: top center;
  animation: team-month-picker-enter 180ms ease both;
}

.team-schedule-year-nav {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  margin-bottom: 12px;
}

.team-schedule-year-nav strong {
  color: #f5f7fb;
  font-size: 16px;
  text-align: center;
}

.team-schedule-year-nav button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.team-schedule-year-nav button:hover,
.team-schedule-year-nav button:focus-visible {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  outline: none;
}

.team-schedule-year-nav svg {
  width: 18px;
  height: 18px;
}

.team-schedule-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.team-schedule-month-grid button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.team-schedule-month-grid button:hover,
.team-schedule-month-grid button:focus-visible {
  border-color: rgba(122, 181, 255, 0.28);
  background: rgba(122, 181, 255, 0.12);
  color: #fff;
  outline: none;
}

.team-schedule-month-grid button.is-current {
  color: #9fcbff;
}

.team-schedule-month-grid button.is-selected {
  border-color: rgba(122, 181, 255, 0.38);
  background: rgba(122, 181, 255, 0.2);
  color: #fff;
}

@keyframes team-month-picker-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -5px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.team-schedule-list {
  display: grid;
  min-width: 0;
  padding: 0 28px 32px;
}

.team-schedule-row {
  display: grid;
  grid-template-columns: 112px 78px 76px minmax(0, 1fr) 92px;
  min-width: 0;
  min-height: 108px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.085);
  color: var(--text);
  text-decoration: none;
  transition: background 160ms ease;
}

.team-schedule-row:hover,
.team-schedule-row:focus-visible {
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

.team-schedule-date {
  min-width: 0;
  color: #f5f7fb;
  font-size: 16px;
  font-style: normal;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.team-schedule-meta {
  display: grid;
  min-width: 0;
  justify-items: start;
  gap: 8px;
}

.team-schedule-location {
  display: inline-grid;
  min-width: 52px;
  height: 24px;
  padding: 0 9px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.team-schedule-time {
  min-height: 20px;
  color: #d6d9e0;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.team-schedule-opponent-logo {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  justify-self: center;
}

.team-schedule-opponent-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.team-schedule-opponent-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f5f7fb;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-schedule-status {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.team-schedule-row.is-live .team-schedule-status {
  color: #55d68a;
}

.team-schedule-row.is-canceled .team-schedule-status,
.team-schedule-row.is-delayed .team-schedule-status {
  color: var(--quiet);
}

.team-schedule-row.is-canceled,
.team-schedule-row.is-delayed {
  background: rgba(255, 255, 255, 0.018);
}

.team-schedule-message {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 32px 20px 120px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.team-schedule-message.is-error {
  color: #ff9c95;
}

.team-schedule-toolbar.is-loading {
  width: 100%;
}

.team-schedule-month-skeleton,
.team-schedule-row.is-skeleton > span {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055) 25%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.055) 75%);
  background-size: 220% 100%;
  animation: schedule-skeleton 1.25s linear infinite;
}

.team-schedule-month-skeleton {
  grid-column: 1 / -1;
  width: 112px;
  height: 22px;
  justify-self: center;
}

.team-schedule-row.is-skeleton {
  pointer-events: none;
}

.team-schedule-row.is-skeleton > span {
  width: 70%;
  height: 18px;
}

.team-schedule-row.is-skeleton > span:nth-child(3) {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  justify-self: center;
}

@keyframes schedule-skeleton {
  to {
    background-position: -220% 0;
  }
}

@media (max-width: 700px) {
  #team-schedule-section {
    border-radius: 18px;
  }

  .team-schedule-toolbar {
    grid-template-columns: 36px auto 36px;
    min-height: 68px;
    gap: 7px;
  }

  .team-schedule-toolbar::after {
    right: -50vw;
    left: -50vw;
  }

  .team-schedule-nav {
    width: 34px;
    height: 34px;
  }

  .team-schedule-month-picker {
    min-width: 102px;
    height: 38px;
    font-size: 18px;
  }

  .team-schedule-list {
    padding: 0 12px 118px;
  }

  .team-schedule-row {
    grid-template-columns: 62px 48px 46px minmax(0, 1fr) 44px;
    min-height: 102px;
    gap: 4px;
  }

  .team-schedule-date {
    font-size: 12px;
  }

  .team-schedule-meta {
    gap: 7px;
  }

  .team-schedule-location {
    min-width: 43px;
    height: 22px;
    padding: 0 5px;
    font-size: 9px;
  }

  .team-schedule-time {
    font-size: 11px;
  }

  .team-schedule-opponent-logo {
    width: 44px;
    height: 52px;
  }

  .team-schedule-opponent-logo img {
    width: 42px;
    height: 42px;
  }

  .team-schedule-opponent-name {
    font-size: 12px;
  }

  .team-schedule-status {
    font-size: 11px;
  }

  .team-schedule-message {
    min-height: 180px;
    padding-bottom: 120px;
  }
}

.team-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  box-shadow: none;
}

.team-game-list {
  display: grid;
  gap: 8px;
}

.team-game-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.team-game-row:hover,
.team-roster-player:hover {
  background: rgba(255, 255, 255, 0.065);
}

.team-game-matchup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.team-game-team {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.team-game-team img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.team-game-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-game-vs {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
}

.team-game-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}

.team-game-score {
  font-size: 14px;
  font-weight: 950;
}

.team-game-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.team-empty {
  padding: 15px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.team-roster {
  display: grid;
  gap: 16px;
}

.team-roster-group {
  display: grid;
  gap: 8px;
}

.team-roster-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.team-roster-filter-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.team-roster-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-roster-filter-head h3 {
  margin: 0;
  color: #f5f7fb;
  font-size: 15px;
  font-weight: 900;
}

.team-roster-filter-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 850;
}

.team-roster-filter-select select {
  min-width: 118px;
  height: 34px;
  padding: 0 32px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(18, 21, 28, 0.82);
  color: #f4f7fb;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  outline: none;
}

.team-roster-filter-select select:focus-visible {
  border-color: rgba(122, 181, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(122, 181, 255, 0.14);
}

.team-roster-category-panels {
  display: grid;
  gap: 10px;
}

.team-roster-category-panels.is-leaving {
  opacity: 0;
  transform: translateY(-7px);
  filter: blur(2px);
  transition: opacity 140ms ease, transform 140ms ease, filter 140ms ease;
}

.team-roster-category-panels.is-entering {
  animation: roster-category-enter 340ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.team-roster-category-panels.is-entering .team-roster-player {
  animation: roster-player-enter 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.team-roster-category-panels.is-entering .team-roster-player:nth-child(2) { animation-delay: 25ms; }
.team-roster-category-panels.is-entering .team-roster-player:nth-child(3) { animation-delay: 50ms; }
.team-roster-category-panels.is-entering .team-roster-player:nth-child(4) { animation-delay: 75ms; }
.team-roster-category-panels.is-entering .team-roster-player:nth-child(n + 5) { animation-delay: 95ms; }

@keyframes roster-category-enter {
  from {
    opacity: 0;
    transform: translateY(9px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes roster-player-enter {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-roster-category-panels.is-leaving,
  .team-roster-category-panels.is-entering,
  .team-roster-category-panels.is-entering .team-roster-player {
    animation: none;
    filter: none;
    transition: none;
    transform: none;
  }
}

.team-roster-category-panel[hidden] {
  display: none;
}

.team-roster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.team-roster-player {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.team-roster-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.085);
}

.team-roster-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-roster-info {
  min-width: 0;
}

.team-roster-info strong,
.team-roster-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-roster-info strong {
  font-size: 13px;
  font-weight: 900;
}

.team-roster-info span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.team-roster-favorite-btn {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.team-roster-favorite-btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.team-roster-favorite-btn.is-active {
  color: #ffd700;
}

.team-roster-favorite-btn:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

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

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

.skeleton {
  min-height: 160px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.04);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.1s linear infinite;
}

@keyframes skeleton-shimmer {
  to {
    background-position: -220% 0;
  }
}

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

  .team-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .team-page {
    width: min(100% - 28px, 640px);
    padding: 18px 0 110px;
  }

  .team-hero {
    gap: 22px;
    min-height: 240px;
    padding: 18px;
  }

  .team-hero::before {
    right: -40px;
    width: 240px;
    height: 240px;
    opacity: 0.13;
  }

  .team-hero-main {
    padding-top: 32px;
  }

  .team-hero-kicker {
    top: 18px;
    left: 18px;
    max-width: calc(100vw - 64px);
  }

  .team-hero-main h1 {
    font-size: 40px;
  }

  .team-hero-summary {
    gap: 8px;
  }

  .team-hero-stat {
    min-height: 34px;
    padding: 0 11px;
  }

  .team-hero-stat strong {
    font-size: 16px;
  }

  .team-tab-card,
  .team-section {
    padding: 14px;
    border-radius: 18px;
  }

  .team-overview-summary {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    padding: 16px;
  }

  .team-win-donut {
    width: 104px;
    height: 104px;
  }

  .team-win-donut::before {
    inset: 12px;
  }

  .team-win-donut strong {
    font-size: 22px;
  }

  .team-overview-title {
    text-align: left;
    font-size: 22px;
  }

  .team-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .team-overview-item {
    min-height: 74px;
    padding: 14px;
    border-radius: 18px;
  }

  .team-overview-item span {
    margin-bottom: 8px;
    font-size: clamp(0.68rem, 3vw, 0.78rem);
  }

  .team-overview-item strong {
    font-size: clamp(0.9rem, 3.8vw, 1.02rem);
  }

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

  .team-games-grid,
  .team-roster-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-roster-filter-card .team-roster-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-game-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-game-meta {
    justify-items: start;
    text-align: left;
  }
}

.team-roster-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.team-roster-list-group {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.team-roster-list-group h3 {
  margin: 0;
  color: #f5f7fb;
  font-size: 15px;
  font-weight: 900;
}

.team-roster-list {
  display: grid;
  gap: 8px;
}

.team-roster-list-player {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.team-roster-list-player:hover,
.team-roster-list-player:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(124, 146, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.team-roster-list-rank {
  color: #7ab5ff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.team-roster-avatar.is-small {
  width: 34px;
  height: 34px;
}

.team-roster-list-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-roster-list-info strong,
.team-roster-list-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-roster-list-info strong {
  font-size: 13px;
  font-weight: 900;
}

.team-roster-list-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.team-empty.is-compact {
  min-height: 44px;
  padding: 12px;
  border-radius: 14px;
  font-size: 12px;
}

.team-batting-order-group {
  align-content: start;
}

.team-batting-order-table {
  display: grid;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.team-batting-order-head,
.team-batting-order-row {
  display: grid;
  width: max(100%, 520px);
  grid-template-columns: 28px minmax(104px, 1fr) repeat(4, minmax(38px, 0.42fr));
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-batting-order-head {
  padding: 0 8px 6px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.team-batting-order-head span:not(:nth-child(2)),
.team-batting-order-row > span:not(.team-batting-order-player) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.team-batting-order-head span:nth-child(n + 4),
.team-batting-order-row > span:nth-child(n + 4) {
  border-left: 1px solid rgba(255, 255, 255, 0.085);
}

.team-batting-order-head span:nth-child(n + 4),
.team-batting-order-row > span:nth-child(n + 4) {
  padding-left: 6px;
}

.team-batting-order-body {
  display: grid;
  gap: 6px;
}

.team-batting-order-row {
  min-height: 43px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.032);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.team-batting-order-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.046);
}

.team-batting-order-row:hover,
.team-batting-order-row:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(124, 146, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.team-batting-order-slot {
  color: #7ab5ff;
  font-size: 13px;
  font-weight: 950;
}

.team-batting-order-player {
  display: inline-grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  text-align: left;
}

.team-batting-order-info {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
}

.team-batting-order-info strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-batting-order-info strong {
  color: #f7f9fe;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.team-batting-order-info em {
  color: #aeb4bf;
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .team-roster-feature-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .team-tabs {
    justify-content: center;
  }

  .team-tab-card {
    padding-bottom: 8px;
  }
}

.team-roster-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.team-roster-stat-chips em {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(122, 181, 255, 0.105);
  color: #dceaff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.team-roster-stat-chips b {
  color: rgba(220, 234, 255, 0.68);
  font-size: 9px;
  font-weight: 750;
}

.team-rotation-group {
  min-width: 0;
  align-content: start;
  overflow: hidden;
}

.team-rotation-shell {
  position: relative;
  overflow: hidden;
}

.team-rotation-slider {
  --rotation-card-width: min(218px, 54%);
  --rotation-side-offset: clamp(92px, 26vw, 142px);
  --rotation-far-offset: clamp(170px, 40vw, 230px);
  position: relative;
  height: 358px;
  overflow: hidden;
  perspective: 900px;
  touch-action: pan-y;
}

.team-rotation-card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: var(--rotation-card-width);
  min-height: 252px;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06)),
    rgba(24, 27, 34, 0.96);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  transform: translateX(-50%) scale(0.78) rotateY(0deg) translateY(calc(-50% + 18px)) translateX(var(--rotation-drag-x, 0px));
  transform-origin: center;
  transition: transform 520ms cubic-bezier(0.22, 0.8, 0.25, 1), opacity 420ms ease, filter 420ms ease, border-color 180ms ease, background 180ms ease;
  will-change: transform, opacity;
}

.team-rotation-card.is-active {
  z-index: 3;
  opacity: 1;
  filter: none;
  pointer-events: auto;
  transform: translateX(-50%) scale(1) rotateY(0deg) translateY(-50%) translateX(var(--rotation-drag-x, 0px));
}

.team-rotation-card.is-before {
  z-index: 2;
  opacity: 0.58;
  filter: blur(0.7px) saturate(0.82) brightness(0.82);
  pointer-events: auto;
  transform: translateX(calc(-50% - var(--rotation-side-offset))) scale(0.88) rotateY(10deg) translateY(calc(-50% + 10px)) translateX(var(--rotation-drag-x, 0px));
}

.team-rotation-card.is-after {
  z-index: 2;
  opacity: 0.58;
  filter: blur(0.7px) saturate(0.82) brightness(0.82);
  pointer-events: auto;
  transform: translateX(calc(-50% + var(--rotation-side-offset))) scale(0.88) rotateY(-10deg) translateY(calc(-50% + 10px)) translateX(var(--rotation-drag-x, 0px));
}

.team-rotation-card.is-far-before {
  z-index: 1;
  opacity: 0;
  filter: blur(1.4px) saturate(0.72) brightness(0.72);
  transform: translateX(calc(-50% - var(--rotation-far-offset))) scale(0.74) rotateY(18deg) translateY(calc(-50% + 22px)) translateX(var(--rotation-drag-x, 0px));
}

.team-rotation-card.is-far-after {
  z-index: 1;
  opacity: 0;
  filter: blur(1.4px) saturate(0.72) brightness(0.72);
  transform: translateX(calc(-50% + var(--rotation-far-offset))) scale(0.74) rotateY(-18deg) translateY(calc(-50% + 22px)) translateX(var(--rotation-drag-x, 0px));
}

.team-rotation-card.is-hidden {
  z-index: 0;
  opacity: 0;
  transform: translateX(-50%) scale(0.7) rotateY(0deg) translateY(calc(-50% + 28px)) translateX(var(--rotation-drag-x, 0px));
}

.team-rotation-slider.is-dragging {
  cursor: grabbing;
}

.team-rotation-slider.is-dragging .team-rotation-card {
  transition: none;
  user-select: none;
}

.team-rotation-card:hover,
.team-rotation-card:focus-visible {
  border-color: rgba(122, 181, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.075)),
    rgba(25, 29, 37, 0.98);
  outline: none;
}

@media (min-width: 701px) {
  .team-rotation-slider {
    height: 474px;
  }
}

@media (max-width: 700px) {
  .team-rotation-slider {
    height: 366px;
  }

  .team-rotation-slider {
    --rotation-card-width: min(206px, 66%);
    --rotation-side-offset: clamp(116px, 34vw, 138px);
    --rotation-far-offset: clamp(190px, 54vw, 236px);
  }

  .team-rotation-card {
    min-height: 258px;
  }

  .team-rotation-card.is-before {
    transform: translateX(calc(-50% - var(--rotation-side-offset))) scale(0.78) rotateY(12deg) translateY(calc(-50% + 16px)) translateX(var(--rotation-drag-x, 0px));
  }

  .team-rotation-card.is-after {
    transform: translateX(calc(-50% + var(--rotation-side-offset))) scale(0.78) rotateY(-12deg) translateY(calc(-50% + 16px)) translateX(var(--rotation-drag-x, 0px));
  }

  .team-rotation-card.is-far-before {
    transform: translateX(calc(-50% - var(--rotation-far-offset))) scale(0.7) rotateY(14deg) translateY(calc(-50% + 24px)) translateX(var(--rotation-drag-x, 0px));
  }

  .team-rotation-card.is-far-after {
    transform: translateX(calc(-50% + var(--rotation-far-offset))) scale(0.7) rotateY(-14deg) translateY(calc(-50% + 24px)) translateX(var(--rotation-drag-x, 0px));
  }
}
.team-rotation-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(122, 181, 255, 0.9), rgba(122, 181, 255, 0.08));
}

.team-rotation-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-rotation-top b,
.team-rotation-top em {
  display: inline-grid;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  line-height: 1;
}

.team-rotation-top b {
  padding: 0 9px;
  background: rgba(122, 181, 255, 0.13);
  color: #e8f3ff;
  font-size: 11px;
  font-weight: 900;
}

.team-rotation-top em {
  min-width: 28px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.team-rotation-photo {
  display: grid;
  width: 86px;
  height: 86px;
  margin: 2px auto 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.18), transparent 46%),
    rgba(255, 255, 255, 0.06);
}

.team-rotation-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-rotation-photo.is-empty::before {
  color: rgba(255, 255, 255, 0.38);
  content: "P";
  font-size: 34px;
  font-weight: 950;
}

.team-rotation-name {
  overflow: hidden;
  color: #f6f8fc;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-rotation-primary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.team-rotation-primary-stats span,
.team-rotation-secondary-stats span {
  display: grid;
  min-height: 54px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.team-rotation-primary-stats small,
.team-rotation-secondary-stats small {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.team-rotation-primary-stats b {
  color: #f8fbff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.team-rotation-secondary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.team-rotation-secondary-stats b {
  color: #f8fbff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}



.team-rotation-head {
  display: flex;
  min-height: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-rotation-head h3 {
  margin: 0;
  color: #f5f7fb;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.team-rotation-view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.team-rotation-view-toggle button {
  min-width: 44px;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.team-rotation-view-toggle button.is-active {
  background: rgba(122, 181, 255, 0.17);
  color: #e8f3ff;
}

.team-rotation-shell.is-view-leaving,
.team-rotation-table.is-view-leaving {
  opacity: 0;
  transform: translateY(-5px) scale(0.992);
  transition: opacity 150ms ease, transform 150ms ease;
}

.team-rotation-shell.is-view-entering,
.team-rotation-table.is-view-entering {
  animation: team-rotation-view-enter 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes team-rotation-view-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.team-rotation-table {
  width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.team-rotation-table-head,
.team-rotation-table-row {
  display: grid;
  width: max(100%, 580px);
  grid-template-columns: 30px minmax(142px, 1fr) repeat(5, minmax(52px, 0.42fr));
  align-items: center;
  gap: 7px;
}

.team-rotation-table-head {
  padding: 0 9px 7px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
}

.team-rotation-table-head span:not(:nth-child(2)),
.team-rotation-table-row > span:not(.team-rotation-table-player) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.team-rotation-table-head span:nth-child(n + 4),
.team-rotation-table-row > span:nth-child(n + 4) {
  padding-left: 7px;
  border-left: 1px solid rgba(255, 255, 255, 0.085);
}

.team-rotation-table-body {
  display: grid;
  gap: 6px;
}

.team-rotation-table-row {
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.team-rotation-table-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.team-rotation-table-rank {
  color: #7ab5ff;
  font-weight: 950;
}

.team-rotation-table-player {
  display: grid;
  min-width: 0;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.team-rotation-table-player strong {
  overflow: hidden;
  color: #f7f9fe;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .team-rotation-table-head,
  .team-rotation-table-row {
    width: max(100%, 478px);
    grid-template-columns: 24px minmax(126px, 1fr) repeat(5, 48px);
    gap: 4px;
  }

  .team-rotation-table-head span:nth-child(n + 4),
  .team-rotation-table-row > span:nth-child(n + 4) {
    padding-left: 4px;
  }

  .team-rotation-view-toggle button {
    min-width: 40px;
    min-height: 26px;
    padding: 0 7px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-rotation-shell.is-view-leaving,
  .team-rotation-table.is-view-leaving,
  .team-rotation-shell.is-view-entering,
  .team-rotation-table.is-view-entering {
    animation: none;
    transition: none;
    transform: none;
  }
}

.team-rotation-shell {
  position: relative;
  overflow: hidden;
}

.team-rotation-nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  background: rgba(20, 22, 27, 0.72);
  color: #f4f7fb;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.team-rotation-nav svg {
  width: 18px;
  height: 18px;
}

.team-rotation-nav.is-prev {
  left: 8px;
}

.team-rotation-nav.is-next {
  right: 8px;
}

.team-rotation-nav:hover,
.team-rotation-nav:focus-visible {
  transform: translateY(-50%) scale(1.04);
  border-color: rgba(122, 181, 255, 0.34);
  background: rgba(122, 181, 255, 0.18);
  outline: none;
}

@media (max-width: 700px) {
  .team-rotation-nav {
    display: none;
  }
}


/* Mobile batting order width guard */
@media (max-width: 700px) {
  .team-batting-order-table {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .team-batting-order-head,
  .team-batting-order-row {
    width: max(100%, 388px);
    grid-template-columns: 24px minmax(132px, 148px) repeat(4, 42px);
    gap: 4px;
    padding-right: 4px;
    padding-left: 4px;
    box-sizing: border-box;
  }

  .team-batting-order-head {
    font-size: 9px;
  }

  .team-batting-order-row {
    font-size: 10.5px;
  }

  .team-batting-order-head > span,
  .team-batting-order-row > span {
    min-width: 0;
  }

  .team-batting-order-head span:nth-child(n + 4),
  .team-batting-order-row > span:nth-child(n + 4) {
    padding-left: 4px;
  }

  .team-batting-order-player {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
  }

  .team-batting-order-player .team-roster-avatar.is-small {
    width: 28px;
    height: 28px;
  }

  .team-batting-order-info strong {
    font-size: 12.5px;
  }

  .team-batting-order-info em {
    font-size: 10px;
  }
}


/* Schedule cards reuse the team recent-game layout. */
.team-schedule-card-list {
  gap: 10px;
  max-height: min(680px, calc(100dvh - 210px));
  padding: 18px 20px 32px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  scrollbar-width: thin;
}

.team-schedule-card-list::-webkit-scrollbar {
  width: 6px;
}

.team-schedule-card-list::-webkit-scrollbar-track {
  background: transparent;
}

.team-schedule-card-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.team-schedule-game-card {
  width: 100%;
}

.team-schedule-game-card .team-recent-game-meta {
  gap: 8px;
}

.team-schedule-card-state {
  display: inline-grid;
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.team-schedule-card-state.is-scheduled {
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #7ab5ff;
  font-size: 0.8rem;
}

.team-schedule-card-state.is-live {
  background: rgba(76, 217, 129, 0.12);
  color: #67e39a;
}

.team-schedule-card-state.is-delayed,
.team-schedule-card-state.is-canceled {
  background: rgba(255, 255, 255, 0.045);
  color: var(--quiet);
}

.team-schedule-game-card.is-skeleton {
  min-height: 94px;
  pointer-events: none;
}

.team-schedule-game-card.is-skeleton > span {
  display: block;
  width: 70%;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055) 25%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.055) 75%);
  background-size: 220% 100%;
  animation: schedule-skeleton 1.25s linear infinite;
}

.team-schedule-game-card.is-skeleton > span:last-child {
  width: 62%;
  justify-self: center;
}

@media (max-width: 700px) {
  .team-schedule-card-list {
    max-height: calc(100dvh - 238px);
    padding: 14px 12px 96px;
  }

  .team-schedule-card-state {
    min-width: 48px;
    height: 26px;
    padding: 0 7px;
    font-size: 0.66rem;
  }

  .team-schedule-card-state.is-scheduled {
    min-width: 0;
    height: auto;
    padding: 0;
    font-size: 0.72rem;
  }
}
