/* =====================================================================
 * AMSAL FC — OFFICIAL CLUB DESIGN SYSTEM & APPLICATION STYLESHEET
 *
 * Professional football club theme:
 * - Palette: Midnight Obsidian & Navy / Pitch Emerald / Championship Gold
 * - Typography: Barlow Condensed (Display/Athletic) + Inter (Interface/Body)
 * - Complete responsive support for Mobile (360px), Tablet (768px), Desktop (1440px+)
 * - Flawless Dark Mode & Light Mode support via semantic tokens
 * - Public Site (Home, Matches, Tournament, Squad, Ground, Donate, News)
 * - Operations Portal (/admin dashboard, live match controller, bracket manager)
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. DESIGN TOKENS (LIGHT & DARK)
 * --------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Typography */
  --display: 'Barlow Condensed', 'Arial Narrow', -apple-system, sans-serif;
  --body-font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Brand Accents (Consistent across themes) */
  --accent: #1B5E3B;
  --accent-hover: #12402A;
  --accent-glow: rgba(27, 94, 59, 0.28);
  --on-accent: #042017;

  --gold: #E3B03B;
  --gold-hover: #C9972A;
  --gold-glow: rgba(227, 176, 59, 0.28);
  --on-gold: #1c1303;

  --live-red: #ef4444;
  --live-red-glow: rgba(239, 68, 68, 0.35);

  /* Light Theme Surfaces & Text (Default) */
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #e8ecf2;
  --surface-3: #ffffff;
  --surface-card: rgba(255, 255, 255, 0.88);

  --border: rgba(12, 19, 34, 0.08);
  --border-2: rgba(12, 19, 34, 0.16);
  --border-focus: var(--accent);

  --text: #070f1e;
  --text-2: #334155;
  --text-3: #64748b;

  --brand: #12402A;
  --brand-2: #1B5E3B;

  --nav-bg: #12402A;
  --footer-bg: #070b12;
  --footer-text: #94a3b8;

  --hero-a: #f8fafc;
  --hero-b: #edf2f7;
  --hero-ink: #070f1e;
  --hero-muted: #475569;
  --hero-border: rgba(12, 19, 34, 0.08);
  --hero-dot-pattern: rgba(12, 19, 34, 0.04);
  --hero-slider-opacity: 0.10;
  --hero-title-color: #070f1e;
  --hero-title-gradient: linear-gradient(135deg, #12402A 0%, #1B5E3B 55%, #E3B03B 100%);
  --hero-badge-bg: rgba(27, 94, 59, 0.12);
  --hero-badge-border: rgba(27, 94, 59, 0.35);
  --hero-badge-text: #12402A;
  --hero-btn-ghost-bg: rgba(12, 19, 34, 0.05);
  --hero-btn-ghost-border: rgba(12, 19, 34, 0.14);
  --hero-btn-ghost-text: #070f1e;
  --hero-btn-ghost-hover-bg: rgba(27, 94, 59, 0.08);
  --hero-stat-num: #070f1e;
  --hero-stat-border: rgba(12, 19, 34, 0.08);
  --hero-card-bg: rgba(255, 255, 255, 0.90);
  --hero-card-border: rgba(12, 19, 34, 0.12);
  --hero-card-shadow: 0 10px 30px rgba(12, 19, 34, 0.08);
  --hero-card-shadow-hover: rgba(12, 19, 34, 0.16);
  --hero-inner-bg: rgba(255, 255, 255, 0.96);
  --hero-inner-border: rgba(12, 19, 34, 0.08);
  --hero-featured-label: #b45309;
  --hero-matchup-bg: rgba(241, 245, 249, 0.88);
  --hero-matchup-border: rgba(12, 19, 34, 0.09);
  --hero-matchup-hover-bg: #e2e8f0;
  --hero-team-name: #070f1e;
  --hero-vs-color: #b45309;
  --hero-vs-bg: rgba(227, 176, 59, 0.14);
  --hero-vs-border: rgba(227, 176, 59, 0.35);
  --hero-score-color: #070f1e;
  --hero-foot-border: rgba(12, 19, 34, 0.08);
  --hero-cupstrip-bg: rgba(241, 245, 249, 0.88);
  --hero-cupstrip-border: rgba(12, 19, 34, 0.09);
  --hero-cupstrip-text: #070f1e;

  --ticker-bg: rgba(255, 255, 255, 0.95);
  --ticker-border: rgba(12, 19, 34, 0.08);
  --ticker-text: #334155;
  --ticker-link: #070f1e;

  --modal-scrim: rgba(4, 8, 16, 0.65);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.1);

  /* Backward Compatibility Aliases for --cp-* and --pitch */
  --cp-bg: var(--bg);
  --cp-surface: var(--surface-card);
  --cp-surface-solid: var(--surface-solid);
  --cp-surface-2: var(--surface-2);
  --cp-border: var(--border);
  --cp-border-2: var(--border-2);
  --cp-text: var(--text);
  --cp-text-2: var(--text-2);
  --cp-text-3: var(--text-3);
  --cp-accent: var(--accent);
  --cp-accent-hover: var(--accent-hover);
  --cp-on-accent: var(--on-accent);
  --cp-gold: var(--gold);
  --cp-gold-hover: var(--gold-hover);
  --cp-net: var(--brand);
  --cp-nav-bg: var(--nav-bg);
  --cp-footer-bg: var(--footer-bg);
  --cp-footer-text: var(--footer-text);
  --cp-hero-a: var(--hero-a);
  --cp-hero-b: var(--hero-b);
  --cp-hero-ink: var(--hero-ink);
  --cp-hero-muted: var(--hero-muted);
  --cp-glow: var(--accent-glow);
  --cp-scrim: var(--modal-scrim);
  --pitch: var(--brand);
  --pitch-2: var(--brand-2);
  --ink: var(--text);
  --chalk: var(--bg);
  --line: var(--border);
  --muted: var(--text-3);
  --card: var(--surface);
}

html[data-theme="dark"] {
  color-scheme: dark;

  /* Dark Theme Surfaces & Text */
  --bg: #070b12;
  --surface: #12402A;
  --surface-solid: #1B5E3B;
  --surface-2: #0e1526;
  --surface-3: #182238;
  --surface-card: rgba(21, 29, 48, 0.72);

  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);

  --text: #f8fafc;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;

  --brand: #070b12;
  --brand-2: #12402A;

  --nav-bg: rgba(12, 19, 34, 0.88);
  --footer-bg: #05080f;
  --footer-text: #8b98ab;

  --hero-a: #12402A;
  --hero-b: #070b12;
  --hero-ink: #f8fafc;
  --hero-muted: #94a3b8;
  --hero-border: rgba(255, 255, 255, 0.08);
  --hero-dot-pattern: rgba(255, 255, 255, 0.05);
  --hero-slider-opacity: 0.18;
  --hero-title-color: #ffffff;
  --hero-title-gradient: linear-gradient(135deg, #ffffff 0%, #e2e8f0 45%, var(--accent) 75%, var(--gold) 100%);
  --hero-badge-bg: rgba(27, 94, 59, 0.12);
  --hero-badge-border: rgba(27, 94, 59, 0.3);
  --hero-badge-text: var(--accent);
  --hero-btn-ghost-bg: rgba(255, 255, 255, 0.06);
  --hero-btn-ghost-border: rgba(255, 255, 255, 0.16);
  --hero-btn-ghost-text: #f8fafc;
  --hero-btn-ghost-hover-bg: rgba(27, 94, 59, 0.15);
  --hero-stat-num: #ffffff;
  --hero-stat-border: rgba(255, 255, 255, 0.1);
  --hero-card-bg: rgba(12, 19, 34, 0.75);
  --hero-card-border: rgba(255, 255, 255, 0.1);
  --hero-card-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --hero-card-shadow-hover: rgba(0, 0, 0, 0.6);
  --hero-inner-bg: rgba(7, 11, 18, 0.85);
  --hero-inner-border: rgba(255, 255, 255, 0.06);
  --hero-featured-label: var(--gold);
  --hero-matchup-bg: rgba(12, 19, 34, 0.6);
  --hero-matchup-border: rgba(255, 255, 255, 0.08);
  --hero-matchup-hover-bg: rgba(12, 19, 34, 0.85);
  --hero-team-name: #ffffff;
  --hero-vs-color: var(--gold);
  --hero-vs-bg: rgba(227, 176, 59, 0.12);
  --hero-vs-border: rgba(227, 176, 59, 0.3);
  --hero-score-color: #ffffff;
  --hero-foot-border: rgba(255, 255, 255, 0.08);
  --hero-cupstrip-bg: rgba(21, 29, 48, 0.6);
  --hero-cupstrip-border: rgba(255, 255, 255, 0.08);
  --hero-cupstrip-text: #f8fafc;

  --ticker-bg: rgba(12, 19, 34, 0.95);
  --ticker-border: rgba(255, 255, 255, 0.08);
  --ticker-text: #cbd5e1;
  --ticker-link: #f8fafc;

  --modal-scrim: rgba(0, 0, 0, 0.82);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 18px 45px rgba(0, 0, 0, 0.5);

  --cp-bg: var(--bg);
  --cp-surface: var(--surface-card);
  --cp-surface-solid: var(--surface-solid);
  --cp-surface-2: var(--surface-2);
  --cp-border: var(--border);
  --cp-border-2: var(--border-2);
  --cp-text: var(--text);
  --cp-text-2: var(--text-2);
  --cp-text-3: var(--text-3);
  --cp-accent: var(--accent);
  --cp-accent-hover: var(--accent-hover);
  --cp-on-accent: var(--on-accent);
  --cp-gold: var(--gold);
  --cp-gold-hover: var(--gold-hover);
  --cp-net: #05080f;
  --cp-nav-bg: var(--nav-bg);
  --cp-footer-bg: var(--footer-bg);
  --cp-footer-text: var(--footer-text);
}

