/* ══════════════════════════════════════════════════════════
   SPORTS COMPARISONS — page-specific styles.
   Relies entirely on the CSS custom properties already defined
   in style.css (--bg, --gold, --gold-dim, --gold-glow, --text,
   --muted, --border, --radius, --surface, --surface2) so this
   page inherits the site's theme (incl. light/dark mode) for free.
   ══════════════════════════════════════════════════════════ */

.sc-root {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 1.5rem var(--layout-gutter) 3rem;
}

/* ── Sport sub-menu ───────────────────────────────────────── */
.sc-sport-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin: 1.5rem 0 2rem;
}

.sc-sport-tab {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.1rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}

.sc-sport-tab:hover {
  border-color: rgba(251, 191, 36, .5);
  color: var(--text);
  transform: translateY(-2px);
}

.sc-sport-tab.active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: transparent;
  color: #1e1305;
}

/* ── Admin bar ────────────────────────────────────────────── */
.sc-admin-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  padding: .7rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(52, 211, 153, .1);
  border: 1px solid rgba(52, 211, 153, .35);
  color: #34d399;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
}

.sc-admin-logout {
  padding: .35rem .85rem;
  border-radius: .5rem;
  border: 1px solid rgba(52, 211, 153, .4);
  background: transparent;
  color: #34d399;
  font-weight: 700;
  font-size: .78rem;
  cursor: pointer;
}

.sc-admin-logout:hover {
  background: rgba(52, 211, 153, .15);
}

.sc-admin-add-btn {
  padding: .35rem .85rem;
  font-size: .78rem;
}

/* ── Player search row ────────────────────────────────────── */
.sc-search-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: end;
  max-width: 820px;
  margin: 0 auto 2rem;
}

.sc-search-col {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.sc-search-label {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sc-label-a {
  color: #60a5fa;
}

.sc-label-b {
  color: #f87171;
}

.sc-vs-mini {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  color: var(--gold);
  padding-bottom: .6rem;
}

.sc-search-box {
  position: relative;
}

.sc-player-search {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: .7rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
}

.sc-player-search:focus {
  outline: none;
  border-color: rgba(251, 191, 36, .5);
}

.sc-search-dropdown {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(10, 14, 26, .98);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: .7rem;
  box-shadow: 0 18px 45px -8px rgba(0, 0, 0, .7);
  z-index: 40;
}

.sc-search-result {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .8rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.sc-search-result:last-child {
  border-bottom: none;
}

.sc-search-result:hover {
  background: rgba(251, 191, 36, .08);
}

.sc-search-result img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .08);
}

.sc-search-result-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}

.sc-search-result-meta {
  font-size: .72rem;
  color: var(--muted);
}

.sc-search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}

/* ── Global nav search results (the 🔍 overlay) ───────────── */
.sc-global-search-result {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .5rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sc-global-search-result:last-child {
  border-bottom: none;
}

.sc-global-search-result:hover {
  background: rgba(251, 191, 36, .08);
}

.sc-global-search-result img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .08);
  flex-shrink: 0;
}

.sc-global-search-result-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}

.sc-global-search-result-meta {
  font-size: .76rem;
  color: var(--muted);
}

.sc-global-search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

.sc-comparison.hidden {
  display: none;
}

/* ── Comparison header ────────────────────────────────────── */
.sc-header-card {
  position: relative;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .75);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.sc-header-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem;
}

.sc-header-player {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sc-header-player.side-b {
  flex-direction: row-reverse;
  text-align: right;
}

.sc-header-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
  border: 2px solid var(--gold-dim);
  flex-shrink: 0;
}

.sc-header-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem;
  color: var(--text);
  line-height: 1.2;
}

.sc-header-flag {
  font-size: 1.1rem;
  margin-right: .3rem;
}

.sc-header-meta {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .3rem;
}

.sc-header-agehgt {
  display: flex;
  gap: 1rem;
  margin-top: .5rem;
  font-size: .78rem;
  color: var(--muted);
}

.side-b .sc-header-agehgt {
  justify-content: flex-end;
}

.sc-career-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .3rem;
}

.side-b .sc-career-badge {
  justify-content: flex-end;
}

.sc-retired-pill {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, .15);
  border: 1px solid rgba(148, 163, 184, .35);
  color: #cbd5e1;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sc-active-years {
  font-size: .74rem;
  color: var(--muted);
}

