/* AI Sports Hub — broadcast / stadium editorial palette */
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Barlow:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --bg-deep: #060a10;
  --bg-panel: rgba(17, 24, 39, 0.88);
  --bg-elevated: #1a2332;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --accent-dim: rgba(251, 191, 36, 0.14);
  --accent-glow: rgba(251, 191, 36, 0.28);
  --live: #22c55e;
  --live-dim: rgba(34, 197, 94, 0.14);
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 10px;
  --radius-lg: 16px;
  --font-display: "Barlow Condensed", "Noto Sans SC", sans-serif;
  --font-body: "Barlow", "Noto Sans SC", sans-serif;
  --font: var(--font-body);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);
  --max: 1180px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-deep: #f1f5f9;
    --bg-panel: #ffffff;
    --bg-elevated: #e8edf4;
    --border: rgba(15, 23, 42, 0.1);
    --text: #0f172a;
    --text-muted: #64748b;
    --accent: #d97706;
    --accent-strong: #b45309;
    --accent-dim: rgba(217, 119, 6, 0.12);
    --accent-glow: rgba(217, 119, 6, 0.2);
    --live: #16a34a;
    --live-dim: rgba(22, 163, 74, 0.12);
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
    --header-bg: rgba(255, 255, 255, 0.94);
  }

  .site-header {
    background: var(--header-bg);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  }

  .brand {
    color: #0f172a;
  }

  .nav-main a {
    color: #475569;
  }

  .nav-main a:hover {
    color: #0f172a;
  }

  .menu-toggle {
    color: #0f172a;
  }
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark light;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(251, 191, 36, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 0%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.board-page > main.wrap {
  width: calc(100vw - 120px);
  max-width: 1680px;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 1200px) {
  .board-page > main.wrap {
    width: calc(100vw - 32px);
    padding-left: 12px;
    padding-right: 12px;
  }
}

.board-page .table-scroll {
  width: 100%;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg, rgba(6, 10, 16, 0.9));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(251, 191, 36, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 16px var(--accent-glow);
  color: #0f172a;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-main a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-main a:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-main a.is-active {
  color: var(--accent);
  background: var(--accent-dim);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  background: var(--bg-panel);
}

.lang-switch a {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--text);
  text-decoration: none;
}

.lang-switch a.is-active {
  background: var(--bg-elevated);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav-main {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 8px;
  }

  .nav-main.is-open {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }
}

/* hero */
.hero {
  padding: 48px 0 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 210, 106, 0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

.hero-lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}

@media (max-width: 720px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0f172a;
  box-shadow: 0 4px 20px var(--accent-glow);
  font-weight: 700;
}

.btn-ghost {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
}

/* sections */
.section {
  padding: 28px 0 48px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .module-grid {
    grid-template-columns: 1fr;
  }
}

.module-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.module-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: var(--shadow-soft);
}

.module-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.module-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.module-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}

.module-card .btn {
  align-self: flex-start;
  padding: 10px 16px;
  font-size: 0.88rem;
}

/* placeholder inner pages */
.page-hero {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
}

/* data / predictions boards — less scroll before table */
.board-page .header-inner {
  padding: 10px 0;
}

.page-hero--data {
  padding: 10px 0 8px;
  margin-bottom: 10px;
}

.page-hero--data h1 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.page-hero--data p {
  font-size: 0.82rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.board-page .board-controls {
  padding: 12px 16px 10px;
  margin-bottom: 8px;
  gap: 12px 18px;
}

@media (min-width: 1280px) {
  #ev-controls.board-controls {
    display: grid;
    grid-template-columns: 170px 170px minmax(190px, 1fr) minmax(190px, 1fr) minmax(250px, 1.1fr) auto;
    align-items: end;
    column-gap: 14px;
    row-gap: 0;
    padding: 12px 14px;
  }

  #ev-controls .board-control,
  #ev-controls .board-actions {
    min-width: 0;
  }

  #ev-controls .board-input,
  #ev-controls .board-select {
    width: 100%;
    min-width: 0;
  }

  #ev-controls .board-actions {
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
  }

  #ev-controls .btn-ghost {
    min-height: 42px;
    padding-left: 14px;
    padding-right: 14px;
    white-space: nowrap;
  }
}

