/* =========================================================
   ¿De qué equipo eres? — hot pink flame theme
   ========================================================= */
:root {
  --bg: #0b0308;
  --bg-2: #12050d;
  --surface: #1a0a14;
  --surface-2: #221019;
  --surface-3: #2c1422;
  --line: #3a1a2c;
  --line-strong: #5a2842;

  --ink: #fff1f8;
  --ink-2: #e6b8cf;
  --ink-3: #b98aa3;

  --pink: #ff2d95;
  --pink-hot: #ff1f8f;
  --pink-soft: #ff7ab8;
  --pink-deep: #b3126b;
  --ember: #d47414;
  --gold: #ffc53d;
  --violet: #8b6cff;

  /* validated categorical slots (dark surface #1a0a14) */
  --c1: #ff2d95;
  --c2: #d47414;
  --c3: #8b6cff;

  --flame: linear-gradient(0deg, #b3126b 0%, #ff2d95 38%, #ff5f6d 62%, #ffa53d 82%, #ffe27a 100%);
  --flame-x: linear-gradient(90deg, #b3126b 0%, #ff2d95 45%, #ff6a5c 75%, #ffb347 100%);
  --glow: 0 0 24px rgba(255, 45, 149, .45), 0 0 64px rgba(255, 45, 149, .18);

  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1320px;
  --font-ui: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 45, 149, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 95, 109, .08), transparent 60%),
    radial-gradient(900px 600px at 110% 80%, rgba(212, 116, 20, .07), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--pink-soft); }
a:hover { color: var(--ink); }
img, svg, canvas { display: block; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#embers {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: .8;
}
header, main, footer { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: min(100vh, 900px);
  display: flex; flex-direction: column;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 50% 115%, rgba(255, 45, 149, .35), transparent 70%),
    radial-gradient(600px 300px at 50% 105%, rgba(255, 165, 61, .18), transparent 70%);
}
#flames {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 62%;
  pointer-events: none; z-index: 0;
}
.topnav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--maxw); width: 100%; margin: 0 auto;
  padding: 18px 24px;
}
.brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; color: var(--ink); font-size: 18px; margin: 0; }
.brand b { color: var(--pink); }
.navlinks { display: flex; gap: 4px; flex-wrap: wrap; }
.navlinks a {
  text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; border: 1px solid transparent;
}
.navlinks a:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 45, 149, .08); }