.sc-header-agehgt b {
  display: block;
  color: var(--text);
  font-size: .92rem;
}

.sc-header-vs {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  color: var(--gold);
  text-align: center;
}

.sc-view-profile {
  display: inline-block;
  margin-top: .6rem;
  font-size: .76rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold-dim);
  padding: .3rem .7rem;
  border-radius: .5rem;
}

/* ── Head-to-head win summary ─────────────────────────────── */
.sc-winner-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  padding: 0 1.6rem .6rem;
}

.sc-winner-row-2 {
  gap: 2.5rem;
}

.sc-winner-caption {
  text-align: center;
  font-size: .74rem;
  color: var(--muted);
  padding: 0 1.6rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sc-winner-caption span {
  cursor: help;
  border-bottom: 1px dotted var(--muted);
}

.sc-winner-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: .6rem 1.3rem;
  border-radius: .8rem;
  min-width: 100px;
}

.sc-winner-chip.a {
  background: rgba(96, 165, 250, .12);
  border: 1px solid rgba(96, 165, 250, .3);
}

.sc-winner-chip.tied {
  background: rgba(148, 163, 184, .1);
  border: 1px solid rgba(148, 163, 184, .25);
}

.sc-winner-chip.b {
  background: rgba(248, 113, 113, .12);
  border: 1px solid rgba(248, 113, 113, .3);
}

.sc-winner-chip .num {
  font-size: 1.4rem;
  font-weight: 900;
}

.sc-winner-chip.a .num {
  color: #60a5fa;
}

.sc-winner-chip.b .num {
  color: #f87171;
}

.sc-winner-chip .lbl {
  font-size: .72rem;
  color: var(--muted);
}

/* ── Quick stat bars ──────────────────────────────────────── */
.sc-quickstats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .9rem;
  margin-bottom: 1.5rem;
}

.sc-quickstat-card {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
}

.sc-quickstat-title {
  font-size: .76rem;
  color: var(--muted);
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.sc-quickstat-values {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: .4rem;
}

.sc-quickstat-values .a {
  color: #60a5fa;
}

.sc-quickstat-values .b {
  color: #f87171;
}

.sc-bar-track {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
}

.sc-bar-a {
  background: #60a5fa;
}

.sc-bar-b {
  background: #f87171;
}

.sc-quickstat-sub {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════════
   PERFORMANCE OVERVIEW — the first stats section on every
   comparison/profile page. Wins/Losses/Draws are raw admin input;
   everything else (Win Rate, per-match averages) is calculated.
   ══════════════════════════════════════════════════════════ */
.sc-perf-panel {
  border: 1px solid rgba(251, 191, 36, .35);
  background: linear-gradient(180deg, rgba(251, 191, 36, .05), rgba(15, 23, 42, .7));
  margin-bottom: 1.5rem;
}

.sc-perf-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 1.1rem 0 .6rem;
}

.sc-perf-section-label:first-of-type {
  margin-top: .3rem;
}

.sc-perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem;
}

.sc-perf-card {
  padding: .9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
}

.sc-perf-card-title {
  font-size: .74rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.sc-perf-card-values {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: .4rem;
}

.sc-perf-card-values .a {
  color: #60a5fa;
}

.sc-perf-card-values .b {
  color: #f87171;
}

/* The better value between the two players gets a subtle highlight —
   bigger, with a soft glow — instead of just relying on colour, so it's
   obvious at a glance who's ahead on each metric. */
.sc-perf-card-values .winner {
  font-size: 1.2rem;
  text-shadow: 0 0 12px currentColor;
}

.sc-perf-card-values .winner::after {
  content: ' ▲';
  font-size: .6rem;
  vertical-align: middle;
}

/* ── Section grid (trophies / radar / awards) ─────────────── */
.sc-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sc-panel {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
  padding: 1.2rem;
}

.sc-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.sc-h2h-panel .sc-panel-title {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: .02em;
  justify-content: center;
}

.sc-h2h-matches-total {
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: -.4rem 0 .9rem;
}

.sc-panel-title-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  gap: .7rem;
  min-width: 0;
}

