:root {
  color-scheme: light;
  --ink: #141715;
  --muted: #69716d;
  --paper: #f5f6f1;
  --surface: #ffffff;
  --ivory: #fffdf6;
  --moss: #44634e;
  --copper: #a95f37;
  --blue: #264d68;
  --charcoal: #202622;
  --line: rgba(31, 38, 34, 0.13);
  --line-strong: rgba(31, 38, 34, 0.22);
  --shadow: 0 18px 48px rgba(25, 32, 28, 0.12);
  --soft-shadow: 0 8px 28px rgba(25, 32, 28, 0.08);
  --filter-control-height: 20px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, var(--paper) 360px),
    var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

.header-stack {
  position: sticky;
  z-index: 10;
  top: 0;
  box-shadow: 0 12px 34px rgba(15, 18, 16, 0.14);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--ivory);
}

.app-header {
  backdrop-filter: blur(18px);
  background: rgba(22, 27, 24, 0.94);
  color: var(--ivory);
  border-bottom: 1px solid rgba(255, 250, 240, 0.1);
}

.club-header {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 7px clamp(18px, 4vw, 56px);
  background: rgba(37, 44, 40, 0.98);
  border-bottom: 1px solid rgba(255, 250, 240, 0.12);
  color: rgba(255, 250, 240, 0.86);
  scrollbar-width: thin;
}

.club-header a {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.04);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.club-header a:hover,
.club-header a[aria-current="true"] {
  background: var(--ivory);
  color: var(--ink);
}

.club-header span {
  color: currentColor;
  opacity: 0.72;
}

.tournament-page-header {
  --tournament-header-label-width: 104px;
  display: grid;
  gap: 7px;
  padding: 10px clamp(18px, 4vw, 56px) 11px;
  background: rgba(37, 44, 40, 0.98);
  border-bottom: 1px solid rgba(255, 250, 240, 0.12);
  color: rgba(255, 250, 240, 0.9);
}

.tournament-header-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.tournament-header-title > span,
.tournament-index-label-stack > span {
  flex: 0 0 var(--tournament-header-label-width);
  width: var(--tournament-header-label-width);
  color: rgba(255, 250, 240, 0.62);
  font-size: 0.68rem;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tournament-header-title h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ivory);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.44rem, 2.4vw, 1.92rem);
  font-weight: 840;
  letter-spacing: 0;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-cup-page-header .tournament-header-title {
  align-items: flex-start;
}

.tournament-index-header .tournament-header-title {
  align-items: flex-start;
}

.tournament-index-label-stack {
  display: block;
  flex: 0 0 max-content;
  width: max-content;
  min-width: max-content;
}

.tournament-index-label-stack.has-season {
  position: relative;
  padding-bottom: 31px;
}

.tournament-index-label-stack > span {
  display: block;
  flex-basis: auto;
  width: max-content;
  line-height: 13px;
}

.tournament-index-heading-stack {
  display: grid;
  min-width: 0;
  gap: 0;
}

.tournament-index-heading-stack h1 {
  line-height: 1;
}

.tournament-index-heading-stack .tournament-header-meta {
  padding-left: 0;
}

.season-select.team-cup-header-season {
  width: auto;
  min-width: 132px;
  margin-left: auto;
  gap: 3px;
  color: rgba(255, 250, 240, 0.68);
}

.season-select.team-cup-header-season span {
  color: inherit;
  font-size: 0.62rem;
}

.season-select.team-cup-header-season select {
  height: 28px;
  min-width: 126px;
  border-color: rgba(255, 250, 240, 0.18);
  background: rgba(255, 250, 240, 0.08);
  color: var(--ivory);
  font-size: 0.78rem;
}

.season-select.team-cup-header-season.tournament-index-season-select {
  width: 100%;
  min-width: 0;
  margin-left: 0;
}

.tournament-index-label-stack.has-season .tournament-index-season-select {
  position: absolute;
  top: 16px;
  left: 0;
}

.season-select.team-cup-header-season.tournament-index-season-select > span {
  display: none;
}

.season-select.team-cup-header-season.tournament-index-season-select select {
  width: 100%;
  min-width: 0;
  padding: 0 18px 0 6px;
}

.tournament-index-header .tournament-header-meta {
  padding-left: 0;
}

.team-cup-header-cup-row {
  display: flex;
  overflow-x: auto;
  padding: 7px clamp(18px, 4vw, 56px) 8px;
  background: rgba(37, 44, 40, 0.98);
  border-bottom: 1px solid rgba(255, 250, 240, 0.12);
  scrollbar-width: thin;
}

.team-cup-header-cup-menu,
.team-cup-header-cup-row .team-division-nav,
.team-cup-header-cup-row .team-leg-menu,
.team-cup-header-cup-row .team-board-nav,
.team-cup-header-cup-row .team-round-nav,
.team-cup-header-cup-row .challenge-u20-switch {
  flex-wrap: nowrap;
  gap: 5px;
}

.team-cup-header-cup-row .team-cup-header-cup-menu a,
.team-cup-header-cup-row .team-division-nav a,
.team-cup-header-cup-row .team-leg-menu a,
.team-cup-header-cup-row .team-board-nav a,
.team-cup-header-cup-row .team-round-nav a,
.team-cup-header-cup-row .challenge-u20-switch a {
  min-height: 26px;
  padding: 5px 8px;
  border-color: rgba(255, 250, 240, 0.14);
  background: rgba(255, 250, 240, 0.04);
  color: rgba(255, 250, 240, 0.86);
  font-size: 0.76rem;
  white-space: nowrap;
}

.team-cup-header-cup-row .team-cup-header-cup-menu a:hover,
.team-cup-header-cup-row .team-division-nav a:hover,
.team-cup-header-cup-row .team-leg-menu a:hover,
.team-cup-header-cup-row .team-board-nav a:hover,
.team-cup-header-cup-row .team-round-nav a:hover,
.team-cup-header-cup-row .challenge-u20-switch a:hover {
  border-color: rgba(255, 250, 240, 0.32);
}

.team-cup-header-cup-row .team-cup-header-cup-menu a[aria-current="page"],
.team-cup-header-cup-row .team-division-nav a[aria-current="page"],
.team-cup-header-cup-row .team-leg-menu a[aria-current="page"],
.team-cup-header-cup-row .team-board-nav a[aria-current="page"],
.team-cup-header-cup-row .team-round-nav a[aria-current="page"],
.team-cup-header-cup-row .challenge-u20-switch a[aria-current="page"] {
  border-color: var(--ivory);
  background: var(--ivory);
  color: var(--ink);
}

.tournament-page-header > .challenge-u20-switch-row {
  padding: 0;
  overflow-x: auto;
  background: transparent;
  border-bottom: 0;
}

.tournament-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-left: calc(var(--tournament-header-label-width) + 12px);
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.76rem;
  font-weight: 680;
}

.tournament-page-header .view-links,
.tournament-page-header .tournament-subtournament-links {
  gap: 5px;
}

.tournament-page-header .view-links a,
.tournament-page-header .tournament-subtournament-links a {
  min-height: 26px;
  padding: 5px 8px;
  border-color: rgba(255, 250, 240, 0.14);
  background: rgba(255, 250, 240, 0.04);
  color: rgba(255, 250, 240, 0.86);
  font-size: 0.76rem;
}

.tournament-page-header .view-links a:hover,
.tournament-page-header .tournament-subtournament-links a:hover {
  border-color: rgba(255, 250, 240, 0.32);
}

