:root {
  color-scheme: light;
  --navy-950: #09143f;
  --navy-900: #101d5b;
  --navy-800: #182a7d;
  --navy-700: #284197;
  --sky-100: #edf7fc;
  --sky-200: #dceef8;
  --sky-500: #7cb5de;
  --paper: #fffdf7;
  --paper-strong: #ffffff;
  --sand: #f4efe2;
  --ink: #102218;
  --muted: #607466;
  --line: rgba(16, 34, 24, 0.12);
  --orange: #f28c28;
  --green: #19764b;
  --red: #a33d3d;
  --shadow: 0 22px 52px rgba(4, 13, 38, 0.2);
  --shadow-soft: 0 10px 26px rgba(12, 29, 25, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: "Avenir Next", "Trebuchet MS", "Gill Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(242, 140, 40, 0.13), transparent 24rem),
    radial-gradient(circle at 92% 18%, rgba(124, 181, 222, 0.16), transparent 28rem),
    linear-gradient(145deg, var(--navy-950), #102d4c 66%, #0b241f);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
}

button,
select,
input {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(242, 140, 40, 0.68);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--paper);
  background: var(--navy-950);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #f8f5e9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 20, 63, 0.9);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 82px;
  margin: 0 auto;
}

.club-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: 11px;
  text-decoration: none;
}

.club-brand img {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.club-brand span,
.profile-link__copy {
  display: grid;
}

.club-brand small,
.profile-link small {
  color: rgba(248, 245, 233, 0.66);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.club-brand strong {
  font-size: 1.02rem;
  line-height: 1.1;
}

.primary-nav {
  display: inline-grid;
  grid-template-columns: repeat(5, auto);
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 999px;
  color: rgba(248, 245, 233, 0.77);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav .nav-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--sky-500);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--navy-900);
  background: var(--paper);
}

.primary-nav a[aria-current="page"] .nav-icon {
  color: var(--navy-700);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  min-height: 44px;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.account-access {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 11px 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: rgba(248, 245, 233, 0.88);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.account-access__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy-900);
  background: var(--sky-100);
  font-size: 0.76rem;
  font-weight: 950;
}

.account-access__copy {
  display: grid;
  text-align: left;
}

.account-access small {
  color: rgba(248, 245, 233, 0.58);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-access strong {
  font-size: 0.72rem;
}

.profile-link__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy-900);
  background: var(--sky-200);
  font-size: 0.68rem;
  font-weight: 950;
}

.profile-link strong {
  font-size: 0.82rem;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 170px);
  margin: 0 auto;
  padding: 34px 0 56px;
}

.page-shell:focus {
  outline: none;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  color: #f8f5e9;
}

.page-head__copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-head h1,
.hero-card h1,
.section-heading h2,
.panel h2,
.panel h3,
.archive-hero h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.page-head h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.page-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: rgba(248, 245, 233, 0.74);
}

.season-select-wrap {
  display: grid;
  gap: 5px;
  min-width: 190px;
  color: rgba(248, 245, 233, 0.72);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.season-select {
  min-height: 44px;
  padding: 8px 38px 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: var(--navy-950);
  background: var(--paper);
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.hero-card,
.panel,
.route-card,
.match-list,
.match-detail,
.archive-hero,
.season-transition-card {
  border: 1px solid rgba(17, 34, 23, 0.1);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.8), transparent 58%),
    var(--sky-100);
}

.hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 6px;
  background: var(--orange);
}

.hero-card__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 32px;
}

.status-row,
.tag-row,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill,
.data-pill,
.result-pill,
.subtle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill {
  color: #fff;
  background: var(--navy-800);
}

.data-pill {
  color: #704115;
  background: #fff1df;
}

.subtle-pill {
  color: var(--navy-800);
  background: rgba(24, 42, 125, 0.08);
}

.hero-card h1 {
  max-width: 18ch;
  margin-top: 13px;
  color: var(--navy-950);
  font-size: clamp(2rem, 4.4vw, 3.5rem);
}

.hero-card__scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(24, 42, 125, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-card__scoreboard div {
  display: grid;
  gap: 4px;
  padding: 19px 16px;
}

.hero-card__scoreboard div + div {
  border-left: 1px solid rgba(24, 42, 125, 0.1);
}

.hero-card__scoreboard span,
.metric-card span,
.mini-stat span,
.detail-fact span,
.archive-metric span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-card__scoreboard strong {
  color: var(--navy-800);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 34px 0 14px;
  color: #f8f5e9;
}

.section-heading h2 {
  font-size: 1.45rem;
}

.section-heading p {
  margin: 0;
  color: rgba(248, 245, 233, 0.66);
  font-size: 0.86rem;
}

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

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.72fr);
  align-items: start;
  gap: 16px;
}

.home-feed {
  display: grid;
  gap: 16px;
}

