/* Steel + crimson (light platform) + arena dark — MK energy without sand/orange */
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Manrope:wght@400;500;600;700;800&display=swap");

:root,
[data-theme="mk-light"] {
  --bg: #eef2f6;
  --bg2: #f7f9fc;
  --card: #ffffff;
  --line: #cfd7e3;
  --text: #12161e;
  --muted: #5a6578;
  --gold: #c8102e;
  --gold2: #e8364f;
  --red: #9e0b22;
  --ok: #1a7a52;
  --shadow: 0 14px 36px rgba(18, 28, 48, 0.1);
  --top-bg: rgba(238, 242, 246, 0.92);
  --input-bg: #f4f7fb;
  --flash-ok-bg: #e5f5ec;
  --flash-err-bg: #fde8eb;
  --flash-err-text: #9e0b22;
  --pill-bg: #e4eaf2;
  --avatar-bg: #dce3ee;
  --stage-bg: #0a0c12;
  --stage-text: #f2f5fa;
  --atmosphere:
    radial-gradient(ellipse 75% 50% at 8% -8%, rgba(200, 16, 46, 0.16), transparent 55%),
    radial-gradient(ellipse 65% 45% at 96% 4%, rgba(70, 100, 150, 0.14), transparent 50%),
    linear-gradient(180deg, #f5f7fb 0%, var(--bg) 45%, #e4eaf2 100%);
  --hero-shine: linear-gradient(105deg, transparent 40%, rgba(200, 16, 46, 0.1) 50%, transparent 60%);
  color-scheme: light;
}

[data-theme="arena"] {
  --bg: #0a0c12;
  --bg2: #12151d;
  --card: #171b26;
  --line: #2a3142;
  --text: #eef1f7;
  --muted: #94a0b8;
  --gold: #e8364f;
  --gold2: #ff6b7a;
  --red: #ff5c6c;
  --ok: #5dcb8a;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  --top-bg: rgba(10, 12, 18, 0.92);
  --input-bg: #12151d;
  --flash-ok-bg: #163524;
  --flash-err-bg: #3a151c;
  --flash-err-text: #ff9aa6;
  --pill-bg: #232a3a;
  --avatar-bg: #232a3a;
  --stage-bg: #05060a;
  --stage-text: #eef1f7;
  --atmosphere:
    radial-gradient(ellipse 70% 45% at 12% 0%, rgba(232, 54, 79, 0.14), transparent 55%),
    linear-gradient(180deg, #10131b 0%, var(--bg) 100%);
  --hero-shine: linear-gradient(105deg, transparent 40%, rgba(232, 54, 79, 0.08) 50%, transparent 60%);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--atmosphere);
  background-attachment: fixed;
  color: var(--text);
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  line-height: 1.45;
  min-height: 100%;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }

.top {
  border-bottom: 1px solid var(--line);
  background: var(--top-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.top-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold2);
  font-size: 1.55rem;
  line-height: 1;
  animation: brand-in 0.7s ease-out both;
}
@keyframes brand-in {
  from { opacity: 0; letter-spacing: 0.42em; transform: translateY(-6px); }
  to { opacity: 1; letter-spacing: 0.18em; transform: none; }
}
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { color: var(--muted); }
.who { color: var(--muted); }

.theme-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--bg2);
  gap: 2px;
}
.theme-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.theme-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: #fff;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 28px 20px 64px; }
.wrap-wide { max-width: 1180px; }
.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 24px; opacity: 0.85; }

.hero {
  position: relative;
  padding: 36px 0 18px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-shine);
  background-size: 200% 100%;
  animation: shine 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}
.hero h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.4rem, 7vw, 4rem);
  margin: 0 0 10px;
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46rem;
  position: relative;
  z-index: 1;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(200, 16, 46, 0.14);
  text-decoration: none;
}
.card h2, .card h3 { margin: 0 0 10px; font-size: 1.05rem; }

