.results-hero { padding: 2rem 1.5rem 3rem; max-width: 1600px; margin: 0 auto; }
.results-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; margin-top: 1.5rem; }
.results-hero h1 span { color: var(--primary); }
.results-hero p { margin-top: 0.75rem; font-size: 1rem; color: var(--muted-foreground); }

.filter-section.container,
.results-section.container { max-width: none !important; }

/* ── View tabs ── */
.view-tabs {
  display: flex; gap: 0.5rem; margin-top: 1.5rem; align-items: center; flex-wrap: wrap;
}
.ar-group {
  display: flex; align-items: center; gap: 0.25rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.ar-label {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-foreground);
  margin-right: 0.1rem;
}
.ar-btn {
  padding: 0.28rem 0.65rem; border-radius: 9999px;
  font-size: 0.68rem; font-weight: 700;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); cursor: pointer; transition: all 0.15s;
}
.ar-btn:hover { border-color: var(--primary); color: var(--primary); }
.ar-btn.active { background: var(--primary); border-color: var(--primary); color: #000; font-weight: 800; }
.ar-btn.ar-off.active {
  background: oklch(0.3 0.04 160 / 0.9);
  border-color: oklch(0.52 0.08 160);
  color: var(--foreground);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.06);
}
.view-tab {
  padding: 0.45rem 1.4rem; border-radius: 9999px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); cursor: pointer; transition: all 0.2s;
}
.view-tab:hover { border-color: var(--primary); color: var(--primary); }
.view-tab.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

@media (max-width: 640px) {
  .ar-group {
    width: 100%;
    margin-left: 0;
    margin-top: 0.65rem;
    padding-left: 0;
    padding-top: 0.65rem;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

/* ── Leagues section ── */
.leagues-section { padding-bottom: 5rem; max-width: none !important; padding-left: 1cm; padding-right: 1cm; }

.league-day-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: oklch(0.82 0.22 145 / 0.08);
  border: 1px solid oklch(0.82 0.22 145 / 0.35);
  border-radius: 9999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.25rem;
}

.leagues-section-label {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 9999px; width: fit-content;
  margin: 0 0 1rem;
}
.leagues-section-label.active-label {
  background: oklch(0.82 0.22 145 / 0.12);
  color: var(--primary);
  border: 1px solid oklch(0.82 0.22 145 / 0.3);
}
.leagues-section-label.finished-label {
  background: transparent;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}


.league-block {
  margin-bottom: 2.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  background: var(--card); backdrop-filter: blur(12px);
}
.league-block--live {
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { border-color: var(--border); box-shadow: none; }
  50%       { border-color: oklch(0.72 0.22 145 / 0.8); box-shadow: 0 0 12px oklch(0.72 0.22 145 / 0.25); }
}
.league-block--upcoming {
  border-color: oklch(0.55 0.08 240 / 0.5);
  box-shadow: 0 0 0 1px oklch(0.55 0.08 240 / 0.15);
}

.league-block-header {
  padding: 0.85rem 1.25rem 0.8rem;
  border-bottom: 1px solid var(--border);
  background: oklch(0.20 0.04 160 / 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.league-block-name {
  font-size: 1rem; font-weight: 900; letter-spacing: -0.01em; color: var(--foreground);
}
.league-block-meta {
  margin-top: 0.2rem; font-size: 0.68rem; color: var(--muted-foreground); font-weight: 600;
}
/* Group status badge — always reserves height so layout doesn't shift */
.tg-badge {
  font-size: 0.65rem;
  padding: 0.18rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
}
.tg-badge--empty {
  height: 1.4rem; /* same height as a real badge */
  visibility: hidden;
}
.league-block-meta span { margin-right: 1rem; }

.league-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.league-table thead th {
  padding: 0.55rem 0.75rem; text-align: left;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-foreground); border-bottom: 1px solid var(--border);
  background: oklch(0.18 0.04 160 / 0.5);
}
.league-table thead th.center { text-align: center; }

.league-table tbody tr {
  border-bottom: 1px solid oklch(0.35 0.04 160 / 0.25);
  transition: background 0.15s;
}
.league-table tbody tr:last-child { border-bottom: none; }
.league-table tbody tr:hover { background: oklch(0.25 0.04 160 / 0.5); }

.league-table tbody td {
  padding: 0.65rem 0.75rem; vertical-align: middle;
}
.league-table tbody td.center { text-align: center; }

td.rank {
  font-size: 0.75rem; font-weight: 700; color: var(--muted-foreground);
  width: 2rem; text-align: center;
}
tr.top-3 td.rank { color: var(--primary); }

.team-cell-inner { display: flex; align-items: center; gap: 0.6rem; }
.team-avatar {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 900; letter-spacing: 0.02em;
  flex-shrink: 0; color: oklch(0.15 0.04 160);
}
.team-name-cell { font-weight: 700; color: var(--foreground); }
.player-name-cell { color: var(--muted-foreground); font-weight: 600; font-size: 0.78rem; }

td.goals-cell { font-weight: 700; color: var(--muted-foreground); }
td.pts-cell { font-size: 1rem; font-weight: 900; color: var(--primary); text-align: center; }

.filter-section { padding-bottom: 2rem; }
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

.filter-btn {
  padding: 0.4rem 1rem; border-radius: 9999px; font-size: 0.75rem;
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); transition: all 0.2s; cursor: pointer;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

.range-filters {
  display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(12px);
}
.range-group { display: flex; flex-direction: column; gap: 0.3rem; }
.range-group label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.range-group input {
  padding: 0.4rem 0.65rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border); background: oklch(0.18 0.04 160 / 0.8);
  color: var(--foreground); font-size: 0.82rem; font-family: inherit;
  transition: border-color 0.2s; outline: none;
}
.range-group input:focus { border-color: var(--primary); }
.range-group input::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }

.clear-btn {
  padding: 0.4rem 1rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s; align-self: flex-end;
}
.clear-btn:hover { border-color: var(--primary); color: var(--primary); }

.results-section { padding-bottom: 5rem; max-width: none !important; padding-left: 0; padding-right: 0; }
.results-count { font-size: 0.75rem; color: var(--muted-foreground); margin-bottom: 1rem; font-weight: 600; }

.results-grid-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.results-grid-inner:has(.bracket-view) {
  display: block;
  padding: 0 1.5rem;
}
@media (max-width: 1200px) { .results-grid-inner { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .results-grid-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .results-grid-inner { grid-template-columns: 1fr; } }

.match-card {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card); backdrop-filter: blur(12px);
  padding: 1rem; transition: border-color 0.2s;
}
.match-card:hover { border-color: oklch(0.82 0.22 145 / 0.4); }
.match-card.cancelled { border-color: oklch(0.55 0.15 20 / 0.5); }
.match-card.cancelled:hover { border-color: oklch(0.65 0.18 20 / 0.7); }

.cancelled-label {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; text-align: center;
  color: oklch(0.75 0.18 20); background: oklch(0.4 0.15 20 / 0.25);
  border: 1px solid oklch(0.55 0.15 20 / 0.4);
  border-radius: 9999px; padding: 0.18rem 0.75rem;
  margin: -0.25rem auto 0.75rem; width: fit-content;
}

.match-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 1rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.tournament-badge {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 9999px; white-space: nowrap;
}
.tournament-badge[data-color="red"]    { background: oklch(0.4 0.15 20 / 0.3); color: oklch(0.75 0.18 20); border: 1px solid oklch(0.55 0.15 20 / 0.4); }
.tournament-badge[data-color="blue"]   { background: oklch(0.4 0.12 250 / 0.3); color: oklch(0.75 0.14 250); border: 1px solid oklch(0.55 0.12 250 / 0.4); }
.tournament-badge[data-color="gold"]   { background: oklch(0.5 0.14 80 / 0.3); color: oklch(0.85 0.16 80); border: 1px solid oklch(0.65 0.14 80 / 0.4); }
.tournament-badge[data-color="purple"] { background: oklch(0.4 0.14 300 / 0.3); color: oklch(0.75 0.16 300); border: 1px solid oklch(0.55 0.14 300 / 0.4); }
.tournament-badge[data-color="green"]  { background: oklch(0.82 0.22 145 / 0.15); color: var(--primary); border: 1px solid oklch(0.82 0.22 145 / 0.3); }

.match-datetime { font-size: 0.68rem; color: var(--muted-foreground); font-weight: 600; white-space: nowrap; }

.match-status {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.18rem 0.55rem; border-radius: 9999px; white-space: nowrap;
  display: flex; align-items: center; gap: 0.3rem;
}
.match-status.live      { background: oklch(0.82 0.22 145 / 0.15); color: var(--primary); border: 1px solid oklch(0.82 0.22 145 / 0.35); }
.match-status.finished  { background: transparent; color: var(--muted-foreground); border: 1px solid var(--border); }
.match-status.scheduled { background: oklch(0.4 0.12 250 / 0.2); color: oklch(0.75 0.14 250); border: 1px solid oklch(0.55 0.12 250 / 0.35); }

.status-dot {
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--primary); flex-shrink: 0;
  animation: pulse 1.2s infinite;
}