.tournament-page-header .view-links a[aria-current="page"],
.tournament-page-header .tournament-subtournament-links a[aria-current="page"] {
  border-color: var(--ivory);
  background: var(--ivory);
  color: var(--ink);
}

.players-page-header .tournament-header-title {
  display: block;
}

.players-page-header .tournament-header-meta {
  padding-left: 0;
}

.players-page-header .view-links {
  justify-content: flex-start;
}

.tournament-header-round-nav {
  gap: 5px;
  padding-top: 1px;
}

.tournament-page-header .round-nav-row {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 7px;
}

.tournament-page-header .round-nav-row > span {
  min-height: 24px;
  color: rgba(255, 250, 240, 0.62);
  font-size: 0.68rem;
}

.tournament-page-header .round-nav-row .segment-links {
  gap: 5px;
}

.tournament-page-header .round-nav-row .segment-links a {
  min-height: 24px;
  padding: 4px 8px;
  border-color: rgba(255, 250, 240, 0.14);
  background: rgba(255, 250, 240, 0.04);
  color: rgba(255, 250, 240, 0.86);
  font-size: 0.74rem;
}

.tournament-page-header .round-nav-row .segment-links a:hover {
  border-color: rgba(255, 250, 240, 0.32);
}

.tournament-page-header .round-nav-row .segment-links a[aria-current="page"] {
  border-color: var(--ivory);
  background: var(--ivory);
  color: var(--ink);
}

.brand,
.nav-links,
.language-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  text-decoration: none;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.4);
  border-radius: 8px;
  background: rgba(20, 20, 18, 0.34);
  font-size: 18px;
}

.nav-links a {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 720;
  color: rgba(255, 250, 240, 0.84);
}

.nav-links a:hover,
.language-links a:hover {
  background: rgba(255, 250, 240, 0.11);
}

.language-links {
  gap: 4px;
}

.language-links a {
  display: grid;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 800;
}

.language-links a[aria-current="true"] {
  background: var(--ivory);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--ivory);
}

.app-hero {
  position: relative;
  min-height: 70svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--ivory);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(20, 20, 18, 0.82) 0%, rgba(20, 20, 18, 0.52) 42%, rgba(20, 20, 18, 0.08) 100%),
    linear-gradient(0deg, rgba(20, 20, 18, 0.74) 0%, rgba(20, 20, 18, 0.12) 55%);
}

.hero-content {
  position: relative;
  width: min(900px, 100%);
  padding: 112px clamp(22px, 7vw, 90px) 58px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
}

.eyebrow {
  color: #e8c7a2;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.15rem, 8vw, 6.5rem);
  font-weight: 650;
}

.app-hero h1 {
  max-width: 860px;
  font-size: clamp(3rem, 5vw, 5.25rem);
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  max-width: 720px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 620;
}

h3 {
  font-size: 1.18rem;
}

.hero-copy {
  max-width: 590px;
  margin: 24px 0 0;
  color: rgba(255, 250, 240, 0.84);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 13px 19px;
  text-decoration: none;
  font-weight: 780;
}

.button-primary {
  background: var(--ivory);
  color: var(--ink);
}

.button-secondary {
  border-color: rgba(255, 250, 240, 0.42);
  color: var(--ivory);
}

.board-band,
.content-band,
.split-band {
  padding: clamp(54px, 8vw, 110px) clamp(20px, 5vw, 72px);
}

.board-band {
  background: var(--charcoal);
  color: var(--ivory);
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(290px, 520px);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.position-copy p:not(.section-kicker),
.section-heading,
.tile p {
  line-height: 1.65;
}

.position-copy p:not(.section-kicker) {
  max-width: 560px;
  color: rgba(255, 250, 240, 0.72);
  font-size: 1.05rem;
}

.board-shell {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
  padding: 28px;
}

.board {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  overflow: hidden;
  border: 10px solid #5e4030;
  box-shadow: var(--shadow);
}

.board span {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}

.light {
  background: #e6d2ad;
}

.dark {
  background: #6b8154;
}

.piece {
  font-size: clamp(1.35rem, 6vw, 3.35rem);
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.18);
}

.black {
  color: #1d201d;
}

.white {
  color: #fbf3df;
  text-shadow: 0 2px 8px rgba(29, 32, 29, 0.52);
}

.coordinates {
  position: absolute;
  color: rgba(255, 250, 240, 0.56);
  font-size: 0.76rem;
  font-weight: 700;
}

.files {
  left: 31px;
  right: 31px;
  bottom: 5px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  text-align: center;
}

.ranks {
  top: 31px;
  bottom: 31px;
  left: 5px;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  align-items: center;
}

.content-band {
  background: var(--paper);
}

.notice {
  display: flex;
  max-width: 1180px;
  margin: 0 auto 22px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(179, 106, 60, 0.3);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.notice span {
  color: rgba(20, 20, 18, 0.66);
}

.stats-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto 54px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

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

.stat-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.stat-card span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 750;
}

.section-heading,
.tile-grid,
.split-band {
  max-width: 1180px;
  margin: 0 auto;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin-bottom: 28px;
}

.section-kicker {
  color: var(--copper);
}

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

.tile {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: rgba(38, 77, 104, 0.26);
  box-shadow: var(--shadow);
}

.tile-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--moss);
  color: var(--ivory);
  font-size: 1.35rem;
}

.tile p {
  margin: 14px 0 0;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--blue);
  font-weight: 800;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