.home-feed .panel,
.home-events {
  box-shadow: var(--shadow-soft);
}

.home-events {
  position: sticky;
  top: 103px;
}

.panel {
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--paper);
}

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

.panel h2 {
  font-size: 1.35rem;
}

.panel h3 {
  font-size: 1.08rem;
}

.text-link,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.text-link {
  padding: 8px 13px;
  color: var(--navy-800);
  background: rgba(24, 42, 125, 0.08);
  font-size: 0.8rem;
}

.action-button {
  padding: 10px 16px;
  color: #fff;
  background: var(--navy-800);
}

.action-button--light {
  color: var(--navy-800);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mobile-list-return {
  display: none;
}

.latest-result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.latest-result__meta,
.match-row__meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.latest-result h3 {
  margin: 5px 0;
  font-size: 1.22rem;
}

.upcoming-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 96px;
  padding: 16px;
  border: 1px dashed rgba(24, 42, 125, 0.22);
  border-radius: var(--radius-md);
  background: var(--sky-100);
}

.upcoming-empty__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--navy-800);
  background: var(--paper-strong);
  font-weight: 950;
}

.upcoming-empty strong,
.upcoming-empty small {
  display: block;
}

.upcoming-empty small {
  margin-top: 3px;
  color: var(--muted);
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-card {
  padding: 16px;
  border: 1px solid rgba(24, 42, 125, 0.12);
  border-radius: var(--radius-md);
  background: var(--sky-100);
}

.event-card time {
  color: var(--navy-700);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.event-card h3 {
  margin: 7px 0 5px;
  color: var(--navy-950);
}

.event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.score-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-800);
}

.score-lockup strong {
  font-size: 2rem;
}

.result-pill--W {
  color: #fff;
  background: var(--green);
}

.result-pill--D {
  color: var(--navy-950);
  background: var(--sky-200);
}

.result-pill--L {
  color: #fff;
  background: var(--red);
}

.quick-list,
.leader-list,
.route-grid,
.detail-facts,
.archive-metrics,
.season-grid,
.metric-grid {
  display: grid;
  gap: 10px;
}

.quick-list {
  margin-top: 4px;
}

.quick-list__row,
.leader-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 47px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.quick-list__row:last-child,
.leader-row:last-child {
  border-bottom: 0;
}

.rank {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--navy-800);
  background: var(--sky-100);
  font-size: 0.78rem;
  font-weight: 950;
}

.quick-list__row span,
.leader-row span {
  min-width: 0;
}

.quick-list__row small,
.leader-row small {
  display: block;
  color: var(--muted);
}

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

.route-card {
  display: grid;
  min-height: 155px;
  padding: 20px;
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.route-card:hover {
  border-color: rgba(242, 140, 40, 0.62);
  transform: translateY(-2px);
}

.route-card__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 11px;
  color: var(--navy-800);
  background: var(--sky-100);
  font-weight: 950;
}

.route-card strong {
  font-size: 1.08rem;
}

.route-card small {
  margin-top: 4px;
  color: var(--muted);
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 5px;
  padding: 5px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(9, 20, 63, 0.48);
}

.segmented-control--two {
  grid-template-columns: repeat(2, auto);
}

.segmented-control button {
  min-height: 38px;
  padding: 7px 15px;
  border: 0;
  border-radius: 999px;
  color: rgba(248, 245, 233, 0.74);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.segmented-control button[aria-selected="true"] {
  color: var(--navy-900);
  background: var(--paper);
}

.matches-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(370px, 1.05fr);
  align-items: start;
  gap: 16px;
}

.match-list,
.match-detail {
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.match-list {
  overflow: hidden;
}

.match-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.match-list__head strong {
  font-size: 0.95rem;
}

.match-list__head span {
  color: var(--muted);
  font-size: 0.76rem;
}

.match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 74px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.match-row:hover,
.match-row[aria-current="true"] {
  background: var(--sky-100);
}

.match-row__title {
  display: block;
  margin: 2px 0 3px;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-row__score {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  color: var(--navy-800);
  font-size: 1.12rem;
  font-weight: 950;
}

.match-detail {
  position: sticky;
  top: 103px;
  overflow: hidden;
}

.match-detail__hero {
  padding: 23px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(124, 181, 222, 0.3), transparent 15rem),
    linear-gradient(145deg, var(--navy-800), var(--navy-950));
}

.match-detail__hero h2 {
  max-width: 18ch;
  margin-top: 10px;
  font-size: clamp(1.55rem, 4vw, 2.3rem);
}

.match-detail__score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.match-detail__score strong {
  font-size: 2.8rem;
  line-height: 1;
}

.match-detail__body {
  padding: 20px 22px 23px;
}

.detail-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.detail-fact {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.detail-fact strong {
  font-size: 0.86rem;
}

.detail-section + .detail-section {
  margin-top: 18px;
}

.detail-section h3 {
  margin: 0 0 9px;
  font-size: 0.94rem;
}

.detail-section p,
.empty-state,
.archive-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.contributor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.contributor-list span {
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--navy-900);
  background: var(--sky-100);
  font-size: 0.76rem;
  font-weight: 850;
}

.detail-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(24, 42, 125, 0.12);
  border-radius: 13px;
  background: var(--sky-100);
}