.match-body { display: flex; align-items: center; gap: 0.5rem; }
.match-side { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.match-side.right { text-align: right; align-items: flex-end; }
.match-player { font-size: 0.88rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-side.winner .match-player { color: var(--primary); }
.match-team { font-size: 0.68rem; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.match-score-block { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; flex-shrink: 0; }
.match-score { display: flex; align-items: center; gap: 0.2rem; }
.score-num { font-size: 1.75rem; font-weight: 900; line-height: 1; min-width: 1.5rem; text-align: center; color: var(--muted-foreground); }
.score-num.winner { color: var(--primary); }
.score-sep { font-size: 1.1rem; font-weight: 700; color: var(--border); }
.score-ht { font-size: 0.65rem; color: var(--muted-foreground); font-weight: 700; }

.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 0.35rem; flex-wrap: wrap; margin-top: 2.5rem;
}
.page-btn {
  min-width: 2.2rem; height: 2.2rem; padding: 0 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.page-btn:disabled { opacity: 0.3; cursor: default; }
.page-ellipsis { color: var(--muted-foreground); font-size: 0.82rem; padding: 0 0.25rem; }

.player-link, .team-link {
  cursor: pointer; transition: color 0.15s;
  border-bottom: 1px dotted transparent;
}
.player-link:hover { color: var(--primary) !important; border-bottom-color: var(--primary); }
.team-link:hover { color: var(--foreground) !important; border-bottom-color: var(--muted-foreground); }

.player-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.player-modal.open { pointer-events: auto; }

.modal-backdrop {
  position: absolute; inset: 0;
  opacity: 0;
  background: oklch(0 0 0 / 0.65);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.player-modal.open .modal-backdrop {
  opacity: 1;
}
.modal-card {
  position: relative; z-index: 1;
  background: oklch(0.2 0.04 160); border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  width: min(960px, calc(100vw - 2rem)); max-height: 90vh;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 0.32s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: row;
}
.player-modal.open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stats column (left) */
.modal-stats-col {
  flex: 1; padding: 2rem; overflow-y: auto; scrollbar-width: thin;
}

/* Photo column (right) */
.modal-photo-col {
  width: 380px; flex-shrink: 0;
  position: relative;
  background: oklch(0.14 0.03 240);
  overflow: hidden;
}
.modal-photo-col::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 100%, var(--modal-pc-color, var(--primary)) 0%, transparent 70%);
  opacity: 0.22; pointer-events: none;
}
.modal-photo-img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto; max-width: 180%;
  object-fit: contain; object-position: bottom center;
}
/* Team logo — centered, with padding so crest has breathing room */
.modal-photo-img.modal-team-logo {
  bottom: auto; top: 50%; transform: translate(-50%, -50%);
  height: auto; max-height: 70%; max-width: 75%;
  object-position: center;
}
.modal-photo-avatar {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100px; height: 100px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: #fff;
}

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.modal-close svg { width: 1rem; height: 1rem; }

.modal-player-name { font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; color: var(--primary); }
.modal-subtitle { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 0.25rem; margin-bottom: 1.5rem; }

.modal-stats-row { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.modal-stat {
  flex: 1; text-align: center; padding: 1rem 0.5rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: oklch(0.18 0.04 160 / 0.6);
}
.modal-stat-val { font-size: 2.25rem; font-weight: 900; line-height: 1; }
.modal-stat-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); margin-top: 0.3rem; }
.modal-stat.win .modal-stat-val  { color: var(--primary); }
.modal-stat.draw .modal-stat-val { color: oklch(0.85 0.16 80); }
.modal-stat.loss .modal-stat-val { color: oklch(0.65 0.18 20); }

.modal-bar-wrap { margin-bottom: 1.5rem; }
.modal-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--border); }
.modal-bar-w { background: var(--primary); }
.modal-bar-d { background: oklch(0.85 0.16 80); }
.modal-bar-l { background: oklch(0.65 0.18 20); }
.modal-bar-legend { display: flex; gap: 1rem; margin-top: 0.5rem; font-size: 0.72rem; font-weight: 700; }
.modal-bar-legend .win  { color: var(--primary); }
.modal-bar-legend .draw { color: oklch(0.85 0.16 80); }
.modal-bar-legend .loss { color: oklch(0.65 0.18 20); }

.modal-goals-row {
  display: flex; align-items: center; gap: 0; margin-bottom: 1.75rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: oklch(0.18 0.04 160 / 0.6); overflow: hidden;
}
.modal-goals-item { flex: 1; text-align: center; padding: 0.9rem 0.5rem; }
.modal-goals-val { display: block; font-size: 1.5rem; font-weight: 900; color: var(--foreground); line-height: 1; }
.modal-goals-lbl { display: block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-foreground); margin-top: 0.3rem; }
.modal-goals-sep { width: 1px; background: var(--border); align-self: stretch; }

.modal-tour-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.modal-tour-title { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); margin-bottom: 0.6rem; }
.modal-tour-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.modal-tour-list { display: flex; flex-direction: column; gap: 0.5rem; }
.modal-tour-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: calc(var(--radius) - 2px);
  background: oklch(0.18 0.04 160 / 0.5);
}
.modal-tour-wdl { display: flex; gap: 0.5rem; margin-left: auto; font-size: 0.75rem; font-weight: 700; }
.wdl-w { color: var(--primary); }
.wdl-d { color: oklch(0.85 0.16 80); }
.wdl-l { color: oklch(0.65 0.18 20); }
.modal-tour-total { font-size: 0.68rem; color: var(--muted-foreground); white-space: nowrap; }

.hcap.pos { color: var(--primary); }
.hcap.neg { color: oklch(0.65 0.18 20); }

.loading-state, .error-state {
  grid-column: 1 / -1; text-align: center; padding: 4rem 2rem;
  color: var(--muted-foreground); font-size: 0.9rem;
}
.loading-dot {
  display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--primary); margin: 0 0.2rem; animation: pulse 1.2s infinite;
}
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

/* Guarantee bracket always spans full grid width (fallback if :has() misses) */
.results-grid-inner > .league-day-header,
.results-grid-inner > .bracket-view,
.results-grid-inner > .pagination {
  grid-column: 1 / -1;
}

