/*
 * Apex Night — the final visual layer for F1 Predictions.
 * Loaded after the legacy themes so every section speaks one design language.
 */

:root {
  --apex-bg: #0a0f15;
  --apex-bg-soft: #0f151d;
  --apex-surface: #151d27;
  --apex-surface-2: #1a2430;
  --apex-surface-3: #222e3b;
  --apex-raised: #2a3948;
  --apex-ink: #f5f7fa;
  --apex-ink-soft: #bdc6d2;
  --apex-muted: #929eab;
  --apex-line: rgba(218, 228, 239, 0.16);
  --apex-line-strong: rgba(218, 228, 239, 0.29);
  --apex-red: #ff3326;
  --apex-red-deep: #d61f17;
  --apex-blue: #4c8dff;
  --apex-cyan: #35d5dc;
  --apex-green: #55d69e;
  --apex-amber: #ffc857;
  --apex-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  --apex-shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.24);
  --apex-corner: 3px 22px 3px 3px;
  --apex-corner-sm: 2px 13px 2px 2px;
  --page-max: 1240px;
}

html {
  color-scheme: dark;
  background: var(--apex-bg);
}

body.apex-night-theme.editorial-theme {
  --race-red: var(--apex-red);
  --race-red-dark: var(--apex-red-deep);
  --race-yellow: var(--apex-amber);
  --race-mint: #17342a;
  --race-blue: #172536;
  --race-ink: var(--apex-ink);
  --race-muted: var(--apex-muted);
  --race-paper: var(--apex-surface);
  --race-line: var(--apex-line);
  --race-shadow: var(--apex-shadow);
  --bs-body-color: var(--apex-ink);
  --bs-secondary-color: var(--apex-muted);
  --bs-border-color: var(--apex-line);
  color: var(--apex-ink);
  background:
    radial-gradient(900px 520px at 105% -8%, rgba(255, 51, 38, 0.15), transparent 66%),
    radial-gradient(720px 480px at -10% 18%, rgba(76, 141, 255, 0.11), transparent 70%),
    linear-gradient(180deg, #0b1016 0%, #101720 48%, #0b1118 100%);
}

body.apex-night-theme.editorial-theme::before {
  z-index: -2;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(195, 211, 227, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(195, 211, 227, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.2) 72%, transparent 100%);
}

body.apex-night-theme::after {
  content: "";
  position: fixed;
  z-index: -1;
  right: -16vw;
  top: 38vh;
  width: 70vw;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 51, 38, 0.38), transparent 72%);
  box-shadow: 0 22px 0 rgba(76, 141, 255, 0.1);
  transform: rotate(-16deg);
}

body.apex-night-theme ::selection {
  color: #fff;
  background: rgba(255, 51, 38, 0.78);
}

body.apex-night-theme a {
  color: #9fc0ff;
  text-underline-offset: 0.2em;
}

body.apex-night-theme a:hover {
  color: #fff;
}