.sc-panel-legend {
  display: flex;
  gap: .8rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.sc-panel-legend .a::before {
  content: '●';
  color: #60a5fa;
  margin-right: .25rem;
}

.sc-panel-legend .b::before {
  content: '●';
  color: #f87171;
  margin-right: .25rem;
}

/* Trophies list */
.sc-trophy-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  margin-bottom: .65rem;
}

.sc-trophy-row .val {
  text-align: center;
  font-weight: 700;
  width: 26px;
}

.sc-trophy-row .val.a {
  color: #60a5fa;
}

.sc-trophy-row .val.b {
  color: #f87171;
}

.sc-trophy-row .label {
  color: var(--muted);
  text-align: center;
}

.sc-trophy-total {
  display: flex;
  justify-content: space-between;
  padding-top: .7rem;
  margin-top: .3rem;
  border-top: 1px solid var(--border);
  font-weight: 800;
}

/* Awards list */
.sc-award-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.sc-award-row:last-child {
  border-bottom: none;
}

.sc-award-vals {
  display: flex;
  gap: .8rem;
  font-weight: 700;
}

/* Fixed width + centered text so the header names (variable width) and
   the numeric values below (fixed width) share exactly the same center
   point in each column — this is what keeps them lined up. */
.sc-award-vals .a,
.sc-award-vals .b {
  min-width: 30px;
  text-align: center;
}

.sc-award-vals .a {
  color: #60a5fa;
}

.sc-award-vals .b {
  color: #f87171;
}

/* Header rows reused on top of Trophies / Custom Stats / Awards lists,
   built from the exact same row markup as the data rows so the player
   names sit in precisely the same columns as their values. */
.sc-row-header {
  padding-bottom: .55rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.sc-row-header.sc-trophy-row .val {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 800;
  white-space: nowrap;
}

.sc-row-header.sc-award-row .sc-award-vals .a,
.sc-row-header.sc-award-row .sc-award-vals .b {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}

/* Radar chart */
.sc-radar-wrap {
  display: flex;
  justify-content: center;
}

.sc-radar-wrap svg text {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  fill: var(--muted);
}

/* ── Two-col: season chart + head-to-head/records ─────────── */
.sc-grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sc-season-chart {
  width: 100%;
  height: auto;
}

.sc-h2h-total {
  text-align: center;
  margin-bottom: 1rem;
}

.sc-h2h-total .big {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem;
  color: var(--gold);
}

.sc-h2h-total .lbl {
  font-size: .72rem;
  color: var(--muted);
}

.sc-h2h-split {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .5rem;
  text-align: center;
}

.sc-h2h-split .num {
  font-size: 1.3rem;
  font-weight: 800;
}

.sc-h2h-split .a .num {
  color: #60a5fa;
}

.sc-h2h-split .draw .num {
  color: var(--muted);
}

.sc-h2h-split .b .num {
  color: #f87171;
}

.sc-h2h-split .lbl {
  font-size: .68rem;
  color: var(--muted);
}

.sc-record-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: .82rem;
}

.sc-record-row:last-child {
  border-bottom: none;
}

.sc-record-icon {
  font-size: 1.1rem;
}

.sc-record-label {
  flex: 1;
  color: var(--muted);
}

.sc-record-winner {
  font-weight: 700;
  color: var(--text);
}

/* ── Timeline ─────────────────────────────────────────────── */
.sc-timeline {
  display: flex;
  overflow-x: auto;
  gap: 0;
  padding: 1rem .2rem;
}

.sc-timeline-item {
  flex: 0 0 130px;
  text-align: center;
  position: relative;
  padding: 0 .4rem;
}

.sc-timeline-item::before {
  content: '';
  position: absolute;
  top: 22px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.sc-timeline-item:first-child::before {
  display: none;
}

.sc-timeline-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, .9);
  border: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto .6rem;
  position: relative;
  z-index: 1;
}

.sc-timeline-year {
  font-weight: 800;
  color: var(--gold);
  font-size: .82rem;
}

.sc-timeline-label {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .2rem;
}