.detail-highlight div {
  display: grid;
  gap: 2px;
}

.detail-highlight span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-highlight strong {
  color: var(--navy-900);
}

.detail-photo-button,
.ladder-fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--navy-800);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.detail-photo-button {
  display: grid;
  gap: 1px;
  min-width: 118px;
  line-height: 1.15;
}

.detail-photo-button small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 750;
}

.detail-photo-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(24, 42, 125, 0.12);
  border-radius: 14px;
  background: #fff;
}

.detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-photo-card {
  display: grid;
  gap: 6px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: var(--sky-100);
  text-align: left;
  cursor: pointer;
}

.detail-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.detail-photo-card span {
  padding: 0 9px 9px;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-photo-retry {
  margin-top: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--navy-800);
  font-weight: 850;
  cursor: pointer;
}

.photo-lightbox-open {
  overflow: hidden;
}

.hub-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: stretch;
  color: #fffdf6;
  background: rgba(2, 7, 16, 0.95);
}

.hub-photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hub-photo-lightbox__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(64px, 0.12fr) minmax(0, 1fr) minmax(64px, 0.12fr);
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
  padding: 16px;
  gap: 12px;
}

.hub-photo-lightbox__topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hub-photo-lightbox__topbar strong {
  color: rgba(255, 253, 246, 0.86);
}

.hub-photo-lightbox__close,
.hub-photo-lightbox__nav {
  border: 1px solid rgba(255, 253, 246, 0.24);
  border-radius: 999px;
  color: #fffdf6;
  background: rgba(255, 253, 246, 0.13);
  font-weight: 900;
  cursor: pointer;
}

.hub-photo-lightbox__close {
  padding: 10px 15px;
}

.hub-photo-lightbox__nav {
  align-self: center;
  justify-self: center;
  width: 56px;
  height: 56px;
  font-size: 2rem;
}

.hub-photo-lightbox__nav:disabled {
  opacity: 0.35;
}

.hub-photo-lightbox__stage {
  grid-column: 2;
  display: grid;
  place-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  touch-action: pan-y;
  text-align: center;
}

.hub-photo-lightbox__stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 148px);
  border-radius: 8px;
  object-fit: contain;
  -webkit-touch-callout: default;
  user-select: auto;
  -webkit-user-select: auto;
}

.hub-photo-lightbox__stage figcaption {
  font-size: 0.82rem;
  font-weight: 800;
}

.hub-photo-lightbox__stage small {
  color: rgba(255, 253, 246, 0.64);
  font-size: 0.7rem;
}