label { display: block; font-size: 0.85rem; color: var(--muted); margin: 12px 0 6px; }
input, select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn, button, .btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, filter 0.15s ease;
}
/* Links inherit .nav a / a { color } — keep primary CTA text white on crimson */
a.btn, a.btn-sm,
.nav a.btn, .nav a.btn-sm,
.btn:hover, a.btn:hover, a.btn-sm:hover,
.nav a.btn:hover, .nav a.btn-sm:hover,
button:hover:not(:disabled), .btn-sm:hover {
  color: #fff;
}
.btn:hover, button:hover:not(:disabled), .btn-sm:hover,
a.btn:hover, a.btn-sm:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
button.ghost, a.ghost, .ghost,
a.btn.ghost, a.btn-sm.ghost, .nav a.btn.ghost, .nav a.btn-sm.ghost,
a.ghost:hover, .nav a.ghost:hover {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  filter: none;
}
button.danger { background: #8b2e2e; color: #fff; }

.flash {
  max-width: 1120px;
  margin: 12px auto 0;
  padding: 10px 16px;
  border-radius: 10px;
}
.flash-ok { background: var(--flash-ok-bg); color: var(--ok); }
.flash-err { background: var(--flash-err-bg); color: var(--flash-err-text); }

.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.muted { color: var(--muted); }
.badge {
  display: inline-block;
  background: var(--pill-bg);
  color: var(--gold2);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--avatar-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
img.avatar:hover {
  transform: scale(1.08);
  border-color: var(--gold);
}
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.roster-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}
.roster-card:nth-child(3n) { animation-delay: 0.05s; }
.roster-card:nth-child(3n+1) { animation-delay: 0.1s; }
.roster-card:nth-child(3n+2) { animation-delay: 0.15s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.roster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: var(--avatar-bg);
  display: block;
}
.roster-card .name {
  margin: 8px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}
.roster-card .seed {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ops { display: grid; grid-template-columns: 360px 1fr; gap: 18px; }
@media (max-width: 900px) { .ops { grid-template-columns: 1fr; } }
.preview {
  min-height: 420px;
  border: 0;
  width: 100%;
  height: 70vh;
  border-radius: 16px;
  background: #000;
}
.scorebox { display: flex; gap: 10px; align-items: end; }
.scorebox input { width: 80px; font-size: 1.4rem; text-align: center; }
.help { color: var(--muted); font-size: 0.88rem; }
ul.plain { padding-left: 1.1rem; }

/* Stage / projector always arena-dark for hall impact */
.stage-page {
  background: var(--stage-bg);
  min-height: 100vh;
  margin: 0;
  color: var(--stage-text);
}
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.stage-name {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 18px 0 0;
  text-transform: uppercase;
}
.stage-sub {
  color: #b8a48a;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.stage-photo {
  width: min(52vh, 420px);
  height: min(68vh, 560px);
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
  background: #222;
  border: 3px solid #c8102e;
}
.vs-row {
  display: flex;
  gap: clamp(16px, 4vw, 48px);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.vs-col { width: min(40vw, 380px); }
.vs-col img {
  width: 100%;
  height: min(52vh, 460px);
  object-fit: cover;
  border-radius: 20px;
  border: 2px solid #e8364f;
}
.vs-mark {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 400;
  color: #e8364f;
  letter-spacing: 0.08em;
  animation: vs-pulse 1.4s ease-in-out infinite;
}
@keyframes vs-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}
.score-big {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 400;
  color: #ff6b7a;
  margin: 12px 0;
  letter-spacing: 0.06em;
}
.winner { outline: 4px solid #e8364f; }
.ph {
  width: min(52vh, 420px);
  height: min(68vh, 560px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(160deg, #2a1520, #0c0e14);
  color: #ff6b7a;
}
.bracket { display: flex; gap: 28px; overflow-x: auto; padding: 8px 0 20px; }
.round { min-width: 220px; }
.round h3 {
  color: #e8364f;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.match {
  background: #1a1d27;
  border: 1px solid #2a2e3d;
  border-radius: 12px;
  padding: 10px;
  margin: 0 0 14px;
  color: #eef1f7;
}
.match.current { border-color: #e8364f; }
.slot { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.slot.win { color: #5dcb8a; font-weight: 700; }
.slot.lose { color: #777; }
.kbd {
  font-family: ui-monospace, monospace;
  background: var(--bg2);
  padding: 1px 6px;
  border-radius: 6px;
}

/* —— Dashboard / platform —— */
.dash-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.brand-hero {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(3.4rem, 12vw, 6.2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
  line-height: 0.9;
  color: var(--text);
  animation: brand-in 0.75s ease-out both;
}
.dash-hero {
  position: relative;
  padding: 28px 0 8px;
  margin-bottom: 18px;
  overflow: hidden;
}
.dash-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 140%;
  background:
    radial-gradient(ellipse 55% 50% at 18% 30%, rgba(200, 16, 46, 0.18), transparent 60%),
    radial-gradient(ellipse 45% 40% at 88% 20%, rgba(70, 100, 160, 0.12), transparent 55%);
  pointer-events: none;
  animation: atmosphere-drift 9s ease-in-out infinite alternate;
}
@keyframes atmosphere-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(2%, 1%, 0) scale(1.04); }
}
.dash-hero > * { position: relative; z-index: 1; }
.dash-cta { margin-top: 16px; }
.dash-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 8px 0 22px;
  align-items: stretch;
}
.dash-metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 110px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.dash-metric-val {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--gold);
}
.dash-metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.dash-metric-chart { min-width: 160px; }
.sparkline { color: var(--gold); display: block; overflow: visible; }
.sparkline-lg { color: var(--gold2); }

.dash-fights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.fight-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px 14px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
  animation-delay: calc(var(--i, 0) * 0.05s);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fight-card.is-live {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  box-shadow: 0 16px 40px rgba(200, 16, 46, 0.14);
}
.fight-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.fight-card-top h2 {
  margin: 2px 0 0;
  font-size: 1.15rem;
  line-height: 1.2;
}
.fight-card-top h2 a { color: var(--text); }
.fight-card-top h2 a:hover { color: var(--gold); }
.fight-org {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.badge-live { background: #f8d4da; color: #9e0b22; }
.badge-done { background: #e4efe8; color: #1a7a52; }
.badge-draft { background: var(--pill-bg); color: var(--muted); }
.badge-scheduled { background: #dce6f5; color: #2a4a7a; }
.badge-role { font-size: 0.65rem; vertical-align: middle; margin-left: 4px; }
[data-theme="arena"] .badge-live { background: #3a1520; color: #ff6b7a; }
[data-theme="arena"] .badge-done { background: #163524; color: #5dcb8a; }
[data-theme="arena"] .badge-scheduled { background: #1a2538; color: #8eb4e8; }

.fight-now-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
}
.fight-vs {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}
.fight-vs em {
  font-style: normal;
  color: var(--gold2);
  animation: vs-pulse 1.6s ease-in-out infinite;
}
.fight-score {
  margin: 8px 0 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2rem;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.fight-idle { margin: 0; }
.fight-charts {
  display: flex;
  align-items: end;
  gap: 12px;
  justify-content: space-between;
}
.fight-progress { flex: 1; min-width: 0; }
.fight-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}
.progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  border-radius: inherit;
  transition: width 0.6s ease;
}
.round-bars {
  display: flex;
  gap: 8px;
  align-items: end;
  min-height: 72px;
}
.round-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.round-bar-track {
  width: 100%;
  height: 48px;
  background: var(--pill-bg);
  border-radius: 8px 8px 4px 4px;
  display: flex;
  align-items: end;
  overflow: hidden;
}
.round-bar-track i {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  border-radius: 6px 6px 0 0;
}
.round-bar-label, .round-bar-val {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.fight-card-actions { margin-top: auto; }
.dash-empty { margin-top: 12px; }
.dash-preview {
  margin-top: 28px;
  max-width: 420px;
}
.dash-preview-fight {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  animation: rise 0.55s ease both;
}
.dash-preview-fight strong {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dash-preview-fight em {
  font-style: normal;
  color: var(--gold);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.2rem;
}
.dash-preview-fight > span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  width: 100%;
}

/* —— Event page —— */
.event-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: stretch;
}
@media (max-width: 860px) {
  .event-hero { grid-template-columns: 1fr; }
}
.event-hero h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
  line-height: 0.95;
}
.event-hero-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}
.event-vs { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.event-faces {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  margin-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.face-chip {
  margin: 0;
  width: 72px;
  flex: 0 0 auto;
  text-align: center;
  scroll-snap-align: start;
  animation: rise 0.4s ease both;
}
.face-chip img, .face-fallback {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--line);
  display: block;
  margin: 0 auto;
  background: var(--avatar-bg);
}
.face-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}
.face-chip figcaption {
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.face-more {
  align-self: center;
  flex: 0 0 auto;
  width: 56px;
  height: 72px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 800;
}
.section-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.4rem;
  margin: 8px 0 12px;
}
.bracket-light .match {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
}
.bracket-light .round h3 { color: var(--gold); }
.bracket-light .match.current {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent);
}
.bracket-light .slot.win { color: var(--ok); }
.bracket-light .slot.lose { color: var(--muted); opacity: 0.75; }
.slot-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.slot-ava {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--line);
}
.event-admin h2 { margin-top: 0; }

/* —— Players page —— */
.players-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 8px;
}
.players-hero h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 6px;
  line-height: 0.95;
}
.players-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.players-tools {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 760px) {
  .players-tools { grid-template-columns: 1fr; }
}
.players-tool-actions { margin-top: 8px; }
.roster-card {
  animation-delay: calc(var(--i, 0) * 0.03s);
}
.roster-fallback {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--avatar-bg), var(--pill-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gold);
}
.roster-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.roster-file {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.roster-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* —— Auth forms —— */
.field-error {
  color: var(--flash-err-text);
  font-size: 0.82rem;
  margin: 4px 0 0;
  font-weight: 600;
}
.field-error[hidden] { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 25%, transparent);
}
.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 4px;
}
@media (max-width: 520px) {
  .role-cards { grid-template-columns: 1fr; }
}
.role-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg2);
  cursor: pointer;
  display: block;
}
.role-card:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent);
}
.role-card input { width: auto; margin-right: 8px; }
.role-card strong { display: block; margin-bottom: 4px; }
.role-card span { color: var(--muted); font-size: 0.82rem; }