/* ── Detailed comparison table ────────────────────────────── */
.sc-detailed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.sc-detailed-table th {
  text-align: left;
  padding: .6rem .5rem;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.sc-detailed-table th.center,
.sc-detailed-table td.center {
  text-align: center;
}

.sc-detailed-table td {
  padding: .55rem .5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.sc-detailed-table tr:last-child td {
  border-bottom: none;
}

.sc-winner-tag {
  font-weight: 700;
  font-size: .78rem;
}

/* ── Homepage hero (iconic matchup cards) ─────────────────── */
.sc-home-hero {
  margin-bottom: 2rem;
}

.sc-home-hero.hidden {
  display: none;
}

.sc-sport-matchups-hint {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  margin: 0 0 .3rem;
}

.sc-home-hero-sub {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  margin-top: -.6rem;
  margin-bottom: 1.4rem;
}

.sc-home-hero-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.sc-home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  padding: 1.4rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .75);
  text-decoration: none;
  transition: .2s;
}

.sc-home-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, .55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.sc-home-card-sport {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
}

.sc-home-card-faces {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.sc-home-card-faces img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dim);
  background: rgba(255, 255, 255, .08);
}

.sc-home-card-vs {
  font-family: 'Cinzel Decorative', serif;
  font-size: .8rem;
  color: var(--gold);
  font-weight: 700;
}

.sc-home-card-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  text-align: center;
}

.sc-home-card-names span {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

/* ── Popular comparisons ──────────────────────────────────── */
.sc-section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  text-align: center;
}

.sc-popular-row {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.sc-popular-group-title {
  font-weight: 800;
  font-size: .95rem;
  color: var(--gold);
  margin-bottom: .7rem;
}

.sc-popular-group-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}

.sc-popular-card {
  flex: 0 0 190px;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
}

.sc-popular-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, .5);
}

.sc-popular-face {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .08);
}

.sc-popular-name {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.sc-popular-vs {
  font-size: .68rem;
  color: var(--gold);
  font-weight: 800;
}

/* ── Solo player profile mode ─────────────────────────────── */
.sc-solo-header .sc-header-grid {
  display: block;
}

.sc-checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
}

.sc-checkbox-label input {
  width: auto;
}

/* ── Edit icon + admin affordances ────────────────────────── */
.sc-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: rgba(251, 191, 36, .1);
  color: var(--gold);
  font-size: .72rem;
  cursor: pointer;
  flex-shrink: 0;
}

.sc-edit-btn:hover {
  background: rgba(251, 191, 36, .22);
}

.sc-header-edit {
  position: absolute;
  top: 1rem;
}

.sc-header-edit.a {
  left: 1rem;
}

.sc-header-edit.b {
  right: 1rem;
}

/* ── Modals ───────────────────────────────────────────────── */
.sc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, .82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
}

.sc-modal-overlay.hidden {
  display: none;
}

.sc-modal {
  width: min(420px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(10, 14, 26, .98);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.4rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

.sc-modal-wide {
  width: min(680px, 100%);
}

.sc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.sc-modal-head h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  color: var(--gold);
}

.sc-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.sc-form {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.sc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}

.sc-form-grid .sc-full {
  grid-column: 1 / -1;
}

.sc-form label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
}

.sc-form input,
.sc-form textarea,
.sc-form select {
  padding: .6rem .7rem;
  border-radius: .6rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
  color: var(--text);
  font-family: inherit;
  font-size: .85rem;
}

.sc-form input:focus,
.sc-form textarea:focus,
.sc-form select:focus {
  outline: none;
  border-color: rgba(251, 191, 36, .5);
}

.sc-form-error {
  padding: .6rem .8rem;
  border-radius: .5rem;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #fca5a5;
  font-size: .8rem;
}

.sc-form-error.hidden {
  display: none;
}

.sc-form-section-title {
  grid-column: 1 / -1;
  font-size: .78rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border);
}

.sc-form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.sc-repeatable-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: .5rem;
  align-items: center;
}

.sc-repeatable-remove {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #fca5a5;
  border-radius: .5rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.sc-add-row-btn {
  grid-column: 1 / -1;
  background: rgba(251, 191, 36, .1);
  border: 1px dashed var(--gold-dim);
  color: var(--gold);
  padding: .5rem;
  border-radius: .5rem;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
}

/* ── Full-screen Edit Player editor ───────────────────────── */
.sc-editor-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  display: flex;
  flex-direction: column;
}

.sc-editor-overlay.hidden {
  display: none;
}