html[data-theme="light"] {
  color-scheme: light;

  /* Light Theme Surfaces & Text */
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #e8ecf2;
  --surface-3: #ffffff;
  --surface-card: rgba(255, 255, 255, 0.88);

  --border: rgba(12, 19, 34, 0.08);
  --border-2: rgba(12, 19, 34, 0.16);

  --text: #070f1e;
  --text-2: #334155;
  --text-3: #64748b;

  --brand: #12402A;
  --brand-2: #1B5E3B;

  --nav-bg: #12402A;
  --footer-bg: #070b12;
  --footer-text: #94a3b8;

  --hero-a: #f8fafc;
  --hero-b: #edf2f7;
  --hero-ink: #070f1e;
  --hero-muted: #475569;
  --hero-border: rgba(12, 19, 34, 0.08);
  --hero-dot-pattern: rgba(12, 19, 34, 0.04);
  --hero-slider-opacity: 0.10;
  --hero-title-color: #070f1e;
  --hero-title-gradient: linear-gradient(135deg, #12402A 0%, #1B5E3B 55%, #E3B03B 100%);
  --hero-badge-bg: rgba(27, 94, 59, 0.12);
  --hero-badge-border: rgba(27, 94, 59, 0.35);
  --hero-badge-text: #12402A;
  --hero-btn-ghost-bg: rgba(12, 19, 34, 0.05);
  --hero-btn-ghost-border: rgba(12, 19, 34, 0.14);
  --hero-btn-ghost-text: #070f1e;
  --hero-btn-ghost-hover-bg: rgba(27, 94, 59, 0.08);
  --hero-stat-num: #070f1e;
  --hero-stat-border: rgba(12, 19, 34, 0.08);
  --hero-card-bg: rgba(255, 255, 255, 0.90);
  --hero-card-border: rgba(12, 19, 34, 0.12);
  --hero-card-shadow: 0 10px 30px rgba(12, 19, 34, 0.08);
  --hero-card-shadow-hover: rgba(12, 19, 34, 0.16);
  --hero-inner-bg: rgba(255, 255, 255, 0.96);
  --hero-inner-border: rgba(12, 19, 34, 0.08);
  --hero-featured-label: #b45309;
  --hero-matchup-bg: rgba(241, 245, 249, 0.88);
  --hero-matchup-border: rgba(12, 19, 34, 0.09);
  --hero-matchup-hover-bg: #e2e8f0;
  --hero-team-name: #070f1e;
  --hero-vs-color: #b45309;
  --hero-vs-bg: rgba(227, 176, 59, 0.14);
  --hero-vs-border: rgba(227, 176, 59, 0.35);
  --hero-score-color: #070f1e;
  --hero-foot-border: rgba(12, 19, 34, 0.08);
  --hero-cupstrip-bg: rgba(241, 245, 249, 0.88);
  --hero-cupstrip-border: rgba(12, 19, 34, 0.09);
  --hero-cupstrip-text: #070f1e;

  --ticker-bg: rgba(255, 255, 255, 0.95);
  --ticker-border: rgba(12, 19, 34, 0.08);
  --ticker-text: #334155;
  --ticker-link: #070f1e;

  --modal-scrim: rgba(4, 8, 16, 0.65);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #070b12;
    --surface: #12402A;
    --surface-solid: #1B5E3B;
    --surface-2: #0e1526;
    --surface-3: #182238;
    --surface-card: rgba(21, 29, 48, 0.72);

    --border: rgba(255, 255, 255, 0.08);
    --border-2: rgba(255, 255, 255, 0.16);

    --text: #f8fafc;
    --text-2: #cbd5e1;
    --text-3: #94a3b8;

    --brand: #070b12;
    --brand-2: #12402A;

    --nav-bg: rgba(12, 19, 34, 0.88);
    --footer-bg: #05080f;
    --footer-text: #8b98ab;

    --hero-a: #12402A;
    --hero-b: #070b12;
    --hero-ink: #f8fafc;
    --hero-muted: #94a3b8;
    --hero-border: rgba(255, 255, 255, 0.08);
    --hero-dot-pattern: rgba(255, 255, 255, 0.05);
    --hero-slider-opacity: 0.18;
    --hero-title-color: #ffffff;
    --hero-title-gradient: linear-gradient(135deg, #ffffff 0%, #e2e8f0 45%, var(--accent) 75%, var(--gold) 100%);
    --hero-badge-bg: rgba(27, 94, 59, 0.12);
    --hero-badge-border: rgba(27, 94, 59, 0.3);
    --hero-badge-text: var(--accent);
    --hero-btn-ghost-bg: rgba(255, 255, 255, 0.06);
    --hero-btn-ghost-border: rgba(255, 255, 255, 0.16);
    --hero-btn-ghost-text: #f8fafc;
    --hero-btn-ghost-hover-bg: rgba(27, 94, 59, 0.15);
    --hero-stat-num: #ffffff;
    --hero-stat-border: rgba(255, 255, 255, 0.1);
    --hero-card-bg: rgba(12, 19, 34, 0.75);
    --hero-card-border: rgba(255, 255, 255, 0.1);
    --hero-card-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    --hero-card-shadow-hover: rgba(0, 0, 0, 0.6);
    --hero-inner-bg: rgba(7, 11, 18, 0.85);
    --hero-inner-border: rgba(255, 255, 255, 0.06);
    --hero-featured-label: var(--gold);
    --hero-matchup-bg: rgba(12, 19, 34, 0.6);
    --hero-matchup-border: rgba(255, 255, 255, 0.08);
    --hero-matchup-hover-bg: rgba(12, 19, 34, 0.85);
    --hero-team-name: #ffffff;
    --hero-vs-color: var(--gold);
    --hero-vs-bg: rgba(227, 176, 59, 0.12);
    --hero-vs-border: rgba(227, 176, 59, 0.3);
    --hero-score-color: #ffffff;
    --hero-foot-border: rgba(255, 255, 255, 0.08);
    --hero-cupstrip-bg: rgba(21, 29, 48, 0.6);
    --hero-cupstrip-border: rgba(255, 255, 255, 0.08);
    --hero-cupstrip-text: #f8fafc;

    --ticker-bg: rgba(12, 19, 34, 0.95);
    --ticker-border: rgba(255, 255, 255, 0.08);
    --ticker-text: #cbd5e1;
    --ticker-link: #f8fafc;

    --modal-scrim: rgba(0, 0, 0, 0.82);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --card-shadow-hover: 0 18px 45px rgba(0, 0, 0, 0.5);
  }
}

/* ---------------------------------------------------------------------
 * 2. RESET, BASE & GLOBAL STYLES
 * --------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--body-font) !important;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-2);
}

::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---------------------------------------------------------------------
 * 3. LAYOUT & CONTAINERS
 * --------------------------------------------------------------------- */
.tp-container,
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.tp-section {
  padding: 80px 0;
  position: relative;
}

.tp-section-alt {
  background-color: var(--surface-2) !important;
}

.tp-section-head {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.tp-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.tp-title {
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.05;
}

.tp-subtitle {
  color: var(--text-3);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto;
}

.glass-card {
  background: var(--surface-card) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border) !important;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  box-shadow: var(--card-shadow-hover);
}

/* ---------------------------------------------------------------------
 * 5. STICKY NAVIGATION BAR
 * --------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border) !important;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-fixed {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.25s ease;
}

.logo-fixed:hover {
  transform: scale(1.06);
}

.nav-center {
  display: flex;
  align-items: center;
}

.brand-title-link {
  display: flex;
  align-items: center;
}

.club-title-white {
  font-family: var(--display) !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  color: var(--text) !important;
  margin: 0 !important;
  line-height: 1 !important;
  transition: color 0.2s;
}

.brand-title-link:hover .club-title-white {
  color: var(--accent) !important;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2) !important;
  transition: all 0.2s ease;
}

.nav-links li a i {
  font-size: 13px;
  opacity: 0.8;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--accent) !important;
  background: rgba(27, 94, 59, 0.08) !important;
}

.theme-toggle-btn {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-2) !important;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  margin-left: 6px;
}

.theme-toggle-btn:hover {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
  /* No tilt/rotate/scale on hover (user request): colour change only. */
  transform: none;
}

.menu-toggle {
  display: none;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 18px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 72px);
    background: var(--surface-solid) !important;
    border-left: 1px solid var(--border-2) !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    align-items: stretch;
    padding: 24px 16px;
    gap: 8px;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li a {
    padding: 12px 16px;
    font-size: 16px;
  }
}

/* Ticker Banner at Top of Page */
.tp-ticker {
  background: var(--ticker-bg, rgba(255, 255, 255, 0.95));
  border-bottom: 1px solid var(--ticker-border, rgba(12, 19, 34, 0.08));
  font-size: 13px;
  color: var(--ticker-text, #334155);
  padding: 8px 16px;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  position: relative;
  z-index: 50;
}

.tp-ticker-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tp-next-badge {
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.tp-ticker-text {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-ticker-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.tp-ticker-link {
  color: var(--ticker-link, #070f1e);
  text-decoration: none;
  font-weight: 700;
  font-size: 12.5px;
  transition: color 0.2s ease;
}

.tp-ticker-link:hover {
  color: var(--accent);
}

/* ---------------------------------------------------------------------
 * 6. HERO SECTION
 * --------------------------------------------------------------------- */
.tp-hero {
  position: relative;
  background: transparent;
  color: var(--hero-ink);
  padding: 80px 0 100px;
  overflow: hidden;
  border-bottom: 1px solid var(--hero-border, rgba(255, 255, 255, 0.08));
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--hero-dot-pattern, rgba(255, 255, 255, 0.05)) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.3s ease-in-out, transform 1.3s ease-in-out;
  transform: translateX(5%) scale(1.06);
}

.hero-slider .slide.active {
  opacity: 1;
  transform: translateX(0) scale(1.02);
  animation: heroSlidePan 14s linear infinite alternate;
}

@keyframes heroSlidePan {
  0% {
    background-position: center;
  }

  100% {
    background-position: 70% 50%;
  }
}

/* Balance: keep the carousel clearly visible but ensure the hero text and
   match cards stay legible by laying a soft, graduated shade over the slides. */
.hero-slider .slide::after {
  background: linear-gradient(180deg, rgba(7, 11, 18, 0.38) 0%, rgba(7, 11, 18, 0.08) 38%, rgba(7, 11, 18, 0.10) 62%, rgba(7, 11, 18, 0.5) 100%) !important;
}

.tp-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.tp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hero-badge-bg, rgba(27, 94, 59, 0.12));
  border: 1px solid var(--hero-badge-border, rgba(27, 94, 59, 0.3));
  color: var(--hero-badge-text, var(--accent));
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.tp-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: tpPulse 2s infinite;
}

.tp-hero-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(48px, 6.8vw, 88px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
  background: var(--hero-title-gradient, linear-gradient(135deg, #ffffff 0%, #e2e8f0 45%, var(--accent) 75%, var(--gold) 100%));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--hero-title-color, #ffffff);
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.5));
  transition: filter 0.3s ease, color 0.3s ease;
}

.tp-hero-sub {
  color: var(--hero-muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 52ch;
  margin-bottom: 28px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease;
}

.tp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 0;
}

.tp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
}

.tp-btn-accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 4px 20px var(--accent-glow);
  border: 1px solid var(--accent);
}

.tp-btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.tp-btn-ghost {
  background: var(--hero-btn-ghost-bg, rgba(255, 255, 255, 0.06));
  color: var(--hero-btn-ghost-text, var(--hero-ink));
  border: 1px solid var(--hero-btn-ghost-border, rgba(255, 255, 255, 0.16));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.tp-btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--hero-btn-ghost-hover-bg, rgba(27, 94, 59, 0.08));
  transform: translateY(-2px);
}

.tp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--hero-stat-border, rgba(255, 255, 255, 0.1));
  max-width: 500px;
  transition: border-color 0.3s ease;
}

.tp-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 36px;
  color: var(--hero-stat-num, #ffffff);
  line-height: 1;
  font-weight: 800;
  transition: color 0.3s ease;
}

.tp-stat span {
  font-size: 12px;
  color: var(--hero-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: color 0.3s ease;
}

/* Featured Match Box in Hero */
.hero-match-deck {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* The hero match cards are standard site cards with a slight transparency so
   the sliding background carousel faintly shows through. Single-surface card:
   no bezel/inner-well layering. */
.hero-match-deck .tp-featured,
.tp-featured {
  border-radius: 22px !important;
  padding: 16px 18px !important;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.03) 48%,
      rgba(255, 255, 255, 0.11) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -18px 40px rgba(255, 255, 255, 0.02),
    0 20px 45px rgba(0, 0, 0, 0.12) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

/* Cup hero card: pinned to 80% transparency on purpose. */
.hero-match-deck .hero-cup-card.tp-featured,
.hero-cup-card.tp-featured {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.05) 48%,
      rgba(255, 255, 255, 0.18) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.hero-match-deck .tp-featured:hover,
.tp-featured:hover {
  transform: translateY(-2px);
  border-color: var(--hero-card-border, rgba(255, 255, 255, 0.10)) !important;
  box-shadow: 0 14px 36px var(--hero-card-shadow-hover, rgba(0, 0, 0, 0.35)) !important;
}

.hero-match-deck .tp-featured-inner,
.tp-featured-inner {
  background: transparent !important;
  border: 0 !important;
  border-radius: 17px;
  padding: 0 !important;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hero-match-deck .tp-featured-label,
.tp-featured-label {
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hero-featured-label, var(--gold));
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.tp-featured-label-cup {
  color: var(--hero-featured-label, var(--gold)) !important;
}

.hero-match-deck .tp-matchup,
.tp-matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 15px 16px;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hero-match-deck .tp-matchup:hover,
.tp-matchup:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  transform: translateY(-2px);
}

.tp-team {
  flex: 1;
  text-align: center;
}

.hero-match-deck .tp-team img,
.tp-team img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin: 0 auto 6px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.hero-match-deck .tp-team span,
.tp-team span {
  display: block;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 900;
  color: var(--hero-team-name, var(--hero-ink));
  line-height: 1.15;
  text-transform: uppercase;
  text-shadow: none;
  transition: color 0.3s ease;
}

.tp-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
}

.tp-vs span {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  color: var(--hero-vs-color, var(--gold));
  background: var(--hero-vs-bg, rgba(227, 176, 59, 0.24));
  border: 1px solid var(--hero-vs-border, rgba(227, 176, 59, 0.5));
  padding: 4px 10px;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.hero-match-deck .tp-score,
.tp-score {
  font-family: var(--display) !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  color: var(--hero-score-color, var(--hero-ink)) !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  text-shadow: none;
  transition: color 0.3s ease;
}

.hero-match-deck .tp-featured-foot,
.tp-featured-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hero-foot-border, rgba(255, 255, 255, 0.12));
  font-size: 12.5px;
  color: var(--hero-muted);
  font-weight: 700;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.hero-match-deck .tp-featured-label i,
.tp-featured-label i {
  color: var(--hero-vs-color, var(--accent));
}

.tp-live {
  color: var(--live-red);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tp-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-red);
  box-shadow: 0 0 8px var(--live-red-glow);
  animation: tpPulse 1.4s infinite;
}

.tp-cupstrip {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(21, 29, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 13px;
  color: var(--hero-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tp-cupstrip:hover {
  border-color: var(--gold);
  color: #ffffff;
}

.tp-cupstrip strong {
  color: var(--gold);
}

@keyframes tpPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.9);
  }
}

/* ---------------------------------------------------------------------
 * 7. MATCH CENTER & CAROUSEL
 * --------------------------------------------------------------------- */
.match-center-container {
  position: relative;
  margin-top: 24px;
}

.featured-matches-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 4px 20px;
  -webkit-overflow-scrolling: touch;
}