/* —— Calendar —— */
.cal-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: var(--bg2);
  margin: 12px 0 20px;
}
.cal-tabs a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}
.cal-tabs a.is-active {
  background: var(--gold);
  color: #fff;
}
.cal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.cal-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.45s ease both;
  animation-delay: calc(var(--i, 0) * 0.04s);
}
@media (max-width: 640px) {
  .cal-row { grid-template-columns: 72px 1fr; }
  .cal-row .cal-actions { grid-column: 2; }
}
.cal-date {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--gold);
  text-transform: uppercase;
}
.cal-date small {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.cal-row h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  line-height: 1.25;
}
.cal-row h2 a { color: var(--text); }
.cal-row h2 a:hover { color: var(--gold); }
.cal-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.cal-empty {
  padding: 28px 8px;
  color: var(--muted);
}

/* —— Rating —— */
.rating-table { width: 100%; }
.rating-table .rank {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  color: var(--gold);
  width: 48px;
}
.rating-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rating-who img, .rating-fallback {
  width: 44px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--avatar-bg);
  flex: 0 0 auto;
}
.rating-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--gold);
}
.rating-wl {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.admin-table td, .admin-table th { font-size: 0.9rem; }

/* Site nav: mobile toggle + always-reachable menu */
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .top-inner { flex-wrap: wrap; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 0 4px;
  }
  .nav.is-open { display: flex; }
  .theme-switch { align-self: flex-start; }
}