.sc-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sc-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, .85);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.sc-editor-topbar h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.15rem;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-editor-topbar-actions {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
}

.sc-editor-status {
  font-size: .78rem;
  color: #34d399;
  min-width: 90px;
}

.sc-editor-btn {
  width: auto;
  padding: .6rem 1.2rem;
  white-space: nowrap;
}

.sc-editor-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sc-editor-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: rgba(10, 14, 26, .6);
  overflow-y: auto;
  padding: .8rem;
}

.sc-editor-tab {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  text-align: left;
  padding: .7rem .8rem;
  border-radius: .6rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: .2rem;
  transition: .15s;
}

.sc-editor-tab:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.sc-editor-tab.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, .18), rgba(245, 158, 11, .12));
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: calc(.8rem - 3px);
}

.sc-editor-tab .count {
  margin-left: auto;
  font-size: .68rem;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  padding: .1rem .45rem;
  border-radius: 1rem;
}

.sc-editor-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.8rem 2.2rem 4rem;
}

.sc-editor-panel {
  display: none;
  max-width: 760px;
  margin: 0 auto;
  animation: sc-fade-in .15s ease;
}

.sc-editor-panel.active {
  display: block;
}

@keyframes sc-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sc-editor-panel-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: .4rem;
}

.sc-editor-panel-sub {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.sc-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.sc-editor-grid .sc-full {
  grid-column: 1 / -1;
}

.sc-editor-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.sc-editor-field label {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 700;
}

.sc-editor-field input,
.sc-editor-field select,
.sc-editor-field textarea {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: .7rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .7);
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
}

.sc-editor-field input:focus,
.sc-editor-field select:focus,
.sc-editor-field textarea:focus {
  outline: none;
  border-color: rgba(251, 191, 36, .5);
  background: rgba(15, 23, 42, .9);
}

.sc-editor-photo-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dim);
  background: rgba(255, 255, 255, .06);
  margin-top: .5rem;
}

.sc-editor-flag-preview {
  height: 24px;
  width: auto;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .06);
  margin-top: .5rem;
  display: block;
}

/* Repeatable rows shown as cards, not cramped grid lines */
.sc-editor-cards {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  margin-bottom: 1rem;
}

.sc-editor-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
  padding: 1rem 3rem 1rem 1rem;
  border-radius: .8rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .55);
}

.sc-editor-card-fields {
  display: grid;
  gap: .7rem;
}

.sc-editor-card-remove {
  position: absolute;
  top: .8rem;
  right: .8rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
  cursor: pointer;
  font-size: .9rem;
}

.sc-editor-card-remove:hover {
  background: rgba(239, 68, 68, .25);
}

.sc-editor-add-card {
  border: 1px dashed var(--gold-dim);
  background: rgba(251, 191, 36, .06);
  color: var(--gold);
  padding: .85rem;
  border-radius: .8rem;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 700;
  width: 100%;
}

.sc-editor-add-card:hover {
  background: rgba(251, 191, 36, .12);
}

.sc-editor-empty-hint {
  font-size: .82rem;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: .8rem;
  margin-bottom: 1rem;
}

.sc-attr-row {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sc-attr-row label {
  font-size: .85rem;
  color: var(--text);
  font-weight: 600;
}

.sc-attr-row input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

.sc-attr-row .val {
  text-align: right;
  font-weight: 800;
  color: var(--gold);
}

@media (max-width: 860px) {
  .sc-editor-sidebar {
    width: 68px;
  }

  .sc-editor-tab span.label {
    display: none;
  }

  .sc-editor-tab .count {
    display: none;
  }

  .sc-editor-tab {
    justify-content: center;
  }

  .sc-editor-grid {
    grid-template-columns: 1fr;
  }

  .sc-editor-content {
    padding: 1.2rem 1.2rem 3rem;
  }

  .sc-editor-topbar h2 {
    font-size: .95rem;
  }

  .sc-editor-btn {
    padding: .55rem .8rem;
    font-size: .8rem;
  }
}

/* ── Toast ────────────────────────────────────────────────── */
.sc-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 26, .97);
  border: 1px solid var(--gold-dim);
  color: var(--text);
  padding: .75rem 1.3rem;
  border-radius: .7rem;
  font-size: .85rem;
  font-weight: 600;
  z-index: 400;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