.featured-matches-scroll::-webkit-scrollbar {
  height: 6px;
}

.match-card {
  flex: 0 0 340px;
  background: var(--surface-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  box-shadow: var(--card-shadow) !important;
  transition: transform 0.25s ease, border-color 0.25s ease !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.match-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent) !important;
  box-shadow: var(--card-shadow-hover) !important;
}

.match-card.live-card {
  border-left: 4px solid var(--live-red) !important;
}

.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
}

.competition-name {
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.match-status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
}

.match-status.match-live {
  background: rgba(239, 68, 68, 0.14);
  color: var(--live-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.match-status.match-completed {
  background: rgba(227, 176, 59, 0.14);
  color: var(--gold);
  border: 1px solid rgba(227, 176, 59, 0.3);
}

.match-status.match-scheduled {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.match-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0;
  gap: 12px;
}

.match-content .team {
  flex: 1;
  text-align: center;
}

.match-content .team-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.match-content .team-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  text-transform: uppercase;
}

.match-vs {
  min-width: 60px;
  text-align: center;
}

.vs-badge {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(27, 94, 59, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}

.match-time-display {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 600;
}

.score-display {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.score-divider {
  color: var(--accent);
  font-weight: 400;
}

.match-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.match-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.scroll-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: all 0.2s ease;
}

.scroll-nav:hover {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-color: var(--accent) !important;
}

.scroll-nav.prev {
  left: -14px;
}

.scroll-nav.next {
  right: -14px;
}

.jump-to-today {
  display: none;
}

/* ---------------------------------------------------------------------
 * 8. TOURNAMENT BRACKET (PRATHAM KHASI CUP)
 * --------------------------------------------------------------------- */
.event-bracket-block {
  margin-top: 32px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: var(--card-shadow);
}

.event-bracket-block h3 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text);
  text-align: center;
  margin: 0 0 6px;
}

.event-bracket-block p {
  text-align: center;
  color: var(--text-3);
  font-size: 15px;
  margin: 0 0 32px;
}

.bracket-scroll {
  overflow-x: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.bracket {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 16px;
  min-width: 1260px;
  align-items: center;
  position: relative;
}

.bracket-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-around;
  height: 100%;
}

.bracket-col h4 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-align: center;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

/* Centre Final Highlight Column (Col 4, index 3) */
.bracket-col:nth-child(4) h4 {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-size: 18px;
}

.bracket-col:nth-child(4) .cup-card {
  border: 2px solid var(--gold) !important;
  background: linear-gradient(145deg, var(--surface) 0%, rgba(227, 176, 59, 0.08) 100%) !important;
  box-shadow: 0 0 25px var(--gold-glow) !important;
}

.cup-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, border-color 0.2s;
}

.cup-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent) !important;
}

/* Bracket connector lines — draw a line from each match card across the
   inter-column gap toward the centre (inward progress of the bracket tree).
   Left-half columns (R1/QF/SF) lead right, right-half columns lead left,
   and the Final column (col 4) has no outgoing connector. */
.cup-card {
  position: relative;
}


.cup-meta {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cup-teams {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.cup-teams div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cup-teams div strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
}

.cup-team-crest {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.cup-team-row {
  gap: 6px;
}

.cup-score-input {
  width: 40px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-alt, #fff);
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  padding: 0 2px;
  flex-shrink: 0;
  margin-left: auto;
}

.cup-score-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* Hide native number steppers for a clean look */
.cup-score-input::-webkit-outer-spin-button,
.cup-score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cup-score-input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.cup-link-chip {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.connector-drag {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  transform: translateY(-50%);
  cursor: grab;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  z-index: 3;
  opacity: 0.35;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.cup-card:hover .connector-drag {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}

.connector-drag:active {
  cursor: grabbing;
  opacity: 1;
}

.bracket-col:nth-child(-n+3) .connector-drag {
  right: -20px;
}

.bracket-col:nth-child(n+5) .connector-drag {
  left: -20px;
}

.bracket-col:nth-child(4) .connector-drag {
  display: none;
}

/* Drawn connection lines (SVG overlay over the bracket). */
.bracket-links {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.bracket-link {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

.bracket-link-live {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
  stroke-dasharray: 5 4;
}

.cup-card.is-dragging {
  opacity: 0.5;
}

.cup-card.is-drop-target {
  outline: 2px dashed var(--gold);
  outline-offset: 3px;
  background: var(--surface) !important;
}

.cup-card small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
}

.badge-live {
  background: var(--live-red);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.badge-upcoming {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.badge-finished {
  background: rgba(227, 176, 59, 0.15);
  color: var(--gold);
  border: 1px solid rgba(227, 176, 59, 0.3);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

/* ---------------------------------------------------------------------
 * 9. FIRST TEAM SQUAD SECTION
 * --------------------------------------------------------------------- */
.tp-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}

.tp-filter-btn {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tp-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tp-filter-btn.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--on-accent) !important;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.tp-squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.squad-card {
  background: var(--surface-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.squad-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent) !important;
  box-shadow: var(--card-shadow-hover);
}

.squad-card-head {
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--surface-solid) 100%);
  overflow: hidden;
}

.squad-num {
  position: absolute;
  top: 6px;
  right: 12px;
  font-family: var(--display);
  font-size: 72px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.12);
  line-height: 1;
  pointer-events: none;
}

.squad-icon {
  font-size: 64px;
  color: var(--accent);
  filter: drop-shadow(0 4px 12px rgba(27, 94, 59, 0.3));
  transition: transform 0.3s ease;
}

.squad-card:hover .squad-icon {
  transform: scale(1.1);
}

.squad-body {
  padding: 18px 20px;
  text-align: center;
}

.squad-name {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.squad-pos {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.squad-foot {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 12px;
  color: var(--text-3);
}

.squad-foot span strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------------------------------------------------------------------
 * 10. STAFF SECTION (ACCORDION)
 * --------------------------------------------------------------------- */
.staff-main-accordion {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.staff-main-summary {
  padding: 24px 28px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.staff-main-summary::-webkit-details-marker {
  display: none;
}

.summary-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-all-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.staff-main-accordion[open] .view-all-badge i {
  transform: rotate(180deg);
}

.staff-accordion-content {
  padding: 0 28px 32px;
}

/* ---------------------------------------------------------------------
 * 11. GROUND SECTION
 * --------------------------------------------------------------------- */
#ground-display-image {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin-top: 24px;
}

.ground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.ground-card {
  background: var(--surface-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 18px !important;
  padding: 24px !important;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, border-color 0.2s;
}

.ground-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent) !important;
}

.ground-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(27, 94, 59, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 6px;
}

.ground-card h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  text-transform: uppercase;
}

.ground-card p {
  font-size: 15px;
  color: var(--text-2);
  margin: 0;
  font-weight: 500;
}

/* ---------------------------------------------------------------------
 * 12. NEWS SECTION
 * --------------------------------------------------------------------- */
.tp-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.tp-news-card {
  background: var(--surface-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.tp-news-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent) !important;
  box-shadow: var(--card-shadow-hover);
}

.tp-news-card img {
  height: 180px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tp-news-card:hover img {
  transform: scale(1.04);
}

.tp-news-icon {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--surface-solid) 100%);
  font-size: 48px;
  color: var(--accent);
}

.tp-news-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tp-news-body h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.tp-news-body p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.tp-news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-size: 13px;
  color: var(--text-3);
}

.tp-news-link {
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------------------------------------------------------------------
 * 13. DONATE & NEWSLETTER SECTION
 * --------------------------------------------------------------------- */
.tp-tickets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.tp-newsletter {
  padding: 36px 32px;
  border-radius: 22px;
}

.tp-newsletter h3 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 8px;
}

.tp-field {
  width: 100%;
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  padding: 14px 18px !important;
  font-size: 15px !important;
  font-family: var(--body-font) !important;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.tp-field:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ---------------------------------------------------------------------
 * 14. CONTACT SECTION
 * --------------------------------------------------------------------- */
.tp-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.tp-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.tp-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(27, 94, 59, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: none;
}

.tp-info-item h4 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
  text-transform: uppercase;
}

.tp-info-item p {
  color: var(--text-2);
  font-size: 15px;
  margin: 0;
}

.tp-contact-form {
  padding: 36px 32px;
}

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

.tp-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin-bottom: 6px;
}

/* ---------------------------------------------------------------------
 * 15. FOOTER
 * --------------------------------------------------------------------- */
.footer {
  background: var(--footer-bg) !important;
  color: var(--footer-text) !important;
  padding: 60px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.footer h3 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  color: #ffffff !important;
  margin: 0 0 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-tagline {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 24px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--on-accent) !important;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer-admin-link {
  margin-bottom: 24px;
}

.footer-admin-login {
  color: var(--text-3);
  font-size: 12px;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.footer-admin-login:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-copyright {
  color: var(--footer-text) !important;
  font-size: 13px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------------
 * 16. MODALS, DRAWERS & TOASTS
 * --------------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--modal-scrim);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex !important;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-content {
  background: var(--surface-solid) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 24px !important;
  padding: 32px !important;
  width: 100%;
  max-width: 520px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--live-red);
  color: #ffffff;
  border-color: var(--live-red);
}

.login-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-modal-icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.login-modal-header h2 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  text-transform: uppercase;
}

.login-modal-header p {
  color: var(--text-3);
  font-size: 14px;
  margin: 4px 0 0;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  font-family: var(--body-font) !important;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-submit {
  width: 100%;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 14px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  font-family: var(--display) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.form-submit:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-2px);
}

.error-message {
  color: var(--live-red);
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
}

/* News Slide-in Panel */
.news-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--modal-scrim);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.news-panel-overlay.active {
  display: block;
}

.news-panel {
  position: fixed;
  top: 0;
  right: -520px;
  width: 100%;
  max-width: 500px;
  height: 100vh;
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 32px 28px;
}

.news-panel.active {
  right: 0;
}

.news-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.news-panel-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 260px;
  max-width: 360px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  /* Toasts were "hiding" after 0.3s (2026-11-04, user): style.css
     sets .toast { transform: translateX(400px) } for a .show class
     that admin/homepage toasts never add, so once the slide-in
     animation ended the toast snapped back off-screen right. Force
     it to stay in place for its full 8s/15s (or until × is tapped). */
  transform: none !important;
}
@media (max-width:480px){
  .toast-container{right:16px;left:16px;bottom:16px}
  .toast{min-width:0;max-width:none;width:100%}
}

.toast strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.toast span {
  font-size: 13px;
  color: var(--text-2);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------------
 * 17. OPERATIONS PORTAL (/admin DASHBOARD)
 * --------------------------------------------------------------------- */
.admin-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 20px 80px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 46px);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
  line-height: 1;
  letter-spacing: 0.02em;
}