body.apex-night-theme .main-content {
  max-width: var(--page-max);
  padding-top: clamp(1.15rem, 2.4vw, 2.15rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

body.apex-night-theme h1,
body.apex-night-theme h2,
body.apex-night-theme h3,
body.apex-night-theme h4,
body.apex-night-theme h5,
body.apex-night-theme h6 {
  color: var(--apex-ink);
}

body.apex-night-theme .section-title,
body.apex-night-theme .section-heading-row h2,
body.apex-night-theme .points-chart-title,
body.apex-night-theme .profile-name,
body.apex-night-theme .community-title,
body.apex-night-theme .season-banner-title,
body.apex-night-theme .auth-title {
  font-family: "Barlow Condensed", "Manrope", sans-serif;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.018em;
  text-transform: uppercase;
}

body.apex-night-theme .section-title {
  font-size: clamp(1.7rem, 3vw, 2.65rem);
}

body.apex-night-theme .section-subtitle,
body.apex-night-theme .text-muted,
body.apex-night-theme .score-subtitle,
body.apex-night-theme .prediction-empty,
body.apex-night-theme .muted-copy {
  color: var(--apex-muted) !important;
}

body.apex-night-theme .eyebrow,
body.apex-night-theme .page-kicker,
body.apex-night-theme .display-kicker,
body.apex-night-theme .dashboard-label,
body.apex-night-theme .section-count,
body.apex-night-theme .event-date,
body.apex-night-theme .points-chart-kicker,
body.apex-night-theme .achievement-kicker,
body.apex-night-theme .community-kicker {
  color: var(--apex-red);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

body.apex-night-theme .page-kicker::before,
body.apex-night-theme .achievement-kicker::before,
body.apex-night-theme .community-kicker::before {
  width: 22px;
  height: 2px;
  background: currentColor;
  box-shadow: 7px 4px 0 rgba(255, 51, 38, 0.35);
}

/* Header and navigation */
body.apex-night-theme.editorial-theme .site-header {
  background: rgba(11, 16, 22, 0.9);
  border: 0;
  box-shadow: 0 1px 0 var(--apex-line), 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

body.apex-night-theme.editorial-theme .site-header::after {
  right: auto;
  width: min(26vw, 360px);
  height: 2px;
  background: linear-gradient(90deg, var(--apex-red), var(--apex-red) 58%, transparent);
}

body.apex-night-theme .site-header > .container {
  max-width: var(--page-max);
}

body.apex-night-theme .site-header-left {
  gap: 1.05rem;
}

body.apex-night-theme .brand-mark {
  width: 23px;
  gap: 3px;
}

body.apex-night-theme .brand-mark i {
  height: 3px;
  border-radius: 0;
  background: var(--apex-red);
  box-shadow: 7px 0 0 rgba(255, 51, 38, 0.24);
}

body.apex-night-theme.editorial-theme .brand-f1,
body.apex-night-theme.editorial-theme .brand-text {
  color: var(--apex-ink);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

body.apex-night-theme.editorial-theme .brand-f1 {
  color: var(--apex-red);
}

body.apex-night-theme .brand-year {
  color: var(--apex-muted);
}

body.apex-night-theme .desktop-nav {
  gap: 0.1rem;
}

body.apex-night-theme .desktop-nav a {
  position: relative;
  padding: 0.72rem 0.7rem;
  border-radius: 0;
  color: #9ba6b4 !important;
  background: transparent;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

body.apex-night-theme .desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  bottom: 0.34rem;
  left: 0.7rem;
  height: 2px;
  background: var(--apex-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

body.apex-night-theme .desktop-nav a:hover,
body.apex-night-theme .desktop-nav a.is-active {
  color: #fff !important;
  background: transparent;
}

body.apex-night-theme .desktop-nav a:hover::after,
body.apex-night-theme .desktop-nav a.is-active::after {
  transform: scaleX(1);
}

body.apex-night-theme.editorial-theme .site-menu-btn,
body.apex-night-theme .nav-chip {
  border: 1px solid var(--apex-line-strong);
  border-radius: var(--apex-corner-sm);
  color: var(--apex-ink) !important;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

body.apex-night-theme .nav-chip:hover {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}

body.apex-night-theme.editorial-theme .site-menu-btn,
body.apex-night-theme.editorial-theme .site-menu-btn:hover,
body.apex-night-theme.editorial-theme .site-menu-btn:focus,
body.apex-night-theme.editorial-theme .site-menu-btn:focus-visible,
body.apex-night-theme.editorial-theme .site-menu-btn:active,
body.apex-night-theme.editorial-theme .site-menu-btn:first-child:active,
body.apex-night-theme.editorial-theme .site-menu-btn.show {
  color: var(--apex-ink) !important;
  border-color: var(--apex-line-strong) !important;
  background: rgba(255, 255, 255, 0.045) !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

body.apex-night-theme.editorial-theme .nav-chip-primary {
  color: #fff !important;
  border-color: var(--apex-red);
  background: var(--apex-red);
}

body.apex-night-theme.editorial-theme .nav-chip-primary:hover {
  border-color: #ff5c50 !important;
  background: #ff4438 !important;
}

body.apex-night-theme .nav-chip-admin {
  border-color: rgba(255, 194, 89, 0.42) !important;
  color: #f5d087 !important;
  background: rgba(255, 194, 89, 0.08) !important;
  font-weight: 900;
}

body.apex-night-theme .nav-chip-admin:hover {
  border-color: rgba(255, 194, 89, 0.72) !important;
  color: #fff1ca !important;
  background: rgba(255, 194, 89, 0.15) !important;
  cursor: pointer;
}

body.apex-night-theme .f1-menu {
  color: var(--apex-ink);
  border-right: 1px solid var(--apex-line);
  background:
    radial-gradient(520px 280px at 0 0, rgba(255, 51, 38, 0.15), transparent 70%),
    #111821;
}

body.apex-night-theme .f1-menu .offcanvas-header {
  border-bottom-color: var(--apex-line);
}

body.apex-night-theme .f1-menu .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.75;
}

/* The old summer selector is intentionally very specific; this must outrank it. */
body.apex-night-theme.summer-theme .offcanvas.f1-menu {
  color: var(--apex-ink);
  border-right: 1px solid var(--apex-line-strong);
  background:
    radial-gradient(440px 250px at 0 0, rgba(255, 51, 38, 0.18), transparent 72%),
    linear-gradient(180deg, #18212b 0%, #111821 100%) !important;
  box-shadow: 22px 0 60px rgba(0, 0, 0, 0.42);
}

body.apex-night-theme.summer-theme .offcanvas.f1-menu .offcanvas-header {
  border-bottom-color: var(--apex-line);
  background: transparent;
}

body.apex-night-theme.summer-theme .offcanvas.f1-menu .offcanvas-body {
  background: transparent;
}

body.apex-night-theme.summer-theme .menu-brand-text,
body.apex-night-theme.summer-theme .menu-user {
  color: var(--apex-ink);
}

body.apex-night-theme.summer-theme .menu-item,
body.apex-night-theme.summer-theme .menu-item:visited {
  color: var(--apex-ink-soft) !important;
  border-color: transparent;
  background: transparent;
}

body.apex-night-theme.summer-theme .menu-item:hover,
body.apex-night-theme.summer-theme .menu-item:focus,
body.apex-night-theme.summer-theme .menu-item:active,
body.apex-night-theme.summer-theme .menu-item.is-active {
  color: #fff !important;
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.065);
}

body.apex-night-theme.summer-theme .menu-divider {
  background: var(--apex-line);
}

body.apex-night-theme .menu-brand-text,
body.apex-night-theme .menu-user {
  color: var(--apex-ink);
}

body.apex-night-theme .menu-brand-f1 {
  color: var(--apex-red);
}

body.apex-night-theme .menu-item {
  position: relative;
  color: var(--apex-ink-soft) !important;
  border: 1px solid transparent;
  border-radius: var(--apex-corner-sm);
  background: transparent;
}

body.apex-night-theme .menu-item:hover,
body.apex-night-theme .menu-item.is-active {
  color: #fff !important;
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.05);
}

body.apex-night-theme .menu-item.is-active::before {
  content: "";
  position: absolute;
  top: 25%;
  bottom: 25%;
  left: -1px;
  width: 3px;
  background: var(--apex-red);
}

body.apex-night-theme .menu-divider {
  border-color: var(--apex-line);
}

body.apex-night-theme .menu-meta {
  color: var(--apex-muted);
}

body.apex-night-theme .season-switcher-link {
  color: var(--apex-ink-soft) !important;
  border-color: var(--apex-line);
  border-radius: 2px 9px 2px 2px;
  background: rgba(255, 255, 255, 0.035);
}

body.apex-night-theme .season-switcher-link:hover {
  color: #fff !important;
  border-color: var(--apex-line-strong);
}

body.apex-night-theme .season-switcher-link.is-current {
  color: #fff !important;
  border-color: var(--apex-red);
  background: var(--apex-red);
}

body.apex-night-theme .menu-account {
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

body.apex-night-theme .menu-account .menu-user {
  color: var(--apex-ink);
}

body.apex-night-theme .menu-logout-btn,
body.apex-night-theme .profile-logout-btn {
  color: var(--apex-muted);
  border: 0;
  border-bottom: 1px solid rgba(255, 51, 38, 0.5);
  border-radius: 0;
  background: transparent;
}

body.apex-night-theme .menu-logout-btn:hover,
body.apex-night-theme .profile-logout-btn:hover {
  color: #fff;
  background: transparent;
  border-color: var(--apex-red);
}

/* Shared surfaces, buttons and forms */
body.apex-night-theme.editorial-theme .card,
body.apex-night-theme.editorial-theme .glass-panel,
body.apex-night-theme.editorial-theme .table-shell,
body.apex-night-theme.editorial-theme .profile-hero,
body.apex-night-theme.editorial-theme .points-chart-shell,
body.apex-night-theme.editorial-theme .season-priority-banner,
body.apex-night-theme .duel-hero,
body.apex-night-theme .duel-panel,
body.apex-night-theme .profile-analytics-shell,
body.apex-night-theme .community-shell {
  color: var(--apex-ink);
  border: 1px solid var(--apex-line);
  border-radius: var(--apex-corner);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 34%),
    var(--apex-surface);
  box-shadow: var(--apex-shadow-soft);
}

body.apex-night-theme.editorial-theme .card-accent-top {
  border-top: 2px solid var(--apex-red);
}

body.apex-night-theme .card-body {
  color: var(--apex-ink);
}

body.apex-night-theme.editorial-theme .btn,
body.apex-night-theme .action-primary,
body.apex-night-theme .action-secondary,
body.apex-night-theme .duel-submit,
body.apex-night-theme .event-card-action {
  min-height: 42px;
  border-radius: 2px 12px 2px 2px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body.apex-night-theme.editorial-theme .btn-primary,
body.apex-night-theme.editorial-theme .open-event-btn,
body.apex-night-theme.editorial-theme .action-primary,
body.apex-night-theme .duel-submit {
  color: #fff !important;
  border-color: var(--apex-red);
  background: var(--apex-red);
  box-shadow: 0 10px 24px rgba(255, 51, 38, 0.18);
}

body.apex-night-theme.editorial-theme .btn-primary:hover,
body.apex-night-theme.editorial-theme .open-event-btn:hover,
body.apex-night-theme.editorial-theme .action-primary:hover,
body.apex-night-theme .duel-submit:hover {
  color: #fff !important;
  border-color: #ff574c;
  background: #ff4438;
  box-shadow: 0 14px 30px rgba(255, 51, 38, 0.24);
  transform: translateY(-2px);
}

body.apex-night-theme .action-secondary,
body.apex-night-theme .btn-outline-light {
  color: var(--apex-ink) !important;
  border-color: var(--apex-line-strong);
  background: rgba(255, 255, 255, 0.04);
}

body.apex-night-theme.editorial-theme .form-control,
body.apex-night-theme.editorial-theme .form-select,
body.apex-night-theme .western-challenge-form .form-select,
body.apex-night-theme .western-challenge-form .form-control {
  min-height: 44px;
  color: var(--apex-ink);
  border: 1px solid var(--apex-line-strong);
  border-radius: 2px 10px 2px 2px;
  background-color: #111821;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body.apex-night-theme.editorial-theme .form-control::placeholder {
  color: #596675;
}

body.apex-night-theme.editorial-theme .form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aeb8c4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

body.apex-night-theme.editorial-theme .form-control:focus,
body.apex-night-theme.editorial-theme .form-select:focus {
  color: #fff;
  border-color: var(--apex-red);
  background-color: #151f2a;
  box-shadow: 0 0 0 3px rgba(255, 51, 38, 0.12);
}

body.apex-night-theme .form-label,
body.apex-night-theme .field-label-row label {
  color: var(--apex-ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

body.apex-night-theme.editorial-theme .deadline-chip,
body.apex-night-theme.editorial-theme .field-points-badge,
body.apex-night-theme .points-chip {
  color: #aeb9c5;
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.045);
}

body.apex-night-theme .alert {
  color: var(--apex-ink);
  border-color: var(--apex-line-strong);
  border-radius: var(--apex-corner-sm);
  background: var(--apex-surface-2);
}

body.apex-night-theme .alert-danger {
  color: #ffc1bd;
  border-color: rgba(255, 51, 38, 0.35);
  background: rgba(255, 51, 38, 0.11);
}

body.apex-night-theme .voting-status {
  color: var(--apex-ink-soft);
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.035);
}

/* Home command center */
body.apex-night-theme .home-command {
  min-height: 440px;
  border: 1px solid var(--apex-line);
  border-radius: 3px 30px 3px 3px;
  background: var(--apex-surface);
  box-shadow: var(--apex-shadow);
}

body.apex-night-theme .home-command-main {
  isolation: isolate;
  padding: clamp(1.55rem, 4.5vw, 3.8rem);
  background:
    linear-gradient(112deg, transparent 62%, rgba(255, 51, 38, 0.08) 62.2%, transparent 62.5%),
    radial-gradient(600px 320px at 104% 8%, rgba(255, 51, 38, 0.18), transparent 72%),
    linear-gradient(145deg, #1a2430, #121922 74%);
}

body.apex-night-theme .home-command-main::after {
  content: none;
  right: 1.8rem;
  bottom: -3.6rem;
  color: rgba(255, 255, 255, 0.027);
  font-size: clamp(9rem, 18vw, 15rem);
}

body.apex-night-theme .home-command-main.has-event-cover::before {
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(8, 12, 17, 0.97) 0%, rgba(8, 12, 17, 0.75) 47%, rgba(8, 12, 17, 0.53) 100%),
    linear-gradient(0deg, rgba(7, 10, 14, 0.7), transparent 60%),
    var(--next-event-cover);
  background-position: center;
  background-size: cover;
  filter: saturate(0.78) contrast(1.06);
  opacity: 0.9;
}

body.apex-night-theme .home-command h1 {
  max-width: 740px;
  color: #fff;
  font-size: clamp(2.3rem, 5.2vw, 4.85rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

body.apex-night-theme .display-kicker {
  color: var(--apex-ink-soft);
}

body.apex-night-theme .home-lead {
  max-width: 650px;
  color: #aeb8c4;
  font-size: clamp(0.82rem, 1.35vw, 0.98rem);
  line-height: 1.65;
}

body.apex-night-theme .countdown-chip {
  border-color: var(--apex-line-strong);
  border-radius: 2px 12px 2px 2px;
  background: rgba(5, 8, 12, 0.7);
  backdrop-filter: blur(12px);
}

body.apex-night-theme .countdown-label {
  color: var(--apex-muted);
}

body.apex-night-theme .countdown-chip strong {
  color: #fff;
}

body.apex-night-theme .prediction-confirmed {
  color: #9eeac7;
  border-color: transparent;
  background: transparent;
}

body.apex-night-theme .prediction-confirmed span {
  color: #06120d;
  background: var(--apex-green);
}

body.apex-night-theme .home-command-side {
  color: var(--apex-ink);
  border-left: 1px solid var(--apex-line);
  background:
    linear-gradient(160deg, rgba(76, 141, 255, 0.08), transparent 36%),
    #111821;
}

body.apex-night-theme .home-command-side .dashboard-label,
body.apex-night-theme .dashboard-rank-row small,
body.apex-night-theme .dashboard-stats small {
  color: var(--apex-muted);
}

body.apex-night-theme .dashboard-rank-row,
body.apex-night-theme .dashboard-stats {
  border-color: var(--apex-line);
}

body.apex-night-theme .dashboard-rank-row strong,
body.apex-night-theme .dashboard-stats strong,
body.apex-night-theme .mini-standings strong {
  color: #fff;
}

body.apex-night-theme .mini-standings a {
  color: var(--apex-ink-soft) !important;
  border-color: var(--apex-line);
}

body.apex-night-theme .mini-standings a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.04);
}

body.apex-night-theme .mini-position {
  color: var(--apex-muted);
}

body.apex-night-theme .mini-avatar {
  background: linear-gradient(145deg, var(--apex-red), #8e1611);
}

body.apex-night-theme .text-link,
body.apex-night-theme .section-inline-link {
  color: var(--apex-ink) !important;
}

body.apex-night-theme .home-duel-alert {
  color: #f5e5d3 !important;
  border-color: rgba(205, 145, 79, 0.3);
  background: rgba(62, 40, 27, 0.68);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

body.apex-night-theme .home-duel-alert-icon {
  color: #23150e;
  background: #e6ad65;
}

body.apex-night-theme .home-duel-alert small {
  color: #e0a96e;
}

/* Editorial feed, result media and event cards */
body.apex-night-theme .editorial-section {
  margin-top: clamp(2rem, 4.2vw, 3.8rem);
}

body.apex-night-theme .section-heading-row {
  margin-bottom: 1rem;
  border-color: var(--apex-line);
}

body.apex-night-theme .crazy-jury-shell {
  margin: 1.2rem 0 2rem;
  padding: clamp(1rem, 2.4vw, 1.7rem);
  border: 1px solid rgba(255, 51, 38, .28);
  border-radius: 3px 20px 3px 3px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(225, 49, 40, .13), transparent 44%),
    linear-gradient(145deg, #18212c, #111821 68%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
}

body.apex-night-theme .crazy-jury-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

body.apex-night-theme .crazy-jury-kicker {
  color: #e6ad65;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .14em;
}

body.apex-night-theme .crazy-jury-heading h2 {
  margin: .25rem 0 .35rem;
  color: #fff;
  font-family: "Barlow Condensed", "Manrope", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1;
}

body.apex-night-theme .crazy-jury-heading p {
  max-width: 42rem;
  margin: 0;
  color: #aeb8c4;
  font-size: .76rem;
  line-height: 1.55;
}

body.apex-night-theme .crazy-jury-event {
  display: grid;
  min-width: 150px;
  gap: .15rem;
  padding: .55rem .7rem;
  border-left: 2px solid #e6ad65;
  background: rgba(255, 255, 255, .035);
}

body.apex-night-theme .crazy-jury-event small {
  color: #8e9aa8;
  font-size: .53rem;
  font-weight: 900;
  letter-spacing: .12em;
}

body.apex-night-theme .crazy-jury-event strong {
  color: #f4f6f8;
  font-size: .74rem;
}

body.apex-night-theme .crazy-jury-event span {
  color: #9ca9b8;
  font-size: .59rem;
}

body.apex-night-theme .crazy-jury-candidates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: 0;
  padding: 0;
  border: 0;
}

body.apex-night-theme .crazy-jury-card {
  position: relative;
  display: flex;
  min-height: 120px;
  flex-direction: column;
  gap: .75rem;
  margin: 0;
  padding: .85rem .9rem;
  border: 1px solid rgba(190, 205, 220, .16);
  border-radius: 3px 12px 3px 3px;
  color: #e9edf2;
  background: rgba(7, 12, 18, .54);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

body.apex-night-theme .crazy-jury-card:hover {
  border-color: rgba(230, 173, 101, .48);
  background: rgba(10, 16, 23, .85);
  transform: translateY(-1px);
}

body.apex-night-theme .crazy-jury-card:has(input:focus-visible) {
  outline: 2px solid #e6ad65;
  outline-offset: 2px;
}

body.apex-night-theme .crazy-jury-card.is-selected {
  border-color: #e6ad65;
  background: linear-gradient(145deg, rgba(230, 173, 101, .13), rgba(8, 13, 19, .8));
  box-shadow: inset 0 0 0 1px rgba(230, 173, 101, .12);
}

body.apex-night-theme .crazy-jury-card.is-own {
  border-style: dashed;
  cursor: not-allowed;
}

body.apex-night-theme .crazy-jury-card-top {
  display: flex;
  min-height: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  padding-right: 1.4rem;
  color: #aab4c0;
  font-size: .51rem;
  font-weight: 900;
  letter-spacing: .09em;
}

body.apex-night-theme .crazy-jury-card-top b {
  color: #e6ad65;
  font-size: .48rem;
  text-align: right;
}

body.apex-night-theme .crazy-jury-card-copy {
  color: #f4f6f8;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body.apex-night-theme .crazy-jury-card input {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #e6ad65;
  cursor: pointer;
}

body.apex-night-theme .crazy-jury-card input:disabled { cursor: not-allowed; }

body.apex-night-theme .crazy-jury-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .9rem;
}

body.apex-night-theme .crazy-jury-footer p {
  margin: 0;
  color: #9da9b6;
  font-size: .63rem;
  line-height: 1.5;
}

body.apex-night-theme .crazy-jury-footer p strong { color: #a8e8c7; }

body.apex-night-theme .crazy-jury-submit {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .55rem .8rem;
  border: 1px solid rgba(230, 173, 101, .56);
  border-radius: 3px 10px 3px 3px;
  color: #151a20;
  background: #e6ad65;
  font: inherit;
  font-size: .68rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

body.apex-night-theme .crazy-jury-submit:hover {
  background: #f2c27f;
  transform: translateY(-1px);
}

body.apex-night-theme .crazy-jury-notice {
  padding: .75rem .85rem;
  border: 1px solid rgba(190, 205, 220, .14);
  border-radius: 3px 10px 3px 3px;
  color: #b9c3ce;
  background: rgba(7, 12, 18, .45);
  font-size: .7rem;
  line-height: 1.5;
}

body.apex-night-theme .crazy-jury-notice a {
  margin-left: .3rem;
  color: #e6ad65;
  font-weight: 800;
  text-decoration: none;
}

body.apex-night-theme .crazy-jury-results {
  margin: .9rem 0 1rem;
  padding: clamp(.8rem, 2vw, 1rem);
  border: 1px solid rgba(230, 173, 101, .22);
  border-radius: 4px 14px 4px 4px;
  background: linear-gradient(145deg, rgba(230, 173, 101, .055), rgba(8, 13, 19, .55));
}
body.apex-night-theme .crazy-jury-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .75rem;
}
body.apex-night-theme .crazy-jury-results-kicker {
  color: #e6ad65;
  font-size: .54rem;
  font-weight: 900;
  letter-spacing: .14em;
}
body.apex-night-theme .crazy-jury-results-header h3 {
  margin: .12rem 0 .15rem;
  color: var(--apex-ink);
  font-size: .95rem;
  font-weight: 900;
}
body.apex-night-theme .crazy-jury-results-header p {
  margin: 0;
  color: var(--apex-muted);
  font-size: .62rem;
}
body.apex-night-theme .crazy-jury-excluded-summary {
  display: grid;
  flex: 0 0 auto;
  gap: .08rem;
  min-width: 122px;
  padding: .45rem .65rem;
  border: 1px solid rgba(255, 88, 76, .28);
  border-radius: 3px 9px 3px 3px;
  background: rgba(255, 51, 38, .08);
}
body.apex-night-theme .crazy-jury-excluded-summary small {
  color: #ff897f;
  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .12em;
}
body.apex-night-theme .crazy-jury-excluded-summary strong {
  color: var(--apex-ink);
  font-size: .77rem;
}
body.apex-night-theme .crazy-jury-excluded-summary span {
  color: var(--apex-muted);
  font-size: .57rem;
}
body.apex-night-theme .crazy-jury-excluded-summary.is-tied {
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, .025);
}
body.apex-night-theme .crazy-jury-excluded-summary.is-tied small { color: var(--apex-muted); }
body.apex-night-theme .crazy-jury-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: .5rem;
}
body.apex-night-theme .crazy-jury-result-card {
  min-width: 0;
  padding: .65rem .7rem;
  border: 1px solid var(--apex-line);
  border-radius: 3px 10px 3px 3px;
  background: rgba(7, 12, 18, .5);
}
body.apex-night-theme .crazy-jury-result-card.is-excluded {
  border-color: rgba(255, 88, 76, .42);
  background: linear-gradient(135deg, rgba(255, 51, 38, .09), rgba(7, 12, 18, .58));
}
body.apex-night-theme .crazy-jury-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
body.apex-night-theme .crazy-jury-result-top span {
  color: var(--apex-muted);
  font-size: .49rem;
  font-weight: 900;
  letter-spacing: .1em;
}
body.apex-night-theme .crazy-jury-result-top strong {
  color: #e6ad65;
  font-size: .63rem;
}
body.apex-night-theme .crazy-jury-result-status {
  display: inline-flex;
  margin-top: .35rem;
  padding: .15rem .35rem;
  border: 1px solid rgba(255, 88, 76, .28);
  border-radius: 999px;
  color: #ff978e;
  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.apex-night-theme .crazy-jury-result-text {
  margin: .4rem 0 .3rem;
  color: var(--apex-ink);
  font-size: .68rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
body.apex-night-theme .crazy-jury-result-author {
  color: var(--apex-muted);
  font-size: .56rem;
}
body.apex-night-theme .crazy-jury-result-author strong { color: var(--apex-ink-soft); }
body.apex-night-theme .crazy-jury-result-voters {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  margin-top: .45rem;
  padding-top: .4rem;
  border-top: 1px solid var(--apex-line);
}
body.apex-night-theme .crazy-jury-result-voters > small {
  flex: 0 0 auto;
  padding-top: .14rem;
  color: var(--apex-muted);
  font-size: .52rem;
}
body.apex-night-theme .crazy-jury-result-voters > div {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  min-width: 0;
}
body.apex-night-theme .crazy-jury-result-voters span {
  max-width: 100%;
  padding: .12rem .35rem;
  border: 1px solid rgba(230, 173, 101, .2);
  border-radius: 999px;
  color: var(--apex-ink-soft);
  font-size: .52rem;
  overflow-wrap: anywhere;
}
body.apex-night-theme .crazy-jury-no-votes {
  margin: 0;
  color: var(--apex-muted);
  font-size: .66rem;
}

@media (max-width: 760px) {
  body.apex-night-theme .crazy-jury-heading { flex-direction: column; }
  body.apex-night-theme .crazy-jury-event { width: 100%; }
  body.apex-night-theme .crazy-jury-candidates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.apex-night-theme .crazy-jury-card { min-height: 110px; padding: .75rem; }
  body.apex-night-theme .crazy-jury-card-copy { font-size: .72rem; }
}

@media (max-width: 480px) {
  body.apex-night-theme .crazy-jury-candidates { grid-template-columns: 1fr; }
  body.apex-night-theme .crazy-jury-card { min-height: 86px; }
  body.apex-night-theme .crazy-jury-footer { align-items: stretch; flex-direction: column; }
  body.apex-night-theme .crazy-jury-submit { width: 100%; }
  body.apex-night-theme .crazy-jury-results-header { align-items: stretch; flex-direction: column; }
  body.apex-night-theme .crazy-jury-excluded-summary { width: 100%; }
  body.apex-night-theme .crazy-jury-results-grid { grid-template-columns: minmax(0, 1fr); }
  body.apex-night-theme .crazy-jury-result-voters { flex-direction: column; }
}

body.apex-night-theme .section-heading-row h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
}

body.apex-night-theme .activity-feed-grid {
  gap: 0.6rem;
}

body.apex-night-theme .activity-feed-item {
  color: var(--apex-ink) !important;
  border-color: var(--apex-line);
  border-radius: var(--apex-corner-sm);
  background: rgba(15, 21, 29, 0.88);
}

body.apex-night-theme .activity-feed-item:hover {
  border-color: rgba(255, 51, 38, 0.35);
  background: #111821;
  box-shadow: var(--apex-shadow-soft);
}

body.apex-night-theme .activity-feed-icon {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(218, 228, 239, 0.18);
  border-radius: 12px;
  color: transparent;
  background-color: #151d27;
}

body.apex-night-theme .activity-feed-icon::before {
  content: "";
  display: block;
  width: 36px;
  height: 35px;
  background-image: url("images/live-paddock-icons.68eaf03ca7ce.png");
  background-repeat: no-repeat;
  background-size: 300% 300%;
  background-position: 50% 0;
  /* Each sprite cell has different transparent padding; per-type offsets center visible artwork. */
  transform: translate(var(--paddock-icon-dx, 0px), var(--paddock-icon-dy, 0px));
}

body.apex-night-theme .activity-feed-item.is-movement .activity-feed-icon {
  --paddock-icon-dx: -0.6px;
  --paddock-icon-dy: -2.6px;
  border-color: rgba(69, 176, 155, 0.3);
}

body.apex-night-theme .activity-feed-item.is-movement .activity-feed-icon::before {
  background-position: 50% 50%;
}

body.apex-night-theme .activity-feed-item.is-leader .activity-feed-icon {
  --paddock-icon-dx: -2.1px;
  --paddock-icon-dy: -4.7px;
  border-color: rgba(129, 198, 156, 0.32);
}

body.apex-night-theme .activity-feed-item.is-leader .activity-feed-icon::before {
  background-position: 0 0;
}

body.apex-night-theme .activity-feed-item.is-record .activity-feed-icon {
  --paddock-icon-dx: 2.1px;
  --paddock-icon-dy: -3.8px;
  border-color: rgba(80, 197, 185, 0.3);
}

body.apex-night-theme .activity-feed-item.is-record .activity-feed-icon::before {
  background-position: 100% 0;
}

body.apex-night-theme .activity-feed-item.is-winner .activity-feed-icon::before {
  background-position: 50% 0;
}

body.apex-night-theme .activity-feed-item.is-winner .activity-feed-icon {
  --paddock-icon-dx: -1.1px;
  --paddock-icon-dy: -4.3px;
}

body.apex-night-theme .activity-news-list {
  position: relative;
  display: grid;
  gap: 0.7rem;
  max-width: 880px;
  padding-left: 1.1rem;
}

body.apex-night-theme .activity-news-list::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  bottom: 0.8rem;
  left: 0.28rem;
  width: 1px;
  background: linear-gradient(180deg, var(--apex-red), rgba(255, 255, 255, 0.08));
}

body.apex-night-theme .activity-news-item {
  position: relative;
  align-items: flex-start;
  min-height: 66px;
  padding: 0.78rem 0.9rem 0.78rem 0.8rem;
  border: 1px solid var(--apex-line);
  border-radius: 3px 14px 3px 3px;
  background: linear-gradient(105deg, rgba(24, 34, 46, 0.96), rgba(14, 20, 28, 0.82));
}

body.apex-night-theme .activity-news-item::before {
  content: "";
  position: absolute;
  top: calc(.78rem + 21px);
  left: -1.1rem;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid var(--apex-red);
  border-radius: 50%;
  background: var(--apex-surface);
  box-shadow: 0 0 0 3px rgba(255, 51, 38, 0.1);
  transform: translateY(-50%);
}

body.apex-night-theme .activity-news-item:hover {
  transform: translateX(3px);
  border-color: rgba(255, 51, 38, 0.38);
  background: #111a24;
}

body.apex-night-theme .activity-news-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

body.apex-night-theme .activity-news-copy strong {
  font-size: 0.86rem;
  line-height: 1.25;
  white-space: normal;
}

body.apex-night-theme .activity-news-label {
  color: var(--apex-red) !important;
  font-size: 0.58rem !important;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.apex-night-theme .activity-news-copy > small:last-child {
  color: var(--apex-muted);
  font-size: 0.64rem;
}

body.apex-night-theme .activity-feed-item.is-perfect-podium .activity-feed-icon {
  --paddock-icon-dx: -2px;
  --paddock-icon-dy: -0.9px;
  border-color: rgba(96, 190, 156, 0.3);
}

body.apex-night-theme .activity-feed-item.is-perfect-podium .activity-feed-icon::before {
  background-position: 0 50%;
}

body.apex-night-theme .activity-feed-item.is-duel-accepted .activity-feed-icon {
  --paddock-icon-dx: 1.7px;
  --paddock-icon-dy: -2.3px;
  border-color: rgba(220, 118, 93, 0.34);
}

body.apex-night-theme .activity-feed-item.is-duel-accepted .activity-feed-icon::before {
  background-position: 100% 50%;
}

body.apex-night-theme .activity-feed-item.is-duel-result .activity-feed-icon {
  --paddock-icon-dx: -2.1px;
  --paddock-icon-dy: 1.8px;
  border-color: rgba(209, 178, 123, 0.3);
}

body.apex-night-theme .activity-feed-item.is-duel-result .activity-feed-icon::before {
  background-position: 0 100%;
}

body.apex-night-theme .activity-feed-item.is-crazy-veto .activity-feed-icon {
  --paddock-icon-dx: 1.1px;
  --paddock-icon-dy: -2.3px;
  border-color: rgba(255, 88, 76, 0.34);
}

body.apex-night-theme .activity-feed-item.is-crazy-veto .activity-feed-icon::before {
  background-position: 100% 50%;
}

body.apex-night-theme .activity-feed-item.is-crazy-veto .activity-news-label {
  color: #ff897f !important;
}

body.apex-night-theme .activity-feed-item.is-arcade-leader .activity-feed-icon,
body.apex-night-theme .activity-feed-item.is-arcade-winner .activity-feed-icon {
  --paddock-icon-dx: -2.1px;
  --paddock-icon-dy: 1.8px;
  border-color: rgba(209, 178, 123, 0.3);
}

body.apex-night-theme .activity-feed-item.is-arcade-leader .activity-feed-icon::before,
body.apex-night-theme .activity-feed-item.is-arcade-winner .activity-feed-icon::before {
  background-position: 0 100%;
}

body.apex-night-theme .activity-feed-item.is-arcade-leader .activity-news-label,
body.apex-night-theme .activity-feed-item.is-arcade-winner .activity-news-label {
  color: var(--apex-amber) !important;
}

body.apex-night-theme .activity-feed-item small {
  color: var(--apex-muted);
}

body.apex-night-theme .results-stage {
  border: 1px solid var(--apex-line);
  border-radius: 3px 25px 3px 3px;
  background: #020304;
  box-shadow: var(--apex-shadow);
}

body.apex-night-theme .results-stage-image {
  height: clamp(220px, 48vw, 540px);
  min-height: 0;
  object-fit: contain;
}

body.apex-night-theme .results-stage .carousel-control-prev-icon,
body.apex-night-theme .results-stage .carousel-control-next-icon {
  border: 1px solid var(--apex-line-strong);
  background-color: rgba(7, 10, 14, 0.82);
  backdrop-filter: blur(10px);
}

body.apex-night-theme .event-editorial-grid {
  gap: 0.85rem;
}

body.apex-night-theme .event-editorial-card {
  border-color: var(--apex-line);
  border-radius: 3px 20px 3px 3px;
  background: var(--apex-surface);
  box-shadow: var(--apex-shadow-soft);
}

body.apex-night-theme .event-editorial-card:hover {
  border-color: rgba(255, 51, 38, 0.36);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
}

body.apex-night-theme .event-media {
  background: #10161d;
}

body.apex-night-theme .event-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(4, 6, 9, 0.68));
}

body.apex-night-theme .event-media img {
  filter: saturate(0.88) contrast(1.04);
}

body.apex-night-theme .event-media-placeholder,
body.apex-night-theme .event-detail-placeholder {
  color: rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(115deg, transparent 52%, rgba(255, 51, 38, 0.16) 52.2%, transparent 52.5%),
    linear-gradient(145deg, #182331, #090d12);
}

body.apex-night-theme .round-flag {
  z-index: 2;
  background: var(--apex-red);
}

body.apex-night-theme .event-state {
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px 9px 2px 2px;
}

body.apex-night-theme .event-state.open {
  color: #07140e;
  border-color: var(--apex-green);
  background: var(--apex-green);
}

body.apex-night-theme .event-state.saved {
  color: #07100d;
  border-color: var(--apex-cyan);
  background: var(--apex-cyan);
}

body.apex-night-theme .event-state.scored {
  background: rgba(76, 141, 255, 0.9);
}

body.apex-night-theme .event-state.soon {
  color: #181005;
  background: var(--apex-amber);
}

body.apex-night-theme .event-state.locked {
  color: #c4ccd5;
  background: rgba(34, 43, 54, 0.92);
}

body.apex-night-theme .event-card-copy {
  padding: 0.9rem 0.95rem 1rem;
}

body.apex-night-theme .event-card-copy h3 {
  min-height: auto;
  margin: 0.28rem 0 0.8rem;
  color: var(--apex-ink);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

body.apex-night-theme .event-card-copy h3 a {
  color: var(--apex-ink) !important;
}

body.apex-night-theme .event-card-foot {
  color: var(--apex-muted);
  border-color: var(--apex-line);
}

body.apex-night-theme .event-card-action {
  width: auto;
  height: 31px;
  min-height: 31px;
  padding: 0 0.58rem;
  color: #fff !important;
  border: 1px solid var(--apex-line-strong);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.61rem;
  white-space: nowrap;
}

body.apex-night-theme .event-card-action.is-open {
  border-color: var(--apex-red);
  background: var(--apex-red);
}

body.apex-night-theme .event-card-action.is-saved {
  color: #07110e !important;
  border-color: var(--apex-cyan);
  background: var(--apex-cyan);
}

body.apex-night-theme .event-card-action.is-scored {
  border-color: var(--apex-blue);
  background: var(--apex-blue);
}

body.apex-night-theme .empty-editorial {
  color: var(--apex-muted);
  border-color: var(--apex-line-strong);
  background: rgba(255, 255, 255, 0.025);
}

/* Event page and prediction details */
body.apex-night-theme .event-hero-card {
  overflow: hidden;
  background: #0b1016;
}

body.apex-night-theme .event-hero-card .section-title {
  color: #fff;
  font-size: clamp(2rem, 5.2vw, 4.2rem);
}

body.apex-night-theme .event-hero-layout {
  background:
    radial-gradient(500px 240px at 100% 0, rgba(255, 51, 38, 0.13), transparent 70%),
    var(--apex-surface);
}

body.apex-night-theme .event-hero-media {
  background: #05070a;
}

body.apex-night-theme .event-hero-image {
  max-height: 460px;
  object-fit: cover;
  filter: saturate(0.84) contrast(1.08);
}

body.apex-night-theme .event-hero-copy {
  padding: clamp(1.2rem, 3.2vw, 2.5rem);
}

body.apex-night-theme .event-hero-deadline {
  color: var(--apex-ink-soft);
  border-left-color: var(--apex-red);
  background: rgba(255, 255, 255, 0.035);
}

body.apex-night-theme .event-hero-deadline small {
  color: var(--apex-muted);
}

body.apex-night-theme .event-status-badge {
  border-radius: 2px 9px 2px 2px;
}

body.apex-night-theme .event-status-badge.is-open {
  color: #07140e;
  border-color: var(--apex-green);
  background: var(--apex-green);
}

body.apex-night-theme .event-status-badge.is-saved {
  color: #071110;
  border-color: var(--apex-cyan);
  background: var(--apex-cyan);
}

body.apex-night-theme .event-status-badge.is-scored {
  color: #fff;
  border-color: var(--apex-blue);
  background: var(--apex-blue);
}

body.apex-night-theme .event-status-badge.is-locked,
body.apex-night-theme .event-status-badge.is-soon {
  color: #c2cad4;
  border-color: var(--apex-line-strong);
  background: var(--apex-surface-3);
}

body.apex-night-theme .prediction-workbench h2 {
  color: var(--apex-ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

body.apex-night-theme .workbench-note {
  color: #9cabb9;
  border-color: var(--apex-blue);
  background: rgba(76, 141, 255, 0.07);
}

body.apex-night-theme .prediction-submit-bar {
  border-color: var(--apex-line-strong);
  border-radius: var(--apex-corner-sm);
  background: rgba(8, 12, 17, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(15px);
}

body.apex-night-theme .prediction-submit-bar span {
  color: var(--apex-muted);
}

body.apex-night-theme .result-facts-item,
body.apex-night-theme .prediction-item,
body.apex-night-theme .comparison-row,
body.apex-night-theme .comparison-value-card {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  border-radius: var(--apex-corner-sm);
  background: rgba(255, 255, 255, 0.035);
}

body.apex-night-theme .result-facts-label,
body.apex-night-theme .prediction-item-label,
body.apex-night-theme .comparison-value-label,
body.apex-night-theme .comparison-note,
body.apex-night-theme .season-fact {
  color: var(--apex-muted);
}

body.apex-night-theme.editorial-theme .score-card {
  position: relative;
  overflow: hidden;
  color: var(--apex-ink);
  border-color: var(--apex-line-strong);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 51, 38, 0.12), transparent 32%),
    linear-gradient(145deg, #17212c 0%, #101720 68%, #0d141c 100%);
  box-shadow: var(--apex-shadow-soft);
}

body.apex-night-theme.editorial-theme .score-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--apex-red), rgba(255, 51, 38, 0.18) 52%, transparent);
}

body.apex-night-theme .score-card h2 {
  color: var(--apex-ink);
  font-family: "Barlow Condensed", "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

body.apex-night-theme .score-total {
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 28px rgba(255, 51, 38, 0.24);
}

body.apex-night-theme .score-card .kpi-divider {
  border: 0;
  background: var(--apex-line);
}

body.apex-night-theme .score-card .breakdown-box {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  background: rgba(5, 9, 14, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body.apex-night-theme .breakdown-row {
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

body.apex-night-theme .comparison-shell {
  border-color: var(--apex-line);
  background: #090e14;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body.apex-night-theme .comparison-status-hit,
body.apex-night-theme .comparison-points-hit {
  color: #b9f2d2;
  border-color: rgba(85, 214, 158, 0.42);
  background: #18382c;
}

body.apex-night-theme .comparison-status-partial,
body.apex-night-theme .comparison-points-partial {
  color: #ffe1a1;
  border-color: rgba(239, 190, 91, 0.42);
  background: #3a2e17;
}

body.apex-night-theme .comparison-status-miss,
body.apex-night-theme .comparison-points-miss {
  color: #ffc4be;
  border-color: rgba(232, 104, 94, 0.42);
  background: #3a211f;
}

body.apex-night-theme .community-shell {
  overflow: hidden;
}

body.apex-night-theme .community-head {
  border-bottom: 1px solid var(--apex-line);
  background:
    linear-gradient(112deg, transparent 67%, rgba(255, 51, 38, 0.08) 67.2%, transparent 67.5%),
    #0d131a;
}

body.apex-night-theme .community-title {
  color: var(--apex-ink);
}

body.apex-night-theme .community-copy {
  color: var(--apex-muted);
}

body.apex-night-theme.editorial-theme .table,
body.apex-night-theme .community-table {
  --bs-table-color: var(--apex-ink-soft);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--apex-line);
  color: var(--apex-ink-soft);
}

body.apex-night-theme.editorial-theme .table > :not(caption) > * > *,
body.apex-night-theme .community-table > :not(caption) > * > * {
  color: inherit;
  border-color: var(--apex-line);
  background: transparent;
}

body.apex-night-theme.editorial-theme .table thead th,
body.apex-night-theme .community-table thead th {
  color: #8e9aa8;
  border-color: var(--apex-line);
  background: #090d12;
}

body.apex-night-theme .community-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

body.apex-night-theme .community-table tbody td:first-child {
  background: rgba(255, 255, 255, 0.018);
}

body.apex-night-theme .community-prediction-correct {
  color: #74e3b2 !important;
  background: rgba(85, 214, 158, 0.055) !important;
}

body.apex-night-theme .community-score {
  color: var(--apex-ink);
  border-color: var(--apex-line-strong);
  background: rgba(255, 255, 255, 0.055);
}

body.apex-night-theme .community-round-winner td {
  background: rgba(255, 200, 87, 0.075) !important;
}

body.apex-night-theme .community-winner-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.34rem;
  margin: 0.36rem 0 0;
  padding: 0.22rem 0.5rem;
  border: 1px solid rgba(108, 196, 145, 0.3);
  border-radius: 999px;
  color: #b9e8cc;
  background: rgba(43, 101, 69, 0.22);
  font-size: 0.61rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-transform: none;
}

body.apex-night-theme .community-winner-label::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #79d39b;
  box-shadow: 0 0 0 3px rgba(121, 211, 155, 0.1);
}

/* Western duel — a warm, intentional feature inside the night paddock */
body.apex-night-theme .western-duel {
  --western-ink: #f6e7d3;
  --western-brown: #b37749;
  --western-rust: #ed784c;
  color: #f5e7d7;
  border-color: rgba(205, 145, 79, 0.26);
  background:
    radial-gradient(560px 220px at 92% 0, rgba(214, 111, 58, 0.17), transparent 72%),
    linear-gradient(145deg, #1a130f, #100d0b);
  box-shadow: var(--apex-shadow);
}

body.apex-night-theme .western-duel::after {
  height: 3px;
  background: linear-gradient(90deg, #d89752, #7e4329 36%, transparent 74%);
}

body.apex-night-theme .western-duel.has-duel-art::before {
  background-image:
    linear-gradient(90deg, rgba(20, 14, 11, 0.96) 0%, rgba(20, 14, 11, 0.76) 50%, rgba(20, 14, 11, 0.82) 100%),
    var(--western-duel-art);
  filter: sepia(0.2) saturate(0.76) contrast(1.08);
}

body.apex-night-theme .western-duel-heading h2 {
  color: #fff1df;
}

body.apex-night-theme .western-duel-heading p {
  color: #a98d79;
}

body.apex-night-theme .western-stake-seal {
  width: 116px;
  height: 116px;
  min-height: 116px;
  padding: 1.35rem;
  color: #fff3df;
  background: radial-gradient(circle at 50% 42%, #855038, #43271d 74%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
}

body.apex-night-theme .western-stake-seal small,
body.apex-night-theme .western-stake-seal span {
  width: 72px;
  max-width: 72px;
  color: #f6ddc2;
  font-size: 0.43rem;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0.045em;
  text-align: center;
  white-space: normal;
}

body.apex-night-theme .western-duel-limit {
  position: relative;
  width: 156px;
  height: auto;
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: end;
  gap: 0.15rem 0.42rem;
  flex: 0 0 auto;
  padding: 0.8rem 0.9rem 0.72rem;
  overflow: hidden;
  color: #fff3df;
  border: 1px solid rgba(224, 169, 111, 0.3);
  border-radius: 2px 16px 2px 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 48%),
    #2b1d17;
  clip-path: none;
  filter: none;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
  text-align: left;
}

body.apex-night-theme .western-duel-limit::before {
  content: "";
  position: absolute;
  top: 0;
  right: 42%;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #e78b55, #b84f2d);
}

body.apex-night-theme .western-duel-limit small {
  grid-column: 1 / -1;
  width: auto;
  max-width: none;
  color: #c8aa91;
  font-size: 0.5rem;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

body.apex-night-theme .western-duel-limit strong {
  margin: 0;
  color: #ffd384;
  font-size: 2.15rem;
  line-height: 0.82;
}

body.apex-night-theme .western-duel-limit span {
  width: auto;
  max-width: none;
  padding-bottom: 0.12rem;
  color: #d5b89d;
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

body.apex-night-theme .western-stake-seal strong {
  margin: 0.1rem 0;
  color: #ffd384;
  font-size: 2.5rem;
  line-height: 0.76;
}

body.apex-night-theme .western-showdown {
  grid-template-columns: minmax(0, 1fr) 116px minmax(0, 1fr);
}

body.apex-night-theme .western-showdown,
body.apex-night-theme .western-challenge-form,
body.apex-night-theme .western-roster-card,
body.apex-night-theme .western-duel-empty {
  color: #f4e6d5;
  border-color: rgba(205, 145, 79, 0.24);
  background: rgba(255, 235, 210, 0.035);
}

body.apex-night-theme .western-showdown {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

body.apex-night-theme .western-fighter strong,
body.apex-night-theme .western-roster-card strong,
body.apex-night-theme .western-challenge-form strong,
body.apex-night-theme .western-duel-state strong {
  color: #fff0db;
}

body.apex-night-theme .western-fighter small,
body.apex-night-theme .western-challenge-form small,
body.apex-night-theme .western-duel-empty,
body.apex-night-theme .western-duel-history span {
  color: #a98d79;
}

body.apex-night-theme .western-duel-state {
  border-color: rgba(205, 145, 79, 0.2);
  background: rgba(205, 145, 79, 0.06);
}

body.apex-night-theme .western-avatar {
  border: 0;
  background: linear-gradient(145deg, #8a4a31, #49281e);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

body.apex-night-theme .western-btn {
  border-radius: 2px 10px 2px 2px;
}

body.apex-night-theme .western-btn.is-accept,
body.apex-night-theme .western-btn.is-challenge {
  color: #1a0e08;
  border-color: #df9d5d;
  background: #df9d5d;
}

body.apex-night-theme .western-btn.is-challenge {
  color: #fff;
  border-color: #ef7646;
  background: linear-gradient(135deg, #ef7646, #b94729);
  box-shadow: 0 10px 24px rgba(224, 91, 49, 0.3), 0 0 0 3px rgba(224, 91, 49, 0.08);
}

body.apex-night-theme .western-btn.is-challenge:hover,
body.apex-night-theme .western-btn.is-challenge:focus-visible {
  border-color: #ff986e;
  background: linear-gradient(135deg, #fa8554, #ca5330);
  box-shadow: 0 14px 30px rgba(224, 91, 49, 0.38), 0 0 0 4px rgba(224, 91, 49, 0.11);
}

body.apex-night-theme .western-btn.is-decline,
body.apex-night-theme .western-btn.is-quiet {
  color: #d7b99a;
  border-color: rgba(205, 145, 79, 0.28);
  background: transparent;
}

body.apex-night-theme .western-btn.is-quiet {
  color: #f1c49f;
  border-color: rgba(231, 126, 74, 0.58);
  background: rgba(205, 92, 48, 0.1);
  box-shadow: 0 0 0 3px rgba(205, 92, 48, 0.05);
}

body.apex-night-theme .western-btn.is-quiet:hover,
body.apex-night-theme .western-btn.is-quiet:focus-visible {
  color: #fff0df;
  border-color: #e78455;
  background: rgba(205, 92, 48, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(205, 92, 48, 0.08);
}

body.apex-night-theme .western-duel-history span {
  border-color: rgba(205, 145, 79, 0.18);
  background: rgba(255, 240, 218, 0.03);
}

/* Standings and points graph */
body.apex-night-theme .round-winner-spotlight {
  color: var(--apex-ink);
  border-color: rgba(255, 200, 87, 0.28);
  border-radius: var(--apex-corner);
  background:
    radial-gradient(420px 170px at 100% 0, rgba(255, 200, 87, 0.14), transparent 72%),
    linear-gradient(135deg, #15150f, #0d1117 62%);
  box-shadow: var(--apex-shadow-soft);
}

body.apex-night-theme .round-winner-kicker {
  color: var(--apex-amber);
}

body.apex-night-theme .round-winner-copy strong {
  color: var(--apex-ink);
}

body.apex-night-theme .round-winner-person {
  color: var(--apex-ink) !important;
  border-color: rgba(255, 200, 87, 0.22);
  background: rgba(255, 255, 255, 0.035);
}

body.apex-night-theme .round-winner-person small {
  color: #c2a35d;
}

body.apex-night-theme .round-winner-person > b {
  color: var(--apex-amber);
}

body.apex-night-theme .round-winner-avatar {
  border-color: rgba(255, 200, 87, 0.5);
  background: linear-gradient(145deg, #e7b03f, #8b5c0a);
  box-shadow: none;
}

body.apex-night-theme.editorial-theme .leaderboard-luxe .table-responsive,
body.apex-night-theme.editorial-theme .leaderboard-table .sticky-col {
  background: #0b1016;
}

body.apex-night-theme .leaderboard-luxe {
  border-color: var(--apex-line);
  box-shadow: var(--apex-shadow);
}

body.apex-night-theme .leaderboard-luxe .table-responsive {
  background: #0b1016;
}

body.apex-night-theme .leaderboard-table .sticky-col {
  background: rgba(11, 16, 22, 0.98);
  box-shadow: 10px 0 20px rgba(0, 0, 0, 0.26);
}

body.apex-night-theme .leaderboard-table tbody tr:hover td {
  background: rgba(76, 141, 255, 0.045) !important;
}

body.apex-night-theme .rank-chip,
body.apex-night-theme .race-points {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.045);
}

body.apex-night-theme .total-chip {
  color: #fff;
  border-color: rgba(255, 51, 38, 0.45);
  background: rgba(255, 51, 38, 0.18);
}

body.apex-night-theme .player-link {
  color: var(--apex-ink) !important;
}

body.apex-night-theme .leaderboard-table .player-link,
body.apex-night-theme .leaderboard-table .player-link:hover,
body.apex-night-theme .leaderboard-table .player-link:focus,
body.apex-night-theme .leaderboard-table .player-link:active {
  border-bottom: 0 !important;
  text-decoration: none !important;
}

body.apex-night-theme .table-avatar,
body.apex-night-theme .profile-avatar {
  color: #fff;
  border: 0;
  background: linear-gradient(145deg, #33465b, #1d2a38);
  box-shadow: none;
}

/* Keep profile photos framed and cropped consistently across standings,
   the home-page top three, and avatars shown on event/duel pages. */
body.apex-night-theme .mini-avatar,
body.apex-night-theme .table-avatar,
body.apex-night-theme .western-avatar,
body.apex-night-theme .duel-avatar,
body.apex-night-theme .round-winner-avatar {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  overflow: hidden;
}

body.apex-night-theme .mini-avatar img,
body.apex-night-theme .table-avatar img,
body.apex-night-theme .western-avatar img,
body.apex-night-theme .duel-avatar img,
body.apex-night-theme .round-winner-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: inherit;
}

body.apex-night-theme .achievement-count {
  color: #241903;
  border-color: var(--apex-amber);
  background: var(--apex-amber);
}

body.apex-night-theme .leaderboard-table tr.is-round-winner td {
  background: rgba(255, 200, 87, 0.065) !important;
}

body.apex-night-theme .leaderboard-table tr.is-round-winner td:first-child {
  box-shadow: inset 3px 0 0 var(--apex-amber), 10px 0 20px rgba(0, 0, 0, 0.26);
}

body.apex-night-theme .points-chart-shell {
  background:
    radial-gradient(600px 240px at 100% 0, rgba(76, 141, 255, 0.1), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .points-chart-shell::after {
  opacity: 0.08;
}

body.apex-night-theme .points-chart-head {
  border-color: var(--apex-line);
}

body.apex-night-theme .points-chart-title {
  color: var(--apex-ink);
}

body.apex-night-theme .points-chart-subtitle,
body.apex-night-theme .points-chart-note,
body.apex-night-theme .points-chart-summary small {
  color: var(--apex-muted);
}

body.apex-night-theme .points-chart-summary {
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.035);
}

body.apex-night-theme .points-chart-summary span {
  color: var(--apex-ink);
}

body.apex-night-theme .points-chart-viewport,
body.apex-night-theme .points-chart-canvas {
  border-color: var(--apex-line);
  background: #090e14;
}

body.apex-night-theme .points-chart-legend-item {
  color: var(--apex-ink-soft);
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.035);
}

body.apex-night-theme .points-chart-tooltip {
  color: var(--apex-ink);
  border-color: var(--apex-line-strong);
  background: rgba(7, 10, 14, 0.94);
}

/* Player profile */
body.apex-night-theme .profile-page-controls {
  color: var(--apex-ink);
}

body.apex-night-theme .profile-hero {
  background:
    linear-gradient(112deg, transparent 67%, rgba(255, 51, 38, 0.1) 67.2%, transparent 67.5%),
    radial-gradient(540px 210px at 100% 0, rgba(255, 51, 38, 0.12), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .profile-hero::before {
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.04), transparent 38%);
}

body.apex-night-theme .profile-name {
  color: #fff;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
}

body.apex-night-theme .profile-avatar-hint,
body.apex-night-theme .telegram-connect-note {
  color: var(--apex-muted);
}

body.apex-night-theme .profile-avatar-editable:hover {
  border-color: var(--apex-red);
  box-shadow: 0 0 0 5px rgba(255, 51, 38, 0.11);
}

body.apex-night-theme .profile-avatar-menu {
  color: var(--apex-ink);
  border-color: var(--apex-line-strong);
  background: #101720;
  box-shadow: var(--apex-shadow);
}

body.apex-night-theme .profile-avatar-menu::before {
  border-color: var(--apex-line-strong);
  background: #101720;
}

body.apex-night-theme .profile-avatar-menu-action {
  color: var(--apex-ink);
  background: transparent;
}

body.apex-night-theme .profile-avatar-menu-action:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.apex-night-theme .profile-avatar-menu-action small {
  color: var(--apex-muted);
}

body.apex-night-theme .profile-avatar-menu-icon {
  color: #fff;
  background: var(--apex-red);
}

body.apex-night-theme .telegram-connect-card {
  color: var(--apex-ink);
  border-color: rgba(76, 141, 255, 0.22);
  background: rgba(76, 141, 255, 0.06);
}

body.apex-night-theme .profile-stat-card {
  border-color: var(--apex-line);
  border-radius: var(--apex-corner-sm);
  background: rgba(255, 255, 255, 0.032);
}

body.apex-night-theme .profile-stat-card small {
  color: var(--apex-muted);
}

body.apex-night-theme .profile-stat-card strong {
  color: var(--apex-ink);
}

body.apex-night-theme .profile-stat-detail {
  display: block;
  margin-top: 0.32rem;
  color: var(--apex-muted);
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.apex-night-theme .profile-analytics-shell {
  background:
    radial-gradient(640px 220px at 100% 0, rgba(53, 213, 220, 0.07), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .profile-analytics-head {
  border-color: var(--apex-line);
}

body.apex-night-theme .profile-analytics-head p {
  color: var(--apex-muted);
}

body.apex-night-theme .accuracy-card,
body.apex-night-theme .insight-card {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  border-radius: var(--apex-corner-sm);
  background: rgba(255, 255, 255, 0.032);
}

body.apex-night-theme .accuracy-card small,
body.apex-night-theme .accuracy-card span,
body.apex-night-theme .insight-card small,
body.apex-night-theme .insight-card span {
  color: var(--apex-muted);
}

body.apex-night-theme .accuracy-ring {
  --ring-color: var(--apex-red);
  color: var(--apex-ink);
  background: conic-gradient(var(--ring-color) var(--accuracy), rgba(255, 255, 255, 0.07) 0);
}

body.apex-night-theme .accuracy-card:nth-child(2) .accuracy-ring {
  --ring-color: var(--apex-blue);
}

body.apex-night-theme .accuracy-card:nth-child(3) .accuracy-ring {
  --ring-color: var(--apex-green);
}

body.apex-night-theme .accuracy-ring::after {
  background: var(--apex-surface-2);
}

body.apex-night-theme .accuracy-ring strong {
  color: var(--apex-ink);
}

body.apex-night-theme .insight-favorite {
  border-top-color: var(--apex-blue);
}

body.apex-night-theme .insight-strong {
  border-top-color: var(--apex-green);
}

body.apex-night-theme .insight-weak {
  border-top-color: var(--apex-red);
}

body.apex-night-theme .achievement-card {
  border-color: var(--apex-line);
  border-radius: var(--apex-corner-sm);
  background: rgba(255, 255, 255, 0.032);
}

body.apex-night-theme .achievement-card strong {
  color: var(--apex-ink);
}

body.apex-night-theme .achievement-card small {
  color: var(--apex-muted);
}

body.apex-night-theme .achievement-icon {
  background: rgba(255, 255, 255, 0.045);
}

body.apex-night-theme .mini-trend {
  border-color: var(--apex-line);
  background: #090e14;
}

body.apex-night-theme .mini-trend polyline {
  stroke: var(--apex-red);
}

body.apex-night-theme .prediction-card,
body.apex-night-theme.editorial-theme .prediction-card {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  border-radius: var(--apex-corner-sm);
  background: #0b1016;
  box-shadow: none;
}

body.apex-night-theme .prediction-head {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.028);
}

body.apex-night-theme .prediction-round {
  color: var(--apex-red);
}

body.apex-night-theme .score-pill {
  color: #07120e;
  border-color: var(--apex-green);
  background: var(--apex-green);
}

/* Participant comparison */
body.apex-night-theme .duel-hero {
  background:
    linear-gradient(112deg, transparent 66%, rgba(255, 51, 38, 0.1) 66.2%, transparent 66.5%),
    radial-gradient(540px 220px at 100% 0, rgba(76, 141, 255, 0.1), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .duel-selector label > span {
  color: var(--apex-muted);
}

body.apex-night-theme .duel-selector-vs {
  color: var(--apex-red);
}

body.apex-night-theme .duel-scoreboard {
  border-color: var(--apex-line);
  border-radius: var(--apex-corner);
  background: #090e14;
  box-shadow: var(--apex-shadow);
}

body.apex-night-theme .duel-player {
  color: var(--apex-ink);
  background:
    linear-gradient(145deg, rgba(76, 141, 255, 0.07), transparent 48%),
    var(--apex-surface);
}

body.apex-night-theme .duel-player-b {
  background:
    linear-gradient(215deg, rgba(255, 51, 38, 0.08), transparent 48%),
    var(--apex-surface);
}

body.apex-night-theme .duel-player small,
body.apex-night-theme .duel-player span,
body.apex-night-theme .duel-head-to-head small,
body.apex-night-theme .duel-head-to-head p {
  color: var(--apex-muted);
}

body.apex-night-theme .duel-head-to-head {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  background: #070a0e;
}

body.apex-night-theme .duel-head-to-head > div span {
  color: var(--apex-red);
}

body.apex-night-theme .duel-panel-head {
  border-color: var(--apex-line);
}

body.apex-night-theme .duel-panel-head > span,
body.apex-night-theme .duel-accuracy-row > strong,
body.apex-night-theme .duel-accuracy-value small {
  color: var(--apex-muted);
}

body.apex-night-theme .duel-chart-wrap,
body.apex-night-theme .duel-round-row,
body.apex-night-theme .duel-accuracy-row {
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.025);
}

body.apex-night-theme .duel-round-row {
  color: var(--apex-ink) !important;
}

body.apex-night-theme .duel-round-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.apex-night-theme .duel-round-row > b {
  color: var(--apex-ink);
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.045);
}

body.apex-night-theme .duel-round-row > b.is-winner {
  color: #07140e;
  border-color: var(--apex-green);
  background: var(--apex-green);
}

body.apex-night-theme .duel-chart-grid {
  stroke: rgba(195, 210, 225, 0.12);
}

body.apex-night-theme .duel-chart-x-label,
body.apex-night-theme .duel-chart-y-label {
  fill: #7f8b98;
}

body.apex-night-theme .duel-chart-legend span {
  color: var(--apex-ink-soft);
}

body.apex-night-theme .duel-empty {
  color: var(--apex-muted);
  border-color: var(--apex-line);
  background: rgba(255, 255, 255, 0.025);
}

/* Season predictions and authentication */
body.apex-night-theme .season-priority-banner {
  background:
    linear-gradient(112deg, transparent 64%, rgba(255, 51, 38, 0.12) 64.2%, transparent 64.5%),
    radial-gradient(580px 220px at 100% 0, rgba(255, 51, 38, 0.14), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .season-banner-title {
  color: var(--apex-ink);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
}

body.apex-night-theme .season-banner-subtitle {
  color: var(--apex-muted);
}

body.apex-night-theme .season-banner-subtitle strong {
  color: var(--apex-ink);
}

body.apex-night-theme .status-pill {
  gap: 0.45rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.7rem;
  letter-spacing: 0.075em;
}

body.apex-night-theme .status-pill i {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 15%, transparent);
}

body.apex-night-theme.editorial-theme .status-open {
  color: #77e3b5;
  border: 0;
  background: transparent;
}

body.apex-night-theme.editorial-theme .status-locked {
  color: #c6ced7;
  border: 0;
  background: transparent;
}

body.apex-night-theme.editorial-theme .status-scored {
  color: #91b6ff;
  border: 0;
  background: transparent;
}

body.apex-night-theme .season-header-status {
  min-width: 150px;
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 1px solid var(--apex-line-strong);
}

body.apex-night-theme .season-header-status > small {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--apex-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.apex-night-theme .season-scoring-card {
  position: relative;
  overflow: hidden;
  border-color: var(--apex-line-strong);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 52%),
    var(--apex-surface-2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

body.apex-night-theme .season-scoring-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 76px;
  height: 2px;
  background: var(--apex-red);
}

body.apex-night-theme .season-scoring-card::after {
  display: none;
}

body.apex-night-theme .season-scoring-head {
  margin-bottom: 0.75rem;
}

body.apex-night-theme .season-scoring-head span {
  display: block;
  color: var(--apex-red);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.apex-night-theme .season-scoring-head h2 {
  margin: 0.22rem 0 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

body.apex-night-theme .season-scoring-list {
  border-top: 1px solid var(--apex-line);
}

body.apex-night-theme .season-points-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 48px;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--apex-line);
}

body.apex-night-theme .season-points-row:last-child {
  border-bottom: 0;
}

body.apex-night-theme .season-points-label {
  color: var(--apex-ink-soft);
  font-size: 0.77rem;
  line-height: 1.35;
}

body.apex-night-theme .season-points-value {
  width: 52px;
  min-height: 34px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.18rem;
  color: #fff;
  border-left: 2px solid var(--apex-red);
  background: rgba(255, 51, 38, 0.1);
}

body.apex-night-theme .season-points-value strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.25rem;
  line-height: 1;
}

body.apex-night-theme .season-points-value small {
  color: #cf8d88;
  font-size: 0.48rem;
  font-weight: 800;
  text-transform: uppercase;
}

body.apex-night-theme .season-form-panel {
  border-color: var(--apex-line-strong);
  background:
    radial-gradient(720px 250px at 100% 0, rgba(76, 141, 255, 0.08), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .season-form-heading {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--apex-line);
}

body.apex-night-theme .season-form-heading h2 {
  margin: 0.3rem 0 0.3rem;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
}

body.apex-night-theme .season-form-heading p {
  margin: 0;
  color: var(--apex-muted);
  font-size: 0.78rem;
}

body.apex-night-theme .season-form-group {
  margin-top: 0.85rem;
  padding: clamp(0.9rem, 2vw, 1.25rem);
  border: 1px solid var(--apex-line);
  border-radius: 2px 15px 2px 2px;
  background: rgba(255, 255, 255, 0.032);
}

body.apex-night-theme .season-form-group-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

body.apex-night-theme .season-form-group-head > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  border: 1px solid rgba(255, 51, 38, 0.5);
  border-radius: 2px 10px 2px 2px;
  background: rgba(255, 51, 38, 0.12);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}

body.apex-night-theme .season-form-group-head h3 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  text-transform: uppercase;
}

body.apex-night-theme .season-form-group-head p {
  margin: 0.12rem 0 0;
  color: var(--apex-muted);
  font-size: 0.65rem;
}

body.apex-night-theme .season-form-group .form-label {
  min-height: 2.3em;
  margin-bottom: 0.4rem;
  color: var(--apex-ink-soft);
  font-size: 0.7rem;
  line-height: 1.25;
}

body.apex-night-theme .season-form-group .form-control,
body.apex-night-theme .season-form-group .form-select {
  border-radius: 2px 10px 2px 2px;
  background-color: #1b2632;
}

body.apex-night-theme .season-form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.8rem 0 0;
}

body.apex-night-theme .season-form-submit > span {
  color: var(--apex-muted);
  font-size: 0.68rem;
}

body.apex-night-theme .auth-shell {
  min-height: min(680px, calc(100vh - 160px));
}

body.apex-night-theme .auth-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 220px at 100% 0, rgba(255, 51, 38, 0.13), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .auth-card::after {
  content: "";
  position: absolute;
  right: -95px;
  bottom: -95px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 51, 38, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255, 51, 38, 0.025), 0 0 0 64px rgba(255, 51, 38, 0.018);
  pointer-events: none;
}

body.apex-night-theme .auth-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

body.apex-night-theme .auth-note {
  color: var(--apex-muted);
}

/* Footer */
body.apex-night-theme.editorial-theme footer {
  color: var(--apex-muted);
  border-top: 1px solid var(--apex-line);
  background: rgba(4, 6, 9, 0.62);
}

body.apex-night-theme .footer-inner {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

body.apex-night-theme .footer-brand {
  color: #8d98a5;
}

body.apex-night-theme .footer-brand strong {
  color: var(--apex-red);
}

body.apex-night-theme .footer-season {
  color: #596572;
}

/* Responsive typography and spacing */
@media (max-width: 1100px) {
  body.apex-night-theme .desktop-nav a {
    padding-inline: 0.48rem;
    font-size: 0.64rem;
  }

  body.apex-night-theme .profile-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  body.apex-night-theme.editorial-theme .site-menu-btn {
    display: inline-flex;
  }

  body.apex-night-theme .home-command {
    grid-template-columns: 1fr;
  }

  body.apex-night-theme .home-command-side {
    border-top: 1px solid var(--apex-line);
    border-left: 0;
  }

  body.apex-night-theme .event-editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.apex-night-theme .main-content {
    padding-top: 1rem;
  }

  body.apex-night-theme .home-command {
    min-height: 0;
    border-radius: 3px 22px 3px 3px;
  }

  body.apex-night-theme .home-command-main {
    min-height: 410px;
  }

  body.apex-night-theme .home-command h1 {
    font-size: clamp(2.15rem, 11vw, 3.5rem);
  }

  body.apex-night-theme .event-hero-card .section-title {
    font-size: clamp(1.85rem, 9vw, 3rem);
  }

  body.apex-night-theme .event-hero-image {
    height: 280px;
  }

  body.apex-night-theme .event-editorial-grid {
    grid-template-columns: 1fr;
  }

  body.apex-night-theme .prediction-submit-bar {
    position: static;
  }

  body.apex-night-theme .round-winner-spotlight {
    align-items: stretch;
    flex-direction: column;
  }

  body.apex-night-theme .round-winner-list {
    justify-content: flex-start;
  }

  body.apex-night-theme .western-stake-seal {
    width: 92px;
    height: 92px;
    min-height: 92px;
    padding: 1.05rem;
  }

  body.apex-night-theme .western-stake-seal small,
  body.apex-night-theme .western-stake-seal span {
    width: 58px;
    max-width: 58px;
    font-size: 0.38rem;
  }

  body.apex-night-theme .western-duel-limit {
    width: 140px;
    min-height: 72px;
    padding: 0.72rem 0.78rem 0.66rem;
  }

  body.apex-night-theme .western-duel-limit small {
    font-size: 0.45rem;
  }

  body.apex-night-theme .western-duel-limit strong {
    font-size: 1.85rem;
  }

  body.apex-night-theme .western-duel-limit span {
    font-size: 0.45rem;
  }

  body.apex-night-theme .western-stake-seal strong {
    font-size: 2rem;
  }

  body.apex-night-theme .western-showdown {
    grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  }
}

@media (max-width: 576px) {
  body.apex-night-theme .main-content {
    padding: 0.85rem 0.7rem 2rem;
  }

  body.apex-night-theme.editorial-theme .brand-f1,
  body.apex-night-theme.editorial-theme .brand-text {
    font-size: 0.94rem;
  }

  body.apex-night-theme .brand-mark {
    width: 18px;
    margin-right: 0.3rem;
  }

  body.apex-night-theme .site-header-left {
    gap: 0.78rem;
  }

  body.apex-night-theme .site-header-actions .nav-chip {
    max-width: 104px;
    overflow: hidden;
    padding-inline: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.apex-night-theme .home-command-main {
    min-height: 380px;
    padding: 1.35rem 1.1rem;
  }

  body.apex-night-theme .home-command h1 {
    font-size: clamp(2rem, 11.5vw, 3.05rem);
    line-height: 0.94;
  }

  body.apex-night-theme .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.apex-night-theme .hero-actions .action-primary,
  body.apex-night-theme .hero-actions .action-secondary,
  body.apex-night-theme .hero-actions .countdown-chip {
    width: 100%;
  }

  body.apex-night-theme .event-card-copy h3 {
    font-size: 1.2rem;
  }

  body.apex-night-theme .section-heading-row h2,
  body.apex-night-theme .points-chart-title {
    font-size: 1.75rem;
  }

  body.apex-night-theme .section-title {
    font-size: 1.65rem;
  }

  body.apex-night-theme .event-hero-image {
    height: 220px;
  }

  body.apex-night-theme .results-stage-image {
    height: 230px;
  }

  body.apex-night-theme .event-hero-copy {
    padding: 1rem;
  }

  body.apex-night-theme .prediction-workbench h2 {
    font-size: 1.45rem;
  }

  body.apex-night-theme .prediction-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  body.apex-night-theme .prediction-submit-bar .btn {
    width: 100%;
    min-width: 0;
  }

  body.apex-night-theme .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.apex-night-theme .profile-analytics-grid {
    grid-template-columns: 1fr;
  }

  body.apex-night-theme .round-winner-person {
    width: 100%;
  }

  body.apex-night-theme .western-duel-heading h2 {
    font-size: 1.8rem;
  }

  body.apex-night-theme .western-duel-heading {
    align-items: flex-start;
  }

  body.apex-night-theme .season-header-status {
    min-width: 0;
    padding: 0.85rem 0 0;
    border-top: 1px solid var(--apex-line);
    border-left: 0;
  }

  body.apex-night-theme .season-scoring-card {
    padding: 1rem !important;
  }

  body.apex-night-theme .season-form-group {
    padding: 0.85rem;
  }

  body.apex-night-theme .season-form-group .form-label {
    min-height: 0;
  }

  body.apex-night-theme .season-form-submit {
    align-items: stretch;
    flex-direction: column;
  }

  body.apex-night-theme .season-form-submit .btn {
    width: 100%;
  }
}

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

/* Personal wildcard ------------------------------------------------------- */
body.apex-night-theme .wildcard-module {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.1rem, 2.4vw, 1.75rem);
  border: 1px solid rgba(222, 157, 92, 0.25);
  border-radius: 24px;
  background:
    radial-gradient(720px 320px at 50% 102%, rgba(222, 72, 46, 0.16), transparent 72%),
    radial-gradient(540px 260px at 100% 0%, rgba(221, 158, 91, 0.11), transparent 72%),
    linear-gradient(145deg, rgba(28, 35, 45, 0.98), rgba(14, 19, 27, 0.99));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.apex-night-theme .wildcard-module::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    repeating-linear-gradient(118deg, transparent 0 52px, rgba(255, 255, 255, 0.035) 52px 53px),
    linear-gradient(90deg, transparent 0 72%, rgba(224, 70, 42, 0.07) 72% 72.5%, transparent 72.5%);
}

body.apex-night-theme .wildcard-module::after {
  content: "WILDCARD";
  position: absolute;
  z-index: -1;
  right: -0.04em;
  bottom: -0.2em;
  color: rgba(255, 255, 255, 0.018);
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(5rem, 15vw, 11rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
}

body.apex-night-theme .wildcard-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
}

body.apex-night-theme .wildcard-kicker,
body.apex-night-theme .wildcard-face-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #e7a96a;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-heading h2 {
  margin: 0;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-heading p {
  max-width: 680px;
  margin: 0.35rem 0 0;
  color: rgba(239, 243, 247, 0.66);
  font-size: 0.88rem;
  line-height: 1.55;
}

body.apex-night-theme .wildcard-reward {
  min-width: 96px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-content: center;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(231, 169, 106, 0.34);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, rgba(231, 169, 106, 0.13), rgba(225, 63, 34, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body.apex-night-theme .wildcard-reward span {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-reward strong {
  color: #f2b878;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.8rem;
  line-height: 1;
}

body.apex-night-theme .wildcard-reward small {
  margin: 0 0 0.14rem 0.25rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.65rem;
  font-weight: 700;
}

body.apex-night-theme .wildcard-draw-prompt {
  margin: 1.2rem 0 0.1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-deck,
body.apex-night-theme .wildcard-single-stage {
  position: relative;
  width: min(100%, 780px);
  height: 370px;
  margin: 0 auto;
  perspective: 1300px;
}

body.apex-night-theme .wildcard-single-stage {
  height: 360px;
  margin-top: 0.9rem;
}

body.apex-night-theme .wildcard-card {
  --wildcard-x: 0px;
  --wildcard-rotation: 0deg;
  appearance: none;
  position: absolute;
  top: 24px;
  left: 50%;
  width: clamp(192px, 22vw, 232px);
  aspect-ratio: 5 / 7;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 19px;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-align: center;
  text-indent: 0;
  background: transparent;
  transform: translateX(-50%) translateX(var(--wildcard-x)) rotate(var(--wildcard-rotation));
  transform-origin: 50% 92%;
  transition: transform 420ms cubic-bezier(0.2, 0.85, 0.25, 1), opacity 320ms ease, filter 320ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.apex-night-theme .wildcard-card,
body.apex-night-theme .wildcard-card * {
  box-sizing: border-box;
}

body.apex-night-theme .wildcard-card.is-slot-1 {
  --wildcard-x: -188px;
  --wildcard-rotation: -9deg;
  z-index: 1;
}

body.apex-night-theme .wildcard-card.is-slot-2 {
  --wildcard-x: 0px;
  --wildcard-rotation: 0deg;
  z-index: 2;
}

body.apex-night-theme .wildcard-card.is-slot-3 {
  --wildcard-x: 188px;
  --wildcard-rotation: 9deg;
  z-index: 1;
}

body.apex-night-theme .wildcard-card:hover:not(.is-picked),
body.apex-night-theme .wildcard-card:focus-visible:not(.is-picked) {
  z-index: 4;
  outline: none;
  transform: translateX(-50%) translateX(var(--wildcard-x)) translateY(-18px) rotate(var(--wildcard-rotation)) scale(1.025);
}

body.apex-night-theme .wildcard-card:focus-visible .wildcard-card-inner {
  box-shadow: 0 0 0 3px rgba(242, 184, 120, 0.25), 0 26px 50px rgba(0, 0, 0, 0.48);
}

body.apex-night-theme .wildcard-card.is-picked {
  --wildcard-x: 0px;
  --wildcard-rotation: 0deg;
  z-index: 8;
  cursor: default;
  transform: translateX(-50%) translateY(-28px) scale(1.045);
}

body.apex-night-theme .wildcard-card.is-dismissed {
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
  transform: translateX(-50%) translateX(var(--wildcard-x)) translateY(38px) rotate(var(--wildcard-rotation)) scale(0.78);
}

body.apex-night-theme .wildcard-card.is-single {
  --wildcard-x: 0px;
  --wildcard-rotation: 0deg;
  top: 8px;
  cursor: default;
}

body.apex-night-theme .wildcard-card-inner {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
  transition: transform 720ms cubic-bezier(0.2, 0.78, 0.2, 1), box-shadow 300ms ease;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(235, 174, 111, 0.2);
}

body.apex-night-theme .wildcard-card.is-revealed .wildcard-card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.52), 0 0 34px rgba(222, 91, 47, 0.16);
}

body.apex-night-theme .wildcard-card-back,
body.apex-night-theme .wildcard-card-front {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 1.05rem;
  border: 1px solid rgba(242, 184, 120, 0.45);
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

body.apex-night-theme .wildcard-card-back {
  visibility: visible;
  transform: rotateY(0deg) translateZ(1px);
  background-color: #171d26;
  background-image:
    linear-gradient(145deg, rgba(10, 14, 20, 0.25), rgba(10, 14, 20, 0.8)),
    var(--wildcard-card-back-image, none),
    radial-gradient(circle at 22% 18%, rgba(231, 169, 106, 0.19), transparent 35%),
    repeating-linear-gradient(128deg, transparent 0 22px, rgba(255, 255, 255, 0.045) 22px 23px),
    linear-gradient(145deg, #252e3a, #111720 70%);
  background-position: center;
  background-size: cover;
}

body.apex-night-theme .wildcard-card-back::before,
body.apex-night-theme .wildcard-card-front::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(231, 169, 106, 0.34);
  border-radius: 13px;
  pointer-events: none;
}

body.apex-night-theme .wildcard-card-back::after {
  content: "";
  position: absolute;
  width: 155%;
  height: 32px;
  top: 42%;
  left: -25%;
  background: linear-gradient(90deg, transparent, rgba(226, 66, 35, 0.32), transparent);
  transform: rotate(-31deg);
  pointer-events: none;
}

body.apex-night-theme .wildcard-card-brand,
body.apex-night-theme .wildcard-card-round {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.68);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-card-round {
  color: #e6a766;
}

body.apex-night-theme .wildcard-question-mark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 88px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(234, 174, 112, 0.42);
  border-radius: 50%;
  color: #f0b372;
  background: rgba(9, 13, 19, 0.38);
  box-shadow: 0 0 0 8px rgba(230, 164, 96, 0.035), inset 0 0 28px rgba(222, 75, 40, 0.12);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 22px rgba(236, 163, 88, 0.26);
}

body.apex-night-theme .wildcard-card-front {
  display: block;
  padding: 0;
  min-width: 0;
  visibility: hidden;
  transform: rotateY(180deg) translateZ(1px);
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 15%, rgba(231, 169, 106, 0.17), transparent 35%),
    linear-gradient(155deg, #242d38, #111720 72%);
}

body.apex-night-theme .wildcard-face-content {
  position: absolute;
  z-index: 1;
  inset: 13px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 0.42rem;
  align-items: center;
  justify-items: stretch;
  min-width: 0;
  min-height: 0;
  padding: 0.45rem 0.34rem 0.38rem;
  text-align: center;
}

body.apex-night-theme .wildcard-card.is-revealed .wildcard-card-back {
  visibility: hidden;
  transition: visibility 0s linear 360ms;
}

body.apex-night-theme .wildcard-card.is-revealed .wildcard-card-front {
  visibility: visible;
  transition: visibility 0s linear 360ms;
}

body.apex-night-theme .wildcard-face-kicker {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  font-size: 0.58rem;
  line-height: 1.1;
  text-align: center;
}

body.apex-night-theme .wildcard-face-question {
  position: relative;
  z-index: 1;
  align-self: center;
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(0.94rem, 1.45vw, 1.08rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  text-align: center;
}

body.apex-night-theme .wildcard-face-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.36rem;
  align-items: center;
  width: 100%;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-face-divider::before,
body.apex-night-theme .wildcard-face-divider::after {
  content: "";
  height: 1px;
  background: rgba(231, 169, 106, 0.22);
}

body.apex-night-theme .wildcard-face-options {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  gap: 0.38rem;
}

body.apex-night-theme .wildcard-face-options.has-three-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.24rem;
}

body.apex-night-theme .wildcard-face-options.has-three-options .wildcard-face-option {
  padding-inline: 0.16rem;
}

body.apex-night-theme .wildcard-face-options.has-three-options .wildcard-face-option b {
  font-size: 0.63rem;
}

body.apex-night-theme .wildcard-face-option {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.28rem;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 0.34rem 0.26rem 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.045);
}

body.apex-night-theme .wildcard-face-option small {
  display: grid;
  width: 22px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 7px;
  color: #f0b575;
  background: rgba(231, 169, 106, 0.12);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
}

body.apex-night-theme .wildcard-face-option b {
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.apex-night-theme .wildcard-face-points {
  position: relative;
  z-index: 1;
  display: inline-flex;
  justify-self: center;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(231, 169, 106, 0.36);
  border-radius: 999px;
  color: #f0b575;
  background: rgba(231, 169, 106, 0.08);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: center;
}

body.apex-night-theme .wildcard-answer-shell {
  position: relative;
  z-index: 3;
  width: min(100%, 770px);
  margin: 0.15rem auto 0;
}

body.apex-night-theme .wildcard-answer-shell.is-draw-result {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 300ms ease, transform 300ms ease;
}

body.apex-night-theme .wildcard-answer-shell.is-draw-result.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.apex-night-theme .wildcard-answer-shell[hidden] {
  display: none !important;
}

body.apex-night-theme .wildcard-answer-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(0, 1.6fr);
  gap: 0.8rem;
  align-items: stretch;
  padding: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  background: rgba(8, 12, 18, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.apex-night-theme .wildcard-answer-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.2rem 0.35rem;
}

body.apex-night-theme .wildcard-answer-copy span {
  color: #e4a565;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-answer-copy strong {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  line-height: 1.35;
}

body.apex-night-theme .wildcard-answer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

body.apex-night-theme .wildcard-answer-options.has-three-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.apex-night-theme .wildcard-option {
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body.apex-night-theme .wildcard-option > span {
  display: grid;
  width: 30px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 9px;
  color: #e8a867;
  background: rgba(231, 169, 106, 0.1);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
}

body.apex-night-theme .wildcard-option > strong {
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

body.apex-night-theme .wildcard-option:hover:not(:disabled),
body.apex-night-theme .wildcard-option:focus-visible:not(:disabled) {
  outline: none;
  border-color: rgba(235, 167, 98, 0.55);
  background: rgba(231, 169, 106, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

body.apex-night-theme .wildcard-option.is-selected {
  border-color: rgba(232, 166, 98, 0.72);
  background: linear-gradient(145deg, rgba(231, 169, 106, 0.18), rgba(218, 69, 39, 0.1));
  box-shadow: 0 0 0 1px rgba(231, 169, 106, 0.14), 0 10px 26px rgba(0, 0, 0, 0.22);
}

body.apex-night-theme .wildcard-option.is-correct {
  border-color: rgba(71, 204, 138, 0.58);
  background: rgba(48, 165, 107, 0.14);
}

body.apex-night-theme .wildcard-option.is-correct > span {
  color: #7de3ae;
  background: rgba(48, 165, 107, 0.18);
}

body.apex-night-theme .wildcard-option.is-wrong {
  border-color: rgba(232, 87, 68, 0.52);
  background: rgba(201, 57, 43, 0.12);
}

body.apex-night-theme .wildcard-option:disabled {
  cursor: default;
  opacity: 0.72;
}

body.apex-night-theme .wildcard-result-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.12rem 0.9rem;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

body.apex-night-theme .wildcard-result-banner span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.apex-night-theme .wildcard-result-banner strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.35rem;
}

body.apex-night-theme .wildcard-result-banner small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.73rem;
}

body.apex-night-theme .wildcard-result-banner.is-hit {
  border-color: rgba(70, 202, 136, 0.3);
  background: rgba(46, 157, 103, 0.09);
}

body.apex-night-theme .wildcard-result-banner.is-hit strong {
  color: #79dfa9;
}

body.apex-night-theme .wildcard-result-banner.is-miss strong {
  color: #f08c7d;
}

body.apex-night-theme .wildcard-result-banner.is-waiting strong {
  color: #f0b575;
}

body.apex-night-theme .wildcard-empty-state {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 150px;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(231, 169, 106, 0.25);
  border-radius: 17px;
  background: rgba(8, 12, 18, 0.28);
}

body.apex-night-theme .wildcard-empty-mark {
  display: grid;
  width: 48px;
  flex: 0 0 48px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(231, 169, 106, 0.3);
  border-radius: 50%;
  color: #e9aa69;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.7rem;
}

body.apex-night-theme .wildcard-empty-state strong {
  color: #fff;
  font-size: 0.9rem;
}

body.apex-night-theme .wildcard-empty-state p {
  margin: 0.18rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

body.apex-night-theme .wildcard-empty-state a {
  color: #efb170;
}

body.apex-night-theme .community-wildcard-question {
  display: block;
  min-width: 190px;
  max-width: 270px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.64rem;
  line-height: 1.35;
  white-space: normal;
}

body.apex-night-theme .community-wildcard-answer {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
  padding: 0.24rem 0.46rem;
  border: 1px solid #354352;
  border-radius: 8px;
  color: #d6e0e8;
  background: #1b2530;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}

body.apex-night-theme .community-wildcard-answer.is-correct {
  color: #b9f2d2;
  border-color: rgba(85, 214, 158, 0.42);
  background: #18382c;
}

body.apex-night-theme .community-wildcard-answer.is-wrong {
  color: #ffc4be;
  border-color: rgba(232, 104, 94, 0.42);
  background: #3a211f;
}

body.apex-night-theme .community-wildcard-answer > span:first-child[aria-hidden="true"] {
  flex: 0 0 auto;
  font-weight: 900;
}

@media (max-width: 720px) {
  body.apex-night-theme .wildcard-module {
    padding: 1rem 0.8rem;
    border-radius: 18px;
  }

  body.apex-night-theme .wildcard-heading {
    align-items: center;
  }

  body.apex-night-theme .wildcard-heading h2 {
    font-size: 1.72rem;
  }

  body.apex-night-theme .wildcard-heading p {
    font-size: 0.75rem;
  }

  body.apex-night-theme .wildcard-reward {
    min-width: 78px;
    padding: 0.6rem;
  }

  body.apex-night-theme .wildcard-reward strong {
    font-size: 1.45rem;
  }

  body.apex-night-theme .wildcard-deck {
    height: 320px;
  }

  body.apex-night-theme .wildcard-single-stage {
    height: 310px;
  }

  body.apex-night-theme .wildcard-card {
    top: 26px;
    width: clamp(174px, 50vw, 198px);
  }

  body.apex-night-theme .wildcard-card.is-slot-1 {
    --wildcard-x: -86px;
    --wildcard-rotation: -8deg;
  }

  body.apex-night-theme .wildcard-card.is-slot-3 {
    --wildcard-x: 86px;
    --wildcard-rotation: 8deg;
  }

  body.apex-night-theme .wildcard-card.is-single {
    top: 6px;
  }

  body.apex-night-theme .wildcard-card-back,
  body.apex-night-theme .wildcard-card-front {
    border-radius: 16px;
  }

  body.apex-night-theme .wildcard-card-back {
    padding: 0.82rem;
  }

  body.apex-night-theme .wildcard-face-content {
    inset: 11px;
    gap: 0.32rem;
    padding: 0.38rem 0.26rem 0.3rem;
  }

  body.apex-night-theme .wildcard-question-mark {
    width: 68px;
    font-size: 2.8rem;
  }

  body.apex-night-theme .wildcard-face-question {
    font-size: 0.84rem;
    line-height: 1.1;
    -webkit-line-clamp: 5;
  }

  body.apex-night-theme .wildcard-face-options {
    gap: 0.3rem;
  }

  body.apex-night-theme .wildcard-face-option {
    min-height: 52px;
    padding: 0.28rem 0.2rem 0.3rem;
  }

  body.apex-night-theme .wildcard-face-option small {
    width: 20px;
    font-size: 0.6rem;
  }

  body.apex-night-theme .wildcard-face-option b {
    font-size: 0.64rem;
  }

  body.apex-night-theme .wildcard-answer-form {
    grid-template-columns: 1fr;
  }

  body.apex-night-theme .wildcard-answer-options.has-three-options {
    grid-template-columns: 1fr;
  }

  body.apex-night-theme .wildcard-answer-copy {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 430px) {
  body.apex-night-theme .wildcard-kicker {
    font-size: 0.62rem;
  }

  body.apex-night-theme .wildcard-heading p {
    max-width: 240px;
  }

  body.apex-night-theme .wildcard-answer-options {
    grid-template-columns: 1fr;
  }

  body.apex-night-theme .wildcard-result-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  body.apex-night-theme .wildcard-result-banner strong {
    grid-row: auto;
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.apex-night-theme .wildcard-card,
  body.apex-night-theme .wildcard-card-inner,
  body.apex-night-theme .wildcard-answer-shell {
    transition-duration: 0.01ms !important;
  }
}

/* Wildcard choice v2: three readable cards instead of an overlapping fan. */
body.apex-night-theme .wildcard-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.2rem);
  width: min(100%, 790px);
  height: auto;
  min-height: 355px;
  padding: 1.35rem 0.35rem 0.55rem;
}

body.apex-night-theme .wildcard-deck .wildcard-card {
  position: relative;
  top: auto;
  left: auto;
  width: min(100%, 232px);
  justify-self: center;
  transform: rotate(var(--wildcard-rotation));
}

body.apex-night-theme .wildcard-deck .wildcard-card.is-slot-1 {
  --wildcard-rotation: -2.5deg;
}

body.apex-night-theme .wildcard-deck .wildcard-card.is-slot-2 {
  --wildcard-rotation: 0deg;
}

body.apex-night-theme .wildcard-deck .wildcard-card.is-slot-3 {
  --wildcard-rotation: 2.5deg;
}

body.apex-night-theme .wildcard-deck .wildcard-card:hover:not(.is-picked),
body.apex-night-theme .wildcard-deck .wildcard-card:focus-visible:not(.is-picked) {
  transform: translateY(-12px) rotate(var(--wildcard-rotation)) scale(1.015);
}

body.apex-night-theme .wildcard-deck .wildcard-card.is-revealed {
  z-index: 5;
  transform: translateY(-8px) rotate(0deg) scale(1.015);
}

body.apex-night-theme .wildcard-deck .wildcard-card.is-picked {
  z-index: 8;
  transform: translateY(-14px) rotate(0deg) scale(1.035);
}

body.apex-night-theme .wildcard-deck .wildcard-card.is-dismissed {
  transform: translateY(24px) rotate(var(--wildcard-rotation)) scale(0.86);
}

body.apex-night-theme .wildcard-face-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.38rem;
  align-items: center;
  width: 100%;
}

body.apex-night-theme .wildcard-face-footer .wildcard-face-points {
  justify-self: start;
  white-space: nowrap;
}

body.apex-night-theme .wildcard-face-select {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.48rem;
  border: 1px solid rgba(255, 92, 72, 0.42);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 51, 38, 0.72), rgba(181, 35, 27, 0.74));
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1;
  text-transform: uppercase;
}

/* Event result table: opaque cells, restrained states and a stable grid. */
body.apex-night-theme .community-table-viewport {
  position: relative;
  background: #0b1016;
  scrollbar-color: #3a4654 #0b1016;
}

body.apex-night-theme .community-table {
  border-collapse: separate !important;
  border-spacing: 0;
  table-layout: auto;
}

body.apex-night-theme .community-table > :not(caption) > * > * {
  border-right: 1px solid #26313d !important;
  border-bottom: 1px solid #26313d !important;
  background-color: #101720 !important;
  background-image: none !important;
}

body.apex-night-theme .community-table > :not(caption) > * > *:last-child {
  border-right: 0 !important;
}

body.apex-night-theme .community-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  color: #aeb9c5;
  background-color: #090d12 !important;
  box-shadow: inset 0 -1px 0 #34404d;
}

body.apex-night-theme .community-table tbody tr:nth-child(even) td {
  background-color: #0d141c !important;
}

body.apex-night-theme .community-table tbody tr:hover td {
  background-color: #151f2a !important;
}

body.apex-night-theme .community-table thead th:first-child,
body.apex-night-theme .community-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 154px;
  background-color: #0d141c !important;
  box-shadow: 10px 0 18px rgba(0, 0, 0, 0.22);
}

body.apex-night-theme .community-table thead th:first-child {
  z-index: 6;
  background-color: #090d12 !important;
}

body.apex-night-theme .community-table tbody .community-prediction-correct {
  color: #86e8bb !important;
  background-color: #10241d !important;
  box-shadow: inset 0 -2px 0 rgba(88, 218, 158, 0.48);
}

body.apex-night-theme .community-table tbody .community-prediction-wrong {
  color: #f0aaa4 !important;
  background-color: #211519 !important;
  box-shadow: inset 0 -2px 0 rgba(232, 87, 68, 0.38);
}

body.apex-night-theme .community-table tbody tr.community-round-winner td:first-child {
  background-color: #11231b !important;
  box-shadow: inset 3px 0 0 #69c792, 10px 0 18px rgba(0, 0, 0, 0.22);
}

body.apex-night-theme .community-table .community-score {
  color: #f5f7fa;
  border-color: #3a4654;
  background: #19222d;
}

/* Mobile standings: the fixed rank column must fully cover scrolling cells. */
@media (max-width: 768px) {
  body.apex-night-theme .leaderboard-luxe .table-responsive {
    isolation: isolate;
    background-color: #0b1016 !important;
  }

  body.apex-night-theme .leaderboard-table thead .sticky-col {
    z-index: 12;
    background-color: #090d12 !important;
    background-image: none !important;
  }

  body.apex-night-theme .leaderboard-table tbody td.sticky-col,
  body.apex-night-theme .leaderboard-table tbody tr:hover td.sticky-col,
  body.apex-night-theme .leaderboard-table tbody tr.is-round-winner td.sticky-col {
    z-index: 10;
    background-color: #0b1016 !important;
    background-image: none !important;
    box-shadow: 9px 0 16px rgba(0, 0, 0, 0.48);
  }

  body.apex-night-theme .leaderboard-table tbody tr.is-round-winner td.sticky-col {
    box-shadow: inset 3px 0 0 var(--apex-amber), 9px 0 16px rgba(0, 0, 0, 0.48);
  }

  body.apex-night-theme .wildcard-deck {
    display: flex;
    width: calc(100% + 1.6rem);
    min-height: 342px;
    margin-inline: -0.8rem;
    gap: 0.85rem;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 1rem max(1rem, calc((100vw - min(74vw, 220px)) / 2)) 0.8rem;
    scroll-padding-inline: max(1rem, calc((100vw - min(74vw, 220px)) / 2));
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.apex-night-theme .wildcard-deck::-webkit-scrollbar {
    display: none;
  }

  body.apex-night-theme .wildcard-deck .wildcard-card,
  body.apex-night-theme .wildcard-deck .wildcard-card.is-slot-1,
  body.apex-night-theme .wildcard-deck .wildcard-card.is-slot-2,
  body.apex-night-theme .wildcard-deck .wildcard-card.is-slot-3 {
    flex: 0 0 min(74vw, 220px);
    width: min(74vw, 220px);
    transform: none;
    scroll-snap-align: center;
  }

  body.apex-night-theme .wildcard-deck .wildcard-card:hover:not(.is-picked),
  body.apex-night-theme .wildcard-deck .wildcard-card:focus-visible:not(.is-picked),
  body.apex-night-theme .wildcard-deck .wildcard-card.is-revealed,
  body.apex-night-theme .wildcard-deck .wildcard-card.is-picked {
    transform: translateY(-7px);
  }

  body.apex-night-theme .wildcard-draw-prompt {
    padding-inline: 0.4rem;
    line-height: 1.45;
  }
}

/* Calm type scale ---------------------------------------------------------
 * Four clear levels: hero, page, section and card. Short racing labels keep
 * their uppercase treatment; content headings and actions use normal case.
 */
body.apex-night-theme {
  --apex-type-hero: clamp(2.15rem, 4.4vw, 3.45rem);
  --apex-type-page: clamp(1.7rem, 2.6vw, 2.2rem);
  --apex-type-section: clamp(1.22rem, 1.8vw, 1.52rem);
  --apex-type-card: 1.05rem;
}

body.apex-night-theme .section-title,
body.apex-night-theme .season-banner-title,
body.apex-night-theme .auth-title {
  font-size: var(--apex-type-page);
  line-height: 1.04;
  letter-spacing: -0.012em;
}

body.apex-night-theme .profile-name {
  font-size: var(--apex-type-page);
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-transform: none;
}

/* Driver card: a compact race-weekend identity block for player profiles. */
body.apex-night-theme.editorial-theme .profile-race-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background:
    linear-gradient(116deg, transparent 0 54%, rgba(255, 51, 38, 0.08) 54.2% 54.45%, transparent 54.65%),
    radial-gradient(560px 240px at 100% 0, rgba(76, 141, 255, 0.14), transparent 72%),
    var(--apex-surface);
}

body.apex-night-theme .profile-race-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--apex-red) 0 22%, var(--apex-blue) 22% 48%, transparent 48%);
}

body.apex-night-theme .profile-race-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: 1.4rem;
  align-items: center;
}

body.apex-night-theme .profile-race-identity {
  position: relative;
  min-width: 0;
}

body.apex-night-theme .profile-race-identity .profile-user {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 1rem;
}

body.apex-night-theme .profile-race-identity .profile-user > div:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.apex-night-theme .profile-race-identity .profile-avatar,
body.apex-night-theme .profile-race-identity .profile-avatar-form {
  flex-shrink: 0;
}

body.apex-night-theme .profile-race-subtitle,
body.apex-night-theme .profile-race-form-head,
body.apex-night-theme .profile-race-kpi small {
  color: var(--apex-muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.apex-night-theme .profile-race-subtitle {
  margin-top: .28rem;
  letter-spacing: .08em;
}

body.apex-night-theme .profile-arcade-trophycase {
  position: relative;
  overflow: visible;
  margin-top: .8rem;
  padding: .15rem clamp(.35rem, 1vw, .75rem) .3rem;
  border: 1px solid rgba(222, 177, 82, .24);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(220, 54, 45, .10), transparent 53%),
    linear-gradient(145deg, rgba(25, 34, 45, .98), rgba(12, 18, 26, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 14px 36px rgba(0, 0, 0, .18);
}

body.apex-night-theme .profile-arcade-trophycase-title {
  display: flex;
  width: fit-content;
  max-width: calc(100% - 1rem);
  align-items: center;
  gap: .55rem;
  margin: .4rem 0 .15rem .65rem;
  padding: .32rem .7rem .32rem .55rem;
  border-left: 2px solid var(--apex-red, #ef3c32);
  border-radius: 0 7px 7px 0;
  background: linear-gradient(90deg, rgba(239, 60, 50, .14), rgba(239, 60, 50, 0));
  color: var(--apex-ink);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
}

body.apex-night-theme .profile-arcade-trophycase-title::before {
  width: .38rem;
  height: .38rem;
  flex: 0 0 .38rem;
  border: 1px solid rgba(239, 60, 50, .78);
  border-radius: 50%;
  background: var(--apex-red, #ef3c32);
  box-shadow: 0 0 10px rgba(239, 60, 50, .42);
  content: "";
}

body.apex-night-theme .profile-arcade-trophycase-stage {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 700px);
  max-width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 122px;
  max-height: 234px;
  margin: .1rem auto;
}

body.apex-night-theme .profile-arcade-trophycase-shelf {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
}

body.apex-night-theme .profile-arcade-trophycase-glow {
  position: absolute;
  z-index: 0;
  top: 47%;
  left: 50%;
  width: 42%;
  height: 28%;
  border-radius: 50%;
  background: rgba(239, 75, 55, .3);
  filter: blur(20px);
  transform: translate(-50%, -50%);
  animation: arcade-trophy-glow 3.2s ease-in-out infinite;
}

body.apex-night-theme .profile-arcade-trophycase-row {
  position: absolute;
  z-index: 2;
  right: 5%;
  bottom: 42%;
  left: 5%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(.2rem, .9vw, .65rem);
}

body.apex-night-theme .profile-arcade-trophycase-item {
  position: relative;
  display: flex;
  min-width: 0;
  max-width: 100px;
  height: clamp(72px, 9vw, 100px);
  flex: 1 1 98px;
  align-items: flex-end;
  justify-content: center;
}

body.apex-night-theme .profile-arcade-trophycase-figure {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3)) drop-shadow(0 0 7px rgba(244, 192, 72, .18));
  transform-origin: 50% 100%;
  animation: arcade-figurine-bob 2.7s ease-in-out infinite;
  cursor: help;
  outline: none;
}

body.apex-night-theme .profile-arcade-trophycase-figure:focus-visible {
  filter: drop-shadow(0 0 5px rgba(244, 192, 72, .75));
}

body.apex-night-theme .profile-arcade-trophycase-tooltip {
  position: absolute;
  z-index: 4;
  bottom: calc(100% + 7px);
  left: 50%;
  display: grid;
  width: min(220px, calc(100vw - 36px));
  gap: .42rem;
  padding: .68rem .76rem;
  border: 1px solid rgba(222, 177, 82, .38);
  border-radius: 11px;
  background: rgba(12, 18, 26, .97);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .04);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  visibility: hidden;
}

body.apex-night-theme .profile-arcade-trophycase-tooltip::before {
  position: absolute;
  bottom: -5px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(222, 177, 82, .38);
  border-bottom: 1px solid rgba(222, 177, 82, .38);
  background: #0c121a;
  content: "";
  transform: rotate(45deg);
}

body.apex-night-theme .profile-arcade-trophycase-item:first-child:not(:last-child) .profile-arcade-trophycase-tooltip {
  left: 0;
  transform: translateY(5px);
}

body.apex-night-theme .profile-arcade-trophycase-item:first-child:not(:last-child) .profile-arcade-trophycase-tooltip::before {
  left: 22px;
}

body.apex-night-theme .profile-arcade-trophycase-item:last-child:not(:first-child) .profile-arcade-trophycase-tooltip {
  right: 0;
  left: auto;
  transform: translateY(5px);
}

body.apex-night-theme .profile-arcade-trophycase-item:last-child:not(:first-child) .profile-arcade-trophycase-tooltip::before {
  right: 22px;
  left: auto;
}

body.apex-night-theme .profile-arcade-trophycase-tooltip > strong {
  margin-bottom: .08rem;
  color: var(--apex-amber);
  font-size: .72rem;
  letter-spacing: .04em;
}

body.apex-night-theme .profile-arcade-trophycase-tooltip > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .55rem;
  line-height: 1.2;
}

body.apex-night-theme .profile-arcade-trophycase-tooltip small {
  color: var(--apex-muted);
  font-size: .57rem;
}

body.apex-night-theme .profile-arcade-trophycase-tooltip b {
  color: var(--apex-ink);
  font-size: .62rem;
  font-weight: 750;
  text-align: right;
}

body.apex-night-theme .profile-arcade-trophycase-item:hover .profile-arcade-trophycase-tooltip,
body.apex-night-theme .profile-arcade-trophycase-item:focus-within .profile-arcade-trophycase-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

body.apex-night-theme .profile-arcade-trophycase-item:first-child:not(:last-child):hover .profile-arcade-trophycase-tooltip,
body.apex-night-theme .profile-arcade-trophycase-item:first-child:not(:last-child):focus-within .profile-arcade-trophycase-tooltip,
body.apex-night-theme .profile-arcade-trophycase-item:last-child:not(:first-child):hover .profile-arcade-trophycase-tooltip,
body.apex-night-theme .profile-arcade-trophycase-item:last-child:not(:first-child):focus-within .profile-arcade-trophycase-tooltip {
  transform: translateY(0);
}

@keyframes arcade-figurine-bob {
  0%, 100% { transform: scale(1.2) translateY(0); }
  50% { transform: scale(1.2) translateY(-3px); }
}

@keyframes arcade-trophy-glow {
  0%, 100% { opacity: .42; transform: translate(-50%, -50%) scale(.92); }
  50% { opacity: .86; transform: translate(-50%, -50%) scale(1.08); }
}

@media (max-width: 575.98px) {
  body.apex-night-theme .profile-arcade-trophycase-stage {
    min-height: 120px;
  }

  body.apex-night-theme .profile-arcade-trophycase-item {
    max-width: 74px;
    height: 74px;
    flex-basis: 74px;
  }

  body.apex-night-theme .profile-arcade-trophycase-row {
    right: 3%;
    bottom: 34%;
    left: 3%;
    gap: .18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.apex-night-theme .profile-arcade-trophycase-glow,
  body.apex-night-theme .profile-arcade-trophycase-figure {
    animation: none;
  }
}

body.apex-night-theme .profile-race-performance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

body.apex-night-theme .profile-race-kpi,
body.apex-night-theme .profile-race-form {
  min-width: 0;
  padding: .78rem .9rem;
  border: 1px solid var(--apex-line);
  border-radius: var(--apex-corner-sm);
  background: rgba(255, 255, 255, .035);
}

body.apex-night-theme .profile-race-kpi strong {
  display: block;
  margin-top: .18rem;
  color: var(--apex-ink);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1;
}

body.apex-night-theme .profile-race-kpi-points strong {
  color: #fff;
}

body.apex-night-theme .profile-race-kpi span {
  display: block;
  margin-top: .35rem;
  color: var(--apex-muted);
  font-size: .68rem;
}

body.apex-night-theme .profile-race-kpi .profile-race-movement {
  color: var(--apex-green);
  font-weight: 800;
}

body.apex-night-theme .profile-race-kpi .profile-race-movement.is-down {
  color: #ff8992;
}

body.apex-night-theme .profile-race-form {
  grid-column: 1 / -1;
}

body.apex-night-theme .profile-race-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .6rem;
}

body.apex-night-theme .profile-race-form-head span {
  color: var(--apex-muted);
  font-size: .7rem;
}

body.apex-night-theme .profile-form-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

body.apex-night-theme .profile-form-pill,
body.apex-night-theme .profile-form-empty {
  display: inline-flex;
  min-width: 2.8rem;
  min-height: 3rem;
  flex-direction: column;
  gap: .15rem;
  align-items: center;
  justify-content: center;
  padding: .18rem .45rem;
  border: 1px solid var(--apex-line-strong);
  border-radius: 5px;
  color: var(--apex-muted);
  background: rgba(255, 255, 255, .04);
  font-size: .78rem;
  font-weight: 800;
}

body.apex-night-theme .profile-form-pill small {
  color: var(--apex-ink-soft);
  font-size: .65rem;
}

body.apex-night-theme .profile-form-pill strong {
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

body.apex-night-theme .profile-form-pill.is-positive {
  border-color: rgba(53, 213, 154, .42);
  color: var(--apex-green);
  background: rgba(53, 213, 154, .1);
}

body.apex-night-theme .profile-form-pill.is-negative {
  border-color: rgba(255, 79, 92, .42);
  color: #ff8992;
  background: rgba(255, 79, 92, .1);
}

body.apex-night-theme .profile-race-footer {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--apex-line);
  color: var(--apex-muted);
  font-size: .8rem;
}

body.apex-night-theme .profile-race-footer small,
body.apex-night-theme .profile-race-footer strong {
  display: block;
}

body.apex-night-theme .profile-race-footer strong {
  margin: .3rem 0;
  color: var(--apex-ink);
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  body.apex-night-theme .profile-race-card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body.apex-night-theme .profile-race-performance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.apex-night-theme .profile-race-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
  }

  body.apex-night-theme .profile-race-footer > span:first-child {
    grid-column: 1 / -1;
  }
}

body.apex-night-theme .home-command h1 {
  max-width: 680px;
  font-size: var(--apex-type-hero);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

body.apex-night-theme .event-hero-card .section-title {
  max-width: 680px;
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1;
  text-wrap: balance;
}

body.apex-night-theme .section-heading-row h2,
body.apex-night-theme .points-chart-title,
body.apex-night-theme .community-title,
body.apex-night-theme .profile-section-title,
body.apex-night-theme .prediction-workbench h2,
body.apex-night-theme .wildcard-heading h2,
body.apex-night-theme .western-duel-heading h2,
body.apex-night-theme .season-form-heading h2,
body.apex-night-theme .duel-panel-head h2 {
  font-family: "Barlow Condensed", "Manrope", sans-serif;
  font-size: var(--apex-type-section);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: none;
}

body.apex-night-theme .event-card-copy h3,
body.apex-night-theme .season-scoring-head h2,
body.apex-night-theme .season-form-group-head h3,
body.apex-night-theme .score-card h2,
body.apex-night-theme .card h2.h4,
body.apex-night-theme .card h2.h5,
body.apex-night-theme .main-content > h2.h4 {
  font-family: "Barlow Condensed", "Manrope", sans-serif;
  font-size: var(--apex-type-card);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: 0;
  text-transform: none;
}

body.apex-night-theme .section-heading-row {
  margin-bottom: 0.85rem;
  padding-bottom: 0.68rem;
}

body.apex-night-theme.editorial-theme .btn,
body.apex-night-theme .action-primary,
body.apex-night-theme .action-secondary,
body.apex-night-theme .duel-submit,
body.apex-night-theme .event-card-action,
body.apex-night-theme .western-btn {
  font-size: 0.76rem;
  letter-spacing: 0.012em;
  text-transform: none;
}

@media (max-width: 576px) {
  body.apex-night-theme {
    --apex-type-hero: clamp(1.9rem, 9vw, 2.55rem);
    --apex-type-page: clamp(1.55rem, 7vw, 1.85rem);
    --apex-type-section: clamp(1.16rem, 5.6vw, 1.36rem);
    --apex-type-card: 1rem;
  }

  body.apex-night-theme .event-hero-card .section-title {
    font-size: clamp(1.65rem, 7.8vw, 2.15rem);
    line-height: 1.04;
  }
}

/* Mobile duel flow -------------------------------------------------------
 * On a narrow screen the duel is a short decision flow, not a compressed
 * desktop banner. Solid surfaces and explicit states keep the artwork from
 * washing out controls or status copy.
 */
@media (max-width: 620px) {
  body.apex-night-theme .western-duel {
    padding: 1rem;
    border-color: rgba(244, 154, 91, 0.34);
    border-radius: 3px 20px 3px 3px;
    background:
      radial-gradient(360px 190px at 100% 0, rgba(235, 106, 55, 0.2), transparent 70%),
      linear-gradient(155deg, #211712 0%, #111317 58%, #0c1015 100%);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  }

  body.apex-night-theme .western-duel.has-duel-art::before {
    background-image:
      linear-gradient(180deg, rgba(15, 13, 12, 0.74), rgba(12, 14, 18, 0.92)),
      var(--western-duel-art);
    background-position: center;
    filter: sepia(0.12) saturate(0.9) contrast(1.06);
  }

  body.apex-night-theme .western-duel::after {
    height: 3px;
    background: linear-gradient(90deg, #ff9a62 0 34%, #d64d2c 68%, transparent 100%);
    opacity: 1;
  }

  body.apex-night-theme .western-duel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
    margin: 0.15rem 0 1rem;
  }

  body.apex-night-theme .western-duel-kicker {
    margin-bottom: 0.3rem;
    color: #ff9d68;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  body.apex-night-theme .western-duel-heading h2 {
    color: #fff8ef;
    font-size: clamp(1.35rem, 6.4vw, 1.6rem);
    line-height: 1.05;
  }

  body.apex-night-theme .western-duel-heading p {
    max-width: none;
    margin-top: 0.46rem;
    color: #d8c5b4;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.48;
  }

  body.apex-night-theme .western-duel-limit {
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.62rem 0.74rem;
    border-color: rgba(255, 182, 116, 0.3);
    border-radius: 3px 12px 3px 3px;
    background: rgba(255, 181, 113, 0.09);
    box-shadow: none;
  }

  body.apex-night-theme .western-duel-limit::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    width: 3px;
    height: auto;
    background: #f58b50;
  }

  body.apex-night-theme .western-duel-limit small,
  body.apex-night-theme .western-duel-limit span {
    width: auto;
    max-width: none;
    padding: 0;
    color: #d8b99e;
    font-size: 0.63rem;
    line-height: 1.2;
    letter-spacing: 0.045em;
    white-space: normal;
  }

  body.apex-night-theme .western-duel-limit small {
    flex: 1 1 auto;
  }

  body.apex-night-theme .western-duel-limit strong {
    color: #ffd18e;
    font-size: 1.5rem;
    line-height: 1;
  }

  body.apex-night-theme .western-challenge-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.88rem;
    padding: 1rem;
    border: 1px solid rgba(241, 152, 89, 0.3);
    border-radius: 3px 17px 3px 3px;
    color: #fff4e8;
    background: linear-gradient(160deg, rgba(37, 29, 24, 0.98), rgba(18, 21, 27, 0.98));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.035);
  }

  body.apex-night-theme .western-form-intro {
    grid-column: auto;
    align-items: flex-start;
    gap: 0.72rem;
    padding-bottom: 0.78rem;
    border-bottom: 1px solid rgba(255, 184, 119, 0.18);
  }

  body.apex-night-theme .western-form-intro > span {
    width: 42px;
    height: 42px;
    color: #17100c;
    background: linear-gradient(145deg, #ffc176, #ee7845);
    box-shadow: 0 7px 18px rgba(235, 105, 56, 0.22);
  }

  body.apex-night-theme .western-form-intro strong {
    color: #fff8ef;
    font-size: 1.08rem;
    line-height: 1.1;
    text-transform: none;
  }

  body.apex-night-theme .western-form-intro small {
    margin-top: 0.28rem;
    color: #cdb8a7;
    font-size: 0.7rem;
    line-height: 1.4;
  }

  body.apex-night-theme .western-challenge-form label {
    min-width: 0;
    margin: 0;
  }

  body.apex-night-theme .western-challenge-form label > span {
    margin-bottom: 0.42rem;
    color: #ffb174;
    font-size: 0.67rem;
    line-height: 1.2;
    letter-spacing: 0.055em;
  }

  body.apex-night-theme .western-challenge-form .form-select,
  body.apex-night-theme .western-challenge-form .form-control {
    width: 100%;
    min-height: 50px;
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(255, 186, 126, 0.36);
    border-radius: 3px 11px 3px 3px;
    color: #fff8ef;
    background-color: #0e1319;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
    font-size: 1rem;
    font-weight: 700;
  }

  body.apex-night-theme .western-challenge-form .form-select:focus,
  body.apex-night-theme .western-challenge-form .form-control:focus {
    border-color: #ff9a61;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(242, 119, 67, 0.17);
  }

  body.apex-night-theme .western-challenge-form .form-select option {
    color: #f7eee6;
    background: #12171d;
  }

  body.apex-night-theme .western-stake-field {
    position: static;
  }

  body.apex-night-theme .western-btn {
    min-height: 48px;
    padding: 0.7rem 1rem;
    border-radius: 3px 12px 3px 3px;
    font-size: 0.83rem;
    font-weight: 850;
  }

  body.apex-night-theme .western-btn.is-challenge {
    width: 100%;
    min-height: 52px;
    margin-top: 0.08rem;
    color: #fff;
    border-color: #ff8652;
    background: linear-gradient(135deg, #f77f49, #c33e25);
    box-shadow: 0 10px 24px rgba(208, 64, 35, 0.32), 0 0 0 3px rgba(238, 103, 55, 0.09);
  }

  body.apex-night-theme .western-btn.is-challenge > span {
    font-size: 1.15rem;
    line-height: 1;
  }

  body.apex-night-theme .western-showdown {
    grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
    border-color: rgba(244, 157, 94, 0.3);
    border-radius: 3px 17px 3px 3px;
    background: linear-gradient(160deg, rgba(37, 29, 24, 0.98), rgba(16, 20, 26, 0.98));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
  }

  body.apex-night-theme .western-fighter,
  body.apex-night-theme .western-fighter.is-opponent {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    justify-items: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.9rem 0.32rem 0.8rem;
    text-align: center;
  }

  body.apex-night-theme .western-fighter.is-opponent .western-avatar,
  body.apex-night-theme .western-avatar {
    width: 54px;
    height: 54px;
    grid-column: auto;
    grid-row: auto;
    border: 2px solid rgba(255, 192, 130, 0.66);
    box-shadow: 0 0 0 3px rgba(241, 125, 71, 0.1), 0 8px 18px rgba(0, 0, 0, 0.34);
  }

  body.apex-night-theme .western-fighter > strong {
    width: 100%;
    max-width: 100%;
    color: #fff8ef;
    font-size: 0.96rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.apex-night-theme .western-fighter > small {
    color: #bdab9c;
    font-size: 0.54rem;
    line-height: 1.2;
    letter-spacing: 0.035em;
  }

  body.apex-night-theme .western-stake-seal {
    width: 74px;
    height: 74px;
    min-height: 74px;
    padding: 0.55rem;
    border: 1px solid rgba(255, 185, 110, 0.5);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 36%, #7e432e, #271916 72%);
    clip-path: none;
    filter: none;
    box-shadow: 0 0 0 4px rgba(229, 116, 64, 0.08), 0 9px 20px rgba(0, 0, 0, 0.38);
  }

  body.apex-night-theme .western-stake-seal small,
  body.apex-night-theme .western-stake-seal span {
    width: auto;
    max-width: 58px;
    color: #e4c5aa;
    font-size: 0.42rem;
    line-height: 1;
    letter-spacing: 0.04em;
  }

  body.apex-night-theme .western-stake-seal strong {
    margin: 0.12rem 0;
    color: #ffd38f;
    font-size: 1.85rem;
    line-height: 0.78;
  }

  body.apex-night-theme .western-duel-state {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top-color: rgba(255, 182, 116, 0.22);
    background: rgba(255, 179, 107, 0.08);
  }

  body.apex-night-theme .western-state-label {
    margin-bottom: 0.2rem;
    color: #ff9f68;
    font-size: 0.61rem;
    letter-spacing: 0.075em;
  }

  body.apex-night-theme .western-duel-state strong {
    color: #fff5e9;
    font-size: 0.78rem;
    line-height: 1.38;
  }

  body.apex-night-theme .western-showdown.is-accepted .western-duel-state {
    border-top-color: rgba(91, 216, 154, 0.3);
    background: rgba(61, 190, 129, 0.1);
  }

  body.apex-night-theme .western-showdown.is-accepted .western-state-label {
    color: #75e4ad;
  }

  body.apex-night-theme .western-duel-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  body.apex-night-theme .western-duel-actions form,
  body.apex-night-theme .western-duel-actions .western-btn,
  body.apex-night-theme .western-duel-state > form,
  body.apex-night-theme .western-duel-state > form .western-btn {
    width: 100%;
  }

  body.apex-night-theme .western-btn.is-accept {
    color: #07170f;
    border-color: #76e0ac;
    background: linear-gradient(135deg, #75e2ae, #35a971);
    box-shadow: 0 8px 20px rgba(48, 174, 112, 0.2);
  }

  body.apex-night-theme .western-btn.is-decline {
    color: #f3ded0;
    border-color: rgba(255, 166, 109, 0.38);
    background: rgba(255, 151, 91, 0.07);
  }

  body.apex-night-theme .western-btn.is-quiet {
    color: #ffb287;
    border-color: rgba(239, 119, 68, 0.5);
    background: rgba(201, 70, 39, 0.11);
  }

  body.apex-night-theme .western-locked-mark {
    min-height: 36px;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    border-color: rgba(94, 216, 155, 0.28);
    color: #9ae9bf;
    background: rgba(64, 185, 126, 0.08);
    font-size: 0.61rem;
  }

  body.apex-night-theme .western-duel-empty {
    min-height: 94px;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0.9rem;
    border-color: rgba(242, 155, 94, 0.34);
    color: #d8c5b5;
    background: rgba(15, 18, 23, 0.88);
    text-align: left;
  }

  body.apex-night-theme .western-duel-empty > span {
    color: #ff9a62;
  }

  body.apex-night-theme .western-duel-empty p {
    font-size: 0.75rem;
    line-height: 1.45;
  }

  body.apex-night-theme .western-duel-empty a {
    color: #ffaf7e;
  }

  body.apex-night-theme .western-duel-roster {
    border-top-color: rgba(255, 178, 109, 0.18);
  }

  body.apex-night-theme .western-roster-title strong {
    color: #fff2e2;
    font-size: 1rem;
    text-transform: none;
  }

  body.apex-night-theme .western-roster-card {
    align-items: stretch;
    flex-direction: column;
    padding: 0.75rem;
    border-color: rgba(235, 150, 91, 0.22);
    background: rgba(14, 18, 23, 0.84);
  }

  body.apex-night-theme .western-roster-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 0.48rem;
    border-top: 1px solid rgba(255, 181, 111, 0.12);
    text-align: left;
  }
}

/* Shared interaction polish: touch targets, text flow and keyboard states. */
body.apex-night-theme :is(button, input, select, textarea, a) {
  -webkit-tap-highlight-color: transparent;
}

body.apex-night-theme :is(a, button, input, select, textarea, [tabindex]):focus-visible,
body.apex-night-theme.editorial-theme .site-menu-btn:focus-visible {
  outline: 2px solid var(--apex-blue) !important;
  outline-offset: 3px;
}

body.apex-night-theme :is(button:disabled, .btn.disabled) {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body.apex-night-theme .skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 1200;
  padding: .8rem 1rem;
  border-radius: 8px;
  color: var(--apex-ink);
  background: var(--apex-surface-2);
  transform: translateY(-150%);
}

body.apex-night-theme .skip-link:focus {
  transform: none;
}

body.apex-night-theme :is(.site-menu-btn, .nav-chip, .menu-logout-btn, .profile-logout-btn, .event-card-action, .western-btn) {
  min-height: 44px;
  touch-action: manipulation;
}

body.apex-night-theme .site-menu-btn {
  min-width: 44px;
  flex-shrink: 0;
}

body.apex-night-theme .site-header-actions .nav-chip {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-content: center;
}

body.apex-night-theme :is(.event-card-copy h3, .home-command h1, .event-hero-copy h1, .insight-card strong) {
  overflow-wrap: anywhere;
}

body.apex-night-theme .event-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
}

body.apex-night-theme .event-card-foot {
  flex-wrap: wrap;
  row-gap: .75rem;
}

body.apex-night-theme .event-card-foot .event-card-action {
  height: auto;
  flex-shrink: 0;
  padding-inline: .8rem;
  font-size: .75rem;
}

body.apex-night-theme .activity-news-copy :is(strong, small) {
  white-space: normal;
  overflow-wrap: anywhere;
}

body.apex-night-theme .insight-card strong {
  white-space: normal;
  line-height: 1.3;
}

body.apex-night-theme .profile-analytics-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.apex-night-theme .profile-analytics-grid .accuracy-card { grid-column: span 2; }
body.apex-night-theme .profile-analytics-grid .insight-card { grid-column: span 3; }

body.apex-night-theme .table-scroll-hint {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--apex-line);
  color: var(--apex-muted);
  font-size: .75rem;
}

body.apex-night-theme .round-heading {
  text-decoration: none;
  cursor: help;
}

body.apex-night-theme :is(.leaderboard-table, .profile-race-kpi, .community-score, .countdown-chip) {
  font-variant-numeric: tabular-nums;
}

body.apex-night-theme .errorlist {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  color: #ffacb3;
  font-size: .8rem;
}

body.apex-night-theme [aria-invalid="true"] {
  border-color: #ff8992;
}

@media (max-width: 1100px) {
  body.apex-night-theme .desktop-nav { display: none; }
  body.apex-night-theme.editorial-theme .site-menu-btn { display: inline-flex; }
}

@media (max-width: 576px) {
  body.apex-night-theme .site-header > .container { padding-inline: .7rem; gap: .5rem; }
  body.apex-night-theme .brand-mark { display: none; }
  body.apex-night-theme .site-brand { margin-right: 0; }
  body.apex-night-theme .site-header-actions .nav-chip { max-width: 90px; }
  body.apex-night-theme :is(.form-control, .form-select) { font-size: 16px; min-height: 44px; }
  body.apex-night-theme .profile-analytics-grid { grid-template-columns: minmax(0, 1fr); }
  body.apex-night-theme .profile-analytics-grid :is(.accuracy-card, .insight-card) { grid-column: auto; }
}

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

/* A quieter, more editorial treatment for the event duel panel. */
body.apex-night-theme .western-duel {
  --western-ink: #e8e6e1;
  --western-brown: #807064;
  --western-rust: #b8896c;
  padding: clamp(1rem, 2.5vw, 1.45rem);
  border: 1px solid rgba(202, 190, 177, .14);
  border-radius: 16px;
  color: var(--western-ink);
  background:
    radial-gradient(480px 180px at 95% 0, rgba(173, 133, 102, .07), transparent 72%),
    linear-gradient(145deg, #171c22, #12171c 72%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .025);
}

body.apex-night-theme .western-duel::after {
  inset: 0 auto auto 1.4rem;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, #b8896c, rgba(184, 137, 108, .15));
  opacity: .8;
}

body.apex-night-theme .western-duel.has-duel-art::before {
  background-image:
    linear-gradient(90deg, rgba(18, 23, 28, .96), rgba(18, 23, 28, .82) 55%, rgba(18, 23, 28, .9)),
    var(--western-duel-art);
  filter: grayscale(.72) saturate(.48) contrast(.94);
}

body.apex-night-theme .western-duel-heading {
  align-items: center;
  gap: 1.25rem;
  margin: .25rem 0 1rem;
}

body.apex-night-theme .western-duel-kicker {
  margin-bottom: .3rem;
  color: #b99a83;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .1em;
}

body.apex-night-theme .western-duel-heading h2 {
  color: #f1efeb;
  font-family: "Barlow Condensed", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -.015em;
  text-transform: none;
}

body.apex-night-theme .western-duel-heading p {
  max-width: 620px;
  margin-top: .4rem;
  color: #a7adb3;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.55;
}

body.apex-night-theme .western-duel-limit {
  width: 158px;
  min-width: 158px;
  height: auto;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: end;
  justify-content: start;
  gap: .18rem .45rem;
  padding: .68rem .8rem;
  overflow: hidden;
  border: 1px solid rgba(190, 170, 153, .17);
  border-radius: 11px;
  color: #e8e3dd;
  background: rgba(255, 255, 255, .025);
  box-shadow: none;
  clip-path: none;
  filter: none;
  text-align: left;
}

body.apex-night-theme .western-duel-limit::before {
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: 2px;
  height: auto;
  background: #aa8268;
}

body.apex-night-theme .western-duel-limit small {
  grid-column: 1 / -1;
  width: auto;
  max-width: none;
  color: #a9a29c;
  font-size: .57rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: .025em;
  text-align: left;
  text-transform: none;
}

body.apex-night-theme .western-duel-limit strong {
  grid-column: 1;
  color: #e0c7b3;
  font-size: 1.55rem;
  line-height: .9;
}

body.apex-night-theme .western-duel-limit span {
  grid-column: 2;
  width: auto;
  max-width: none;
  padding-bottom: .04rem;
  color: #a9a29c;
  font-size: .61rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .015em;
  text-align: left;
  text-transform: none;
}

body.apex-night-theme .western-showdown,
body.apex-night-theme .western-challenge-form,
body.apex-night-theme .western-roster-card,
body.apex-night-theme .western-duel-empty {
  border-color: rgba(191, 179, 166, .14);
  border-radius: 13px;
  color: #e5e2dc;
  background: rgba(255, 255, 255, .022);
  box-shadow: none;
}

body.apex-night-theme .western-challenge-form {
  grid-template-columns: minmax(0, 1.15fr) minmax(170px, 1.25fr) minmax(140px, .85fr) minmax(190px, auto);
  align-items: end;
  gap: .85rem;
  padding: 1rem;
}

body.apex-night-theme .western-form-intro {
  min-height: 62px;
  align-self: end;
  gap: .65rem;
}

body.apex-night-theme .western-form-intro > span {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(184, 137, 108, .24);
  border-radius: 9px;
  color: #c4aa96;
  background: rgba(184, 137, 108, .07);
  box-shadow: none;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .02em;
}

body.apex-night-theme .western-form-intro strong {
  color: #e9e5df;
  font-family: "Manrope", sans-serif;
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.25;
  text-transform: none;
}

body.apex-night-theme .western-form-intro small {
  margin-top: .22rem;
  color: #979da3;
  font-size: .66rem;
  line-height: 1.4;
}

body.apex-night-theme .western-challenge-form label > span {
  display: block;
  min-height: 1.15em;
  margin-bottom: .38rem;
  color: #b8a18e;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .015em;
  text-transform: none;
}

body.apex-night-theme .western-challenge-form .form-select,
body.apex-night-theme .western-challenge-form .form-control {
  min-height: 44px;
  padding: .62rem .72rem;
  border: 1px solid rgba(188, 181, 172, .18);
  border-radius: 9px;
  color: #ece9e4;
  background-color: #11161b;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  font-size: .83rem;
  font-weight: 600;
}

body.apex-night-theme .western-challenge-form .form-select:focus,
body.apex-night-theme .western-challenge-form .form-control:focus {
  border-color: rgba(184, 137, 108, .55);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(184, 137, 108, .1);
}

body.apex-night-theme .western-challenge-form .form-select option {
  color: #ece9e4;
  background: #11161b;
}

body.apex-night-theme .western-challenge-form label {
  display: block;
  min-width: 0;
  margin: 0;
}

body.apex-night-theme .western-btn {
  min-height: 42px;
  padding: .58rem .85rem;
  border: 1px solid rgba(190, 157, 133, .28);
  border-radius: 9px;
  color: #e9e5df;
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

body.apex-night-theme .western-btn.is-challenge {
  min-height: 44px;
  white-space: nowrap;
  color: #f7f2ec;
  border-color: #8b6a55;
  background: #765844;
}

body.apex-night-theme .western-btn.is-challenge:hover,
body.apex-night-theme .western-btn.is-challenge:focus-visible {
  border-color: #a88972;
  background: #876852;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .18);
}

body.apex-night-theme .western-btn.is-challenge > span { color: #e2cbb9; font-size: .95rem; }

body.apex-night-theme .western-btn.is-accept {
  color: #e7eee8;
  border-color: rgba(111, 146, 122, .42);
  background: #435d4b;
  box-shadow: none;
}

body.apex-night-theme .western-btn.is-decline,
body.apex-night-theme .western-btn.is-quiet {
  color: #c9c4be;
  border-color: rgba(188, 181, 172, .2);
  background: rgba(255, 255, 255, .02);
  box-shadow: none;
}

body.apex-night-theme .western-avatar {
  border: 1px solid rgba(190, 170, 153, .28);
  background: linear-gradient(145deg, #5e5047, #302a26);
  box-shadow: none;
}

body.apex-night-theme .western-stake-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .06rem;
  box-sizing: border-box;
  width: 88px;
  height: 88px;
  min-height: 88px;
  padding: .65rem;
  border: 1px solid rgba(190, 170, 153, .28);
  border-radius: 50%;
  color: #ded2c8;
  background: #24282d;
  clip-path: none;
  filter: none;
  box-shadow: none;
}

body.apex-night-theme .western-stake-seal small,
body.apex-night-theme .western-stake-seal span {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: #aaa39d;
  font-size: .46rem;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1;
  text-align: center;
}

body.apex-night-theme .western-stake-seal strong {
  margin: 0;
  color: #d6bca8;
  font-size: 1.9rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

body.apex-night-theme .western-duel-state {
  border-top-color: rgba(191, 179, 166, .12);
  background: rgba(255, 255, 255, .018);
}

body.apex-night-theme .western-state-label { color: #b9957d; }
body.apex-night-theme .western-duel-state strong { color: #e5e2dc; }
body.apex-night-theme .western-showdown.is-accepted .western-duel-state {
  border-top-color: rgba(111, 146, 122, .24);
  background: rgba(111, 146, 122, .045);
}
body.apex-night-theme .western-showdown.is-accepted .western-state-label { color: #9bb3a1; }
body.apex-night-theme .western-fighter > strong,
body.apex-night-theme .western-roster-card strong { color: #e8e5df; }
body.apex-night-theme .western-fighter > small,
body.apex-night-theme .western-roster-result span { color: #969da3; }
body.apex-night-theme .western-duel-empty { color: #a9afb4; }
body.apex-night-theme .western-duel-empty > span { color: #b8896c; }
body.apex-night-theme .western-duel-empty a { color: #d1b19a; }
body.apex-night-theme .western-roster-title span { color: #b8896c; }
body.apex-night-theme .western-roster-title strong { color: #e8e5df; }
body.apex-night-theme .western-roster-result strong { color: #d7c8bb; }
body.apex-night-theme .western-roster-result strong.is-winner { color: #d7c8bb; }
body.apex-night-theme .western-duel-history span {
  border-color: rgba(191, 179, 166, .12);
  color: #9da3a8;
  background: rgba(255, 255, 255, .02);
}

@media (max-width: 900px) {
  body.apex-night-theme .western-challenge-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.apex-night-theme .western-form-intro,
  body.apex-night-theme .western-btn.is-challenge { grid-column: 1 / -1; }
  body.apex-night-theme .western-form-intro { min-height: 0; }
}

@media (max-width: 620px) {
  body.apex-night-theme .western-duel { padding: .9rem; border-radius: 14px; }
  body.apex-night-theme .western-duel::after { left: .9rem; }
  body.apex-night-theme .western-duel-heading { gap: .75rem; margin: .2rem 0 .9rem; }
  body.apex-night-theme .western-duel-heading p { font-size: .74rem; }
  body.apex-night-theme .western-duel-limit {
    width: fit-content;
    min-width: 158px;
    min-height: 58px;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: end;
    justify-content: start;
    gap: .13rem .4rem;
    padding: .55rem .72rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
  }
  body.apex-night-theme .western-duel-limit small { grid-column: 1 / -1; flex: initial; }
  body.apex-night-theme .western-duel-limit strong { grid-column: 1; font-size: 1.45rem; }
  body.apex-night-theme .western-duel-limit span { grid-column: 2; padding-bottom: .03rem; }
  body.apex-night-theme .western-challenge-form { grid-template-columns: minmax(0, 1fr); gap: .78rem; padding: .9rem; }
  body.apex-night-theme .western-form-intro { padding-bottom: .65rem; border-bottom: 1px solid rgba(191, 179, 166, .12); }
  body.apex-night-theme .western-btn.is-challenge { grid-column: auto; width: 100%; min-height: 46px; }
  body.apex-night-theme .western-challenge-form .form-select,
  body.apex-night-theme .western-challenge-form .form-control { min-height: 46px; font-size: 16px; }
  body.apex-night-theme .western-showdown { grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr); }
  body.apex-night-theme .western-stake-seal { width: 68px; height: 68px; min-height: 68px; padding: .45rem; }
  body.apex-night-theme .western-stake-seal strong { font-size: 1.5rem; }
  body.apex-night-theme .western-stake-seal small,
  body.apex-night-theme .western-stake-seal span { font-size: .38rem; }
  body.apex-night-theme .western-duel-state { background: rgba(255, 255, 255, .018); }
  body.apex-night-theme .western-roster-card { background: rgba(255, 255, 255, .022); }
}

body.apex-night-theme .jury-admin-shell {
  max-width: 980px;
  margin: 2.2rem auto 4rem;
}

body.apex-night-theme .jury-admin-header,
body.apex-night-theme .jury-admin-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.apex-night-theme .jury-admin-header { margin-bottom: 1.35rem; }
body.apex-night-theme .jury-admin-kicker,
body.apex-night-theme .jury-admin-label {
  display: block;
  color: var(--apex-red);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
body.apex-night-theme .jury-admin-header h1 {
  margin: .35rem 0 .25rem;
  color: var(--apex-ink);
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 900;
}
body.apex-night-theme .jury-admin-header p {
  max-width: 620px;
  margin: 0;
  color: var(--apex-muted);
  font-size: .83rem;
  line-height: 1.6;
}
body.apex-night-theme .jury-admin-back {
  flex: 0 0 auto;
  color: var(--apex-ink-soft);
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}
body.apex-night-theme .jury-admin-event-picker,
body.apex-night-theme .jury-admin-status,
body.apex-night-theme .jury-admin-candidate,
body.apex-night-theme .jury-admin-empty,
body.apex-night-theme .jury-admin-outcome {
  border: 1px solid var(--apex-line);
  border-radius: 4px 14px 4px 4px;
  background: linear-gradient(120deg, rgba(24, 34, 46, .96), rgba(14, 20, 28, .94));
}
body.apex-night-theme .jury-admin-event-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  margin-bottom: .75rem;
  padding: .75rem .9rem;
}
body.apex-night-theme .jury-admin-event-picker label {
  color: var(--apex-muted);
  font-size: .75rem;
  font-weight: 800;
}
body.apex-night-theme .jury-admin-event-picker select {
  width: 100%;
  min-height: 42px;
  padding: .55rem .7rem;
  border: 1px solid var(--apex-line);
  border-radius: 8px;
  color: var(--apex-ink);
  background: #111a24;
  font: inherit;
  font-size: .8rem;
}
body.apex-night-theme .jury-admin-status {
  margin-bottom: .8rem;
  padding: .9rem 1rem;
}
body.apex-night-theme .jury-admin-status > div { display: grid; gap: .18rem; }
body.apex-night-theme .jury-admin-status strong { color: var(--apex-ink); font-size: 1rem; }
body.apex-night-theme .jury-admin-status small,
body.apex-night-theme .jury-admin-closed-note { color: var(--apex-muted); font-size: .72rem; }
body.apex-night-theme .jury-admin-close-button {
  min-height: 42px;
  padding: .6rem .9rem;
  border: 1px solid rgba(255, 51, 38, .5);
  border-radius: 4px 10px 4px 4px;
  color: #fff;
  background: linear-gradient(135deg, #d92e25, #a91d18);
  font: inherit;
  font-size: .74rem;
  font-weight: 900;
  cursor: pointer;
}
body.apex-night-theme .jury-admin-close-button:hover { filter: brightness(1.12); }
body.apex-night-theme .jury-admin-outcome {
  display: grid;
  gap: .25rem;
  margin-bottom: .8rem;
  padding: .85rem 1rem;
  border-color: rgba(255, 255, 255, .12);
}
body.apex-night-theme .jury-admin-outcome.has-veto { border-color: rgba(255, 51, 38, .36); }
body.apex-night-theme .jury-admin-outcome strong { color: var(--apex-ink); font-size: .9rem; }
body.apex-night-theme .jury-admin-outcome span { color: var(--apex-muted); font-size: .72rem; }
body.apex-night-theme .jury-admin-candidates { display: grid; gap: .7rem; }
body.apex-night-theme .jury-admin-candidate { padding: .9rem 1rem; }
body.apex-night-theme .jury-admin-candidate.is-vetoed { border-color: rgba(255, 51, 38, .45); }
body.apex-night-theme .jury-admin-candidate > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
body.apex-night-theme .jury-admin-candidate > header span {
  color: var(--apex-red);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .1em;
}
body.apex-night-theme .jury-admin-candidate > header strong {
  color: var(--apex-ink-soft);
  font-size: .72rem;
}
body.apex-night-theme .jury-admin-candidate blockquote {
  margin: .7rem 0 .45rem;
  color: var(--apex-ink);
  font-size: .87rem;
  line-height: 1.55;
}
body.apex-night-theme .jury-admin-author { color: var(--apex-muted); font-size: .7rem; }
body.apex-night-theme .jury-admin-author strong { color: var(--apex-ink-soft); }
body.apex-night-theme .jury-admin-voters {
  margin-top: .8rem;
  padding-top: .65rem;
  border-top: 1px solid var(--apex-line);
}
body.apex-night-theme .jury-admin-voters ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .5rem 0 0;
  padding: 0;
  list-style: none;
}
body.apex-night-theme .jury-admin-voters li {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .55rem;
  border: 1px solid var(--apex-line);
  border-radius: 999px;
  color: var(--apex-ink-soft);
  background: rgba(255, 255, 255, .025);
  font-size: .68rem;
}
body.apex-night-theme .jury-admin-voters time { color: var(--apex-muted); font-size: .6rem; }
body.apex-night-theme .jury-admin-voters p,
body.apex-night-theme .jury-admin-empty {
  color: var(--apex-muted);
  font-size: .75rem;
}
body.apex-night-theme .jury-admin-empty { padding: 1.1rem; }

@media (max-width: 620px) {
  body.apex-night-theme .jury-admin-header,
  body.apex-night-theme .jury-admin-status { align-items: stretch; flex-direction: column; }
  body.apex-night-theme .jury-admin-back { align-self: flex-start; }
  body.apex-night-theme .jury-admin-close-button { width: 100%; }
  body.apex-night-theme .jury-admin-event-picker { grid-template-columns: 1fr; gap: .35rem; }
  body.apex-night-theme .jury-admin-candidates { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 621px) {
  body.apex-night-theme .jury-admin-candidates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
