/* UI/UX Pro Max — Sports Team/Club (single light theme). Hall/display uses .stage-page dark tokens. */
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --bg: #fef2f2;
  --bg2: #fff7f7;
  --card: #ffffff;
  --line: #fecaca;
  --text: #7f1d1d;
  --muted: #475569;
  --gold: #dc2626;
  --gold2: #ef4444;
  --red: #b91c1c;
  --ok: #1a7a52;
  --shadow: 0 10px 15px rgba(127, 29, 29, 0.08);
  --shadow-lg: 0 20px 25px rgba(127, 29, 29, 0.12);
  --top-bg: rgba(254, 242, 242, 0.92);
  --input-bg: #fff7f7;
  --flash-ok-bg: #e5f5ec;
  --flash-err-bg: #fee2e2;
  --flash-err-text: #b91c1c;
  --pill-bg: #f0edf1;
  --avatar-bg: #fee2e2;
  --stage-bg: #140a0c;
  --stage-text: #fee2e2;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --atmosphere:
    radial-gradient(ellipse 80% 55% at 10% -10%, rgba(220, 38, 38, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(239, 68, 68, 0.1), transparent 50%),
    linear-gradient(180deg, #fff7f7 0%, var(--bg) 42%, #f5e8ea 100%);
  --hero-shine: linear-gradient(105deg, transparent 38%, rgba(220, 38, 38, 0.08) 50%, transparent 62%);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--atmosphere);
  background-attachment: scroll;
  color: var(--text);
  font-family: "Source Sans 3", "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(--bg);
  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(--gold);
  font-size: 1.55rem;
  line-height: 1;
}
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { color: var(--muted); }
.who { color: var(--muted); }

.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: 28px 0 14px;
  overflow: hidden;
}
.hero::after {
  content: none;
}
.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: var(--shadow-lg);
  border-color: var(--gold);
  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: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  min-height: 40px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, filter 0.2s 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, .btn.danger, .btn-sm.danger,