/* ── Bracket (GRID sheet) ───────────────────────────────────────────────────── */
.bracket-view {
  padding: 1rem 0;
  display: flex;
  justify-content: center;
}

/* Horizontal track: rounds left-to-right */
.bracket-track {
  display: flex;
  align-items: flex-start;
  width: calc(100vw - 4cm);
}

.bracket-track--split {
  align-items: stretch;
  justify-content: center;
  gap: 1.25rem;
  min-height: 980px;
}

.bracket-side {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
}

.bracket-final {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 0 0 clamp(250px, 18vw, 330px);
  min-width: 250px;
}

.champion-spotlight {
  position: absolute;
  top: 9rem;
  left: 50%;
  width: clamp(30rem, 36vw, 42rem);
  min-height: 150px;
  display: flex;
  align-items: center;
  padding-left: clamp(4.1rem, 6vw, 5.4rem);
  margin-bottom: 0;
  transform: translateX(-50%);
}

.champion-trophy {
  position: absolute;
  left: -2.1rem;
  top: 50%;
  width: clamp(7.2rem, 9vw, 9.2rem);
  transform: translateY(-50%);
  z-index: 1;
  filter:
    drop-shadow(0 0 18px oklch(0.86 0.18 82 / 0.5))
    drop-shadow(0 14px 24px oklch(0 0 0 / 0.5));
  pointer-events: none;
}

.champion-card {
  position: relative;
  z-index: 2;
  width: 100%;
  border: 1px solid oklch(0.86 0.18 82);
  border-radius: 1rem;
  min-height: 118px;
  padding: 1.45rem 2rem 1.35rem;
  background:
    radial-gradient(circle at 14% 50%, oklch(0.86 0.18 82 / 0.24), transparent 38%),
    linear-gradient(135deg, oklch(0.82 0.16 82 / 0.2), oklch(0.12 0.04 160 / 0.96)),
    oklch(0.16 0.04 160 / 0.92);
  box-shadow:
    inset 0 0 0 1px oklch(0.95 0.1 90 / 0.12),
    0 0 34px oklch(0.86 0.18 82 / 0.42),
    0 18px 38px oklch(0 0 0 / 0.34);
  overflow: hidden;
}

.champion-kicker {
  font-size: clamp(0.68rem, 0.82vw, 0.82rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(0.9 0.17 88);
  margin-bottom: 0.8rem;
  text-align: center;
  text-shadow: 0 0 14px oklch(0.86 0.18 82 / 0.62);
}

.champion-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 0;
}

.champion-flag {
  width: 42px;
  border-radius: 0.28rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.16);
}

.champion-flag--empty {
  height: 28px;
  display: block;
  background: oklch(0.3 0.03 160);
}

.champion-team {
  color: oklch(0.9 0.17 88);
  font-size: clamp(1.25rem, 1.75vw, 1.95rem);
  font-weight: 900;
  line-height: 1;
  min-width: 0;
  white-space: nowrap;
  text-shadow: 0 0 16px oklch(0.86 0.18 82 / 0.35);
}

/* Each round column — fixed equal width */
.bcol {
  display: flex;
  flex-direction: column;
  flex: 1 0 0%;
  width: 0;
}
.bcol-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 0 0.4rem 0.5rem;
}
.bcol-label--minor {
  color: var(--muted-foreground);
  padding: 0.75rem 0.4rem 0.35rem;
}
.bcol-matches {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bracket-track--split .bcol {
  width: auto;
  min-width: 0;
}

.bracket-track--split .bcol-matches {
  flex: 1;
  justify-content: space-around;
  gap: 0.75rem;
}

.bracket-track--split .bcol-r16 .bcol-matches { justify-content: space-between; }
.bracket-track--split .bcol-r8 .bcol-matches { padding-block: 3.1rem; }
.bracket-track--split .bcol-r4 .bcol-matches { padding-block: 9.3rem; }
.bracket-track--split .bcol-r2 .bcol-matches { padding-block: 22rem; }
.bracket-track--split .bcol-final {
  position: relative;
  width: 100%;
  justify-content: center;
}

.bracket-track--split .bcol-final > .bcol-label {
  text-align: center;
  padding: 0 0.4rem 0.5rem;
}

.bracket-track--split .bcol-final .bcol-matches {
  flex: 0;
  width: 100%;
  justify-content: center;
}
.bracket-side--right .bcol-label { text-align: right; }

.bracket-track--split .bcol-r8,
.bracket-track--split .bcol-r4,
.bracket-track--split .bcol-r2 {
  justify-content: center;
}

.bracket-track--split .bcol-r8 .bcol-matches,
.bracket-track--split .bcol-r4 .bcol-matches,
.bracket-track--split .bcol-r2 .bcol-matches {
  flex: 0;
  padding-block: 0;
  justify-content: center;
}

/* Connecting line between rounds */
.bcol-sep {
  width: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-top: 1.5rem; /* align with first card (skip label height) */
}
.bcol-sep::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, oklch(0.38 0.1 160), oklch(0.25 0.06 160));
}

