/* Season controls and the pre-match board. Match-statistics layouts stay unchanged. */
.season-picker { padding: 28px; border: 1px solid #335742; border-radius: 12px; background: linear-gradient(130deg, rgba(31,51,39,.7), rgba(20,24,22,.94)); text-align: left; box-shadow: 0 20px 70px #0004; }
.season-picker-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.season-picker-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.025em; }
.season-picker-heading > span { color: #b4c4b9; font-size: 14px; }
.season-fields { display: grid; grid-template-columns: .75fr 1.5fr 1.5fr; gap: 16px; }
.season-field { min-width: 0; }
.season-field label { display: block; margin: 0 0 9px; color: #d4dcd6; font-size: 14px; font-weight: 650; }
.season-field select { appearance: none; display: block; width: 100%; min-height: 52px; padding: 12px 36px 12px 14px; border: 1px solid #4b5c50; border-radius: 6px; background: #1e2922 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23c6d3c9' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center; color: #fff; font: inherit; font-size: 16px; cursor: pointer; }
.season-field select:disabled { color: #9daaa1; background-color: #19211d; cursor: default; }
.season-field select:focus-visible, .season-link:focus-visible, .single-match-picker summary:focus-visible { outline: 2px solid #a6d8b4; outline-offset: 3px; }
.season-field option, .season-field optgroup { background: #19211d; color: #fff; }
.season-message { margin: 18px 0 0; min-height: 22px; color: #b8c7bd; font-size: 14px; line-height: 1.5; }
#retrySeason { margin-top: 12px; }
.season-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 24px; margin-top: 24px; border-top: 1px solid #405448; }
.season-link { display: grid; gap: 7px; padding: 20px; border: 1px solid #668b71; border-radius: 7px; color: #fff; text-decoration: none; background: #284132; transition: background 160ms, border-color 160ms; }
.season-link:hover { background: #355440; border-color: #a1c9ad; }
.season-link strong { font-size: 21px; }
.season-link span { font-size: 14px; color: #d3dfd7; line-height: 1.4; }
.season-links > p { grid-column: 1 / -1; margin: 0; color: #adbbb2; font-size: 14px; line-height: 1.5; }
.single-match-picker { margin-top: 28px; }
.single-match-picker summary { display: inline-block; color: #c2ccc5; font-size: 14px; cursor: pointer; padding: 10px 14px; border-bottom: 1px solid #4a5b50; }
.single-match-picker summary::marker { color: #91af9c; }
.single-match-picker[open] summary { margin-bottom: 24px; }
.season-preview { min-height: 100vh; padding: clamp(14px, 2vw, 38px); display: grid; place-items: center; }
.preview-board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); width: min(100%, 1900px); gap: clamp(18px, 3vw, 50px); align-items: center; }
.next-match-panel { text-align: center; padding: 16px 0; min-width: 0; }
.preview-heading { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: clamp(14px, 1.35vw, 21px); color: #bdd1c4; }
.preview-league { margin: 0; }
.preview-heading > span { color: #8eab99; white-space: nowrap; }
.next-match-panel > h1 { margin: 14px 0 24px; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: clamp(28px, 3.5vw, 58px); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.next-match-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(10px, 2vw, 30px); align-items: center; }
.next-team { min-width: 0; display: flex; align-items: center; flex-direction: column; }
.next-logo-plate { position: relative; display: grid; place-items: center; width: clamp(72px, 9vw, 145px); height: clamp(72px, 9vw, 145px); border-radius: 8px; background: #f4f2ec; box-shadow: 0 7px 24px #0005; }
.next-team-logo { width: 86%; height: 86%; object-fit: contain; position: relative; z-index: 1; }
.next-team-logo:not(.hidden) + .logo-placeholder { display: none; }
.next-team h2 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: clamp(23px, 2.7vw, 45px); line-height: 1.05; font-weight: 600; margin: 14px 0 0; overflow-wrap: anywhere; }
.next-versus { align-self: start; margin-top: clamp(23px, 3vw, 50px); color: #a4bcae; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: clamp(24px, 2.5vw, 40px); }
.next-match-date { margin: 26px 0 0; color: #f4f4ef; font-size: clamp(16px, 1.7vw, 26px); line-height: 1.4; font-weight: 600; }
.next-match-date:first-letter { text-transform: uppercase; }
.no-more-matches { margin: 34px 0; font-size: clamp(23px, 2.3vw, 36px); line-height: 1.3; color: #f2f4f0; }
.preview-notice { color: #bbcbbf; font-size: 14px; line-height: 1.4; margin: 12px 0 0; }
.preview-notice:empty { display: none; }
.standings-panel { min-width: 0; padding: clamp(12px, 1.5vw, 24px); border: 1px solid #385344; border-radius: 8px; background: rgba(20,27,23,.88); }
.standings-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.standings-heading h2 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: clamp(21px, 2vw, 32px); margin: 0; font-weight: 600; }
.standings-heading > span { font-size: 14px; color: #b5c9bc; }
.standings-scroll { overflow-x: auto; }
.season-standings { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: clamp(14px, 1.15vw, 20px); line-height: 1.25; }
.season-standings th { color: #9fb4a7; font-size: .875em; font-weight: 600; }
.season-standings th, .season-standings td { text-align: right; padding: 5px 5px; white-space: nowrap; }
.season-standings th:first-child, .season-standings td:first-child { text-align: center; padding-left: 0; color: #b6c4bb; }
.season-standings th:nth-child(2), .season-standings td:nth-child(2) { text-align: left; width: 100%; white-space: normal; overflow-wrap: anywhere; }
.season-standings th:last-child, .season-standings td:last-child { padding-right: 0; }
.season-standings abbr { text-decoration: none; }
.season-standings tbody tr { border-top: 1px solid #34483b; }
.season-standings .selected-team-row { background: #31523d; font-weight: 700; color: #fff; }
.season-standings .selected-team-row td:first-child { color: #fff; }
.standings-empty { color: #b5c4ba; font-size: 16px; line-height: 1.5; margin-bottom: 0; }
@media (min-width: 850px) and (min-aspect-ratio: 2/1) {
  .season-preview { padding: clamp(12px, 1.5vw, 28px); }
  .preview-board { gap: clamp(18px, 2.2vw, 40px); }
  .next-match-panel { padding: 0; }
  .next-match-panel > h1 { margin: 9px 0 14px; }
  .next-logo-plate { width: clamp(70px, 7.5vw, 140px); height: clamp(70px, 7.5vw, 140px); }
  .next-team h2 { margin-top: 10px; }
  .next-match-date { margin-top: 18px; }
  .standings-panel { padding: clamp(10px, 1.1vw, 20px); }
  .standings-heading { margin-bottom: 6px; }
  .season-standings th, .season-standings td { padding-top: 2px; padding-bottom: 2px; }
  .season-standings th:nth-child(2), .season-standings td:nth-child(2) { overflow-wrap: normal; }
}
@media (max-width: 849px) {
  .preview-board { max-width: 650px; grid-template-columns: 1fr; gap: 28px; }
  .season-preview { padding-top: 38px; padding-bottom: 28px; }
  .next-team h2 { font-size: clamp(25px, 4.5vw, 37px); }
  .next-logo-plate { width: clamp(88px, 17vw, 125px); height: clamp(88px, 17vw, 125px); }
  .season-standings { font-size: 16px; }
  .season-standings th, .season-standings td { padding-top: 7px; padding-bottom: 7px; }
  .season-fields { grid-template-columns: 1fr; gap: 18px; }
  .season-picker-heading { display: block; }
  .season-picker-heading > span { display: block; margin-top: 8px; }
}
@media (max-width: 520px) {
  .season-picker { padding: 22px 18px; }
  .season-links { grid-template-columns: 1fr; }
  .season-link { padding: 18px; }
  .standings-panel { padding: 12px 9px; }
  .standings-heading { display: block; }
  .standings-heading > span { display: block; margin-top: 5px; }
  .season-standings { font-size: 14px; }
  .season-standings th, .season-standings td { padding-left: 3px; padding-right: 3px; }
  .next-match-date { font-size: 17px; }
  .preview-heading { gap: 10px; font-size: 14px; }
}

/* Fit a full 14-team table on a 16:5 arena screen without shrinking labels
   below 14px. Vertical spacing follows the available screen height. */
@media (min-width: 850px) and (min-aspect-ratio: 2/1) {
  .season-preview { padding: clamp(10px, 3vh, 24px); }
  .standings-panel { padding: clamp(8px, 2.5vh, 20px); }
  .season-standings { font-size: clamp(14px, 3.5vh, 24px); line-height: 1.1; }
  .season-standings th { font-size: 1em; }
  .season-standings th, .season-standings td { padding-top: clamp(1px, .4vh, 4px); padding-bottom: clamp(1px, .4vh, 4px); }
}