a.btn.danger, a.btn-sm.danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
button.danger:hover, .btn.danger:hover, .btn-sm.danger:hover,
a.btn.danger:hover, a.btn-sm.danger:hover {
  color: #fff;
  filter: brightness(1.06);
}
button.btn-sm.danger.ghost, .btn-sm.danger.ghost {
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.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(96px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.roster-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px 8px;
  text-align: center;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.roster-card img {
  width: 56px;
  height: 56px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--avatar-bg);
  display: block;
  border: 2px solid #fecaca;
  margin: 0 auto;
}
.roster-card .name {
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.roster-card .seed {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 6px 0 0;
  order: -1;
}

.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 — dark Pro Max tokens (shared fonts, for hall impact) */
.stage-page {
  --bg: #140a0c;
  --bg2: #1c1214;
  --card: #1c1214;
  --line: #7f1d1d;
  --text: #fee2e2;
  --muted: #cbd5e1;
  --gold: #ef4444;
  --gold2: #f87171;
  --ok: #5dcb8a;
  --pill-bg: #241416;
  --avatar-bg: #241416;
  --stage-bg: #140a0c;
  --stage-text: #fee2e2;
  background: var(--stage-bg);
  min-height: 100vh;
  margin: 0;
  color: var(--stage-text);
  color-scheme: dark;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
.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(2.6rem, 9vw, 4.2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 8px;
  line-height: 0.92;
  color: var(--text);
}
.dash-hero {
  position: relative;
  padding: 20px 0 6px;
  margin-bottom: 14px;
  overflow: hidden;
}
.dash-hero::before {
  content: "";
  position: absolute;
  inset: -10% -6% auto;
  height: 110%;
  background:
    radial-gradient(ellipse 50% 45% at 12% 28%, rgba(220, 38, 38, 0.1), transparent 62%),
    var(--hero-shine);
  pointer-events: none;
}
.dash-hero > * { position: relative; z-index: 1; }
.dash-hero-home {
  position: relative;
  margin: 0 -20px var(--space-2xl);
  padding: clamp(36px, 7vw, var(--space-3xl)) clamp(20px, 4vw, 40px) clamp(32px, 5vw, 48px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(105deg, transparent 38%, rgba(220, 38, 38, 0.08) 50%, transparent 62%),
    radial-gradient(ellipse 55% 70% at 85% 20%, rgba(220, 38, 38, 0.16), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 40%, #fff) 0%, var(--bg) 100%);
}
.dash-hero-home::before {
  content: "";
  position: absolute;
  inset: auto -5% -40% 40%;
  height: 120%;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 18px,
      rgba(220, 38, 38, 0.045) 18px,
      rgba(220, 38, 38, 0.045) 19px
    );
  pointer-events: none;
  opacity: 0.9;
}
.dash-hero-home .brand-hero {
  font-size: clamp(3.2rem, 14vw, 6.2rem);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  max-width: 12ch;
  animation: home-fade-up 0.5s 0.05s ease both;
}
.dash-hero-home .dash-kicker {
  animation: home-fade-up 0.45s ease both;
}
.dash-hero-home .lead-tight {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.5;
  max-width: 34rem;
  margin: 0 0 22px;
  animation: home-fade-up 0.5s 0.1s ease both;
}
.dash-hero-home .dash-cta {
  margin-top: 0;
  gap: 12px;
  animation: home-fade-up 0.5s 0.16s ease both;
}
.dash-hero-home .btn {
  border-radius: 12px;
  padding: 12px 22px;
  min-height: 44px;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}
.dash-hero-home .btn:hover {
  background: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.34);
  filter: none;
}
.dash-hero-home .btn.ghost,
.dash-hero-home a.ghost.btn {
  box-shadow: none;
  border-width: 2px;
}
.dash-cta { margin-top: 14px; }
.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);
  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: #fee2e2; color: #b91c1c; }
.badge-done { background: #e4efe8; color: #1a7a52; }
.badge-draft { background: var(--pill-bg); color: var(--muted); }
.badge-scheduled { background: #fee2e2; color: #9f1239; }
.badge-role { font-size: 0.65rem; vertical-align: middle; margin-left: 4px; }
.stage-page .badge-live { background: #3a1520; color: #ff6b7a; }
.stage-page .badge-done { background: #163524; color: #5dcb8a; }
.stage-page .badge-scheduled { background: #3a1520; color: #fca5a5; }

.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;
}
.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);
}
.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;
}
.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: 56px;
  height: 56px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--avatar-bg), var(--pill-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
  border: 2px solid #fecaca;
  margin: 0 auto;
}
.roster-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 6px;
  flex-wrap: wrap;
}
.roster-actions .btn-sm {
  padding: 4px 8px;
  font-size: 0.72rem;
}
.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: 6px;
  margin: 4px 0 2px;
}
@media (max-width: 520px) {
  .role-cards { grid-template-columns: 1fr; }
}
.role-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--bg2);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.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: 2px 0 0; flex: 0 0 auto; }
.role-card-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.role-card strong { display: block; margin-bottom: 0; font-size: 0.88rem; line-height: 1.2; }
.role-card span { color: var(--muted); font-size: 0.72rem; line-height: 1.25; }

/* —— Calendar —— */
.cal-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
  background: var(--pill-bg);
  margin: 0 0 var(--space-xl);
}
.cal-tabs a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.cal-tabs a.is-active {
  background: var(--gold);
  color: #fff;
}
.cal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 0;
}
.cal-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  animation: home-stagger 0.4s ease both;
  animation-delay: calc(0.12s + var(--i, 0) * 0.05s);
}
.cal-row:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
@media (max-width: 640px) {
  .cal-row { grid-template-columns: 72px 1fr; padding: 14px; }
  .cal-row .cal-actions { grid-column: 2; }
  .dash-hero-home { margin-left: -20px; margin-right: -20px; }
}
.cal-date {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--gold);
  text-transform: uppercase;
}
.cal-date small {
  display: block;
  font-family: "Source Sans 3", 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 20px;
  color: var(--muted);
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: var(--card);
}