/* ── Match card (bcard) ── */
.bcard {
  width: 100%;
  height: auto;
  background: oklch(0.16 0.04 160 / 0.85);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s;
  position: relative;
}
.bcard:hover { border-color: oklch(0.45 0.1 160); }
.bcard:has(.ranking-note:hover),
.bcard:has(.ranking-note:focus-within) {
  z-index: 30;
}

.bcard--live {
  border-color: oklch(0.78 0.18 58 / 0.9);
  background:
    linear-gradient(135deg, oklch(0.74 0.16 58 / 0.16), oklch(0.16 0.04 160 / 0.9)),
    oklch(0.16 0.04 160 / 0.85);
  box-shadow:
    inset 0 0 0 1px oklch(0.88 0.13 66 / 0.12),
    0 0 18px oklch(0.78 0.18 58 / 0.34);
}

.bcard--live .bcard-time {
  color: oklch(0.86 0.16 68);
}

.bcard--live .bcard-ht-score {
  color: oklch(0.86 0.16 68);
}

.bcard-time {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted-foreground);
  padding: 0.2rem 0.6rem 0;
  letter-spacing: 0.04em;
}
.bcard-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.6rem;
  transition: background 0.15s;
}
.bcard-row.win {
  background: oklch(0.22 0.07 145 / 0.5);
}
.bcard-row.champion {
  margin: 0.22rem 0.32rem;
  padding: 0.34rem 0.48rem;
  border-radius: 0.42rem;
  background: linear-gradient(90deg, oklch(0.78 0.16 82 / 0.28), oklch(0.22 0.07 145 / 0.58));
  border: 1px solid oklch(0.86 0.18 82);
  box-shadow:
    inset 0 0 12px oklch(0.86 0.18 82 / 0.12),
    0 0 14px oklch(0.86 0.18 82 / 0.35);
}
.bcard-row.champion .bcard-team,
.bcard-row.champion .bcard-score {
  color: oklch(0.9 0.17 88);
}
.bcard-divider {
  border-top: 1px solid var(--border);
  margin: 0 0.6rem;
}
.bcard-ht {
  position: absolute;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--muted-foreground);
  background: oklch(0.16 0.04 160);
  padding: 0 0.3rem;
  letter-spacing: 0.02em;
}
.bcard-flag {
  width: 22px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
}
.bcard-flag--empty {
  width: 22px;
  height: 14px;
  display: inline-block;
}
.bcard-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex: 1;
}
.bcard-team {
  font-size: 0.75rem;
  font-weight: 700;
}
.bcard-row.win .bcard-team { color: var(--primary); }
.bcard-team.tbd { color: var(--muted-foreground); font-style: italic; font-weight: 400; }
.bcard-player {
  font-size: 0.62rem;
  color: var(--muted-foreground);
}
.bcard-score-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.bcard-ht-score {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted-foreground);
  min-width: 0.8rem;
  text-align: right;
}
.bcard-score {
  font-size: 0.95rem;
  font-weight: 900;
  min-width: 1.2rem;
  text-align: right;
  color: var(--foreground);
}
.bcard-row.win .bcard-score { color: var(--primary); }

.ranking-note {
  position: absolute;
  top: 0.28rem;
  right: 0.34rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
}
.ranking-note::after {
  content: '';
  position: absolute;
  right: -0.2rem;
  bottom: 0.75rem;
  width: 20.5rem;
  height: 0.8rem;
}
.ranking-note-btn {
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 9999px;
  border: 1px solid oklch(0.86 0.18 82 / 0.9);
  background: oklch(0.86 0.18 82 / 0.16);
  color: oklch(0.9 0.17 88);
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  padding: 0;
  box-shadow: 0 0 10px oklch(0.86 0.18 82 / 0.32);
}
.ranking-tooltip {
  position: absolute;
  right: -0.2rem;
  bottom: calc(100% + 0.42rem);
  width: min(21rem, 82vw);
  padding: 0.85rem 1rem;
  border: 1px solid oklch(0.86 0.18 82 / 0.62);
  border-radius: 0.55rem;
  background: oklch(0.1 0.03 160 / 0.98);
  color: var(--foreground);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  box-shadow:
    0 0 22px oklch(0.86 0.18 82 / 0.26),
    0 14px 30px oklch(0 0 0 / 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.25rem);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 40;
}
.ranking-tooltip::before {
  content: '';
  position: absolute;
  right: 0.32rem;
  bottom: -0.27rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1px solid oklch(0.86 0.18 82 / 0.62);
  border-bottom: 1px solid oklch(0.86 0.18 82 / 0.62);
  border-left: 0;
  border-top: 0;
  background: oklch(0.1 0.03 160 / 0.98);
  transform: rotate(45deg);
}
.ranking-tooltip a {
  color: oklch(0.9 0.17 88);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.ranking-note:hover .ranking-tooltip,
.ranking-note:focus-within .ranking-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Refresh button ─────────────────────────────────────────────────────────── */
.refresh-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); cursor: pointer; transition: all 0.2s;
  flex-shrink: 0;
}
.refresh-btn svg { width: 1rem; height: 1rem; }
.refresh-btn:hover { border-color: var(--primary); color: var(--primary); }
.refresh-btn:disabled { opacity: 0.5; cursor: default; }
.refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tournament Group Stage ─────────────────────────────────────────────────── */
.tournament-groups-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 860px) {
  .tournament-groups-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1400px) {
  .tournament-groups-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1800px) {
  .tournament-groups-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Remove bottom margin on league-block inside the grid (grid gap handles spacing) */
.tournament-groups-grid .league-block { margin-bottom: 0; }

/* Section labels */
.groups-section-label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  margin: 1.5rem 0 0.75rem;
  padding: 0.25rem 0.85rem; border-radius: 9999px; width: fit-content;
}
.groups-label--live {
  color: var(--primary);
  background: oklch(0.82 0.22 145 / 0.1);
  border: 1px solid oklch(0.82 0.22 145 / 0.3);
}
.groups-label--live .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: pulse-dot 1.2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.7)} }
.groups-label--finished {
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}
.groups-label--upcoming {
  color: oklch(0.6 0.08 240);
  border: 1px solid oklch(0.55 0.08 240 / 0.35);
  background: oklch(0.55 0.08 240 / 0.06);
}

