:root {
  color-scheme: dark;
  --bg: #08080a;
  --bg-soft: #101114;
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f7f7f8;
  --muted: #a1a1aa;
  --quiet: #6f7078;
  --accent: #ffffff;
  --danger: #ff453a;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18, 18, 22, 0.88) 0%, rgba(8, 8, 10, 0.72) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, transparent 44%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  backdrop-filter: blur(24px) saturate(1.12);
}

.icon {
  width: 18px;
  height: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  font-size: 12px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 3px;
  color: var(--quiet);
  font-size: 11px;
}

.account-area {
  grid-column: 2;
  grid-row: 1;
  position: relative;
}

.profile-button {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 4px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
}

.account-name {
  max-width: 96px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

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

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(18, 18, 21, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.profile-menu-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 4px 14px;
}

.profile-menu-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-menu-name,
.profile-menu-email {
  display: block;
}

.profile-menu-name {
  font-size: 14px;
}

.profile-menu-email {
  margin-top: 4px;
  color: var(--quiet);
  font-size: 12px;
}

.membership-badge {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.profile-menu-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.profile-stat {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-stat strong,
.profile-stat span {
  display: block;
}

.profile-stat strong {
  font-size: 18px;
  line-height: 1;
}

.profile-stat span {
  margin-top: 5px;
  color: var(--quiet);
  font-size: 11px;
}

.profile-menu-actions {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.profile-menu-action {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.profile-menu-action:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-menu-action.is-danger {
  color: #ffb4ad;
}

main {
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 430px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  padding: 82px max(20px, calc((100vw - 1160px) / 2)) 34px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.02) 0%, rgba(8, 8, 10, 0.3) 48%, rgba(8, 8, 10, 0.96) 100%),
    radial-gradient(ellipse at 78% 18%, rgba(255, 255, 255, 0.24), transparent 23rem),
    radial-gradient(ellipse at 18% 82%, rgba(124, 146, 255, 0.16), transparent 28rem),
    linear-gradient(135deg, #363840 0%, #181a20 48%, #07080b 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.hero.has-player-hero {
  background:
    radial-gradient(ellipse at 76% 18%, rgba(255, 255, 255, 0.12), transparent 24rem),
    radial-gradient(ellipse at 20% 86%, rgba(124, 146, 255, 0.12), transparent 30rem),
    linear-gradient(135deg, #363840 0%, #181a20 48%, #07080b 100%);
  background-position: right -5rem top -5rem, left -10rem bottom -8rem, center;
  background-repeat: no-repeat;
  background-size: 54rem 34rem, 48rem 32rem, 100% 100%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 8, 10, 0.76) 0%, rgba(8, 8, 10, 0.28) 54%, rgba(8, 8, 10, 0.36) 100%),
    linear-gradient(to top, rgba(8, 8, 10, 0.95) 0%, rgba(8, 8, 10, 0.48) 52%, rgba(8, 8, 10, 0.18) 100%);
}

.hero.has-player-hero::after {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: 0;
  background-image: var(--hero-player-image);
  background-position: center 36%;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(0.9) contrast(1.03) brightness(0.88);
  opacity: 0.72;
  transform: scale(1.02);
}

.hero-copy,
.featured-card,
.hero-player-search {
  position: relative;
  z-index: 2;
}

.hero-player-search {
  width: min(760px, 100%);
  margin: 0 auto auto;
}

.hero-copy {
  position: absolute;
  top: 26px;
  left: max(20px, calc((100vw - 1160px) / 2));
  padding: 0;
}

.eyebrow {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 6vw, 54px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(27px, 7vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 18px;
  font-size: 20px;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.featured-card,
.game-card,
.overview-card,
.empty-card,
.note-card,
.score-detail,
.summary-card,
.timeline-card,
.official-card,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.featured-card {
  width: min(1160px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  margin-bottom: 22px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffb4ad;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 69, 58, 0.14);
}

.featured-score,
.card-score,
.detail-score {
  display: grid;
  gap: 16px;
}

.featured-score {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 760px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(8, 8, 10, 0.3);
  backdrop-filter: blur(18px);
}

.featured-score .score-row {
  align-items: center;
}

.score-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.team-code {
  display: block;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
}

.team-name {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.score {
  font-size: 56px;
  font-weight: 700;
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
}

.featured-score .team-code {
  font-size: clamp(28px, 8vw, 54px);
  letter-spacing: 0;
}

.featured-score .team-name {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.featured-score .score {
  min-width: 56px;
  font-size: clamp(34px, 9vw, 64px);
  text-align: right;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

.featured-card .meta-line {
  max-width: 780px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 650;
}

.featured-ohtani-card {
  display: grid;
  gap: 14px;
  width: min(780px, 100%);
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.featured-ohtani-layout {
  display: grid;
  grid-template-columns: clamp(112px, 13vw, 136px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 28px);
}

.featured-ohtani-photo-wrap {
  width: clamp(112px, 13vw, 136px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.28);
}

.featured-ohtani-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-ohtani-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.featured-ohtani-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.featured-ohtani-kicker {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.featured-ohtani-head h3 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
}

.featured-ohtani-meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.featured-ohtani-meta span:first-child {
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
}

.featured-ohtani-meta span,
.featured-ohtani-stats {
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

.featured-ohtani-meta span.is-switching,
.featured-ohtani-stats.is-switching {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(3px);
}

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

.featured-ohtani-stats div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  animation: featuredStatIn 360ms ease both;
}

.featured-ohtani-stats div:nth-child(2) {
  animation-delay: 28ms;
}

.featured-ohtani-stats div:nth-child(3) {
  animation-delay: 56ms;
}

.featured-ohtani-stats div:nth-child(4) {
  animation-delay: 84ms;
}

.featured-ohtani-stats div:nth-child(5) {
  animation-delay: 112ms;
}

.featured-ohtani-stats div:nth-child(6) {
  animation-delay: 140ms;
}

.featured-ohtani-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
}

.featured-ohtani-stats strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(16px, 1.8vw, 21px);
  overflow-wrap: anywhere;
}

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

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

.featured-ohtani-link {
  width: fit-content;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.featured-ohtani-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.featured-ohtani-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 700;
}

.data-status-bar {
  display: flex;
  width: min(1160px, 100%);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#mlb-player-section {
  padding-top: 20px;
}

:is(#mlb-player-section, .hero-player-search) .mlb-home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 0 auto 12px;
  max-width: 760px;
}

:is(#mlb-player-section, .hero-player-search) .mlb-home-search input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(8, 8, 10, 0.52);
  backdrop-filter: blur(16px) saturate(1.08);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
  color: var(--text);
}

:is(#mlb-player-section, .hero-player-search) .mlb-home-search button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: rgba(8, 8, 10, 0.58);
  backdrop-filter: blur(16px) saturate(1.08);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
  color: var(--text);
  cursor: pointer;
}

:is(#mlb-player-section, .hero-player-search) .mlb-home-search button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

:is(#mlb-player-section, .hero-player-search) .mlb-home-search button:hover {
  background: rgba(255, 255, 255, 0.18);
}

:is(#mlb-player-section, .hero-player-search) .mlb-search-status {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

:is(#mlb-player-section, .hero-player-search) .mlb-search-results {
  display: grid;
  gap: 10px;
  margin: 0 auto 34px;
  max-width: 760px;
}

:is(#mlb-player-section, .hero-player-search) .mlb-search-result {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

:is(#mlb-player-section, .hero-player-search) .mlb-search-result:hover {
  background: rgba(255, 255, 255, 0.08);
}

:is(#mlb-player-section, .hero-player-search) .mlb-search-result h3 {
  margin: 0 0 4px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

:is(#mlb-player-section, .hero-player-search) .mlb-search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

:is(#mlb-player-section, .hero-player-search) .mlb-result-id {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

:is(#mlb-player-section, .hero-player-search) .mlb-empty-result {
  min-width: 240px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
}

#mlb-player-section .mlb-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 18px;
}

#mlb-player-section .mlb-carousel-controls {
  display: flex;
  gap: 10px;
}

#mlb-player-section .mlb-carousel-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

#mlb-player-section .mlb-carousel-controls button:hover {
  background: rgba(255, 255, 255, 0.12);
}

#mlb-player-section .mlb-player-carousel-wrap {
  overflow: hidden;
}

#mlb-player-section .mlb-player-carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}

#mlb-player-section .mlb-player-card {
  min-width: 280px;
  width: 280px;
  flex: 0 0 auto;
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  scroll-snap-align: center;
  cursor: pointer;
  text-align: left;
}

#mlb-player-section .mlb-player-card:hover {
  transform: translateY(-2px);
}

#mlb-player-section .mlb-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

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

#mlb-player-section .mlb-card-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

#mlb-player-section .mlb-card-subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

#mlb-player-section .mlb-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#mlb-player-section .mlb-card-stat {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  min-height: 56px;
}

#mlb-player-section .mlb-card-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

#mlb-player-section .mlb-card-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

#mlb-player-section .mlb-api-notice {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  max-width: 760px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) {
  margin-top: 32px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0 14px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-games-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 420px;
  text-align: right;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-recent-games-list {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-games-divider {
  width: 100%;
  height: 1px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line), rgba(255, 255, 255, 0.02));
}

#mlb-live-games-section .mlb-games-divider {
  height: 2px;
  background: linear-gradient(90deg, #2f80ed, rgba(47, 128, 237, 0.04));
}

#mlb-recent-games-section .mlb-games-divider {
  opacity: 0.62;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-wide-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-wide-card:hover {
  transform: translateY(-1px);
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 92px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team.away {
  justify-content: flex-start;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team.home {
  justify-content: flex-end;
  text-align: right;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team.winner {
  background: rgba(255, 255, 255, 0.08);
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team img.mlb-team-logo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  object-fit: contain;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team span {
  color: var(--muted);
  font-size: 12px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team p {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  min-width: 56px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-center {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-center .mlb-game-status {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-center strong {
  font-size: 18px;
  color: var(--text);
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-center p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-center small {
  color: var(--quiet);
  font-size: 12px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-empty-result {
  padding: 30px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-recent-games-list {
    grid-template-columns: 1fr;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-wide-card {
    grid-template-columns: 1fr;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-team.home {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 650px) {
  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-recent-games-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :is(#mlb-player-section, .hero-player-search) .mlb-home-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #mlb-player-section .mlb-player-card {
    min-width: 240px;
  }
}

@media (max-width: 620px) {
  .featured-ohtani-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .featured-ohtani-photo-wrap {
    width: 112px;
  }

  .featured-ohtani-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-ohtani-meta {
    align-items: flex-start;
  }

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

  #mlb-player-section .mlb-section-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  #mlb-player-section .mlb-carousel-controls {
    width: 100%;
  }
}
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #8e8e93;
}

.source-dot.is-loading {
  background: #ffd60a;
  box-shadow: 0 0 0 5px rgba(255, 214, 10, 0.12);
}

.source-dot.is-live {
  background: #30d158;
  box-shadow: 0 0 0 5px rgba(48, 209, 88, 0.12);
}

.source-dot.is-fallback {
  background: #ff9f0a;
  box-shadow: 0 0 0 5px rgba(255, 159, 10, 0.12);
}

.refresh-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.section {
  width: min(1160px, 100%);
  margin-right: auto;
  margin-left: auto;
  margin-top: 54px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.segment {
  display: flex;
  width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.segment button,
.ghost-button {
  border: 0;
  cursor: pointer;
}

.segment button {
  flex: 1 0 auto;
  min-width: 70px;
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: 160ms ease;
}

.segment button.is-active {
  background: var(--accent);
  color: #08080a;
}

.league-tabs {
  max-width: 100%;
}

.top-league-tabs {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
}

.top-league-tabs button {
  min-width: 58px;
}

.overview-grid,
.notes-grid,
.personal-grid {
  display: grid;
  gap: 14px;
}

.overview-card,
.note-card,
.personal-card,
.empty-card {
  padding: 20px;
}

.overview-card h3 {
  margin: 10px 0 12px;
  font-size: 24px;
  line-height: 1.08;
}

.overview-card p,
.note-card p,
.personal-card p,
.empty-card {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.personal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.personal-card h3 {
  margin-bottom: 10px;
}

.personal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.metric {
  display: block;
  margin-bottom: 12px;
  font-size: 44px;
  font-weight: 750;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.metric.compact {
  font-size: 34px;
}

.game-grid {
  display: grid;
  gap: 14px;
}

.skeleton-card {
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 220% 100%;
  animation: skeletonPulse 1.2s ease-in-out infinite;
}

@keyframes skeletonPulse {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

.upcoming-grid .game-card {
  background: rgba(255, 255, 255, 0.035);
}

.game-card {
  width: 100%;
  padding: 20px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.game-card:hover {
  transform: translateY(-2px);
  background: var(--card-strong);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.sport-tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sport-tag {
  color: var(--quiet);
}

.source-tag {
  display: inline-flex;
  margin-top: 8px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill {
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.status-pill.live {
  border-color: rgba(255, 69, 58, 0.28);
  background: rgba(255, 69, 58, 0.12);
  color: #ffb4ad;
}

.card-score .team-code {
  font-size: 22px;
}

.card-score .score {
  font-size: 34px;
}

.detail-section {
  display: none;
}

.detail-section.is-open {
  display: block;
}

.detail-layout {
  display: grid;
  gap: 16px;
}

.detail-layout.lower {
  margin-top: 16px;
}

.score-detail,
.summary-card,
.timeline-card,
.official-card {
  padding: 22px;
}

.detail-title {
  margin-bottom: 28px;
}

.summary-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.timeline-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline-time {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
}

.timeline-item p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.official-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.official-link,
.ghost-button,
.account-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.official-link {
  padding: 0 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  transition: 160ms ease;
}

.account-action {
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.official-link:hover,
.ghost-button:hover,
.account-action:hover,
.account-action.is-active {
  background: var(--accent);
  color: #08080a;
}

.ghost-button {
  align-self: start;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: right;
}

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

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.team-cell strong,
.team-cell small {
  display: block;
}

.team-cell small {
  margin-top: 4px;
  color: var(--quiet);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(16px);
}

.modal-backdrop.is-open {
  display: grid;
}

.login-modal {
  width: min(480px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(18, 18, 21, 0.96);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.modal-head h2 {
  font-size: 28px;
}

.modal-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.login-form,
.interest-block {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.interest-block h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
}

.checkbox-field {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.login-submit,
.login-secondary {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.login-submit {
  background: var(--accent);
  color: #08080a;
}

.login-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.auth-toggle,
.login-status,
.modal-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-toggle button {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.interest-block {
  margin-top: 18px;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 720px) {
  .topbar {
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 24px;
    padding: 18px clamp(28px, 5vw, 72px);
  }

  .top-league-tabs {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .account-area {
    grid-column: 2;
    justify-self: end;
  }

  main {
    padding: 0 28px 96px;
  }

  .data-status-bar {
    margin-top: 22px;
  }

  .hero {
    min-height: clamp(620px, 74vh, 760px);
    background-size: 100% 100%, 54rem 34rem, 48rem 32rem, 100% 100%;
    background-position: center, right -6rem top -5rem, left -10rem bottom -8rem, center;
  }

  .hero.has-player-hero {
    background-size: 64rem 40rem, 52rem 34rem, 100% 100%;
    background-position: right -8rem top -6rem, left -12rem bottom -9rem, center;
  }

  .hero.has-player-hero::after {
    inset: -16px;
    background-position: center 40%;
    opacity: 0.76;
    transform: scale(1.08);
  }

  .section-head {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
  }

  .segment {
    width: auto;
  }

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

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

  .overview-card.wide {
    grid-column: span 4;
  }

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

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

  .detail-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  }
}

@media (min-width: 1040px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .overview-grid {
    grid-template-columns: 1.5fr repeat(4, 1fr);
  }

  .overview-card.wide {
    grid-column: span 1;
  }

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

  .featured-card {
    padding: 0;
  }

  .featured-score {
    max-width: 860px;
  }

  .featured-score .score-row {
    display: flex;
  }

  .featured-card .meta-line {
    max-width: 860px;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f7f8;
    --bg-soft: #ffffff;
    --card: rgba(255, 255, 255, 0.84);
    --card-strong: #ffffff;
    --line: rgba(0, 0, 0, 0.11);
    --text: #101114;
    --muted: #55565c;
    --quiet: #85868d;
    --shadow: none;
  }

  body {
    background: #f7f7f8;
  }

  .topbar {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 247, 248, 0.74) 100%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, transparent 44%, rgba(0, 0, 0, 0.025) 100%);
  }
}

/* Recent Games — Scoreboard list (scoped only under :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section)) */
:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-recent-games-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.078) 0%, rgba(255, 255, 255, 0.034) 100%),
    var(--card);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-row:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105) 0%, rgba(255, 255, 255, 0.048) 100%),
    var(--card-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-team.mlb-away-team {
  justify-content: flex-start;
  text-align: left;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-team.mlb-home-team {
  justify-content: flex-end;
  text-align: right;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-team-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-team-text strong {
  font-size: 14px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-home-badge {
  display: inline-block;
  font-size: 10px;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-weight: 800;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-probable,
:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-probable-pitcher {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-team-record {
  display: none;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-date,
:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-time,
:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-venue {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-time {
  color: var(--text);
  font-weight: 700;
}

#mlb-recent-games-section .mlb-game-time {
  display: none;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-venue {
  display: none;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-center {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  min-width: 26px;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score.is-loser {
  opacity: 0.55;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-state {
  font-size: 12px;
  color: #2f80ed; /* blue emphasis for status */
  font-weight: 800;
}

:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-row small,
:is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-row .row-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-recent-games-list {
    grid-template-columns: 1fr;
  }
}

/* mobile: stack rows vertically */
@media (max-width: 768px) {
  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-row {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    padding: 14px;
    min-height: auto;
    gap: 10px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-team {
    justify-content: flex-start;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-logo {
    width: 40px;
    height: 40px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-team-text strong {
    font-size: 16px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score {
    font-size: 28px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-state {
    font-size: 14px;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 56px;
    padding: 10px 14px;
    gap: 10px;
  }

  .brand {
    gap: 0;
  }

  .brand strong {
    font-size: 14px;
  }

  .profile-button {
    height: 38px;
    gap: 7px;
    padding: 3px 4px 3px 10px;
  }

  .account-name {
    max-width: 72px;
    font-size: 12px;
  }

  .profile-avatar {
    width: 28px;
    height: 28px;
  }

  main {
    padding: 0 12px 56px;
  }

  .section {
    width: 100%;
    margin-top: 28px;
  }

  .hero {
    min-height: auto;
    width: calc(100% + 24px);
    margin-left: -12px;
    padding: 72px 12px 22px;
  }

  .hero.has-player-hero::after {
    background-position: center top;
    opacity: 0.58;
  }

  .hero::before {
    background:
      linear-gradient(to top, rgba(8, 8, 10, 0.96) 0%, rgba(8, 8, 10, 0.62) 54%, rgba(8, 8, 10, 0.28) 100%);
  }

  .hero-player-search {
    width: 100%;
    margin-bottom: 22px;
  }

  :is(#mlb-player-section, .hero-player-search) .mlb-home-search {
    gap: 8px;
    margin-bottom: 8px;
  }

  :is(#mlb-player-section, .hero-player-search) .mlb-home-search input {
    height: 44px;
    padding: 0 13px;
    border-radius: 13px;
    font-size: 14px;
  }

  :is(#mlb-player-section, .hero-player-search) .mlb-home-search button {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  :is(#mlb-player-section, .hero-player-search) .mlb-search-results {
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 0;
  }

  :is(#mlb-player-section, .hero-player-search) .mlb-search-result {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 13px;
  }

  :is(#mlb-player-section, .hero-player-search) .mlb-result-id {
    display: none;
  }

  .featured-ohtani-card {
    margin-top: 0;
  }

  .featured-ohtani-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .featured-ohtani-photo-wrap {
    width: 72px;
    align-self: start;
  }

  .featured-ohtani-head {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
  }

  .featured-ohtani-kicker {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .featured-ohtani-head h3 {
    font-size: 24px;
  }

  .featured-ohtani-meta {
    align-items: flex-end;
    gap: 2px;
    font-size: 11px;
  }

  .featured-ohtani-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .featured-ohtani-stats div {
    min-height: 52px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  .featured-ohtani-stats span {
    font-size: 10px;
  }

  .featured-ohtani-stats strong {
    margin-top: 4px;
    font-size: 16px;
  }

  .featured-ohtani-link {
    grid-column: 1 / -1;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) {
    margin-top: 18px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-games-divider {
    margin-bottom: 10px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-recent-games-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: 74px;
    padding: 11px 12px;
    gap: 8px;
    border-radius: 14px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-team {
    gap: 6px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-team.mlb-home-team {
    justify-content: flex-end;
    text-align: right;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-logo {
    width: 28px;
    height: 28px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-team-text strong {
    font-size: 12px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-home-badge {
    display: none;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-probable-pitcher {
    display: block;
    max-width: 88px;
    font-size: 9px;
    line-height: 1.15;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-center {
    min-width: 70px;
    gap: 2px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score-line {
    gap: 5px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score {
    min-width: 20px;
    font-size: 20px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-state {
    font-size: 11px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-date,
  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-game-time {
    font-size: 10px;
  }

  #mlb-player-section {
    padding-top: 0;
  }

  #mlb-player-section .mlb-section-title-row {
    align-items: flex-end;
    flex-direction: row;
    justify-content: flex-end;
    margin: 0 0 10px;
  }

  #mlb-player-section .mlb-carousel-controls {
    width: auto;
    gap: 8px;
  }

  #mlb-player-section .mlb-carousel-controls button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  #mlb-player-section .mlb-player-carousel {
    gap: 10px;
    padding-bottom: 2px;
    scroll-padding-left: 2px;
  }

  #mlb-player-section .mlb-player-card {
    width: min(260px, 82vw);
    min-width: min(260px, 82vw);
    padding: 16px;
    border-radius: 20px;
  }

  #mlb-player-section .mlb-card-avatar {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
  }

  #mlb-player-section .mlb-card-title {
    margin-bottom: 5px;
    font-size: 16px;
  }

  #mlb-player-section .mlb-card-subtitle {
    margin-bottom: 12px;
    font-size: 12px;
  }

  #mlb-player-section .mlb-card-grid {
    gap: 8px;
  }

  #mlb-player-section .mlb-card-stat {
    min-height: 50px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  #mlb-player-section .mlb-card-stat span {
    font-size: 10px;
  }

  #mlb-player-section .mlb-card-stat strong {
    margin-top: 4px;
    font-size: 14px;
  }
}

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

  .hero {
    width: calc(100% + 20px);
    margin-left: -10px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .featured-ohtani-layout {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .featured-ohtani-photo-wrap {
    width: 60px;
  }

  .featured-ohtani-head h3 {
    font-size: 21px;
  }

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

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-row {
    padding: 10px;
    gap: 6px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-logo {
    width: 24px;
    height: 24px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-scoreboard-center {
    min-width: 62px;
  }

  :is(#mlb-live-games-section, #mlb-upcoming-games-section, #mlb-recent-games-section) .mlb-score {
    min-width: 18px;
    font-size: 18px;
  }
}
