:root {
  color-scheme: dark;
  --bg: #020913;
  --panel: #071422;
  --raised: #0c2133;
  --line: #1d3b50;
  --ink: #f5f7fa;
  --muted: #8b96a3;
  --cyan: #39c9ff;
  --gold: #ffca28;
  --good: oklch(0.84 0.15 155);
  --error: oklch(0.8 0.14 25);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.6 system-ui,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
}
button {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 15px;
  background: var(--raised);
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
  min-height: 42px;
}
button:hover {
  background: oklch(0.33 0.06 260);
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.primary {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.primary:hover {
  background: oklch(0.94 0.12 88);
}
a {
  color: var(--cyan);
}
input,
select,
textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  padding: 11px;
  width: 100%;
  min-width: 0;
}
input::placeholder {
  color: var(--muted);
}
textarea {
  min-height: 80px;
}
input[type="checkbox"] {
  width: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15px;
}
h1,
h2,
h3 {
  overflow-wrap: anywhere;
  text-wrap: balance;
}
p {
  max-width: 70ch;
}
.muted,
.sub {
  color: var(--muted);
}
.sub {
  margin-top: 7px;
}
.small {
  font-size: 12px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  background: oklch(0.18 0.027 260);
}
.brand {
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand img {
  width: 145px;
  height: 57px;
  object-fit: contain;
}
.brand strong {
  font-size: 13px;
  letter-spacing: 0.08em;
}
.account {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.account span {
  color: var(--muted);
}
nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 32px;
  overflow: auto;
}
nav button {
  border-color: transparent;
  background: transparent;
  white-space: nowrap;
  color: var(--muted);
}
nav button.active {
  background: var(--raised);
  color: var(--cyan);
  border-color: var(--line);
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 32px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 22px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.grid > .panel {
  margin-bottom: 0;
}
.stack {
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}
.field label {
  font-size: 13px;
  color: var(--muted);
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fields .field {
  margin-bottom: 12px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}
.badge {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  color: var(--muted);
}
.badge.ok {
  color: var(--good);
  background: oklch(0.26 0.04 155);
}
.badge.wait {
  color: var(--gold);
  background: oklch(0.27 0.035 88);
}
.banner {
  background: oklch(0.25 0.065 260);
  border: 1px solid oklch(0.4 0.08 260);
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 24px;
}
.banner h2 {
  font-size: 26px;
  color: var(--cyan);
}
.banner p {
  margin-top: 7px;
}
.review-note {
  padding: 12px 16px;
  background: var(--raised);
  border-radius: 4px;
  margin-top: 12px;
}
.checks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child {
  border: 0;
}
.step p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  padding: 12px;
  font-weight: 600;
  white-space: nowrap;
}
td {
  border-top: 1px solid var(--line);
  padding: 14px 12px;
}
td strong {
  display: block;
}
td small {
  color: var(--muted);
}
.scroll {
  overflow: auto;
  max-width: 100%;
}
.compact {
  padding: 7px 10px;
  min-height: 36px;
  font-size: 12px;
}
.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
.empty h2 {
  color: var(--ink);
  margin-bottom: 8px;
}
.empty p {
  margin: auto;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--cyan);
  margin-bottom: 10px;
}
.score {
  font-size: 25px;
  font-weight: 750;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.bracket {
  display: flex;
  gap: 32px;
  min-width: 850px;
  padding: 10px 0 24px;
}
.round {
  display: flex;
  flex-direction: column;
  min-width: 235px;
  flex: 1;
}
.round h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 15px;
}
.round-matches {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: space-around;
}
.match {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  padding: 12px;
  min-width: 0;
}
.match small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  margin-bottom: 7px;
}
.match-team {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
}
.match-team span {
  overflow-wrap: anywhere;
}
.match-team.win {
  color: var(--gold);
}
.match .actions {
  margin-top: 8px;
}
.match button {
  font-size: 11px;
  padding: 6px 8px;
  min-height: 32px;
}
.bronze {
  max-width: 500px;
  margin-top: 15px;
}
.stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.stats strong {
  font-size: 26px;
  display: block;
  color: var(--cyan);
  line-height: 1.1;
}
.stats span {
  font-size: 11px;
  color: var(--muted);
}
.error {
  color: var(--error);
  font-size: 13px;
  margin-top: 13px;
}
.success {
  color: var(--good);
}
dialog {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: min(680px, calc(100vw - 24px));
  padding: 25px;
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: oklch(0.07 0.015 260 / 0.88);
}
dialog h2 {
  margin-bottom: 16px;
}
.tournament-form-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.tournament-form-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 12px 16px;
  color: var(--muted);
}
.tournament-form-tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent, #37c9f2);
}
[data-settings-panel][hidden] {
  display: none;
}
.competition-rules {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.competition-rules:disabled {
  opacity: 0.7;
}
.competition-rules h3 {
  margin: 20px 0 16px;
}
.competition-rules [hidden] {
  display: none;
}
.rule-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.rule-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.competition-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.competition-summary > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.competition-summary dt {
  color: var(--muted);
  font-size: 13px;
}
.competition-summary dd {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .competition-summary {
    grid-template-columns: 1fr;
  }
}
.prize-editor h3 {
  margin: 0 0 12px;
}
.prize-editor .fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.prize-row {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) minmax(0, 2fr) 38px;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}
.prize-row .field {
  min-width: 0;
  margin-bottom: 0;
}
.prize-row input,
.prize-editor input,
.prize-editor select {
  width: 100%;
  min-width: 0;
}
.prize-remove {
  width: 38px;
  height: 44px;
  padding: 0;
  font-size: 24px;
}
.prize-allocation {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.prize-allocation.overallocated {
  color: var(--bad, #ff8a80);
}
.participation-settings {
  margin: 20px 0;
}
.participation-settings summary {
  margin-bottom: 16px;
  cursor: pointer;
}
.prize-distribution {
  min-width: 0;
}
.prize-pool-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 28px;
  border-bottom: 1px solid var(--line);
}
.prize-pool-total {
  display: grid;
  min-width: 0;
  gap: 10px;
}
.prize-pool-total > span,
.prize-pool-count > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.prize-pool-total > strong {
  color: #f8d875;
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.prize-pool-total > p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.prize-pool-count {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}
.prize-pool-count > strong {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
}
.prize-placements-title {
  margin: 28px 0 16px;
  font-size: 22px;
}
.prize-placements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.placement-prize {
  --prize-accent: #65d5fa;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--prize-accent);
  border-radius: 4px;
  background: var(--panel);
}
.placement-prize--first { --prize-accent: #f8d875; }
.placement-prize--second { --prize-accent: #c6d6e5; }
.placement-prize--third { --prize-accent: #eba77d; }
.placement-prize-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.placement-prize-heading .prize-position {
  display: grid;
  flex: 0 0 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--prize-accent);
  color: var(--prize-accent);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
}
.placement-prize-heading > h3 {
  margin: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.placement-prize-value {
  display: grid;
  gap: 6px;
}
.placement-prize-value > span {
  font-size: 14px;
  color: var(--muted);
}
.placement-prize-value > strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.placement-prize-share {
  margin-top: auto;
}
.placement-prize-share meter {
  display: block;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--line);
}
.placement-prize-share meter::-webkit-meter-bar {
  border: 0;
  border-radius: 0;
  background: var(--line);
}
.placement-prize-share meter::-webkit-meter-optimum-value {
  background: var(--prize-accent);
}
.placement-prize-share meter::-moz-meter-bar {
  background: var(--prize-accent);
}
.placement-prize-share p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.placement-prize-share p > strong {
  color: var(--prize-accent);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .prize-row {
    gap: 8px;
    grid-template-columns: minmax(64px, 1fr) minmax(0, 2fr) 34px;
  }
  .prize-remove {
    width: 34px;
  }
  .prize-editor .fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .prize-pool-total strong {
    font-size: 40px;
  }
  .prize-pool-summary { align-items: start; flex-direction: column; gap: 16px; }
  .prize-pool-count { display: flex; align-items: baseline; gap: 12px; padding: 0; border: 0; }
  .prize-pool-count > strong { font-size: 24px; }
  .prize-placements { gap: 16px; }
  .placement-prize { gap: 20px; padding: 20px; }
  .placement-prize-value > strong { font-size: 30px; }
}
.evidence-img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin: 15px auto;
}
.otp {
  max-width: 210px;
}
.login {
  max-width: 500px;
  margin: 60px auto;
}
.dev {
  background: oklch(0.24 0.04 80);
  border: 1px solid oklch(0.45 0.06 80);
  padding: 16px;
  border-radius: 6px;
  margin-top: 24px;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 5px;
  max-width: 90vw;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#notice.visible {
  opacity: 1;
}
.verify-controls {
  margin-top: 16px;
}
.profile-photo {
  margin-bottom: 8px;
}
.roster-slot {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
footer {
  padding: 20px 32px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.stat-input {
  min-width: 65px;
  width: 72px;
  padding: 7px;
}
.chooser {
  max-width: 310px;
}
.detail-line {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
}
.invitation {
  overflow-wrap: anywhere;
}
.stage-select {
  max-width: 260px;
}
.hidden {
  display: none !important;
}
@media (max-width: 800px) {
  main {
    padding: 24px 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 12px 18px;
  }
  .brand strong {
    display: none;
  }
  nav {
    padding: 10px 18px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .chooser {
    max-width: 100%;
  }
  .panel {
    padding: 19px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .account span {
    display: none;
  }
  h1 {
    font-size: 26px;
  }
  .step {
    align-items: flex-start;
  }
  .step button {
    flex-shrink: 0;
  }
  .brand img {
    width: 130px;
  }
  .stage-select {
    width: 100%;
  }
  .panel-head {
    flex-wrap: wrap;
  }
}
.schedule-table {
  min-width: 760px;
}
.schedule-table td:nth-child(2) {
  min-width: 220px;
}
.schedule-table td:nth-child(3) {
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
.reward-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 24px;
  margin-bottom: 20px;
  background: var(--raised);
  border-radius: 8px;
}
.reward-strip strong {
  color: var(--gold);
}
.reward-strip span {
  color: var(--muted);
}
.team-identity {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.team-identity h2 {
  margin: 0;
}
.team-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--raised);
}
.logo-empty {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
}
.roster-list .roster-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.slot-number {
  color: var(--muted);
  margin-right: 16px;
  font-variant-numeric: tabular-nums;
}
.journey {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  margin: 24px 0;
}
.journey li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; border-top: 2px solid var(--line); padding-top: 16px; }
.journey strong { display: block; font-size: 14px; line-height: 1.45; }
.journey small { display: block; font-size: 12px; margin-top: 5px; }
.journey-marker { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; font-weight: 800; }
.journey .done { color: var(--good); border-color: var(--good); }
.journey .done .journey-marker { background: color-mix(in srgb, var(--good) 12%, transparent); border-color: var(--good); }
.journey .current {
  color: var(--cyan);
  border-color: var(--cyan);
}
.journey .current .journey-marker { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }
.registration-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.registration-progress-head h2 { margin: 0; }
.registration-progress-count { color: var(--cyan); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.registration-next { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); background: var(--raised); padding: 18px; border-radius: 8px; }
.registration-next p { color: var(--muted); margin: 6px 0 0; max-width: 68ch; }
.registration-next .button, .registration-next button { flex-shrink: 0; min-height: 44px; }
.registration-roster-count { color: var(--muted); }
.registration-roster-count strong { color: var(--ink); }
.registration-target { scroll-margin-top: 24px; }
@media (max-width: 1100px) { .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .journey { grid-template-columns: 1fr 1fr; }
  .journey li { padding-top: 12px; }
  .registration-next { align-items: stretch; flex-direction: column; padding: 14px; }
  .registration-next .button, .registration-next button { width: 100%; }
}
.fee-amount {
  font-size: 1.75rem;
  font-weight: 750;
  color: var(--gold);
}
.instructions {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#account-results {
  margin-top: 20px;
}
#account-results .step {
  gap: 16px;
}
nav {
  overflow-x: auto;
}
nav button {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .journey {
    gap: 10px;
    font-size: 12px;
  }
  .reward-strip {
    padding: 16px;
  }
  .team-identity {
    gap: 12px;
  }
  .roster-list .roster-slot {
    align-items: flex-start;
  }
}

.panel td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
/* Competition arena: restore league, scoreboards and bracket navigation. */
.arena-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  padding: 28px 18px;
  background: oklch(0.18 0.03 260);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.arena-brand {
  text-align: center;
  margin-bottom: 32px;
}
.arena-brand img {
  width: 165px;
  height: 70px;
  object-fit: contain;
}
.arena-brand > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  margin-top: 12px;
}
.arena-sidebar nav {
  display: grid;
  gap: 7px;
  padding: 0;
  border: 0;
  overflow: visible;
  background: none;
}
.arena-sidebar nav button {
  text-align: left;
  justify-content: flex-start;
  border-color: transparent;
  background: none;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.arena-sidebar nav button.active {
  background: oklch(0.28 0.075 260);
  border-color: oklch(0.41 0.09 260);
  color: var(--cyan);
}
.sidebar-season {
  margin-top: auto;
  padding: 16px 10px;
  font-size: 12px;
}
.sidebar-season p {
  color: var(--muted);
}
.arena-main {
  margin-left: 224px;
}
.arena-main main {
  padding: 28px;
  max-width: 1600px;
}
.arena-main .topbar {
  min-height: 76px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 14px;
}
.breadcrumb strong {
  color: var(--ink);
}
.arena-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px;
  margin-bottom: 22px;
  background: linear-gradient(
    115deg,
    oklch(0.26 0.095 260),
    oklch(0.19 0.035 260)
  );
  border: 1px solid oklch(0.39 0.085 260);
  border-radius: 8px;
  overflow: hidden;
}
.arena-hero h2 {
  max-width: 620px;
  font-size: 38px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 18px 0;
}
.arena-hero p {
  color: var(--muted);
}
.arena-hero p span {
  padding: 0 8px;
}
.arena-hero .actions {
  margin-top: 24px;
}
.arena-emblem {
  flex-shrink: 0;
  text-align: center;
  font-size: 54px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: var(--cyan);
  padding: 15px;
}
.arena-emblem span {
  font-size: 21px;
  letter-spacing: 0.15em;
  color: var(--gold);
}
.arena-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  margin-bottom: 24px;
  padding: 20px 0;
  gap: 20px;
}
.arena-strip > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.arena-strip strong {
  font-size: 24px;
}
.arena-strip span {
  font-size: 12px;
  color: var(--muted);
}
.arena-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 22px;
}
.arena-dashboard .panel {
  min-width: 0;
}
.team-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.team-mark {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: oklch(0.3 0.065 260);
  border: 1px solid oklch(0.41 0.075 260);
  border-radius: 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}
.rank {
  font-weight: 700;
  color: var(--muted);
}
.rank.top {
  color: var(--gold);
}
.points {
  color: var(--gold);
  font-weight: 800;
  font-size: 17px;
}
.standings-table {
  font-variant-numeric: tabular-nums;
  min-width: 590px;
}
.form-run {
  display: flex;
  gap: 3px;
}
.form-run span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 22px;
  font-size: 10px;
  border-radius: 3px;
  background: oklch(0.27 0.07 155);
  color: var(--good);
}
.form-run .form-L {
  background: oklch(0.28 0.055 25);
  color: var(--error);
}
.table-caption {
  font-size: 11px;
  color: var(--muted);
  margin: 16px 0 0;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.score-panel {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.featured-match {
  padding: 0;
  border: 0;
  background: none;
}
.score-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 28px 0;
}
.versus > div:first-child,
.versus > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.versus strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.versus .team-mark {
  width: 52px;
  height: 52px;
  font-size: 18px;
}
.score-line {
  display: flex;
  gap: 12px;
  align-items: center;
}
.score-line b {
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.score-line span {
  color: var(--muted);
}
.score-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.score-bottom > span {
  font-size: 11px;
  color: var(--muted);
  flex: 1 1 100%;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px;
}
.pagination > span {
  color: var(--muted);
  font-size: 12px;
}
.arena-bracket .round-matches {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding-bottom: 30px;
}
.arena-bracket .round {
  display: flex;
  flex-direction: column;
  min-width: 210px;
}
.arena-bracket .match {
  position: relative;
}
.arena-bracket .round:not(:last-child) .match:after {
  content: "";
  position: absolute;
  left: 100%;
  width: 24px;
  top: 50%;
  border-top: 1px solid var(--line);
}
.broadcast-mode .arena-sidebar,
.broadcast-mode .topbar,
.broadcast-mode footer {
  display: none;
}
.broadcast-mode .arena-main {
  margin-left: 0;
}
.exit-broadcast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
}
.broadcast-mode .match .actions {
  display: none;
}
@media (min-width: 1400px) {
  .score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1150px) {
  .arena-dashboard {
    grid-template-columns: 1fr;
  }
  .arena-emblem {
    display: none;
  }
  .arena-strip > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
}
@media (max-width: 800px) {
  .arena-sidebar {
    position: static;
    width: auto;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .arena-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    margin: 0 0 12px;
  }
  .arena-brand img {
    width: 108px;
    height: 43px;
  }
  .arena-brand > span {
    margin: 0;
    font-size: 9px;
  }
  .arena-sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
  }
  .arena-sidebar nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 9px 12px;
  }
  .sidebar-season {
    display: none;
  }
  .arena-main {
    margin-left: 0;
  }
  .arena-main main {
    padding: 22px 16px;
  }
  .arena-main .topbar {
    min-height: 54px;
    padding: 10px 16px;
  }
  .breadcrumb > span,
  .breadcrumb > strong {
    display: none;
  }
  .arena-hero {
    padding: 24px;
  }
  .arena-hero h2 {
    font-size: 28px;
  }
  .arena-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .arena-strip > div {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .arena-strip strong {
    font-size: 22px;
  }
  .score-grid {
    grid-template-columns: 1fr;
  }
  .score-panel {
    padding: 18px;
  }
  .featured-match {
    padding: 0;
  }
  .arena-dashboard {
    gap: 0;
  }
  .arena-hero .actions {
    gap: 8px;
  }
  .arena-hero .actions button {
    font-size: 12px;
  }
  .arena-sidebar .active {
    scroll-margin-inline: 20px;
  }
}