/* —— 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; }
}

/* 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: "Source Sans 3", sans-serif; }

/* Display / hall: Pro Max dark stage + shared display fonts */
.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, #ef4444);
  margin: 0 0 6px;
}
.stage-page .stage-sub {
  color: var(--muted, #cbd5e1);
  letter-spacing: 0.14em;
  font-family: "Source Sans 3", sans-serif;
}

/* —— Auth modal —— */
body.auth-open { overflow: hidden; }
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 12, 18, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom));
  overflow: hidden;
}
.auth-overlay[hidden] { display: none !important; }
.auth-modal {
  position: relative;
  width: min(440px, 100%);
  max-height: min(92dvh, 100%);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow);
  animation: rise 0.28s ease both;
  overflow: hidden;
}
.auth-close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.auth-close:hover { color: var(--text); }
.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(92dvh, 100%);
  flex: 1 1 auto;
  padding: 14px 16px 10px;
}
.auth-panel[hidden] { display: none !important; }
.auth-panel-head { flex: 0 0 auto; padding-right: 28px; }
.auth-panel h2 { margin: 0 0 2px; font-size: 1.12rem; }
.auth-lead { margin: 0 0 4px; font-size: 0.8rem; line-height: 1.3; }
.auth-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  gap: 0;
}
.auth-form-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
  margin-right: -2px;
}
.auth-form-footer {
  flex: 0 0 auto;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.auth-form-footer .btn {
  width: 100%;
  margin-top: 4px;
  padding: 9px 14px;
}
.auth-switch { margin: 8px 0 0; font-size: 0.82rem; text-align: center; }
.auth-panel label { margin: 6px 0 3px; font-size: 0.78rem; }
.auth-panel input:not([type="checkbox"]):not([type="file"]),
.auth-panel select {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
}
.auth-panel input[type="file"] {
  font-size: 0.82rem;
  padding: 2px 0;
}
.auth-panel .field-error { margin: 2px 0 0; font-size: 0.76rem; }
.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}
@media (max-width: 400px) {
  .auth-grid-2 { grid-template-columns: 1fr; }
}
.legal-check { font-size: 0.78rem; align-items: flex-start; margin: 4px 0; line-height: 1.35; gap: 6px; }
.legal-check a { text-decoration: underline; }

/* —— Home top-3 —— */
.home-top3 {
  margin: 0 0 var(--space-2xl);
  padding: 0;
  border-top: 0;
}
.home-top3-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.home-top3-head .section-title {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.top3-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 720px) {
  .top3-list { grid-template-columns: 1fr; }
}
.top3-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: home-stagger 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  animation-delay: calc(var(--i, 0) * 0.07s);
}
.top3-item:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
}
.top3-item:nth-child(1) { border-color: var(--gold); }
.top3-item img, .top3-item .rating-fallback {
  width: 48px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 2px solid var(--line);
}
.top3-rank {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.85rem;
  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(200px, 1fr));
  gap: 10px;
}
.org-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px 10px;
  background: var(--card);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}