.dashboard-subtitle {
  color: var(--text-3);
  font-size: 15px;
  margin: 6px 0 0;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.user-placeholder {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(27, 94, 59, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.user-role {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 2px 0 0;
}

.user-edit-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--live-red);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 2px;
  display: inline-block;
}

/* Admin Dashboard Layout (Sidebar + Main Content) */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.admin-sidebar {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  position: sticky;
  top: 92px;
  box-shadow: var(--card-shadow);
}

.admin-sidebar-header {
  padding: 8px 12px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.admin-badge-ops {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.admin-tab-btn i {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: var(--text-3);
  transition: color 0.2s;
}

.admin-tab-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.admin-tab-btn:hover i {
  color: var(--accent);
}

.admin-tab-btn.active {
  background: rgba(27, 94, 59, 0.12) !important;
  border-color: rgba(27, 94, 59, 0.25) !important;
  color: var(--accent) !important;
  font-weight: 700;
}

.admin-tab-btn.active i {
  color: var(--accent) !important;
}

.tab-badge {
  margin-left: auto;
  background: var(--live-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  animation: tpPulse 2s infinite;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.admin-tab-panel {
  display: none;
  animation: adminFadeIn 0.25s ease-out;
}

.admin-tab-panel.active {
  display: block;
}

@keyframes adminFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard Cards */
.dashboard-card {
  background: var(--surface-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  padding: 28px !important;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.card-icon {
  font-size: 22px;
  color: var(--accent);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(27, 94, 59, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.02em;
}

.card-desc {
  font-size: 14px;
  color: var(--text-3);
  margin: -10px 0 20px;
  line-height: 1.5;
}

/* Stats Overview Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.admin-stat-card:nth-child(2)::before {
  background: #3b82f6;
}

.admin-stat-card:nth-child(3)::before {
  background: var(--gold);
}

.admin-stat-card:nth-child(4)::before {
  background: #ec4899;
}

.admin-stat-info strong {
  display: block;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.admin-stat-info span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  display: block;
}

.admin-stat-icon {
  font-size: 32px;
  color: var(--accent);
  opacity: 0.25;
}

/* Quick Action Shortcuts */
.admin-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.admin-shortcut-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-shortcut-btn i {
  font-size: 18px;
  color: var(--accent);
}

.admin-shortcut-btn:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.admin-shortcut-btn:hover i {
  color: var(--on-accent);
}

/* Forms & Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-grid .form-group {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  font-family: var(--body-font) !important;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px !important;
}

textarea.form-input {
  min-height: 80px;
  resize: vertical;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px !important;
  border-radius: 10px !important;
  font-family: var(--display) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none !important;
  width: auto !important;
}

.form-submit.accent {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.form-submit.accent:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-2px);
}

.form-submit.secondary {
  background: var(--surface-2) !important;
  color: var(--text-2) !important;
  border: 1px solid var(--border) !important;
}

.form-submit.secondary:hover {
  background: var(--border-2) !important;
  color: var(--text) !important;
}

/* Item List / Data Rows */
.item-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-item-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.admin-item-card:hover {
  border-color: var(--border-2);
  background: var(--surface);
}

.admin-item-main {
  flex: 1;
  min-width: 240px;
}

.admin-item-title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.admin-item-sub {
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-member-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-member-num {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  background: rgba(27, 94, 59, 0.12);
  padding: 4px 10px;
  border-radius: 8px;
  min-width: 38px;
  text-align: center;
}

.badge-role {
  background: rgba(59, 130, 246, 0.14);
  color: #3b82f6;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}

.admin-item-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 4px;
}

.badge-success {
  background: rgba(27, 94, 59, 0.14);
  color: var(--accent);
}

.badge-draft {
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-3);
}

.status-live {
  background: rgba(239, 68, 68, 0.16);
  color: var(--live-red);
}

.status-completed {
  background: rgba(227, 176, 59, 0.16);
  color: var(--gold);
}

.status-scheduled {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.admin-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.admin-btn-action:hover {
  transform: translateY(-1px);
}

.admin-btn-action.btn-edit {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.admin-btn-action.btn-edit:hover {
  background: #3b82f6;
  color: #fff;
}

.admin-btn-action.btn-del {
  color: var(--live-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-btn-action.btn-del:hover {
  background: var(--live-red);
  color: #fff;
}

.admin-btn-action.btn-manage {
  color: var(--accent);
  border-color: rgba(27, 94, 59, 0.3);
}

.admin-btn-action.btn-manage:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.admin-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
  border-radius: 14px;
}

.admin-empty-state i {
  font-size: 36px;
  color: var(--text-3);
  margin-bottom: 10px;
  display: block;
}

.admin-empty-state p {
  margin: 0;
  font-size: 14px;
}

/* ---------------------------------------------------------------------
 * LIVE MATCH CONTROLLER DECK
 * --------------------------------------------------------------------- */
.live-deck-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 18px;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.live-deck-card.is-live {
  border-color: var(--live-red) !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
  background: linear-gradient(145deg, var(--surface-card) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.live-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.live-deck-round {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  text-transform: uppercase;
}

.live-deck-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-3);
}

.live-deck-status-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.live-deck-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.live-deck-team {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-deck-team.home {
  justify-content: flex-end;
  text-align: right;
}

.live-deck-team.away {
  justify-content: flex-start;
  text-align: left;
}

.live-deck-team-name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
}

.live-deck-score-input {
  width: 64px;
  height: 52px;
  background: var(--surface) !important;
  border: 2px solid var(--border-2) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  font-family: var(--display) !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  text-align: center;
  padding: 0 !important;
}

.live-deck-score-input:focus {
  border-color: var(--accent) !important;
  outline: none;
}

.live-deck-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vs-label {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 900;
  color: var(--gold);
}

.live-clock-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(27, 94, 59, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
}

.live-deck-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  align-items: end;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.control-select,
.control-input {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 600;
}

.control-select:focus,
.control-input:focus {
  outline: none;
  border-color: var(--accent);
}

.minute-control {
  min-width: 200px;
}

.minute-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.minute-input {
  width: 60px;
  text-align: center;
  font-weight: 800;
}

.preset-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-pill:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.live-deck-save-btn {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: all 0.2s;
  width: 100%;
}

.live-deck-save-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Superadmin Permissions Cards */
.admin-user-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
}

.admin-user-card.is-disabled {
  opacity: 0.65;
  border-color: rgba(239, 68, 68, 0.4);
}

.admin-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-avatar-icon {
  font-size: 28px;
}

.badge-super {
  background: rgba(227, 176, 59, 0.16);
  color: var(--gold);
}

.badge-admin {
  background: rgba(27, 94, 59, 0.16);
  color: var(--accent);
}

.badge-status {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
}

.status-active {
  background: rgba(27, 94, 59, 0.14);
  color: var(--accent);
}

.status-inactive {
  background: rgba(239, 68, 68, 0.14);
  color: var(--live-red);
}

.perms-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.perms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.perm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.perm-checkbox-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-save-perm {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-color: var(--accent) !important;
}

.superadmin-protected-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Event Management Modal / Panel */
#event-manage {
  background: var(--surface-card);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 28px;
  margin-top: 24px;
  box-shadow: 0 10px 40px var(--accent-glow);
}

#event-manage-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 16px;
}

#event-manage h4 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  margin: 24px 0 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

/* Operations Login Box */
.login-box-card {
  max-width: 480px;
  margin: 40px auto;
  padding: 40px 32px !important;
  text-align: center;
}

.login-crest-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--brand) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px var(--accent-glow);
}

.login-crest-wrap img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.login-title {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 6px;
}

.login-sub {
  color: var(--text-3);
  font-size: 14.5px;
  margin: 0 0 24px;
}

.login-notice-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 24px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.login-notice-box i {
  color: var(--gold);
  font-size: 16px;
  margin-top: 2px;
}

/* ---------------------------------------------------------------------
 * 18. RESPONSIVE BREAKPOINTS
 * --------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    overflow-x: auto;
    padding: 10px;
  }

  .admin-nav-tabs {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tab-btn {
    width: auto;
    padding: 9px 14px;
    font-size: 13.5px;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-container {
    padding: 20px 14px 60px;
  }

  .dashboard-card {
    padding: 20px 16px !important;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .live-deck-matchup {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .live-deck-team.home,
  .live-deck-team.away {
    justify-content: center;
    text-align: center;
  }
}

/* --------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .tp-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .tp-tickets-grid,
  .tp-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tp-section {
    padding: 60px 0;
  }

  .tp-hero {
    padding: 60px 0 70px;
  }

  .tp-stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

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

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

  .modal-content {
    padding: 24px 20px !important;
  }
}

@media (max-width: 480px) {
  .tp-hero-cta {
    flex-direction: column;
  }

  .tp-btn {
    width: 100%;
    justify-content: center;
  }

  .match-card {
    flex: 0 0 290px;
  }

  .tp-ticker-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

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

  .live-deck-controls {
    grid-template-columns: 1fr;
  }

  .admin-shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   KNOCKOUT BRACKET BOARD STUDIO (Interactive 2D Drag-and-Drop Canvas)
   Based on the Knockout Bracket Board prototype
   ========================================================================== */

.board-studio-section {
  margin-top: 24px;
}

.board-studio-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.board-container {
  --bar: #f1f4ef;
  --bar-ink: #14281e;
  --bar-line: #c9d3c6;
  --btn: #14281e;
  --btn-ink: #f1f4ef;
  --turf-a: #2a6b4a;
  --turf-b: #256243;
  --chalk: #f6f8f3;
  --card: #fbfcf9;
  --card-ink: #14281e;
  --card-line: #b9c6b5;
  --muted: #5d6f63;
  --gold: #f2c230;
  --win: #e3f1d8;
  display: flex;
  flex-direction: column;
  background: var(--bar);
  color: var(--bar-ink);
  font: 500 14px/1.3 'Barlow', system-ui, sans-serif;
  border-radius: 12px;
  border: 1px solid var(--bar-line);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  position: relative;
}

[data-theme="dark"] .board-container,
.dark .board-container {
  --bar: #10201a;
  --bar-ink: #e6efe6;
  --bar-line: #27402f;
  --btn: #e6efe6;
  --btn-ink: #10201a;
  --turf-a: #1b4a34;
  --turf-b: #174230;
  --card: #e9f0e6;
  --card-line: #8fa38f;
  --muted: #8aa093;
  --win: #cfe6bf;
}

.board-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bar);
  border-bottom: 1px solid var(--bar-line);
  position: relative;
  z-index: 10;
}

.board-title-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 17px/1 'Barlow Condensed', Impact, sans-serif;
  letter-spacing: 0.03em;
  color: var(--bar-ink);
  text-transform: uppercase;
  margin-right: 6px;
}

.board-header label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--bar-ink);
}

.board-header select,
.board-header input[type="number"] {
  padding: 6px 9px;
  border: 1px solid var(--bar-line);
  border-radius: 6px;
  background: var(--bar);
  color: var(--bar-ink);
  font: inherit;
  outline: none;
}

.board-header select:focus-visible,
.board-header input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.board-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--btn);
  border-radius: 6px;
  background: transparent;
  color: var(--bar-ink);
  cursor: pointer;
  font: 600 13px/1 'Barlow', system-ui, sans-serif;
  transition: all 0.15s ease;
}

.board-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.08);
}

.board-btn.primary {
  background: var(--btn);
  color: var(--btn-ink);
  border-color: var(--btn);
}

.board-btn.primary:hover:not(:disabled) {
  opacity: 0.9;
}

.board-btn.gold {
  background: #f2c230;
  color: #14281e;
  border-color: #d8aa20;
  font-weight: 700;
}

.board-btn.gold:hover:not(:disabled) {
  background: #ffd64d;
}

.board-btn:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.board-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.06);
  padding: 3px 5px;
  border-radius: 8px;
  border: 1px solid var(--bar-line, rgba(0, 0, 0, 0.12));
}

.board-zoom-group .board-btn {
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  border: 1px solid transparent;
}

.board-zoom-group .board-zoom-level {
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  justify-content: center;
  cursor: pointer;
  background: var(--bar, #fff);
  border-color: var(--bar-line, rgba(0, 0, 0, 0.15));
}

.board-toggle-label {
  cursor: pointer;
  user-select: none;
}

.board-hint {
  flex-basis: 100%;
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.board-stage {
  flex: 1;
  overflow: auto;
  position: relative;
  min-height: 640px;
  max-height: 820px;
  background: var(--stage, repeating-linear-gradient(90deg, var(--turf-a) 0 80px, var(--turf-b) 80px 160px));
  cursor: default;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
  touch-action: pan-x pan-y;
}

.board-stage.is-panning {
  cursor: grabbing !important;
  user-select: none;
}

.board-stage.space-pan,
.board-stage.space-pan * {
  cursor: grab !important;
}

.board-world-wrapper {
  position: relative;
  transform-origin: 0 0;
  width: 2800px;
  height: 1800px;
  pointer-events: none;
}

.board-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  width: 2800px;
  height: 1800px;
  pointer-events: auto;
}

.board-hud {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(14, 22, 17, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  border-radius: 30px;
  padding: 4px 6px;
  color: #fff;
  user-select: none;
}

.board-hud-btn {
  background: transparent;
  border: none;
  color: #f0f3f1;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  font: 600 12.5px/1 'Barlow', system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.board-hud-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.board-hud-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.board-hud-val {
  min-width: 48px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  cursor: pointer;
}

/* Studio ONLY (these two ids exist only in the admin maker; the public
   board uses the same classes without ids and is untouched): hide the
   tie-sheet brand header and the column headers inside the editor.
   They belong to the public board document, where they stay and remain
   editable via the cup's board fields. In the maker they are clutter,
   and they clip at the edges when panned/zoomed. The elements stay in
   the DOM, so the banner-updating code keeps working. */
#board-brand-header, #board-col-headers { display: none !important; }
.board-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* BELOW the cards (.box is z-index 2): connector lines must run under a
     card and stop at its edge, never paint over a card's face. The SVG's
     own hit paths still work in the gaps between cards. */
  z-index: 1;
}

.board-stage .lk {
  fill: none;
  stroke: var(--chalk);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.board-stage .lk.sel {
  stroke: var(--gold);
  stroke-width: 3.5;
  opacity: 1;
}

.board-stage .hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  pointer-events: stroke;
  cursor: pointer;
}

.board-stage .hd {
  fill: var(--chalk);
  stroke: var(--turf-b);
  stroke-width: 2;
  pointer-events: all;
  cursor: move;
  touch-action: none;
}

.board-stage .hd.sel {
  fill: var(--gold);
}

.board-stage .hd.tp {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.5);
}