/* Live group: group card left + spotlight right */
.live-group-row {
  display: flex;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.live-group-card {
  flex: 0 0 480px;
  min-width: 0;
}
@media (max-width: 1000px) {
  .live-group-row { flex-direction: column; }
  .live-group-card { flex: none; width: 100%; }
}
.live-group-card .league-block { margin-bottom: 0; }

/* Spotlights row */
.live-spotlights {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
  flex-shrink: 0;
}

a.live-spotlight { text-decoration: none; color: inherit; }
.sp-clickable { cursor: pointer; transition: border-color 0.2s, transform 0.15s; }
.sp-clickable:hover { border-color: var(--primary); transform: translateY(-2px); }

/* Spotlight panel */
.live-spotlight {
  width: 490px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid oklch(0.82 0.22 145 / 0.35);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}
.sp-matches-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
}
.sp-matches-row .sp-match {
  flex: 1;
  min-width: 200px;
}
.sp-matches-row .sp-match + .sp-match {
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}
.sp-title {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 0.25rem;
}
.sp-match {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.65rem;
  background: oklch(0.82 0.22 145 / 0.04);
  border: 1px solid oklch(0.82 0.22 145 / 0.15);
  border-radius: 0.75rem;
}

/* Player card */
.sp-pcard {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}

/* Photo */
.sp-photo-wrap {
  position: relative; width: 100%; aspect-ratio: 3/4;
  border-radius: 0.5rem; overflow: hidden;
  background: oklch(0.14 0.03 240);
}
.sp-photo-wrap::before {
  content:''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, var(--sp-color, var(--primary)) 0%, transparent 70%);
  opacity: 0.2;
}
.sp-photo {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto; max-width: 140%;
  object-fit: contain; object-position: bottom center;
}
.sp-avatar {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; color: #fff;
}

/* Player info */
.sp-pname { font-size: 0.82rem; font-weight: 800; text-align: center; }

/* Flag overlay at bottom of photo */
.sp-flag-overlay {
  position: absolute;
  bottom: 0.5rem; left: 50%; transform: translateX(-50%);
  width: 78px; height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.5);
  z-index: 2;
}

/* Score row below photos */
.sp-score-row {
  display: flex; justify-content: center; align-items: center;
  padding-top: 0.5rem; margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* VS center */
.sp-vs {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem; flex-shrink: 0; padding: 0 0.25rem;
}
.sp-vs-text {
  font-size: 1rem; font-weight: 900; color: var(--muted-foreground); letter-spacing: 0.05em;
}
.sp-time { font-size: 0.6rem; color: var(--muted-foreground); }
.sp-ht {
  font-size: 0.95rem; font-weight: 900;
  color: oklch(0.78 0.18 60);
  letter-spacing: 0.05em;
}

/* Upcoming grid: slightly muted */
.groups-grid--upcoming .league-block {
  opacity: 0.7;
}

/* Match rows inside a group card */
.tgroup-matches {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.tgroup-match {
  display: grid;
  grid-template-columns: 2.8rem 1fr 3.2rem 1fr;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.4rem;
  background: oklch(0.14 0.02 145 / 0.35);
  font-size: 0.77rem;
}
.tgm-time {
  color: var(--muted-foreground);
  font-size: 0.67rem;
  font-weight: 600;
  white-space: nowrap;
}
.tgm-side {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}
.tgm-side.right {
  text-align: right;
  align-items: flex-end;
}
.tgm-player {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tgm-player.winner { color: var(--primary); }
.tgm-team {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tgm-flag {
  width: 16px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}
.tgm-score {
  text-align: center;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}
.tgm-ft {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--foreground);
}
.tgm-ht {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted-foreground);
}
.tgm-ft.live-ht {
  color: oklch(0.78 0.18 60);
  font-size: 0.75rem;
}
.tgroup-match.match-live {
  background: oklch(0.78 0.18 60 / 0.04);
  border-left: 2px solid oklch(0.78 0.18 60 / 0.5);
}
.team-flag-sm {
  width: 28px;
  height: auto;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}
/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
  .results-hero { padding: 1.25rem 1rem 1.5rem; }
  .view-tabs { flex-wrap: wrap; gap: 0.4rem; }
  .ar-group { margin-left: 0; padding-left: 0; border-left: none; width: 100%; padding-top: 0.35rem; border-top: 1px solid var(--border); }
  .leagues-section { padding: 0 0.75rem; }
  .tournament-groups-grid { grid-template-columns: 1fr !important; }
  .player-name-cell { display: none; }
  .goals-cell { display: none; }
  .live-group-row { flex-direction: column; }
  .live-group-card { flex: none; width: 100%; }
  .live-spotlights { flex-direction: column; }
  .live-spotlight { width: 100% !important; }
  .bracket-view { padding: 0.5rem; overflow-x: auto; justify-content: flex-start; }
  .bracket-track { width: max-content; }
  .bcol { flex: 0 0 140px; }
  .players-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem; }
  .pc-photo-wrap { height: 180px; }
  .results-section { padding: 0 0.75rem 3rem; }
  .results-grid-inner { grid-template-columns: 1fr !important; }
  .results-grid-inner:has(.bracket-view) { padding: 0; }
  .page-btn { padding: 0.3rem 0.5rem; font-size: 0.72rem; min-width: 2rem; }
}
@media (max-width: 480px) {
  .players-grid { grid-template-columns: 1fr !important; }
  .view-tab { padding: 0.4rem 0.9rem; font-size: 0.7rem; }
}