.club-list {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.club-list-item {
  display: grid;
  grid-template-columns: 34px 72px minmax(260px, 1fr) minmax(160px, 0.55fr) 110px;
  gap: 14px;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border-top: 1px solid rgba(20, 20, 18, 0.08);
  color: var(--ink);
}

.club-list-item:first-child {
  border-top: 0;
}

.club-list-item:hover {
  background: rgba(68, 99, 78, 0.06);
}

.club-list-rank,
.club-list-code {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.club-list-rank {
  text-align: right;
}

.club-list-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-list-item span {
  color: var(--muted);
}

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(300px, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: start;
  background: #edf2ef;
}

.latest-tournaments-band {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.latest-tournaments-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.latest-tournaments-heading h2 {
  margin: 0;
}

.page-main {
  padding: clamp(34px, 6vw, 68px) clamp(20px, 5vw, 72px);
}

.tournament-main {
  --tournament-content-gap: 16px;
  padding-top: 14px;
}

.tournament-index-main {
  padding-top: 14px;
}

.players-main {
  padding-top: 14px;
}

.tournament-main .tournament-details-toggle,
.tournament-main > section {
  margin-bottom: var(--tournament-content-gap);
}

.page-main.tournament-main > section:not(.page-heading) > h2 {
  margin-top: 0;
  margin-bottom: var(--tournament-content-gap);
}

.page-main.tournament-main > section:not(.page-heading) > h2 + .table-wrap,
.page-main.tournament-main > section:not(.page-heading) > h2 + .round-list,
.page-main.tournament-main > section:not(.page-heading) > h2 + .section-panel {
  margin-top: 0;
}

.page-heading {
  max-width: 1180px;
  margin: 0 auto clamp(22px, 4vw, 38px);
}

.tournament-player-heading {
  margin-bottom: var(--tournament-content-gap);
}

.tournament-player-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tournament-player-title-row h1 {
  min-width: 0;
}

.tournament-back-button {
  min-height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0;
  padding: 4px 12px;
}

.tournament-back-button:hover {
  border-color: rgba(31, 38, 34, 0.38);
  background: var(--ivory);
}

.page-heading h1 {
  color: var(--ink);
  max-width: 980px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.85rem, 3.8vw, 3.35rem);
  line-height: 1.05;
  font-weight: 820;
}

.page-heading p:not(.section-kicker) {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-main section:not(.page-heading) h2 {
  margin-bottom: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);
  font-weight: 820;
}

.player-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.player-portrait {
  width: clamp(112px, 14vw, 172px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  object-fit: cover;
  object-position: center;
  box-shadow: 0 16px 46px rgba(15, 18, 16, 0.14);
}

.page-main > section:not(.page-heading),
.table-wrap,
.profile-grid,
.club-details,
.club-details-toggle,
.filter-bar,
.wide-list {
  max-width: 1180px;
  margin-inline: auto;
}

.club-details-toggle {
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.club-details-toggle summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 780;
  list-style: none;
}

.club-details-toggle summary::-webkit-details-marker {
  display: none;
}

.club-details-toggle summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 1.1rem;
}

.club-details-toggle[open] summary {
  border-bottom: 1px solid var(--line);
}

.club-details-toggle[open] summary::after {
  content: "−";
}

.club-details-toggle .club-details {
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(8, minmax(82px, 0.75fr)) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.filter-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.filter-bar span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: var(--filter-control-height);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--ivory);
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  padding: 1px 6px;
}

.filter-actions {
  display: flex;
  gap: 7px;
  align-items: end;
}

.button-filter,
.button-reset {
  height: var(--filter-control-height);
  min-height: var(--filter-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 0.72rem;
  line-height: 1;
}

.button-filter {
  background: var(--charcoal);
  color: var(--ivory);
}

.button-reset {
  border-color: var(--line-strong);
  color: var(--ink);
}

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

.profile-field {
  min-height: 84px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(25, 32, 28, 0.04);
}

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

.profile-field span {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-field strong {
  font-size: 1rem;
  line-height: 1.35;
}

.club-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 0;
}

.section-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  margin-bottom: 24px;
}

.compact-panel {
  max-width: 1180px;
  margin: 0 auto 18px;
}

.round-nav-panel {
  display: grid;
  gap: 6px;
}

.round-nav-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.round-nav-row > span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
  white-space: nowrap;
}

.round-ranking-links a {
  background: rgba(137, 169, 121, 0.12);
}

.tournament-stats {
  margin-bottom: 18px;
}

.table-wrap:has(> .compact-stat-table) {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: visible;
}

.tournament-stats-list,
.compact-stat-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: auto;
}

.tournament-stats-list th,
.tournament-stats-list td,
.compact-stat-table th,
.compact-stat-table td {
  width: 1%;
  white-space: nowrap;
}

.tournament-stat-boxes {
  display: flex;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto 26px;
  gap: 18px;
  align-items: start;
  justify-content: center;
}

.tournament-stat-box {
  flex: 1 1 max-content;
  min-width: fit-content;
  max-width: 100%;
}

.stat-box-title-row th {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 840;
  text-align: left;
  background: rgba(68, 99, 78, 0.07);
}

.tournament-stats-table td {
  white-space: nowrap;
}

.compact-heading {
  margin-bottom: 14px;
}

.segment-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segment-links a {
  padding: 9px 12px;
  border: 1px solid rgba(38, 77, 104, 0.18);
  border-radius: 8px;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  background: rgba(38, 77, 104, 0.04);
}

.segment-links a[aria-current="page"] {
  background: var(--blue);
  color: var(--ivory);
  border-color: var(--blue);
}

.segment-links a:hover {
  border-color: rgba(38, 77, 104, 0.4);
}

.division-menu {
  display: grid;
  gap: 12px;
}

.division-menu-row {
  flex-wrap: nowrap;
  justify-content: space-between;
}

.division-menu-row a {
  flex: 1 1 0;
  text-align: center;
  white-space: nowrap;
}

.division-menu-group {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid rgba(20, 20, 18, 0.08);
}