.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--maxw); width: 100%; margin: 0 auto;
  padding: 56px 24px 72px;
  flex: 1; display: flex; flex-direction: column; justify-content: center;
}
.kicker, .eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: 13px; font-weight: 600;
  color: var(--pink-soft); margin: 0 0 12px;
}
.flame-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 11.5vw, 164px);
  line-height: .9;
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0 0 28px;
  background: var(--flame);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 45, 149, .55)) drop-shadow(0 0 60px rgba(255, 45, 149, .25));
  animation: flicker 4s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(255, 45, 149, .55)) drop-shadow(0 0 60px rgba(255, 45, 149, .25)); }
  45% { filter: drop-shadow(0 0 26px rgba(255, 45, 149, .75)) drop-shadow(0 0 80px rgba(255, 95, 109, .35)); }
  55% { filter: drop-shadow(0 0 14px rgba(255, 45, 149, .45)) drop-shadow(0 0 50px rgba(255, 45, 149, .2)); }
}
.lede { font-size: clamp(17px, 1.6vw, 21px); color: var(--ink-2); max-width: 680px; margin: 0 0 32px; }
.lede em { color: var(--ink); font-style: normal; font-weight: 600; }
.lede strong { color: var(--pink-soft); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 900px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  background: transparent; color: var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn-fire {
  border: 0; color: #1a0010;
  background: linear-gradient(90deg, #ff2d95, #ff6a5c 60%, #ffb347);
  box-shadow: var(--glow);
}
.btn-fire:hover { color: #1a0010; box-shadow: 0 0 32px rgba(255, 45, 149, .7), 0 0 90px rgba(255, 95, 109, .3); }
.btn-ghost { background: rgba(255, 45, 149, .06); }
.btn-ghost:hover { background: rgba(255, 45, 149, .14); border-color: var(--pink); color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px 24px; }
.section-head { max-width: 820px; margin-bottom: 28px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(36px, 5vw, 60px); line-height: 1; margin: 0 0 14px;
  background: var(--flame); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-lede { color: var(--ink-2); margin: 0; font-size: 17px; }
.section-lede strong { color: var(--ink); }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(34, 16, 25, .92), rgba(26, 10, 20, .92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 50px -30px rgba(0, 0, 0, .8);
}
.card::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 45, 149, .7), rgba(255, 165, 61, .5), transparent);
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.card-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.005em; }
.card-sub { color: var(--ink-3); font-size: 14px; margin: 0 0 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.table-card { margin-bottom: 20px; }

/* ---------- Stat tiles ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: rgba(26, 10, 20, .8);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0;
}
.stat-label { font-size: 13px; color: var(--ink-3); margin: 0 0 6px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.stat-value small { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.stat-note { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }
.hero-stats .stat { backdrop-filter: blur(6px); background: rgba(18, 5, 13, .55); }

/* ---------- Form controls ---------- */
.filter-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.grow { flex: 1 1 260px; }
.field-label { font-size: 13px; color: var(--ink-3); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
select, input[type="search"] {
  appearance: none; -webkit-appearance: none;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 11px 40px 11px 14px; min-width: 220px; max-width: 100%; font-size: 15px;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ff7ab8' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type="search"] { padding-right: 14px; width: 100%; }
select:hover, input[type="search"]:hover { border-color: var(--pink); }
select option { background: var(--surface-2); }

.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: rgba(255, 45, 149, .05);
  border-radius: 999px; padding: 9px 14px; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--pink); background: rgba(255, 45, 149, .12); }
.chip[aria-pressed="true"] { border-color: var(--pink); background: rgba(255, 45, 149, .22); color: var(--ink); box-shadow: 0 0 16px rgba(255, 45, 149, .3); }

/* ---------- Matchmaker ---------- */
.mm-grid {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr) minmax(300px, 430px);
  gap: 20px; align-items: start;
}
.sliders { display: flex; flex-direction: column; gap: 14px; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.slider label { font-size: 14px; font-weight: 500; }
.slider label span.emo { display: inline-block; width: 1.5em; }
.slider output { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--pink-soft); min-width: 1.2em; text-align: right; }
.slider.disabled { opacity: .45; }
.slider .hint { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); margin-top: -2px; }
input[type="range"] {
  grid-column: 1 / -1; width: 100%; appearance: none; -webkit-appearance: none; background: transparent; height: 22px; margin: 0; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--pink) 0%, #ff6a5c var(--fill, 50%), var(--surface-3) var(--fill, 50%));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--pink), #ff6a5c); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; margin-top: -7px;
  background: #fff; border: 3px solid var(--pink); box-shadow: 0 0 12px rgba(255, 45, 149, .8);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--pink); box-shadow: 0 0 12px rgba(255, 45, 149, .8);
}
input[type="range"]:disabled { cursor: not-allowed; }

