:root {
  --bg: #0a0e1a;
  --bg-soft: #0f1525;
  --surface: #141b2e;
  --surface-2: #1b2438;
  --line: #26304a;
  --gold: #ffc93c;
  --gold-dim: #7a6324;
  --blue: #4c8dff;
  --blue-dim: #1d3a73;
  --pink: #ff5da2;
  --pink-dim: #732347;
  --text: #eef1f8;
  --text-dim: #8a93ab;
  --text-faint: #525c77;
  --red: #ff4757;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(255, 201, 60, 0.08), transparent),
    radial-gradient(ellipse 800px 500px at 100% 20%, rgba(76, 141, 255, 0.06), transparent),
    var(--bg);
  color: var(--text);
  font-family: 'Kanit', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  padding-bottom: 80px;
  position: relative;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topnav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.topnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  height: 100%;
}

.topnav-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.tn-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tn-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 8px;
  background: none;
  border: none;
  font-family: 'Kanit', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}

.tn-link:hover,
.tn-link.active {
  color: #fff;
  background: var(--surface);
}

.tn-link.active {
  color: var(--gold);
}

.tn-cta {
  color: var(--bg);
  background: var(--gold);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  margin-left: 6px;
  transition: filter .15s ease;
}

.tn-cta:hover {
  filter: brightness(1.08);
}

.tn-dropdown {
  position: relative;
}

.tn-drop-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.tn-drop-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tn-drop-menu a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 8px;
}

.tn-drop-menu a:hover {
  color: #fff;
  background: var(--surface-2);
}

.tn-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}

.tn-toggle span {
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

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

  .tn-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 10px;
    gap: 2px;
    display: none;
  }

  .tn-menu.open {
    display: flex;
  }

  .tn-cta {
    margin: 6px 0 0;
    text-align: center;
  }

  .tn-drop-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    margin-top: 4px;
  }

  .tn-drop-menu.open {
    display: block;
  }
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 42px 24px 28px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(255, 201, 60, 0.12), transparent 70%);
  pointer-events: none;
}

.category-grid {
  max-width: 1180px;
  margin: 32px auto;
  padding: 0 24px;
  display: grid;
  gap: 24px;
}

.category-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.category-header {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
}

.category-header.red {
  background: #d64550;
}

.category-table {
  display: grid;
}