/* Tournament flow steps */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.flow-step {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted) !important;
  font-size: 0.88rem;
  font-weight: 600;
}
.flow-step.is-active {
  border-color: var(--gold);
  color: var(--text) !important;
  box-shadow: 0 0 0 1px rgba(200, 16, 46, 0.25);
}
.flow-hint { margin-top: 8px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.admin-actions { white-space: nowrap; }
.admin-actions form { display: inline; }
.admin-table tr.is-blocked td { opacity: 0.65; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-weight: 500;
}
.check input { width: auto; margin: 0; }
.admin-role-form label:not(.check) { display: block; margin-top: 10px; }
.invite-link code, .invite-mini {
  display: block;
  word-break: break-all;
  font-size: 0.82rem;
  background: var(--input-bg);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-top: 8px;
}
.invite-list li { margin-bottom: 10px; }
.empty-state { margin: 8px 0; }

.stage-escape {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 5;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.35);
}
.stage-escape:hover { color: #fff; }
.stage-page .stage-escape { font-family: Manrope, sans-serif; }

/* Display / hall: same brand tokens as arena theme */
.stage-brand {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold2, #e8364f);
  margin: 0 0 6px;
}
.stage-page .stage-sub {
  color: var(--muted, #94a0b8);
  letter-spacing: 0.14em;
  font-family: Manrope, sans-serif;
}

/* —— Auth modal —— */
body.auth-open { overflow: hidden; }
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 24px;
  overflow-y: auto;
}
.auth-overlay[hidden] { display: none !important; }
.auth-modal {
  position: relative;
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 16px;
  box-shadow: var(--shadow);
  animation: rise 0.28s ease both;
}
.auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.auth-close:hover { color: var(--text); }
.auth-panel h2 { margin: 0 0 10px; font-size: 1.25rem; }
.legal-check { font-size: 0.88rem; align-items: flex-start; }
.legal-check a { text-decoration: underline; }

/* —— Home top-3 —— */
.home-top3 {
  margin: 8px 0 22px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}
.home-top3-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.home-top3-head .section-title { margin: 0; font-size: 1.15rem; }
.top3-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .top3-list { grid-template-columns: 1fr; }
}
.top3-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  animation: rise 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 0.06s);
}
.top3-item img, .top3-item .rating-fallback {
  width: 40px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}