@media (max-width: 760px) {
  .hub-photo-lightbox__panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 12px;
  }

  .hub-photo-lightbox__stage {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .hub-photo-lightbox__nav {
    grid-row: 3;
    width: 100%;
    height: 48px;
  }

  .hub-photo-lightbox__nav.is-prev {
    grid-column: 1;
  }

  .hub-photo-lightbox__nav.is-next {
    grid-column: 2;
  }

  .hub-photo-lightbox__stage img {
    max-height: calc(100dvh - 205px);
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .hub-photo-lightbox__panel {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
    min-height: 0;
    padding:
      max(8px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    gap: 6px 8px;
  }

  .hub-photo-lightbox__topbar {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .hub-photo-lightbox__close {
    padding: 7px 12px;
  }

  .hub-photo-lightbox__stage {
    grid-column: 2;
    grid-row: 2;
    gap: 0;
  }

  .hub-photo-lightbox__nav {
    grid-row: 2;
    width: 48px;
    height: 48px;
  }

  .hub-photo-lightbox__nav.is-prev {
    grid-column: 1;
  }

  .hub-photo-lightbox__nav.is-next {
    grid-column: 3;
  }

  .hub-photo-lightbox__stage img {
    max-height: calc(100dvh - 70px);
  }

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

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.metric-card,
.mini-stat {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.metric-card strong {
  color: var(--navy-800);
  font-size: 1.65rem;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid rgba(17, 34, 23, 0.1);
  border-top: 6px solid var(--orange);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 12%, rgba(124, 181, 222, 0.25), transparent 18rem),
    var(--paper);
  box-shadow: var(--shadow);
}

.profile-avatar {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--navy-800);
  box-shadow: var(--shadow-soft);
  font-size: 1.15rem;
  font-weight: 950;
}

.profile-identity h2 {
  margin: 8px 0 2px;
  color: var(--navy-950);
  font-size: clamp(1.85rem, 5vw, 2.8rem);
  line-height: 1;
}

.profile-identity p {
  margin: 7px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.profile-account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(24, 42, 125, 0.14);
  border-radius: 999px;
  color: var(--navy-800);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.profile-account-link--quiet {
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.profile-account-actions,
.account-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.profile-coach-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #fff;
  background: var(--navy-800);
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.profile-pilot-note {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid rgba(242, 140, 40, 0.28);
  border-radius: 13px;
  color: #754116;
  background: rgba(242, 140, 40, 0.09);
  font-size: 0.8rem;
}

.player-sign-in-card,
.account-state-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 64px);
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
}

.player-sign-in-card h2,
.account-state-card h2 {
  margin: 4px 0 8px;
  color: var(--navy-950);
  font-size: clamp(1.45rem, 4vw, 2.15rem);
}

.player-sign-in-card p,
.account-state-card p {
  margin: 0;
  color: var(--muted);
}

.player-sign-in-form {
  display: grid;
  gap: 8px;
}

.player-code-form {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.player-code-form > small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.player-code-form input {
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}

.player-sign-in-form label {
  font-size: 0.78rem;
  font-weight: 900;
}

.player-sign-in-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.player-sign-in-form .player-device-choice {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  color: var(--ink);
  cursor: pointer;
}

.player-device-choice input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--navy-800);
}

.player-device-choice span {
  display: grid;
  gap: 2px;
}

.player-device-choice small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.player-sign-in-form input {
  min-width: 0;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.player-auth-feedback {
  grid-column: 1 / -1;
  min-height: 1.2em;
  font-size: 0.78rem;
}

.player-auth-feedback.is-error {
  color: var(--red);
}

.account-state-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.account-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--sky-200);
  border-top-color: var(--navy-700);
  border-radius: 50%;
  animation: account-spin 0.8s linear infinite;
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

.profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: start;
  gap: 16px;
}

.profile-match-list {
  display: grid;
}

.profile-match-list--scroll {
  --appearance-height: 112px;
  max-height: calc(var(--appearance-height) * 3);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sky-500) transparent;
  padding-right: 6px;
}

.profile-match-list--scroll .profile-match-row {
  min-height: var(--appearance-height);
  box-sizing: border-box;
}

.profile-match-list--scroll:focus-visible {
  outline: 3px solid var(--sky-500);
  outline-offset: 3px;
}

.profile-empty-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed rgba(24, 42, 125, 0.22);
  border-radius: var(--radius-md);
  background: var(--sky-100);
}

.profile-empty-state > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--navy-800);
  font-weight: 950;
}

.profile-empty-state strong,
.profile-empty-state small {
  display: block;
}

.profile-empty-state small {
  margin-top: 4px;
  color: var(--muted);
}

.profile-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.profile-match-row:last-child {
  border-bottom: 0;
}

.profile-match-row time,
.profile-match-row strong,
.profile-match-row small {
  display: block;
}

.profile-match-row time,
.profile-match-row small {
  color: var(--muted);
  font-size: 0.75rem;
}

.profile-match-row strong {
  margin: 2px 0;
}

.profile-match-output {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 210px;
}

.profile-match-output span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--navy-800);
  background: var(--sky-100);
  font-size: 0.7rem;
  font-weight: 900;
}

.profile-details dl {
  margin: 0;
}

.profile-details dl div {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.profile-details dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.profile-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.season-history-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 13px;
  color: var(--navy-800);
  background: var(--sky-100);
  text-decoration: none;
}

.season-history-link span:first-child {
  display: grid;
}

.season-history-link small {
  color: var(--muted);
}

.stats-panel {
  min-height: 430px;
}

.stats-tab-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.leader-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.leader-card h3 {
  margin: 0;
}

.leader-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.leader-card__head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.leader-list--scroll {
  display: block;
  max-height: 171px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
  scrollbar-color: var(--sky-500) transparent;
  scrollbar-width: thin;
}

.leader-list--scroll:focus-visible {
  outline: 3px solid rgba(242, 140, 40, 0.68);
  outline-offset: 3px;
}

.leader-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 57px;
}

.leader-row strong {
  color: var(--navy-800);
}

.data-notice {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(242, 140, 40, 0.28);
  border-radius: 13px;
  color: #704115;
  background: #fff7eb;
  font-size: 0.84rem;
}

.team-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 16px;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat strong {
  color: var(--navy-800);
  font-size: 1.35rem;
}

.form-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.form-strip span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 950;
}

.ladder-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.ladder-fullscreen-shell {
  min-width: 0;
}

.ladder-toolbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ladder-fullscreen-shell:fullscreen,
.ladder-fullscreen-shell.is-ladder-expanded {
  width: 100vw;
  height: 100vh;
  max-width: none;
  padding: 14px;
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
}