.org-card-compact {
  min-height: 0;
}
.org-card:hover,
.org-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #DC2626) 35%, var(--line));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.09);
  background: #fff;
  outline: none;
}
.org-card:focus-visible {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent, #DC2626) 22%, transparent),
    0 8px 20px rgba(15, 23, 42, 0.09);
}
.org-card-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}
.org-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.org-card-head h2 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  min-width: 0;
}
.org-card-title {
  color: var(--text);
  text-decoration: none;
}
.org-card-title:hover { color: var(--accent, #DC2626); }
.org-card-city { margin: 0; font-size: 0.78rem; }
.org-card-desc { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); line-height: 1.35; }
.org-card-meta { margin: 2px 0 0; font-size: 0.75rem; }
.org-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.org-card-actions .btn-sm {
  margin: 0;
  flex: 1 1 auto;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.75rem;
  text-align: center;
  justify-content: center;
}
.admin-org-cards { margin-top: 8px; }

/* In-page breadcrumbs (org detail) */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.crumbs a {
  color: var(--accent, #DC2626);
  text-decoration: none;
  font-weight: 600;
}
.crumbs a:hover { text-decoration: underline; }
.crumbs-sep {
  color: var(--muted);
  opacity: 0.7;
  user-select: none;
}
.crumbs-current {
  color: var(--text);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 28ch);
}

/* Events hub grouped by organization */
.org-events-hub .org-events-group {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.org-events-group-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.org-events-group-title a { color: var(--text); }
.org-events-group-title a:hover { color: var(--accent, #DC2626); }
.org-events-group-count {
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}
.org-events-panel { margin-top: 4px; }
.org-events-panel-head { margin-bottom: 8px; }
.org-events-panel-head h2 { margin: 0 0 4px; }
.org-event-list { margin-top: 4px; }
.org-edit-sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0 14px;
}
.org-danger-title {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #b91c1c;
}
.org-delete-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  max-width: min(440px, calc(100vw - 24px));
  background: var(--card);
  color: var(--text);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}
.org-delete-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.org-delete-form { padding: 18px 18px 14px; }
.org-delete-form h2 { margin: 0 0 8px; font-size: 1.25rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
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 { border-radius: 12px; }
  .auth-panel { padding: 12px 12px 8px; }
  .admin-compact .admin-table { display: block; overflow-x: auto; }
}

@keyframes home-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes home-stagger {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .dash-hero-home .dash-kicker,
  .dash-hero-home .brand-hero,
  .dash-hero-home .lead-tight,
  .dash-hero-home .dash-cta,
  .top3-item,
  .cal-row {
    animation: none !important;
  }
  .dash-hero-home .btn:hover,
  .top3-item:hover,
  .cal-row:hover {
    transform: none;
  }
}

/* —— Hall QR screensaver —— */
.stage-qr-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
  margin-top: 18px;
  animation: stage-qr-in 0.55s ease both;
}
.stage-qr {
  width: min(42vh, 420px);
  height: min(42vh, 420px);
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  animation: stage-qr-pulse 2.8s ease-in-out infinite;
}
.stage-qr-copy { max-width: 28rem; text-align: left; }
.stage-qr-title { margin-top: 0; }
.stage-qr-hint {
  color: var(--muted, #cbd5e1);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin: 8px 0 0;
}
.stage-qr-steps {
  margin: 16px 0 0;
  color: var(--gold2, #f87171);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
@keyframes stage-qr-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes stage-qr-pulse {
  0%, 100% { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45); }
  50% { box-shadow: 0 28px 96px rgba(220, 38, 38, 0.28); }
}
@media (max-width: 720px) {
  .stage-qr-copy { text-align: center; }
}

/* —— Players: QR control —— */
.players-qr-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #FEF2F2 0%, #fff 55%, #fff7ed 100%);
  border-color: #fecaca;
}
.players-qr-card.is-on {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}
.players-qr-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  margin: 4px 0 8px;
  text-transform: uppercase;
}
.players-qr-actions { margin-top: 12px; }
.players-qr-preview img {
  display: block;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line);
}
@media (max-width: 640px) {
  .players-qr-card { grid-template-columns: 1fr; }
  .players-qr-preview { justify-self: start; }
}

