@font-face {
  font-family: "Aderian UI";
  src: url("assets/fonts/inter-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Aderian UI";
  src: url("assets/fonts/inter-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Aderian UI";
  src: url("assets/fonts/inter-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #020630;
  --ink-2: #07104b;
  --ink-3: #101b67;
  --paper: #ffffff;
  --paper-2: #ffffff;
  --muted: #b4bee9;
  --line: rgba(255, 255, 255, 0.13);
  --orange: #081ff0;
  --orange-dark: #081ff0;
  --aqua: #d2dafa;
  --yellow: #00c4a6;
  --danger: #ee7b79;
  --brand-blue: #081ff0;
  --brand-blue-mid: #7082e8;
  --brand-blue-pale: #d2dafa;
  --brand-navy: #020630;
  --brand-green: #00c4a6;
  --brand-coral: #ee7b79;
  --font-sans: "Aderian UI", Inter, Arial, sans-serif;
  --font-display: "Aderian Sans Display 465", "Aderian UI", Arial, sans-serif;
  --shadow: 0 30px 90px rgba(0, 0, 35, 0.36);
  --radius: 18px;
  --round-gap: 34px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  min-height: 100%;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 83% 5%, rgba(57, 225, 192, 0.1), transparent 24rem),
    radial-gradient(circle at 10% 35%, rgba(255, 93, 48, 0.12), transparent 28rem),
    var(--ink);
  font-family: var(--font-sans);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255, 255, 255, 0.012) 4px),
    linear-gradient(90deg, transparent 49.8%, rgba(255, 255, 255, 0.018) 50%, transparent 50.2%);
  background-size: auto, 120px 100%;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 16px clamp(22px, 4vw, 68px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 29, 43, 0.8);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand,
.signup-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.13em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--aqua);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.29em;
}

.paddle-mark {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 42px;
  transform: rotate(-32deg);
}

.paddle-mark::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: inset -7px -5px 0 rgba(0, 0, 0, 0.13);
}

.paddle-mark::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 29px;
  width: 8px;
  height: 15px;
  border-radius: 0 0 5px 5px;
  background: var(--paper);
}

.paddle-mark i {
  position: absolute;
  z-index: 2;
  top: -2px;
  right: -7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 3px var(--ink);
}

.paddle-mark-small {
  transform: scale(0.8) rotate(-32deg);
  transform-origin: center;
}

.topbar-actions,
.admin-toolbar-actions,
.modal-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.connection-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px currentColor;
}

.connection-badge.online i {
  background: var(--aqua);
}

.connection-badge.offline i {
  background: var(--orange);
}

.button,
.icon-button {
  border: 0;
  cursor: pointer;
  font-weight: 850;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button:focus-visible,
.icon-button:focus-visible,
input:focus-visible,
select:focus-visible,
.view-tabs button:focus-visible {
  outline: 3px solid rgba(57, 225, 192, 0.45);
  outline-offset: 2px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.button {
  min-height: 46px;
  padding: 0 19px;
  border-radius: 999px;
}

.button-small {
  min-height: 38px;
  padding-inline: 15px;
  font-size: 13px;
}

.button-wide {
  width: 100%;
  justify-content: space-between;
}

.button-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 8px 28px rgba(255, 93, 48, 0.25);
}

.button-accent:hover {
  background: #ff7048;
}

.button-ghost {
  color: var(--paper);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.button-danger {
  color: #ffaaa8;
  border: 1px solid rgba(255, 107, 104, 0.28);
  background: rgba(255, 107, 104, 0.08);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 410px);
  gap: clamp(32px, 8vw, 130px);
  min-height: min(660px, calc(100vh - 88px));
  padding: clamp(48px, 6.5vw, 100px) clamp(22px, 6.5vw, 110px);
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  right: -5vw;
  top: 50%;
  width: min(45vw, 650px);
  height: min(45vw, 650px);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.018),
    0 0 0 150px rgba(255, 255, 255, 0.012);
}

.hero-copy,
.qr-card {
  position: relative;
  z-index: 1;
}

.eyebrow,
.modal-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 19px;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 5px rgba(57, 225, 192, 0.12), 0 0 17px var(--aqua);
}

.live-dot.complete {
  background: var(--brand-green);
}

.hero-copy h1,
.signup-card h1 {
  max-width: 850px;
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(62px, 8.6vw, 138px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero-copy h1 em,
.signup-card h1 em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 2px var(--orange);
  text-stroke: 2px var(--orange);
}

.hero-subtitle {
  max-width: 640px;
  margin: 27px 0 0;
  color: #b8c5c9;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.55;
}

.hero-stats {
  display: flex;
  gap: clamp(26px, 4vw, 58px);
  margin: 40px 0 32px;
}

.hero-stats div {
  display: grid;
  gap: 4px;
}

.hero-stats strong {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qr-card {
  justify-self: end;
  width: min(100%, 380px);
  padding: 18px;
  border-radius: 28px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: none;
}

.qr-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -18px 14px 18px -18px;
  border: 1px solid rgba(57, 225, 192, 0.32);
  border-radius: 30px;
  display: none;
  transform: none;
}

.qr-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.step-number {
  color: var(--orange-dark);
}

.qr-code {
  display: grid;
  min-height: 300px;
  padding: 18px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background:
    linear-gradient(45deg, rgba(7, 29, 43, 0.035) 25%, transparent 25%, transparent 75%, rgba(7, 29, 43, 0.035) 75%),
    var(--paper-2);
  background-size: 10px 10px;
}

.qr-code img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  image-rendering: pixelated;
}

.qr-unavailable {
  padding: 28px;
  text-align: center;
}

.qr-unavailable strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.qr-unavailable span {
  display: block;
  color: #45606a;
  font-size: 13px;
  line-height: 1.5;
}

.qr-card-bottom {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 6px 3px;
}

.qr-card-bottom strong,
.qr-card-bottom small {
  display: block;
}

.qr-card-bottom strong {
  font-size: 13px;
}

.qr-card-bottom small {
  overflow: hidden;
  max-width: 270px;
  margin-top: 3px;
  color: #536b73;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ball-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: inset -5px -5px 0 rgba(0, 0, 0, 0.12);
}

.dashboard-section {
  min-height: 620px;
  padding: 0 clamp(16px, 4vw, 68px) 80px;
  border-top: 1px solid var(--line);
  background: rgba(4, 20, 31, 0.56);
}

.view-tabs {
  display: flex;
  gap: 34px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.view-tabs::-webkit-scrollbar {
  display: none;
}

.view-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 66px;
  padding: 0;
  border: 0;
  color: #79909a;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.view-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.view-tabs button.active {
  color: var(--paper);
}

.view-tabs button.active::after {
  background: var(--orange);
}

.view-tabs button span {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  margin-left: 6px;
  place-items: center;
  border-radius: 999px;
  color: var(--aqua);
  background: rgba(57, 225, 192, 0.1);
  font-size: 10px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(57, 225, 192, 0.23);
  border-radius: 15px;
  background: rgba(57, 225, 192, 0.055);
}

.admin-state {
  display: grid;
  gap: 4px;
  color: #aabac0;
  font-size: 12px;
}

.admin-key {
  color: var(--aqua);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.paused-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 17px 20px;
  border: 1px solid rgba(244, 212, 77, 0.35);
  border-radius: 15px;
  color: #f8e99b;
  background: rgba(244, 212, 77, 0.075);
}

.paused-banner strong,
.paused-banner span {
  display: block;
}

.paused-banner strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.paused-banner span {
  color: #b9ad75;
  font-size: 11px;
}

.view-content {
  padding-top: 30px;
}

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

.section-heading h2,
.modal h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 15px;
}

.live-match {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.live-match.featured {
  border-color: rgba(255, 93, 48, 0.45);
  box-shadow: inset 4px 0 0 var(--orange);
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.table-tag {
  color: var(--ink);
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--aqua);
}

.match-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 9px;
}

.match-player {
  min-width: 0;
  font-size: clamp(19px, 2.1vw, 28px);
  font-weight: 900;
  line-height: 1.08;
}

.match-player:last-child {
  text-align: right;
}

.match-player small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.vs {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--orange);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 900;
}

.match-action {
  width: 100%;
  min-height: 38px;
  margin-top: 15px;
}

.empty-state {
  display: grid;
  min-height: 310px;
  padding: 30px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.17);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state-inner {
  max-width: 500px;
}

