@font-face {
  font-family: Gumbo;
  src: url("/fonts/Gumbo.otf");
  font-display: swap;
  font-weight: 700;
  font-style: italic;
}
@font-face {
  font-family: Lilita;
  src: url("/fonts/LilitaOne.ttf");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0d0d1a;
  --panel: #1a1a2e;
  --row: #16213e;
  --line: #2a2a4a;
  --muted: #a6a6c2;
  --gold: #ffd700;
  --purple: #a368ef;
  --pink: #f653ae;
  --green: #71e5bb;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #68688b #141428;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: #141428;
}
::-webkit-scrollbar-thumb {
  background: #68688b;
  border: 2px solid #141428;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9999b6;
}
::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
html {
  scrollbar-gutter: stable;
  overflow-anchor: none;
}
body {
  margin: 0;
  background: var(--bg);
  color: #f5f2ff;
  font-family: Lilita, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/assets/background.webp") center top/cover;
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
button {
  color: inherit;
}
.topbar {
  min-height: 94px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(24px, calc((100vw - 1240px) / 2));
  gap: 28px;
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 88px;
  height: 64px;
  object-fit: contain;
}
.brand > span {
  font: italic 700 28px Gumbo;
  color: var(--gold);
  line-height: 1;
}
.brand-sub {
  display: block;
  font: 11px Lilita;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-top: 7px;
}
.topbar nav {
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 15px;
  white-space: nowrap;
}
.topbar nav a {
  padding: 12px 0;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}
.topbar nav a.active {
  color: var(--gold);
  border-color: var(--gold);
}
.home-link {
  color: var(--muted);
  font-size: 13px;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 7px;
}
main {
  max-width: 1120px;
  padding: 32px 24px 56px;
  margin: auto;
  min-height: 72vh;
}
h1,
h2,
h3 {
  font-family: Gumbo, system-ui, sans-serif;
  font-weight: 700;
  font-style: italic;
  line-height: 1.13;
  margin: 0;
}
h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0.4px;
}
h2 {
  font-size: 27px;
}
h3 {
  font-size: 21px;
}
p {
  margin: 12px 0;
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: none;
}
.hero {
  padding: 24px 16px;
  text-align: center;
}
.hero-copy {
  max-width: 860px;
  margin: auto;
}
.hero h1 {
  color: var(--gold);
  overflow-wrap: anywhere;
}
.hero p {
  max-width: 620px;
  margin: 12px auto;
  font-size: 16px;
  color: #e1e1ee;
}
.hero .stats-line {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 18px;
}
.stats-line b {
  color: white;
  font-size: 20px;
  margin-right: 6px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 34px 0 18px;
}
.section-head p {
  margin: 3px 0;
  font-size: 14px;
}
.pill {
  display: inline-block;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.3px;
  border-radius: 5px;
  border: 1px solid var(--line);
  padding: 5px 9px;
  text-transform: none;
  color: var(--muted);
}
.pill.live {
  color: var(--green);
  border-color: #71e5bb50;
  background: #183c34;
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  width: max-content;
}
.tabs button {
  padding: 9px 24px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.tabs button.active {
  background: var(--gold);
  color: #33200c;
}
.format-picker {
  position: relative;
  width: 230px;
  max-width: 100%;
  flex-shrink: 0;
  z-index: 5;
}
.format-picker summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  list-style: none;
}
.format-picker summary::-webkit-details-marker {
  display: none;
}
.format-caption {
  color: var(--muted);
  font-size: 14px;
}
.format-value {
  color: var(--gold);
  overflow-wrap: anywhere;
}
.picker-chevron,
.card-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
}
.format-picker[open] .picker-chevron {
  transform: rotate(225deg);
}
.format-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(320px, 45dvh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 8px 24px #0005;
}
.format-options button {
  display: block;
  text-align: left;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}