.board-stage .box {
  position: absolute;
  width: 330px;
  height: 104px;
  box-sizing: border-box;
  background: var(--box-bg, var(--card));
  color: var(--card-ink);
  border: var(--bw, 1.5px) solid var(--bc, var(--card-line));
  border-radius: var(--r, 8px);
  box-shadow: var(--box-shadow, 0 3px 0 rgba(0, 0, 0, 0.25));
  font-family: var(--bf, 'Barlow', system-ui, sans-serif);
  font-size: var(--bs, 14px);
  text-shadow: var(--tsh, none);
  -webkit-backdrop-filter: var(--blur, none);
  backdrop-filter: var(--blur, none);
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.board-stage .box.drag {
  cursor: grabbing;
  box-shadow: var(--box-shadow-drag, 0 8px 0 rgba(0, 0, 0, 0.28));
  z-index: 4;
}

/* Standout Final Match Card (Gold Championship Style) */
.board-stage .box.final-card {
  background: linear-gradient(135deg, #f5a623 0%, #f7c948 50%, #f5a623 100%) !important;
  border: 2px solid #d49818 !important;
  color: #141a15 !important;
  box-shadow: 0 10px 28px rgba(245, 166, 35, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.board-stage .box.final-card .bh {
  background: rgba(0, 0, 0, 0.16) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #141a15 !important;
}

.board-stage .box.final-card .bh input,
.board-stage .box.final-card .bh .lb,
.board-stage .box.final-card .bh .dt,
.board-stage .box.final-card .bh .tm {
  color: #141a15 !important;
  font-weight: 800 !important;
}

.board-stage .box.final-card .row {
  background: rgba(255, 255, 255, 0.45) !important;
  color: #141a15 !important;
  font-weight: 700 !important;
}

.board-stage .box.final-card .row input {
  color: #141a15 !important;
  font-weight: 700 !important;
}

/* Tie Sheet Banner, Column Guide Headers & Venue Footer */
.board-brand-header {
  position: absolute;
  top: 18px;
  left: 60px;
  width: 2850px;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.board-club-title {
  font-family: var(--display, 'Barlow Condensed', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.board-tournament-title {
  font-family: var(--display, 'Barlow Condensed', Impact, sans-serif);
  font-size: 54px;
  font-weight: 900;
  color: #f2c230;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
  margin-bottom: 6px;
}

.board-tournament-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #f6f8f3;
}

.board-tie-sheet-badge {
  background: #f2c230;
  color: #14281e;
  font-family: var(--display, 'Barlow Condensed', sans-serif);
  font-size: 13px;
  font-weight: 900;
  padding: 3px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.board-col-headers {
  position: absolute;
  top: 148px;
  left: 0;
  width: 3000px;
  pointer-events: none;
  z-index: 1;
}

.board-col-header-item {
  position: absolute;
  width: 330px;
  text-align: center;
  font-family: var(--display, 'Barlow Condensed', Impact, sans-serif);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f2c230;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.board-stage .bh {
  flex: none;
  box-sizing: border-box;
  height: 30px;
  font-family: var(--hf, 'Barlow Condensed', sans-serif);
  font-size: var(--hs, 14px);
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--card-line);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 6px;
}

.board-stage .bh input {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  min-width: 0;
  padding: 3px 4px;
  border-radius: 4px;
  color-scheme: var(--cs, light);
  outline: none;
}

/* Round field in the Studio header: editable text with datalist
   suggestions, same footprint as the old label input, so the classic
   board document is unchanged in size and theme. */
.board-stage .bh input.lb {
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  min-width: 0;
  padding: 3px 2px;
  border-radius: 4px;
  color-scheme: var(--cs, light);
  outline: none;
  cursor: text;
}

.board-stage .bh .lb {
  flex: 1;
  text-overflow: ellipsis;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.board-stage .bh .lb:hover {
  background: rgba(0, 0, 0, 0.05);
}

.board-stage .bh .dt,
.board-stage .bh .tm {
  flex: none;
  font: 500 11px/1 var(--bf, 'Barlow', system-ui, sans-serif);
  letter-spacing: 0;
  background: rgba(0, 0, 0, 0.06);
  height: 22px;
  box-sizing: border-box;
  padding: 2px 4px;
  border-radius: 3px;
}

.board-stage .bh .dt {
  width: 96px;
}

.board-stage .bh .tm {
  width: 78px;
}

.board-stage .bh button {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  touch-action: manipulation;
}

.board-stage .bh button:hover {
  color: #d9383a;
}

.board-stage .row {
  flex: 1;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px 0 4px;
}

.board-stage .row+.row {
  border-top: 1px solid var(--card-line);
  border-radius: 0 0 var(--rr, 6.5px) var(--rr, 6.5px);
}

.board-stage .row.win {
  background: var(--win);
}

/* Winner row: gold bold name so the advancing team reads at a glance. */
.board-stage .row.win .t {
  font-weight: 800;
  color: var(--gold);
}

/* Loser row (completed match only): grayed out, so the winner stands out. */
.board-stage .row.loser .t,
.board-stage .row.loser .s {
  opacity: 0.55;
  color: var(--muted, #8a8a8a);
}

.board-stage .row input {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 4px;
  outline: none;
}

.board-stage .row .t {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-stage .row .s {
  flex: none;
  width: 36px;
  box-sizing: border-box;
  align-self: stretch;
  text-align: right;
  font-weight: 800;
  border-left: 1px solid var(--card-line);
  padding: 0 2px 0 8px;
  background: transparent;
  border-radius: 0;
}

/* Public score cell (a span): flex-centre the number in the full-height cell. */
.board-stage .row span.s {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.board-stage .box ::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.board-stage .port {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--turf-b);
  box-sizing: border-box;
  z-index: 3;
  cursor: crosshair;
}

.board-stage .port.tp {
  background: #fff;
  transform: scale(1.5);
}

.board-stage .port.in {
  left: calc(-7px - var(--bw, 1.5px));
}

.board-stage .port.out {
  right: calc(-7px - var(--bw, 1.5px));
}

.board-stage .box.flip .port.in {
  left: auto;
  right: calc(-7px - var(--bw, 1.5px));
}

.board-stage .box.flip .port.out {
  right: auto;
  left: calc(-7px - var(--bw, 1.5px));
}

.board-stage .port::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.board-stage .box.target {
  outline: 3px solid var(--gold);
}

/* ==========================================================================
   STYLE THEMES (from Knockout_Bracket_Board.html)
   ========================================================================== */

/* 1. Parallelogram: the whole card is slanted */
.board-container[data-board-style="slant"] {
  --stage: repeating-linear-gradient(115deg, #0b1626 0 70px, #0e1d32 70px 140px);
  --box-bg: linear-gradient(100deg, #fff, #e3ebf6);
  --card-ink: #0b1626;
  --card-line: #a9bbd3;
  --bc: #1f3a63;
  --bw: 2px;
  --muted: #4b6285;
  --win: #ffd9cc;
  --gold: #ff5a36;
  --chalk: #dbe7ff;
  --turf-b: #0b1626;
  --bf: 'Oswald', sans-serif;
  --hf: 'Oswald', sans-serif;
  --bs: 15px;
  --hs: 13px;
  --r: 2px;
  --rr: 0px;
  --box-shadow: 7px 7px 0 rgba(255, 90, 54, 0.9);
  --box-shadow-drag: 11px 11px 0 rgba(255, 90, 54, 0.9);
}

.board-container[data-board-style="slant"] .box {
  transform: skewX(-12deg);
}

.board-container[data-board-style="slant"] .port {
  transform: skewX(12deg);
}

.board-container[data-board-style="slant"] .port.tp {
  transform: skewX(12deg) scale(1.5);
}

/* 2. Liquid glass: frosted translucent cards over an aurora */
.board-container[data-board-style="glass"] {
  --stage: radial-gradient(circle at 12% 18%, #ff6ec4 0, transparent 34%),
    radial-gradient(circle at 82% 12%, #7873f5 0, transparent 40%),
    radial-gradient(circle at 64% 88%, #2de2e6 0, transparent 38%),
    radial-gradient(circle at 18% 82%, #ffb36b 0, transparent 34%),
    #1b1038;
  --box-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.07));
  --card-ink: #fff;
  --card-line: rgba(255, 255, 255, 0.28);
  --bc: rgba(255, 255, 255, 0.55);
  --bw: 1px;
  --muted: rgba(255, 255, 255, 0.78);
  --win: rgba(255, 255, 255, 0.2);
  --gold: #ffe66d;
  --chalk: #fff;
  --turf-b: rgba(70, 50, 150, 0.9);
  --bf: 'Outfit', sans-serif;
  --hf: 'Outfit', sans-serif;
  --bs: 15px;
  --hs: 14px;
  --r: 20px;
  --rr: 19px;
  --cs: dark;
  --blur: blur(16px) saturate(170%);
  --box-shadow: 0 10px 30px rgba(20, 0, 60, 0.35), inset 0 1.5px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(255, 255, 255, 0.15);
  --box-shadow-drag: 0 20px 44px rgba(20, 0, 60, 0.45), inset 0 1.5px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.board-container[data-board-style="glass"] .box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 70% at 8% 0, rgba(255, 255, 255, 0.38), transparent 55%);
  pointer-events: none;
}

/* 3. Neon: glowing outlines on a dark grid */
.board-container[data-board-style="neon"] {
  --stage: linear-gradient(rgba(0, 229, 255, 0.07) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, rgba(0, 229, 255, 0.07) 1px, transparent 1px) 0 0/40px 40px,
    radial-gradient(circle at 50% 0, #14173a, #05060f 72%);
  --card: #0b1024;
  --card-ink: #e8fbff;
  --card-line: rgba(0, 229, 255, 0.35);
  --bc: #00e5ff;
  --bw: 1.5px;
  --muted: #74d9ee;
  --win: rgba(255, 43, 214, 0.24);
  --gold: #ff2bd6;
  --chalk: #00e5ff;
  --turf-b: #05060f;
  --bf: 'Rajdhani', sans-serif;
  --hf: 'Orbitron', sans-serif;
  --bs: 16px;
  --hs: 11px;
  --r: 3px;
  --rr: 2px;
  --cs: dark;
  --box-shadow: 0 0 14px rgba(0, 229, 255, 0.55), inset 0 0 14px rgba(0, 229, 255, 0.12);
  --box-shadow-drag: 0 0 28px rgba(0, 229, 255, 0.85), inset 0 0 14px rgba(0, 229, 255, 0.12);
}

/* 4. Paper: hand-drawn notebook card */
.board-container[data-board-style="paper"] {
  --stage: radial-gradient(#d9ccab 1.2px, transparent 1.3px) 0 0/24px 24px, #f4ecd8;
  --card: #fffdf5;
  --card-ink: #2a2a2a;
  --card-line: #b9ad8f;
  --bc: #2a2a2a;
  --bw: 2px;
  --muted: #8a7a58;
  --win: #fff0a0;
  --gold: #e4572e;
  --chalk: #2a2a2a;
  --turf-b: #2a2a2a;
  --bf: 'Patrick Hand', cursive;
  --hf: 'Patrick Hand', cursive;
  --bs: 17px;
  --hs: 16px;
  --r: 255px 14px 225px 14px/14px 225px 14px 255px;
  --rr: 8px;
  --box-shadow: 4px 4px 0 #2a2a2a;
  --box-shadow-drag: 8px 8px 0 #2a2a2a;
}

/* 5. Blueprint: white mono lines on blue graph paper */
.board-container[data-board-style="blueprint"] {
  --stage: linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px) 0 0/32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px) 0 0/32px 32px,
    #0f3d8f;
  --box-bg: rgba(8, 40, 110, 0.78);
  --card-ink: #fff;
  --card-line: rgba(255, 255, 255, 0.45);
  --bc: #fff;
  --bw: 1.5px;
  --muted: #b7d0ff;
  --win: rgba(255, 255, 255, 0.2);
  --gold: #ffd23f;
  --chalk: #fff;
  --turf-b: #0f3d8f;
  --bf: 'IBM Plex Mono', monospace;
  --hf: 'IBM Plex Mono', monospace;
  --bs: 13px;
  --hs: 12px;
  --r: 2px;
  --rr: 1px;
  --cs: dark;
  --box-shadow: none;
  --box-shadow-drag: 0 10px 24px rgba(0, 0, 0, 0.4);
}

/* 6. Champions: navy and gold */
.board-container[data-board-style="gold"] {
  --stage: radial-gradient(circle at 50% 0, #1d2750, #070a14 75%);
  --box-bg: linear-gradient(160deg, #1d2850, #0d1430);
  --card-ink: #f6ebc8;
  --card-line: rgba(201, 162, 75, 0.45);
  --bc: #c9a24b;
  --bw: 1.5px;
  --muted: #c9a24b;
  --win: rgba(230, 196, 92, 0.22);
  --gold: #e6c45c;
  --chalk: #f6ebc8;
  --turf-b: #0d1430;
  --bf: 'Playfair Display', serif;
  --hf: 'Playfair Display', serif;
  --bs: 14px;
  --hs: 12px;
  --r: 6px;
  --rr: 4.5px;
  --cs: dark;
  --box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.18), 0 8px 22px rgba(0, 0, 0, 0.55);
  --box-shadow-drag: 0 0 0 3px rgba(201, 162, 75, 0.3), 0 16px 34px rgba(0, 0, 0, 0.6);
}

/* 7. Scoreboard: amber LED glow on black */
.board-container[data-board-style="led"] {
  --stage: radial-gradient(#1c1c1c 1px, transparent 1.6px) 0 0/8px 8px, #080808;
  --box-bg: #050505;
  --card-ink: #ffb000;
  --card-line: #4a3300;
  --bc: #3a3a3a;
  --bw: 2px;
  --muted: #b57a00;
  --win: rgba(255, 176, 0, 0.2);
  --gold: #ff3b30;
  --chalk: #ffb000;
  --turf-b: #050505;
  --bf: 'Share Tech Mono', monospace;
  --hf: 'Share Tech Mono', monospace;
  --bs: 15px;
  --hs: 13px;
  --r: 4px;
  --rr: 2px;
  --cs: dark;
  --tsh: 0 0 6px rgba(255, 176, 0, 0.55);
  --box-shadow: 0 0 0 1px #000, 0 6px 14px rgba(0, 0, 0, 0.7), inset 0 0 18px rgba(255, 176, 0, 0.08);
  --box-shadow-drag: 0 0 0 1px #000, 0 14px 26px rgba(0, 0, 0, 0.8), inset 0 0 18px rgba(255, 176, 0, 0.08);
}

/* 8. Candy pop: chunky bouncy pastel */
.board-container[data-board-style="candy"] {
  --stage: linear-gradient(135deg, #ffd6e8, #d6e4ff 50%, #d9ffe9);
  --card: #fff;
  --card-ink: #3b2a8c;
  --card-line: #d4ccff;
  --bc: #3b2a8c;
  --bw: 3px;
  --muted: #7a6bd0;
  --win: #ffe0ee;
  --gold: #ff6b9d;
  --chalk: #3b2a8c;
  --turf-b: #fff;
  --bf: 'Fredoka', sans-serif;
  --hf: 'Fredoka', sans-serif;
  --bs: 15px;
  --hs: 14px;
  --r: 22px;
  --rr: 18px;
  --box-shadow: 0 6px 0 #3b2a8c;
  --box-shadow-drag: 0 11px 0 #3b2a8c;
}

/* 9. Night: dark stadium under floodlights */
.board-container[data-board-style="night"] {
  --stage: radial-gradient(ellipse at 50% 0, rgba(255, 240, 180, 0.22), transparent 55%),
    radial-gradient(ellipse at 15% 100%, rgba(56, 130, 246, 0.18), transparent 50%),
    linear-gradient(#0a1628, #050a14);
  --card: #101f38;
  --card-ink: #e8f1ff;
  --card-line: #2e4a7a;
  --bc: #3b5f9e;
  --bw: 1.5px;
  --muted: #8fb0e0;
  --win: rgba(255, 240, 180, 0.16);
  --gold: #ffd97a;
  --chalk: #cfe4ff;
  --turf-b: #050a14;
  --bs: 14px;
  --hs: 12px;
  --r: 10px;
  --rr: 8px;
  --box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --box-shadow-drag: 0 14px 30px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* 10. Royal: deep navy and gold */
.board-container[data-board-style="royal"] {
  --stage: radial-gradient(circle at 50% 0, #16266b, #050a1f 75%);
  --card: linear-gradient(160deg, #14265e, #0a1438);
  --card-ink: #f6ecd0;
  --card-line: rgba(212, 175, 55, 0.5);
  --bc: #d4af37;
  --bw: 1.5px;
  --muted: #c9b98a;
  --win: rgba(212, 175, 55, 0.2);
  --gold: #e6c65c;
  --chalk: #e8d9a0;
  --turf-b: #050a1f;
  --bs: 14px;
  --hs: 12px;
  --r: 6px;
  --rr: 4px;
  --box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15), 0 8px 22px rgba(0, 0, 0, 0.55);
  --box-shadow-drag: 0 0 0 2px rgba(212, 175, 55, 0.3), 0 16px 30px rgba(0, 0, 0, 0.6);
}

/* 11. Forest: smooth dark-green gradient, no stripes */
.board-container[data-board-style="forest"] {
  --stage: linear-gradient(160deg, #14532d, #052e16);
  --card: #0d3b22;
  --card-ink: #f0fdf4;
  --card-line: #2f7a4e;
  --bc: #3f9e63;
  --bw: 1.5px;
  --muted: #9fd8b4;
  --win: rgba(74, 222, 128, 0.18);
  --gold: #facc15;
  --chalk: #bbf7d0;
  --turf-b: #052e16;
  --bs: 14px;
  --hs: 12px;
  --r: 12px;
  --rr: 10px;
  --box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  --box-shadow-drag: 0 12px 26px rgba(0, 0, 0, 0.55);
}

/* 12. Sunset: warm dusk gradient (dark at the top so the header stays readable) */
.board-container[data-board-style="sunset"] {
  --stage: linear-gradient(180deg, #3b0764 0, #7c2d12 45%, #c2410c 75%, #ea580c 100%);
  --card: #fffbeb;
  --card-ink: #431407;
  --card-line: #f59e0b;
  --bc: #b45309;
  --bw: 2px;
  --muted: #9a3412;
  --win: #fef08a;
  --gold: #b45309;
  --chalk: #fde68a;
  --turf-b: #7c2d12;
  --bs: 14px;
  --hs: 12px;
  --r: 14px;
  --rr: 11px;
  --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  --box-shadow-drag: 0 14px 28px rgba(0, 0, 0, 0.5);
}

/* 13. Mono: black and white minimal (light stage, so the header and
   column headers get dark overrides — the defaults are white/gold
   and would vanish on the light background) */
.board-container[data-board-style="mono"] {
  --stage: #f5f5f5;
  --card: #fff;
  --card-ink: #111;
  --card-line: #111;
  --bc: #111;
  --bw: 2px;
  --muted: #666;
  --win: #e5e5e5;
  --gold: #111;
  --chalk: #111;
  --turf-b: #111;
  --bs: 14px;
  --hs: 12px;
  --r: 4px;
  --rr: 2px;
  --box-shadow: 3px 3px 0 #111;
  --box-shadow-drag: 6px 6px 0 #111;
}
.board-container[data-board-style="mono"] .board-club-title,
.board-container[data-board-style="mono"] .board-tournament-meta {
  color: #111;
}
.board-container[data-board-style="mono"] .board-tournament-title {
  color: #111;
  text-shadow: none;
}
.board-container[data-board-style="mono"] .board-col-header-item {
  color: #111;
  text-shadow: none;
}
.board-container[data-board-style="mono"] .board-stage .box.final-card {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  box-shadow: 3px 3px 0 #111 !important;
}
.board-container[data-board-style="mono"] .board-stage .box.final-card .bh,
.board-container[data-board-style="mono"] .board-stage .box.final-card .row {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}
.board-container[data-board-style="mono"] .board-stage .box.final-card .bh input,
.board-container[data-board-style="mono"] .board-stage .box.final-card .bh .lb,
.board-container[data-board-style="mono"] .board-stage .box.final-card .bh .dt,
.board-container[data-board-style="mono"] .board-stage .box.final-card .bh .tm,
.board-container[data-board-style="mono"] .board-stage .box.final-card .row input {
  color: #fff !important;
}
.board-container[data-board-style="mono"] .board-stage .box.final-card .bh i {
  color: #fff !important;
}
.board-container[data-board-style="mono"] .board-stage .box.final-card .board-pens {
  color: #fff;
}

/* 14. Classic pitch (Tie Sheet pitch style) */
.board-container[data-board-style="classic"] {
  --stage: repeating-linear-gradient(90deg, #133a27 0 90px, #0e2f1f 90px 180px);
  --card: #f7f3e8;
  --card-ink: #14281e;
  --card-line: #cdd6c5;
  --turf-a: #133a27;
  --turf-b: #0e2f1f;
  --chalk: #f6f8f3;
  --gold: #f2c230;
  --win: #e0eed5;
  --r: 12px;
  --rr: 10px;
}

.board-container[data-board-style="classic"] .board-stage .bh {
  background: #1f4530;
  color: #f6f8f3;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px 10px 0 0;
}

.board-container[data-board-style="classic"] .board-stage .bh input {
  color: #f6f8f3;
}

.board-container[data-board-style="classic"] .board-stage .bh .lb {
  color: #f6f8f3;
  font-weight: 700;
}

.board-container[data-board-style="classic"] .board-stage .bh .dt,
.board-container[data-board-style="classic"] .board-stage .bh .tm {
  background: rgba(0, 0, 0, 0.16);
  color: #f6f8f3;
}

/* =====================================================================
 * TESTER CONSOLIDATION (2026-11-03) — one pitch-green/gold design.
 * Why this section exists: redesign.css shipped with a stray token block
 * outside any selector (now fixed) and club-design.css shipped navy/emerald
 * tokens, so the site looked navy/emerald, not pitch-green/gold. The rules
 * below are the final layer and win over the earlier layers.
 * - Manual dark mode: club-design.css dark tokens previously only applied
 *   via prefers-color-scheme, so toggling dark on a light OS gave a mixed
 *   light/dark page. html[data-theme="dark"] below makes manual dark match
 *   OS dark exactly.
 * - [hidden] must actually hide: .error-message and other classes set
 *   display, which overrode the hidden attribute and showed the admin
 *   login error before any login attempt.
 * - Desktop nav labels: style.css hid nav link text (icons only), which is
 *   unreadable when icon fonts fail. Labels are shown on desktop too.
 * ===================================================================== */
html[data-theme="dark"] {
  --bg: #0F1F17;
  --surface: #16281E;
  --surface-solid: #16281E;
  --surface-2: #1B2F22;
  --surface-3: #20352A;
  --surface-card: rgba(22, 40, 30, 0.92);
  --border: rgba(255, 255, 255, 0.12);
  --border-2: rgba(255, 255, 255, 0.2);
  --text: #F6F8F5;
  --text-2: #DCEBE2;
  --text-3: #9FB0A6;
  --brand: #12402A;
  --brand-2: #1B5E3B;
  --nav-bg: #0A1911;
  --footer-bg: #0A1911;
  --footer-text: #9FB0A6;
  --hero-a: #12402A;
  --hero-b: #0A1911;
  --hero-ink: #F6F8F5;
  --hero-muted: #C8D9CF;
  --hero-border: rgba(255, 255, 255, 0.12);
  --hero-dot-pattern: rgba(255, 255, 255, 0.06);
  --hero-title-color: #FFFFFF;
  --hero-title-gradient: linear-gradient(135deg, #FFFFFF 0%, #DCEBE2 45%, #E3B03B 100%);
  --hero-badge-text: #E3B03B;
  --hero-btn-ghost-text: #F6F8F5;
  --hero-card-bg: rgba(18, 64, 42, 0.85);
  --hero-card-border: rgba(255, 255, 255, 0.14);
  --hero-inner-bg: rgba(10, 25, 17, 0.9);
  --hero-inner-border: rgba(255, 255, 255, 0.1);
  --hero-team-name: #FFFFFF;
  --hero-score-color: #FFFFFF;
  --hero-cupstrip-text: #F6F8F5;
  --ticker-bg: rgba(10, 25, 17, 0.95);
  --ticker-text: #DCEBE2;
  --ticker-link: #F6F8F5;
  --modal-scrim: rgba(0, 0, 0, 0.82);
  --input-bg: #20352A;
}
html[data-theme="dark"] body {
  background: var(--bg) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .navbar {
  background: var(--nav-bg) !important;
}
[hidden] {
  display: none !important;
}
.nav-links a span {
  display: inline !important;
}
.club-title-white {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .club-title-white {
    font-size: 1.15rem !important;
  }
  .nav-container {
    gap: 6px;
  }
}
/* Hero: no black text-shadow halo on light backgrounds; keep it only in dark. */
.tp-hero-sub {
  text-shadow: none !important;
}
html[data-theme="dark"] .tp-hero-sub {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5) !important;
}
.tp-hero-title {
  background: linear-gradient(135deg, #12402A 0%, #1B5E3B 55%, #E3B03B 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
html[data-theme="dark"] .tp-hero-title {
  background: linear-gradient(135deg, #FFFFFF 0%, #DCEBE2 45%, #E3B03B 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
/* Pitch navbar needs pale text: link/title colours in style.css are dark. */
.navbar .club-title-white,
.navbar .brand-title-link {
  color: #FFFFFF !important;
}
.navbar .nav-links a {
  color: #DCEBE2 !important;
}
.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.14) !important;
}
.navbar .nav-links a i {
  color: #E3B03B !important;
}
/* Homepage primary CTA is gold (approved redesign), not emerald. */
.tp-btn-accent {
  background: #E3B03B !important;
  color: #12241A !important;
  border-color: transparent !important;
}
/* Donate QR-coming-soon box (replaces the fake Wikipedia QR). */
.qr-coming-soon {
  border: 2px dashed var(--border-2, #DCE3DD);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  color: var(--text-2, #334155);
}
.qr-coming-soon strong {
  display: block;
  color: var(--text, #0F1F17);
  font-size: 18px;
  margin-bottom: 6px;
}
/* Admin primary buttons: white text on pitch, not dark text on pitch. */
.form-submit,
.form-submit.accent,
button.form-submit {
  background: #1B5E3B !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
}
/* Navbar layout: style.css centres .nav-center absolutely, which overlaps
   the nav links once labels are shown. Make it a normal flex item. */
.nav-center {
  position: static !important;
  transform: none !important;
  flex: 0 0 auto;
}
.navbar .brand-title-link:hover .club-title-white {
  color: #FFFFFF !important;
}
/* Gold CTA text must stay dark ink in BOTH modes (white on gold fails contrast). */
html[data-theme="dark"] a.tp-btn-accent,
a.tp-btn-accent {
  color: #12241A !important;
}

/* --- Phone squad grid + hero revamp (2026-11-03) --- */
.hero-eyebrow{display:inline-flex;align-items:center;gap:10px;background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:6px 14px 6px 6px;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#fff;margin-bottom:16px}
.hero-eyebrow img{width:26px;height:26px;border-radius:50%;object-fit:cover;background:#fff}
.hero-stats{display:flex;flex-wrap:wrap;gap:10px;margin-top:26px}
.hero-stat{background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.22);border-radius:12px;padding:10px 14px;color:#fff}
.hero-stat strong{display:block;font-family:var(--display);font-size:22px;line-height:1}
.hero-stat span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.85}
.player-detail-grid{display:grid;grid-template-columns:180px 1fr;gap:18px;align-items:center}
.player-detail-grid img{width:180px;height:220px;object-fit:cover;border-radius:16px}
.player-detail-grid h2{font-size:clamp(24px,7vw,32px);line-height:1.05;margin:0;overflow-wrap:anywhere}
.player-detail-grid p{margin:4px 0 0}
.player-detail-rows{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;margin-top:14px}
.player-detail-rows div span{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.7}
.player-detail-notes{margin-top:14px;line-height:1.6}
@media (max-width:640px){
  .tp-squad-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .squad-card{min-width:0}
  .squad-card-head{height:118px!important}
  .squad-icon{font-size:34px!important}
  .squad-num{font-size:42px!important;top:4px!important;right:8px!important}
  .squad-body{padding:12px 10px!important}
  .squad-name{font-size:15px!important;line-height:1.15}
  .squad-pos{font-size:10px!important;letter-spacing:.04em!important}
  .squad-foot{font-size:11px!important;flex-wrap:wrap;gap:4px 8px}
  .tp-filter{display:flex;flex-wrap:wrap;gap:8px}
  .tp-filter-btn{padding:8px 12px;font-size:13px}
  .tp-hero{padding:48px 0 56px!important}
  .tp-hero-title{font-size:42px!important}
  .tp-hero-sub{font-size:16px!important}
  .hero-match-deck{display:grid;gap:14px}
  .hero-stats{gap:8px;margin-top:20px}
  .hero-stat{padding:8px 12px}
  .hero-stat strong{font-size:19px}
  .player-detail-grid{grid-template-columns:150px 1fr;gap:14px;align-items:center}
  .player-detail-grid img{width:150px;height:190px}
  .player-detail-rows{grid-template-columns:1fr 1fr}
  .modal-content{max-width:calc(100vw - 24px)!important}
}

/* Bracket board: title above the board + full-width board on phones (2026-11-03). */
.board-above-title{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px;margin:28px 0 12px}
.board-above-title h4{font-family:var(--display);font-size:22px;font-weight:800;text-transform:uppercase;margin:0;color:var(--text)}
.board-above-title span{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--accent)}
@media (max-width:640px){
  #events .event-bracket-block{margin-left:-20px;margin-right:-20px;border-radius:0;padding:20px 8px}
  #events .event-bracket-block .board-container{border-radius:12px}
  #events .event-bracket-block .board-stage{min-height:520px}
  .board-above-title{margin:22px 8px 10px}
  .board-above-title h4{font-size:19px}
}

/* Hero cleanup + shorter bracket view + smaller hero match card on phones (2026-11-03). */
@media (max-width:640px){
  #events .event-bracket-block .board-stage{min-height:340px;max-height:420px}
  .hero-match-deck .tp-featured{padding:12px 14px !important}
  .hero-match-deck .tp-matchup{padding:10px 12px}
  .hero-match-deck .tp-team img{width:36px;height:36px}
  .hero-match-deck .tp-team span{font-size:14px}
  .hero-match-deck .tp-featured-foot{font-size:12px}
}

/* White nav bar + dimmer hero field background + collapsible events (2026-11-03). */
.navbar, html[data-theme="dark"] .navbar{background:#ffffff !important;border-bottom:1px solid #e2e8f0 !important}
.navbar .club-title-white, .navbar .brand-title-link, .navbar .brand-title-link:hover .club-title-white{color:#14281e !important}
.navbar .nav-links a{color:#14281e !important}
.navbar .nav-links a:hover, .navbar .nav-links a.active{color:var(--accent) !important;background:rgba(27,94,59,.08) !important}
.navbar .theme-toggle-btn, .navbar .menu-toggle{color:#14281e !important;background:#f1f4ef !important;border-color:#dbe3dd !important}
.hero-slider{opacity:.8}
.hero-slider .slide.active{animation:none}
.event-expand-btn{display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:#fff;border:0;border-radius:999px;padding:9px 18px;font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;margin:0 0 8px}
.event-expand-btn[aria-expanded="true"] i{transform:rotate(180deg)}
.event-bracket-block.event-collapsed > :not(h3):not(p):not(.event-expand-btn){display:none !important}

/* Shorter hero on phones (2026-11-03). */
@media (max-width:640px){
  .tp-hero{padding:28px 0 32px !important}
  .tp-hero-grid{gap:20px !important}
  .tp-hero-title{font-size:34px !important;margin-bottom:10px}
  .tp-hero-sub{font-size:15px !important;margin-bottom:16px}
  .tp-hero-cta{gap:10px}
  .tp-hero-cta .tp-btn{padding:11px 18px;font-size:14px}
  .hero-match-deck{gap:10px !important}
}

.board-stage .box .board-display-row input.dn { border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; letter-spacing: 0.04em; min-width: 0; flex: 1; padding: 2px 4px; border-radius: 4px; outline: none; }

/* Typed admin toasts (admin showToast only; the homepage toast is untouched).
   Specificity (.toast.toast-X) beats the base .toast border shorthand, so
   the type colour always wins. Container z-index 2000 already sits above
   modals (1000/1001), the board stage (25) and the mobile-menu navbar
   (1003) — verified against the stylesheets, not assumed. */
.toast { position: relative; }
.toast.toast-error { border-color: #ef4444; }
.toast.toast-error strong { color: #ef4444; }
.toast.toast-success { border-color: #22c55e; }
.toast.toast-success strong { color: #22c55e; }
.toast.toast-info { border-color: #9ca3af; }
.toast.toast-info strong { color: var(--text); }
.toast-close { position: absolute; top: 6px; right: 10px; background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; padding: 2px 4px; }
.toast-close:focus-visible { outline: 2px solid #5e9ed6; outline-offset: 2px; }

/* Studio drag alignment guides (Job 6): visual only, dashed gold, drawn
   in board-world coordinates so zoom scales them, pointer-events none so
   they never intercept a drag. They are computed from b.x/b.y but never
   write to them — free movement is preserved. */
/* PNG capture (Studio Save): show the tie-sheet header + column headers
   in the snapshot (they are hidden in the editor by the
   #board-brand-header/#board-col-headers display:none !important rule —
   this higher-specificity rule re-shows them for the snapshot only),
   hide editing chrome (ports, junction dots, drag guides, temp link,
   selection outlines) and the venue footer. Cards, connector lines
   (.lk) and the pitch background stay visible. The pitch background
   itself is copied onto #board-world in JS during capture. */
#board-world.board-capturing #board-brand-header,
#board-world.board-capturing #board-col-headers { display: block !important; }
#board-world.board-capturing .port,
#board-world.board-capturing .hd,
#board-world.board-capturing #board-drag-guides,
#board-world.board-capturing .board-svg path[stroke-dasharray] { display: none !important; }
#board-world.board-capturing .lk.sel { stroke: var(--chalk); stroke-width: 2.5; opacity: 0.9; }
#board-world.board-capturing .box.target { outline: none !important; }
#board-drag-guides { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.board-guide-v { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed #f2c230; }
.board-guide-h { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #f2c230; }

/* ---- Unified match card (2026-11-03): the card is ONE surface. ----
   The round/date/time/score fields inside a card must not read as
   little boxes: no pill backgrounds, no inner borders. Only hairline
   dividers (header / between teams) and the card's own outer border
   remain. Studio inputs stay editable: focusing one draws a gold
   underline, so editability is still discoverable. The winning row
   keeps its soft tint (that is information, not a box). */
.board-stage .bh input.lb,
.board-stage .bh .dt,
.board-stage .bh .tm,
.board-stage .row .s {
  background: transparent;
}
.board-stage .box.final-card .bh,
.board-stage .box.final-card .row {
  background: transparent !important;
}
.board-stage .box input:focus {
  box-shadow: inset 0 -2px 0 var(--gold);
}
/* Scores are the exception to the one-surface rule above (user order
   2026-11-07): a score must read as an editable input, not plain text,
   so the admin can tap it on the card and type. The transparent
   treatment hid the affordance entirely — the score looked like static
   text. Team/round/date fields stay borderless. */
.board-stage .row .s {
  background: rgba(128, 128, 128, 0.20);
  border: 1px solid rgba(128, 128, 128, 0.55);
  border-radius: 6px;
  min-width: 38px;
  min-height: 30px;
  flex: none;
}
.board-stage .row .s:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(242, 194, 48, 0.35), inset 0 -2px 0 var(--gold);
  background: rgba(128, 128, 128, 0.28);
}

/* 15. Ember: charcoal board, orange glow, warm cards */
.board-container[data-board-style="ember"] {
  --stage: radial-gradient(ellipse at 50% 0, rgba(255, 122, 26, 0.25), transparent 55%),
    linear-gradient(#1a1210, #0b0807);
  --card: #2b1d16;
  --card-ink: #ffead6;
  --card-line: #5a3a28;
  --bc: #7a4a2e;
  --bw: 1.5px;
  --muted: #c99a7a;
  --win: rgba(255, 122, 26, 0.18);
  --gold: #ff7a1a;
  --chalk: #ffd9b0;
  --turf-b: #0b0807;
  --bs: 14px;
  --hs: 12px;
  --r: 10px;
  --rr: 8px;
  --box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  --box-shadow-drag: 0 14px 30px rgba(0, 0, 0, 0.65);
}

/* 16. Ocean: deep teal water, foam-white cards */
.board-container[data-board-style="ocean"] {
  --stage: radial-gradient(ellipse at 50% 0, rgba(45, 226, 230, 0.20), transparent 55%),
    linear-gradient(#062a33, #04141b);
  --card: #eaf7f7;
  --card-ink: #08303a;
  --card-line: #9cc8cc;
  --bc: #2a7f8a;
  --bw: 1.5px;
  --muted: #4a7d84;
  --win: #c8ecdf;
  --gold: #f2b705;
  --chalk: #d6f2f2;
  --turf-b: #04141b;
  --bs: 14px;
  --hs: 12px;
  --r: 10px;
  --rr: 8px;
  --box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  --box-shadow-drag: 0 14px 30px rgba(0, 0, 0, 0.55);
}

/* 17. Violet: purple dusk, lavender cards */
.board-container[data-board-style="violet"] {
  --stage: radial-gradient(ellipse at 50% 0, rgba(167, 139, 250, 0.28), transparent 55%),
    linear-gradient(#1c1038, #0d071f);
  --card: #efeaff;
  --card-ink: #2c1a5e;
  --card-line: #c4b5fd;
  --bc: #7c5cf0;
  --bw: 1.5px;
  --muted: #6d5aa8;
  --win: #ffe9a8;
  --gold: #f2c230;
  --chalk: #e9e2ff;
  --turf-b: #0d071f;
  --bs: 14px;
  --hs: 12px;
  --r: 10px;
  --rr: 8px;
  --box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  --box-shadow-drag: 0 14px 30px rgba(0, 0, 0, 0.6);
}

/* 18. Sand: warm desert, parchment cards */
.board-container[data-board-style="sand"] {
  --stage: radial-gradient(ellipse at 50% 0, rgba(255, 214, 140, 0.30), transparent 55%),
    linear-gradient(#7a5a2e, #4a3418);
  --card: #fdf3dc;
  --card-ink: #4a3418;
  --card-line: #d8c39a;
  --bc: #a8842f;
  --bw: 1.5px;
  --muted: #8a6d3f;
  --win: #e2f0c8;
  --gold: #c98f1b;
  --chalk: #ffedbe;
  --turf-b: #4a3418;
  --bs: 14px;
  --hs: 12px;
  --r: 10px;
  --rr: 8px;
  --box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  --box-shadow-drag: 0 14px 30px rgba(0, 0, 0, 0.5);
}

/* 19. Ice: pale frozen blue, white cards */
.board-container[data-board-style="ice"] {
  --stage: radial-gradient(ellipse at 50% 0, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(#a8cbe0, #6f9cc0);
  --card: #ffffff;
  --card-ink: #16324a;
  --card-line: #bcd6e6;
  --bc: #5b8fb4;
  --bw: 1.5px;
  --muted: #5a7d95;
  --win: #d8f0e2;
  --gold: #e8a100;
  --chalk: #eaf4fb;
  --turf-b: #6f9cc0;
  --bs: 14px;
  --hs: 12px;
  --r: 10px;
  --rr: 8px;
  --box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  --box-shadow-drag: 0 14px 30px rgba(0, 0, 0, 0.35);
}

/* ---- Per-card designs (2026-11-03): a card's own design, picked by
   hand in the Studio (Add-match chooser or the card's Card select),
   saved per fixture — NOT automatic by round. The selector beats the
   classic pin in amsal-audit-fix.css (which is less specific), so a
   hand-picked design wins even on the classic board; a card with no
   pick keeps the board theme (and the Final keeps its auto-gold). */
body .board-container[data-board-style] .board-world .box.card-gold {
  background: linear-gradient(160deg, #ffe27a, #e0a81c) !important;
  border-color: #8a6a00 !important;
  color: #141a15 !important;
  --card-ink: #141a15; --muted: #5a4a00; --win: #fff3c4; --card-line: rgba(0, 0, 0, 0.25);
}
body .board-container[data-board-style] .board-world .box.card-blue {
  background: linear-gradient(160deg, #3b82f6, #1e3a8a) !important;
  border-color: #172554 !important;
  color: #ffffff !important;
  --card-ink: #ffffff; --muted: #bfdbfe; --win: rgba(255, 255, 255, 0.20); --card-line: rgba(255, 255, 255, 0.30);
}
body .board-container[data-board-style] .board-world .box.card-red {
  background: linear-gradient(160deg, #ef4444, #991b1b) !important;
  border-color: #450a0a !important;
  color: #ffffff !important;
  --card-ink: #ffffff; --muted: #fecaca; --win: rgba(255, 255, 255, 0.20); --card-line: rgba(255, 255, 255, 0.30);
}
body .board-container[data-board-style] .board-world .box.card-green {
  background: linear-gradient(160deg, #22c55e, #14532d) !important;
  border-color: #052e16 !important;
  color: #ffffff !important;
  --card-ink: #ffffff; --muted: #bbf7d0; --win: rgba(255, 255, 255, 0.20); --card-line: rgba(255, 255, 255, 0.30);
}
body .board-container[data-board-style] .board-world .box.card-purple {
  background: linear-gradient(160deg, #a855f7, #4c1d95) !important;
  border-color: #2e1065 !important;
  color: #ffffff !important;
  --card-ink: #ffffff; --muted: #e9d5ff; --win: rgba(255, 255, 255, 0.20); --card-line: rgba(255, 255, 255, 0.30);
}
body .board-container[data-board-style] .board-world .box.card-dark {
  background: linear-gradient(160deg, #374151, #000000) !important;
  border-color: #000000 !important;
  color: #f3f4f6 !important;
  --card-ink: #f3f4f6; --muted: #9ca3af; --win: rgba(242, 194, 48, 0.20); --card-line: rgba(255, 255, 255, 0.25);
}
body .board-container[data-board-style] .board-world .box.card-silver {
  background: linear-gradient(160deg, #f8fafc, #cbd5e1) !important;
  border-color: #64748b !important;
  color: #1f2937 !important;
  --card-ink: #1f2937; --muted: #64748b; --win: #fef3c7; --card-line: rgba(0, 0, 0, 0.20);
}
/* The card-design select in a Studio card header: compact, borderless,
   same single-surface treatment as the card's inputs. */
.board-stage .bh select.card-style {
  flex: none;
  width: 62px;
  background: transparent;
  border: 0;
  color: inherit;
  font: 500 11px/1 var(--bf, 'Barlow', system-ui, sans-serif);
  letter-spacing: 0;
  padding: 2px 0;
  outline: none;
  cursor: pointer;
}
/* Studio link arrowheads: gold, never intercepting clicks (the wide
   transparent hit path underneath still takes them). */
.board-svg .lk-arrow { fill: #f2c230; }
.board-svg .lk-arrow.sel { fill: #ffd94d; }

/* Compact application cards + detail popup (2026-11-04) */
.admin-item-card.reg-compact{cursor:pointer;display:flex;gap:12px;align-items:center}
.reg-thumb{flex:0 0 auto;width:64px;height:80px;object-fit:cover;border-radius:10px;background:#0f2740}
.reg-thumb-initial{flex:0 0 auto;width:64px;height:80px;border-radius:10px;background:#12402a;color:#fff;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:800}
.reg-compact .admin-item-main{flex:1;min-width:0}
.reg-compact .admin-item-actions{flex:0 0 auto;display:flex;flex-direction:column;gap:6px}
.reg-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.65);z-index:3000;display:flex;align-items:flex-start;justify-content:center;padding:24px 12px;overflow-y:auto}
.reg-modal{background:#16294d;color:#e2e8f0;border:1px solid #2b4a7a;border-radius:16px;max-width:560px;width:100%;padding:20px}
.reg-modal img.reg-modal-photo{width:100%;max-height:340px;object-fit:cover;border-radius:12px;background:#0f2740}
.reg-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px;margin-top:14px}
.reg-modal-grid .k{color:#94a3b8;font-size:13px}
.reg-modal-grid .v{font-weight:600;overflow-wrap:anywhere}
@media (max-width:520px){.reg-modal-grid{grid-template-columns:1fr}.reg-compact .admin-item-actions{flex-direction:row;flex-wrap:wrap}}

/* Player detail popup, very small phones: keep the name beside the
   photo instead of stacking it below, with a slightly smaller photo. */
@media (max-width:400px){
  .player-detail-grid{grid-template-columns:130px 1fr;gap:12px}
  .player-detail-grid img{width:130px;height:165px}
}

/* Player detail popup as a card (2026-11-04, user): styled like the
   squad photo cards — big photo header with a dark gradient, the
   name overlaid on the photo, and a big faded jersey number. Plain
   divs are used for the name and the Admin Notes label on purpose:
   amsal-design forces every h2 to 40px and every h3 to 28px with
   !important, which is why the old Admin Details heading rendered
   huge. The note stays blank when none was entered — no
   placeholder text is invented. */
.pd-card{overflow:hidden}
.pd-hero{position:relative;height:240px;background:linear-gradient(135deg,#14532d,#052e16)}
.pd-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pd-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.85) 0%,rgba(0,0,0,.25) 55%,rgba(0,0,0,.05) 100%)}
.pd-hero-fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--display);font-size:96px;color:rgba(255,255,255,.35)}
.pd-jersey{position:absolute;top:8px;right:16px;font-family:var(--display);font-size:120px;line-height:1;color:rgba(255,255,255,.35);z-index:3;text-shadow:0 2px 12px rgba(0,0,0,.45)}
.pd-hero-text{position:absolute;left:18px;right:18px;bottom:16px;z-index:2}
.pd-name{font-family:var(--display);font-size:34px;line-height:1;font-weight:800;text-transform:uppercase;color:#fff;overflow-wrap:anywhere}
.pd-type{margin-top:6px;font-size:14px;color:rgba(255,255,255,.85)}
.pd-body{padding:18px 20px 20px}
.player-detail-admin{margin-top:16px;border-top:1px solid rgba(128,128,128,.35);padding-top:12px}
.pd-admin-label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.65;margin:0 0 6px}
.player-detail-admin p{margin:0;font-size:13.5px;line-height:1.6;background:rgba(128,128,128,.12);padding:10px 12px;border-radius:10px;border-left:3px solid #d4af37}
@media (max-width:640px){
  .pd-hero{height:210px}
  .pd-name{font-size:30px}
  .pd-body{padding:16px}
}

/* ==========================================================================
   ADMIN ON PHONES (2026-11-09) — the admin is managed from a phone, so the
   phone layout must be genuinely usable, not just stacked. Desktop is
   untouched: everything here lives inside max-width media queries, and the
   bracket cards themselves are not restyled.
   ========================================================================== */
@media (max-width: 768px) {
  /* The page itself never scrolls sideways. Only the bracket stage does. */
  .admin-container {
    overflow-x: clip;
    padding: 20px 12px 60px;
  }
  .admin-layout,
  .admin-main,
  .admin-sidebar,
  .dashboard-card {
    min-width: 0;
    max-width: 100%;
  }
  .dashboard-card {
    padding: 18px 14px !important;
  }
  .dashboard-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }
  .dashboard-title {
    font-size: 28px;
  }

  /* Manage Event is a bordered card inside the dashboard card with 28px
     padding — on a phone that padding alone eats 56px of the 390px width
     and squeezes the board and the fixture form. Tighten it. */
  #event-manage {
    padding: 16px 12px;
  }

  /* --- Tab bar: thumb-sized tabs, unmistakable active tab, and a fade
         on the right edge so it is obvious more tabs sit off-screen. --- */
  .admin-sidebar {
    padding: 8px;
  }
  .admin-sidebar-header {
    display: none;
  }
  .admin-nav-tabs {
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%);
    mask-image: linear-gradient(to right, #000 82%, transparent 100%);
    scroll-behavior: smooth;
    padding-bottom: 2px;
  }
  /* amsal-fix.css (loads after this file) forces the tabs to wrap below
     900px. On phones that eats ~400px of vertical space, so force the
     single scrollable row here instead. The active tab stays the gold
     pill from amsal-fix.css, which is already unmistakable. */
  body .admin-nav-tabs {
    flex-wrap: nowrap !important;
  }
  .admin-tab-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }

  /* --- Bracket board: shorter stage, big toolbar buttons, a full-width
         Save button, and a plain "swipe sideways" hint. --- */
  #board-stage {
    min-height: 380px;
    max-height: 480px;
  }
  #board-container::after {
    content: "\2190  Swipe sideways to see the full bracket  \2192";
    display: block;
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--bar-ink);
    background: var(--bar);
    border-top: 1px solid var(--bar-line);
  }
  .board-header {
    padding: 10px 12px;
  }
  .board-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  #board-save {
    flex: 1 1 100%;
    min-height: 48px;
    justify-content: center;
    font-size: 15px;
  }
  .board-header select,
  .board-header input[type="number"] {
    min-height: 40px;
    font-size: 16px;
  }
  .board-hud-btn {
    min-height: 40px;
    padding: 8px 12px;
  }

  /* --- Fixture form: one column, result fields first (score, winner,
         status), 16px inputs so phones never zoom in on focus, and a
         full-width Save button. --- */
  #fixture-form .form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  #fixture-form .form-grid .fx-order-score {
    order: -3;
  }
  #fixture-form .form-grid .fx-order-winner {
    order: -2;
  }
  #fixture-form .form-grid .fx-order-status {
    order: -1;
  }
  .admin-container .form-input {
    font-size: 16px !important;
    padding: 12px 14px !important;
    min-height: 44px;
  }
  .admin-container .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-container .form-actions .form-submit {
    width: 100% !important;
    min-height: 48px;
  }
  #event-manage details > summary {
    min-height: 44px;
    font-size: 15px;
  }

  /* --- Fixture / item lists: card stacks, text wraps, Edit is a big
         thumb-sized button that never crowds the text. --- */
  .admin-item-card {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 10px;
  }
  .admin-item-main {
    min-width: 0;
    flex: none;
  }
  .admin-item-title {
    font-size: 16px;
    overflow-wrap: anywhere;
  }
  .admin-item-actions {
    width: 100%;
  }
  .admin-item-actions .admin-btn-action {
    flex: 1 1 0;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  /* --- Login: tighter card so the form fits a small screen. --- */
  .login-box-card {
    padding: 28px 20px !important;
    margin: 24px auto;
  }
}

@media (max-width: 480px) {
  .dashboard-title {
    font-size: 24px;
  }
  .dashboard-subtitle {
    font-size: 13.5px;
  }
  .admin-tab-btn {
    padding: 10px 14px;
  }
  .board-studio-header-row h4 {
    font-size: 17px;
  }
}