.empty-paddle {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 17px 18px 0 -10px var(--paper), inset -16px -10px 0 rgba(0, 0, 0, 0.12);
  transform: rotate(-18deg);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.bracket-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bracket-viewport {
  overflow: auto;
  padding: 4px 4px 24px;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--ink-3) transparent;
}

.bracket {
  display: flex;
  gap: var(--round-gap);
  min-width: max-content;
  align-items: stretch;
}

.bracket-round {
  display: flex;
  width: 255px;
  flex-direction: column;
}

.round-title {
  min-height: 45px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.round-title strong {
  display: block;
  margin-top: 5px;
  color: var(--paper);
  font-size: 15px;
  letter-spacing: 0;
}

.round-matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
}

.bracket-match {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
}

.bracket-match.ready {
  border-color: rgba(57, 225, 192, 0.45);
}

.bracket-match.completed {
  opacity: 0.8;
}

.bracket-match::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--round-gap) * -1);
  width: var(--round-gap);
  height: 1px;
  background: rgba(255, 255, 255, 0.13);
}

.bracket-round:last-child .bracket-match::after {
  display: none;
}

.bracket-player {
  display: flex;
  min-height: 39px;
  padding: 7px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 780;
}

.bracket-player:last-of-type {
  border-bottom: 0;
}

.bracket-player.winner {
  color: var(--aqua);
}

.bracket-player.muted {
  color: #607883;
  font-weight: 600;
}

.bracket-player select {
  width: 100%;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--paper);
  background: var(--ink);
  font-size: 11px;
}

.player-seed {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-score {
  flex: 0 0 auto;
  color: var(--paper);
  font-size: 13px;
}

.bracket-match-footer {
  display: flex;
  min-height: 27px;
  padding: 5px 9px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bracket-match-footer button {
  padding: 0;
  border: 0;
  color: var(--aqua);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.champion-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 26px;
  padding: clamp(22px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(244, 212, 77, 0.35);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 80% 50%, rgba(244, 212, 77, 0.22), transparent 23rem),
    linear-gradient(135deg, rgba(244, 212, 77, 0.08), rgba(255, 93, 48, 0.05));
}

.champion-banner span {
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.champion-banner h2 {
  margin: 4px 0 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.95;
  text-transform: uppercase;
}

.champion-ball {
  display: grid;
  flex: 0 0 auto;
  width: clamp(90px, 12vw, 150px);
  height: clamp(90px, 12vw, 150px);
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: inset -18px -16px 0 rgba(0, 0, 0, 0.08), 0 0 60px rgba(244, 212, 77, 0.18);
  font-size: clamp(42px, 7vw, 74px);
}

.participant-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.summary-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.summary-card span,
.summary-card small {
  display: block;
}

.summary-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin: 7px 0 3px;
  font-size: 28px;
}

.summary-card small {
  color: #728b95;
}

.participant-list {
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
}

.participant-row {
  display: grid;
  grid-template-columns: 48px minmax(150px, 1fr) minmax(130px, 0.5fr) 130px auto;
  gap: 16px;
  min-height: 68px;
  padding: 10px 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.participant-row:last-child {
  border-bottom: 0;
}

.participant-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.participant-row.withdrawn {
  opacity: 0.62;
  background: rgba(255, 107, 104, 0.035);
}

.participant-row.withdrawn .participant-name {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.withdrawn-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 107, 104, 0.3);
  border-radius: 999px;
  color: #ffaaa8;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  vertical-align: middle;
}

.participant-rank {
  color: #647d87;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 23px;
}

.participant-name {
  font-size: 16px;
  font-weight: 850;
}

.participant-rating {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.rating-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--aqua);
  font-weight: 950;
}

.participant-joined {
  color: #647d87;
  font-size: 11px;
}

.row-edit {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
}

.signup-shell {
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 5vw, 48px);
  place-items: center;
  background:
    radial-gradient(circle at 50% -10%, rgba(57, 225, 192, 0.16), transparent 26rem),
    radial-gradient(circle at 100% 100%, rgba(255, 93, 48, 0.17), transparent 28rem),
    var(--ink);
}

.signup-card {
  width: min(100%, 570px);
  padding: clamp(24px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(11, 43, 62, 0.65);
  box-shadow: var(--shadow);
}

.signup-brand {
  margin-bottom: 50px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.15em;
}

.signup-card h1 {
  font-size: clamp(55px, 15vw, 86px);
}

.signup-intro {
  margin: 24px 0;
  color: #b8c5c9;
  font-size: 16px;
  line-height: 1.55;
}

.challenge-instruction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  margin: 24px 0 30px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mini-paddle {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: var(--paper);
  font-size: 8px;
}

.mini-paddle.black {
  background: #071219;
}

.mini-paddle.red {
  background: var(--orange);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: #c9d4d7;
  font-size: 12px;
  font-weight: 780;
}

label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

input,
select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.16);
}

input::placeholder {
  color: #5e7781;
}

.signup-connection {
  min-height: 18px;
  margin: 20px 0 0;
  color: #708995;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.signup-message {
  padding: 20px 0;
  text-align: center;
}

.signup-message .eyebrow {
  justify-content: center;
}

.signup-message h1 {
  margin-bottom: 22px;
  font-size: clamp(44px, 13vw, 72px);
}

.signup-message p {
  color: #afc0c6;
  line-height: 1.6;
}

.message-ball,
.success-check {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
}

.success-check {
  color: var(--ink);
  background: var(--aqua);
  font-size: 42px;
  font-weight: 900;
}

.rating-receipt {
  display: grid;
  margin: 22px 0;
  padding: 19px;
  border: 1px solid rgba(57, 225, 192, 0.25);
  border-radius: 16px;
  background: rgba(57, 225, 192, 0.055);
}

.rating-receipt span,
.rating-receipt small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rating-receipt strong {
  margin: 5px;
  color: var(--aqua);
  font-size: 48px;
}

.modal {
  width: min(calc(100% - 28px), 500px);
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  color: var(--paper);
  background: var(--ink-2);
  box-shadow: var(--shadow);
}

.modal-wide {
  width: min(calc(100% - 28px), 740px);
}

.modal::backdrop {
  background: rgba(1, 12, 19, 0.76);
  backdrop-filter: blur(7px);
}

.modal form {
  padding: clamp(24px, 5vw, 42px);
}

.modal-panel {
  padding: clamp(24px, 5vw, 42px);
}

.modal h2 {
  margin-bottom: 15px;
  font-size: clamp(32px, 6vw, 48px);
}