.match-team .team-mark {
  width: 24px;
  height: 24px;
  font-size: 9px;
}
.match-team .team-cell {
  white-space: normal;
  min-width: 0;
}
.ops-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px 0 8px;
}
.ops-tabs button {
  white-space: nowrap;
}
.ops-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.ops-match small {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}
.ops-match .team-cell {
  white-space: normal;
  flex-wrap: wrap;
}
.waiting-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}
@media (max-width: 800px) {
  .ops-match {
    align-items: flex-start;
    flex-direction: column;
  }
  .waiting-teams {
    grid-template-columns: 1fr;
  }
  .ops-tabs {
    flex-wrap: wrap;
  }
}
.availability-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.availability-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.available {
  color: var(--cyan);
}
.pending {
  color: var(--muted);
}
.standby-panel {
  max-width: 760px;
}
.standby-signal {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  margin: 8px 0 16px;
}
.standby-signal span {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: var(--gold);
  animation: standby-breathe 2.4s ease-in-out infinite;
}
.standby-signal span:nth-child(2) {
  animation-delay: 0.25s;
}
.standby-signal span:nth-child(3) {
  animation-delay: 0.5s;
}
.standby-signal.confirmed span {
  background: var(--cyan);
}
@keyframes standby-breathe {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .standby-signal span {
    animation: none;
    opacity: 1;
  }
}