.result-card { min-height: 100%; }
.top-match { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.top-label { grid-column: 1 / -1; margin: 0; }
.top-name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(32px, 3.4vw, 46px); line-height: 1; margin: 0 0 6px; }
.top-meta { color: var(--ink-2); font-size: 14px; margin: 0; }
.match-hero { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.match-num { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.match-num small { font-size: 28px; }
.match-cap { color: var(--ink-3); font-size: 14px; }
.meter { position: relative; height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 8px 0 18px; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--flame-x); box-shadow: 0 0 14px rgba(255, 45, 149, .7); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.why h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 600; }
.why ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.why li { font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.why li b { font-variant-numeric: tabular-nums; }
.shout {
  border-radius: 12px; padding: 12px 14px; margin: 0 0 14px;
  background: linear-gradient(90deg, rgba(255, 45, 149, .16), rgba(255, 165, 61, .08));
  border: 1px solid rgba(255, 45, 149, .35); font-size: 15px;
}
.shout b { font-size: 17px; color: var(--ink); }
.runners-title { margin-top: 8px; }
.runners { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.runner {
  display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) auto 56px 44px; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; background: none; text-align: left; width: 100%;
}
.runner:hover, .runner:focus-visible { background: rgba(255, 45, 149, .08); border-color: var(--line-strong); }
.runner .rank { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 14px; }
.runner .rname { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runner .rname small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.runner .rbar { height: 6px; border-radius: 99px; background: var(--surface-3); position: relative; overflow: hidden; }
.runner .rbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--flame-x); }
.runner .rpct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.flag-chip {
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(255, 138, 138, .45); color: #ffb3b3; background: rgba(255, 90, 90, .08);
}
.flag-chip.none { border-color: var(--line-strong); color: var(--ink-3); background: none; }
.why .flags h4 { color: #ff9f9f; }
.how { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: rgba(18, 5, 13, .45); }
.how summary { cursor: pointer; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--pink-soft); }
.how summary:hover { color: var(--ink); }
.how p { font-size: 13px; color: var(--ink-2); margin: 0 0 12px; }
.how p b { color: var(--ink); }
.breakdown { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.bd-row { display: grid; grid-template-columns: minmax(104px, 1.4fr) 34px minmax(36px, 1fr) minmax(64px, auto); gap: 10px; align-items: center; font-size: 13px; }
.bd-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-wt { color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.bd-bar { height: 6px; border-radius: 99px; background: var(--surface-3); position: relative; overflow: hidden; }
.bd-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.bd-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.how .bd-note { font-size: 12px; color: var(--ink-3); }
.club-card .cc-flag { margin: -4px 0 0; font-size: 13px; color: #ffb3b3; }
.flag-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.flag-list li { display: flex; gap: 8px; }

/* club badge (no crests, just colours + code) */
.badge {
  --a: #ff2d95; --b: #ffffff;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(from 200deg, var(--a) 0 50%, var(--b) 50% 100%);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px rgba(255, 255, 255, .15);
  position: relative; flex: none;
}
.badge::after {
  content: attr(data-code);
  position: absolute; inset: 22%; border-radius: 50%;
  background: #12050d; color: #fff;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700; letter-spacing: .02em;
}
.badge.lg { width: 96px; height: 96px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgba(255, 255, 255, .2), 0 0 40px rgba(255, 45, 149, .45); }
.badge.lg::after { font-size: 20px; }
.badge.md { width: 52px; height: 52px; }
.badge.md::after { font-size: 12px; }

/* ---------- Map ---------- */
.map { position: relative; width: 100%; }
.map svg { width: 100%; height: auto; overflow: visible; }
.map .land-esp { fill: #2a0f1f; stroke: #7a2350; stroke-width: 1; }
.map .land-other { fill: #170810; stroke: #3a1a2c; stroke-width: .8; }
.map .city-ring { fill: rgba(255, 197, 61, .06); stroke: rgba(255, 197, 61, .55); stroke-width: 1; }
.map .city-pin { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.map .city-label { fill: var(--gold); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.map .leader { stroke: rgba(255, 241, 248, .35); stroke-width: 1; }
.map .dot { stroke: var(--surface); stroke-width: 2; cursor: pointer; transition: r .15s; }
.map .dot-hit { fill: transparent; cursor: pointer; }
.map .dot-label { fill: var(--ink); font-size: 11px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.map .dot.is-top { stroke: #fff; stroke-width: 2.5; }

.legend-ramp { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.legend-ramp .ramp { flex: 1; height: 8px; border-radius: 99px; max-width: 220px; }
.legend-ramp--wide { justify-content: flex-end; }

/* ---------- Charts ---------- */
.chart { width: 100%; position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.axis text, .tick text { fill: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.grid line, .gridline { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.axis-title { fill: var(--ink-3); font-size: 12px; }
.bar-label { fill: var(--ink-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-label { fill: var(--ink); font-size: 13px; font-weight: 500; }
.cat-label.dim { fill: var(--ink-3); }
.hit { fill: transparent; cursor: pointer; }
.row-hover { fill: rgba(255, 45, 149, .07); opacity: 0; transition: opacity .12s; }
g.row:hover .row-hover, g.row:focus .row-hover, g.row.active .row-hover { opacity: 1; }
g.row { outline: none; }
.quad-label { fill: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pt { stroke: var(--surface); stroke-width: 2; }
.pt-label { fill: var(--ink-2); font-size: 11px; font-weight: 600; pointer-events: none; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-2); margin: 4px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c1); flex: none; }
.key-1 { background: var(--c1); } .key-2 { background: var(--c2); } .key-3 { background: var(--c3); }
.key.line { height: 3px; width: 16px; border-radius: 2px; }
.key-hollow { background: transparent; border: 2px solid var(--ink-3); border-radius: 50%; }
.callout {
  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 14px 18px;
  border-radius: 14px; border: 1px solid rgba(255, 197, 61, .35);
  background: linear-gradient(90deg, rgba(255, 197, 61, .08), rgba(255, 45, 149, .05));
  color: var(--ink-2); font-size: 15px;
}
.callout > span:first-child { font-size: 22px; line-height: 1.2; }
.callout strong { color: var(--gold); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; flex-wrap: wrap; }
.seg button {
  border: 0; background: none; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer;
}
.seg button[aria-selected="true"] { background: linear-gradient(90deg, var(--pink), #ff6a5c); color: #1a0010; }
.seg button:hover:not([aria-selected="true"]) { color: var(--ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600;
  position: sticky; top: 0; background: var(--surface); cursor: pointer; user-select: none;
}
.data-table th[data-sort]:hover { color: var(--ink); }
.data-table th.sorted { color: var(--pink-soft); }
.data-table th.sorted::after { content: " ▾"; }
.data-table th.sorted.asc::after { content: " ▴"; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.wrap { white-space: normal; min-width: 240px; font-size: 13px; line-height: 1.45; }
.data-table tbody tr { cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover { background: rgba(255, 45, 149, .06); }
.club-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.club-cell .badge { width: 26px; height: 26px; }
.club-cell .badge::after { font-size: 7px; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2);
}
.tag.ucl { border-color: rgba(139, 108, 255, .7); color: #cfc3ff; }
.tag.uel { border-color: rgba(212, 116, 20, .8); color: #ffc58a; }
.tag.uecl { border-color: rgba(255, 45, 149, .6); color: var(--pink-soft); }
.tag.promo { border-color: rgba(255, 197, 61, .7); color: var(--gold); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status i { font-style: normal; }
.status.open { color: #7de2a8; }
.status.limited { color: var(--gold); }
.status.closed { color: #ff8a8a; }
.conf { font-size: 12px; color: var(--ink-3); }

/* ---------- Heatmap ---------- */
.heatmap { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 14px; }
.heatmap th { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 6px 4px; cursor: pointer; user-select: none; text-align: center; vertical-align: bottom; }
.heatmap th .emo { display: block; font-size: 20px; margin-bottom: 2px; }
.heatmap th:hover, .heatmap th.sorted { color: var(--pink-soft); }
.heatmap th.club-h { text-align: left; }
.heatmap td { text-align: center; padding: 0; height: 38px; min-width: 52px; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.heatmap td.club-td { text-align: left; background: none; padding-right: 12px; min-width: 190px; font-weight: 600; }
.heatmap tr:hover td:not(.club-td) { filter: brightness(1.15); }
.heatmap tr:hover td.club-td { color: var(--pink-soft); }

/* ---------- Radar / random ---------- */
.compare-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.compare-pickers select { min-width: 0; width: 100%; }
.radar svg { max-width: 560px; margin: 0 auto; }
.radar .spoke { stroke: var(--line); }
.radar .ring { fill: none; stroke: var(--line); }
.radar .axis-lbl { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.random-card { display: flex; flex-direction: column; }
.random-out { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 260px; margin: 8px 0 18px; }
.quirk { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; animation: pop .45s cubic-bezier(.2, .9, .3, 1.3); }
.quirk .q-club { font-weight: 700; margin: 0 0 6px; color: var(--pink-soft); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.quirk .q-text { font-size: 20px; line-height: 1.4; margin: 0; }
.quirk .q-cat { display: inline-block; margin-top: 10px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Club grid ---------- */
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.club-card {
  text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.club-card:hover, .club-card:focus-visible { transform: translateY(-3px); border-color: rgba(255, 45, 149, .6); box-shadow: 0 0 30px rgba(255, 45, 149, .22), 0 20px 50px -30px #000; }
.club-card .cc-head { display: flex; gap: 14px; align-items: center; }
.club-card h3 { margin: 0; font-size: 19px; line-height: 1.2; }
.club-card .cc-city { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.club-card .cc-tag { margin: 0; color: var(--ink-2); font-size: 14px; flex: 1; }
.club-card .cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.club-card .cc-stats div { font-size: 12px; color: var(--ink-3); }
.club-card .cc-stats b { display: block; font-size: 17px; color: var(--ink); font-weight: 700; }
.club-card .cc-name { flex: 1; min-width: 0; }
.club-card .cc-match {
  align-self: flex-start; flex: none; font-size: 13px; font-weight: 700; color: var(--pink-soft);
  border: 1px solid rgba(255, 45, 149, .4); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}

/* ---------- Modal ---------- */
.modal {
  width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  padding: 0; border: 1px solid var(--line-strong); border-radius: 22px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 0 80px rgba(255, 45, 149, .25), 0 40px 120px rgba(0, 0, 0, .8);
}
.modal::backdrop { background: rgba(8, 2, 6, .78); backdrop-filter: blur(4px); }
.modal-body { padding: 0 0 26px; }
.modal-hero {
  position: relative; padding: 28px 28px 24px; display: flex; gap: 22px; align-items: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(600px 200px at 0% 0%, var(--club-a, rgba(255, 45, 149, .3)), transparent 70%), linear-gradient(180deg, rgba(255, 45, 149, .08), transparent);
}
.modal-hero h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 5vw, 54px); line-height: 1; margin: 0 0 6px; }
.modal-hero p { margin: 0; color: var(--ink-2); }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; font-size: 20px; line-height: 1;
}
.modal-close:hover { border-color: var(--pink); }
.modal-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; padding: 22px 28px 0; }
.modal h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--pink-soft); margin: 0 0 10px; font-weight: 600; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 18px; }
.facts dt { font-size: 12px; color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 600; font-size: 15px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.mini-stats .stat { padding: 12px; }
.mini-stats .stat-value { font-size: 22px; }
.pick-avoid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.pick-avoid div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.pick-avoid b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 14px; }
.quirk-list { margin: 0 0 18px; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.quirk-list li { margin-bottom: 6px; }
.tip { border-left: 3px solid var(--gold); padding: 8px 14px; background: rgba(255, 197, 61, .06); border-radius: 0 10px 10px 0; font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }
.tip b { color: var(--gold); }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: rgba(18, 5, 13, .96); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 10px 12px; font-size: 13px; min-width: 150px; max-width: 280px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6), 0 0 20px rgba(255, 45, 149, .15);
}
.tooltip .tt-title { font-weight: 700; margin: 0 0 6px; font-size: 14px; }
.tooltip .tt-row { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; }
.tooltip .tt-row + .tt-row { margin-top: 3px; }
.tooltip .tt-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.tooltip .tt-lbl { color: var(--ink-3); }
.tooltip .tt-key { height: 3px; width: 14px; border-radius: 2px; background: var(--c1); }
.tooltip .tt-note { color: var(--ink-2); margin: 6px 0 0; font-size: 12px; }

/* ---------- Spin overlay ---------- */
.spin-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(8, 2, 6, .82); backdrop-filter: blur(5px); padding: 16px; }
.spin-overlay[hidden] { display: none; }
.spin-box { text-align: center; max-width: 520px; width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 24px; padding: 28px 24px; box-shadow: 0 0 80px rgba(255, 45, 149, .35); }
.spin-reel { display: grid; place-items: center; height: 120px; }
.spin-reel .badge.lg { transition: transform .1s; }
.spin-result h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 40px; line-height: 1; margin: 8px 0; background: var(--flame); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spin-result p { color: var(--ink-2); margin: 0 0 6px; }
.spin-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 72px; background: linear-gradient(180deg, transparent, rgba(255, 45, 149, .06)); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 56px; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; font-size: 14px; }
.footer-notes p { margin: 0 0 10px; color: var(--ink-2); }
.footer-notes strong { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .mm-grid { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .map-card { grid-column: 1 / -1; }
  .map-card .map { max-width: 640px; margin: 0 auto; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .kpi-row, .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .mm-grid { grid-template-columns: minmax(0, 1fr); }
  .navlinks { display: none; }
  .section { padding: 64px 16px 16px; }
  .hero-inner { padding: 32px 16px 56px; }
  .topnav { padding: 14px 16px; }
  .card { padding: 18px 16px; }
  .why { grid-template-columns: minmax(0, 1fr); }
  .pick-avoid, .facts { grid-template-columns: minmax(0, 1fr); }
  .modal-hero { padding: 24px 18px 20px; flex-direction: column; align-items: flex-start; }
  .modal-grid { padding: 18px 18px 0; }
  .match-num { font-size: 52px; }
  .runner { grid-template-columns: 20px 30px minmax(0, 1fr) auto 40px; }
  .runner .rbar { display: none; }
  select { min-width: 0; width: 100%; }
  .filter-row .field { flex: 1 1 100%; }
  .compare-pickers { grid-template-columns: minmax(0, 1fr); }
  .result-card { order: -1; }
  .bd-row { grid-template-columns: minmax(118px, 1.6fr) 30px minmax(28px, 1fr) auto; gap: 8px; font-size: 12.5px; }
  .hide-sm { display: none; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 340px) {
  .kpi-row, .hero-stats { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flame-text { animation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .flame-text, .section-head h2, .spin-result h3 { background: none; color: CanvasText; filter: none; }
}