/* —— Mobile join page —— */
.join-page {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(120% 80% at 10% -10%, #fecaca 0%, transparent 50%),
    radial-gradient(90% 60% at 100% 0%, #fee2e2 0%, transparent 45%),
    linear-gradient(180deg, #FEF2F2 0%, #fff 42%, #f8fafc 100%);
  color: var(--text, #0f172a);
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
.join-shell {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}
.join-brand {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #dc2626;
  margin: 0 0 6px;
  animation: home-fade-up 0.45s ease both;
}
.join-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 4px;
  line-height: 1.05;
  animation: home-fade-up 0.5s ease 0.05s both;
}
.join-org {
  color: var(--muted, #64748b);
  margin: 0 0 14px;
  font-size: 0.92rem;
}
.join-lead {
  margin: 0 0 16px;
  color: var(--muted, #64748b);
  line-height: 1.45;
}
.join-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #fecaca;
  border-radius: 14px;
}
.join-mode-tab {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 6px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: #7f1d1d;
  cursor: pointer;
}
.join-mode-tab.is-active {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.22);
}
.join-panel[hidden] { display: none !important; }
.join-account-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 16px;
}
.join-account-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #dc2626;
  background: #fee2e2;
}
.join-account-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.8rem;
  color: #dc2626;
  background: #fee2e2;
}
.join-account-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}
.join-account-mail { margin: 4px 0 0; font-size: 0.88rem; }
.join-alt { text-align: center; margin: 14px 0 0; }
.join-alt a { color: #b91c1c; }
.join-form label { margin-top: 4px; }
.join-form input[type="text"],
.join-form input[name="name"] {
  width: 100%;
  font-size: 1.05rem;
  padding: 12px 14px;
  border-radius: 12px;
}
.join-section-label {
  margin: 18px 0 8px;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.join-file-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1.5px dashed #fca5a5;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-weight: 600;
  color: #b91c1c;
  margin: 0 0 8px;
}
.join-file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.join-hint { margin: 0 0 12px; font-size: 0.88rem; }
.join-preview {
  text-align: center;
  margin-bottom: 14px;
}
.join-preview img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #dc2626;
  background: #fee2e2;
}
.join-submit {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem;
  border-radius: 14px;
  margin-top: 4px;
}
.join-done {
  text-align: center;
  padding: 28px 12px;
  animation: home-fade-up 0.45s ease both;
}
.join-done-mark {
  font-size: 2.6rem;
  color: #16a34a;
  margin: 0 0 8px;
}
.join-done h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
@media (prefers-reduced-motion: reduce) {
  .stage-qr-panel,
  .stage-qr,
  .join-brand,
  .join-title,
  .join-done {
    animation: none !important;
  }
}


/* ——— Guest / quick room (no registration) ——— */
.home-quick-hint {
  margin: 12px 0 0;
  font-size: 0.92rem;
  max-width: 36rem;
}
.home-quick-hint a {
  color: #b91c1c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guest-create-page,
.guest-host-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(220, 38, 38, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(254, 242, 242, 0.9), transparent 50%),
    linear-gradient(180deg, #fff 0%, #fef7f7 40%, #fff 100%);
}
.guest-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}
.guest-shell-create { max-width: 440px; }
.guest-shell .join-brand a { color: inherit; text-decoration: none; }
.guest-create-title,
.guest-host-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin: 8px 0 10px;
  color: #111;
}
.guest-host-meta { margin: 0 0 18px; }
.guest-create-form label,
.guest-add-form label,
.guest-rename label { display: block; margin-top: 12px; font-weight: 600; }
.guest-create-form input,
.guest-create-form select,
.guest-add-form input[type="text"],
.guest-add-form input[name="name"],
.guest-rename input {
  width: 100%;
  box-sizing: border-box;
}
.guest-create-submit {
  margin-top: 18px;
  width: 100%;
  font-size: 1.05rem;
  padding: 14px 18px;
}
.guest-create-note { margin-top: 18px; font-size: 0.88rem; }
.guest-create-note a { color: #b91c1c; }

.guest-qr-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  margin: 18px 0;
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: #fff;
}
.guest-qr-block h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 4px 0 8px;
  font-size: 1.6rem;
}
.guest-qr-figure {
  margin: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid #eee;
}
.guest-qr-figure img {
  display: block;
  width: 200px;
  height: 200px;
}
.guest-join-url {
  margin: 10px 0;
  word-break: break-all;
  font-size: 0.82rem;
}
.guest-join-url code {
  background: #fef2f2;
  padding: 4px 8px;
  display: inline-block;
}
.guest-qr-actions { margin-top: 12px; flex-wrap: wrap; gap: 8px; }

