:root {
  color-scheme: light;
  --navy: #101a30;
  --navy-soft: #1d2b48;
  --blue: #4268ed;
  --blue-light: #edf1ff;
  --yellow: #f7c948;
  --ink: #17233b;
  --muted: #78839a;
  --line: #e8ebf2;
  --paper: #ffffff;
  --canvas: #f5f7fb;
  font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
}

button, select { font: inherit; }

.site-header {
  height: 70px;
  padding: 0 max(5.5vw, calc((100vw - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: white;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 13px;
}

.brand strong { display: block; font-size: 14px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--yellow); color: var(--navy); font-size: 11px; font-weight: 800; }
.season { color: #b7c1d5; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }

main { max-width: 1200px; margin: 0 auto; padding: 30px 28px 20px; }

.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
h2, p { margin-top: 0; }

.new-results-notice { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; padding: 16px 20px; border: 1px solid #dfe6ff; border-radius: 12px; background: #f0f3ff; }
.new-results-notice[hidden] { display: none; }
.new-results-notice strong { color: var(--ink); font-size: 14px; }
.new-results-notice p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.screen-tabs { display: flex; gap: 7px; margin-top: 20px; padding: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.screen-tab { padding: 9px 15px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.screen-tab.is-active { background: var(--navy); color: #fff; }
.screen-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.weekly-screen { margin-top: 20px; }
.weekly-screen[hidden], .content-grid[hidden], .league-table-screen[hidden], .schedule-screen[hidden] { display: none; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: 0 4px 18px rgb(22 37 67 / 3%); }
.fixtures-panel, .table-panel, .how-panel { padding: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
h2 { margin: 0; color: var(--ink); font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif; font-size: 21px; letter-spacing: -.5px; }
.week-select-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 600; }
select { min-width: 112px; padding: 9px 28px 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.week-caption { min-height: 16px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
.match-list { display: grid; gap: 10px; }
.match-card { display: grid; grid-template-columns: minmax(95px, 1fr) 22px minmax(95px, 1fr) 83px; align-items: center; gap: 9px; padding: 13px 14px; border: 1px solid #edf0f5; border-radius: 11px; background: #fff; }
.match-card.is-complete { background: #fbfcff; }
.team { min-width: 0; display: flex; align-items: center; gap: 9px; font-weight: 700; }
.team:last-of-type { justify-content: flex-end; text-align: right; }
.team-code { display: inline-grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #eef1f7; color: #43516c; font-size: 10px; font-weight: 800; }
.team.winner .team-code { background: var(--blue-light); color: var(--blue); }
.team-score { font-size: 14px; }
.versus { color: #a7afbe; font-size: 9px; font-weight: 800; text-align: center; }
.result-label { justify-self: end; margin: 0; padding: 6px 9px; border-radius: 20px; background: #f1f3f7; color: #737e93; font-size: 9px; font-weight: 800; text-align: center; }
.result-label.win { background: #e8f7ef; color: #218253; }
.result-label.draw { background: #fff5d9; color: #926b0c; }
.no-fixtures { padding: 22px; border: 1px dashed #dfe4ed; border-radius: 10px; color: var(--muted); text-align: center; font-size: 12px; }

.table-panel { min-height: 0; }
.table-heading { margin-bottom: 22px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 20px; background: #eefaf3; color: #218253; font-size: 8px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.live-pill span { width: 6px; height: 6px; border-radius: 50%; background: #37b56e; }
.table-wrap { overflow-x: auto; }
#league-screen table { width: 100%; min-width: 600px; border-collapse: separate; border-spacing: 0; text-align: left; }
#league-screen th { padding: 14px 12px; border-bottom: 2px solid #dfe4ed; background: #f5f7fb; color: #4b5870; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
#league-screen th:first-child { border-radius: 8px 0 0 0; }
#league-screen th:last-child { border-radius: 0 8px 0 0; }
#league-screen th:nth-child(n+2), #league-screen td:nth-child(n+2) { text-align: center; }
#league-screen td { padding: 15px 12px; border-bottom: 1px solid #e8ebf2; color: #46536b; font-size: 15px; font-variant-numeric: tabular-nums; }
#league-screen tbody tr:nth-child(even) { background: #f8f9fc; }
#league-screen tbody tr:hover { background: #eef2ff; }
#league-screen tbody tr:last-child td { border-bottom: 0; }
#league-screen td:first-child { width: 52px; color: #56637a; font-size: 14px; font-weight: 800; }
#league-screen td.group-cell { color: var(--ink); font-size: 17px; font-weight: 800; }
#league-screen td.points-cell { color: #193b9b; font-size: 18px; font-weight: 900; }
.table-note { margin: 14px 0 18px; color: #68758b; font-size: 12px; }


.schedule-screen { margin-top: 14px; padding: 28px; }
.schedule-heading { margin-bottom: 22px; }
.schedule-heading h2 { margin-bottom: 7px; font-size: 26px; }
.schedule-heading > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.schedule-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.schedule-week { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(160deg, #fff, #f8f9fc); }
.schedule-finals { border-color: #f0d783; box-shadow: 0 8px 26px rgb(212 171 51 / 8%); }
.schedule-week-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.schedule-week-heading h3 { margin: 0; color: var(--ink); font-size: 16px; }
.schedule-finals .schedule-week-heading h3 { color: #98700b; }
.schedule-week-heading > span { color: #8993a5; font-size: 10px; font-weight: 700; }
.schedule-matches { display: grid; gap: 8px; }
.schedule-match { display: grid; grid-template-columns: 90px minmax(0, 1fr) 100px; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border: 1px solid #edf0f5; border-radius: 9px; background: #fff; }
.schedule-match-label { color: #8993a5; font-size: 8px; font-weight: 800; letter-spacing: .5px; }
.schedule-pairing { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--ink); font-size: 12px; }
.schedule-pairing span { color: #a7afbe; font-size: 8px; font-weight: 800; }
.schedule-status { color: #8993a5; font-size: 9px; font-weight: 800; text-align: right; white-space: nowrap; }
.schedule-match.is-complete .schedule-status { color: #218253; }
.schedule-match.is-complete { border-color: #e5f1e9; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; font-size: 11px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button-secondary { border: 1px solid #dfe4ed; background: #fff; color: #495772; }
.button-primary { background: var(--blue); color: #fff; }
.button:hover { filter: brightness(.97); }
#csv-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
#csv-file:focus-visible + .upload-status { outline: 2px solid var(--blue); outline-offset: 3px; }
.upload-status { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.upload-status.error { color: #bd3434; }
.upload-status.success { color: #218253; }
.upload-status code { color: var(--ink); font-size: 9px; }
.text-button { padding: 0; border: 0; background: transparent; color: #8993a5; font-size: 10px; text-decoration: underline; cursor: pointer; }
.text-button:hover { color: var(--ink); }
.page-footer { display: flex; justify-content: space-between; padding: 18px 3px 4px; color: #a0a9b8; font-size: 10px; }
.page-footer a { color: inherit; text-decoration: none; }
.page-footer a:hover { color: var(--blue); }

.results-dialog { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: auto; border: 0; border-radius: 0; background: transparent; color: #fff; }
.results-dialog[open] { display: block; }
.countdown-stage[hidden], #announcement-choice[hidden], #announcement-match-list[hidden], #announcement-leaderboard[hidden], .announcement-controls[hidden] { display: none; }
.results-dialog::backdrop { background: rgb(5 10 23 / 88%); backdrop-filter: blur(8px); animation: backdrop-in 500ms ease both; }
.announcement-panel { position: relative; display: flex; min-height: 100%; padding: clamp(24px, 5vh, 56px) clamp(18px, 6vw, 88px); flex-direction: column; justify-content: center; overflow: hidden; background: radial-gradient(ellipse at 50% -20%, #3b527f 0, transparent 53%), linear-gradient(145deg, #121d35 0%, #0c1426 100%); }
.announcement-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 25%, rgb(255 255 255 / 4%) 50%, transparent 75%); transform: translateX(-120%); animation: stadium-sweep 4s ease-in-out 300ms both; }
.cinema-lights { position: absolute; top: -100px; left: 50%; width: 520px; height: 270px; pointer-events: none; opacity: .25; background: conic-gradient(from 220deg at 50% 0, transparent 0deg, rgb(247 201 72 / 22%) 28deg, transparent 55deg, transparent 95deg, rgb(91 131 231 / 20%) 122deg, transparent 152deg); transform: translateX(-50%); animation: lights-on 1.2s ease-out both; }
.cinema-heading { position: relative; z-index: 1; text-align: center; animation: title-arrive 700ms cubic-bezier(.2, .75, .3, 1) both; }
.cinema-brand { display: inline-block; margin-bottom: 16px; color: #c4cce0; font-size: 9px; font-weight: 800; letter-spacing: 3px; }
.cinema-brand i { padding: 0 5px; color: var(--yellow); font-style: normal; }
.announcement-panel .eyebrow { margin-bottom: 6px; color: var(--yellow); }
.announcement-panel h2 { margin: 0 0 5px; color: #fff; font-size: clamp(32px, 5vw, 54px); letter-spacing: -1.5px; text-shadow: 0 0 30px rgb(255 255 255 / 18%); }
.announcement-caption { margin: 0 0 24px; color: #c1ccdf; font-size: 16px; }
.announcement-choice { position: relative; z-index: 1; display: grid; width: min(760px, 100%); min-height: 220px; margin: 8px auto 0; padding: 28px; align-content: center; justify-items: center; gap: 22px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 16px; background: radial-gradient(ellipse at center, rgb(56 78 122 / 48%), rgb(9 15 29 / 80%) 70%); animation: title-arrive 650ms cubic-bezier(.2, .75, .3, 1) both; }
.announcement-choice p { margin: 0; color: #eef2fa; font-size: 19px; }
.choice-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.announcement-choice .button-primary { background: var(--yellow); color: var(--navy); }
.announcement-choice .button-secondary { border-color: rgb(255 255 255 / 20%); background: rgb(255 255 255 / 7%); color: #e2e8f4; }
.dialog-close { position: absolute; z-index: 3; top: 16px; right: 17px; width: 34px; height: 34px; border: 1px solid rgb(255 255 255 / 15%); border-radius: 50%; background: rgb(255 255 255 / 8%); color: #d3d9e5; font-size: 24px; line-height: 1; cursor: pointer; }
.dialog-close:hover { background: rgb(255 255 255 / 16%); }
.countdown-stage { position: relative; z-index: 1; display: flex; width: min(1000px, 100%); min-height: 240px; margin: 6px auto 20px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; overflow: hidden; border: 1px solid rgb(255 255 255 / 10%); border-radius: 16px; background: radial-gradient(ellipse at center, rgb(56 78 122 / 48%), rgb(9 15 29 / 80%) 70%); transition: min-height 400ms ease, opacity 350ms ease, margin 400ms ease; }
.countdown-stage::before, .countdown-stage::after { content: ""; position: absolute; width: 150%; height: 1px; background: linear-gradient(90deg, transparent, rgb(247 201 72 / 75%), transparent); animation: scan-line 2s linear infinite; }
.countdown-stage::before { top: 25%; }
.countdown-stage::after { bottom: 25%; animation-delay: -1s; }
.countdown-label, .countdown-subtitle { color: #d7deeb; font-size: clamp(14px, 1.8vw, 18px); font-weight: 800; letter-spacing: 2.5px; line-height: 1.3; text-align: center; }
.countdown-number { position: relative; z-index: 1; margin: 0; color: var(--yellow); font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif; font-size: clamp(90px, 15vw, 150px); font-weight: 800; line-height: 1.05; text-shadow: 0 0 35px rgb(247 201 72 / 45%); }
.countdown-pop { animation: countdown-pop 800ms cubic-bezier(.16, .8, .25, 1) both; }
.countdown-subtitle { color: var(--yellow); font-size: clamp(15px, 2vw, 20px); }
.countdown-finished .countdown-stage { min-height: 0; height: 0; margin: 0; opacity: 0; border-width: 0; }
.announcement-callout { position: relative; z-index: 1; margin: 4px auto 22px; color: var(--yellow); font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: 1px; text-align: center; text-shadow: 0 0 24px rgb(247 201 72 / 35%); animation: callout-arrive 450ms cubic-bezier(.15, .8, .25, 1) both; }
.announcement-callout[hidden] { display: none; }
.countdown-finished .cinema-heading { animation: title-dim 450ms ease both; }
.announcement-match-list { position: relative; z-index: 1; display: grid; width: min(850px, 100%); margin: 0 auto 20px; gap: 14px; perspective: 900px; }
.announcement-match[hidden] { display: none; }
.announcement-match { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); min-height: 118px; gap: 10px 18px; padding: 18px 26px; position: relative; overflow: hidden; border-color: rgb(255 255 255 / 14%); background: linear-gradient(110deg, rgb(255 255 255 / 8%), rgb(255 255 255 / 3%)); color: #fff; box-shadow: inset 0 1px rgb(255 255 255 / 5%); transition: background 400ms ease, border-color 400ms ease, box-shadow 400ms ease; }
.announcement-match .team { gap: 16px; font-size: 19px; }
.announcement-match .team-code { flex-basis: 62px; width: 62px; height: 62px; border: 1px solid rgb(255 255 255 / 20%); border-radius: 15px; background: rgb(255 255 255 / 17%); color: #fff; font-size: 17px; font-weight: 900; box-shadow: 0 5px 20px rgb(0 0 0 / 18%); }
.announcement-match .team.winner .team-code { background: rgb(247 201 72 / 20%); color: var(--yellow); }
.announcement-match .team-score { display: inline-block; min-width: 72px; color: #fff; font-size: 27px; font-weight: 800; text-align: center; }
.announcement-match .score-concealed .team-score { color: var(--yellow); letter-spacing: 2px; }
.announcement-match .versus { color: #c4cce0; font-size: 12px; }
.announcement-match .result-label { grid-column: 1 / -1; justify-self: center; min-width: 180px; padding: 10px 22px; border: 1px solid rgb(255 255 255 / 15%); background: rgb(255 255 255 / 9%); color: #fff; font-size: 15px; font-weight: 900; line-height: 1.35; white-space: normal; }
.announcement-match .result-label.win { border-color: #57dfa0; background: #087044; color: #fff; box-shadow: 0 0 18px rgb(34 197 120 / 30%); }
.announcement-match .result-label.draw { border-color: #ffdc72; background: #624900; color: #fff; }
.announcement-match.is-revealing { animation: match-arrive 550ms cubic-bezier(.15, .8, .25, 1) both; }
.announcement-match.matchup-announced { border-color: rgb(255 255 255 / 22%); }
.announcement-match.attendance-revealed .team-score { color: var(--yellow); text-shadow: 0 0 18px rgb(247 201 72 / 35%); }
.announcement-match.has-revealed { border-color: rgb(247 201 72 / 28%); background: linear-gradient(110deg, rgb(247 201 72 / 11%), rgb(255 255 255 / 4%)); box-shadow: 0 0 25px rgb(247 201 72 / 8%); }
.announcement-match.has-revealed .result-label { animation: winner-arrive 600ms cubic-bezier(.16, .8, .25, 1) both; }
.announcement-match .score-reveal { animation: score-flip 550ms cubic-bezier(.2, .75, .25, 1) both; }
.announcement-leaderboard { position: relative; z-index: 1; width: min(940px, 100%); margin: 0 auto 18px; animation: leaderboard-arrive 650ms cubic-bezier(.16, .8, .25, 1) both; }
.leaderboard-heading { margin-bottom: 15px; text-align: center; }
.leaderboard-heading .eyebrow { margin-bottom: 5px; color: var(--yellow); }
.leaderboard-heading h3 { margin: 0 0 5px; color: #fff; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.5px; }
.leaderboard-heading > p:last-child { margin: 0; color: #c4cce0; font-size: 13px; }
.announcement-standings { display: grid; margin: 0; padding: 0; gap: 7px; list-style: none; }
.standing-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(105px, 150px) minmax(135px, 170px); min-height: 53px; align-items: center; gap: 12px; padding: 7px 16px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 11px; background: linear-gradient(100deg, rgb(255 255 255 / 9%), rgb(255 255 255 / 4%)); animation: leaderboard-row-arrive 550ms cubic-bezier(.16, .8, .25, 1) both; animation-delay: var(--row-delay, 0ms); }
.standing-rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgb(255 255 255 / 12%); color: #fff; font-size: 15px; font-weight: 900; }
.standing-row:first-child .standing-rank { background: rgb(247 201 72 / 22%); color: var(--yellow); }
.standing-group { color: #fff; font-size: 20px; font-weight: 900; letter-spacing: .5px; }
.standing-points { color: #fff; font-size: 16px; font-weight: 800; text-align: right; white-space: nowrap; }
.standing-movement { justify-self: end; padding: 6px 9px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 20px; color: #d3d9e5; font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; white-space: nowrap; }
.standing-movement.moved-up { border-color: rgb(87 223 160 / 45%); background: #075b3a; color: #c9ffe1; }
.standing-movement.moved-down { border-color: rgb(255 144 144 / 40%); background: #642b35; color: #ffe0e4; }
.standing-row:first-child { border-color: rgb(247 201 72 / 32%); background: linear-gradient(100deg, rgb(247 201 72 / 13%), rgb(255 255 255 / 4%)); }
.announcement-controls { position: relative; z-index: 1; display: flex; width: min(1100px, 100%); margin: auto auto 0; align-items: center; gap: 16px; }
.announcement-status { flex: 1; min-height: 24px; margin: 0; color: #c4cce0; font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.skip-button { padding: 10px 14px; border: 1px solid rgb(255 255 255 / 22%); border-radius: 8px; background: transparent; color: #d3d9e5; font-size: 12px; cursor: pointer; }
.skip-button:hover { border-color: rgb(255 255 255 / 35%); color: #fff; }
.skip-button[hidden] { display: none; }
.announcement-panel .button-primary { background: var(--yellow); color: var(--navy); }
.announcement-panel .button-primary:disabled { background: #546079; color: #b7c1d5; cursor: wait; }

@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes stadium-sweep { 0% { transform: translateX(-120%); } 50%, 100% { transform: translateX(120%); } }
@keyframes lights-on { from { opacity: 0; filter: blur(15px); } to { opacity: .25; filter: blur(0); } }
@keyframes title-arrive { from { opacity: 0; transform: translateY(12px); letter-spacing: 1px; } to { opacity: 1; transform: translateY(0); letter-spacing: 0; } }
@keyframes title-dim { to { opacity: .72; transform: scale(.96); } }
@keyframes countdown-pop { 0% { opacity: 0; transform: scale(1.7); filter: blur(8px); } 35% { opacity: 1; } 100% { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes scan-line { from { transform: translateX(-30%) rotate(-12deg); opacity: 0; } 40% { opacity: .75; } to { transform: translateX(30%) rotate(-12deg); opacity: 0; } }
@keyframes match-arrive { 0% { opacity: 0; transform: translateY(18px) rotateX(-12deg) scale(.97); } 70% { opacity: 1; transform: translateY(-2px) rotateX(2deg) scale(1.01); } 100% { opacity: 1; transform: translateY(0) rotateX(0) scale(1); } }
@keyframes score-flip { 0% { opacity: 0; transform: rotateX(90deg) scale(.7); color: var(--yellow); } 60% { transform: rotateX(-10deg) scale(1.2); } 100% { opacity: 1; transform: rotateX(0) scale(1); } }
@keyframes callout-arrive { from { opacity: 0; transform: translateY(10px) scale(.92); filter: blur(5px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes winner-arrive { 0% { opacity: .4; transform: scale(.8); } 65% { opacity: 1; transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes leaderboard-arrive { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes leaderboard-row-arrive { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.admin-main { max-width: 760px; min-height: calc(100vh - 130px); }
.admin-panel { padding: 32px; }
.admin-title { margin: 0 0 10px; color: var(--ink); font-size: 32px; letter-spacing: -1px; }
.admin-intro { max-width: 560px; margin-bottom: 24px; color: var(--muted); line-height: 1.6; }
.header-link { color: #d3d9e5; text-decoration: none; }
.header-link:hover { color: white; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-status { margin-top: 13px; }
.admin-note { margin: 24px 0 20px; padding: 16px; border-radius: 10px; background: #f7f8fb; color: #53617a; font-size: 12px; line-height: 1.6; }
.admin-note strong { color: var(--ink); }
.admin-note p { margin: 5px 0 0; }
.admin-footer { max-width: 760px; margin: 0 auto; padding: 0 28px 20px; }

@media (min-width: 851px) {
  .announcement-match-list { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 851px) and (min-height: 700px) {
  .results-dialog.countdown-finished .announcement-panel { padding-top: clamp(10px, 1.5vh, 22px); padding-bottom: clamp(10px, 1.5vh, 22px); }
  .results-dialog.countdown-finished .announcement-caption { margin-bottom: 16px; }
  .results-dialog.countdown-finished .announcement-callout { margin-bottom: 14px; }
  .results-dialog.countdown-finished .announcement-match-list { gap: 10px; }
}

@media (max-width: 850px) {
  main { padding: 22px 18px 16px; }
  .schedule-screen { padding: 22px 18px; }
  .schedule-list { grid-template-columns: 1fr; }
  .table-panel { min-height: auto; }
}

@media (max-width: 520px) {
  .site-header { height: 60px; padding: 0 16px; }
  .brand { font-size: 11px; gap: 8px; }
  .brand strong { font-size: 12px; }
  .brand-mark { width: 31px; height: 31px; }
  .season { font-size: 8px; letter-spacing: .7px; }
  main { padding: 14px 12px; }
  .new-results-notice { align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px; }
  .announcement-panel { min-height: 100%; padding: 24px 14px; }
  .announcement-panel h2 { padding-right: 0; font-size: 30px; }
  .announcement-caption { margin-bottom: 18px; font-size: 14px; }
  .announcement-choice { min-height: 190px; padding: 20px 14px; }
  .announcement-choice p { font-size: 16px; }
  .countdown-stage { min-height: 210px; padding: 18px 12px; }
  .countdown-label { font-size: 14px; letter-spacing: 1.8px; }
  .countdown-subtitle { font-size: 16px; letter-spacing: 2px; }
  .countdown-number { font-size: 90px; }
  .announcement-controls { flex-wrap: wrap; }
  .announcement-status { flex-basis: 100%; }
  .announcement-callout { margin-bottom: 10px; }
  .leaderboard-heading { margin-bottom: 12px; }
  .leaderboard-heading > p:last-child { font-size: 12px; }
  .announcement-standings { gap: 6px; }
  .standing-row { grid-template-columns: 36px minmax(0, 1fr) minmax(90px, auto); gap: 8px; min-height: 52px; padding: 7px 9px; }
  .standing-rank { width: 30px; height: 30px; font-size: 13px; }
  .standing-group { font-size: 18px; }
  .standing-points { font-size: 14px; }
  .standing-movement { grid-column: 2 / -1; justify-self: end; margin-top: -3px; padding: 4px 8px; font-size: 9px; }
  .standing-row { row-gap: 3px; }
  .announcement-match .result-label { min-width: 150px; padding: 8px 14px; font-size: 12px; }
  .fixtures-panel, .table-panel, .how-panel { padding: 18px 14px; }
  .section-heading { align-items: flex-start; }
  .week-select-label { align-items: flex-end; flex-direction: column; gap: 4px; font-size: 9px; }
  select { min-width: 106px; padding: 8px 20px 8px 9px; }
  h2 { font-size: 19px; }
  .match-card { grid-template-columns: minmax(70px, 1fr) 18px minmax(70px, 1fr) 60px; gap: 5px; padding: 10px 8px; }
  .announcement-match { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); min-height: 100px; gap: 8px; padding: 12px 10px; }
  .announcement-match .team { gap: 7px; font-size: 13px; }
  .announcement-match .team-code { flex-basis: 48px; width: 48px; height: 48px; border-radius: 11px; font-size: 14px; }
  .announcement-match .team-score { min-width: 0; font-size: 19px; }
  .schedule-match { grid-template-columns: 68px minmax(0, 1fr); gap: 6px; padding: 8px; }
  .schedule-pairing { justify-content: flex-start; gap: 7px; font-size: 11px; }
  .schedule-status { grid-column: 2; text-align: left; font-size: 8px; }
  .team { gap: 5px; font-size: 11px; }
  .team-code { flex-basis: 29px; width: 29px; height: 29px; font-size: 9px; }
  .team-score { font-size: 12px; }
  .result-label { padding: 5px 5px; font-size: 8px; }
  .page-footer { gap: 12px; font-size: 9px; }
  .admin-panel { padding: 23px 18px; }
  .admin-title { font-size: 27px; }
  .admin-footer { padding-right: 12px; padding-left: 12px; }
}

/* Readability: a clearer system font and a minimum text size across the site */
:root, button, select { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
h2, .countdown-number { font-family: inherit; }
body { font-size: 16px; line-height: 1.5; }
h2 { letter-spacing: 0; }
.brand, .brand strong, .season, .screen-tab, .week-select-label, .week-caption, select, .no-fixtures { font-size: 14px; }
.season, .eyebrow, .live-pill, .versus, .result-label, .team-code,
.schedule-week-heading > span, .schedule-match-label, .schedule-pairing span,
.schedule-status, .table-note, .upload-status, .text-button, .page-footer, .cinema-brand, .standing-movement { font-size: 13px; letter-spacing: .4px; }
.team, .team-score, .schedule-pairing { font-size: 16px; }
.team-code { font-size: 13px; }
#league-screen td { font-size: 16px; }
#league-screen th { font-size: 13px; letter-spacing: .3px; }
.countdown-label { font-size: clamp(16px, 2vw, 20px); }
.announcement-status { font-size: 15px; }
@media (max-width: 520px) {
  .brand, .brand strong { font-size: 13px; }
  .season, .schedule-status, .page-footer, .standing-movement { font-size: 12px; letter-spacing: .2px; }
  .result-label, .team-code, .schedule-pairing span { font-size: 12px; }
  .team, .schedule-pairing { font-size: 14px; }
  .team-code { flex-basis: 34px; width: 34px; height: 34px; }
  .announcement-match .team { font-size: 15px; }
  .announcement-match .team-code { font-size: 14px; }
  .announcement-match .result-label { font-size: 13px; }
  #league-screen td { font-size: 15px; }
  #league-screen th { font-size: 12px; padding: 12px 8px; }
  .match-card { grid-template-columns: minmax(70px, 1fr) 20px minmax(70px, 1fr) 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .results-dialog::backdrop, .announcement-panel::before, .cinema-lights, .cinema-heading, .announcement-choice,
  .countdown-pop, .announcement-choice, .announcement-match.is-revealing,
  .announcement-match .score-reveal, .announcement-callout, .announcement-match.has-revealed .result-label,
  .announcement-leaderboard, .standing-row {
    animation-duration: 1ms !important;
  }
  .countdown-stage, .announcement-match { transition-duration: 1ms !important; }
}
.schedule-status[hidden] { display: none; }

/* Weekly results: simple, uncluttered fixture cards */
#match-list { gap: 14px; }
.fixture-card { padding: 22px 28px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.fixture-title { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .6px; text-align: center; text-transform: uppercase; }
.fixture-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); align-items: center; gap: 12px; }
.fixture-team { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fixture-name { color: var(--ink); font-size: 28px; font-weight: 800; letter-spacing: -.3px; }
.fixture-score { min-height: 24px; color: var(--muted); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fixture-team.winner .fixture-name, .fixture-team.winner .fixture-score { color: #087044; }
.fixture-team.winner .fixture-score { font-weight: 800; }
.fixture-team.loser .fixture-name { color: #5b677d; }
.fixture-vs { color: #9aa3b2; font-size: 14px; font-weight: 700; text-align: center; text-transform: uppercase; }
@media (max-width: 520px) {
  .fixture-card { padding: 16px 12px; }
  .fixture-row { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 6px; }
  .fixture-name { font-size: 22px; }
  .fixture-score { font-size: 16px; }
}