/* Display preferences remain available on login and every tournament view. */
.display-preferences {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 28px;
  margin-left: 224px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.display-preferences label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.display-preferences select {
  width: auto;
  min-height: 38px;
  padding: 6px 28px 6px 10px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --raised: #e6ecf5;
  --line: #bac8db;
  --ink: #14233c;
  --muted: #4c607b;
  --cyan: #00687c;
  --gold: #8b5900;
  --good: #147249;
  --error: #b72c37;
}
[data-theme="light"] .primary {
  background: #ffcd54;
  border-color: #c88d17;
  color: #292000;
}
[data-theme="light"] button:hover {
  background: #d5e1f1;
}
[data-theme="light"] .primary:hover {
  background: #ffe29a;
}
[data-theme="light"] .arena-sidebar {
  background: #eaf0f8;
}
[data-theme="light"] .arena-sidebar nav button.active {
  background: #d5eafa;
  border-color: #8bb8d6;
}
[data-theme="light"] .arena-hero {
  background: linear-gradient(115deg, #dceafb, #f8fbff);
  border-color: #a6bedc;
}
[data-theme="light"] .arena-brand img,
[data-theme="light"] .brand img {
  background: #101b30;
  border-radius: 7px;
  padding: 8px;
}
[data-theme="light"] .badge.ok,
[data-theme="light"] .form-win {
  background: #dcf2e5;
}
[data-theme="light"] .badge.wait {
  background: #fff0cd;
}
[data-theme="light"] .team-mark {
  background: #e0eafb;
  border-color: #b2c5e0;
}
[data-theme="light"] .form-loss {
  background: #ffe3e5;
}
[data-theme="light"] .dev,
[data-theme="light"] .review-note {
  background: #edf1ff;
  border-color: #a7b8db;
}
[data-theme="light"] .topbar {
  background: var(--panel);
}
@media (max-width: 800px) {
  .display-preferences {
    margin-left: 0;
    padding: 8px 14px;
    justify-content: space-between;
    gap: 8px;
  }
  .display-preferences label {
    gap: 5px;
  }
}
@media (max-width: 360px) {
  .display-preferences label {
    align-items: flex-start;
    flex-direction: column;
  }
}
[data-theme="light"] .form-run span {
  background: #dcf2e5;
}
[data-theme="light"] .form-run .form-L {
  background: #ffe3e5;
}
body:not(:has(.arena-shell)) .display-preferences {
  margin-left: 0;
}
/* Arena operations: clear lanes, restrained neon and readable surfaces. */
.event-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.event-poster-wrap {
  margin-bottom: 20px;
}
.match-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.lane {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--muted);
  border-radius: 8px;
  background: var(--bg);
  min-width: 0;
}
.lane-live {
  border-top-color: var(--cyan);
  box-shadow: inset 0 1px 18px color-mix(in srgb, var(--cyan) 8%, transparent);
}
.lane .sub {
  overflow-wrap: anywhere;
}
.lane button {
  margin: 4px 4px 0 0;
}
.control-deck .eyebrow {
  color: var(--cyan);
  letter-spacing: 0.18em;
}
.ready-queue {
  display: grid;
  gap: 8px;
}
.queue-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  align-items: center;
}
.arena-hero {
  position: relative;
  border: 1px solid var(--line);
}
.arena-hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 120px;
  height: 3px;
  background: var(--gold);
}
.panel h2,
.lane strong {
  letter-spacing: 0.015em;
}
@media (max-width: 650px) {
  .match-lanes {
    grid-template-columns: 1fr;
  }
  .queue-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .lane {
    padding: 16px;
  }
}
.player-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.player-filters .field {
  margin: 0;
  min-width: 0;
}
@media (max-width: 800px) {
  .player-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 450px) {
  .player-filters {
    grid-template-columns: 1fr;
  }
}
.poster-preview {
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #b8c5d8;
  overflow: hidden;
  margin: 18px 0;
}
.poster-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.guide-page {
  max-width: 1000px;
  margin: auto;
}
.guide-section {
  margin-top: 14px;
}
.guide-section summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 750;
  min-height: 44px;
  display: list-item;
  list-style-position: inside;
  color: var(--ink);
}
.guide-section summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}
.guide-section ol {
  padding-left: 24px;
  max-width: 80ch;
}
.guide-section li {
  margin: 16px 0;
  padding-left: 6px;
  line-height: 1.75;
  color: var(--muted);
}
.guide-section li::marker {
  color: var(--cyan);
  font-weight: 700;
}