.board-page .data-meta {
  margin-bottom: 8px;
}

.data-meta--tight {
  margin-bottom: 6px;
}

.data-meta--secondary {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.76rem;
  opacity: 0.9;
}

.data-strip--after {
  margin-top: 10px;
  margin-bottom: 0;
  padding: 8px 12px;
  font-size: 0.74rem;
}

.placeholder-box {
  background: var(--bg-panel);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.placeholder-box strong {
  display: block;
  color: var(--warning);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* demo data boards */
.data-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.data-meta code {
  font-size: 0.78rem;
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.data-strip {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
  line-height: 1.45;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 1340px) {
  .board-page .table-scroll {
    overflow-x: visible;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 1280px;
}

.events-table {
  min-width: 0;
  table-layout: fixed;
}

.events-col-league { width: 7%; }
.events-col-round { width: 6.5%; }
.events-col-time { width: 11%; }
.events-col-teams { width: 18%; }
.events-col-odds { width: 7%; }
.events-col-score { width: 5.5%; }
.events-col-pick { width: 5.5%; }
.events-col-analysis { width: 15%; }
.events-col-actual { width: 5.5%; }
.events-col-hit { width: 5%; }

.pred-table {
  min-width: 1180px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.events-table th,
.events-table td {
  padding-left: 10px;
  padding-right: 10px;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.22);
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table thead tr:first-child th {
  padding-top: 8px;
  padding-bottom: 8px;
}

.data-table thead tr:nth-child(2) th {
  padding: 7px 10px;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  height: 1px;
  transition: background 0.15s ease;
}

.data-table tbody tr:hover td {
  background: rgba(251, 191, 36, 0.04);
}

.data-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.cell-time {
  white-space: nowrap;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.cell-league,
.cell-round {
  white-space: nowrap;
}

.cell-fixture-no {
  width: 48px;
  white-space: nowrap;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.cell-teams {
  min-width: 220px;
  max-width: 320px;
}

.cell-odds {
  min-width: 72px;
  white-space: nowrap;
}

.cell-handicap {
  min-width: 96px;
}

.cell-num {
  font-variant-numeric: tabular-nums;
}

.cell-all-data {
  min-width: 102px;
  max-width: 118px;
  color: var(--text-muted);
}

.th-all-data-group {
  text-align: center !important;
  vertical-align: middle;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.th-odds-company,
.odds-company-cell {
  min-width: 102px;
  max-width: 118px;
  text-align: center;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.th-odds-company {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.odds-company-cell {
  padding: 0 !important;
  height: 100%;
  position: relative;
  vertical-align: top;
}

.odds-company-cell::before {
  content: "";
  display: block;
  min-height: 72px;
}

.odds-stack {
  display: grid;
  grid-template-rows: repeat(3, minmax(24px, 1fr));
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
  position: absolute;
  inset: 0;
}

.odds-stack span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.odds-stack span:last-child {
  border-bottom: 0;
}

.odds-mini-handicap {
  color: #f07800;
  font-size: 0.76rem;
  font-weight: 700;
}

.all-data-cell {
  display: inline-block;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.odds-mini-grid {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  grid-template-rows: auto auto;
  min-width: 236px;
  max-width: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.odds-mini-head,
.odds-mini-cell {
  min-width: 0;
  padding: 4px 6px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.odds-mini-head:nth-child(3),
.odds-mini-cell:nth-child(6) {
  border-right: 0;
}

.odds-mini-head {
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.odds-mini-cell {
  display: grid;
  gap: 2px;
  align-content: center;
  font-size: 0.76rem;
  line-height: 1.15;
  border-top: 1px solid var(--border);
}

.odds-mini-cell span {
  white-space: nowrap;
}

.odds-mini-handicap {
  color: var(--accent);
  font-weight: 700;
}

.odds-lines {
  display: inline-grid;
  gap: 4px;
  line-height: 1.3;
}

.odds-line {
  min-height: 1.3em;
}

.matchup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

/* stacked home / away with vs vertically centered (Flashscore-style) */
.matchup-stack {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.matchup-stack .matchup-vs {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.85;
}

.matchup-stack .matchup-line {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.matchup-vs {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.matchup-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.matchup-inline .team-pair {
  flex: 1 1 auto;
  min-width: 0;
}

.matchup-inline .team-pair:first-child {
  justify-content: flex-end;
}

.matchup-inline .team-pair:first-child .team-name {
  text-align: right;
}

.matchup-inline .matchup-vs {
  justify-self: center;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
}

.matchup-inline .team-name {
  max-width: 13rem;
}

.team-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 0;
  max-width: 100%;
}

.team-pair img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.team-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}

.cell-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: center;
  min-width: 4.5rem;
}

.score-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  white-space: nowrap;
  line-height: 1;
}

.score-display .score-sep {
  opacity: 0.72;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag-live {
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--live);
  background: var(--live-dim);
}

.tag-hit,
.hit-badge {
  border-color: rgba(34, 197, 94, 0.55);
  color: var(--live);
  background: var(--live-dim);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.tag-miss,
.miss-badge {
  border-color: rgba(239, 68, 68, 0.55);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.14);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.cell-hit .hit-badge,
.cell-hit .tag-hit {
  min-width: 3.2rem;
  justify-content: center;
}

.cell-hit .miss-badge,
.cell-hit .tag-miss {
  min-width: 3.2rem;
  justify-content: center;
}

.cell-outcome {
  font-weight: 600;
  white-space: nowrap;
}

.cell-analysis {
  width: 17rem;
  min-width: 17rem;
  max-width: 17rem;
}

.events-table .cell-analysis {
  width: auto;
  min-width: 0;
  max-width: none;
}

.events-table .cell-league,
.events-table .cell-round,
.events-table .cell-time,
.events-table .cell-score,
.events-table .cell-outcome,
.events-table .cell-hit {
  overflow: hidden;
  text-overflow: ellipsis;
}

.events-table .cell-teams {
  min-width: 0;
  max-width: none;
}

.events-table .matchup-inline {
  min-width: 0;
}

.events-table .matchup-inline .team-name {
  max-width: 8rem;
}

.analysis-stack {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  max-width: none;
}

.analysis-model-picker {
  display: grid;
  gap: 4px;
  max-width: none;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.analysis-model-select {
  width: 100%;
  min-height: 34px;
  padding: 7px 30px 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: rgba(0, 0, 0, 0.22);
  color: var(--text);
  color-scheme: dark;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.analysis-model-select:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.analysis-model-detail {
  display: none;
  gap: 0.45rem;
}

.analysis-model-detail.is-active {
  display: grid;
}

.analysis-direction {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.analysis-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 5px 7px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.events-table .analysis-chip {
  padding-left: 6px;
  padding-right: 6px;
}

.analysis-chip-label {
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.analysis-chip-value {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.analysis-chip--accent {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.08);
}

.analysis-chip--brand {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(96, 165, 250, 0.08);
}

.analysis-chip--soft {
  border-color: rgba(125, 211, 252, 0.26);
  background: rgba(125, 211, 252, 0.07);
}

.analysis-source {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cell-hit {
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: var(--shadow-soft);
}

.product-card .img {
  height: 200px;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  padding: 16px;
}

.product-card .img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card .cat {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .price {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: auto;
}

.board-error {
  border: 1px solid rgba(255, 80, 80, 0.35);
  background: rgba(255, 80, 80, 0.08);
  color: #ffb4b4;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.model-empty {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 8px;
}

.model-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.model-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.model-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.skel {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bg-elevated), #243044, var(--bg-elevated));
  background-size: 200% 100%;
  animation: sk 1.4s ease-in-out infinite;
  margin-top: 10px;
}

.skel.w-90 {
  width: 90%;
}

.skel.w-70 {
  width: 70%;
}

.skel.w-40 {
  width: 40%;
}

@keyframes sk {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}

.fixture-preview {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.fixture-preview strong {
  color: var(--text);
}

.pred-table .pred-fixture {
  min-width: 220px;
  max-width: 300px;
}

.team-logo-ph {
  width: 26px;
  height: 26px;
  display: inline-block;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.pred-model-block {
  margin-top: 0;
}

.pred-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.pred-model-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.pred-model-title--inline {
  margin: 0;
  flex: 0 1 auto;
}

.pred-accuracy-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(61, 214, 140, 0.35);
  background: linear-gradient(135deg, rgba(61, 214, 140, 0.12), rgba(61, 214, 140, 0.04));
}

.pred-accuracy-hero--compact {
  margin: 0;
  padding: 8px 12px;
  flex: 1 1 220px;
  max-width: 100%;
}

.pred-accuracy-hero--compact .pred-acc-main {
  min-width: 0;
}

.pred-accuracy-hero--compact .pred-acc-value {
  font-size: 1.55rem;
}

.pred-accuracy-hero--compact .pred-acc-note {
  display: none;
}

.pred-accuracy-hero--compact.pred-accuracy-hero--empty {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

.pred-accuracy-hero--empty {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pred-acc-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

.pred-acc-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.pred-acc-value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pred-acc-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.pred-acc-sub {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  min-width: 120px;
}

.pred-acc-sub-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.pred-acc-sub-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pred-model-hint {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pred-model-logic {
  margin: 0 0 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

.pred-model-logic--above-table {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.pred-logic-label {
  font-weight: 600;
  color: var(--accent);
}

.pred-backtest-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.board-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.conf-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.conf-bar {
  display: inline-block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), var(--live));
  max-width: 72px;
}

.conf-val {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.meta-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.pred-details {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--shadow-soft);
}

.pred-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}

.pred-more {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
}

.pred-more > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.pred-more > summary::-webkit-details-marker {
  display: none;
}

.model-mini-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.model-mini {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.model-mini-name {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.model-mini-pick {
  font-weight: 700;
}

/* board filters & pagination */
.board-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: flex-end;
  margin-bottom: 20px;
  padding: 22px 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.board-controls::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--live), transparent);
}

.board-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.board-select,
.board-input {
  min-width: 180px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(0, 0, 0, 0.22);
  color: var(--text);
  color-scheme: dark;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.board-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}

.board-select:focus,
.board-input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.board-input[type="search"],
.board-input[type="text"].board-filter-input {
  min-width: 220px;
}

.board-filter-input {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  align-self: flex-end;
}

.board-controls .btn-ghost {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--bg-panel);
}

@media (prefers-color-scheme: light) {
  .board-controls {
    background: #f4f5f8;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: none;
  }

  .board-select,
  .board-input {
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.12);
    color-scheme: light;
  }

  .board-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c5c70' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 12px;
  }
}

.board-controls + .data-meta {
  margin: -8px 0 16px;
  padding: 0 4px;
}

.board-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.board-pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.board-pager-input {
  width: 4.5em;
  padding: 5px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  text-align: center;
}

.board-pager-input:focus {
  outline: none;
  border-color: var(--accent);
}

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

.board-pager-meta {
  margin-top: 8px;
}

.btn-ghost {
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.backtest-block {
  margin-top: 32px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.backtest-table td,
.backtest-table th {
  font-variant-numeric: tabular-nums;
}

.backtest-meta-row td {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.backtest-note {
  margin: 0 0 12px;
}

.backtest-table .metric-val {
  font-weight: 600;
  color: var(--text);
}

.pred-legend-title {
  margin: 20px 0 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
}

.field-legend {
  margin: 16px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.pred-more {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.pred-more > summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}

.pred-more > summary::-webkit-details-marker {
  display: none;
}

.pred-more > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s;
}

.pred-more[open] > summary::before {
  transform: rotate(90deg);
}

.pred-more .pred-model-hint,
.pred-more .pred-model-logic,
.pred-more .field-legend,
.pred-more .backtest-block {
  margin-left: 14px;
  margin-right: 14px;
}

.pred-more .backtest-block {
  margin-bottom: 14px;
}

.legend-table th {
  font-weight: 600;
  color: var(--accent);
  vertical-align: top;
  white-space: nowrap;
}

.legend-table td {
  font-size: 0.84rem;
  line-height: 1.55;
  vertical-align: top;
}

.legend-table .metric-val {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.backtest-legend-table {
  margin-top: 8px;
}

.pred-table .th-explained {
  vertical-align: middle;
  min-width: 88px;
}

.pred-table .th-label {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
}

.pred-table .th-tip-trigger {
  cursor: help;
  display: inline-block;
  border-bottom: 1px dashed color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.th-tip-floating {
  position: fixed;
  z-index: 9999;
  display: none;
  min-width: 240px;
  max-width: 360px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: left;
  pointer-events: auto;
}

.th-tip-floating.is-visible {
  display: block;
}

.th-tip-floating .metric-example {
  margin: 8px 0 0;
}

.th-tip-floating .metric-meaning {
  margin: 0;
}

.th-tip-floating .metric-benchmark {
  margin: 8px 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
}

.pred-table th.th-explained {
  position: relative;
  vertical-align: middle;
}

.pred-table .th-meaning {
  display: block;
  margin-top: 3px;
  font-size: 0.66rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-muted);
  max-width: 96px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th-example,
.metric-example {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--accent);
  font-weight: 500;
}

.legend-table .metric-example {
  margin-top: 6px;
}

.metric-benchmark {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* prediction direction badges */
.pick-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.pick-H {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.45);
  background: var(--accent-dim);
}

.pick-D {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.1);
}

.pick-A {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.1);
}

.pick-O {
  color: var(--live);
  border-color: rgba(34, 197, 94, 0.4);
  background: var(--live-dim);
}

.pick-U {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    overflow-x: hidden;
  }

  .wrap,
  .board-page > main.wrap {
    width: 100%;
    max-width: none;
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
    font-size: 1rem;
    letter-spacing: 0.02em;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex: 0 0 auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
  }

  .lang-switch {
    justify-self: end;
    padding: 3px;
  }

  .lang-switch a {
    padding: 6px 10px;
  }

  .nav-main {
    grid-column: 1 / -1;
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 2px;
  }

  .nav-main a {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .hero {
    padding: 28px 0 26px;
  }

  .hero-badge {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 12vw, 2.45rem);
  }

  .hero-lead {
    font-size: 0.95rem;
  }

  .hero-stats,
  .module-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta,
  .footer-inner,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-cta .btn,
  .module-card .btn {
    width: 100%;
    justify-content: center;
  }

  .section-head {
    gap: 6px;
    margin-bottom: 14px;
  }

  .section-head h2,
  .page-hero h1 {
    font-size: 1.55rem;
  }

  .page-hero {
    padding: 18px 0 14px;
  }

  .page-hero p {
    font-size: 0.9rem;
  }

  .page-hero--data p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .board-page .board-controls,
  .board-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 16px;
  }

  .board-control,
  .board-actions {
    min-width: 0;
    width: 100%;
  }

  .board-control {
    gap: 6px;
    font-size: 0.74rem;
  }

  .board-select,
  .board-input,
  .board-input[type="search"],
  .board-input[type="text"].board-filter-input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 11px 13px;
    font-size: 0.9rem;
  }

  .board-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .board-controls .btn-ghost,
  .btn-ghost {
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }

  #pred-controls .board-control:first-child,
  #ev-controls .board-control:nth-child(5) {
    grid-column: 1 / -1;
  }

  .data-meta {
    gap: 6px 10px;
    font-size: 0.76rem;
    margin-bottom: 10px;
  }

  .data-meta code {
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
  }

  .table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .table-scroll::after {
    content: "左右滑动查看更多";
    position: sticky;
    left: 0;
    display: block;
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 0.72rem;
    background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
    border-top: 1px solid var(--border);
  }

  .data-table,
  .events-table,
  .pred-table {
    width: max-content;
    min-width: 1120px;
    table-layout: fixed;
    font-size: 0.82rem;
  }

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

  .events-table th,
  .events-table td,
  .pred-table th,
  .pred-table td {
    padding-left: 8px;
    padding-right: 8px;
  }

  .events-table .cell-league,
  .events-table .cell-round,
  .events-table .cell-time,
  .events-table .cell-score,
  .events-table .cell-outcome,
  .events-table .cell-hit {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .events-col-league { width: 80px; }
  .events-col-round { width: 72px; }
  .events-col-time { width: 118px; }
  .events-col-teams { width: 210px; }
  .events-col-odds { width: 96px; }
  .events-col-score { width: 64px; }
  .events-col-pick { width: 70px; }
  .events-col-analysis { width: 190px; }
  .events-col-actual { width: 70px; }
  .events-col-hit { width: 68px; }

  .cell-all-data,
  .th-odds-company,
  .odds-company-cell {
    min-width: 96px;
    max-width: 96px;
  }

  .odds-company-cell::before {
    min-height: 84px;
  }

  .odds-stack {
    grid-template-rows: repeat(3, 28px);
    font-size: 0.82rem;
  }

  .odds-stack span {
    min-height: 28px;
    padding: 0 3px;
  }

  .odds-mini-handicap {
    font-size: 0.72rem;
    line-height: 1.05;
    white-space: normal;
    text-align: center;
  }

  .matchup-inline {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 6px;
  }

  .events-table .matchup-inline .team-name,
  .matchup-inline .team-name {
    max-width: 5.8rem;
  }

  .cell-score {
    min-width: 0;
  }

  .analysis-direction {
    min-height: 34px;
    padding: 5px 9px;
  }

  .analysis-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .analysis-chip {
    min-width: 0;
    padding: 5px 7px;
  }

  .events-table .analysis-chip {
    padding-left: 6px;
    padding-right: 6px;
  }

  .board-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
  }

  .board-pager .btn-ghost {
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .board-pager-jump {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .board-pager-input {
    flex: 1 1 auto;
    min-width: 0;
  }

  .pred-accuracy-hero {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pred-acc-main,
  .pred-acc-sub {
    min-width: 0;
  }

  .pred-more .table-scroll,
  .field-legend .table-scroll,
  .backtest-block .table-scroll {
    overflow-x: auto;
  }

  .legend-table {
    min-width: 720px;
  }
}

@media (max-width: 420px) {
  .wrap,
  .board-page > main.wrap {
    padding-left: 10px;
    padding-right: 10px;
  }

  .header-inner {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand {
    font-size: 0.96rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .menu-toggle {
    padding-left: 12px;
    padding-right: 12px;
  }

  .lang-switch a {
    padding-left: 8px;
    padding-right: 8px;
  }

  .board-page .board-controls,
  .board-controls {
    grid-template-columns: 1fr;
  }

  .board-actions {
    grid-template-columns: 1fr 1fr;
  }

  .data-table,
  .events-table {
    min-width: 1080px;
  }

  .pred-table {
    min-width: 1000px;
  }

  .events-col-league { width: 76px; }
  .events-col-round { width: 64px; }
  .events-col-time { width: 112px; }
  .events-col-teams { width: 196px; }
  .events-col-odds { width: 92px; }
  .events-col-score { width: 60px; }
  .events-col-pick { width: 66px; }
  .events-col-analysis { width: 178px; }
  .events-col-actual { width: 66px; }
  .events-col-hit { width: 64px; }

  .cell-all-data,
  .th-odds-company,
  .odds-company-cell {
    min-width: 92px;
    max-width: 92px;
  }
}

@media (prefers-color-scheme: light) {
  .pick-badge {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.12);
  }

  .pick-H {
    color: #92400e;
    border-color: rgba(180, 83, 9, 0.45);
    background: rgba(251, 191, 36, 0.22);
  }

  .pick-D {
    color: #334155;
    border-color: rgba(100, 116, 139, 0.45);
    background: rgba(148, 163, 184, 0.18);
  }

  .pick-A {
    color: #1e40af;
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(96, 165, 250, 0.18);
  }

  .pick-O {
    color: #166534;
    border-color: rgba(22, 163, 74, 0.45);
    background: rgba(34, 197, 94, 0.15);
  }

  .pick-U {
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(239, 68, 68, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
