:root {
  color-scheme: dark;
  --bg: #020711;
  --panel: #071321;
  --muted: #8aa8bc;
  --text: #f2f8ff;
  --accent: #27d7ff;
  --pink: #ff35bd;
  --blue: #197cff;
  --line: #174768;
  --mint: #55e5ff;
}
html {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -5%, #0f548055 0, transparent 34%),
    radial-gradient(circle at 96% 24%, #ff20b01f 0, transparent 29%),
    radial-gradient(circle at 2% 55%, #006dff21 0, transparent 32%),
    linear-gradient(180deg, #030b17 0, #020711 58%, #050716 100%);
  color: var(--text);
  font:
    15px/1.5 system-ui,
    sans-serif;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}
body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background-image: linear-gradient(90deg, #148dd009 1px, transparent 1px);
  background-size: 72px 100%;
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 28%,
    #000 88%,
    transparent
  );
  content: "";
  pointer-events: none;
}
body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    #ffffff05 4px
  );
  content: "";
  opacity: 0.28;
  pointer-events: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: #27d7ff26;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #62e7ff;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  background: var(--accent);
  color: #172525;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 650;
  padding: 11px 17px;
  transition:
    filter 0.15s,
    transform 0.15s;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--accent);
  color: #172525;
  font-weight: 650;
}
.button.secondary {
  border-color: var(--line);
  background: #233a3c;
  color: var(--text);
}
button:hover {
  filter: brightness(1.1);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
button.secondary,
.secondary {
  background: #233a3c;
  border-color: var(--line);
  color: var(--text);
}
button.danger {
  background: #532e2e;
  color: #ffd0bb;
}
input,
select {
  padding: 10px 12px;
  background: #102124;
  color: var(--text);
  border: 1px solid #476260;
  border-radius: 7px;
  width: 100%;
}
label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.6px;
}
h3 {
  font-size: 17px;
}
small,
.muted {
  color: var(--muted);
}
.site-header {
  width: 100%;
  min-height: 150px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px max(28px, calc((100vw - 1440px) / 2 + 28px));
  background: linear-gradient(180deg, #061426ee, #020a15d9 82%, transparent);
  box-shadow: 0 18px 45px #006eff0d;
  backdrop-filter: blur(16px);
}
.wordmark {
  position: relative;
  grid-column: 2;
  width: 210px;
  height: 136px;
  justify-self: center;
  overflow: hidden;
}
.wordmark img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: auto;
  transform: translate(-50%, -50%);
}
.header-context,
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--mint);
  font-weight: 650;
}
.header-context {
  display: none;
}
nav {
  grid-column: 3;
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
  justify-self: end;
}
main {
  max-width: 1280px;
  margin: 38px auto;
  padding: 0 28px;
  min-height: 70vh;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #eafaff;
  color: #03111d;
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 0.15s;
}
.skip-link:focus {
  transform: translateY(0);
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin: 34px 0 46px;
  min-height: 310px;
  padding: 50px 58px;
  border: 1px solid #1ba9ea88;
  background:
    linear-gradient(110deg, #06172bea 0 54%, #140722dc),
    radial-gradient(circle at 70% 50%, #d400a84d, transparent 40%);
  box-shadow:
    inset 0 0 70px #008cff17,
    0 0 32px #006eff1c;
  overflow: hidden;
  position: relative;
}
.hero::before,
.hero::after {
  position: absolute;
  width: 100px;
  height: 100px;
  border-color: var(--pink);
  content: "";
  filter: drop-shadow(0 0 8px var(--pink));
}
.hero::before {
  top: -58px;
  right: 25%;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(45deg);
}
.hero::after {
  bottom: -70px;
  left: 15%;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(45deg);
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-copy h1 {
  margin: 8px 0 0;
  color: #effaff;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(62px, 9vw, 116px);
  font-stretch: condensed;
  letter-spacing: 1px;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow:
    0 3px 0 #176195,
    0 7px 0 #082e50,
    -3px 0 16px #16beff66,
    3px 0 18px #ff2bb455;
}
.hero-copy strong {
  display: block;
  margin-top: 20px;
  color: #d9edff;
  font-size: clamp(18px, 3vw, 34px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-shadow: 0 0 16px #179cff99;
}
.hero p {
  max-width: 470px;
  color: var(--muted);
  position: relative;
  z-index: 1;
  padding: 19px 22px;
  border-left: 2px solid var(--pink);
  background: linear-gradient(90deg, #ff2caf12, transparent);
  letter-spacing: 0.03em;
}
.hero p b {
  display: block;
  margin-bottom: 7px;
  color: #ffd5f2;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 1px;
  display: inline-block;
}
.pill.live {
  color: var(--mint);
  border-color: #649987;
}
.panel {
  background: linear-gradient(130deg, #213638, #182a2c);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.narrow {
  max-width: 460px;
  margin: 60px auto;
}
.stack {
  display: grid;
  gap: 14px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.bracket {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 0 24px;
  align-items: stretch;
}
.bracket-round {
  min-width: 245px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bracket-round h3 {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.bracket-pairs {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
  flex: 1;
}
.match-card {
  display: block;
  background: #1b2e30;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  transition: border-color 0.2s;
}
.match-card:hover {
  border-color: var(--accent);
}
.match-card.live {
  border-color: #76b99e;
  box-shadow: 0 0 25px #8bccad0b;
}
.match-card .team {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  gap: 12px;
}
.match-card small {
  font-size: 10px;
}
.match-card .winner {
  color: var(--accent);
}
.match-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 18px;
}
.match-bar h1 {
  font-size: 30px;
  margin: 6px 0;
}
.timer {
  font:
    600 clamp(30px, 5vw, 54px)/1.1 ui-monospace,
    monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}
.timer-wrap {
  text-align: right;
}
.arena {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 820px;
  margin: auto;
}
.arena.single {
  grid-template-columns: 1fr;
  max-width: 390px;
}
.side-card {
  min-width: 0;
}
.team-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}
.team-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #ffffff0a;
  border-radius: 8px;
  padding: 3px;
}
.team-heading h2 {
  font-size: 20px;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.team-heading small {
  font-size: 11px;
}
.score-line {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 12px;
}
.score-number {
  font-size: 36px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.wins {
  color: var(--accent);
  letter-spacing: 4px;
  font-size: 16px;
}
.board-shell {
  position: relative;
  border: 1px solid #4b6967;
  border-radius: 10px;
  overflow: hidden;
  background: #152527;
  box-shadow: 0 16px 45px #0003;
}
.board-shield {
  position: absolute;
  z-index: 6;
  top: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: 30px auto;
  align-items: center;
  min-width: 58px;
  padding: 4px 8px 4px 4px;
  border: 1px solid #42dcff;
  border-radius: 10px;
  background: #031a30e8;
  color: #ecfcff;
  box-shadow:
    0 0 18px #00c8ff70,
    inset 0 0 12px #00c8ff22;
  font:
    800 14px/1 ui-monospace,
    monospace;
  pointer-events: none;
}
.board-shield[hidden],
.freeze-overlay[hidden] {
  display: none;
}
.board-shield img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.freeze-overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(35deg, transparent 44%, #c9f8ff72 45%, transparent 47%),
    linear-gradient(145deg, transparent 53%, #8eeaff55 54%, transparent 56%),
    radial-gradient(circle at 50% 46%, #0a2d5580, #baf7ff45);
  color: #efffff;
  backdrop-filter: blur(3px) saturate(0.55);
  text-shadow: 0 0 12px #00c8ff;
  pointer-events: none;
}
.freeze-overlay::before {
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(
      118deg,
      transparent 0 36px,
      #d9fbff24 37px 39px,
      transparent 40px 74px
    ),
    repeating-linear-gradient(
      28deg,
      transparent 0 52px,
      #5bdcff20 53px 55px,
      transparent 56px 95px
    );
  content: "";
  transform: rotate(-5deg);
}
.freeze-overlay img {
  position: relative;
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 14px #1bcfff);
}
.freeze-overlay strong,
.freeze-overlay span {
  position: relative;
}
.freeze-overlay strong {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: 2px;
}
.freeze-overlay span {
  margin-top: 5px;
  font:
    800 15px/1 ui-monospace,
    monospace;
}

body.player-page.player-frozen::after {
  position: fixed;
  z-index: 999;
  inset: 0;
  background:
    linear-gradient(32deg, transparent 42%, #d8fbff4a 43%, transparent 44%),
    linear-gradient(148deg, transparent 58%, #65ddff42 59%, transparent 60%),
    radial-gradient(circle at 50% 48%, #86eaff18, #d7fbff4c);
  backdrop-filter: blur(2px) saturate(0.55);
  content: "";
  pointer-events: none;
}
@media (max-width: 760px) {
  .board-shield {
    top: 6px;
    right: 6px;
    grid-template-columns: 22px auto;
    min-width: 44px;
    padding: 3px 6px 3px 3px;
    border-radius: 7px;
    font-size: 11px;
  }
  .board-shield img {
    width: 22px;
    height: 22px;
  }
  .freeze-overlay img {
    width: 44px;
    height: 44px;
  }
  .freeze-overlay strong {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .freeze-overlay span {
    font-size: 11px;
  }
}
.board {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.cover {
  position: absolute;
  inset: 0;
  background: #0e2021de;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.cover[hidden] {
  display: none;
}
.cover strong {
  font-size: 27px;
}
.cover .count {
  font-size: 80px;
  color: var(--accent);
}
.side-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  margin: 10px 0;
}
.effect-badges {
  min-height: 32px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.effect-badges span {
  background: #3d4939;
  color: #d1eab1;
  border: 1px solid #5a7252;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
}
.support {
  max-width: 820px;
  margin: 30px auto;
}
.energy-number {
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
}
.energy-meter {
  height: 5px;
  background: #0c1c1e;
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0 18px;
}
.energy-meter i {
  height: 100%;
  display: block;
  width: 0;
  background: var(--accent);
}
.effect-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.effect-button {
  text-align: left;
  background: #263d3e;
  color: var(--text);
  border: 1px solid #4b6361;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.effect-button .symbol {
  font-size: 27px;
  color: var(--mint);
}
.effect-button small {
  font-size: 11px;
  font-weight: 400;
  min-height: 34px;
}
.effect-button.attack .symbol {
  color: var(--accent);
}
.feed {
  margin: 0;
  padding: 0;
  list-style: none;
}
.feed li {
  padding: 9px 0;
  border-bottom: 1px solid #354c4d80;
  font-size: 12px;
  color: var(--muted);
}
.feed li:last-child {
  border: 0;
}
.support-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  max-width: 820px;
  margin: auto;
}
.support-grid .panel {
  padding: 20px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.player-tools {
  max-width: 390px;
  margin: 18px auto;
  text-align: center;
}
.player-tools kbd {
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--text);
}
.next-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.next-area canvas {
  image-rendering: pixelated;
  width: 100px;
  height: 62px;
}
.connection {
  font-size: 11px;
  color: var(--mint);
}
.connection.offline {
  color: #ffb49e;
}
.admin-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}
.admin-tools .row select {
  width: auto;
  min-width: 120px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 28px;
}
.admin-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}
.admin-sidebar {
  align-self: start;
  position: sticky;
  top: 20px;
  padding: 18px;
}
.admin-list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.admin-list-heading small {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.admin-match-list {
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  margin: 0 -5px;
  padding: 0 5px 5px;
}
.admin-tournament-group {
  display: grid;
  gap: 7px;
}
.admin-tournament-group h3 {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.admin-match-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #132527;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.admin-match-item:hover {
  border-color: #5a7472;
}
.admin-match-item.selected {
  border-color: var(--accent);
  background: #263839;
  box-shadow: 0 0 0 1px #f7a06422;
}
.admin-match-open {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.admin-match-open:hover {
  filter: none;
}
.admin-match-open span {
  color: var(--mint);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.admin-match-open strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-match-open strong i {
  color: var(--accent);
  font-style: normal;
  font-weight: 400;
}
.admin-match-open small {
  font-size: 10px;
}
.admin-match-delete {
  width: 34px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #bd8b80;
  font-size: 18px;
  font-weight: 400;
}
.admin-match-delete:hover {
  background: #522f2f;
  color: #ffd0bb;
}
.admin-match-delete:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.admin-match-delete:disabled:hover {
  background: transparent;
  color: #bd8b80;
}
.admin-public-link {
  display: block;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--mint);
  font-size: 12px;
}
.admin-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.admin-empty-state {
  min-height: 240px;
  display: grid;
  align-content: center;
  text-align: center;
}
.admin-match-heading {
  margin: 4px 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.admin-match-heading h1 {
  margin: 5px 0 0;
  font-size: clamp(30px, 4vw, 48px);
}
.admin-match-bar {
  margin-top: 24px;
}
.admin-main .arena {
  max-width: 620px;
  gap: 20px;
}
.admin-main .score-number {
  font-size: 28px;
}
.admin-main .team-heading h2 {
  font-size: 16px;
}
.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.brand-editor {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
}
.brand-editor input[type="color"] {
  height: 39px;
  padding: 4px;
}
.brand-editor input[type="file"] {
  font-size: 11px;
}
.brand-editor > span {
  color: var(--accent);
  font-size: 10px;
}
.link-result {
  word-break: break-all;
  background: #102124;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}
.link-result a {
  text-decoration: underline;
  color: var(--mint);
}
.warning {
  color: #f3c096;
  font-size: 12px;
}
.hidden,
[hidden] {
  display: none !important;
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: #f2dcc6;
  color: #182b2d;
  border-radius: 10px;
  padding: 14px 22px;
  box-shadow: 0 5px 35px #0005;
  z-index: 50;
  display: none;
}
#notice.show {
  display: block;
}
footer {
  max-width: 1280px;
  padding: 24px 28px;
  margin: 40px auto 0;
  border-top: 0;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 0;
}
.danger-zone {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 10px;
}
.danger-zone button {
  font-size: 12px;
}
.timer-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.admin-page-header,
.match-admin-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.admin-page-header h1,
.match-admin-top h1 {
  margin: 7px 0 5px;
  font-size: clamp(30px, 4vw, 46px);
}
.admin-page-header .admin-page-actions {
  margin: 0;
}
.back-link {
  display: block;
  margin-bottom: 12px;
  color: var(--mint);
  font-size: 12px;
}
.tournament-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 430px));
  gap: 18px;
}
.tournament-admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #213638, #162729);
}
.tournament-admin-open {
  display: block;
  min-height: 190px;
  padding: 22px;
}
.tournament-admin-open:hover h2,
.admin-match-card:hover small {
  color: var(--accent);
}
.tournament-admin-open h2 {
  margin: 10px 0 22px;
  transition: color 0.15s;
}
.tournament-stats {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}
.tournament-stats b {
  display: block;
  color: var(--text);
  font-size: 20px;
}
.tournament-stats .live-text b {
  color: var(--mint);
}
.open-label {
  display: block;
  margin-top: 22px;
  color: var(--mint);
  font-size: 12px;
}
.tournament-admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.tournament-delete {
  padding: 7px 10px;
  border-color: #70453f;
  background: transparent;
  color: #e9a595;
  font-size: 11px;
}
.admin-rounds {
  display: grid;
  gap: 30px;
}
.admin-round h2 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.admin-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
}
.admin-match-card {
  display: grid;
  gap: 8px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #17292b;
}
.admin-match-card:hover,
.admin-match-card.live {
  border-color: #739c91;
}
.admin-match-meta,
.admin-match-team {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.admin-match-meta {
  color: var(--mint);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.admin-match-team {
  padding: 6px 0;
  border-bottom: 1px solid #354c4d80;
  font-weight: 650;
}
.admin-match-card small {
  margin-top: 5px;
  transition: color 0.15s;
}
.create-tournament {
  max-width: 820px;
  margin: 18px auto;
}
.create-tournament h1 {
  font-size: clamp(30px, 4vw, 46px);
}
.match-admin-top {
  align-items: flex-end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.match-admin-top .eyebrow {
  display: block;
  margin-top: 8px;
}
.match-admin-top h1 {
  font-size: clamp(26px, 3vw, 38px);
}
.match-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(290px, 340px);
  gap: 24px;
  align-items: start;
}
.match-admin-stage .arena {
  max-width: none;
  gap: 18px;
}
.match-admin-stage .support-grid {
  max-width: none;
  margin-top: 22px;
}
.admin-match-bar {
  margin: 0 0 16px;
  padding: 0 2px;
}
.admin-match-bar .timer {
  font-size: 42px;
}
.admin-brand-heading {
  min-height: 88px;
  text-align: center;
}
.admin-team-logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  object-fit: contain;
}
.admin-brand-heading strong {
  display: block;
  margin: 7px 0 12px;
  font-size: 13px;
}
.admin-side-card .score-number {
  font-size: 30px;
}
.match-controls {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 0;
  padding: 18px;
}
.match-controls > section {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.match-controls > section:first-child {
  padding-top: 0;
}
.match-controls > section:last-child {
  border-bottom: 0;
}
.control-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.control-grid,
.invite-grid,
.winner-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.control-start {
  grid-column: 1 / -1;
}
.match-controls button {
  padding: 9px 11px;
  font-size: 12px;
}
.match-controls .wide {
  width: 100%;
}
.compact-stack {
  gap: 8px;
}
.match-controls .link-result {
  margin-top: 8px;
  padding: 9px;
  font-size: 10px;
}
/* Tournament broadcast theme inspired by the event poster. */
h1,
h2,
h3 {
  font-family: "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
}
.eyebrow {
  color: var(--accent);
  text-shadow: 0 0 10px #17ceff99;
}
button,
.button {
  border-color: #4fe7ff88;
  border-radius: 3px;
  background: linear-gradient(135deg, #43e5ff, #138ecf);
  box-shadow:
    inset 0 0 12px #ffffff32,
    0 0 14px #11bbef25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
button.secondary,
.secondary,
.button.secondary {
  border-color: #235d82;
  background: linear-gradient(135deg, #0b2034, #081625);
  color: #ddecf8;
  box-shadow: inset 0 0 18px #008cff0c;
}
button.danger,
.tournament-delete {
  border-color: #c42f8e88;
  background: linear-gradient(135deg, #43132f, #200d24);
  color: #ffb9e5;
  box-shadow: inset 0 0 16px #ff2aae12;
}
input,
select {
  border-color: #17547b;
  border-radius: 2px;
  background: #020c18;
  box-shadow: inset 0 0 16px #006bba10;
}
.panel {
  border-color: #145a82;
  border-radius: 4px;
  background:
    linear-gradient(135deg, #0a1b2cfa, #060d1afa),
    radial-gradient(circle at 100% 0, #fa22b715, transparent 35%);
  box-shadow:
    inset 0 0 36px #007fd80c,
    0 12px 45px #0008;
}
.pill {
  border-color: #168bb9;
  border-radius: 2px;
  background: #031321bb;
  box-shadow: 0 0 14px #05bcff1c;
  color: #a8ecff;
  text-transform: uppercase;
}
.pill.live {
  border-color: var(--pink);
  color: #ffc1e9;
  box-shadow: 0 0 16px #ff2db744;
}
.bracket {
  gap: 28px;
  padding: 22px 6px 34px;
}
.bracket-round {
  min-width: 255px;
  padding: 16px 12px;
  border-top: 1px solid #147bae55;
  background: linear-gradient(180deg, #07172880, transparent 80%);
}
.bracket-round h3 {
  color: #83dfff;
  text-shadow: 0 0 10px #12bdfd55;
}
.match-card {
  position: relative;
  border-color: #17678f;
  border-radius: 2px;
  background: linear-gradient(135deg, #081828, #040b15);
  box-shadow:
    inset 0 0 24px #009cff0b,
    0 0 15px #008fd116;
}
.match-card::before,
.admin-match-card::before,
.tournament-admin-card::before {
  position: absolute;
  top: 0;
  left: 12px;
  width: 42px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
  content: "";
}
.match-card:nth-child(even)::before,
.admin-match-card:nth-child(even)::before {
  background: var(--pink);
  box-shadow: 0 0 9px var(--pink);
}
.match-card:hover,
.match-card.live {
  border-color: #35dbff;
  box-shadow: 0 0 22px #16cfff2f;
}
.match-card .winner {
  color: #ff7bd0;
  text-shadow: 0 0 8px #ff2cb866;
}
.match-bar {
  padding-bottom: 14px;
  border-bottom: 1px solid #13577c;
}
.timer,
.score-number {
  color: #f5fbff;
  text-shadow:
    0 0 10px #39dfff66,
    2px 0 9px #ff39bd22;
}
.wins {
  color: var(--pink);
  text-shadow: 0 0 10px #ff2eb877;
}
.team-logo,
.admin-team-logo {
  background: #02081299;
  filter: drop-shadow(0 0 7px #28cfff55);
}
.board-shell {
  border-color: #1a91c1;
  border-radius: 2px;
  background:
    linear-gradient(#06111d, #020812),
    repeating-linear-gradient(0deg, transparent 0 35px, #168ac409 36px);
  box-shadow:
    inset 0 0 28px #007eca18,
    0 0 20px #08bfff1b;
}
.side-card:nth-child(2) .board-shell {
  border-color: #a62f88;
  box-shadow:
    inset 0 0 28px #c9008614,
    0 0 20px #ff25b21b;
}
.cover {
  background: #020a16e8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cover strong {
  color: #bdd8e9;
  font-size: 18px;
  text-shadow: 0 0 12px #31d8ff55;
}
.effect-badges span {
  border-color: #3857a0;
  border-radius: 2px;
  background: #111947;
  color: #bfd9ff;
}
.effect-button {
  border-color: #145b7f;
  border-radius: 2px;
  background: linear-gradient(145deg, #0a2236, #07111e);
  box-shadow: inset 0 0 22px #008ed414;
}
.effect-button.attack {
  border-color: #702b66;
  background: linear-gradient(145deg, #281027, #0c0d1a);
}
.energy-meter {
  background: #020814;
}
.energy-meter i {
  background: linear-gradient(90deg, var(--accent), var(--pink));
  box-shadow: 0 0 12px var(--pink);
}
.feed li,
.history-row,
.danger-zone {
  border-color: #123c59;
}
.tournament-admin-card,
.admin-match-card {
  position: relative;
  border-color: #155e87;
  border-radius: 3px;
  background: linear-gradient(140deg, #0a1d30, #050b16);
  box-shadow:
    inset 0 0 28px #0068ab10,
    0 12px 35px #0007;
}
.tournament-admin-card:nth-child(even)::before {
  background: var(--pink);
  box-shadow: 0 0 9px var(--pink);
}
.tournament-admin-footer {
  border-color: #114467;
  background: #030b16aa;
}
.admin-match-card:hover,
.admin-match-card.live {
  border-color: #27cbf8;
  box-shadow: 0 0 20px #13c9fc22;
}
.admin-round h2 {
  color: #82dbf7;
  text-shadow: 0 0 9px #18c9ff44;
}
.match-admin-top {
  border-color: #14658c;
}
.match-controls {
  border-color: #236d91;
  box-shadow:
    inset 0 0 35px #006cb31c,
    -10px 0 35px #0079bd10;
}
.match-controls > section {
  border-color: #164662;
}
.control-label {
  color: #79d8f5;
  text-shadow: 0 0 8px #1acfff55;
}
.connection {
  color: #58e7ff;
  text-shadow: 0 0 8px #17caff66;
}
.link-result {
  border-color: #17608a;
  border-radius: 2px;
  background: #020b17;
}
#notice {
  border: 1px solid #50dcff;
  border-radius: 2px;
  background: #061426;
  box-shadow: 0 0 25px #10cfff55;
  color: #e8f8ff;
}
footer {
  border-color: transparent;
}
.hero,
.panel,
.match-card,
.board-shell,
.tournament-admin-card,
.admin-match-card {
  border-radius: 10px;
}
.public-home .wordmark {
  visibility: hidden;
  height: 42px;
}
.public-home .site-header {
  min-height: 74px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.public-home main {
  max-width: 1380px;
  margin-top: 20px;
}
.public-dashboard {
  display: grid;
  grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.55fr);
  gap: 20px;
  align-items: start;
}
.public-home .hero {
  display: flex;
  min-height: min(650px, calc(100vh - 118px));
  margin: 0;
  padding: 20px 18px 26px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  border: 1px solid #176589;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 36%, #0d69a94d, transparent 38%),
    radial-gradient(circle at 75% 52%, #dd159a21, transparent 34%),
    linear-gradient(180deg, #061425f2, #030914f7);
  box-shadow:
    inset 0 0 90px #008cff16,
    0 24px 65px #0009;
}
.public-home .hero::before,
.public-home .hero::after {
  display: none;
}
.hero-logo {
  z-index: 1;
  display: block;
  width: min(520px, 100%);
  max-width: 100%;
  height: auto;
  margin: 0;
  filter: drop-shadow(0 0 22px #078cff62);
}
.hero-message {
  z-index: 2;
  display: flex;
  width: 92%;
  padding: 14px 16px;
  border: 1px solid #a93b90;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: #050d1bd9;
  box-shadow:
    0 0 20px #ff25af1b,
    inset 0 0 18px #057ec31c;
  text-align: center;
}
.hero-message strong {
  color: #ffe1f4;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-message span {
  color: #9bb5c8;
  font-size: 11px;
}
.public-home #brackets > section {
  min-height: min(650px, calc(100vh - 118px));
  padding: 20px;
  border: 1px solid #174d6d;
  border-radius: 18px;
  background: linear-gradient(180deg, #071523dd, #030a14e8);
  box-shadow: 0 18px 50px #0007;
}
.public-home #brackets {
  display: grid;
  gap: 20px;
}
.public-home .bracket {
  gap: 10px;
  padding: 10px 0 0;
}
.public-home .bracket-round {
  min-width: 0;
  padding: 12px;
  border: 1px solid #123f5b;
  border-radius: 12px;
  background: #06111dcc;
}
.public-home .match-card,
.public-home .panel {
  border-radius: 9px;
}
.public-home .match-card {
  overflow: hidden;
  padding: 10px;
}
.public-home .match-card .team {
  padding: 4px 0;
  font-size: 12px;
}
.public-home .match-card small {
  font-size: 8px;
}
.public-home .bracket-pairs {
  gap: 9px;
}
@media (min-width: 1000px) {
  .arena.single .board {
    max-height: 60vh;
    width: auto;
    max-width: 100%;
    margin: auto;
  }
  .arena.single .board-shell {
    width: fit-content;
    margin: auto;
  }
  .arena.single {
    max-width: 370px;
  }
}

/* Site header */
.site-header,
.spectator-page .site-header,
.admin-match-page .site-header,
.public-home .site-header {
  display: block;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid #15547a;
  background: linear-gradient(180deg, #06172aec, #03101ee8);
  box-shadow: 0 12px 38px #0006;
}
.site-header-inner {
  display: grid;
  grid-template-columns: 190px auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  width: 100%;
  max-width: 1780px;
  min-height: 94px;
  margin: 0 auto;
  padding: 8px 22px;
}
.wordmark,
.spectator-page .wordmark,
.admin-match-page .wordmark,
.public-home .wordmark {
  position: relative;
  grid-column: auto;
  justify-self: start;
  visibility: visible;
  width: 180px;
  height: 76px;
  overflow: hidden;
}
.wordmark img,
.spectator-page .wordmark img,
.admin-match-page .wordmark img,
.public-home .wordmark img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 166px;
  height: auto;
  transform: translate(-50%, -50%);
}
.site-header nav {
  grid-column: auto;
  justify-self: start;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 38px;
  font-size: 12px;
  text-transform: none;
}
.site-header nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: #a9bfd0;
  font-weight: 600;
}
.site-header nav a:hover,
.site-header nav a.active {
  color: #f0faff;
}
.site-header nav a.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  box-shadow: 0 0 10px #22d9ff;
  content: "";
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.header-actions:empty {
  display: none;
}
.header-actions > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 39px;
  padding: 7px 13px;
  border: 1px solid #144a6b;
  border-radius: 9px;
  background: #071626e8;
  color: #b9d1e2;
  font-size: 10px;
  white-space: nowrap;
}
.header-actions img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}
.header-actions .live-chip {
  border-color: #8d256c;
  background: linear-gradient(180deg, #481236, #250b23);
  color: #ff89d4;
  font-weight: 800;
  box-shadow: inset 0 0 14px #ff35bd26;
}
.header-actions .live-chip.inactive {
  border-color: #334c60;
  background: #0a1724;
  color: #7890a4;
  box-shadow: none;
}

@media (max-width: 760px) {
  .site-header-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 7px 12px 11px;
  }
  .wordmark,
  .spectator-page .wordmark,
  .admin-match-page .wordmark,
  .public-home .wordmark {
    justify-self: center;
    width: 150px;
    height: 76px;
  }
  .wordmark img,
  .spectator-page .wordmark img,
  .admin-match-page .wordmark img,
  .public-home .wordmark img {
    width: 140px;
  }
  .site-header nav {
    justify-self: center;
    gap: 20px;
    min-height: 34px;
    font-size: 10px;
  }
  .header-actions {
    justify-content: center;
    margin-top: 9px;
  }
  .header-actions > span {
    min-height: 31px;
    padding: 4px 8px;
    font-size: 8px;
  }
  .header-actions img {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 850px) {
  .public-dashboard {
    grid-template-columns: 1fr;
  }
  .public-home .hero,
  .public-home #brackets > section {
    min-height: auto;
  }
  .hero-logo {
    width: min(620px, 100%);
    margin: 0;
  }
  .public-home .hero {
    align-items: center;
  }
  .public-home .bracket {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .public-home .bracket-round {
    width: 100%;
  }
  .hero-message {
    flex-direction: column;
    gap: 5px;
  }
  .match-admin-layout {
    grid-template-columns: 1fr;
  }
  .match-controls {
    position: static;
  }
  .admin-page-header,
  .match-admin-top {
    align-items: flex-start;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
  }
  .admin-match-list {
    max-height: 430px;
  }
  .header-context {
    font-size: 9px;
  }
  .hero {
    align-items: start;
  }
  .effect-buttons {
    grid-template-columns: 1fr 1fr;
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
  .arena {
    gap: 14px;
  }
  .team-heading h2 {
    font-size: 16px;
  }
}
@media (max-width: 540px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 8px 16px 14px;
    justify-items: center;
    gap: 0;
  }
  .wordmark {
    grid-column: 1;
    width: 170px;
    height: 126px;
  }
  .wordmark img {
    width: 160px;
  }
  nav {
    display: flex;
    grid-column: 1;
    justify-self: center;
    gap: 18px;
    font-size: 11px;
  }
  .header-context {
    justify-self: end;
    font-size: 10px;
  }
  .admin-page-actions {
    justify-content: stretch;
  }
  .admin-page-actions button,
  .admin-page-actions .button {
    flex: 1;
  }
  .admin-page-header,
  .match-admin-top {
    display: block;
  }
  .admin-page-header .admin-page-actions,
  .match-admin-top .button {
    margin-top: 16px;
  }
  .tournament-admin-grid {
    grid-template-columns: 1fr;
  }
  main {
    padding: 0 14px;
    margin-top: 24px;
  }
  .hero {
    display: block;
    margin: 25px 0;
  }
  .public-home .hero {
    display: flex;
    min-height: 340px;
    margin: 16px 0 28px;
    padding: 16px 10px 24px;
  }
  .hero-logo {
    width: 100%;
    max-width: 440px;
    margin: 0;
  }
  .hero-message {
    width: 94%;
    padding: 12px;
  }
  .public-home #brackets > section {
    padding: 16px;
  }
  .panel {
    padding: 17px;
  }
  .team-logo {
    width: 28px;
    height: 28px;
  }
  .team-heading {
    gap: 5px;
  }
  .team-heading h2 {
    font-size: 13px;
  }
  .team-heading small {
    font-size: 9px;
  }
  .score-number {
    font-size: 27px;
  }
  .wins {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .side-bottom {
    font-size: 9px;
  }
  .match-bar h1 {
    font-size: 23px;
  }
  .brand-grid {
    grid-template-columns: 1fr;
  }
  .cover strong {
    font-size: 17px;
  }
  .effect-badges span {
    font-size: 9px;
  }
  .arena {
    gap: 10px;
  }
  footer {
    padding: 20px 14px;
    display: block;
  }
  footer span {
    display: block;
    margin-top: 8px;
  }
}

/* Live match broadcast and organizer console */
.broadcast-page {
  max-width: 1380px;
  margin: 0 auto;
}
.spectator-page main,
.admin-match-page main {
  max-width: 1480px;
}
.spectator-page .site-header,
.admin-match-page .site-header {
  min-height: 88px;
}
.spectator-page .wordmark,
.admin-match-page .wordmark {
  width: 160px;
  height: 80px;
}
.spectator-page .wordmark img,
.admin-match-page .wordmark img {
  width: 136px;
}
.broadcast-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 32px;
  margin-bottom: 20px;
}
.broadcast-head h1 {
  margin: 8px 0 2px;
  font-size: clamp(25px, 3vw, 40px);
}
.broadcast-clock {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.broadcast-audience {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  align-self: start;
}
.broadcast-audience > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #174768;
  border-radius: 9px;
  background: #061525d9;
  color: var(--muted);
  font-size: 11px;
}
.broadcast-audience img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}
.broadcast-audience .live-chip {
  border-color: #8f246c;
  background: linear-gradient(180deg, #481236, #260b24);
  color: #ff85d2;
  font-weight: 800;
  box-shadow:
    inset 0 0 12px #ff35bd1f,
    0 0 16px #ff35bd1a;
}
.broadcast-audience .live-chip.inactive {
  border-color: #334c60;
  background: #0a1724;
  color: #7890a4;
  box-shadow: none;
}
.broadcast-clock strong,
.admin-round-strip strong {
  color: var(--text);
  font:
    700 clamp(38px, 5vw, 62px)/0.95 ui-monospace,
    monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -3px;
  text-shadow: 0 0 22px #27d7ff48;
}
.broadcast-arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.broadcast-side {
  display: grid;
  grid-template-columns: minmax(128px, 0.58fr) minmax(230px, 1fr);
  grid-template-areas: "identity board";
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 16px;
  border: 1px solid #087db8;
  border-radius: 16px;
  background: linear-gradient(145deg, #071a2bec, #050c17f2);
  box-shadow:
    0 0 26px #00b8ff1a,
    inset 0 0 30px #008cff0b;
}
.broadcast-side.side-b {
  grid-template-columns: minmax(230px, 1fr) minmax(128px, 0.58fr);
  grid-template-areas: "board identity";
  border-color: #b41a81;
  box-shadow:
    0 0 26px #ff35bd1a,
    inset 0 0 30px #ff35bd0b;
}
.broadcast-team {
  grid-area: identity;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}
.broadcast-team-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin-bottom: 10px;
}
.broadcast-team-kicker {
  display: none;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.broadcast-team strong {
  display: block;
  max-width: 100%;
  font-size: clamp(15px, 1.7vw, 22px);
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.broadcast-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}
.broadcast-score b {
  font:
    700 clamp(36px, 5vw, 62px)/1 ui-monospace,
    monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -4px;
  text-shadow: 0 0 18px #27d7ff66;
}
.side-b .broadcast-score b {
  text-shadow: 0 0 18px #ff35bd66;
}
.broadcast-score .wins {
  margin-top: 12px;
  color: var(--accent);
}
.side-b .broadcast-score .wins {
  color: var(--pink);
}
.broadcast-team .effect-badges {
  justify-content: center;
  margin-top: 18px;
}
.broadcast-board {
  grid-area: board;
  min-width: 0;
}
.broadcast-board .board-shell {
  border-color: #00bfff;
  border-radius: 8px;
  box-shadow: 0 0 22px #00bfff3d;
}
.side-b .broadcast-board .board-shell {
  border-color: var(--pink);
  box-shadow: 0 0 22px #ff35bd3d;
}
.broadcast-board .side-bottom {
  margin-bottom: 0;
}
.versus {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 9px;
}
.versus img {
  width: 92px;
  height: 112px;
  margin: -16px -10px -13px;
  object-fit: contain;
  filter: drop-shadow(0 0 11px #287cff66);
}
.spectator-support {
  max-width: none;
  margin: 22px 0 18px;
  padding: 20px;
  border-color: #17618a;
  background: linear-gradient(125deg, #071a2ded, #07101df2 55%, #18091aec);
}
.support-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
  gap: 24px;
  align-items: center;
}
.support-head h2 {
  margin: 3px 0 2px;
}
.support-head p {
  margin: 0;
}
.energy-block {
  min-width: 0;
}
.energy-block > div:first-child {
  text-align: right;
}
.energy-bolt {
  width: 36px;
  height: 36px;
  margin-right: 3px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 7px #00c8ff77);
}
.team-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.effect-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.effect-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid #14506f;
  border-radius: 10px;
  background: #04111ec2;
}
.effect-group h3 {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.attack-group {
  border-color: #65164d;
  background: #160b19c9;
}
.attack-group h3 {
  color: #ff58c6;
}
.effect-group .effect-buttons {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.effect-group .effect-button {
  min-height: 132px;
  padding: 12px;
  background: #071c2b;
  border-color: #12628d;
}
.effect-group .effect-button.attack {
  background: #210d20;
  border-color: #7e205f;
}
.effect-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px #00c8ff66);
  transition: transform 0.15s ease;
}
.effect-button.attack .effect-icon {
  filter: drop-shadow(0 0 6px #ff35bd77);
}
.effect-button:not(:disabled):hover .effect-icon {
  transform: translateY(-2px) scale(1.07);
}
.broadcast-page > .support-grid {
  max-width: none;
}
.live-feed-panel h3,
.round-history-panel h3,
.control-panel h2 {
  display: flex;
  align-items: center;
  gap: 7px;
}
.live-feed-panel h3 img,
.round-history-panel h3 img,
.control-panel h2 img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Desktop organizer layout */
.admin-match-page main {
  margin-top: 24px;
}
.admin-match-page .match-admin-top {
  margin-bottom: 18px;
  padding-bottom: 0;
  border: 0;
}
.admin-match-page .match-admin-top h1 {
  margin-bottom: 0;
}
.admin-match-page .match-admin-layout {
  grid-template-columns: minmax(720px, 1fr) 390px;
  gap: 18px;
}
.admin-round-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  margin-bottom: 12px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #071521db;
}
.admin-round-strip > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-round-strip > div:last-child {
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}
.admin-round-strip strong {
  font-size: 40px;
}
.admin-round-strip #round-label {
  color: var(--muted);
  font-size: 10px;
}
.broadcast-arena-admin {
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  gap: 10px;
}
.broadcast-arena-admin .broadcast-side {
  grid-template-columns: minmax(90px, 0.42fr) minmax(190px, 1fr);
  gap: 10px;
  padding: 10px;
}
.broadcast-arena-admin .broadcast-side.side-b {
  grid-template-columns: minmax(190px, 1fr) minmax(90px, 0.42fr);
}
.broadcast-arena-admin .broadcast-team-logo {
  width: 62px;
  height: 62px;
}
.broadcast-arena-admin .broadcast-team strong {
  font-size: 14px;
}
.broadcast-arena-admin .broadcast-score {
  margin-top: 12px;
}
.broadcast-arena-admin .broadcast-score b {
  font-size: 34px;
}
.broadcast-arena-admin .versus img {
  width: 68px;
  height: 90px;
}
.admin-match-page .match-admin-stage > .support-grid {
  margin-top: 14px;
  gap: 12px;
}
.admin-match-page .support-grid .panel {
  padding: 14px;
}
.admin-match-page .feed li,
.admin-match-page .history-row {
  padding: 6px 0;
}
.admin-match-page .match-controls {
  display: grid;
  gap: 10px;
  padding: 0;
  background: transparent;
}
.control-panel {
  padding: 14px;
}
.control-panel h2 {
  margin: 0 0 12px;
  font-size: 15px;
}
.control-panel .control-grid {
  gap: 8px;
}
.control-panel .control-grid button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  font-size: 12px;
}
.control-panel .control-grid button img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}
.control-panel .control-start {
  background: linear-gradient(180deg, #22dfff, #049bd4);
  box-shadow: 0 0 18px #1bd4ff33;
}
.warning-command {
  border-color: #b56b10;
  background: #3c240e;
  color: #ffd29a;
}
.player-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #17476899;
}
.player-control-row > span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-control-row i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #24df8d;
  box-shadow: 0 0 8px #24df8d;
}
.player-control-row.disconnected i {
  background: #637384;
  box-shadow: none;
}
.player-control-row button {
  padding: 7px 10px;
  font-size: 10px;
}
.control-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
.compact-label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-size: 10px;
}
.compact-label select {
  padding: 7px 9px;
  font-size: 11px;
}
.admin-effect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.admin-effect-button {
  min-width: 0;
  min-height: 75px;
  align-items: center;
  justify-content: center;
  padding: 7px 4px;
  text-align: center;
  background: #071d2b;
  border-color: #12628d;
  font-size: 9px;
}
.admin-effect-button.attack {
  background: #210d20;
  border-color: #7e205f;
}
.admin-effect-button .effect-icon {
  width: 32px;
  height: 32px;
}
.technical-panel details {
  border-top: 1px solid #17476899;
}
.technical-panel .wide {
  margin-top: 10px;
}

.spectator-page button,
.admin-match-page button,
.spectator-page .panel,
.admin-match-page .panel {
  border-radius: 10px;
}
.spectator-page .effect-button,
.admin-match-page .admin-effect-button {
  box-shadow:
    inset 0 0 20px #00a8ff1c,
    0 0 12px #00bfff14;
}
.spectator-page .effect-button.attack,
.admin-match-page .admin-effect-button.attack {
  box-shadow:
    inset 0 0 20px #ff35bd18,
    0 0 12px #ff35bd14;
}
.spectator-page .panel,
.admin-match-page .panel,
.admin-round-strip {
  backdrop-filter: blur(12px);
}
.live-feed-panel h3,
.round-history-panel h3 {
  padding-bottom: 9px;
  border-bottom: 1px solid #165376;
  color: #dff8ff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.feed li {
  position: relative;
  padding-left: 17px;
}
.feed li::before {
  position: absolute;
  top: 14px;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  content: "";
}

@media (max-width: 760px) {
  .spectator-page main {
    margin-top: 14px;
    padding: 0 10px;
  }
  .spectator-page .site-header {
    min-height: auto;
  }
  .spectator-page .wordmark {
    width: 148px;
    height: 92px;
  }
  .spectator-page .wordmark img {
    width: 138px;
  }
  .broadcast-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }
  .broadcast-audience {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 6px;
  }
  .broadcast-audience > span {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 9px;
  }
  .broadcast-audience img {
    width: 21px;
    height: 21px;
  }
  .broadcast-head > div:first-child,
  .broadcast-page,
  .broadcast-board,
  .broadcast-board .board-shell,
  .broadcast-board .board {
    min-width: 0;
    max-width: 100%;
  }
  .broadcast-page {
    width: 100%;
    overflow: hidden;
  }
  .broadcast-head h1 {
    overflow-wrap: anywhere;
  }
  .broadcast-head h1 {
    margin-top: 6px;
    font-size: 19px;
    letter-spacing: -0.7px;
  }
  .broadcast-head .connection {
    display: none;
  }
  .broadcast-clock {
    flex: 0 0 auto;
  }
  .broadcast-clock strong {
    font-size: 32px;
    letter-spacing: -2px;
  }
  .broadcast-clock span {
    max-width: 120px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .broadcast-arena {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }
  .broadcast-arena .versus {
    display: none;
  }
  .broadcast-side,
  .broadcast-side.side-b {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px;
    border-radius: 11px;
    overflow: hidden;
  }
  .broadcast-team {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-areas: "logo name" "score score" "effects effects";
    width: 100%;
    gap: 2px 7px;
    text-align: left;
  }
  .broadcast-team-logo {
    grid-area: logo;
    width: 38px;
    height: 38px;
    margin: 0;
  }
  .broadcast-team > div:nth-of-type(1) {
    grid-area: name;
    align-self: center;
    min-width: 0;
  }
  .broadcast-team strong {
    font-size: 12px;
  }
  .broadcast-score {
    grid-area: score;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 5px;
  }
  .broadcast-score b {
    font-size: 27px;
    letter-spacing: -1px;
  }
  .broadcast-score .wins {
    margin: 0;
    font-size: 11px;
    letter-spacing: 1px;
  }
  .broadcast-team .effect-badges {
    grid-area: effects;
    justify-content: flex-start;
    min-height: 0;
    margin-top: 2px;
  }
  .broadcast-board {
    width: 100%;
  }
  .broadcast-board .board-shell {
    width: 100%;
  }
  .broadcast-board .board {
    width: 100%;
    height: auto;
  }
  .broadcast-board .side-bottom {
    display: grid;
    gap: 2px;
    margin: 6px 0 0;
    font-size: 8px;
  }
  .broadcast-board .cover {
    padding: 8px;
  }
  .broadcast-board .cover strong {
    font-size: 13px;
  }
  .broadcast-board .cover .count {
    font-size: 50px;
  }
  .spectator-support {
    margin-top: 12px;
    padding: 13px;
  }
  .support-head {
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 10px;
  }
  .support-head h2 {
    font-size: 17px;
  }
  .support-head p {
    font-size: 9px;
  }
  .energy-block > div:first-child {
    white-space: nowrap;
  }
  .energy-number,
  .energy-bolt {
    font-size: 26px;
  }
  .team-choice {
    margin: 12px 0;
  }
  .team-choice button {
    padding: 10px 7px;
    font-size: 11px;
  }
  .effect-groups {
    grid-template-columns: 1fr;
  }
  .effect-group .effect-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .effect-group .effect-button {
    min-height: 118px;
  }
  .broadcast-page > .support-grid {
    gap: 10px;
  }
}

@media (max-width: 390px) {
  .broadcast-head .pill {
    font-size: 8px;
  }
  .broadcast-head h1 {
    font-size: 16px;
  }
  .broadcast-clock strong {
    font-size: 28px;
  }
  .broadcast-side,
  .broadcast-side.side-b {
    padding: 6px;
  }
  .broadcast-team {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px 5px;
  }
  .broadcast-team-logo {
    width: 30px;
    height: 30px;
  }
  .broadcast-team strong {
    font-size: 10px;
  }
  .broadcast-score b {
    font-size: 23px;
  }
}

/* Organizer console — follows the approved desktop control layout */
.admin-status-chips {
  display: grid;
  grid-template-columns: 0.78fr 1.2fr 1fr;
  gap: 8px;
}
.admin-status-chips > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #144a6b;
  border-radius: 9px;
  background: #071626e8;
  color: #b9d1e2;
  font-size: 10px;
  white-space: nowrap;
}
.admin-status-chips img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.admin-status-chips .live-chip {
  border-color: #8d256c;
  background: linear-gradient(180deg, #481236, #250b23);
  color: #ff89d4;
  font-weight: 800;
  box-shadow: inset 0 0 14px #ff35bd26;
}
.admin-status-chips .live-chip.inactive {
  border-color: #334c60;
  background: #0a1724;
  color: #7890a4;
  box-shadow: none;
}
.admin-stage-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.82fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}
.admin-stage-head h1 {
  margin: 7px 0 0;
  font-size: clamp(28px, 3vw, 46px);
}
.admin-stage-head .back-link {
  margin-bottom: 8px;
}
.admin-stage-head .admin-round-strip {
  min-height: 84px;
  margin: 0;
  border-color: #17658e;
  box-shadow:
    inset 0 0 22px #008ee91a,
    0 0 18px #00bfff10;
}
.exact-controls {
  grid-template-columns: 1fr 1fr;
}
.exact-controls .control-start {
  grid-column: 1 / -1;
  min-height: 55px;
  font-size: 14px;
}
.exact-controls .finish-match {
  border-color: #c52e69;
  background: linear-gradient(180deg, #48102a, #260b1c);
  color: #ffc5dc;
}
.players-panel .player-control-row {
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  min-height: 58px;
  padding: 7px 0;
}
.admin-player-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.player-control-row > strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-online {
  color: #23df8d;
  font-size: 9px;
  white-space: nowrap;
}
.admin-online b {
  font-weight: 600;
}
.player-control-row.disconnected .admin-online {
  color: #78899a;
}
.effects-control-panel {
  padding-bottom: 12px;
}
.admin-effect-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  border: 1px solid #125477;
  border-radius: 8px;
  overflow: hidden;
  background: #051522;
}
.admin-effect-row + .admin-effect-row {
  margin-top: 7px;
}
.admin-effect-row > strong {
  display: flex;
  align-items: center;
  padding: 8px;
  color: #35d9ff;
  font-size: 9px;
  line-height: 1.2;
}
.admin-effect-row > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-quick-effect {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 76px;
  padding: 5px 3px;
  border: 0;
  border-left: 1px solid #125477;
  border-radius: 0;
  background: linear-gradient(180deg, #082337, #061521);
  color: #eaf8ff;
  box-shadow: inset 0 0 15px #00bfff10;
  font-size: 8px;
  line-height: 1.15;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
}
.admin-quick-effect img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.admin-effect-row.attack {
  border-color: #722059;
  background: #160d19;
}
.admin-effect-row.attack > strong {
  color: #ff5fc8;
}
.admin-effect-row.attack .admin-quick-effect {
  border-color: #722059;
  background: linear-gradient(180deg, #2b1028, #160c18);
  box-shadow: inset 0 0 15px #ff35bd10;
}
.state-switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.state-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 24px;
  gap: 6px;
  align-items: center;
  min-height: 39px;
  padding: 7px 8px;
  border-color: #174e70;
  background: #071827;
  color: #adc5d7;
  font-size: 8px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}
.state-switch i {
  position: relative;
  display: block;
  width: 28px;
  height: 15px;
  border-radius: 20px;
  background: #40596e;
}
.state-switch i::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #a9bdcc;
  content: "";
  transition: transform 0.15s ease;
}
.state-switch[aria-pressed="true"] i {
  background: #09aee4;
  box-shadow: 0 0 8px #00c8ff55;
}
.state-switch[aria-pressed="true"] i::after {
  background: #edfbff;
  transform: translateX(13px);
}
.state-switch b {
  color: #839caf;
  font-size: 8px;
}
.state-switch[aria-pressed="true"] b {
  color: #2cdbff;
}
.technical-panel details {
  margin: 0;
}
.technical-panel details summary {
  position: relative;
  padding: 9px 20px 9px 8px;
  list-style: none;
}
.technical-panel details summary::-webkit-details-marker {
  display: none;
}
.technical-panel details summary::after {
  position: absolute;
  top: 8px;
  right: 6px;
  content: "⌄";
}
.technical-panel details[open] summary::after {
  transform: rotate(180deg);
}
.technical-panel .export-button {
  margin-top: 10px;
}
.effect-target-dialog {
  width: min(430px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid #1cbce9;
  border-radius: 12px;
  background: #061321;
  color: var(--text);
  box-shadow: 0 0 45px #00bfff3d;
}
.effect-target-dialog::backdrop {
  background: #01050bd9;
  backdrop-filter: blur(5px);
}
.effect-target-dialog form > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 16px 0 10px;
}
.effect-target-dialog .attack-target {
  border-color: #b72b83;
  background: linear-gradient(180deg, #5b1745, #2a0c25);
  color: #ffe6f6;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #165376;
}
.panel-heading h3 {
  margin: 0;
  padding: 0;
  border: 0;
}
.panel-heading select {
  width: auto;
  min-width: 122px;
  padding: 7px 28px 7px 9px;
  font-size: 9px;
}
.admin-feed li {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0 7px 17px;
}
.admin-feed li time {
  color: #8ba6b8;
  font-variant-numeric: tabular-nums;
}
.history-table-head,
.admin-history .history-row {
  display: grid;
  grid-template-columns: 0.65fr 0.8fr 1.4fr 0.9fr;
  gap: 8px;
  align-items: center;
}
.history-table-head {
  padding: 5px 7px 8px;
  color: #829cae;
  font-size: 8px;
}
.admin-history .history-row {
  padding: 7px;
  color: #a8c0d0;
  font-size: 9px;
}
.admin-history .history-row strong {
  color: #eef9ff;
  font-variant-numeric: tabular-nums;
}
.admin-history .history-row b {
  color: #91a7b6;
  font-weight: 500;
}
.admin-history .history-row.current {
  border: 1px solid #13a9da;
  border-radius: 5px;
  background: #06314b;
  color: #3be0ff;
  box-shadow: inset 0 0 16px #00bfff14;
}
.admin-history .history-row.current b {
  color: #eafaff;
  font-weight: 700;
}

@media (min-width: 1000px) {
  .admin-match-page main {
    max-width: 1780px;
    margin-top: 18px;
    padding: 0 22px;
  }
  .admin-match-page .match-admin-layout {
    grid-template-columns: minmax(720px, 1fr) 520px;
    gap: 18px;
  }
  .admin-match-page .match-controls {
    position: static;
    top: auto;
    gap: 9px;
  }
  .admin-match-page .control-panel {
    padding: 12px 14px;
  }
  .admin-match-page .control-panel h2 {
    margin-bottom: 9px;
    font-size: 13px;
  }
}