.ladder-fullscreen-shell.is-ladder-expanded {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.ladder-fullscreen-shell:fullscreen::backdrop {
  background: var(--paper);
}

.ladder-fullscreen-shell:fullscreen .ladder-table,
.ladder-fullscreen-shell.is-ladder-expanded .ladder-table {
  min-width: 650px;
  table-layout: fixed;
}

.ladder-fullscreen-shell:fullscreen .ladder-table th,
.ladder-fullscreen-shell:fullscreen .ladder-table td,
.ladder-fullscreen-shell.is-ladder-expanded .ladder-table th,
.ladder-fullscreen-shell.is-ladder-expanded .ladder-table td {
  padding: 8px 5px;
  font-size: 0.74rem;
}

.ladder-fullscreen-shell:fullscreen .ladder-table th:nth-child(2),
.ladder-fullscreen-shell:fullscreen .ladder-table td:nth-child(2),
.ladder-fullscreen-shell.is-ladder-expanded .ladder-table th:nth-child(2),
.ladder-fullscreen-shell.is-ladder-expanded .ladder-table td:nth-child(2) {
  width: 38%;
}

body.ladder-expanded {
  overflow: hidden;
}

.ladder-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.ladder-table th,
.ladder-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 0.82rem;
}

.ladder-table th:nth-child(2),
.ladder-table td:nth-child(2) {
  text-align: left;
}

.ladder-table thead th {
  color: var(--muted);
  background: #faf8f1;
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ladder-table tr.is-club td {
  color: var(--navy-900);
  background: var(--sky-100);
  font-weight: 900;
}

.season-transition-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--ink);
  border-top: 6px solid var(--sky-500);
  background:
    radial-gradient(circle at 90% 20%, rgba(124, 181, 222, 0.18), transparent 18rem),
    linear-gradient(135deg, #ffffff, var(--sky-100));
  box-shadow: var(--shadow-soft);
}

.season-transition-card h2 {
  margin: 7px 0 5px;
}

.season-transition-card p {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
}

.season-transition-card__year {
  color: var(--navy-700);
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-weight: 950;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

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

.archive-hero {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--sky-100);
}

.archive-hero__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 25px;
  border-top: 6px solid var(--orange);
}