.tg-placeholder {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

/* ═══════════════════════════════════════════════════════
   MOBILE STYLES (≤ 767px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Results hero ── */
  .results-hero { padding: 1.25rem 1rem 1.5rem; }
  .results-hero h1 { font-size: clamp(1.6rem, 7vw, 2.5rem); }
  .view-tabs { flex-wrap: wrap; gap: 0.4rem; }
  .ar-group { margin-left: 0; padding-left: 0; border-left: none; width: 100%; padding-top: 0.35rem; border-top: 1px solid var(--border); }

  /* ── Group stage ── */
  .leagues-section { padding: 0 1rem; }
  .tournament-groups-grid { grid-template-columns: 1fr !important; }
  .league-table th, .league-table td { padding: 0.4rem 0.35rem; font-size: 0.65rem; }
  .player-name-cell { display: none; }
  .goals-cell { display: none; }
  .tgroup-match { flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem 0.6rem; }
  .tgm-side { min-width: 0; flex: 1; }
  .tgm-player { font-size: 0.72rem; }
  .tgm-team { font-size: 0.6rem; }

  /* ── Live section ── */
  .live-group-row { flex-direction: column; }
  .live-group-card { flex: none; width: 100%; }
  .live-spotlights { flex-direction: column; }
  .live-spotlight { width: 100% !important; }
  .sp-photo-wrap { aspect-ratio: 4/3; }

  /* ── Bracket ── */
  .bracket-track { width: calc(100vw - 2rem); overflow-x: auto; }
  .bcol { flex: 0 0 160px; }
  .bcard-team { font-size: 0.62rem; }
  .bcard-score { font-size: 0.75rem; }
  .bracket-view { padding: 0.75rem 1rem; }

  /* ── Player cards ── */
  .players-hero { padding: 1.25rem 1rem 1.5rem; }
  .players-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem; }
  .pc-photo-wrap { height: 180px; }
  .pc-wdl-val { font-size: 0.85rem; }
  .pc-goals-val { font-size: 0.72rem; }

  /* ── Match cards ── */
  .results-section { padding: 0 1rem 3rem; }
  .results-grid-inner { grid-template-columns: 1fr !important; }

  /* ── Pagination ── */
  .pagination { gap: 0.25rem; }
  .page-btn { padding: 0.3rem 0.5rem; font-size: 0.72rem; min-width: 2rem; }

  /* ── Section labels ── */
  .groups-section-label { margin: 1rem 0 0.5rem; }

  /* ── League block ── */
  .league-block-header { padding: 0.65rem 0.9rem; }
  .league-block-name { font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .players-grid { grid-template-columns: 1fr !important; }
  .results-hero h1 { font-size: 1.6rem; }
  .view-tab { padding: 0.4rem 0.9rem; font-size: 0.7rem; }
}

/* Photo */
.sp-photo-wrap {
  position: relative; width: 100%; aspect-ratio: 3/4;
  border-radius: 0.5rem; overflow: hidden;
  background: oklch(0.14 0.03 240);
}
.sp-photo-wrap::before {
  content:''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, var(--sp-color, var(--primary)) 0%, transparent 70%);
  opacity: 0.2;
}
.sp-photo {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto; max-width: 140%;
  object-fit: contain; object-position: bottom center;
}
.sp-avatar {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; color: #fff;
}
.sp-pname { font-size: 0.82rem; font-weight: 800; text-align: center; }
.sp-flag-overlay {
  position: absolute; bottom: 0.5rem; left: 50%; transform: translateX(-50%);
  width: 88px; height: auto; border-radius: 4px;
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.5); z-index: 2;
}
.sp-vs {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem; flex-shrink: 0; padding: 0 0.25rem;
}
.sp-vs-text { font-size: 1rem; font-weight: 900; color: var(--muted-foreground); }
.sp-time { font-size: 0.6rem; color: var(--muted-foreground); }
.sp-score-row {
  display: flex; justify-content: center; align-items: center;
  padding-top: 0.5rem; margin-top: 0.25rem;
  border-top: 1px solid var(--border); text-align: center;
}
.sp-ht { font-size: 0.95rem; font-weight: 900; color: oklch(0.78 0.18 60); letter-spacing: 0.05em; }