.format-options button:hover,
.format-options button:focus-visible {
  background: var(--row);
  outline-offset: -3px;
}
.format-options button[aria-selected="true"] {
  background: var(--gold);
  color: #33200c;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 26px 0;
}
.search {
  position: relative;
  max-width: 350px;
  width: 100%;
}
.search input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 17px;
  color: white;
  font-size: 15px;
}
.search-results {
  position: absolute;
  top: 54px;
  right: 0;
  left: 0;
  z-index: 8;
  background: var(--panel);
  box-shadow: 0 6px 14px #0005;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 350px;
  overflow: auto;
}
.search-results a {
  display: block;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
.search-results p {
  padding: 12px;
}
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  margin-bottom: 30px;
}
.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 20px 18px;
  height: 100%;
  overflow: hidden;
}
.podium-card.first {
  background: transparent;
}
.podium > * + * {
  border-left: 1px solid var(--line);
}
.podium-card .position {
  position: absolute;
  top: 14px;
  left: 17px;
  font: italic 700 21px Gumbo;
  color: var(--muted);
}
.podium-card .medal {
  width: 48px;
  height: 62px;
  object-fit: contain;
  margin-bottom: 10px;
}
.game-name {
  font-size: 20px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  text-shadow: 0 2px 1px #0008;
  line-height: 1.15;
}
.game-name sup {
  font-size: 0.64em;
  vertical-align: super;
  line-height: 0;
}
.title {
  display: block;
  font-size: max(10px, 0.55em);
  color: var(--gold);
  margin-top: -0.05em;
  line-height: 1.1;
}
.player-label > .title > .game-name {
  font-size: inherit;
  line-height: inherit;
}
.player-label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  font-size: 20px;
  min-width: 0;
}
.player-label > .game-name {
  font-size: inherit;
  line-height: 1.05;
}
.medal-counts {
  display: flex;
  gap: 17px;
  justify-content: center;
  margin-top: 13px;
  font-size: 15px;
}
.medal-counts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.medal-counts img {
  height: 23px;
  width: 18px;
  object-fit: contain;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 1px;
  padding: 15px 20px;
  background: var(--panel);
}
td {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
td.rank {
  width: 65px;
  font-size: 21px;
  color: var(--muted);
}
td.numeric,
th.numeric {
  text-align: center;
  width: 100px;
}
th img {
  width: 22px;
  height: 27px;
  vertical-align: middle;
}
tbody tr:nth-child(odd) {
  background: var(--row);
}
tbody tr:nth-child(even) {
  background: #141428;
}
tbody tr:hover {
  background: #1e1e3a;
}
td .player-label {
  font-size: 18px;
}
.leader-player {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #34304e;
  object-fit: contain;
}
.muted {
  color: var(--muted);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 18px;
  display: inline-block;
  font-size: 14px;
}
.button.gold {
  background: var(--gold);
  color: #392609;
  border-color: #a97932;
}
.button:hover {
  border-color: #68688b;
}
.button:disabled:hover {
  border-color: var(--line);
}
.empty {
  text-align: center;
  padding: 65px 24px;
}
.empty img {
  height: 100px;
  width: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}
.empty p {
  max-width: 540px;
  margin: 15px auto;
}
.notice {
  padding: 13px 18px;
  border: 1px solid #6f5941;
  background: #392e1f;
  border-radius: 12px;
  margin: 18px 0;
  color: #f3dba0;
  font-size: 14px;
}
.back {
  display: inline-block;
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 14px;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.profile-avatar {
  width: 110px;
  height: 110px;
  object-fit: contain;
}
.profile-hero .player-label {
  font-size: 40px;
}
.profile-hero .id {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 16px;
  background: var(--panel);
}
.stat-card + .stat-card {
  border-left: 1px solid var(--line);
}
.stat-card img {
  width: 38px;
  height: 44px;
  object-fit: contain;
}
.stat-card strong {
  font-size: 28px;
  display: block;
  line-height: 1.1;
}
.stat-card small {
  color: var(--muted);
  font-size: 12px;
}
.history-row {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.panel > a:last-of-type .history-row {
  border: 0;
}
.history-row:hover,
.event-card:hover {
  background: #1e1e3a;
}
.history-copy {
  min-width: 0;
  flex: 1;
}
.event-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.event-title h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.event-title .category-label {
  flex: none;
}
.history-row > .history-outcome {
  max-width: 32%;
  flex-shrink: 0;
}
.history-row h3 {
  font-size: 19px;
}
.history-row p {
  font-size: 13px;
  margin: 5px 0;
}
.history-medal {
  width: 30px;
  height: 40px;
  object-fit: contain;
}
.history-outcome {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  text-align: right;
}
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.event-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 20px;
}
.event-card img {
  width: 60px;
  height: 70px;
  object-fit: contain;
}
.event-card .event-copy {
  flex: 1;
  min-width: 0;
}
.event-card .event-title {
  margin-top: 12px;
}
.event-card p {
  font-size: 13px;
}
.event-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-top: 20px;
  color: #d0c7e8;
  justify-content: center;
}
.event-body-tabs {
  margin-top: 30px;
}
.groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.group-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  min-width: 0;
  transition: border-color 150ms ease;
}
.group-card:hover {
  border-color: var(--gold);
}
.group-card-heading {
  font-family: Gumbo, Lilita, sans-serif;
  font-size: 22px;
}
.group-card-status {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.group-card-detail {
  margin: 19px 0;
  font-size: 15px;
}
.group-card-action {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.card-chevron {
  transform: rotate(-45deg);
}
body.modal-open {
  overflow: hidden;
}
.group-modal {
  width: min(620px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: inherit;
  overflow: hidden;
}
.group-modal[open] {
  display: flex;
  flex-direction: column;
}
.group-modal::backdrop {
  background: #070710c9;
}
.group-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.group-modal-header h2 {
  font-size: clamp(20px, 4vw, 27px);
  overflow-wrap: anywhere;
}
.group-modal-header p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.group-modal-header .button {
  flex-shrink: 0;
  padding: 8px 12px;
}
.group-modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
}
.group-modal .group-list {
  border: 0;
}
.standing-rank {
  color: var(--muted);
  width: 20px;
  flex-shrink: 0;
  font-size: 14px;
}
.group-modal .standing .competitor,
.group-game .standing > .player-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.group-games {
  padding: 18px;
  border-top: 1px solid var(--line);
}
.group-games > h3 {
  font-size: 20px;
  margin-bottom: 16px;
}
.group-game {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  margin-top: 10px;
}
.group-game summary {
  padding: 13px 0;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.group-game summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.group-game .points small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.group-list {
  border-top: 1px solid var(--line);
  padding: 10px 17px;
}
.standing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #34304788;
}
.standing .player-label {
  font-size: 15px;
}
.standing:last-child {
  border: 0;
}
.qualifier {
  color: var(--green);
  background: #183c34;
  border: 1px solid #71e5bb50;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.3;
  flex-shrink: 0;
}
.standing-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.group-modal .standing-identity .competitor {
  flex: 0 1 auto;
  max-width: 100%;
}
.points {
  text-align: right;
  color: var(--gold);
  white-space: nowrap;
}
.competitor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.team-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
}
.group-foot {
  padding: 14px 17px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.bracket {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 12px 2px 24px;
}
.bracket-round {
  min-width: 275px;
  width: 275px;
  flex: none;
}
.bracket-round h3 {
  font-size: 21px;
  margin-bottom: 20px;
}
.match-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  margin-bottom: 16px;
  overflow: hidden;
}
.match-top {
  font-size: 11px;
  color: var(--muted);
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}
.match-side {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.match-side + .match-side {
  border-top: 1px solid var(--line);
}
.match-side.winner {
  background: #463a1e;
  border-left: 3px solid var(--gold);
  padding-left: 11px;
}
.match-side .player-label {
  font-size: 15px;
}
.match-status {
  padding: 7px 13px;
  font-size: 11px;
  color: var(--muted);
  background: #151424;
}
.round-filter {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 16px;
  color: white;
}
.result-tag {
  color: var(--gold);
}
.phase-heading {
  margin: 32px 0 18px;
}
footer {
  border-top: 1px solid var(--line);
  max-width: 1072px;
  margin: 0 auto;
  padding: 26px 0 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}
footer > span {
  font: italic 700 17px Gumbo;
  color: #e6d9fc;
}
footer p {
  margin: 0;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #35304d;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 17px;
  display: none;
  font-size: 13px;
  z-index: 20;
}
select {
  max-width: 100%;
}
@media (max-width: 950px) {
  .home-link {
    display: none;
  }
  .groups {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-card:nth-child(4) {
    border-left: 0;
  }
  .stat-card:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
  footer {
    margin: 0 24px;
  }
  .topbar {
    gap: 15px;
  }
  .topbar nav {
    gap: 15px;
    font-size: 13px;
  }
}
@media (max-width: 640px) {
  .topbar {
    padding: 12px 18px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .brand img {
    width: 64px;
    height: 45px;
  }
  .brand > span {
    font-size: 23px;
  }
  .brand-sub {
    font-size: 9px;
  }
  .topbar nav {
    width: 100%;
    justify-content: center;
    gap: 23px;
  }
  .topbar nav a {
    padding: 9px 0;
  }
  .hero {
    padding: 18px 8px;
  }
  .hero-copy {
    max-width: 100%;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero p {
    font-size: 15px;
  }
  .hero .stats-line {
    gap: 17px;
    font-size: 11px;
  }
  .stats-line b {
    font-size: 17px;
  }
  main {
    padding: 22px 15px 35px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .tabs {
    width: max-content;
    max-width: 100%;
    justify-content: flex-start;
  }
  .tabs button {
    padding: 9px 12px;
    font-size: 15px;
  }
  .event-body-tabs {
    align-items: flex-start;
  }
  .group-modal-header {
    padding: 16px 12px;
  }
  .search {
    max-width: none;
  }
  .podium-card {
    padding: 20px 7px 14px;
  }
  .podium-card .position {
    font-size: 17px;
    left: 8px;
    top: 9px;
  }
  .podium-card .medal {
    width: 42px;
    height: 55px;
  }
  .podium-card .player-label {
    font-size: 15px;
  }
  .medal-counts {
    gap: 6px;
    font-size: 11px;
  }
  .medal-counts img {
    height: 18px;
    width: 13px;
  }
  .section-head {
    margin-top: 26px;
  }
  .section-head h2 {
    font-size: 24px;
  }
  .section-head .pill {
    font-size: 9px;
  }
  .groups,
  .event-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-card {
    padding: 16px;
  }
  .stat-card:nth-child(n) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .stat-card:nth-child(-n + 2) {
    border-top: 0;
  }
  .stat-card:nth-child(even) {
    border-left: 1px solid var(--line);
  }
  .stat-card:last-child {
    grid-column: span 2;
  }
  .profile-hero {
    gap: 17px;
    padding: 23px 18px;
  }
  .profile-avatar {
    width: 73px;
    height: 73px;
  }
  .profile-hero .player-label {
    font-size: 28px;
  }
  th,
  td {
    padding: 12px 10px;
  }
  td .player-label {
    font-size: 15px;
  }
  .avatar {
    width: 30px;
    height: 30px;
  }
  .leader-player {
    gap: 7px;
  }
  td.numeric,
  th.numeric {
    width: 48px;
  }
  .played-col {
    display: none;
  }
  td.rank {
    width: 35px;
    font-size: 18px;
  }
  .event-card {
    padding: 18px;
    gap: 15px;
  }
  .event-card img {
    width: 45px;
    height: 55px;
  }
  .history-row {
    padding: 18px 15px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .event-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .history-row > .history-outcome {
    max-width: 100%;
    text-align: left;
  }
  .history-row h3 {
    font-size: 17px;
  }
  .history-row p {
    font-size: 12px;
  }
  .history-outcome {
    font-size: 12px;
  }
  .history-medal {
    width: 22px;
    height: 30px;
  }
  footer {
    margin: 0 15px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  footer small {
    width: 100%;
  }
  .bracket-round {
    min-width: 260px;
    width: 260px;
  }
}
@media (max-width: 360px) {
  .topbar nav {
    font-size: 12px;
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
.history-team {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.history-team .player-label {
  font-size: 14px;
}

/* Bracket navigation uses native scrolling for touch and keyboard access. */
.back {
  padding: 8px 15px;
  border: 1px solid #68688b;
  border-radius: 8px;
  background: var(--panel);
  color: #f5f2ff;
}
.back:hover {
  border-color: var(--gold);
}
.bracket-view-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.bracket-view-switch .selected {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.bracket-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 0 14px;
}
.bracket-tools p {
  font-size: 14px;
  margin: 0;
}
.zoom-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.zoom-value {
  min-width: 44px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.bracket-viewport {
  width: 100%;
  height: 640px;
  max-height: 78vh;
  min-height: 380px;
  overflow: auto;
  background: #10101e;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: grab;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
}
.bracket-viewport.dragging {
  cursor: grabbing;
  user-select: none;
}
.bracket-sheet {
  position: relative;
}
.bracket-scene {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: top left;
}
.bracket-scene > svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bracket-line {
  fill: none;
  stroke: #68688b;
  stroke-width: 2;
}
.bracket-line.advanced {
  stroke: #d9b92f;
}
.bracket-line.placement {
  stroke-dasharray: 6 6;
}
.tree-match,
.tree-champion {
  position: absolute;
  background: var(--panel);
  border: 1px solid #494964;
  border-radius: 10px;
  overflow: hidden;
}
.tree-match {
  display: grid;
  grid-template-rows: 32px 1fr 1fr 29px;
}
.tree-match .match-top {
  padding: 7px 12px;
  font-size: 12px;
}
.tree-match .match-side {
  padding: 9px 12px;
  min-width: 0;
  min-height: 0;
  border-bottom: 1px solid var(--line);
}
.tree-match .competitor,
.tree-champion .competitor {
  min-width: 0;
  gap: 6px;
}
.tree-match .competitor .team-label,
.tree-champion .team-label {
  display: none;
}
.tree-match .player-label,
.tree-champion .player-label {
  font-size: 16px;
}
.tree-match .player-label > .game-name,
.tree-champion .player-label > .game-name {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tree-match .match-status {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 11px;
}
.tree-score {
  color: var(--gold);
  flex-shrink: 0;
  font-size: 15px;
}
.tree-champion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-color: #b8992c;
}
.tree-champion > img {
  width: 44px;
  height: 52px;
  object-fit: contain;
}
.tree-champion > div {
  min-width: 0;
}
.tree-champion h3 {
  color: var(--gold);
  font-size: 18px;
  margin: 0 0 8px;
}
@media (max-width: 600px) {
  .zoom-tools .button {
    padding: 8px 10px;
    font-size: 12px;
  }
  .bracket-viewport {
    height: 560px;
  }
}

@supports selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
}

.tree-match .title,
.tree-champion .title {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-game summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}
.group-game summary::-webkit-details-marker {
  display: none;
}
.group-game summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
}
.group-game[open] summary::after {
  transform: rotate(225deg);
}