.sc-toast.hidden {
  display: none;
}

.sc-toast.error {
  border-color: rgba(239, 68, 68, .4);
  color: #fca5a5;
}

/* ── Responsive ───────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════
   MOBILE — designed to keep the head-to-head feeling (both
   players visible side-by-side) at every width, only shrinking
   proportionally, rather than stacking one on top of the other.
   ══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .sc-grid-3 {
    grid-template-columns: 1fr;
  }

  .sc-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .sc-root {
    padding: 1rem .8rem 2.5rem;
  }

  /* Sport tabs: horizontal scroll strip instead of wrapping to
     multiple rows, which ate a lot of vertical space on phones. */
  .sc-sport-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: .4rem;
    margin: 1rem -0.8rem 1.4rem;
    padding-left: .8rem;
    padding-right: .8rem;
    scrollbar-width: none;
  }

  .sc-sport-tabs::-webkit-scrollbar {
    display: none;
  }

  .sc-sport-tab {
    flex-shrink: 0;
  }

  /* Header: keep both players side-by-side, just more compact —
     this is the single most important visual on the page. */
  .sc-header-grid {
    grid-template-columns: 1fr auto 1fr;
    gap: .5rem;
    padding: 1rem .7rem;
    align-items: start;
  }

  .sc-header-player,
  .sc-header-player.side-b {
    flex-direction: column;
    text-align: center;
    gap: .5rem;
  }

  .sc-header-photo {
    width: 64px;
    height: 64px;
  }

  .sc-header-name {
    font-size: .95rem;
  }

  .sc-header-meta {
    font-size: .68rem;
  }

  .sc-header-agehgt {
    justify-content: center;
    gap: .6rem;
    font-size: .68rem;
  }

  .side-b .sc-header-agehgt {
    justify-content: center;
  }

  .sc-header-agehgt b {
    font-size: .78rem;
  }

  .sc-header-vs {
    font-size: 1.1rem;
    padding-top: 1.6rem;
  }

  .sc-view-profile {
    font-size: .68rem;
    padding: .25rem .5rem;
  }

  .sc-header-edit {
    top: .5rem;
  }

  .sc-header-edit.a {
    left: .5rem;
  }

  .sc-header-edit.b {
    right: .5rem;
  }

  /* Category tally + quick stats: bigger numbers, tighter grid */
  .sc-winner-chip {
    min-width: 78px;
    padding: .5rem .9rem;
  }

  .sc-winner-chip .num {
    font-size: 1.15rem;
  }

  .sc-quickstats {
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
  }

  .sc-quickstat-card {
    padding: .8rem;
  }

  .sc-quickstat-values {
    font-size: 1rem;
  }

  /* Search row: stack, but keep VS as a small horizontal divider
     rather than a big awkward gap */
  .sc-search-row {
    grid-template-columns: 1fr;
    gap: .6rem;
  }

  .sc-vs-mini {
    text-align: center;
    padding: .2rem 0;
  }

  .sc-panel {
    padding: 1rem;
  }

  .sc-detailed-table {
    font-size: .76rem;
  }

  .sc-detailed-table th,
  .sc-detailed-table td {
    padding: .5rem .3rem;
  }

  .sc-popular-card {
    flex: 0 0 165px;
  }

  /* Admin bar: stack the label above the buttons on narrow screens */
  .sc-admin-bar {
    flex-direction: column;
    gap: .6rem;
  }
}

@media (max-width: 420px) {
  .sc-header-photo {
    width: 52px;
    height: 52px;
  }

  .sc-header-name {
    font-size: .82rem;
  }

  .sc-header-vs {
    font-size: .95rem;
  }

  .sc-quickstats {
    grid-template-columns: 1fr 1fr;
  }

  .sc-quickstat-title {
    font-size: .7rem;
  }

  .sc-winner-row {
    gap: .5rem;
  }

  .sc-winner-chip {
    min-width: 68px;
    padding: .45rem .6rem;
  }

  .sc-panel-title {
    flex-wrap: wrap;
    row-gap: .4rem;
  }

  .sc-panel-title-group {
    flex-basis: 100%;
    justify-content: flex-start;
    gap: .6rem;
  }

  .sc-panel-legend {
    font-size: .68rem;
  }
}