/* ═══════════════════════════════════════════════════════
   MOBILE STYLES (≤ 767px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .results-hero { padding: 1.25rem 1rem 1.5rem; }
  .results-hero h1 { font-size: clamp(1.6rem, 7vw, 2.5rem); }
  .view-tabs { flex-wrap: wrap; gap: 0.4rem; }
  .ar-group { margin-left: 0; padding-left: 0; border-left: none; width: 100%; padding-top: 0.35rem; border-top: 1px solid var(--border); }

  .leagues-section { padding: 0 0.75rem; }
  .tournament-groups-grid { grid-template-columns: 1fr !important; }
  .league-table th, .league-table td { padding: 0.4rem 0.35rem; font-size: 0.65rem; }
  .player-name-cell { display: none; }
  .goals-cell { display: none; }
  .tgroup-match { flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem 0.6rem; }

  .live-group-row { flex-direction: column; }
  .live-group-card { flex: none; width: 100%; }
  .live-spotlights { flex-direction: column; }
  .live-spotlight { width: 100% !important; }
  .sp-photo-wrap { aspect-ratio: 4/3; }

  .bracket-view { padding: 0.5rem; overflow-x: auto; justify-content: flex-start; }
  .bracket-track { width: max-content; min-width: 100%; }
  .bcol { flex: 0 0 140px; }

  .players-hero { padding: 1.25rem 1rem 1.5rem; }
  .players-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem; }
  .pc-photo-wrap { height: 180px; }

  .results-section { padding: 0 0.75rem 3rem; }
  .results-grid-inner { grid-template-columns: 1fr !important; }

  .pagination { gap: 0.25rem; }
  .page-btn { padding: 0.3rem 0.5rem; font-size: 0.72rem; min-width: 2rem; }

  .league-block-header { padding: 0.65rem 0.9rem; }
  .league-block-name { font-size: 0.85rem; }

  .results-grid-inner:has(.bracket-view) { padding: 0; }
}

@media (max-width: 480px) {
  .players-grid { grid-template-columns: 1fr !important; }
  .view-tab { padding: 0.4rem 0.9rem; font-size: 0.7rem; }
}

/* Final mobile overrides */
@media (max-width: 767px) {
  .results-hero {
    max-width: 100%;
    padding: 1.5rem 1rem 1.25rem;
  }
  .results-hero h1 {
    margin-top: 0.75rem;
    font-size: 2rem;
    overflow-wrap: anywhere;
  }
  .results-hero p {
    font-size: 0.9rem;
    line-height: 1.55;
  }
  .view-tabs {
    width: 100%;
    align-items: stretch;
  }
  .view-tab { flex: 1 1 auto; justify-content: center; }
  .ar-group {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }

  .league-block { overflow: hidden; }
  .league-table { width: 100%; table-layout: fixed; }
  .league-table th:first-child,
  .league-table td:first-child { width: 1.8rem; }
  .league-table th:last-child,
  .league-table td:last-child { width: 2.5rem; }
  .team-cell { min-width: 0; }
  .team-cell span { overflow-wrap: anywhere; }

  .bracket-view {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .bracket-track--split {
    width: max-content;
    min-width: 1740px;
    gap: 0.75rem;
  }
  .bracket-side {
    flex: none;
    width: 680px;
    grid-template-columns: repeat(4, 155px);
    gap: 0.75rem;
  }
  .bracket-final {
    flex: 0 0 210px;
    min-width: 210px;
  }
  .champion-spotlight {
    top: 7rem;
    width: 20rem;
    min-height: 112px;
    padding-left: 3.4rem;
  }
  .champion-trophy {
    left: -1.2rem;
    width: 5.5rem;
  }
  .champion-card {
    min-height: 92px;
    padding: 1rem 1.1rem;
  }
  .champion-kicker {
    margin-bottom: 0.5rem;
    font-size: 0.62rem;
  }
  .champion-main { gap: 0.5rem; }
  .champion-flag { width: 34px; }
  .champion-team {
    max-width: 13rem;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    font-size: 1.25rem;
    line-height: 1.1;
  }

  .modal-card {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    flex-direction: column-reverse;
    overflow-y: auto;
  }
  .modal-photo-col {
    width: 100%;
    min-height: 220px;
    flex: 0 0 220px;
  }
  .modal-stats-col { padding: 1.1rem; overflow: visible; }
  .modal-player-name { padding-right: 2.25rem; font-size: 1.55rem; }
  .modal-stats-row { gap: 0.5rem; }
  .modal-stat { padding: 0.75rem 0.25rem; }
  .modal-stat-val { font-size: 1.6rem; }
  .modal-tour-row { align-items: flex-start; flex-wrap: wrap; }
  .modal-tour-wdl { width: 100%; margin-left: 0; }
}