.table-row {
  display: grid;
  grid-template-columns: 64px minmax(180px, 1.2fr) minmax(280px, 2fr) minmax(140px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.table-row.table-head {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
}

.table-row:not(.table-head) {
  color: var(--text);
}

.table-row:nth-child(odd):not(.table-head) {
  background: rgba(255, 255, 255, 0.02);
}

.table-row div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 860px) {
  .table-row {
    grid-template-columns: 52px 1fr 1.5fr 1fr;
  }
}

@media (max-width: 720px) {
  .table-row {
    grid-template-columns: 1fr;
  }

  .table-row.table-head {
    display: none;
  }

  .table-row div {
    white-space: normal;
  }

  .table-row > div {
    padding: 8px 0;
  }

  .table-row > div::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
  }

  .table-row > div:nth-child(1)::before { content: "ลำดับ"; }
  .table-row > div:nth-child(2)::before { content: "ทีม"; }
  .table-row > div:nth-child(3)::before { content: "ชื่อ-นามสกุล"; }
  .table-row > div:nth-child(4)::before { content: "วันเดือนปีเกิด"; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(34px, 5.2vw, 56px);
  letter-spacing: 1px;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 18px;
  max-width: 760px;
}

.hero h1 span {
  color: var(--gold);
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.info-cell {
  background: var(--surface);
  padding: 14px 18px;
}

.info-cell .lbl {
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 4px;
}

.info-cell .val {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.info-cell .val.accent {
  color: var(--gold);
}

/* ===== TABS ===== */
.tabbar {
  display: flex;
  gap: 10px;
  margin: 30px 0 26px;
  flex-wrap: wrap;
}

.tab {
  flex: 1 1 160px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .18s ease;
  position: relative;
}

.tab:hover {
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

.tab.active {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset, 0 8px 24px -8px rgba(255, 201, 60, 0.25);
}

.tab .num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  color: var(--text-faint);
  min-width: 34px;
}

.tab.active .num {
  color: var(--gold);
}

.tab .tlabel {
  display: flex;
  flex-direction: column;
}

.tab .ten {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .5px;
  color: #fff;
}

.tab .tsub {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 300;
}

/* ===== PANELS ===== */
.panel {
  display: none;
  animation: fade .25s ease;
}

.panel.active {
  display: block;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-head h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  color: #fff;
}

.section-head .total-badge {
  font-size: 13px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
}

.section-head .total-badge b {
  color: var(--gold);
  font-weight: 600;
}

/* gender ratio bar */
.ratio-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--surface-2);
}

.ratio-bar .m {
  background: linear-gradient(90deg, var(--blue), #6fa8ff);
}

.ratio-bar .f {
  background: linear-gradient(90deg, #ff7eb6, var(--pink));
}

.ratio-caption {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin: -20px 0 26px;
}

.ratio-caption b {
  font-weight: 600;
}

.ratio-caption .m-lbl b {
  color: var(--blue);
}

.ratio-caption .f-lbl b {
  color: var(--pink);
}

/* split columns */
.split {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 0;
  align-items: start;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--line);
}

.col-head .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.col.male .col-head .dot {
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}

.col.female .col-head .dot {
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
}

.col-head .gtitle {
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 15px;
  color: #fff;
  text-transform: uppercase;
}

.col-head .gcount {
  margin-left: auto;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
}

.col.male .gcount {
  color: var(--blue);
}

.col.female .gcount {
  color: var(--pink);
  margin-left: 0;
  margin-right: auto;
}

.divider {
  display: flex;
  justify-content: center;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(var(--line), var(--gold) 50%, var(--line));
  transform: translateX(-50%);
}

.divider .vs {
  position: sticky;
  top: 20px;
  background: var(--bg);
  color: var(--gold);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 6px 0;
  writing-mode: vertical-rl;
  z-index: 1;
}

.row {
  display: grid;
  grid-template-columns: 30px 32px 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}

.row:hover {
  border-color: var(--gold);
  background: var(--surface-2);
  transform: translateX(2px);
}

.col.female .row:hover {
  transform: translateX(-2px);
}

.col.female .row {
  grid-template-columns: auto 1fr 32px 30px;
}

.col.female .row .count {
  color: var(--pink);
  text-align: left;
}

.col.female .row .team {
  text-align: right;
}

.col.female .row .flag {
  justify-self: center;
}

.col.female .row .rk {
  text-align: center;
}

.row .count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  min-width: 30px;
  text-align: right;
}

.col.male .row .count {
  color: var(--blue);
}

.col.female .row .count {
  color: var(--pink);
  text-align: left;
}

.row .team {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row .team-logo {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

/* TEAM / VR single ranking (no gender split data) */
.single-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

.single-list .row {
  grid-template-columns: 30px 32px 1fr auto;
}

.single-list .count {
  color: var(--gold);
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* max-width: 720px; */
  margin: 0 auto;
}

.team-list .row {
  grid-template-columns: 30px auto 22px 1fr auto;
}

.team-list .row .count {
  color: var(--gold);
  text-align: right;
}

.team-list .row .breakdown {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: 10px;
}

.team-list .row .m-count,
.team-list .row .f-count {
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.team-list .row .m-count {
  color: var(--blue);
  background: var(--blue-dim);
}

.team-list .row .f-count {
  color: var(--pink);
  background: var(--pink-dim);
}

.note {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
  margin: -6px 0 24px;
  font-style: italic;
}

/* PARA empty state */
.empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.empty .icon {
  font-size: 46px;
  margin-bottom: 14px;
  opacity: .7;
}

.empty h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.empty p {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.7;
}

footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 14, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 1024px;
  max-height: 86vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 70px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--gold) inset;
  animation: modalIn .18s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface-2);
  z-index: 1;
}

.modal-head .titles {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-head .team-logo-lg {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.modal-head .titles .eyebrow-sm {
  font-size: 10.5px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.modal-head h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: .5px;
  color: #fff;
  line-height: 1.1;
}

.modal-close {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s ease;
}

.modal-close:hover {
  color: #fff;
  border-color: var(--gold);
  background: var(--surface-2);
}

.modal-summary {
  display: flex;
  gap: 10px;
  padding: 16px 24px 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.modal-summary b {
  color: var(--text);
  font-weight: 600;
}

.modal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 16px 24px 24px;
}

.modal-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.modal-col.male .modal-col-head {
  color: var(--blue);
}

.modal-col.female .modal-col-head {
  color: var(--pink);
}

.modal-col-head .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.athlete-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.athlete-row {
  display: grid;
  grid-template-columns: 34px 1fr 20px;
  grid-template-rows: auto auto auto;
  gap: 2px 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px 10px;
}

.athlete-row .a-photo {
  grid-row: 1 / 3;
  grid-column: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.athlete-row .a-name {
  grid-column: 2;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.athlete-row .a-dob {
  grid-column: 2;
  font-size: 11px;
  color: var(--text-faint);
}

.athlete-row .a-flag {
  grid-row: 1 / 3;
  grid-column: 3;
  align-self: center;
  justify-self: end;
}

.athlete-meta {
  grid-column: 1 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.athlete-meta .meta-chip {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.athlete-meta .meta-chip b {
  color: var(--text);
  font-weight: 600;
}

.athlete-meta .meta-chip.pay {
  border-color: var(--gold-dim);
}

.athlete-meta .meta-chip.pay b {
  color: var(--gold);
}

.modal-empty {
  font-size: 12.5px;
  color: var(--text-faint);
  font-style: italic;
  padding: 6px 2px;
}

/* ===== AGE / CLASS BREAKDOWN ===== */
.age-class-card {
  margin: 44px 0 40px;
}

.age-class-card .section-head h2 {
  font-size: 26px;
}

.age-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.age-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 14px;
  transition: border-color .18s ease, transform .18s ease;
}

.age-block:hover {
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

.age-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.age-block-head .age-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: .5px;
  color: #fff;
}

.age-block-head .age-total {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.age-block-head .age-total b {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--gold);
}

.age-block-head .age-total span {
  font-size: 11px;
  color: var(--text-faint);
}

.class-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.class-row {
  display: grid;
  grid-template-columns: 24px auto 1fr auto;
  align-items: center;
  gap: 9px;
}

.class-row.is-empty {
  opacity: .4;
}

.class-tag {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  flex-shrink: 0;
}

.class-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  color: var(--text);
  min-width: 20px;
  text-align: right;
}

.class-bar {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  min-width: 30px;
}

.class-bar .m {
  background: linear-gradient(90deg, var(--blue), #6fa8ff);
}

.class-bar .f {
  background: linear-gradient(90deg, #ff7eb6, var(--pink));
}

.class-mf {
  font-size: 10.5px;
  color: var(--text-faint);
  white-space: nowrap;
  text-align: right;
}

.class-mf .m-num {
  color: var(--blue);
  font-weight: 600;
}

.class-mf .f-num {
  color: var(--pink);
  font-weight: 600;
}

.class-total-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.ct-cell {
  background: var(--surface);
  padding: 14px 18px;
  text-align: center;
}

.ct-cell .lbl {
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 4px;
}

.ct-cell .val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  color: var(--gold);
}

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

.cat-total-badge {
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.15);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.cat-ratio-wrap {
  padding: 16px 20px 0;
}

.cat-split {
  padding: 10px 20px 22px;
}

.weight-group + .weight-group {
  margin-top: 14px;
}

.weight-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.weight-label {
  font-size: 12px;
  color: var(--text-dim);
  flex: 1;
}

.weight-count {
  font-size: 11px;
  color: var(--text-faint);
}


@media(max-width:760px) {

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

  .divider {
    display: none;
  }

  .col.female .row {
    grid-template-columns: 30px 32px 1fr auto;
  }

  .col.female .row .team {
    text-align: left;
  }

  .ratio-caption {
    margin-top: -22px;
  }

  .modal-split {
    grid-template-columns: 1fr;
  }

  .cat-split {
    grid-template-columns: 1fr;
  }
}