.top3-rank {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.5rem;
  color: var(--gold);
  width: 1.2em;
  text-align: center;
}
.top3-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.top3-meta strong { font-size: 0.95rem; line-height: 1.2; }

/* —— Rating me highlight —— */
.rating-table tr.is-me td {
  background: color-mix(in srgb, var(--gold) 12%, var(--card));
}
.rating-table tr.is-me {
  outline: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  outline-offset: -1px;
}
.badge-me {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  vertical-align: middle;
}

/* —— Profile dashboard —— */
.dash-hero-compact { padding: 18px 0 8px; }
.lead-tight { margin-bottom: 0; font-size: 0.98rem; }
.profile-dash {
  display: grid;
  gap: 18px;
  margin: 8px 0 16px;
}
.profile-dash-block h2 { margin-bottom: 8px; }
.event-compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.event-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.event-compact-row .join-inline { margin: 0; flex: 0 0 auto; }
.event-compact-row .badge { margin-left: 6px; }
.profile-summary { margin-top: 8px; padding: 12px 16px; }
.event-unique-actions { margin-top: 12px; gap: 10px; }

/* —— Compact admin —— */
.admin-compact .wrap { padding-top: 16px; padding-bottom: 40px; }
.admin-compact .dash-hero { margin-bottom: 8px; }
.admin-compact .card {
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: none;
}
.admin-compact .grid { gap: 10px; }
.admin-compact .card h2 { margin-bottom: 6px; font-size: 0.98rem; }
.admin-compact .table th,
.admin-compact .table td {
  padding: 6px 8px;
  font-size: 0.84rem;
}
.admin-compact label { margin: 6px 0 3px; }
.admin-compact input,
.admin-compact select { padding: 7px 9px; }
.admin-compact .admin-actions { white-space: normal; }
.admin-compact .admin-actions .btn-sm { padding: 4px 8px; font-size: 0.78rem; }
.admin-compact .pager { margin-top: 10px; }
.card-dense { padding: 10px 12px; }

/* —— Org cards / organizer hub —— */
.org-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.org-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 12px;
  background: var(--card);
}
.org-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.org-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}
.org-card-head h2 a { color: var(--text); }
.org-card-head h2 a:hover { color: var(--gold); }
.org-card-desc { margin: 6px 0; font-size: 0.9rem; color: var(--muted); }
.org-card-meta { margin: 6px 0 10px; font-size: 0.82rem; }
.org-card-actions { gap: 6px; flex-wrap: wrap; }
.admin-org-cards { margin-top: 8px; }
textarea { resize: vertical; min-height: 80px; }
.legal h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0 0 8px;
}
.legal h2 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
.legal p, .legal li { color: var(--text); line-height: 1.55; }
.legal ul { padding-left: 1.2rem; }

/* —— Mobile denser lists —— */
@media (max-width: 640px) {
  .wrap { padding: 18px 14px 48px; }
  .cal-row {
    grid-template-columns: 56px 1fr;
    gap: 10px;
    padding: 12px 0;
    align-items: start;
  }
  .cal-body { min-width: 0; }
  .cal-row .cal-actions {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 2px;
  }
  .cal-row h2 { font-size: 1.02rem; }
  .event-compact-row {
    align-items: flex-start;
  }
  .event-compact-row .join-inline {
    width: 100%;
  }
  .event-compact-row .join-inline .btn-sm {
    width: 100%;
  }
  .flow-steps { gap: 6px; }
  .flow-step { padding: 6px 10px; font-size: 0.8rem; }
  .auth-modal { padding: 18px 14px 12px; }
  .admin-compact .admin-table { display: block; overflow-x: auto; }
}

