  :root {
    --page-bg:      #eef0f2;
    --surface:      #ffffff;
    --text:         #111111;
    --text-muted:   #5c6370;
    --border:       #e4e6ea;
    --brand:        #d33f3f;
    --brand-hover:  #b93636;
    --accent-soft:  rgba(211, 63, 63, 0.1);
    --green:        #0d9f6e;
    --green-soft:   rgba(13, 159, 110, 0.1);
    --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.08);
    --radius:       8px;
    --radius-lg:    12px;
    --font:         'Montserrat', system-ui, sans-serif;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: var(--font);
    background: var(--page-bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  /* ── HERO ───────────────────────────────────────────── */
  .hero {
    position: relative;
    border-bottom: 1px solid var(--border);
    padding: 48px 0 40px;
    text-align: center;
    background:url('bg.jpg') no-repeat center center;
    background-size: cover;
  }
  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
  }
  .hero-badge {
    display: inline-block;
    background: #ba0b0b;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 18px;
    border: 1px solid rgba(211, 63, 63, 0.2);
  }
  .hero-title {
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #fff;
  }
  .hero-title span { color: var(--brand); }
  .hero-title-sub{
    margin-top: 10px;
    font-weight: 600;
    background-color:#fff;
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 10px;
  }
  .hero-sub {
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    margin-top: 10px;
  }
  .hero-divider {
    width: 48px;
    height: 3px;
    background: var(--brand);
    margin: 20px auto 0;
    border-radius: 2px;
  }

  .stats-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
  }
  .stat-pill {
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 18px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .stat-pill i { color: var(--brand); font-size: .82rem; }

  @media (max-width: 768px) {
    .hero {
      padding: 15px 0 15px;
    }
    .hero-sub,
    .hero-divider,
    .stats-bar {
      display: none;
    }
  }

  .hero .container { position: relative; z-index: 1; }

  /* ── SITE NAV (under hero) ─────────────────────────── */
  .site-nav {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }
  .site-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .site-nav-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 6px;
  }
  .site-nav-list > li { margin: 0; }
  .site-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: color .15s, background .15s, border-color .15s;
  }
  .site-nav-link:hover {
    color: var(--text);
    background: var(--page-bg);
  }
  .site-nav-link.is-active {
    color: var(--brand);
    background: var(--accent-soft);
    border-color: rgba(211, 63, 63, 0.2);
  }
  .site-nav-link--muted { font-weight: 600; opacity: 0.85; }
  .site-nav-signout { display: none !important; }
  body.is-authed .site-nav-signout { display: inline-flex !important; }

  .site-nav-mobile-bar,
  .site-nav-overlay,
  .site-nav-drawer-head,
  .site-nav-close { display: none; }

  /* ── REGISTRATION MODAL ───────────────────────────── */
  #regModal .modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    box-shadow: var(--shadow-hover);
  }
  #regModal .modal-header {
    border-bottom: 1px solid var(--border);
    padding: 28px 32px 20px;
  }
  #regModal .modal-body { padding: 28px 32px; }
  .reg-logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
  }
  .reg-logo span { color: var(--brand); }
  .reg-tag {
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: 4px;
  }
  .reg-trophy { font-size: 2rem; color: var(--brand); opacity: 0.85; }
  .reg-intro {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 24px;
    line-height: 1.65;
  }
  .reg-intro strong { color: var(--text); font-weight: 600; }
  .reg-footnote { font-size: .72rem; color: var(--text-muted); }

  .form-floating label { color: var(--text-muted); font-size: .88rem; }
  .form-floating .form-control {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .95rem;
    height: 56px;
    transition: border-color .2s, box-shadow .2s;
  }
  .form-floating .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(211, 63, 63, 0.12);
    outline: none;
  }
  .form-floating .form-control::placeholder { color: transparent; }
  .btn-enter {
    background: var(--brand);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 14px 32px;
    width: 100%;
    transition: background .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 4px 16px rgba(211, 63, 63, 0.28);
  }
  .btn-enter:hover { background: var(--brand-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(211, 63, 63, 0.35); }
  .btn-enter:active { transform: translateY(0); }

  .content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 72px;
  }

  .user-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
  }
  .user-info { display: flex; align-items: center; gap: 14px; }
  .user-avatar {
    width: 48px; height: 48px;
    background: var(--text);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
  }
  .user-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--text);
  }
  .user-mobile { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
  .progress-pill {
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 18px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 8px;
  }
  .progress-pill i { color: var(--green); }

  /* Reference-style red toolbar */
  .section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--brand);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(211, 63, 63, 0.25);
  }
  .section-toolbar-title {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0;
    color: #fff;
  }
  .section-toolbar-link {
    font-size: .82rem;
    font-weight: 500;
    color: #fff;
    opacity: 0.92;
    letter-spacing: .04em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    padding-bottom: 1px;
  }
  .section-toolbar-link:hover { color: #fff; opacity: 1; }

  /* ── Match card (spacious scoreboard layout) ─────── */
  .match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    transition: box-shadow .2s;
  }
  .match-card:hover { box-shadow: var(--shadow-hover); }
  .match-card.predicted {
    border-color: rgba(13, 159, 110, 0.35);
    background: linear-gradient(180deg, var(--green-soft) 0%, var(--surface) 48%);
  }
  .match-card--locked {
    opacity: 0.95;
    background: #fafbfc;
  }
  .match-card--locked.predicted {
    background: linear-gradient(180deg, #eef0f2 0%, #fafbfc 50%);
  }

  .match-card-inner { padding: 22px 24px 20px; }

  .match-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
  }
  .match-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
  }
  .match-no {
    background: var(--page-bg);
    color: var(--text-muted);
    font-weight: 700;
    font-size: .62rem;
    letter-spacing: .12em;
    padding: 5px 11px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid var(--border);
  }
  .match-info {
    font-size: .76rem;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 100%;
  }
  .match-info strong {
    color: var(--text);
    font-size: .78rem;
    font-weight: 600;
  }
  .match-meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
  }

  .match-locked-pill {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9a3412;
    background: #ffedd5;
    border: 1px solid #fdba74;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
  }

  .predicted-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--green);
    padding: 6px 11px;
    background: var(--green-soft);
    border: 1px solid rgba(13, 159, 110, 0.25);
    border-radius: 100px;
    white-space: nowrap;
  }
  .predicted-badge i { font-size: .6rem; }

  .scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    gap: 12px 16px;
    margin-bottom: 4px;
  }
  .scoreboard-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    min-width: 0;
    padding-top: 4px;
  }
  .scoreboard-team--away { flex-direction: column; }
  .team-flag {
    font-size: 2.25rem;
    line-height: 1;
  }
  .team-name {
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .02em;
    color: var(--text);
    line-height: 1.25;
    text-align: center;
  }

  .scoreboard-center {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0 4px;
  }
  .score-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.85rem, 5vw, 2.65rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 12px;
  }
  .score-hero-sep {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.55em;
    padding: 0 2px;
  }
  .score-hero .home-score,
  .score-hero .away-score {
    min-width: 1.1ch;
    text-align: center;
  }

  .score-steppers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }
  .score-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .score-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, color .15s;
    line-height: 1;
    padding: 0;
  }
  .score-btn:hover:not(:disabled) {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
  }
  .score-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }

  .match-card--locked .score-btn,
  .match-card--locked .btn-predict { pointer-events: none; }

  .card-actions {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
  }
  .btn-predict {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px 4px;
    cursor: pointer;
    font-family: var(--font);
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .02em;
    text-decoration: none;
    border-bottom: 2px solid var(--text);
    padding-bottom: 2px;
    transition: color .15s, border-color .15s, opacity .15s;
  }
  .btn-predict:hover:not(:disabled) {
    color: var(--brand);
    border-bottom-color: var(--brand);
  }
  .btn-predict:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    border-bottom-color: transparent;
  }
  .btn-predict.saved {
    color: var(--green);
    border-bottom-color: var(--green);
  }
  .btn-predict.saved:hover:not(:disabled) {
    color: #0b855d;
    border-bottom-color: #0b855d;
  }

  .summary-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 22px 22px 24px;
    position: sticky;
    top: 20px;
  }
  .summary-panel h3 {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
  }
  .summary-heading-icon { color: var(--brand); font-size: 1rem; }
  .summary-item {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    font-size: .84rem;
  }
  .summary-item:last-of-type { border-bottom: none; }
  .summary-match-title {
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .06em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .summary-prediction {
    color: var(--text);
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .summary-score {
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .02em;
  }
  .summary-empty {
    color: var(--text-muted);
    font-size: .84rem;
    text-align: center;
    padding: 28px 12px;
    line-height: 1.5;
  }

  /* ── My predictions page ─────────────────────────────── */
  .page-predictions .predictions-panel.summary-panel {
    position: relative;
    top: auto;
    border-radius: var(--radius-lg);
    padding: 24px 22px 28px;
  }
  .predictions-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 8px;
  }
  .predictions-panel-head h3 {
    margin-bottom: 0;
  }
  .predictions-count {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid rgba(13, 159, 110, 0.25);
    padding: 6px 12px;
    border-radius: 100px;
  }
  .predictions-panel-lead {
    font-size: .84rem;
    color: var(--text-muted);
    margin: 0 0 20px;
    line-height: 1.5;
    max-width: 48ch;
  }
  .pred-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .pred-card {
    background: linear-gradient(165deg, var(--page-bg) 0%, var(--surface) 46%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    box-shadow: var(--shadow-card);
    transition: box-shadow .2s, border-color .2s;
  }
  .pred-card:hover {
    border-color: rgba(211, 63, 63, 0.22);
    box-shadow: var(--shadow-hover);
  }
  .pred-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .pred-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    font-size: .76rem;
    color: var(--text-muted);
    font-weight: 600;
  }
  .pred-card-date { font-variant-numeric: tabular-nums; }
  .pred-card-time {
    font-variant-numeric: tabular-nums;
    opacity: 0.92;
  }
  .pred-card-badge {
    flex-shrink: 0;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 100px;
    white-space: nowrap;
  }
  .pred-card-badge--open {
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid rgba(13, 159, 110, 0.28);
  }
  .pred-card-badge--locked {
    color: var(--text-muted);
    background: #eef0f2;
    border: 1px solid var(--border);
  }
  .pred-card-stage {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
  }
  .pred-card-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px 16px;
  }
  .pred-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .pred-team--home { justify-content: flex-start; }
  .pred-team--away { justify-content: flex-end; }
  .pred-flag { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
  .pred-name {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pred-team--home .pred-name { text-align: left; }
  .pred-team--away .pred-name { text-align: right; }
  .pred-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--text);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  }
  .pred-score-num {
    font-size: 1.15rem;
    font-weight: 700;
    min-width: 1.1em;
    text-align: center;
  }
  .pred-score-sep {
    font-size: .85rem;
    font-weight: 600;
    opacity: 0.75;
    padding: 0 2px;
  }
  .pred-empty {
    text-align: center;
    padding: 40px 20px 36px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--page-bg);
  }
  .pred-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--text-muted);
  }
  .pred-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
  }
  .pred-empty-hint {
    font-size: .88rem;
    color: var(--text-muted);
    margin: 0 auto 20px;
    max-width: 320px;
    line-height: 1.55;
  }
  .pred-empty-cta { padding: 12px 22px; font-weight: 700; }

  @media (max-width: 540px) {
    .pred-card-teams {
      grid-template-columns: 1fr;
      text-align: center;
    }
    .pred-team--home,
    .pred-team--away {
      justify-content: center;
    }
    .pred-team--away .pred-name { text-align: center; }
    .pred-team--away { flex-direction: row-reverse; }
    .pred-score { order: -1; justify-self: center; }
  }

  .btn-submit-all {
    background: var(--text);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-family: var(--font);
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 14px 24px;
    width: 100%;
    cursor: pointer;
    margin-top: 18px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  }
  .btn-submit-all:hover { background: #2a2a2a; transform: translateY(-1px); color: #fff; }

  .toast-container { z-index: 9999; }
  .custom-toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 14px 20px;
    min-width: 260px;
    display: flex; align-items: center; gap: 12px;
    font-size: .88rem;
    box-shadow: var(--shadow-hover);
  }
  .toast-icon { font-size: 1.15rem; }
  .toast-icon.success { color: var(--green); }
  .toast-icon.warn { color: #c98a00; }

  #successScreen {
    display: none;
    text-align: center;
    padding: 56px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-top: 8px;
  }
  .page-predictions #successScreen {
    margin-top: 20px;
    border-radius: var(--radius-lg);
  }
  .success-icon {
    font-size: 4.5rem;
    color: var(--green);
    margin-bottom: 20px;
  }
  .success-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
  }
  .success-sub { color: var(--text-muted); font-size: 1rem; margin-top: 10px; line-height: 1.5; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .match-card { animation: fadeUp .22s ease both; }
  .match-card:nth-child(2) { animation-delay: .04s; }
  .match-card:nth-child(3) { animation-delay: .08s; }
  .match-card:nth-child(4) { animation-delay: .12s; }
  .match-card:nth-child(5) { animation-delay: .16s; }
  .match-card:nth-child(6) { animation-delay: .2s; }

  @media (max-width: 768px) {
    .scoreboard {
      grid-template-columns: 1fr;
      gap: 16px;
    }
    .scoreboard-center { grid-column: 1; order: -1; }
    .score-hero { margin-bottom: 10px; }
    .summary-panel { position: static; margin-top: 28px; }
    .section-toolbar { flex-direction: column; align-items: flex-start; }
    .site-nav-mobile-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      max-width: 1200px;
      margin: 0 auto;
      padding: 10px 16px;
    }
    .site-nav-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--page-bg);
      color: var(--text);
      cursor: pointer;
      transition: background .15s, border-color .15s, color .15s;
    }
    .site-nav-toggle:hover,
    .site-nav-toggle:focus-visible {
      background: var(--surface);
      border-color: rgba(211, 63, 63, 0.35);
      color: var(--brand);
      outline: none;
    }
    .site-nav-toggle-icon { font-size: 1.15rem; }
    .site-nav-mobile-title {
      font-size: .74rem;
      font-weight: 700;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .site-nav-overlay {
      display: block;
      position: fixed;
      inset: 0;
      z-index: 1040;
      background: rgba(17, 17, 17, 0.45);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity .28s ease, visibility .28s ease;
    }
    .site-nav-panel {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      z-index: 1050;
      width: min(300px, 86vw);
      background: var(--surface);
      border-right: 1px solid var(--border);
      box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
      transform: translateX(-100%);
      transition: transform .28s cubic-bezier(0.32, 0.72, 0, 1);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .site-nav-drawer-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .site-nav-drawer-title {
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .site-nav-close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      transition: background .15s, color .15s, border-color .15s;
    }
    .site-nav-close:hover,
    .site-nav-close:focus-visible {
      background: var(--page-bg);
      color: var(--text);
      outline: none;
    }
    .site-nav-close i { font-size: 1.1rem; }
    .site-nav-inner {
      flex: 1;
      overflow-y: auto;
      padding: 12px 14px 24px;
      justify-content: flex-start;
      display:block;
      margin:0;
    }
    .site-nav-list {
      flex-direction: column;
      align-items: stretch;
      gap: 4px;
      padding: 0;
    }
    .site-nav-link {
      width: 100%;
      padding: 14px 16px;
      font-size: .72rem;
      letter-spacing: .1em;
    }
    .site-nav.is-open .site-nav-overlay {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    .site-nav.is-open .site-nav-panel {
      transform: translateX(0);
    }
    body.site-nav-open { overflow: hidden; }
  }

  .inner-banner {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
    text-align: center;
  }
  .inner-banner .inner-kicker {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 8px;
  }
  .inner-banner h1 {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0;
  }
  .inner-banner p {
    color: var(--text-muted);
    font-size: .9rem;
    margin: 10px auto 0;
    max-width: 520px;
    line-height: 1.55;
  }

  .home-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 8px;
  }
  .home-tile {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: box-shadow .2s, border-color .2s, transform .15s;
  }
  .home-tile:hover {
    border-color: rgba(211, 63, 63, 0.35);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: inherit;
  }
  .home-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 14px;
  }
  .home-tile h2 {
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text);
  }
  .home-tile p {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
  }

  .static-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-card);
    max-width: 720px;
    margin: 0 auto;
  }
  .static-card h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
  }
  .static-card p { color: var(--text-muted); line-height: 1.65; font-size: .9rem; }

  .profile-page-head {
    max-width: 720px;
    margin-bottom: 28px;
  }
  .profile-page-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 10px;
  }
  .profile-page-lead {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
    max-width: 52ch;
  }

  .profile-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .profile-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--brand) 0%, #e88888 50%, var(--brand) 100%);
  }
  .profile-card-body {
    padding: 28px 26px 26px;
    margin: 0 auto;
  }
  .profile-guest-hint {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 8px;
    text-align: center;
  }
  body.is-authed .profile-guest-hint { display: none !important; }
  body:not(.is-authed) .profile-edit-section {
    display: none !important;
  }
  .profile-edit-form .form-control {
    border-color: var(--border);
    font-family: var(--font);
  }
  .profile-edit-form .form-floating > label {
    font-family: var(--font);
    color: var(--text-muted);
  }
  .profile-edit-form .form-control:focus {
    border-color: rgba(211, 63, 63, 0.45);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  @media (max-width: 480px) {
    .profile-card-body {
      padding: 22px 18px 20px;
    }
  }

  /* ── Points page / group standings ───────────────────── */
  .points-page-head {
    max-width: 720px;
  }
  .points-page-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 10px;
  }
  .points-page-lead {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
    max-width: 52ch;
  }
  .points-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 22px 22px 24px;
  }
  .points-panel-heading {
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
  }
  .points-panel-heading i { color: var(--brand); }
  .group-standings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(388px, 1fr));
    gap: 14px;
  }
  .group-standings-card {
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px 12px;
    overflow: hidden;
  }
  .group-standings-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 10px;
    padding: 0 4px;
  }
  .group-standings-table {
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
  }
  .group-standings-table thead th {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom-width: 1px;
    white-space: nowrap;
    padding: 8px 6px;
  }
  .group-standings-table tbody td,
  .group-standings-table tbody th {
    padding: 7px 6px;
    vertical-align: middle;
    border-color: var(--border);
  }
  .group-standings-team {
    font-weight: 600;
    font-size: .78rem;
    color: var(--text);
    max-width: 140px;
  }
  .group-standings-pts {
    font-weight: 700;
    color: var(--brand);
  }
  .group-standings-foot {
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.55;
  }
  .group-standings-foot code {
    font-size: .7rem;
    background: var(--page-bg);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
  }
  .group-standings-empty {
    color: var(--text-muted);
    font-size: .9rem;
    margin: 0;
  }
  @media (max-width: 768px) {
    .group-standings-grid {
      grid-template-columns: 1fr;
    }
    .group-standings-table thead th:nth-child(6),
    .group-standings-table thead th:nth-child(7),
    .group-standings-table thead th:nth-child(8),
    .group-standings-table tbody td:nth-child(6),
    .group-standings-table tbody td:nth-child(7),
    .group-standings-table tbody td:nth-child(8) {
      display: none;
    }
  }

  /* ── Public winners page ─────────────────────────────── */
  .winners-page-head {
    max-width: 720px;
  }
  .winners-page-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 10px;
  }
  .winners-page-lead {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
    max-width: 52ch;
  }
  .winners-empty {
    max-width: none;
    margin: 0;
  }
  .winners-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .winner-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 22px 20px;
  }
  .winner-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
  }
  .winner-card-body { min-width: 0; }
  .winner-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
  }
  .winner-match {
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 10px;
  }
  .winner-scoreline {
    font-size: .88rem;
    color: var(--text);
    line-height: 1.5;
  }
  .winner-meta {
    margin-top: 10px;
  }

  /* ── Prizes & leaderboard pages ────────────────────── */
  .prizes-page-head,
  .leaderboard-page-head {
    max-width: 720px;
  }
  .prizes-page-title,
  .leaderboard-page-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 10px;
  }
  .prizes-page-kicker {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 10px;
  }
  .prizes-page-lead,
  .leaderboard-page-lead {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
    max-width: 52ch;
  }
  .prize-showcase {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
  }
  .prize-showcase-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
    background: linear-gradient(165deg, #1a1f28 0%, #0d0f12 100%);
    overflow: hidden;
  }
  .prize-showcase-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at 50% 80%, rgba(211, 63, 63, 0.35) 0%, transparent 55%);
    pointer-events: none;
  }
  .prize-showcase-icon {
    position: relative;
    font-size: clamp(3.5rem, 10vw, 4.5rem);
    color: #f0f0f0;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
  }
  .prize-showcase-body {
    padding: 28px 28px 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .prize-showcase-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 8px;
  }
  .prize-showcase-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.15;
  }
  .prize-showcase-desc {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 42ch;
  }
  .prize-showcase-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .prize-showcase-perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .84rem;
    color: var(--text);
    line-height: 1.45;
  }
  .prize-showcase-perks i {
    color: var(--green);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: .75rem;
  }
  .prize-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
  }
  .prize-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    box-shadow: var(--shadow-card);
  }
  .prize-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 6px;
  }
  .prize-stat-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.35;
  }
  .prize-section-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
  }
  .prize-steps-section {
    margin-bottom: 28px;
  }
  .prize-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .prize-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
  }
  .prize-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--brand);
    font-size: .9rem;
    font-weight: 700;
  }
  .prize-step-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
  }
  .prize-step-body p {
    font-size: .86rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
  }
  .prize-step-body a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
  }
  .prize-step-body a:hover {
    text-decoration: underline;
  }
  .prize-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    max-width: none;
    margin: 0;
    padding: 24px 26px;
    background: linear-gradient(135deg, rgba(211, 63, 63, 0.06) 0%, var(--surface) 55%);
    border-color: rgba(211, 63, 63, 0.15);
  }
  .prize-cta-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
  }
  .prize-cta-text p {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.5;
  }
  .prize-cta-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .prize-note {
    max-width: none;
    margin-bottom: 16px;
  }
  .prize-note--muted {
    background: var(--page-bg);
  }
  .prize-note-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
  }
  .prize-note-title i {
    color: var(--brand);
  }
  .prize-note-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.6;
  }
  .prize-note-list li + li {
    margin-top: 8px;
  }
  .prize-note p {
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.6;
  }
  .prize-note a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
  }
  .prize-note a:hover {
    text-decoration: underline;
  }
  @media (max-width: 768px) {
    .prize-showcase {
      grid-template-columns: 1fr;
    }
    .prize-showcase-visual {
      padding: 32px 20px;
    }
    .prize-showcase-body {
      padding: 22px 20px 24px;
    }
    .prize-stats {
      grid-template-columns: 1fr;
    }
    .prize-cta {
      flex-direction: column;
      align-items: stretch;
      text-align: center;
    }
    .prize-cta-btn {
      width: 100%;
    }
  }
  .leaderboard-aside {
    max-width: none;
    margin-bottom: 20px;
  }
  .leaderboard-aside-title {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
  }
  .leaderboard-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .leaderboard-table {
    margin: 0;
    font-size: .88rem;
  }
  .leaderboard-table thead th {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--page-bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
  }
  .leaderboard-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
  }
  .leaderboard-table tbody tr:last-child td {
    border-bottom: none;
  }
  .lb-row--top {
    background: rgba(211, 63, 63, 0.04);
  }
  .lb-col-rank {
    width: 72px;
    white-space: nowrap;
  }
  .lb-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 100px;
    font-weight: 700;
    font-size: .82rem;
    background: var(--page-bg);
    color: var(--text-muted);
  }
  .lb-rank--top {
    background: var(--accent-soft);
    color: var(--brand);
  }
  .lb-medal {
    margin-left: 6px;
    font-size: .9rem;
  }
  .lb-medal--1 { color: #d4a017; }
  .lb-medal--2 { color: #9aa3b0; }
  .lb-medal--3 { color: #b87333; }
  .lb-name {
    font-weight: 600;
    color: var(--text);
  }
  .lb-exact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 700;
    font-size: .88rem;
  }
  .lb-accuracy {
    font-weight: 600;
    color: var(--text-muted);
  }
  .leaderboard-aside-list {
    margin: 0 0 16px;
    padding-left: 1.1rem;
    font-size: .86rem;
    color: var(--text-muted);
    line-height: 1.6;
  }
  .leaderboard-aside-list li + li {
    margin-top: 6px;
  }
  .leaderboard-aside-leader {
    font-size: .86rem;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .leaderboard-aside-leader strong {
    color: var(--text);
  }

  .lb-pagination {
    margin-bottom: 16px;
  }
  .lb-pagination:last-child {
    margin-bottom: 0;
    margin-top: 20px;
  }
  .lb-pagination-summary {
    font-size: .82rem;
    color: var(--text-muted);
    margin: 0 0 12px;
  }
  .lb-pagination-summary strong {
    color: var(--text);
    font-weight: 600;
  }
  .lb-pagination-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .lb-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color .15s, color .15s, background .15s;
  }
  a.lb-pagination-link:hover {
    color: var(--brand);
    border-color: rgba(211, 63, 63, 0.35);
    background: #fff;
  }
  .lb-pagination-link.is-active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
  }
  .lb-pagination-link.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .lb-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    font-size: .9rem;
    color: var(--text-muted);
  }

  /* Fixture schedule sidebar (e.g. index col-md-4) */
  .fixture-sidebar.summary-panel h3 { margin-bottom: 4px; }
  .fixture-sidebar-list {
    max-height: min(70vh, 640px);
    overflow-y: auto;
    margin-top: 8px;
    padding-right: 6px;
  }
  .fixture-sidebar-item {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    font-size: .8rem;
  }
  .fixture-sidebar-item:last-child { border-bottom: none; }
  .fixture-sidebar-meta {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
  }
  .fixture-sidebar-teams {
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    font-size: .78rem;
  }
  .fixture-sidebar-vs {
    color: var(--text-muted);
    font-weight: 600;
    font-size: .72rem;
    padding: 0 2px;
  }
  .fixture-sidebar-stage {
    font-size: .62rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: .07em;
  }
  @media (min-width: 768px) {
    .fixture-sidebar.summary-panel {
      position: sticky;
      top: 72px;
    }
  }

  /* ── Knockout bracket page ─────────────────────────── */
  .page-bracket #mainContent {
    display: block;
  }

  .page-bracket .content-wrap--bracket {
    max-width: none;
    padding: 24px 16px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .kb-wrap {
    --kb-red: var(--brand);
    --kb-red-light: var(--accent-soft);
    --kb-gold: #c9a227;
    --kb-gold-light: #fdf8e8;
    --kb-bg: var(--page-bg);
    --kb-card: var(--surface);
    --kb-border: var(--border);
    font-family: var(--font);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
  }

  .kb-section-head {
    text-align: center;
    padding: 0 12px 20px;
  }

  .kb-section-title {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
  }

  .kb-section-title i {
    color: var(--kb-red);
  }

  .kb-section-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
  }

  .kb-section-sub i {
    color: var(--kb-red);
    margin-right: 4px;
  }

  .kb-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 12px 20px;
    flex-wrap: wrap;
  }

  .kb-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--kb-card);
    border: 1px solid var(--kb-border);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: var(--shadow-card);
  }

  .kb-pill-count {
    background: var(--kb-red);
    color: #fff;
    border-radius: 50px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .kb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--kb-card);
    border: 1px solid var(--kb-border);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    box-shadow: var(--shadow-card);
  }

  .kb-btn:hover {
    border-color: var(--kb-red);
    color: var(--kb-red);
    background: var(--kb-red-light);
  }

  .kb-scroll {
    position: relative;
    width: 100%;
    overflow: auto;
    padding: 16px 12px 20px;
    -webkit-overflow-scrolling: touch;
    background: #e8eaed;
    border: 1px solid var(--kb-border);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

  .kb-scroll--locked .kb-bracket-wrap {
    pointer-events: none;
    user-select: none;
    filter: blur(1px);
  }

  .kb-locked-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: rgba(52, 58, 66, 0.78);
    border-radius: inherit;
  }

  .kb-locked-overlay[hidden] {
    display: none !important;
  }

  .kb-locked-card {
    width: min(100%, 400px);
    text-align: center;
    background: rgba(32, 36, 42, 0.96);
    color: #f4f5f7;
    padding: 28px 24px 26px;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .kb-locked-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #e8c547;
    font-size: 1.35rem;
  }

  .kb-locked-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: 0.02em;
    color: #fff;
  }

  .kb-locked-text {
    font-size: 0.82rem;
    line-height: 1.55;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 12px;
  }

  .kb-locked-when {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e8c547;
    margin: 0;
  }

  .kb-bracket-wrap {
    position: relative;
    flex: 0 0 auto;
    width: max-content;
    margin: 0 auto;
    padding: 12px 8px 16px;
  }

  .kb-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
  }

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

  .kb-scroll::-webkit-scrollbar-thumb {
    background: #c5cad3;
    border-radius: 3px;
  }

  .kb-bracket {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 44px;
    min-width: max-content;
  }

  .kb-round {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
  }

  .kb-round-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 5px 14px;
    border-radius: 6px;
    white-space: nowrap;
    background: var(--kb-card);
    border: 1px solid var(--kb-border);
    color: var(--text-muted);
  }

  .kb-round[data-round="r32"] .kb-round-label,
  .kb-round[data-round="r16"] .kb-round-label {
    background: var(--kb-red-light);
    color: var(--kb-red);
    border-color: rgba(211, 63, 63, 0.25);
  }

  /* R32: 2 grid rows per match — compact cards so slots don't overlap */
  .kb-round[data-round="r32"] .kb-slot {
    padding: 1px 0;
  }

  .kb-round[data-round="r32"] .kb-match {
    width: 188px;
    max-height: 56px;
    flex-shrink: 0;
  }

  .kb-round[data-round="r32"] .kb-team {
    padding: 3px 8px;
    gap: 4px;
    min-height: 0;
    flex: 1 1 50%;
  }

  .kb-round[data-round="r32"] .kb-team-flag {
    font-size: 0.9rem;
  }

  .kb-round[data-round="r32"] .kb-team-name {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .kb-round[data-round="qf"] .kb-round-label {
    background: #eef4ff;
    color: #1565c0;
    border-color: #c5d9f5;
  }

  .kb-round[data-round="sf"] .kb-round-label {
    background: #fff8ee;
    color: #c45c00;
    border-color: #f0dcc0;
  }

  .kb-round[data-round="final"] .kb-round-label {
    background: var(--kb-gold-light);
    color: #9a7b0a;
    border-color: #e6d07a;
  }

  .kb-col-grid {
    display: grid;
    width: 200px;
    position: relative;
    overflow: visible;
  }

  .kb-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 3px 0;
    overflow: visible;
    z-index: 1;
  }

  .kb-match {
    width: 200px;
    background: var(--kb-card);
    border: 1px solid var(--kb-border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s, box-shadow 0.15s;
  }

  .kb-match.kb-clickable {
    cursor: pointer;
  }

  .kb-match.kb-clickable:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
  }

  .kb-match.kb-locked {
    opacity: 0.88;
  }

  .kb-team {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    position: relative;
    transition: background 0.12s;
  }

  .kb-team + .kb-team {
    border-top: 1px solid var(--kb-border);
  }

  .kb-team.kb-team-click {
    cursor: pointer;
  }

  .kb-team.kb-team-click:hover {
    background: #fafaf8;
  }

  .kb-team.kb-selected {
    background: var(--kb-red-light);
  }

  .kb-team.kb-selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--kb-red);
  }

  .kb-team-flag {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
  }

  .kb-team-name {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kb-team-name.kb-tbd {
    color: var(--text-muted);
    font-weight: 500;
    font-style: italic;
  }

  .kb-pick-icon {
    font-size: 0.62rem;
    color: var(--kb-red);
    opacity: 0;
    transition: opacity 0.15s;
  }

  .kb-team.kb-selected .kb-pick-icon {
    opacity: 1;
  }

  .kb-match--champion {
    border-color: #e0c96a;
    background: linear-gradient(145deg, #fffdf8 0%, #fff9e8 100%);
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.22);
  }

  .kb-final-celebrate {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
    border-radius: inherit;
  }

  .kb-final-trophy {
    position: absolute;
    top: 5px;
    right: 9px;
    font-size: 1.3rem;
    line-height: 1;
    z-index: 4;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
    animation: kb-trophy-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

  .kb-confetti-piece {
    position: absolute;
    top: -4px;
    left: var(--kb-x);
    width: 5px;
    height: 7px;
    background: var(--kb-c);
    border-radius: 1px;
    opacity: 0;
    transform: rotate(var(--kb-r));
    animation: kb-confetti-fall var(--kb-d) ease-out var(--kb-delay) forwards;
  }

  @keyframes kb-confetti-fall {
    0% {
      opacity: 1;
      transform: translateY(0) rotate(var(--kb-r));
    }
    100% {
      opacity: 0;
      transform: translateY(70px) rotate(calc(var(--kb-r) + 200deg));
    }
  }

  @keyframes kb-trophy-pop {
    0% {
      transform: scale(0) rotate(-18deg);
      opacity: 0;
    }
    100% {
      transform: scale(1) rotate(0);
      opacity: 1;
    }
  }

  .kb-match--champion .kb-team {
    position: relative;
    z-index: 2;
  }

  .kb-team-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
  }

  @media (max-width: 768px) {
    .page-bracket .content-wrap--bracket {
      padding: 12px 8px 28px;
      width: 100%;
      max-width: 100%;
      align-items: stretch;
    }

    .page-bracket .kb-wrap {
      max-width: 100%;
      width: 100%;
    }

    .page-bracket .kb-section-head {
      padding: 0 4px 12px;
    }

    .page-bracket .kb-section-sub {
      font-size: 0.78rem;
      padding: 0 4px;
    }

    .page-bracket .kb-controls {
      padding: 0 4px 12px;
    }

    .page-bracket .kb-scroll {
      display: block;
      width: 100%;
      max-width: 100%;
      max-height: min(78vh, calc(100dvh - 240px));
      min-height: 320px;
      overflow: auto;
      overflow-x: auto;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-x pan-y;
      padding: 10px 8px 14px;
    }

    .page-bracket .kb-scroll--locked::before {
      display: none;
    }

    .page-bracket .kb-scroll::before {
      content: 'Swipe to explore the bracket';
      display: block;
      text-align: center;
      font-size: 0.68rem;
      font-weight: 600;
      color: var(--text-muted);
      padding: 0 4px 10px;
      letter-spacing: 0.02em;
    }

    .page-bracket .kb-bracket-wrap {
      display: inline-block;
      vertical-align: top;
      margin: 0;
      padding: 8px 10px 12px;
    }

    .page-bracket .kb-bracket {
      gap: 18px;
    }

    .page-bracket .kb-col-grid {
      width: 148px;
    }

    .page-bracket .kb-match {
      width: 148px;
      max-width: 148px;
    }

    .page-bracket .kb-round[data-round="r32"] .kb-match {
      width: 140px;
      max-width: 140px;
      max-height: 52px;
    }

    .page-bracket .kb-round-label {
      font-size: 0.6rem;
      padding: 4px 10px;
      margin-bottom: 8px;
    }

    .page-bracket .kb-team {
      padding: 6px 8px;
      gap: 6px;
    }

    .page-bracket .kb-team-name {
      font-size: 0.68rem;
    }

    .page-bracket .kb-locked-card {
      padding: 22px 18px 20px;
    }

    .page-bracket .kb-locked-text {
      font-size: 0.78rem;
    }
  }

  @media (max-width: 480px) {
    .page-bracket .kb-scroll {
      max-height: min(82vh, calc(100dvh - 220px));
    }

    .page-bracket .kb-bracket {
      gap: 14px;
    }

    .page-bracket .kb-col-grid {
      width: 132px;
    }

    .page-bracket .kb-match {
      width: 132px;
      max-width: 132px;
    }

    .page-bracket .kb-round[data-round="r32"] .kb-match {
      width: 126px;
      max-width: 126px;
    }
  }