.archive-hero h2 {
  margin-top: 7px;
  color: var(--navy-950);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.archive-hero__finish {
  color: var(--navy-800);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.archive-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 25px 24px;
}

.archive-metric {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.archive-metric strong {
  color: var(--navy-800);
  font-size: 1.25rem;
}

.archive-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 25px 25px;
  border-top: 1px solid rgba(24, 42, 125, 0.1);
  background: rgba(255, 255, 255, 0.4);
}

.archive-detail section {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.archive-detail h3 {
  margin: 0 0 11px;
  color: var(--navy-950);
}

.finals-list {
  display: grid;
  gap: 9px;
}

.finals-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(24, 42, 125, 0.1);
}

.finals-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.finals-list strong {
  color: var(--navy-800);
  font-size: 0.82rem;
  text-align: right;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: rgba(248, 245, 233, 0.54);
  font-size: 0.72rem;
}

@media (max-width: 980px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin: -12px 0 10px;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .hero-card__layout,
  .home-dashboard,
  .matches-layout,
  .team-summary-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .home-events {
    position: static;
  }

  .match-detail {
    position: static;
  }

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

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

@media (max-width: 720px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .site-header {
    position: relative;
    backdrop-filter: none;
  }

  .site-header__inner {
    width: min(100% - 24px, 1180px);
    min-height: 72px;
    gap: 10px;
  }

  .club-brand img {
    width: 48px;
    height: 48px;
  }

  .club-brand strong {
    font-size: 0.92rem;
  }

  .club-brand small {
    font-size: 0.58rem;
  }

  .profile-link {
    padding-right: 6px;
  }

  .profile-link__copy {
    display: none;
  }

  .account-access {
    padding-right: 6px;
  }

  .account-access__copy {
    display: none;
  }

  .primary-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-self: auto;
    gap: 0;
    margin: 0;
    padding: 4px 5px calc(4px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid rgba(9, 20, 63, 0.13);
    border-radius: 0;
    background: rgba(255, 253, 247, 0.97);
    box-shadow: 0 -8px 28px rgba(4, 13, 38, 0.16);
    backdrop-filter: blur(18px);
  }

  .primary-nav a {
    position: relative;
    display: grid;
    grid-template-rows: 27px auto;
    min-width: 0;
    min-height: 64px;
    gap: 2px;
    padding: 7px 1px 5px;
    border-radius: 0;
    color: #65736d;
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .primary-nav a:hover,
  .primary-nav a[aria-current="page"] {
    color: var(--navy-800);
    background: transparent;
  }

  .primary-nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 24%;
    width: 52%;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--orange);
  }

  .primary-nav .nav-icon {
    width: 27px;
    height: 27px;
    margin: 0 auto;
    color: currentColor;
  }

  .primary-nav .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .primary-nav .nav-label {
    align-self: end;
    overflow: hidden;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .primary-nav a[aria-current="page"] .nav-icon {
    color: var(--navy-800);
  }

  .page-shell {
    width: min(100% - 24px, 1180px);
    padding: 24px 0 42px;
  }

  .page-head {
    display: grid;
    align-items: start;
    margin-bottom: 16px;
  }

  .page-head h1 {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .season-select-wrap {
    width: 100%;
  }

  .hero-card,
  .panel,
  .match-list,
  .match-detail,
  .archive-hero,
  .season-transition-card {
    border-radius: 19px;
  }

  .hero-card {
    padding: 20px;
  }

  .hero-card h1 {
    max-width: 14ch;
    font-size: clamp(1.9rem, 9vw, 2.55rem);
  }

  .hero-card__scoreboard div {
    padding: 15px 10px;
  }

  .hero-card__scoreboard strong {
    font-size: 1.42rem;
  }

  .section-heading {
    display: grid;
    margin-top: 27px;
  }

  .content-grid,
  .route-grid,
  .stats-tab-layout,
  .archive-detail {
    grid-template-columns: 1fr;
  }

  .route-card {
    min-height: 0;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
  }

  .route-card__icon {
    grid-row: 1 / 3;
    margin: 0;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

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

  .segmented-control button {
    padding-inline: 8px;
  }

  .match-list__head,
  .match-row {
    padding-inline: 14px;
  }

  .match-row__title {
    max-width: 210px;
  }

  .match-detail__hero {
    padding: 20px;
  }

  .match-detail__body {
    padding: 18px;
  }

  .mobile-list-return {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin: 0 0 14px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    color: var(--navy-800);
    background: var(--sky-100);
    font-size: 0.76rem;
    font-weight: 900;
    cursor: pointer;
  }

  .detail-facts,
  .mini-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ladder-toolbar {
    align-items: flex-start;
  }

  .ladder-toolbar__actions {
    align-items: flex-end;
    flex-direction: column;
  }

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

  .ladder-table th,
  .ladder-table td {
    padding: 10px 4px;
    font-size: 0.7rem;
  }

  .ladder-table th:nth-child(4),
  .ladder-table td:nth-child(4),
  .ladder-table th:nth-child(5),
  .ladder-table td:nth-child(5),
  .ladder-table th:nth-child(6),
  .ladder-table td:nth-child(6) {
    display: none;
  }

  .ladder-table th:first-child,
  .ladder-table td:first-child {
    width: 42px;
  }

  .ladder-table th:nth-child(3),
  .ladder-table td:nth-child(3),
  .ladder-table th:nth-child(7),
  .ladder-table td:nth-child(7),
  .ladder-table th:nth-child(8),
  .ladder-table td:nth-child(8) {
    width: 38px;
  }

  .ladder-fullscreen-shell:fullscreen .ladder-table th:nth-child(4),
  .ladder-fullscreen-shell:fullscreen .ladder-table td:nth-child(4),
  .ladder-fullscreen-shell:fullscreen .ladder-table th:nth-child(5),
  .ladder-fullscreen-shell:fullscreen .ladder-table td:nth-child(5),
  .ladder-fullscreen-shell:fullscreen .ladder-table th:nth-child(6),
  .ladder-fullscreen-shell:fullscreen .ladder-table td:nth-child(6),
  .ladder-fullscreen-shell.is-ladder-expanded .ladder-table th:nth-child(4),
  .ladder-fullscreen-shell.is-ladder-expanded .ladder-table td:nth-child(4),
  .ladder-fullscreen-shell.is-ladder-expanded .ladder-table th:nth-child(5),
  .ladder-fullscreen-shell.is-ladder-expanded .ladder-table td:nth-child(5),
  .ladder-fullscreen-shell.is-ladder-expanded .ladder-table th:nth-child(6),
  .ladder-fullscreen-shell.is-ladder-expanded .ladder-table td:nth-child(6) {
    display: table-cell;
  }

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

  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    border-radius: 19px;
  }

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

  .profile-account-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .profile-account-actions > * {
    flex: 1 1 0;
  }

  .player-sign-in-card,
  .account-state-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .player-sign-in-form > div {
    grid-template-columns: 1fr;
  }

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

  .profile-match-row {
    align-items: start;
  }

  .profile-match-output {
    max-width: 115px;
  }

  .metric-card {
    padding: 14px;
  }

  .metric-card strong {
    font-size: 1.45rem;
  }

  .season-transition-card {
    grid-template-columns: 1fr;
  }

  .season-transition-card__year {
    grid-row: 1;
  }

  .archive-hero__head {
    grid-template-columns: 1fr;
    padding: 21px;
  }

  .archive-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 21px 21px;
  }

  .archive-detail {
    padding: 18px 21px 21px;
  }

  .site-footer {
    display: grid;
    width: min(100% - 24px, 1180px);
    padding-bottom: 18px;
  }
}

@media (max-width: 390px) {
  .club-brand strong {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-card__scoreboard span,
  .metric-card span,
  .archive-metric span {
    font-size: 0.59rem;
  }

  .match-row__title {
    max-width: 180px;
  }

  .finals-list div {
    grid-template-columns: 1fr;
  }

  .finals-list strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Public and player live match centre. Only the safe score/key-event feed is used. */
.live-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; padding: 5px 9px; background: #d8f7e7; color: #07583b; font-size: 10px; line-height: 1.2; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.match-row--live { border-left: 4px solid #15956b; }
.match-row--live .match-row__meta:first-child { display: flex; align-items: center; gap: 8px; }
.welcome-vote-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.welcome-vote-entry > div { flex: 1 1 240px; }
.welcome-vote-entry h2 { margin: 0 0 6px; }
.welcome-vote-entry p { margin: 0; }
.welcome-vote-entry .action-button { flex: 0 1 auto; min-height: 44px; text-align: center; }
.live-home-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; margin-top: 18px; border-radius: 18px; color: white; background: #122161; text-decoration: none; box-shadow: 0 8px 25px #12216115; }
.live-home-banner > span { display: flex; gap: 8px; flex-direction: column; }
.live-home-banner > span:nth-child(2) { text-align: center; }
.live-home-banner > span:nth-child(2) strong { font-size: 32px; line-height: 1; }
.live-home-banner small { color: #d9e3ff; }
.live-home-banner__link { font-size: 13px; font-weight: 750; }
.live-match-detail .match-detail__hero { background: linear-gradient(130deg, #122161, #223c83); }
.live-match-detail .tag-row { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.live-freshness { margin: 4px 0 20px; color: #27674f; font-size: 12px; }
.live-freshness.is-stale { color: #925116; }
.live-event-timeline { list-style: none; padding: 0; margin: 18px 0 0; }
.live-event-timeline li { display: grid; grid-template-columns: 34px 24px minmax(0, 1fr); align-items: start; gap: 12px; padding: 15px 0; border-bottom: 1px solid #e4e7ed; }
.live-event-minute { padding-top: 3px; color: #586575; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.live-event-icon { display: block; margin: 3px auto 0; }
.live-event-icon.is-yellow-card, .live-event-icon.is-red-card { width: 13px; height: 18px; border-radius: 2px; transform: rotate(-9deg); background: #f1c644; box-shadow: 0 1px 2px #0002; }
.live-event-icon.is-red-card { background: #d83946; }
.live-event-timeline li > span:last-child { display: grid; gap: 4px; }
.live-event-timeline strong { color: #122161; font-size: 13px; }
.live-event-timeline li > span:last-child > span { font-size: 14px; }
.live-event-timeline small { color: #637085; font-size: 12px; }
@media (max-width: 600px) {
  .live-home-banner { padding: 18px; flex-wrap: wrap; gap: 12px; }
  .live-home-banner > span:first-child { flex: 1; min-width: 180px; }
  .live-home-banner__link { flex-basis: 100%; }
  .segmented-control:has([data-match-filter="live"]) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .segmented-control [data-match-filter] { padding-left: 8px; padding-right: 8px; font-size: 12px; }
}

/* Four match filters share a single row at desktop, tablet and phone sizes. */
.segmented-control:has([data-match-filter="live"]) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 440px);
}


.league-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ffffff, var(--sky-100));
}

.profile-availability { margin: 20px 0; }
.availability-private { margin: -6px 0 18px; color: var(--muted); font-size: 13px; }
.availability-refresh { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--navy-900); cursor: pointer; }
.availability-game { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.availability-game__head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.availability-game__head small { color: var(--muted); font-size: 12px; }
.availability-game__head h3 { margin: 7px 0; font-size: 20px; }
.availability-game__head p { margin: 0; color: var(--muted); font-size: 13px; }
.availability-game__head > strong { color: var(--navy-800); font-size: 12px; }
.availability-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.availability-counts > span { display: grid; gap: 3px; padding: 10px 5px; text-align: center; font-size: 11px; border-radius: 10px; background: var(--sky-100); }
.availability-counts strong { font-size: 22px; color: var(--navy-900); }
.availability-answer { display: flex; align-items: end; gap: 10px; margin-top: 14px; }
.availability-answer label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; flex: 1; }
.availability-answer select { min-height: 44px; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.availability-save { min-height: 44px; padding: 9px 20px; border: 0; border-radius: 10px; background: var(--navy-800); color: white; font-weight: 800; cursor: pointer; }
.availability-save:disabled { opacity: .55; cursor: default; }
.availability-feedback { min-height: 1.5em; font-size: 12px; color: var(--navy-800); margin: 10px 0 0; }
.league-summary h2 { margin: 5px 0 6px; font-size: clamp(21px, 3vw, 28px); }
.league-summary p, .league-source p { margin: 0; color: var(--muted); }
.league-kicker { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--navy-700); }
.league-summary__badge { flex-shrink: 0; padding: 8px 12px; border-radius: 100px; background: var(--sky-200); color: var(--navy-900); font-size: 12px; font-weight: 800; }
.segmented-control.league-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.league-tabs button[aria-pressed="true"] { color: white; background: var(--navy-800); box-shadow: var(--shadow-soft); }
.league-panel { margin-top: 18px; }
.stats-panel.league-panel { min-height: 0; }
.league-filters { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 20px; }
.league-filters label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.league-filters select { min-width: 140px; min-height: 44px; padding: 9px 30px 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
.league-team-filter { min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--navy-900); cursor: pointer; font-weight: 700; }
.league-team-filter[aria-pressed="true"] { background: var(--sky-200); border-color: var(--navy-700); }
.league-game-count { align-self: flex-end; margin-left: auto; padding-bottom: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.league-rounds { display: grid; gap: 12px; }
.league-round { min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: clip; }
.league-round > summary { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 14px 16px; cursor: pointer; list-style: none; background: #f4f7f6; }
.league-round > summary::-webkit-details-marker { display: none; }
.league-round > summary > strong { font-size: 16px; }
.league-round > summary > span { font-size: 12px; color: var(--muted); }
.league-round > summary .league-round__chevron { margin-left: auto; font-size: 20px; transition: transform .15s; }
.league-round[open] > summary .league-round__chevron { transform: rotate(180deg); }
.league-round__games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.league-round__games .league-game { margin-bottom: 0; }
.league-round > summary:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.league-game { padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; margin-bottom: 10px; }
.league-game--hpw { border-left: 4px solid var(--navy-700); background: var(--sky-100); padding-left: 13px; }
.league-game__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.league-status { padding: 3px 7px; border-radius: 6px; background: var(--sand); font-size: 10px; font-weight: 800; white-space: nowrap; }
.league-status--played { color: var(--green); background: #e7f4e9; }
.league-status--postponed { color: #86520c; background: #fff0d5; }
.league-game__teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.league-game__teams strong { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.league-game__teams strong:last-child { text-align: right; }
.league-game__score { min-width: 36px; text-align: center; color: var(--navy-900); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.league-game__venue { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.league-hpw-label { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--navy-700); }
.league-empty { text-align: center; max-width: 500px; padding: 24px 8px 32px; margin: auto; }
.league-empty__icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--sky-100); color: var(--navy-800); font-size: 30px; }
.league-empty h2 { font-size: 22px; margin: 16px 0 8px; }
.league-empty p { color: var(--muted); margin: 0 0 18px; }
.league-source { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 8px; font-size: 12px; }
.league-source strong { display: block; margin-bottom: 4px; color: var(--paper); }
.league-source p { color: #d4ded9; max-width: 650px; }
.league-source a { flex-shrink: 0; color: var(--paper); font-weight: 700; text-underline-offset: 4px; }
.league-preview-banner { padding: 12px 16px; background: #fff2ce; color: #593c08; text-align: center; font-size: 12px; }
.league-preview-banner > span { margin-left: 10px; }
.league-preview-banner > div { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.league-preview-banner a { padding: 8px 12px; border: 1px solid #c8b784; border-radius: 8px; text-decoration: none; }
.league-preview-banner a[aria-current="page"] { background: #593c08; color: white; }
@media (max-width: 720px) {
  .league-summary { padding: 18px; gap: 12px; flex-wrap: wrap; }
  .league-summary h2 { font-size: 22px; }
  .league-summary p { font-size: 13px; }
  .league-summary__badge { padding: 5px 10px; font-size: 11px; }
  .league-rounds { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .league-round__games { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .league-filters { gap: 8px; }
  .league-filters select { min-width: 0; width: 125px; }
  .league-team-filter { padding: 9px 10px; font-size: 12px; }
  .league-game-count { font-size: 11px; }
  .league-source { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 4px; }
  .league-preview-banner > span { display: block; margin: 3px 0 0; }
}


@media (max-width: 720px) {
  .league-head.page-head { display: flex; flex-direction: row; align-items: center; gap: 12px; margin-bottom: 16px; }
  .league-head h1 { font-size: 38px; }
  .league-head .season-select-wrap { width: 150px; min-width: 0; }
  .league-head .season-select { width: 100%; min-width: 0; padding-inline: 8px; font-size: 11px; }
  .league-summary { padding: 16px; }
  .league-summary h2 { font-size: 20px; }
  .league-summary__badge { display: none; }
}