/* Navigation grouped by tournament, operations and support. */
.arena-sidebar {
  overflow-y: auto;
}
.arena-brand {
  margin-bottom: 20px;
}
.arena-sidebar nav {
  gap: 18px;
}
.nav-group {
  display: grid;
  gap: 3px;
}
.nav-group-label {
  margin: 0 12px 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.arena-sidebar nav button {
  display: flex;
  gap: 10px;
  min-height: 42px;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 8px;
}
.nav-marker {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.55;
}
.active .nav-marker {
  background: currentColor;
  opacity: 1;
}
.arena-sidebar nav button:hover {
  color: var(--ink);
  background: var(--panel);
}
.arena-sidebar nav button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.sidebar-season {
  margin-top: auto;
  padding-top: 22px;
}
@media (max-width: 800px) {
  .arena-sidebar {
    overflow: visible;
  }
  .arena-sidebar nav {
    gap: 12px;
    padding-bottom: 5px;
  }
  .nav-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
  }
  .nav-group + .nav-group {
    border-left: 1px solid var(--line);
    padding-left: 12px;
  }
  .nav-group-label,
  .nav-marker {
    display: none;
  }
  .arena-sidebar nav button {
    min-height: 44px;
  }
}

/* Arena workspace: compact navigation, editorial hierarchy, task-first surfaces. */
:root {
  --z-nav: 20;
  --z-modal: 40;
  --z-toast: 50;
}
.arena-sidebar {
  width: 240px;
  padding: 24px 16px;
  background: var(--bg);
}
.arena-main {
  margin-left: 240px;
}
.arena-main main {
  max-width: 1440px;
  margin: auto;
  padding: 30px 36px 48px;
}
.arena-brand {
  text-align: left;
  padding: 0 12px 20px;
  border-bottom: 1px solid var(--line);
}
.arena-brand img {
  width: 164px;
  height: 62px;
}
.arena-brand > span {
  font-size: 9px;
  letter-spacing: 0.13em;
  margin-top: 6px;
}
.arena-sidebar nav {
  gap: 24px;
}
.arena-sidebar nav button {
  min-height: 42px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 550;
  gap: 12px;
  border-radius: 6px;
}
.nav-icon {
  flex: 0 0 18px;
  opacity: 0.8;
}
.arena-sidebar nav button.active {
  background: var(--raised);
  border-color: var(--line);
  color: var(--ink);
}
.arena-sidebar nav button.active .nav-icon {
  color: var(--cyan);
  opacity: 1;
}
.nav-group-label {
  font-size: 10px;
  letter-spacing: 0.06em;
}
.sidebar-season {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 18px 12px 0;
}
.sidebar-season strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.arena-main .topbar {
  border-bottom: 1px solid var(--line);
  min-height: 64px;
  padding: 12px 36px;
  background: var(--bg);
}
.heading {
  align-items: flex-start;
  gap: 20px;
  margin: 22px 0 28px;
}
.heading h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.heading .sub {
  max-width: 65ch;
  margin: 6px 0;
  font-size: 13px;
}
.heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.heading-actions .chooser {
  flex: 1 1 200px;
  width: 240px;
}
.heading-actions > button {
  flex: 0 0 auto;
}
.team-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin: 0 0 20px;
}
.team-list-toolbar .field {
  flex: 0 1 300px;
  min-width: 0;
  margin: 0;
}
.team-list-toolbar input,
.team-list-toolbar select {
  width: 100%;
}
.chooser {
  max-width: 320px;
  min-height: 44px;
}
.panel {
  border-radius: 10px;
  box-shadow: none;
  padding: 24px;
}
.panel h2 {
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
button {
  transition:
    background 0.16s ease-out,
    border-color 0.16s ease-out,
    color 0.16s ease-out;
  border-radius: 6px;
}
button:disabled {
  cursor: not-allowed;
}
button.primary {
  font-weight: 700;
}
.compact {
  font-size: 12px;
}
.arena-hero {
  background: var(--panel);
  padding: 32px;
  border-radius: 10px;
  gap: 30px;
}
.arena-hero::after {
  display: none;
}
.arena-hero h2 {
  font-size: 32px;
  line-height: 1.15;
  text-transform: none;
  margin: 16px 0;
}
.arena-hero .actions {
  gap: 8px;
  margin-top: 24px;
}
.event-facts {
  min-width: 190px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: grid;
  gap: 5px;
}
.event-facts span {
  font-size: 12px;
  color: var(--muted);
}
.event-facts strong {
  font-size: 15px;
  margin-bottom: 12px;
}
.arena-strip {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 8px 0 24px;
  margin-bottom: 24px;
}
.arena-strip strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.arena-strip span {
  font-size: 12px;
}
.guide-page {
  max-width: 1000px;
  margin: 0;
}
.guide-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.guide-toolbar .actions {
  margin: 0;
}
.guide-toolbar button {
  font-size: 12px;
  background: transparent;
}
.guide-section {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  margin: 0;
  padding: 20px 0;
}
.guide-section summary {
  font-size: 16px;
  min-height: 32px;
  line-height: 1.6;
  font-weight: 650;
}
.guide-section[open] summary {
  color: var(--cyan);
}
.guide-section ol {
  max-width: 72ch;
  padding-left: 26px;
  margin-bottom: 0;
}
.guide-section li {
  font-size: 14px;
  line-height: 1.7;
  margin: 14px 0;
  padding-left: 8px;
}
.roster-slot {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: transparent;
}
.roster-slot:last-child {
  border-bottom: 0;
}
.slot-number {
  font-variant-numeric: tabular-nums;
}
.lineup-options {
  display: grid;
  gap: 0;
  margin: 20px 0;
}
.lineup-options label {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.lineup-options input {
  width: 20px;
  height: 20px;
  accent-color: var(--cyan);
}
.lineup-options small {
  display: block;
  color: var(--muted);
}
.ops-tabs {
  gap: 4px;
  padding: 6px 0;
}
.ops-match {
  padding: 20px 0;
}
.ops-match small {
  font-size: 12px;
}
[data-theme="light"] .arena-hero {
  background: var(--panel);
}
[data-theme="light"] .arena-sidebar nav button.active {
  background: var(--raised);
  color: var(--ink);
}
@media (max-width: 1100px) and (min-width: 801px) {
  .arena-sidebar {
    width: 216px;
  }
  .arena-main {
    margin-left: 216px;
  }
  .arena-main main {
    padding: 24px;
  }
  .event-facts {
    display: none;
  }
}
@media (max-width: 800px) {
  .arena-sidebar {
    width: auto;
    padding: 14px 16px 0;
  }
  .arena-brand {
    border: 0;
    padding: 0;
    margin-bottom: 10px;
  }
  .arena-brand img {
    width: 115px;
    height: 44px;
  }
  .arena-sidebar nav {
    gap: 8px;
    padding-bottom: 12px;
  }
  .arena-sidebar nav button {
    font-size: 12px;
    padding: 10px;
  }
  .nav-icon {
    width: 16px;
    flex-basis: 16px;
  }
  .arena-main {
    margin-left: 0;
  }
  .arena-main main {
    padding: 20px 16px 36px;
  }
  .arena-main .topbar {
    padding: 12px 16px;
  }
  .heading {
    margin: 16px 0 24px;
  }
  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .heading-actions .chooser {
    flex-basis: 100%;
  }
  .heading h1 {
    font-size: 24px;
  }
  .chooser {
    max-width: 100%;
    width: 100%;
  }
  .panel {
    padding: 20px;
  }
  .arena-hero {
    padding: 24px;
  }
  .arena-hero h2 {
    font-size: 28px;
  }
  .event-facts {
    display: none;
  }
  .guide-section {
    padding: 18px 0;
  }
  .guide-toolbar {
    flex-wrap: wrap;
  }
  .guide-section summary {
    font-size: 15px;
  }
  .guide-section li {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

.event-menu {
  margin: 0 0 16px;
}
.event-menu summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 8px 0;
  width: fit-content;
}
.event-menu[open] summary {
  color: var(--ink);
}
.event-menu .actions {
  padding: 10px 0;
}
.event-menu .danger {
  color: var(--error);
}
.event-facts strong span {
  font-size: inherit;
  color: inherit;
}

/* Navigation and recovery states for event-day use. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: var(--z-toast);
  padding: 12px 18px;
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}
.mobile-nav-toggle {
  display: none;
}
.sync-status {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.sync-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--good);
}
.sync-status.sync-error {
  color: var(--error);
}
.sync-error::before {
  background: var(--error);
}
.display-preferences {
  margin-left: 240px;
}
.waiting-detail {
  scroll-margin-top: 20px;
  border-color: var(--cyan);
}
.ops-search {
  max-width: 480px;
  margin-top: 18px;
}
.ops-tabs button {
  white-space: nowrap;
}
.ops-match > div {
  min-width: 0;
}
.ops-match .team-cell {
  flex-wrap: wrap;
}
.ops-match strong {
  overflow-wrap: anywhere;
}
button:disabled {
  cursor: not-allowed;
}
@media (max-width: 1100px) and (min-width: 801px) {
  .display-preferences {
    margin-left: 216px;
  }
  .account .sync-status {
    display: none;
  }
}
@media (max-width: 800px) {
  .display-preferences {
    margin-left: 0;
    padding: 8px 16px;
  }
  .arena-brand {
    justify-content: space-between;
    width: 100%;
  }
  .arena-brand > span {
    display: none;
  }
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  .arena-sidebar {
    padding: 10px 16px;
  }
  .arena-sidebar nav {
    display: none;
    overflow: visible;
    padding: 16px 0 6px;
  }
  .nav-open .arena-sidebar nav {
    display: grid;
    gap: 18px;
  }
  .nav-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-group + .nav-group {
    border: 0;
    padding: 0;
  }
  .nav-group-label {
    display: block;
    grid-column: 1 / -1;
    margin: 0 10px 4px;
  }
  .arena-sidebar nav button {
    white-space: normal;
    min-height: 44px;
    text-align: left;
  }
  .arena-main .topbar {
    gap: 8px;
  }
  .breadcrumb {
    display: none;
  }
  .account {
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }
  .account > span:not(.sync-status) {
    margin-right: auto;
    max-width: 55%;
    overflow-wrap: anywhere;
  }
  .account .sync-status {
    flex-basis: 100%;
    order: 2;
  }
  .account button {
    min-height: 40px;
  }
  .ops-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  .ops-tabs button {
    flex: 1 1 auto;
  }
  .ops-match {
    align-items: flex-start;
  }
  .ops-match > .actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 800px) {
  .account > span {
    display: inline;
  }
  .account > .sync-status {
    display: block;
  }
}

.match-stats {
  margin: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.match-stats summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 30px;
}
@media (max-width: 800px) {
  .account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .account > span:not(.sync-status) {
    max-width: none;
  }
  .account > .sync-status {
    grid-column: 1 / -1;
  }
}

body:has(.broadcast-mode) .display-preferences {
  display: none;
}

/* Language follows the AIMS header instead of creating a separate page row. */
.display-preferences {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.display-preferences label {
  gap: 8px;
}
.display-preferences select {
  width: 118px;
  min-height: 40px;
  padding: 7px 28px 7px 11px;
  background: var(--panel);
}
.login .panel {
  position: relative;
}
.login .panel > img {
  display: block;
  margin: 0 0 32px;
}
.login .display-preferences {
  position: absolute;
  top: 24px;
  right: 24px;
}
@media (max-width: 800px) {
  .account {
    display: flex;
  }
  .account > .sync-status {
    flex-basis: 100%;
  }
  .display-preferences label {
    gap: 0;
  }
  .display-preferences label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .display-preferences select {
    width: 104px;
  }
}
@media (max-width: 420px) {
  .login .panel > img {
    width: 130px;
  }
}

/* Account navigation stays separate from tournament management. */
.arena-main .topbar {
  flex-wrap: wrap;
}
.account {
  flex-wrap: wrap;
  min-width: 0;
  margin-left: auto;
}
.account .account-name {
  max-width: 240px;
  overflow-wrap: anywhere;
}
.access-mode {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.access-mode button {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 40px;
}
.access-mode button[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--bg);
}
.player-hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--raised);
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.account .player-hub-link span {
  display: inline;
  color: inherit;
}
.player-hub-link:hover {
  border-color: var(--cyan);
}
@media (max-width: 800px) {
  .account .account-name {
    flex-basis: 100%;
    max-width: none;
  }
  .account .player-hub-link {
    flex: 1 1 100%;
    order: 1;
  }
}

/* Startup stays branded and stable while the edge and tournament data connect. */
.tournament-loading {
  min-height: 100svh;
  max-width: none;
  display: grid;
  place-items: center;
  padding: 92px 24px 40px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px), var(--bg);
  background-size: 64px 64px;
}
.tournament-loading__panel {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--panel) 94%, transparent);
  padding: 40px;
  text-align: center;
}
.tournament-loading__panel > img {
  display: block;
  width: 180px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 28px;
}
.tournament-loading__eyebrow {
  margin: 18px 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tournament-loading__panel h1 {
  letter-spacing: 0;
}
.tournament-loading__panel .sub {
  margin: 12px auto 0;
}
.tournament-loading__signal {
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 8px;
}
.tournament-loading__signal span {
  width: 32px;
  height: 4px;
  background: var(--line);
  animation: tournament-loading-pulse 1.2s ease-in-out infinite;
}
.tournament-loading__signal span:nth-child(2) {
  animation-delay: 0.14s;
}
.tournament-loading__signal span:nth-child(3) {
  animation-delay: 0.28s;
}
.tournament-loading__error .primary {
  margin-top: 24px;
}
.player-list-loading {
  display: grid;
  place-items: center;
  min-height: 240px;
  text-align: center;
}
body:has(.tournament-loading) > .display-preferences {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 5;
}
@keyframes tournament-loading-pulse {
  0%,
  100% {
    background: var(--line);
    transform: scaleX(0.72);
  }
  50% {
    background: var(--cyan);
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tournament-loading__signal span {
    animation: none;
    background: var(--cyan);
  }
}
@media (max-width: 520px) {
  .tournament-loading {
    padding: 76px 16px 24px;
  }
  .tournament-loading__panel {
    padding: 30px 22px;
  }
  .tournament-loading__panel > img {
    width: 145px;
  }
  body:has(.tournament-loading) > .display-preferences {
    top: 16px;
    right: 16px;
  }
}
/* Advertising choices stay outside the frequently rerendered application shell. */
.tournament-ads-preferences { position: fixed; inset: auto 0 0; z-index: 1000; padding: 16px 24px; background: #071422; border-top: 1px solid #375164; max-height: 60dvh; overflow: auto; }
.tournament-ads-preferences p { max-width: 760px; margin: 0 0 12px; }
.tournament-ads-cookie { position: fixed; bottom: 12px; left: 12px; z-index: 40; font-size: 12px; padding: 6px 10px; }