.guest-panel {
  margin: 22px 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.guest-panel h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 1.35rem;
  margin: 0 0 10px;
}
.guest-add-form {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.guest-add-form .btn { margin-top: 8px; justify-self: start; }
.guest-roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.guest-roster li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.guest-roster img,
.guest-roster-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.guest-roster-fallback {
  display: grid;
  place-items: center;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}
.guest-roster-name { flex: 1; font-weight: 600; }
.guest-bracket-actions { flex-wrap: wrap; gap: 8px; }
.guest-host-link .help { margin-bottom: 8px; }

@media (max-width: 640px) {
  .guest-qr-block {
    grid-template-columns: 1fr;
  }
  .guest-qr-figure {
    justify-self: center;
  }
  .guest-qr-figure img {
    width: 180px;
    height: 180px;
  }
  .guest-create-submit,
  .guest-qr-actions .btn,
  .guest-bracket-actions .btn {
    width: 100%;
    text-align: center;
  }
  .guest-qr-actions,
  .guest-bracket-actions {
    display: flex;
    flex-direction: column;
  }
  .guest-qr-actions form,
  .guest-bracket-actions form {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .guest-create-page,
  .guest-host-page { background: #fef7f7; }
}

.guest-roster-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.guest-roster-head h2 { margin: 0; }
.guest-roster-live { margin: 0; font-size: 0.85rem; }
#guest-roster-refresh {
  vertical-align: baseline;
  padding: 2px 8px;
  font-size: 0.8rem;
}
#guest-roster-mount { margin-bottom: 14px; }
.guest-host-meta .btn-sm { margin-left: 4px; }

.guest-save-banner {
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-left: 4px solid #dc2626;
}
.guest-save-banner p { margin: 0 0 10px; }
.guest-save-actions { margin: 0; gap: 8px; flex-wrap: wrap; }
.guest-bound-note { margin: 12px 0; }
.cal-row-guest {
  background: linear-gradient(90deg, rgba(254, 242, 242, 0.85), transparent 55%);
}


/* —— Zen tournament (sole format) —— */
.zen-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.zen-tab {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  background: var(--card);
}
.zen-tab.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent, #DC2626) 45%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #DC2626) 25%, transparent);
}
.zen-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.zen-group-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: var(--shadow);
}
.zen-group-head h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--gold, #b45309);
}
.zen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.zen-table th, .zen-table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.zen-table th { color: var(--muted); font-weight: 600; }
.zen-p {
  display: flex;
  align-items: center;
  gap: 6px;
}
.zen-p img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.zen-status { color: var(--accent, #DC2626); font-size: 0.8rem; white-space: nowrap; }
.zen-g-matches {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.82rem;
}
.zen-g-matches li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  padding: 4px 0;
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
}
.zen-g-matches li.is-current { color: var(--accent, #DC2626); font-weight: 600; }
.zen-mno {
  min-width: 2.4rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.zen-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.zen-queue-list li {
  display: grid;
  grid-template-columns: 3rem 1fr 1.4fr;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.zen-queue-list li.is-current {
  background: color-mix(in srgb, var(--accent, #DC2626) 8%, transparent);
  font-weight: 600;
}
.zen-queue-list li.is-done { opacity: 0.65; }
.zen-queue-list li.is-wait { opacity: 0.45; }
.zen-qlabel { color: var(--muted); font-size: 0.9rem; }
.zen-match-no {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.zen-face-g {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  color: var(--accent, #DC2626);
  font-weight: 700;
}
@media (max-width: 720px) {
  .zen-queue-list li {
    grid-template-columns: 2.5rem 1fr;
  }
  .zen-qpairs { grid-column: 1 / -1; }
}