@media (max-width: 620px) {
  .sc-form-grid {
    grid-template-columns: 1fr;
  }

  .sc-repeatable-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   LOADING SPINNER — one reusable component for every async
   fetch on the page (search, comparisons, matchups, profiles,
   saves), so nothing sits blank while data loads.
   ══════════════════════════════════════════════════════════ */
@keyframes sc-spin {
  to { transform: rotate(360deg); }
}

.sc-spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: .82rem;
}

.sc-spinner-wrap.sc-spinner-inline {
  padding: .6rem;
  justify-content: flex-start;
}

.sc-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(251, 191, 36, .2);
  border-top-color: var(--gold, #fbbf24);
  animation: sc-spin .7s linear infinite;
  flex-shrink: 0;
}

.sc-spinner.sc-spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

/* Full-panel loading state used while a comparison/profile page's
   main content is being fetched (replaces the whole section briefly
   instead of leaving it blank). */
.sc-loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 4rem 1rem;
  color: var(--muted);
  font-size: .88rem;
}

/* ══════════════════════════════════════════════════════════
   CRICKET-ONLY: format switcher, format stat tables, summary,
   verdict/score panel, grouped records, data transparency.
   ══════════════════════════════════════════════════════════ */

.sc-format-panel {
  margin-bottom: 1.5rem;
}

.sc-format-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0 1rem;
}

.sc-format-tab {
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .6);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.sc-format-tab:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}

.sc-format-tab.active {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
  color: #05070f;
}

.sc-format-panel-body {
  display: none;
}

.sc-format-panel-body.active {
  display: block;
}

.sc-format-edit-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .4rem;
}

.sc-format-table {
  margin-bottom: 1rem;
}

.sc-format-table thead th {
  background: rgba(251, 191, 36, .08);
  text-align: left;
  font-size: .78rem;
}

.sc-diff-sentence {
  color: var(--muted);
  font-size: .8rem;
  padding: .5rem .8rem;
  border-left: 2px solid var(--gold-dim);
  margin: .5rem 0;
}

/* Grouped records */
.sc-record-category {
  margin-bottom: 1rem;
}

.sc-record-category-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold-dim);
  margin-bottom: .4rem;
}

/* Quick Comparison Summary */
.sc-summary-panel {
  margin-bottom: 1rem;
}

.sc-summary-tally {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  padding: 1rem 0;
  text-align: center;
}

.sc-summary-tally-item {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .75rem;
  color: var(--muted);
}

.sc-summary-tally-item .a {
  font-size: 1.8rem;
  font-weight: 800;
  color: #60a5fa;
}

.sc-summary-tally-item .b {
  font-size: 1.8rem;
  font-weight: 800;
  color: #f87171;
}

.sc-summary-line {
  font-size: .85rem;
  padding: .3rem 0;
}

/* Verdict / Score panel */
.sc-verdict-panel {
  border: 1px solid rgba(251, 191, 36, .35);
}

.sc-verdict-headline {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  padding: .6rem 0;
}

.sc-verdict-headline .a {
  color: #60a5fa;
}

.sc-verdict-headline .b {
  color: #f87171;
}

.sc-verdict-dims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .6rem;
  margin-top: 1rem;
}

.sc-verdict-dim {
  display: flex;
  justify-content: space-between;
  padding: .6rem .8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .6);
  font-size: .8rem;
}

.sc-verdict-dim-winner {
  font-weight: 700;
  color: var(--gold-dim);
}

/* Data transparency footer */
.sc-data-transparency {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .74rem;
  border-top: 1px dashed var(--border);
}

/* ══════════════════════════════════════════════════════════
   TENNIS-ONLY: bio badge, surface mini-scoreboard, H2H modal
   section labels for the surface/context sub-forms.
   ══════════════════════════════════════════════════════════ */

.sc-bio-badge {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .25rem;
}

.sc-surface-h2h {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .8rem 0;
  margin-bottom: .6rem;
  border-bottom: 1px dashed var(--border);
}

.sc-surface-h2h .a {
  font-size: 1.5rem;
  font-weight: 800;
  color: #60a5fa;
}

.sc-surface-h2h .b {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f87171;
}

.sc-surface-h2h-lbl {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sc-form-section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold-dim);
  margin: 1.1rem 0 .5rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--border);
}