.modal form > p:not(.modal-kicker):not(.form-error) {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  font-size: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-grid-full {
  grid-column: 1 / -1;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 24px;
}

.modal-spacer {
  flex: 1;
}

.form-error {
  min-height: 18px;
  margin: 5px 0 12px;
  color: #ffaaa8;
  font-size: 12px;
  font-weight: 700;
}

.participant-status-note {
  min-height: 0;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.cup-manager-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.cup-manager-heading h2 {
  margin: 0;
}

.cup-manager-heading > div > p:last-child {
  max-width: 470px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.cup-list {
  display: grid;
  gap: 11px;
  max-height: min(60vh, 620px);
  overflow-y: auto;
  padding-right: 4px;
}

.cup-list-section {
  margin: 15px 0 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.cup-card.active {
  border-color: rgba(57, 225, 192, 0.43);
  box-shadow: inset 4px 0 0 var(--aqua);
}

.cup-card.archived {
  opacity: 0.58;
}

.cup-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cup-card-title strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--aqua);
  background: rgba(57, 225, 192, 0.09);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cup-status.paused {
  color: var(--yellow);
  background: rgba(244, 212, 77, 0.09);
}

.cup-card-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.cup-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cup-card-actions .button {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 10px;
}

.result-players {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}

.winner-choice {
  display: flex;
  min-height: 54px;
  padding: 0 15px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-weight: 850;
}

.winner-choice.selected {
  color: var(--ink);
  border-color: var(--aqua);
  background: var(--aqua);
}

.winner-choice span:last-child {
  font-size: 11px;
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
}

.score-grid > span {
  padding-bottom: 17px;
  color: var(--muted);
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 9px;
  width: min(calc(100% - 40px), 360px);
}

.toast {
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--paper);
  background: #123c51;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  animation: toast-in 180ms ease-out;
  font-size: 13px;
  font-weight: 700;
}

.toast.error {
  border-color: rgba(255, 107, 104, 0.45);
  background: #44252a;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .qr-card {
    justify-self: start;
    width: min(100%, 360px);
  }

  .participant-row {
    grid-template-columns: 44px minmax(140px, 1fr) 110px auto;
  }

  .participant-joined {
    display: none;
  }
}

/* v12: tydeligere kampreise, komplett koblingsnett og poengfokus */

.bracket,
.tournament-bracket {
  position: relative;
  isolation: isolate;
}

.bracket-round,
.bracket-match {
  position: relative;
  z-index: 1;
}

.bracket-match::after {
  display: none !important;
}

.bracket-connectors {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.bracket-connector-path {
  fill: none;
  stroke: rgba(178, 192, 238, 0.34);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.bracket-connector-path.final-connector {
  stroke: rgba(109, 139, 255, 0.72);
  stroke-width: 1.8;
}

.bracket-connector-path.bronze-connector {
  stroke: rgba(238, 123, 121, 0.52);
  stroke-dasharray: 5 5;
}

.bracket .final-round {
  width: 285px;
}

.bracket-match.semifinal-match {
  border-color: rgba(112, 130, 232, 0.42);
  background:
    linear-gradient(145deg, rgba(8, 31, 240, 0.14), rgba(7, 16, 75, 0.96)),
    var(--ink-2);
  box-shadow: 0 12px 32px rgba(2, 6, 48, 0.2);
}

.bracket-match.semifinal-match .bracket-player {
  min-height: 43px;
  font-size: 13px;
}

.bracket-match.final-match {
  border-color: rgba(118, 146, 255, 0.9);
  background:
    radial-gradient(circle at 88% 15%, rgba(57, 225, 192, 0.16), transparent 46%),
    linear-gradient(145deg, rgba(8, 31, 240, 0.45), rgba(2, 6, 48, 0.98));
  box-shadow:
    0 0 0 1px rgba(8, 31, 240, 0.28),
    0 18px 50px rgba(2, 6, 48, 0.38),
    inset 3px 0 0 rgba(57, 225, 192, 0.72);
  transform: scale(1.035);
  transform-origin: center;
}

.bracket-match.final-match .bracket-player {
  min-height: 48px;
  padding-inline: 13px;
  font-size: 14px;
}

.bracket-match.final-match .player-score {
  color: #fff;
  font-size: 17px;
}

.bracket-match.final-match .bracket-match-footer {
  min-height: 32px;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.bracket-match.bronze-match {
  border-color: rgba(238, 123, 121, 0.45);
  background:
    linear-gradient(145deg, rgba(238, 123, 121, 0.08), rgba(7, 16, 75, 0.94)),
    var(--ink-2);
}

.bracket-match.bronze-match .bracket-match-footer {
  color: #f3aaa8;
}

.tournament-bracket .final-round {
  min-width: 238px;
}

.tournament-bracket .bracket-match.semifinal-match .bracket-player {
  min-height: 36px;
  font-size: 11px;
}

.tournament-bracket .bracket-match.final-match {
  border-color: rgba(118, 146, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(8, 31, 240, 0.34),
    0 12px 38px rgba(2, 6, 48, 0.46),
    inset 3px 0 0 rgba(57, 225, 192, 0.78);
  transform: scale(1.045);
}

.tournament-bracket .bracket-match.final-match .bracket-player {
  min-height: 41px;
  font-size: 12px;
}

.tournament-bracket .bracket-match.final-match .bracket-match-footer {
  min-height: 29px;
}

.tournament-bracket.orientation-upward {
  height: 100%;
  justify-content: space-around;
  gap: clamp(24px, 4vh, 54px);
}

.display-prestart {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  align-items: center;
  gap: clamp(34px, 6vw, 110px);
  text-align: left;
}

.display-prestart-copy {
  max-width: 720px;
}

.display-prestart-copy p {
  margin: 0;
}

.display-prestart-copy h1 {
  max-width: 760px;
  font-size: clamp(52px, 6.6vw, 104px);
}

.display-signup-board {
  min-width: 0;
  max-height: min(76vh, 740px);
  overflow: hidden;
  border: 1px solid rgba(112, 130, 232, 0.48);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(8, 31, 240, 0.23), transparent 45%),
    rgba(7, 16, 75, 0.72);
  box-shadow: 0 26px 80px rgba(2, 6, 48, 0.28);
}

.display-signup-board > header {
  display: flex;
  min-height: 74px;
  padding: 14px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.display-signup-board > header div {
  display: grid;
  gap: 4px;
}

.display-signup-board > header span {
  color: var(--brand-blue-pale);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.display-signup-board > header strong {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.7vw, 28px);
  font-weight: 600;
}

.display-signup-board > header b {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 42px);
  font-weight: 600;
  white-space: nowrap;
}

.display-signup-list {
  display: grid;
  max-height: calc(min(76vh, 740px) - 74px);
  padding: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
}

.display-signup-person {
  display: grid;
  min-width: 0;
  min-height: 62px;
  padding: 10px 12px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-content: center;
  gap: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  animation: signup-person-in 280ms ease both;
}

.display-signup-person > span {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: 20px;
}

.display-signup-person > strong {
  overflow: hidden;
  font-size: clamp(12px, 1.05vw, 17px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-signup-person > small {
  color: #99a6dc;
  font-size: 9px;
}

.display-signup-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 54px 18px;
  color: #929ed4;
  text-align: center;
}

@keyframes signup-person-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.podium-stats {
  position: relative;
  z-index: 1;
  display: flex;
  margin-top: 16px;
  padding-top: 12px;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.podium-stats b {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 600;
}

.podium-stats small {
  margin: 0;
  color: #aab5e2;
  font-size: 9px;
  text-align: right;
}

@media (max-width: 900px) {
  .display-prestart {
    height: auto;
    min-height: calc(100vh - 150px);
    grid-template-columns: 1fr;
    align-content: start;
    gap: 28px;
  }

  .display-prestart-copy h1 {
    font-size: clamp(48px, 14vw, 78px);
  }

  .display-signup-board {
    max-height: none;
  }

  .display-signup-list {
    max-height: none;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .display-signup-person {
    animation: none;
  }
}

/* Racketvendinger: instructional animation in the mobile signup flow. */
.racket-demo {
  position: relative;
  z-index: 1;
  margin: 24px 0 30px;
  overflow: hidden;
  border: 1px solid rgba(210, 218, 250, 0.34);
  border-radius: 12px;
  background: rgba(2, 6, 48, 0.74);
  box-shadow: 0 18px 46px rgba(0, 0, 35, 0.28);
}

.racket-demo-media {
  overflow: hidden;
  background: #020630;
}

.racket-demo-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.racket-demo-still {
  display: none !important;
}

.racket-demo figcaption {
  display: grid;
  gap: 4px;
  padding: 13px 16px 15px;
  border-top: 1px solid rgba(210, 218, 250, 0.22);
}

.racket-demo figcaption strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.racket-demo figcaption span {
  color: #b7c2ea;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .racket-demo {
    margin-block: 20px 26px;
    border-radius: 9px;
  }

  .racket-demo figcaption {
    padding-inline: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .racket-demo-animation {
    display: none !important;
  }

  .racket-demo-still {
    display: block !important;
  }
}

.signup-message .signup-repeat-note {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(210, 218, 250, 0.22);
  border-radius: 8px;
  color: #aeb9e3;
  background: rgba(2, 6, 48, 0.34);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 650px) {
  .topbar {
    min-height: 72px;
    padding-inline: 16px;
  }

  .brand strong {
    font-size: 11px;
  }

  .connection-badge span,
  #fullscreenButton {
    display: none;
  }

  .connection-badge {
    min-height: 34px;
    padding: 0 12px;
  }

  .hero-section {
    padding: 44px 18px 60px;
  }

  .hero-copy h1 {
    font-size: clamp(56px, 19vw, 82px);
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stats strong {
    font-size: 32px;
  }

  .qr-card {
    transform: none;
  }

  .qr-card::before {
    display: none;
  }

  .qr-code {
    min-height: 250px;
  }

  .dashboard-section {
    padding-inline: 14px;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cup-manager-heading,
  .cup-card {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .cup-card-actions {
    justify-content: flex-start;
  }

  .admin-toolbar-actions .button {
    padding-inline: 10px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .participant-summary {
    grid-template-columns: 1fr;
  }

  .participant-row {
    grid-template-columns: 35px minmax(100px, 1fr) auto auto;
    gap: 8px;
    padding-inline: 10px;
  }

  .participant-rating > span:last-child {
    display: none;
  }

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

  .form-grid-full {
    grid-column: auto;
  }

  .modal-actions {
    flex-wrap: wrap;
  }

  .challenge-instruction {
    padding-inline: 11px;
  }
}

/* Bordregler */

.rules-view {
  display: grid;
  gap: 24px;
}

.rules-list,
.display-rules-list,
.signup-rules-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.rules-list li {
  display: grid;
  min-height: 210px;
  padding: 22px;
  align-content: space-between;
  gap: 28px;
  overflow: hidden;
  border: 1px solid rgba(112, 130, 232, 0.45);
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0, rgba(8, 31, 240, 0.22), transparent 11rem),
    rgba(255, 255, 255, 0.045);
}

.rules-list li > span {
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
}

.rules-list li > strong {
  font-size: clamp(17px, 1.7vw, 25px);
  font-weight: 600;
  line-height: 1.3;
}

.rules-footnote {
  margin: 0;
  color: #9ba7da;
  font-size: 11px;
}

.signup-rules {
  margin: 28px 0 24px;
  overflow: hidden;
  border: 1px solid rgba(112, 130, 232, 0.52);
  border-radius: 14px;
  background: rgba(8, 31, 240, 0.09);
}

.signup-rules-heading {
  display: grid;
  padding: 17px 18px 14px;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.signup-rules-heading > span {
  color: var(--brand-blue-pale);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.signup-rules-heading > strong {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
}

.signup-rules-list li {
  display: grid;
  padding: 14px 18px;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.signup-rules-list li > span {
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.signup-rules-list li > strong {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
}

label.rules-accept {
  display: flex;
  min-height: 58px;
  padding: 12px 18px;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #fff;
  background: rgba(0, 196, 166, 0.09);
  cursor: pointer;
}

.rules-accept input,
.rules-display-toggle input {
  width: 21px;
  min-width: 21px;
  height: 21px;
  min-height: 21px;
  margin: 0;
  accent-color: var(--brand-green);
}

.rule-editor-list {
  display: grid;
  gap: 14px;
}

.rule-editor-list label {
  margin: 0;
}

.rule-editor-list label > span {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.rule-editor-list label b {
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: 19px;
}

textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.16);
  font: inherit;
  line-height: 1.5;
}

textarea:focus-visible {
  outline: 2px solid rgba(210, 218, 250, 0.72);
  outline-offset: 2px;
}

label.rules-display-toggle {
  display: flex;
  padding: 15px 16px;
  align-items: center;
  gap: 13px;
  margin: 20px 0 0;
  border: 1px solid rgba(0, 196, 166, 0.32);
  border-radius: 10px;
  background: rgba(0, 196, 166, 0.07);
  cursor: pointer;
}

.rules-display-toggle > span {
  display: grid;
  gap: 3px;
}

.rules-display-toggle small {
  color: #9eaae0;
}

.display-rules {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 2.6vh, 32px);
}

.display-rules > header,
.display-rules > footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.display-rules > header p {
  margin: 0 0 8px;
  color: var(--brand-blue-pale);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.display-rules > header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 86px);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.055em;
}

.display-rules > header h1 em {
  color: var(--brand-blue-pale);
  font-style: normal;
}

.display-rules > header > span,
.display-rules > footer span {
  color: #aab5e2;
  font-size: 10px;
}

.display-rules-list {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 22px);
}

.display-rules-list li {
  position: relative;
  display: grid;
  min-height: 0;
  padding: clamp(20px, 2.4vw, 42px);
  align-content: space-between;
  gap: 30px;
  overflow: hidden;
  border: 1px solid rgba(112, 130, 232, 0.62);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(8, 31, 240, 0.34), transparent 17rem),
    rgba(6, 15, 77, 0.82);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

.display-rules-list li > span {
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 70px);
  font-weight: 600;
  line-height: 1;
}

.display-rules-list li > strong {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.25vw, 40px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.display-rules > footer {
  align-items: center;
  color: #fff;
}

/* Horisontal og dynamisk cup-pyramide */

.tournament-bracket {
  display: grid;
  width: 100%;
  grid-auto-flow: column;
  grid-auto-columns: minmax(215px, 1fr);
}

.tournament-bracket.round-count-2 {
  min-width: max(100%, 470px);
  grid-template-columns: repeat(2, minmax(215px, 1fr));
}

.tournament-bracket.round-count-3 {
  min-width: max(100%, 710px);
  grid-template-columns: repeat(3, minmax(215px, 1fr));
}

.tournament-bracket.round-count-4 {
  min-width: max(100%, 950px);
  grid-template-columns: repeat(4, minmax(215px, 1fr));
}

.tournament-bracket.round-count-5 {
  min-width: max(100%, 1190px);
  grid-template-columns: repeat(5, minmax(215px, 1fr));
}

.tournament-bracket.round-count-6 {
  min-width: max(100%, 1430px);
  grid-template-columns: repeat(6, minmax(215px, 1fr));
}

.tournament-bracket.round-count-7 {
  min-width: max(100%, 1670px);
  grid-template-columns: repeat(7, minmax(215px, 1fr));
}

.tournament-bracket .bracket-round {
  width: auto;
  min-width: 0;
}

.bracket-round.placement-round .round-matches {
  justify-content: center;
  gap: clamp(18px, 7vh, 74px);
}

/* Tydelig 1–2–3-pall */

.podium-place {
  position: relative;
  overflow: hidden;
}

.podium-place.second {
  min-height: 188px;
  border-color: rgba(210, 218, 250, 0.42);
  background:
    radial-gradient(circle at 90% 10%, rgba(210, 218, 250, 0.16), transparent 10rem),
    rgba(255, 255, 255, 0.055);
}

.podium-place.first {
  min-height: 274px;
  border-color: rgba(0, 196, 166, 0.72);
  box-shadow: 0 18px 70px rgba(0, 196, 166, 0.13);
}

.podium-place.third {
  min-height: 158px;
  border-color: rgba(238, 123, 121, 0.38);
  background:
    radial-gradient(circle at 90% 10%, rgba(238, 123, 121, 0.17), transparent 10rem),
    rgba(255, 255, 255, 0.038);
}

.podium-rank {
  position: absolute;
  top: -0.18em;
  right: 14px;
  color: rgba(255, 255, 255, 0.055);
  font-family: var(--font-display);
  font-size: clamp(100px, 12vw, 190px);
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.podium-place.first .podium-rank {
  color: rgba(0, 196, 166, 0.11);
}

.podium-place.third .podium-rank {
  color: rgba(238, 123, 121, 0.08);
}

.display-standings .podium {
  max-height: none;
}

.display-standings .podium-place.second {
  min-height: clamp(150px, 19vh, 220px);
}

.display-standings .podium-place.first {
  min-height: clamp(205px, 29vh, 320px);
}

.display-standings .podium-place.third {
  min-height: clamp(130px, 16vh, 190px);
}

@media (min-width: 1000px) and (min-aspect-ratio: 16/10) {
  .tournament-header {
    min-height: 68px;
    padding-block: 8px;
  }

  .tournament-content {
    height: calc(100vh - 68px);
    padding-block: clamp(12px, 1.5vw, 22px);
  }

  .tournament-stage {
    grid-template-columns: minmax(260px, 0.29fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px 20px;
  }

  .display-stage-heading {
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
    flex-direction: column;
  }

  .display-stage-heading > span {
    text-align: left;
  }

  .display-live-strip,
  .display-live-empty {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    overflow-y: auto;
  }

  .display-live-strip {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .display-bracket-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 900px) {
  .rules-list,
  .display-rules-list {
    grid-template-columns: 1fr;
  }

  .display-rules {
    height: auto;
    min-height: calc(100vh - 140px);
  }

  .display-rules > header,
  .display-rules > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .display-rules-list li {
    min-height: 210px;
  }

  .podium-place.second,
  .podium-place.first,
  .podium-place.third,
  .display-standings .podium-place.second,
  .display-standings .podium-place.first,
  .display-standings .podium-place.third {
    min-height: 138px;
  }
}

/* v12 cascade guard: keep the live signup board aligned after legacy display rules. */
.display-prestart {
  place-items: initial;
  align-items: center;
  justify-items: stretch;
  text-align: left;
}

.display-prestart .display-signup-empty {
  color: #929ed4;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .display-prestart {
    height: auto;
    min-height: calc(100vh - 150px);
    align-content: start;
    align-items: start;
  }
}

/* v13: påmeldingsoversikt og visningsskjerm fra første deltaker */
.warmup-roster {
  overflow: hidden;
  border: 1px solid rgba(112, 130, 232, 0.3);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(8, 31, 240, 0.13), rgba(2, 6, 48, 0.02)),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 24px 70px rgba(2, 6, 48, 0.09);
}

.warmup-roster > header {
  display: flex;
  min-height: 76px;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(112, 130, 232, 0.22);
}

.warmup-roster > header div {
  display: grid;
  gap: 3px;
}

.warmup-roster > header span,
.warmup-person b {
  color: var(--brand-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.warmup-roster > header strong {
  color: var(--ink);
  font-size: 20px;
}

.warmup-roster > header small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.warmup-roster > header small i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(57, 225, 192, 0.13);
}

.warmup-people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.warmup-person {
  position: relative;
  display: grid;
  min-height: 90px;
  padding: 17px 20px 16px 66px;
  align-content: center;
  gap: 3px;
  border-right: 1px solid rgba(112, 130, 232, 0.16);
  border-bottom: 1px solid rgba(112, 130, 232, 0.16);
}

.warmup-person > span {
  position: absolute;
  top: 20px;
  left: 20px;
  color: rgba(8, 31, 240, 0.48);
  font-size: 14px;
  font-weight: 800;
}

.warmup-person strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warmup-person small {
  color: var(--muted);
  font-size: 12px;
}

.warmup-person b {
  position: absolute;
  top: 9px;
  right: 12px;
  color: #087d70;
  font-size: 8px;
}

.warmup-person.newest {
  background: linear-gradient(135deg, rgba(57, 225, 192, 0.13), rgba(8, 31, 240, 0.05));
  box-shadow: inset 3px 0 0 var(--aqua);
}

@media (max-width: 650px) {
  .tournament-button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 10px;
  }

  .topbar-actions .connection-badge {
    display: none;
  }

  .warmup-roster > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .warmup-people {
    grid-template-columns: 1fr;
  }
}

/* Fast lokal merkevare-lockup: original Aderian-logo + Sagene Data-navn. */

.aderian-sagene-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
}

.aderian-sagene-lockup img {
  display: block;
  width: 78px;
  height: auto;
  margin: 0;
  padding: 0 16px 0 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
}

.aderian-sagene-lockup > span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.aderian-sagene-lockup.compact {
  gap: 11px;
}

.aderian-sagene-lockup.compact img {
  width: 68px;
  padding-right: 12px;
}

.aderian-sagene-lockup.compact > span {
  font-size: 11px;
}

.brand > .aderian-sagene-lockup {
  margin-left: 8px;
}

.hero-signature.aderian-sagene-lockup {
  justify-content: flex-start;
}

.hero-signature.aderian-sagene-lockup img {
  width: 72px;
  padding: 0 17px 0 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.signup-brand > .aderian-sagene-lockup,
.tournament-identity > .aderian-sagene-lockup {
  margin-left: auto;
}

.signup-brand .aderian-sagene-lockup img,
.tournament-identity .aderian-sagene-lockup img {
  margin: 0;
  padding: 0 12px 0 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

@media (max-width: 720px) {
  .brand > .aderian-sagene-lockup {
    display: none;
  }

  .tournament-identity > .aderian-sagene-lockup > span {
    display: none;
  }

  .tournament-identity > .aderian-sagene-lockup img {
    width: 64px;
    padding-right: 0;
    border-right: 0;
  }
}

@media (min-width: 1600px) {
  .topbar {
    min-height: 104px;
  }

  .hero-section {
    min-height: 720px;
  }

  .live-match {
    min-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Aderian / Sagene Data visual layer
   Based on the supplied Aderian presentation. Functional selectors above stay intact. */

html {
  background: var(--brand-navy);
}

body {
  color: #fff;
  background-color: var(--brand-navy);
  background-image:
    linear-gradient(180deg, rgba(2, 6, 48, 0.08) 0, rgba(2, 6, 48, 0.4) 54rem, var(--brand-navy) 88rem),
    url("assets/aderian-blue-grain.jpg");
  background-position: center top, center top;
  background-repeat: no-repeat;
  background-size: 100% 92rem, max(100%, 1920px) auto;
}

.noise {
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, transparent 0 11.9%, rgba(255, 255, 255, 0.03) 12%, transparent 12.1%),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 255, 255, 0.012) 5px);
  background-size: 220px 100%, auto;
}

.topbar {
  min-height: 82px;
  padding: 14px clamp(20px, 4vw, 68px);
  border-bottom-color: rgba(255, 255, 255, 0.14);
  background: rgba(2, 6, 48, 0.78);
  backdrop-filter: blur(24px) saturate(145%);
}

.brand {
  gap: 12px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  max-width: min(40vw, 380px);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.brand small {
  margin-top: 4px;
  color: var(--brand-blue-pale);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
}

.aderian-wordmark {
  width: 80px;
  height: auto;
  margin-left: 9px;
  object-fit: contain;
}

.brand > .aderian-wordmark {
  padding-left: 17px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.paddle-mark {
  width: 34px;
  height: 38px;
  transform: none;
}

.paddle-mark::before {
  top: 0;
  left: 1px;
  width: 25px;
  height: 25px;
  border: 2px solid #fff;
  background: transparent;
  box-shadow: none;
}

.paddle-mark::after {
  top: 23px;
  left: 19px;
  width: 4px;
  height: 14px;
  border-radius: 3px;
  background: #fff;
  transform: rotate(-34deg);
  transform-origin: top center;
}

.paddle-mark i {
  top: 3px;
  right: -1px;
  width: 7px;
  height: 7px;
  background: var(--brand-blue-pale);
  box-shadow: 0 0 0 3px var(--brand-blue), 0 0 18px rgba(210, 218, 250, 0.75);
}

.paddle-mark-small {
  transform: scale(0.85);
}

.connection-badge {
  border-radius: 6px;
  color: #c2caf0;
  background: rgba(255, 255, 255, 0.045);
  font-weight: 600;
}

.connection-badge.online i {
  background: var(--brand-green);
}

.connection-badge.offline i {
  background: var(--brand-coral);
}

.button,
.icon-button {
  font-weight: 600;
}

.button {
  min-height: 44px;
  border-radius: 7px;
}

.button-small {
  border-radius: 6px;
}

.button-accent {
  color: #fff;
  background: var(--brand-blue);
  box-shadow: 0 10px 34px rgba(8, 31, 240, 0.34);
}

.button-accent:hover {
  background: #2339f4;
}

.button-ghost,
.icon-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.055);
}

.button:focus-visible,
.icon-button:focus-visible,
input:focus-visible,
select:focus-visible,
.view-tabs button:focus-visible {
  outline-color: rgba(210, 218, 250, 0.72);
}

.hero-section {
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 400px);
  gap: clamp(38px, 7vw, 116px);
  min-height: min(710px, calc(100vh - 82px));
  padding: clamp(54px, 6.5vw, 104px) clamp(22px, 6.5vw, 110px);
  isolation: isolate;
}

.hero-section::before {
  top: 50%;
  right: -2%;
  z-index: -1;
  width: min(54vw, 780px);
  height: min(54vw, 780px);
  border: 0;
  border-radius: 0;
  background: url("assets/sagene-a-texture.png") center / contain no-repeat;
  box-shadow: none;
  opacity: 0.18;
  transform: translateY(-48%);
}

.hero-section::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 82% 48%, rgba(112, 130, 232, 0.24), transparent 26rem),
    linear-gradient(90deg, rgba(2, 6, 48, 0.82) 0, rgba(2, 6, 48, 0.38) 62%, rgba(8, 31, 240, 0.08) 100%);
  pointer-events: none;
}

.brand-context {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 44px;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}

.brand-context span {
  font-size: 18px;
  line-height: 1;
}

.eyebrow,
.modal-kicker {
  color: var(--brand-blue-pale);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.live-dot {
  background: var(--brand-green);
  box-shadow: 0 0 0 5px rgba(0, 196, 166, 0.14), 0 0 18px rgba(0, 196, 166, 0.9);
}

.hero-copy h1,
.signup-card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.055em;
  text-transform: none;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(58px, 7.1vw, 112px);
}

.hero-copy h1 em,
.signup-card h1 em {
  color: var(--brand-blue-pale);
  font-style: normal;
  -webkit-text-stroke: 0;
  text-stroke: 0;
}

.hero-subtitle {
  max-width: 590px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 400;
}

.hero-stats {
  gap: 0;
  max-width: 620px;
  margin: 38px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stats div {
  min-width: 120px;
  padding: 18px clamp(18px, 2.6vw, 36px) 0 0;
}

.hero-stats div + div {
  padding-left: clamp(18px, 2.6vw, 36px);
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.hero-stats strong {
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hero-stats span {
  color: #b8c2eb;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.hero-signature {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.hero-signature img {
  width: 72px;
  height: auto;
  padding-left: 17px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* QR: deliberately axis-aligned. No rotation, skew, filter or patterned backdrop. */
.qr-card {
  width: min(100%, 390px);
  padding: 15px;
  border: 1px solid rgba(210, 218, 250, 0.9);
  border-radius: 13px;
  color: var(--brand-navy);
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 38, 0.38), 0 0 0 8px rgba(8, 31, 240, 0.11);
  transform: none !important;
}

.qr-card::before {
  display: none;
}

.qr-card-top {
  min-height: 38px;
  margin-bottom: 9px;
  padding: 0 6px;
  color: var(--brand-navy);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.step-number {
  color: var(--brand-blue);
}

.qr-code {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1;
  padding: clamp(19px, 5vw, 26px);
  overflow: hidden;
  border: 1px solid var(--brand-blue-pale);
  border-radius: 5px;
  background: #fff;
  transform: none !important;
}

.qr-code img,
.qr-code canvas,
.qr-code svg {
  display: block;
  width: 100% !important;
  max-width: 300px;
  height: auto !important;
  aspect-ratio: 1;
  object-fit: contain;
  border: 0;
  background: #fff;
  filter: none !important;
  transform: none !important;
}

.qr-card-bottom {
  gap: 12px;
  padding: 14px 6px 2px;
}

.qr-card-bottom strong {
  font-size: 12px;
  font-weight: 600;
}

.qr-card-bottom small {
  color: #495383;
}

.ball-icon {
  width: 30px;
  height: 30px;
  border: 2px solid var(--brand-blue);
  background: #fff;
  box-shadow: inset -5px -4px 0 var(--brand-blue-pale);
}

.dashboard-section {
  border-top-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 82% 12%, rgba(8, 31, 240, 0.16), transparent 32rem),
    rgba(2, 6, 48, 0.92);
}

.view-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.view-tabs button {
  color: #8997cf;
  font-weight: 500;
}

.view-tabs button.active {
  color: #fff;
}

.view-tabs button.active::after {
  background: var(--brand-blue);
}

.view-tabs button span {
  color: #fff;
  background: rgba(8, 31, 240, 0.56);
}

.admin-toolbar {
  border-color: rgba(112, 130, 232, 0.45);
  border-radius: 9px;
  background: rgba(8, 31, 240, 0.1);
}

.admin-key {
  color: var(--brand-blue-pale);
}

.paused-banner {
  border-color: rgba(0, 196, 166, 0.42);
  border-radius: 9px;
  color: #b7f4e8;
  background: rgba(0, 196, 166, 0.09);
}

.section-heading h2,
.modal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  text-transform: none;
}

.section-heading p {
  color: #aab5e2;
}

.live-match,
.summary-card,
.cup-card,
.winner-choice {
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
}

.live-match.featured {
  border-color: rgba(112, 130, 232, 0.8);
  box-shadow: inset 4px 0 0 var(--brand-blue);
}

.table-tag {
  color: #fff;
  border-radius: 5px;
  background: var(--brand-blue);
}

.vs {
  color: var(--brand-blue-pale);
  font-family: var(--font-sans);
  font-style: normal;
}

.empty-state {
  border-color: rgba(210, 218, 250, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.empty-paddle {
  border-color: #fff;
  background: var(--brand-blue);
  box-shadow: 17px 18px 0 -10px #fff, inset -16px -10px 0 rgba(0, 0, 0, 0.12);
}

.bracket-viewport {
  scrollbar-color: var(--brand-blue-mid) transparent;
}

.bracket-match {
  border-radius: 7px;
  background: rgba(7, 16, 75, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 35, 0.22);
}

.bracket-match.ready,
.cup-card.active {
  border-color: rgba(112, 130, 232, 0.8);
}

.bracket-player.winner,
.bracket-match-footer button {
  color: var(--brand-blue-pale);
}

.champion-banner {
  border-color: rgba(0, 196, 166, 0.46);
  border-radius: 12px;
  background:
    radial-gradient(circle at 84% 50%, rgba(0, 196, 166, 0.26), transparent 25rem),
    linear-gradient(135deg, rgba(8, 31, 240, 0.18), rgba(0, 196, 166, 0.07));
}

.champion-banner span {
  color: #8fe6d6;
}

.champion-banner h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-transform: none;
}

.champion-ball {
  color: var(--brand-navy);
  background: var(--brand-green);
  box-shadow: inset -18px -16px 0 rgba(0, 0, 0, 0.08), 0 0 60px rgba(0, 196, 166, 0.22);
}

.participant-list {
  border-radius: 10px;
}

.participant-rank {
  color: #8997cf;
  font-family: var(--font-display);
}

.rating-number {
  color: #fff;
  background: var(--brand-blue);
}

.withdrawn-badge,
.form-error {
  color: #ffaaa8;
}

.signup-shell {
  background:
    linear-gradient(145deg, rgba(2, 6, 48, 0.36), rgba(2, 6, 48, 0.76)),
    url("assets/aderian-blue-grain.jpg") center / cover no-repeat,
    var(--brand-navy);
}

.signup-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(210, 218, 250, 0.32);
  border-radius: 16px;
  background: rgba(2, 6, 48, 0.76);
  box-shadow: 0 34px 100px rgba(0, 0, 35, 0.44);
  backdrop-filter: blur(18px);
}

.signup-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 270px;
  height: 270px;
  background: url("assets/aderian-a-mark.png") center / contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
}

.signup-brand {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-bottom: 58px;
  font-weight: 600;
  letter-spacing: 0;
}

.signup-brand > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.signup-brand strong {
  font-size: 13px;
  font-weight: 600;
}

.signup-brand small {
  color: #aab5e2;
  font-size: 9px;
  font-weight: 500;
}

.signup-brand img {
  width: 74px;
  height: auto;
  margin-left: auto;
}

.signup-card h1 {
  font-size: clamp(52px, 14vw, 80px);
}

.signup-intro,
.signup-message p {
  color: rgba(255, 255, 255, 0.76);
}

.challenge-instruction {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.mini-paddle.red {
  background: var(--brand-coral);
}

label {
  color: #d9def6;
  font-weight: 500;
}

input,
select {
  border-color: rgba(210, 218, 250, 0.26);
  border-radius: 7px;
  background: rgba(0, 0, 25, 0.28);
}

input::placeholder {
  color: #7f8abf;
}

.success-check {
  color: var(--brand-navy);
  background: var(--brand-green);
}

.message-ball {
  background: var(--brand-blue);
}

.rating-receipt {
  border-color: rgba(112, 130, 232, 0.48);
  border-radius: 9px;
  background: rgba(8, 31, 240, 0.1);
}

.rating-receipt strong {
  color: var(--brand-blue-pale);
}

.modal {
  border-color: rgba(210, 218, 250, 0.24);
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(8, 31, 240, 0.2), transparent 20rem),
    var(--ink-2);
}

.modal::backdrop {
  background: rgba(2, 6, 48, 0.8);
}

.modal-close,
.row-edit {
  border-color: rgba(255, 255, 255, 0.2);
}

.cup-status {
  color: #fff;
  background: rgba(8, 31, 240, 0.62);
}

.cup-status.paused {
  color: #b7f4e8;
  background: rgba(0, 196, 166, 0.12);
}

.cup-card.active {
  box-shadow: inset 4px 0 0 var(--brand-blue);
}

.winner-choice.selected {
  color: #fff;
  border-color: var(--brand-blue);
  background: var(--brand-blue);
}

.toast {
  border-radius: 8px;
  background: #111c68;
}

.toast.error {
  border-color: rgba(238, 123, 121, 0.5);
  background: #4a213a;
}

@media (max-width: 900px) {
  body {
    background-size: 100% 86rem, auto 86rem;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-section::before {
    top: 14%;
    right: -17%;
    width: min(86vw, 620px);
    height: min(86vw, 620px);
    transform: none;
  }

  .qr-card {
    justify-self: center;
    width: min(100%, 390px);
  }
}

@media (max-width: 650px) {
  .topbar {
    min-height: 70px;
  }

  .brand > .aderian-wordmark {
    display: none;
  }

  .brand strong {
    max-width: 44vw;
    font-size: 11px;
  }

  .brand-context {
    margin-bottom: 32px;
  }

  .hero-section {
    padding: 40px 18px 58px;
  }

  .hero-copy h1 {
    font-size: clamp(50px, 17vw, 72px);
  }

  .hero-stats {
    overflow-x: auto;
  }

  .hero-stats div {
    min-width: 94px;
    padding-right: 15px;
  }

  .hero-stats div + div {
    padding-left: 15px;
  }

  .hero-signature {
    margin-top: 30px;
  }

  .qr-card {
    transform: none !important;
  }

  .qr-code {
    min-height: 0;
    padding: 20px;
  }

  .signup-brand img {
    width: 62px;
  }
}

@media (min-width: 1600px) {
  .hero-section {
    min-height: 760px;
  }

  .qr-card {
    width: 410px;
  }
}

/* Fullskjerm turneringsvisning */

.tournament-button {
  border-color: rgba(112, 130, 232, 0.72);
  background: rgba(8, 31, 240, 0.2);
}

body.tournament-display {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(2, 6, 48, 0.82), rgba(2, 6, 48, 0.52)),
    url("assets/aderian-blue-grain.jpg") center / cover fixed no-repeat,
    var(--brand-navy);
}

.tournament-shell {
  min-height: 100vh;
  color: #fff;
}

.tournament-header {
  display: flex;
  min-height: 78px;
  padding: 12px clamp(18px, 2.5vw, 44px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(2, 6, 48, 0.84);
  backdrop-filter: blur(20px);
}

.tournament-identity,
.tournament-header-status {
  display: flex;
  align-items: center;
}

.tournament-identity {
  min-width: 0;
  gap: 13px;
}

.tournament-identity > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.tournament-identity small {
  color: var(--brand-blue-pale);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.tournament-identity strong {
  overflow: hidden;
  max-width: 42vw;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 25px);
  font-weight: 600;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-identity img {
  width: 78px;
  height: auto;
  margin-left: 14px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.tournament-header-status {
  gap: 14px;
  color: #aab5e2;
  font-size: 10px;
}

.display-sync {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(0, 196, 166, 0.32);
  border-radius: 5px;
  color: #b7f4e8;
  background: rgba(0, 196, 166, 0.08);
  font-weight: 600;
  text-transform: uppercase;
}

.display-sync i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 14px var(--brand-green);
}

.display-sync.offline {
  border-color: rgba(238, 123, 121, 0.4);
  color: #ffc1bf;
  background: rgba(238, 123, 121, 0.08);
}

.display-sync.offline i {
  background: var(--brand-coral);
  box-shadow: 0 0 14px var(--brand-coral);
}

.tournament-content {
  height: calc(100vh - 78px);
  padding: clamp(16px, 2vw, 30px) clamp(18px, 2.5vw, 44px) 24px;
  overflow: hidden;
}

.tournament-stage {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
}

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

.display-stage-heading p {
  margin: 0 0 6px;
  color: var(--brand-blue-pale);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.display-stage-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 3.4vw, 58px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.display-stage-heading > span {
  color: #aab5e2;
  font-size: 11px;
  text-align: right;
}

.display-live-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.display-live-card {
  position: relative;
  min-width: 0;
  padding: 13px 15px;
  overflow: hidden;
  border: 1px solid rgba(112, 130, 232, 0.72);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(8, 31, 240, 0.35), rgba(255, 255, 255, 0.055));
  box-shadow: inset 3px 0 0 var(--brand-blue);
}

.display-live-card header,
.display-live-card .display-live-players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.display-live-card header {
  margin-bottom: 9px;
  color: #aeb9e5;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.display-live-card header strong {
  color: #fff;
  font-size: 9px;
}

.display-live-players span {
  overflow: hidden;
  font-size: clamp(13px, 1.25vw, 20px);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-live-players i {
  flex: 0 0 auto;
  color: var(--brand-blue-pale);
  font-size: 9px;
  font-style: normal;
}

.display-live-empty {
  display: grid;
  min-height: 76px;
  padding: 14px 18px;
  place-items: center;
  border: 1px dashed rgba(210, 218, 250, 0.28);
  border-radius: 8px;
  color: #aab5e2;
  text-align: center;
}

.display-bracket-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(2, 6, 48, 0.62);
}

.display-bracket-heading {
  display: flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #aab5e2;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.display-bracket-heading strong {
  color: #fff;
}

.tournament-bracket-viewport {
  min-height: 0;
  padding: 10px 12px 16px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--brand-blue-mid) rgba(255, 255, 255, 0.03);
}

.tournament-bracket {
  display: flex;
  min-width: max-content;
  min-height: 100%;
  align-items: stretch;
  gap: 26px;
}

.tournament-bracket .bracket-round {
  width: clamp(205px, 13.4vw, 258px);
}

.tournament-bracket .round-title {
  min-height: 38px;
  color: #8e9bd1;
}

.tournament-bracket .round-title strong {
  font-size: 13px;
}

.tournament-bracket .round-matches {
  gap: 9px;
}

.tournament-bracket .bracket-match {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(7, 16, 75, 0.92);
  transition: border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.tournament-bracket .bracket-match.display-on-table {
  border-color: var(--brand-blue-pale);
  box-shadow: 0 0 0 2px rgba(8, 31, 240, 0.7), 0 0 28px rgba(8, 31, 240, 0.28);
}

.tournament-bracket .bracket-match.display-next {
  border-color: rgba(112, 130, 232, 0.75);
}

.tournament-bracket .bracket-match.completed {
  opacity: 0.58;
}

.tournament-bracket .bracket-player {
  min-height: 34px;
  font-size: 11px;
}

.tournament-bracket .bracket-player.winner {
  color: #fff;
  background: rgba(8, 31, 240, 0.14);
}

.tournament-bracket .bracket-player.muted {
  color: #7d89bb;
  font-size: 9px;
}

.display-match-state {
  padding: 3px 6px;
  border-radius: 4px;
  color: #aab5e2;
  background: rgba(255, 255, 255, 0.055);
}

.display-on-table .display-match-state {
  color: #fff;
  background: var(--brand-blue);
}

.display-next .display-match-state {
  color: var(--brand-blue-pale);
  background: rgba(8, 31, 240, 0.24);
}

.display-prestart {
  display: grid;
  height: 100%;
  place-items: center;
  text-align: center;
}

.display-prestart > div {
  max-width: 760px;
}

.display-prestart p {
  color: var(--brand-blue-pale);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.display-prestart h1 {
  margin: 10px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(54px, 8vw, 118px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.display-prestart span {
  color: #b5bee7;
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.5;
}

/* Sluttresultat */

.standings-view {
  display: grid;
  gap: 24px;
}

.podium {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: end;
}

.podium-place {
  display: grid;
  min-height: 150px;
  padding: 22px;
  align-content: end;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.podium-place.first {
  min-height: 205px;
  border-color: rgba(0, 196, 166, 0.52);
  background:
    radial-gradient(circle at 80% 20%, rgba(0, 196, 166, 0.22), transparent 10rem),
    rgba(8, 31, 240, 0.18);
}

.podium-place .podium-number {
  color: var(--brand-blue-pale);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.podium-place strong {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 48px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.podium-place small {
  display: block;
  margin-top: 8px;
  color: #aab5e2;
  line-height: 1.4;
}

.standings-table {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}

.standing-row {
  display: grid;
  min-height: 54px;
  padding: 8px 15px;
  grid-template-columns: 76px minmax(0, 1fr) minmax(130px, 0.45fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.standing-row:last-child {
  border-bottom: 0;
}

.standing-row.top-three {
  background: rgba(8, 31, 240, 0.08);
}

.standing-place {
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
}

.standing-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standing-result,
.standing-status {
  color: #9eaae0;
  font-size: 10px;
}

.standing-status {
  text-align: right;
}

.display-standings {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.display-standings .section-heading {
  margin: 0;
}

.display-standings .podium {
  max-height: 30vh;
}

.display-standings .podium-place {
  min-height: 110px;
}

.display-standings .podium-place.first {
  min-height: 145px;
}

.display-standings .standings-table {
  overflow-y: auto;
}

.security-note {
  margin-top: -10px !important;
  padding: 10px 12px;
  border-left: 3px solid var(--brand-blue);
  color: #aeb8e4 !important;
  background: rgba(8, 31, 240, 0.09);
  font-size: 10px;
}

@media (max-width: 900px) {
  body.tournament-display {
    overflow: auto;
  }

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

  .tournament-header-status {
    width: 100%;
    flex-wrap: wrap;
  }

  .tournament-content {
    height: auto;
    min-height: calc(100vh - 120px);
    overflow: visible;
  }

  .display-live-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .display-bracket-panel {
    min-height: 64vh;
  }

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

  .podium-place,
  .podium-place.first {
    min-height: 118px;
  }
}

@media (max-width: 650px) {
  .tournament-identity img,
  #tournamentUpdated {
    display: none;
  }

  .tournament-identity strong {
    max-width: 64vw;
  }

  .display-stage-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .display-live-strip {
    grid-template-columns: 1fr;
  }

  .standing-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }

  .standing-result {
    display: none;
  }
}

/* v8: visningsretning, kompakte regler og leaderboard */

.orientation-button {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 9px;
}

.bracket.orientation-upward,
.tournament-bracket.orientation-upward {
  display: flex;
  min-width: max-content;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 30px;
}

.bracket.orientation-upward .bracket-round,
.tournament-bracket.orientation-upward .bracket-round {
  display: grid;
  width: max-content;
  min-width: 100%;
  grid-template-columns: 140px minmax(max-content, 1fr);
  align-items: center;
  gap: 16px;
}

.bracket.orientation-upward .round-title,
.tournament-bracket.orientation-upward .round-title {
  min-height: 0;
  margin: 0;
}

.bracket.orientation-upward .round-matches,
.tournament-bracket.orientation-upward .round-matches {
  display: flex;
  min-width: max-content;
  flex-direction: row;
  justify-content: space-around;
  gap: 16px;
}

.bracket.orientation-upward .bracket-match {
  width: 255px;
}

.tournament-bracket.orientation-upward .bracket-match {
  width: clamp(205px, 13.4vw, 258px);
}

.bracket.orientation-upward .bracket-match::after,
.tournament-bracket.orientation-upward .bracket-match::after {
  top: -30px;
  right: auto;
  left: 50%;
  width: 1px;
  height: 30px;
}

.bracket.orientation-upward .bracket-round:last-child .bracket-match::after,
.tournament-bracket.orientation-upward .bracket-round:last-child .bracket-match::after {
  display: none;
}

.tournament-bracket.orientation-sideways {
  display: grid;
  width: 100%;
  min-height: 100%;
  grid-auto-flow: column;
  grid-auto-columns: minmax(215px, 1fr);
  align-items: stretch;
  gap: 26px;
}

.tournament-bracket.orientation-sideways.round-count-2 {
  min-width: max(100%, 470px);
  grid-template-columns: repeat(2, minmax(215px, 1fr));
}

.tournament-bracket.orientation-sideways.round-count-3 {
  min-width: max(100%, 710px);
  grid-template-columns: repeat(3, minmax(215px, 1fr));
}

.tournament-bracket.orientation-sideways.round-count-4 {
  min-width: max(100%, 950px);
  grid-template-columns: repeat(4, minmax(215px, 1fr));
}

.tournament-bracket.orientation-sideways.round-count-5 {
  min-width: max(100%, 1190px);
  grid-template-columns: repeat(5, minmax(215px, 1fr));
}

.tournament-bracket.orientation-sideways.round-count-6 {
  min-width: max(100%, 1430px);
  grid-template-columns: repeat(6, minmax(215px, 1fr));
}

.tournament-bracket.orientation-sideways.round-count-7 {
  min-width: max(100%, 1670px);
  grid-template-columns: repeat(7, minmax(215px, 1fr));
}

.tournament-bracket.orientation-sideways .bracket-round {
  width: auto;
  min-width: 0;
}

.tournament-stage {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.display-side-stack {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.6fr) minmax(230px, 0.7fr);
  align-items: stretch;
  gap: 12px;
}

.display-side-stack .display-live-strip {
  min-width: 0;
}

.leaderboard-panel {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(7, 16, 75, 0.66);
}

.leaderboard-panel > header {
  display: flex;
  min-height: 52px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.leaderboard-panel > header div {
  display: grid;
  gap: 2px;
}

.leaderboard-panel > header span,
.leaderboard-panel > header small {
  color: var(--brand-blue-pale);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.leaderboard-panel > header strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.leaderboard-panel > header small {
  color: #8f9bcf;
  white-space: nowrap;
}

.leaderboard-rows {
  display: grid;
}

.leaderboard-row {
  display: grid;
  min-height: 42px;
  padding: 7px 13px;
  grid-template-columns: 24px minmax(0, 1fr) 42px 46px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-row > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row > span:not(.leaderboard-rank) {
  color: #9eaae0;
  text-align: right;
}

.leaderboard-row b {
  color: #fff;
  font-size: 13px;
}

.leaderboard-rank {
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: 18px;
}

.leaderboard-empty {
  margin: 0;
  padding: 14px;
  color: #8996cd;
  font-size: 10px;
  line-height: 1.45;
}

.display-leaderboard {
  min-height: 0;
  margin: 0;
}

.display-leaderboard .leaderboard-row {
  min-height: 34px;
  padding-block: 5px;
}

.display-rules-dock {
  display: grid;
  min-height: 0;
  max-height: 168px;
  padding: 12px 14px;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  overflow: auto;
  border: 1px solid rgba(112, 130, 232, 0.56);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(8, 31, 240, 0.23), rgba(7, 16, 75, 0.9)),
    rgba(7, 16, 75, 0.9);
  box-shadow: 0 -12px 44px rgba(2, 6, 48, 0.3);
}

.display-rules-dock > header {
  display: grid;
  padding: 8px 10px;
  align-content: center;
  gap: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.display-rules-dock > header span {
  color: var(--brand-blue-pale);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.display-rules-dock > header strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.display-rules-dock-list {
  display: grid;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
}

.display-rules-dock-list li {
  display: grid;
  min-width: 0;
  padding: 9px 11px;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.display-rules-dock-list li > span {
  color: var(--brand-blue-pale);
  font-family: var(--font-display);
  font-size: 16px;
}

.display-rules-dock-list li > strong {
  font-size: clamp(9px, 0.8vw, 12px);
  font-weight: 550;
  line-height: 1.38;
}

.podium-place {
  position: relative;
  overflow: hidden;
}

.podium-place.second {
  min-height: 188px;
  border-color: rgba(210, 218, 250, 0.42);
}

.podium-place.first {
  min-height: 274px;
  border-color: rgba(0, 196, 166, 0.72);
  box-shadow: 0 18px 70px rgba(0, 196, 166, 0.13);
}

.podium-place.third {
  min-height: 158px;
  border-color: rgba(238, 123, 121, 0.38);
}

.podium-rank {
  position: absolute;
  top: -0.18em;
  right: 14px;
  color: rgba(255, 255, 255, 0.055);
  font-family: var(--font-display);
  font-size: clamp(100px, 12vw, 190px);
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.podium-place.first .podium-rank {
  color: rgba(0, 196, 166, 0.11);
}

.podium-place.third .podium-rank {
  color: rgba(238, 123, 121, 0.08);
}

.display-standings .podium {
  max-height: none;
}

.display-standings .podium-place.second {
  min-height: clamp(150px, 19vh, 220px);
}

.display-standings .podium-place.first {
  min-height: clamp(205px, 29vh, 320px);
}

.display-standings .podium-place.third {
  min-height: clamp(130px, 16vh, 190px);
}

@media (min-width: 1000px) and (min-aspect-ratio: 16/10) {
  .tournament-header {
    min-height: 68px;
    padding-block: 8px;
  }

  .tournament-content {
    height: calc(100vh - 68px);
    padding-block: clamp(12px, 1.5vw, 22px);
  }

  .tournament-stage {
    grid-template-columns: minmax(260px, 0.29fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px 20px;
  }

  .display-stage-heading {
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
    flex-direction: column;
  }

  .display-stage-heading > span {
    text-align: left;
  }

  .display-side-stack {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
  }

  .display-side-stack .display-live-strip {
    grid-template-columns: 1fr;
  }

  .display-bracket-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .display-rules-dock {
    grid-column: 1 / span 2;
    grid-row: 3;
  }
}

@media (max-width: 900px) {
  .display-side-stack {
    grid-template-columns: 1fr;
  }

  .display-rules-dock {
    max-height: none;
    grid-template-columns: 1fr;
  }

  .display-rules-dock > header {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  .display-rules-dock-list {
    grid-template-columns: 1fr;
  }

  .podium-place.second,
  .podium-place.first,
  .podium-place.third,
  .display-standings .podium-place.second,
  .display-standings .podium-place.first,
  .display-standings .podium-place.third {
    min-height: 138px;
  }
}

/* v12 final cascade guard */
.display-prestart {
  place-items: initial;
  align-items: center;
  justify-items: stretch;
  text-align: left;
}

.display-prestart .display-signup-empty {
  color: #929ed4;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .display-prestart {
    height: auto;
    min-height: calc(100vh - 150px);
    align-content: start;
    align-items: start;
  }
}