.division-menu-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.division-menu-group > span {
  padding-top: 9px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.detail-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.detail-card h3 {
  margin: 0;
  padding: 10px 16px 8px;
  border-top: 1px solid var(--line);
  background: rgba(68, 99, 78, 0.06);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 820;
}

.detail-card dl,
.detail-card dd {
  margin: 0;
}

.detail-card dl > div {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 6px 16px;
  border-top: 1px solid rgba(20, 20, 18, 0.08);
}

.detail-card dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.detail-card dt:empty {
  display: none;
}

.detail-card dl > div:has(dt:empty) {
  grid-template-columns: 1fr;
}

.detail-card dl > div:has(dt:empty) .detail-email {
  display: none;
}

.detail-card dd {
  min-width: 0;
  overflow-wrap: normal;
  line-height: 1.25;
}

.detail-email {
  justify-self: start;
  white-space: nowrap;
}

.tournament-details .detail-card dl > div {
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
}

.tournament-details .detail-email {
  display: none;
}

.detail-inline-list,
.detail-link-list {
  display: grid;
  gap: 4px;
}

.detail-inline-list span,
.detail-link-list span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.detail-link-list small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-link-list .muted-link {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.tiebreak-detail-list {
  display: grid;
  gap: 3px;
}

.tiebreak-detail-line {
  display: block;
}

.tiebreak-info-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px dotted currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.tiebreak-info-button:hover,
.tiebreak-info-button:focus-visible {
  color: var(--blue);
  outline: none;
}

.tiebreak-popover {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tiebreak-popover strong {
  font-size: 0.8rem;
}

.tiebreak-popover p {
  margin: 0;
  color: var(--muted);
}

.detail-card dd br {
  display: inline;
}

.detail-card dd br::after {
  content: " · ";
}

.training-grid {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
}

.training-grid > div {
  display: block;
  min-height: 32px;
  padding: 7px 12px;
  border-top: 1px solid rgba(20, 20, 18, 0.08);
  line-height: 1.25;
}

.training-grid > div:nth-child(3n + 1),
.training-grid > div:nth-child(3n + 2) {
  white-space: nowrap;
}

.training-grid > div:nth-child(3n) {
  min-width: 0;
}

.training-note {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

.training-grid > .training-note {
  white-space: normal;
}

.training-head {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.detail-card a {
  color: var(--blue);
  font-weight: 760;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.player-list-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.82rem;
}

.player-list-table th,
.player-list-table td {
  width: 1%;
  padding: 5px 7px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.player-list-table th {
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.player-list-table th:nth-child(1),
.player-list-table td:nth-child(1) {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding-inline: 5px;
  text-align: center;
}

.player-list-table th:nth-child(2),
.player-list-table td:nth-child(2) {
  width: 68px;
  min-width: 68px;
  max-width: 68px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
}

.player-list-table th:nth-child(3),
.player-list-table td:nth-child(3) {
  width: auto;
  min-width: 210px;
}

.player-list-table th:nth-child(4),
.player-list-table td:nth-child(4),
.player-list-table th:nth-child(5),
.player-list-table td:nth-child(5),
.player-list-table th:nth-child(6),
.player-list-table td:nth-child(6),
.player-list-table th:nth-child(8),
.player-list-table td:nth-child(8),
.player-list-table th:nth-child(9),
.player-list-table td:nth-child(9),
.player-list-table th:nth-child(10),
.player-list-table td:nth-child(10),
.player-list-table th:nth-child(11),
.player-list-table td:nth-child(11) {
  width: 1%;
  min-width: 36px;
  max-width: 54px;
  text-align: center;
}

.player-list-table th:nth-child(7),
.player-list-table td:nth-child(7),
.player-list-table th:nth-child(12),
.player-list-table td:nth-child(12),
.player-list-table th:nth-child(13),
.player-list-table td:nth-child(13),
.player-list-table th:nth-child(14),
.player-list-table td:nth-child(14) {
  width: 1%;
  min-width: 44px;
  max-width: 58px;
  text-align: center;
}

.player-list-table th:nth-child(15),
.player-list-table td:nth-child(15) {
  width: 1%;
  min-width: 38px;
  max-width: 48px;
  text-align: center;
}

.player-list-table th:nth-child(16),
.player-list-table td:nth-child(16) {
  width: 1%;
  min-width: 62px;
  max-width: 76px;
  text-align: center;
}

.player-list-table td.name-cell {
  min-width: 210px;
}

.player-list-table td.name-cell a,
.player-list-table .sort-header {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fide-rating-table th:nth-child(4),
.fide-rating-table td:nth-child(4),
.fide-rating-table th:nth-child(5),
.fide-rating-table td:nth-child(5),
.fide-rating-table th:nth-child(6),
.fide-rating-table td:nth-child(6),
.fide-rating-table th:nth-child(7),
.fide-rating-table td:nth-child(7),
.fide-rating-table th:nth-child(8),
.fide-rating-table td:nth-child(8),
.fide-rating-table th:nth-child(10),
.fide-rating-table td:nth-child(10),
.fide-rating-table th:nth-child(12),
.fide-rating-table td:nth-child(12),
.fide-rating-table th:nth-child(14),
.fide-rating-table td:nth-child(14),
.fide-rating-table th:nth-child(15),
.fide-rating-table td:nth-child(15) {
  width: 1%;
  min-width: 36px;
  max-width: 54px;
  text-align: center;
}

.fide-rating-table th:nth-child(9),
.fide-rating-table td:nth-child(9),
.fide-rating-table th:nth-child(11),
.fide-rating-table td:nth-child(11),
.fide-rating-table th:nth-child(13),
.fide-rating-table td:nth-child(13) {
  width: 1%;
  min-width: 48px;
  max-width: 64px;
  text-align: center;
}

.tournament-standings-table {
  --sticky-rk-left: 0px;
  --sticky-sno-left: 34px;
  --sticky-title-left: 76px;
  --sticky-players-left: 110px;
  --sticky-rk-width: 34px;
  --sticky-sno-width: 42px;
  --sticky-title-width: 34px;
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.82rem;
}

.tournament-standings-table.no-title-column,
.tournament-crosstable-table.no-title-column {
  --sticky-players-left: var(--sticky-title-left);
}

.tournament-standings-table.no-sno-column.no-title-column,
.tournament-crosstable-table.no-sno-column.no-title-column {
  --sticky-players-left: var(--sticky-sno-left);
}

.tournament-standings-table th,
.tournament-standings-table td {
  width: 1%;
  padding: 5px 7px;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
}

.tournament-standings-table th {
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.tournament-standings-table .rk-col,
.tournament-standings-table .sno-col,
.tournament-standings-table .title-col {
  width: 1%;
  padding-inline: 5px;
  text-align: center;
}

.tournament-standings-table .rk-col {
  width: var(--sticky-rk-width);
  min-width: var(--sticky-rk-width);
  max-width: var(--sticky-rk-width);
}

.tournament-standings-table .sno-col {
  width: var(--sticky-sno-width);
  min-width: var(--sticky-sno-width);
  max-width: var(--sticky-sno-width);
}

.tournament-standings-table .title-col {
  width: var(--sticky-title-width);
  min-width: var(--sticky-title-width);
  max-width: var(--sticky-title-width);
}

.tournament-standings-table .players-col {
  width: auto;
  min-width: 185px;
  text-align: left;
}

.tournament-standings-table .fed-col,
.tournament-standings-table .rtg-col,
.tournament-standings-table .rp-col,
.tournament-standings-table .avg-col,
.tournament-standings-table .perf-col,
.tournament-standings-table .cat-col {
  width: 1%;
  min-width: 42px;
  max-width: 56px;
  text-align: center;
}

.tournament-standings-table .points-col,
.tournament-standings-table .tb-col {
  width: 1%;
  min-width: 38px;
  max-width: 52px;
  text-align: left;
}

.tournament-standings-table .club-col {
  width: 62px;
  min-width: 48px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.club-shortcut {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.tournament-standings-table .fide-id-col {
  width: 1%;
  min-width: 62px;
  text-align: center;
}

.tournament-standings-table td.name-cell {
  min-width: 185px;
}

.tournament-standings-table .rk-col,
.tournament-standings-table .sno-col,
.tournament-standings-table .title-col,
.tournament-standings-table .players-col,
.tournament-crosstable-table .rk-col,
.tournament-crosstable-table .sno-col,
.tournament-crosstable-table .title-col,
.tournament-crosstable-table .players-col {
  position: sticky;
  background: var(--surface);
  box-shadow: 1px 0 0 rgba(20, 20, 18, 0.08);
}

.tournament-standings-table .rk-col,
.tournament-crosstable-table .rk-col {
  left: var(--sticky-rk-left);
}

.tournament-standings-table .sno-col,
.tournament-crosstable-table .sno-col {
  left: var(--sticky-sno-left);
}

.tournament-standings-table .title-col,
.tournament-crosstable-table .title-col {
  left: var(--sticky-title-left);
}

.tournament-standings-table .players-col,
.tournament-crosstable-table .players-col {
  left: var(--sticky-players-left);
  box-shadow: 2px 0 0 rgba(20, 20, 18, 0.11);
}

.tournament-standings-table thead .rk-col,
.tournament-standings-table thead .sno-col,
.tournament-standings-table thead .title-col,
.tournament-standings-table thead .players-col,
.tournament-crosstable-table thead .rk-col,
.tournament-crosstable-table thead .sno-col,
.tournament-crosstable-table thead .title-col,
.tournament-crosstable-table thead .players-col {
  z-index: 5;
  background: #f1f4ef;
}

.tournament-standings-table tbody .rk-col,
.tournament-standings-table tbody .sno-col,
.tournament-standings-table tbody .title-col,
.tournament-standings-table tbody .players-col,
.tournament-crosstable-table tbody .rk-col,
.tournament-crosstable-table tbody .sno-col,
.tournament-crosstable-table tbody .title-col,
.tournament-crosstable-table tbody .players-col {
  z-index: 2;
}

.tournament-standings-table tbody tr:nth-child(even) .rk-col,
.tournament-standings-table tbody tr:nth-child(even) .sno-col,
.tournament-standings-table tbody tr:nth-child(even) .title-col,
.tournament-standings-table tbody tr:nth-child(even) .players-col,
.tournament-crosstable-table tbody tr:nth-child(even) .rk-col,
.tournament-crosstable-table tbody tr:nth-child(even) .sno-col,
.tournament-crosstable-table tbody tr:nth-child(even) .title-col,
.tournament-crosstable-table tbody tr:nth-child(even) .players-col {
  background: #f9faf6;
}

.tournament-standings-table tbody tr:hover .rk-col,
.tournament-standings-table tbody tr:hover .sno-col,
.tournament-standings-table tbody tr:hover .title-col,
.tournament-standings-table tbody tr:hover .players-col,
.tournament-crosstable-table tbody tr:hover .rk-col,
.tournament-crosstable-table tbody tr:hover .sno-col,
.tournament-crosstable-table tbody tr:hover .title-col,
.tournament-crosstable-table tbody tr:hover .players-col {
  background: #eef4f5;
}

.tournament-standings-table tbody tr.lux-entry-row .rk-col,
.tournament-standings-table tbody tr.lux-entry-row .sno-col,
.tournament-standings-table tbody tr.lux-entry-row .title-col,
.tournament-standings-table tbody tr.lux-entry-row .players-col,
.tournament-crosstable-table tbody tr.lux-entry-row .rk-col,
.tournament-crosstable-table tbody tr.lux-entry-row .sno-col,
.tournament-crosstable-table tbody tr.lux-entry-row .title-col,
.tournament-crosstable-table tbody tr.lux-entry-row .players-col {
  background: #f4ebc8;
}

.school-team-row td {
  font-weight: 760;
  background: #f3f6ef;
}

.school-team-member-row td {
  background: #fbfcf8;
  font-size: 0.78rem;
}

.school-team-member-row .rk-col,
.school-team-member-row .players-col {
  background: #fbfcf8;
}

.school-team-member-row td.name-cell {
  min-width: 170px;
}

.tournament-player-games-table .round-col,
.tournament-player-games-table .board-col,
.tournament-player-games-table .sno-col,
.tournament-player-games-table .title-col,
.tournament-player-games-table .rtg-col,
.tournament-player-games-table .fed-col,
.tournament-player-games-table .points-col,
.tournament-player-games-table .result-col {
  width: 1%;
  white-space: nowrap;
}

.tournament-player-games-table .players-col {
  min-width: 220px;
}

.player-result-chip {
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 830;
  white-space: nowrap;
}

.result-color-box {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #fff;
}

.result-color-box.black {
  border-color: var(--charcoal);
  background: var(--charcoal);
}

.tournament-round-results-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.82rem;
}

.tournament-round-results-table th,
.tournament-round-results-table td {
  width: 1%;
  padding: 5px 7px;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

.tournament-round-results-table th {
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.tournament-round-results-table .board-col,
.tournament-round-results-table .title-col,
.tournament-round-results-table .rtg-col,
.tournament-round-results-table .result-col {
  width: 1%;
  min-width: 28px;
  max-width: 58px;
  padding-inline: 5px;
}

.tournament-round-results-table .title-col {
  min-width: 30px;
}

.tournament-round-results-table .result-col {
  min-width: 44px;
}

.tournament-round-results-table .club-col {
  width: 62px;
  min-width: 48px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.tournament-round-results-table .players-col {
  width: auto;
  min-width: 170px;
  text-align: left;
}

.tournament-round-results-table td.name-cell {
  min-width: 170px;
}

.tournament-schedule-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.82rem;
}

.tournament-schedule-table th,
.tournament-schedule-table td {
  width: 1%;
  padding: 5px 7px;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
}

.tournament-schedule-table th {
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.tournament-schedule-table .round-col,
.tournament-schedule-table .time-col {
  width: 1%;
  min-width: 42px;
  max-width: 72px;
  text-align: center;
}

.tournament-schedule-table .date-col {
  width: 1%;
  min-width: 110px;
  max-width: 150px;
  text-align: left;
}

.tournament-crosstable-table {
  --sticky-rk-left: 0px;
  --sticky-sno-left: 34px;
  --sticky-title-left: 76px;
  --sticky-players-left: 110px;
  --sticky-rk-width: 34px;
  --sticky-sno-width: 42px;
  --sticky-title-width: 34px;
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.82rem;
}

.team-crosstable-table {
  --sticky-players-left: var(--sticky-rk-width);
  width: 100%;
  min-width: 100%;
}

.tournament-crosstable-table th,
.tournament-crosstable-table td {
  width: 1%;
  padding: 5px 7px;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

.tournament-crosstable-table th {
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.tournament-crosstable-table .rk-col,
.tournament-crosstable-table .sno-col,
.tournament-crosstable-table .title-col,
.tournament-crosstable-table .round-col,
.tournament-crosstable-table .points-col,
.tournament-crosstable-table .tb-col,
.tournament-crosstable-table .avg-col,
.tournament-crosstable-table .perf-col {
  width: 1%;
  min-width: 28px;
  max-width: 48px;
  padding-inline: 5px;
}

.tournament-crosstable-table .rk-col {
  width: var(--sticky-rk-width);
  min-width: var(--sticky-rk-width);
  max-width: var(--sticky-rk-width);
}

.tournament-crosstable-table .title-col {
  width: var(--sticky-title-width);
  min-width: var(--sticky-title-width);
  max-width: var(--sticky-title-width);
}

.tournament-crosstable-table .sno-col {
  width: var(--sticky-sno-width);
  min-width: var(--sticky-sno-width);
  max-width: var(--sticky-sno-width);
}

.tournament-crosstable-table .fed-col,
.tournament-crosstable-table .rtg-col,
.tournament-crosstable-table .cat-col {
  width: 1%;
  min-width: 34px;
  max-width: 44px;
  padding-inline: 5px;
  text-align: center;
}

.tournament-crosstable-table .club-col {
  width: 62px;
  min-width: 48px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.tournament-crosstable-table .fide-id-col {
  width: 1%;
  min-width: 62px;
  text-align: center;
}

.tournament-crosstable-table .points-col,
.tournament-crosstable-table .tb-col,
.tournament-crosstable-table .avg-col,
.tournament-crosstable-table .perf-col {
  text-align: left;
}

.tournament-crosstable-table .players-col {
  width: auto;
  min-width: 185px;
  text-align: left;
}

.tournament-crosstable-table td.name-cell {
  min-width: 185px;
}

.team-crosstable-table .players-col,
.team-crosstable-table td.name-cell {
  width: auto;
  min-width: 72px;
}

.crosstable-game-cell {
  cursor: pointer;
  color: var(--blue);
  font-weight: 760;
}

.crosstable-cell-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  padding: 0;
  cursor: pointer;
}

.crosstable-game-cell:hover,
.crosstable-game-cell:focus-visible,
.crosstable-game-cell[aria-expanded="true"] {
  background: rgba(38, 77, 104, 0.1);
  outline: none;
}

.crosstable-popover {
  position: fixed;
  z-index: 10000;
  inset: auto;
  transform: none;
  width: max-content;
  height: fit-content;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 6px;
  border: 1px solid rgba(38, 77, 104, 0.22);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(20, 20, 18, 0.28);
}

.crosstable-popover table {
  width: max-content;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.05;
}

.crosstable-popover th,
.crosstable-popover td {
  padding: 3px 6px;
  border-bottom: 0;
  line-height: 1.05;
  white-space: nowrap;
  vertical-align: middle;
}

.crosstable-popover th {
  position: static;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  background: transparent;
  box-shadow: none;
}

.crosstable-popover td:nth-child(1),
.crosstable-popover td:nth-child(2),
.crosstable-popover td:nth-child(4),
.crosstable-popover td:nth-child(5),
.crosstable-popover td:nth-child(6),
.crosstable-popover td:nth-child(8) {
  text-align: center;
}

.tournament-list-table {
  min-width: 100%;
  table-layout: fixed;
  font-size: 0.82rem;
}

.tournament-list-table th,
.tournament-list-table td {
  padding: 5px 7px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.tournament-list-table th {
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.tournament-list-table th:nth-child(1),
.tournament-list-table td:nth-child(1) {
  width: 104px;
}

.tournament-list-table th:nth-child(2),
.tournament-list-table td:nth-child(2) {
  width: auto;
}

.tournament-list-table th:nth-child(3),
.tournament-list-table td:nth-child(3) {
  width: 78px;
  text-align: center;
}

.tournament-list-table th:nth-child(4),
.tournament-list-table td:nth-child(4) {
  width: 48px;
}

.tournament-list-table th:nth-child(5),
.tournament-list-table td:nth-child(5) {
  width: 58px;
}

.tournament-list-table th:nth-child(6),
.tournament-list-table td:nth-child(6) {
  width: 112px;
}

.tournament-list-table th:nth-child(7),
.tournament-list-table td:nth-child(7) {
  width: 42px;
  text-align: center;
}

.tournament-list-table th:nth-child(8),
.tournament-list-table td:nth-child(8) {
  width: 50px;
  text-align: center;
}

.tournament-list-table .country-flag-cell {
  font-size: 0.9rem;
}

.tournament-list-table td:nth-child(2) a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-tournament-wrap {
  width: 100%;
  margin: 0;
}

.latest-tournament-table {
  min-width: 900px;
  font-size: 0.78rem;
}

.latest-tournament-table th,
.latest-tournament-table td {
  padding-top: 7px;
  padding-bottom: 7px;
}

.latest-tournament-table th:nth-child(1),
.latest-tournament-table td:nth-child(1) {
  width: 104px;
}

.latest-tournament-table th:nth-child(2),
.latest-tournament-table td:nth-child(2) {
  width: auto;
}

.latest-tournament-table th:nth-child(3),
.latest-tournament-table td:nth-child(3) {
  width: 78px;
  text-align: center;
}

.latest-tournament-table th:nth-child(4),
.latest-tournament-table td:nth-child(4) {
  width: 52px;
  text-align: center;
}

.latest-tournament-table th:nth-child(5),
.latest-tournament-table td:nth-child(5) {
  width: 120px;
}

.latest-tournament-table th:nth-child(6),
.latest-tournament-table td:nth-child(6) {
  width: 42px;
  text-align: center;
}

.latest-tournament-table th:nth-child(7),
.latest-tournament-table td:nth-child(7) {
  width: 58px;
  text-align: center;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(38, 77, 104, 0.05);
}

.tournament-filter-bar {
  grid-template-columns:
    minmax(175px, 1.8fr)
    minmax(78px, 0.65fr)
    minmax(94px, 0.75fr)
    minmax(132px, 1fr)
    minmax(64px, 0.5fr)
    minmax(64px, 0.5fr)
    auto;
  gap: 6px;
}

.tournament-search {
  position: relative;
}

.tournament-suggestions {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(15, 18, 16, 0.16);
}

.tournament-suggestions a {
  min-width: 0;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.tournament-suggestions a + a {
  border-top: 1px solid var(--line);
}

.tournament-suggestions a:hover {
  background: rgba(38, 77, 104, 0.07);
}

.team-player-games-table {
  width: max-content;
  min-width: 100%;
}

.team-player-games-table th,
.team-player-games-table td {
  white-space: nowrap;
  vertical-align: middle;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(20, 20, 18, 0.1);
  text-align: left;
  vertical-align: top;
}

th.fide-col,
td.fide-col {
  background: #f8f0df;
}

th.fide-col {
  color: #76502e;
}

.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.sort-header:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.sort-header[aria-current="true"]::after {
  content: "↓";
  font-size: 0.72em;
}

.compact-cell {
  min-width: 220px;
  max-width: 320px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: normal;
}

.name-cell {
  min-width: 210px;
  white-space: nowrap;
}

.muted-inline {
  color: var(--muted);
  font-size: 0.86em;
  font-weight: 620;
}

.rounds-cell {
  min-width: 520px;
  max-width: none;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  background: #f1f4ef;
  box-shadow: inset 0 -1px 0 rgba(20, 20, 18, 0.08);
}

td a {
  color: var(--blue);
  font-weight: 760;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

tbody tr:nth-child(even) {
  background: rgba(68, 99, 78, 0.035);
}

tbody tr:hover {
  background: rgba(38, 77, 104, 0.07);
}

.empty-state {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.round-list {
  display: grid;
  gap: 22px;
}

.round-details-toggle {
  margin-bottom: 0;
}

.round-details-toggle .table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: none;
}

.team-standings-toggle .round-block h3 {
  margin: 0;
  padding: 12px 16px 10px;
}

.team-summary-stack {
  display: grid;
  max-width: 1180px;
  margin: 0 auto 20px;
  gap: 0;
}

.page-main > .team-summary-stack {
  max-width: 1180px;
}

.team-summary-stack .club-details-toggle {
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.team-summary-stack .club-details-toggle + .club-details-toggle,
.team-summary-stack .club-details-toggle + .team-standings-section .club-details-toggle {
  border-top: 0;
}

.team-summary-stack .club-details-toggle:first-child {
  border-radius: 8px 8px 0 0;
}

.team-summary-stack .club-details-toggle:last-child,
.team-summary-stack .team-standings-section:last-child .club-details-toggle:last-child {
  border-radius: 0 0 8px 8px;
}

.team-summary-stack .team-standings-section {
  max-width: none;
  margin: 0;
}

.team-championship-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.82rem;
}

.team-championship-table th,
.team-championship-table td {
  width: 1%;
  padding: 5px 7px;
  line-height: 1.15;
  white-space: nowrap;
  vertical-align: middle;
}

.team-championship-table th {
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.team-championship-table td.name-cell,
.team-championship-table th:nth-child(2) {
  width: auto;
  min-width: 160px;
  text-align: left;
}

.team-standings-click-row {
  cursor: pointer;
}

.team-standings-click-row:hover td {
  background: rgba(38, 77, 104, 0.05);
}

.team-standings-click-row[aria-expanded="true"] td {
  background: rgba(38, 77, 104, 0.08);
}

.team-composition-inline-cell {
  padding: 0 !important;
  white-space: normal !important;
  background: #fff;
}

.team-composition-inline-cell .table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.team-composition-inline-cell .team-composition-table {
  min-width: 100%;
}

.team-match-board-table td.name-cell {
  min-width: 150px;
}

.round-menu-row {
  justify-content: flex-start;
}

.team-championship-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.team-championship-header h1 {
  max-width: 820px;
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.05;
  font-weight: 840;
}

.season-select {
  display: grid;
  min-width: 180px;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.season-select select {
  height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
}

.team-division-panel {
  margin-bottom: 22px;
}

.team-division-nav {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.team-division-nav a,
.team-board-nav a,
.team-round-nav a {
  white-space: nowrap;
}

.team-division-heading {
  margin-bottom: 22px;
}

.team-cup-detail-main {
  padding-top: 8px;
}

.team-cup-detail-main .team-division-heading {
  margin-bottom: 12px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-main .section-title-row h2 {
  margin: 0 0 14px;
}

.section-title-row a {
  margin-bottom: 14px;
  color: var(--blue);
  font-weight: 800;
  text-underline-offset: 0.18em;
}

.standing-split-row td {
  border-top: 3px solid var(--charcoal);
  background: rgba(68, 99, 78, 0.06);
}

.team-highlight-row td {
  background: rgba(169, 95, 55, 0.12);
  font-weight: 800;
}

.team-highlight-row td:first-child {
  border-left: 4px solid var(--copper);
}

.lux-entry-row td {
  background: rgba(203, 168, 74, 0.18);
  font-weight: 800;
}

.lux-entry-row td:first-child {
  border-left: 4px solid var(--gold);
}

.nowrap-row td {
  white-space: nowrap;
}

.lux-player-cell {
  background: rgba(203, 168, 74, 0.22);
  font-weight: 900;
}

.team-withdrawn-row td {
  background: rgba(180, 35, 24, 0.1);
}

.team-withdrawn-row td:first-child {
  border-left: 4px solid #b42318;
}

.withdrawn-team-link {
  color: #b42318;
  font-weight: 900;
}

.withdrawn-team-link:hover {
  color: #8a1f16;
}

.team-round-nav {
  max-width: 1180px;
  margin: 0 auto 20px;
}

.team-cup-header-cup-row .team-round-nav {
  max-width: none;
  margin: 0;
}

.team-round-results {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  gap: 10px;
}

.team-match-list-wrap {
  max-width: 1180px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.team-match-list-head,
.team-match-list-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.15fr)
    minmax(48px, max-content)
    minmax(54px, max-content)
    minmax(180px, 1.15fr)
    minmax(48px, max-content);
  align-items: center;
  column-gap: 8px;
  min-width: 620px;
}

.team-match-list-head.with-round,
.team-match-list-row.with-round {
  grid-template-columns:
    minmax(68px, max-content)
    minmax(180px, 1.15fr)
    minmax(48px, max-content)
    minmax(54px, max-content)
    minmax(180px, 1.15fr)
    minmax(48px, max-content);
  min-width: 700px;
}

.team-match-list-head {
  padding: 6px 38px 6px 10px;
  background: #f1f4ef;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.team-match-list-head span {
  text-align: center;
}

.team-match-list-row {
  width: 100%;
  padding: 5px 0 5px 10px;
  font-size: 0.82rem;
  line-height: 1.15;
}

.team-match-list-row > span,
.team-match-list-row > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-match-team {
  justify-self: stretch;
  text-align: center;
  font-weight: 820;
}

.team-match-team a {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-match-avg,
.team-match-round {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.team-match-score {
  justify-self: center;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  font-size: 0.82rem;
  white-space: nowrap;
}

.team-match-list-results {
  max-width: none;
  margin: 0;
  gap: 0;
}

.team-match-list-results .team-round-match {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.team-match-list-results .team-round-match:nth-child(even) {
  background: #f9faf6;
}

.team-match-list-results .team-round-match summary {
  min-height: 30px;
  overflow-x: visible;
}

.team-match-list-results .team-round-match summary::after {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  font-size: 0.78rem;
}

.team-matches-toggle .team-round-results {
  max-width: none;
  padding: 12px;
}

.team-matches-toggle .team-match-list-results {
  padding: 0;
}

.team-matches-toggle .team-match-list-wrap {
  max-width: none;
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0 0 8px 8px;
  box-shadow: none;
}

.team-matches-toggle .team-round-match {
  box-shadow: none;
}

.team-round-match {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.team-round-match summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  cursor: pointer;
  list-style: none;
  overflow-x: auto;
}

.team-round-match summary::-webkit-details-marker {
  display: none;
}

.team-round-match summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
}

.team-round-match[open] summary::after {
  content: "-";
}

.match-summary-compact {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.match-summary-compact .summary-round {
  justify-self: start;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.summary-team-block {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(31, 38, 34, 0.08);
  border-radius: 6px;
  background: rgba(68, 99, 78, 0.04);
}

.summary-team-block:first-of-type {
  justify-self: end;
}

.summary-team-block:last-of-type {
  justify-self: start;
}

.summary-team {
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-team-link {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.summary-team-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.summary-rating,
.summary-result {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.summary-rating {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.summary-result {
  justify-self: center;
  min-width: 72px;
  padding: 7px 12px;
  border-radius: 7px;
  background: rgba(38, 77, 104, 0.07);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cup-match-list {
  gap: 0;
}

.cup-match-list .team-round-match {
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cup-match-list .team-result-match summary {
  min-height: 0;
  justify-content: center;
  overflow-x: auto;
}

.cup-match-list .team-round-match summary::after {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  font-size: 0.8rem;
}

.cup-list-summary {
  flex: 0 1 560px;
  grid-template-columns:
    minmax(88px, max-content)
    minmax(130px, 1fr)
    minmax(42px, max-content)
    minmax(130px, 1fr);
  width: min(100%, 560px);
  margin-inline: auto;
  gap: 8px;
  padding: 5px 8px;
}

.cup-list-summary .summary-round,
.cup-list-summary .summary-team,
.cup-list-summary .summary-rating,
.cup-list-summary .summary-result {
  justify-self: start;
  line-height: 1.15;
}

.cup-list-summary .summary-round {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.cup-list-summary .summary-team {
  display: inline-flex;
  justify-content: center;
  align-items: baseline;
  gap: 5px;
  justify-self: center;
  max-width: 100%;
  text-align: center;
}

.cup-list-summary .summary-rating {
  flex: 0 0 auto;
  font-size: 0.72rem;
}

.cup-list-summary .summary-result {
  min-width: 46px;
  padding: 3px 7px;
  border-radius: 5px;
  text-align: center;
  justify-self: center;
}

.summary-team-with-avg .summary-team-link {
  display: inline;
}

.match-teams {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.match-teams strong {
  white-space: nowrap;
}

.match-teams b {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(38, 77, 104, 0.07);
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.match-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
}

.team-round-match .table-wrap {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.team-match-list {
  display: grid;
  gap: 14px;
  padding: 12px;
}

.team-match-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.team-match-detail header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(68, 99, 78, 0.05);
}

.team-match-detail header div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.team-match-detail header span {
  font-weight: 800;
}

.team-match-detail small {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.match-average {
  margin: 0;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.team-cup-subsection {
  display: grid;
  gap: 12px;
}

.team-cup-main {
  padding-top: 12px;
}

.team-cup-subsection > .section-title-row {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.team-cup-subsection h2 a {
  color: var(--ink);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.cup-bracket-section,
.cup-qualifier-section {
  max-width: none;
}

.cup-bracket-section > .section-title-row,
.cup-qualifier-section > .section-title-row {
  max-width: 1180px;
  margin: 0 auto;
}

.cup-qualifier-section {
  margin-bottom: 20px;
}

.cup-qualifier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 230px));
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto 12px;
}

.cup-bracket {
  --bracket-height: max(300px, calc(var(--max-round-size, 4) * 46px));
  --bracket-row-height: 38px;
  --cup-round-gap: clamp(14px, 2.4vw, 34px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: var(--cup-round-gap);
  align-items: start;
  min-height: auto;
  margin: 0 auto;
  padding: 8px 10px 20px;
  overflow-x: auto;
}

.cup-bracket-round {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 190px;
  gap: 12px;
}

.cup-bracket-round h3 {
  justify-self: center;
  min-width: 108px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 0;
  background: #6487c9;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.cup-round-matches {
  display: grid;
  grid-template-rows: repeat(var(--slot-rows, 7), var(--bracket-row-height));
  min-height: auto;
  gap: 0;
  position: relative;
}

.cup-slot {
  position: relative;
  grid-row: var(--slot-row);
  align-self: center;
}

.cup-match {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.cup-match summary {
  position: relative;
  display: grid;
  gap: 5px;
  cursor: pointer;
  list-style: none;
}

.cup-match summary::-webkit-details-marker {
  display: none;
}

.cup-match-card {
  position: relative;
  display: grid;
  border: 1px solid #3767ad;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(26, 45, 65, 0.08);
}

.cup-team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  min-height: 24px;
  align-items: center;
  color: #23477c;
}

.cup-team-row + .cup-team-row {
  border-top: 1px solid #3767ad;
}

.cup-team-row.is-advancer {
  background: #8ec06f;
  color: #163b24;
  font-weight: 900;
}

.cup-team-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 5px;
}

.cup-team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-team-name a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.cup-team-name a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cup-team-rating {
  flex: 0 0 auto;
  color: rgba(35, 71, 124, 0.66);
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}

.cup-team-row.is-advancer .cup-team-rating {
  color: rgba(22, 59, 36, 0.76);
}

.cup-bye .cup-match-card {
  background: rgba(255, 255, 255, 0.78);
}

.cup-bye-row {
  color: var(--muted);
  background: rgba(38, 77, 104, 0.05);
}

.cup-team-row strong {
  height: 100%;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-left: 1px solid #3767ad;
  font-weight: 950;
}

.cup-visible-note {
  display: block;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(169, 95, 55, 0.22);
  border-radius: 6px;
  background: rgba(169, 95, 55, 0.08);
  color: #7e4329;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
}

.cup-advance-note {
  justify-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(38, 77, 104, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.cup-match[open] {
  z-index: 120;
}

.cup-match[open]::before {
  display: none;
}

.cup-match[open] .cup-match-card {
  position: relative;
  z-index: 95;
  box-shadow: 0 8px 18px rgba(26, 45, 65, 0.08);
}

.cup-match-details {
  position: fixed;
  z-index: 130;
  top: var(--cup-popover-top, 120px);
  left: var(--cup-popover-left, 24px);
  width: var(--cup-popover-width, max-content);
  min-width: min(300px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(15, 18, 16, 0.24);
  overflow: auto;
}

.cup-detail-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(68, 99, 78, 0.07);
  border-bottom: 1px solid var(--line);
}

.cup-detail-team {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.cup-detail-team:last-of-type {
  text-align: right;
}

.cup-detail-team strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-detail-team span,
.cup-adjudication-note {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.cup-detail-score {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  white-space: nowrap;
}

.cup-adjudication-note {
  grid-column: 1 / -1;
  margin: 0;
}

.cup-match-details .table-wrap {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.cup-match-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.team-result-match summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow-x: auto;
}

.team-result-match {
  z-index: 1;
}

.team-match-popover {
  min-width: min(980px, calc(100vw - 32px));
}

.team-match-popover .table-wrap {
  min-width: 760px;
}

.cup-compact-popover {
  min-width: min(300px, calc(100vw - 32px));
}

.cup-compact-popover .cup-detail-header {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
}

.cup-compact-popover .table-wrap,
.cup-match-details .table-wrap:has(> .cup-board-table) {
  min-width: 0;
}

.cup-board-table {
  width: max-content;
  min-width: 0;
  font-size: 0.74rem;
}

.cup-board-table th,
.cup-board-table td {
  width: 1%;
  padding: 5px 7px;
  white-space: nowrap;
}

.cup-board-table th:nth-child(3),
.cup-board-table td:nth-child(3),
.cup-board-table th:nth-child(8),
.cup-board-table td:nth-child(8) {
  width: auto;
  max-width: 132px;
}

.cup-board-table .name-cell {
  min-width: 0;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cup-bracket-round:not(.is-last-round) .cup-slot::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 100%;
  width: calc(var(--cup-round-gap) / 2);
  border-top: 2px solid #2f5f92;
  transform: translateY(-50%);
  pointer-events: none;
}

.cup-bracket-round:not(.is-first-round) .cup-match summary::before,
.cup-bracket-round:not(.is-first-round) .cup-bye::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: calc(var(--cup-round-gap) / 2);
  border-top: 2px solid #2f5f92;
  transform: translateY(-50%);
  pointer-events: none;
}

.cup-bracket-round:not(.is-last-round) .cup-entry-pair-start::before,
.cup-bracket-round:not(.is-last-round) .cup-entry-pair-end::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: calc(var(--cup-round-gap) / -2);
  width: 0;
  border-right: 2px solid #2f5f92;
  pointer-events: none;
}

.cup-bracket-round:not(.is-last-round) .cup-entry-pair-start::before {
  top: 50%;
  height: calc(var(--pair-span, 1) * var(--bracket-row-height) + 1px);
}

.cup-bracket-round:not(.is-last-round) .cup-entry-pair-end::before {
  bottom: 50%;
  height: calc(var(--pair-span, 1) * var(--bracket-row-height) + 1px);
}

.round-block h3 {
  max-width: 1180px;
  margin: 0 auto 10px;
  padding-left: 2px;
  color: var(--charcoal);
}

.small-note {
  max-width: 1180px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.game-list a {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(51, 78, 104, 0.16);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(25, 32, 28, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.game-list a:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 77, 104, 0.28);
  box-shadow: var(--soft-shadow);
}

.game-list span {
  color: var(--blue);
  font-weight: 760;
}

.game-list strong {
  text-align: right;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  background: var(--ink);
  color: var(--ivory);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .site-header {
    flex-wrap: wrap;
  }

  .player-heading {
    align-items: start;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    padding-inline: 8px;
    font-size: 0.84rem;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(20, 20, 18, 0.84), rgba(20, 20, 18, 0.44)),
      linear-gradient(0deg, rgba(20, 20, 18, 0.76), rgba(20, 20, 18, 0.16));
  }

  .hero-content {
    padding-top: 120px;
    padding-bottom: 58px;
  }

  .board-layout,
  .tile-grid,
  .split-band,
  .stats-grid,
  .tournament-stat-boxes,
  .profile-grid,
  .club-details,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .latest-tournaments-heading {
    display: block;
  }

  .latest-tournament-table {
    min-width: 760px;
  }

  .team-championship-header {
    align-items: start;
    flex-direction: column;
  }

  .team-championship-header h1 {
    font-size: 2rem;
  }

  .season-select {
    width: 100%;
  }

  .match-summary-compact {
    grid-template-columns: 1fr auto 1fr;
  }

  .cup-list-summary {
    grid-template-columns:
      minmax(80px, max-content)
      minmax(118px, 1fr)
      minmax(40px, max-content)
      minmax(118px, 1fr);
  }

  .club-list-item {
    grid-template-columns: 28px 58px minmax(0, 1fr);
    gap: 4px 12px;
  }

  .club-list-item span:last-child {
    grid-column: 3;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions .button {
    flex: 1;
  }

  .training-grid {
    grid-template-columns: 1fr;
  }

  .training-head {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .tournament-header-title {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .tournament-header-title > span,
  .tournament-index-label-stack,
  .tournament-index-label-stack > span {
    flex-basis: auto;
    width: auto;
  }

  .tournament-header-title h1 {
    overflow: visible;
    text-overflow: initial;
    white-space: normal;
  }

  .tournament-header-meta {
    padding-left: 0;
  }

  .tournament-page-header > .challenge-u20-switch-row {
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    gap: 10px;
  }

  .brand span:last-child {
    display: none;
  }

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

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .team-championship-header h1 {
    font-size: 1.65rem;
  }

  .hero-actions,
  .site-footer,
  .game-list a {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .game-list strong {
    text-align: center;
  }

  .board-shell {
    padding: 20px;
  }

  .board {
    border-width: 7px;
  }
}
