/* ==========================================================================
   Barça Hub — styles
   Palette: blaugrana — blau (#004d98) + grana (#a50044) with crest gold (#edbb00)
   on a deep midnight-plum ground.
   ========================================================================== */
:root {
  --blau: #004d98;
  --blau-700: #003d7a;
  --grana: #a50044;
  --grana-700: #7d0034;
  --gold: #edbb00;
  --gold-600: #cfa300;
  --bg: #120a1a;
  --bg-900: #0c0612;
  --surface: #1c1126;
  --surface-2: #261833;
  --surface-3: #332243;
  --border: #3a2a4a;
  --text: #f1ecf4;
  --text-2: #c4b8cc;
  --muted: #8f829a;
  --win: #4ade80;
  --loss: #f87171;
  --draw: #fbbf24;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #60a5fa;
  --opp: #9a8fa6;           /* neutral for opponent series in comparisons */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --font-head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: .01em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 4vw, 44px); text-transform: uppercase; }
h2 { font-size: clamp(20px, 2.6vw, 26px); text-transform: uppercase; }
h3 { font-size: 18px; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- Top bar & nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(90deg, var(--blau) 0%, var(--blau-700) 45%, var(--grana-700) 100%);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-head); font-size: 24px; text-transform: uppercase; letter-spacing: .04em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--gold); font-weight: 700; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: #e6dcec; padding: 8px 10px; border-radius: 8px;
  font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .03em;
  font-family: var(--font-head);
}
.nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.nav a.active { background: var(--gold); color: var(--bg-900); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: #fff; margin: 4px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; margin: 0; }
  .nav.open { display: flex; }
  .topbar { flex-wrap: wrap; }
}

/* ---------- Live bar ---------- */
.live-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; background: #3b0f1f; border-bottom: 1px solid #7f1d3a; color: #fff; font-weight: 600;
}
.live-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s infinite; }
.live-bar img { width: 24px; height: 24px; }
.live-bar .score { font-family: var(--font-head); font-size: 20px; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ---------- Layout ---------- */
.app { max-width: 1200px; margin: 0 auto; padding: 24px 20px 48px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 5px; height: 22px; background: linear-gradient(180deg, var(--blau) 50%, var(--grana) 50%); border-radius: 2px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: 8px; }
.footer { max-width: 1200px; margin: 0 auto; padding: 24px 20px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.footer-meta { margin-top: 6px; }

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 24px; border-radius: var(--radius);
  background: radial-gradient(1200px 300px at 0% 0%, rgba(237,187,0,.12), transparent 60%), linear-gradient(135deg, var(--blau) 0%, var(--surface) 70%);
  border: 1px solid var(--border);
}
.hero img { width: 96px; height: 96px; }
.hero .eyebrow { color: var(--gold); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.hero .record { font-family: var(--font-head); font-size: 20px; color: var(--text-2); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.hero .record b { color: #fff; font-size: 26px; }
.hero-right { margin-left: auto; text-align: right; color: var(--text-2); font-size: 14px; }
@media (max-width: 700px) { .hero-right { margin-left: 0; text-align: left; } }

/* ---------- Stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.tile .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tile .value { font-family: var(--font-head); font-size: 30px; font-weight: 600; margin-top: 2px; line-height: 1.1; }
.tile .sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.tile .rank { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); margin-left: 6px; vertical-align: middle; font-family: var(--font-body); }
.tile .rank.top { background: rgba(237,187,0,.18); color: var(--gold); }

/* ---------- Match cards ---------- */
.game-card { display: flex; flex-direction: column; gap: 12px; }
.game-card .kicker { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; gap: 8px; }
.matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.matchup .team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.matchup .team img { width: 64px; height: 64px; }
.matchup .team .name { font-family: var(--font-head); font-size: 18px; text-transform: uppercase; }
.matchup .team .rec { color: var(--muted); font-size: 12px; }
.matchup .vs { font-family: var(--font-head); font-size: 34px; color: var(--text-2); text-align: center; }
.matchup .vs .score { color: #fff; font-size: 40px; }
.matchup .vs small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.countdown { display: flex; gap: 10px; justify-content: center; }
.countdown div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; min-width: 64px; text-align: center; }
.countdown b { display: block; font-family: var(--font-head); font-size: 26px; color: var(--gold); }
.countdown span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.game-meta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; color: var(--text-2); font-size: 13px; }
.game-meta span { display: inline-flex; align-items: center; gap: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px;
  background: var(--gold); color: var(--bg-900); font-weight: 700; border: 0; text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-head); font-size: 14px;
}
.btn:hover { background: var(--gold-600); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 10px; font-size: 13px; }

/* ---------- Fixture list ---------- */
.sched { display: flex; flex-direction: column; gap: 8px; }
.sched-row {
  display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px;
  color: inherit; transition: background .15s, border-color .15s;
}
.sched-row:hover { background: var(--surface-2); border-color: var(--surface-3); text-decoration: none; }
.sched-row .week { font-family: var(--font-head); color: var(--muted); font-size: 12px; text-transform: uppercase; line-height: 1.2; }
.sched-row .week b { display: block; font-size: 15px; color: var(--text); letter-spacing: .02em; }
.sched-row .week .comp-pill { display: inline-block; margin-top: 4px; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-family: var(--font-body); font-weight: 600; letter-spacing: .04em; }
.sched-row .week .comp-pill.ucl { background: rgba(96,165,250,.18); color: #93c5fd; }
.sched-row .week .comp-pill.copa { background: rgba(237,187,0,.16); color: var(--gold); }
.sched-row .opp { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sched-row .opp img { width: 40px; height: 40px; flex: none; }
.sched-row .opp > div { min-width: 0; flex: 1; }
.sched-row .name-short { display: none; }
@media (max-width: 600px) { .sched-row .name-full { display: none; } .sched-row .name-short { display: inline; } }
.sched-row .opp .n { font-family: var(--font-head); font-size: 18px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-row .opp .n small { color: var(--muted); font-size: 13px; margin-right: 6px; }
.sched-row .opp .d { color: var(--text-2); font-size: 13px; }
.sched-row .res { text-align: right; min-width: 110px; }
.sched-row .res .s { font-family: var(--font-head); font-size: 22px; }
.sched-row .res .t { color: var(--muted); font-size: 12px; }
.sched-row.live { border-color: #7f1d3a; box-shadow: inset 4px 0 0 var(--danger); }
.res-w { color: var(--win); } .res-l { color: var(--loss); } .res-d { color: var(--draw); }
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.pip { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11px; font-weight: 700; font-style: normal; color: #0c0612; }
.pip.w { background: var(--win); } .pip.l { background: var(--loss); } .pip.d { background: var(--draw); }
@media (max-width: 600px) {
  .sched-row { grid-template-columns: 62px 1fr auto; padding: 10px 12px; gap: 10px; }
  .sched-row .opp img { width: 32px; height: 32px; }
  .sched-row .opp .n { font-size: 16px; }
  .sched-row .opp .d { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sched-row .res { min-width: 78px; }
  .sched-row .res .s { font-size: 18px; }
}
.month-head { margin: 14px 0 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-head); }
.month-head:first-child { margin-top: 0; }

/* ---------- Controls ---------- */
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.controls select, .controls input {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 38px;
}
.controls input { min-width: 220px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.chip:hover { background: var(--surface-3); }
.chip.active { background: var(--gold); color: var(--bg-900); border-color: var(--gold); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tab { background: none; border: 0; color: var(--text-2); padding: 10px 14px; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab.active { color: #fff; border-bottom-color: var(--gold); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.hl td { background: rgba(237,187,0,.08); }
.tbl tr.hl td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.tbl tr.clickable { cursor: pointer; }
.tbl .team-cell { display: flex; align-items: center; gap: 8px; }
.tbl .team-cell img { width: 24px; height: 24px; }
.tbl td.zone { padding-left: 14px; position: relative; }
.tbl td.zone::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: var(--zone, transparent); }
.player-cell { display: flex; align-items: center; gap: 10px; }
.player-cell .nm { font-weight: 600; }
.player-cell .sub { font-size: 12px; color: var(--muted); }
.kit { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--sz, 36px); height: var(--sz, 36px); border-radius: 50%; background: linear-gradient(135deg, var(--blau) 0%, var(--grana) 100%); color: #fff; font-family: var(--font-head); flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); }
.kit b { font-size: calc(var(--sz, 36px) * .42); font-weight: 600; line-height: 1; }
.kit .flag { position: absolute; right: -3px; bottom: -3px; width: calc(var(--sz, 36px) * .42); height: calc(var(--sz, 36px) * .42); border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-3); }
.flag-inline { display: inline-block; width: 18px; height: 18px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; }
.zone-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); padding: 10px 16px; border-top: 1px solid var(--border); }
.zone-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--zone); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.badge.out, .badge.ir { background: rgba(239,68,68,.18); color: #fca5a5; }
.badge.doubtful { background: rgba(249,115,22,.18); color: #fdba74; }
.badge.questionable { background: rgba(245,158,11,.18); color: #fcd34d; }
.badge.probable, .badge.active { background: rgba(74,222,128,.15); color: #86efac; }
.badge.neutral { background: var(--surface-3); color: var(--text-2); }
.badge.live { background: var(--danger); color: #fff; }
.badge.final { background: var(--surface-3); color: var(--text-2); }
.badge.gold { background: rgba(237,187,0,.18); color: var(--gold); }
.badge.blau { background: rgba(0,77,152,.35); color: #93c5fd; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: inherit; }
.news-card:hover { text-decoration: none; border-color: var(--surface-3); }
.news-card .img { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; position: relative; }
.news-card .img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .img.noimg { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(90deg, var(--blau-700) 0 18%, var(--grana-700) 18% 36%); }
.news-card .img.noimg::before { content: "FCB"; font-family: var(--font-head); font-size: 44px; color: rgba(237,187,0,.35); font-weight: 700; letter-spacing: .1em; }
.news-card .play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 2px solid rgba(255,255,255,.7); }
.news-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.news-card .type { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-weight: 700; }
.news-card .type .src { display: inline-flex; align-items: center; gap: 6px; }
.news-card .type .src img { width: 14px; height: 14px; border-radius: 3px; }
.news-card h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.3; }
.news-card p { margin: 0; color: var(--text-2); font-size: 13px; }
.news-card .meta { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: 12px; }
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item { display: flex; gap: 12px; color: inherit; padding: 10px; border-radius: var(--radius-sm); }
.news-item:hover { background: var(--surface-2); text-decoration: none; }
.news-item img { width: 88px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-2); }
.news-item .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.news-item .m { color: var(--muted); font-size: 12px; margin-top: 3px; }
.src-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.src-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.src-list li img { width: 16px; height: 16px; border-radius: 3px; }
.src-list li .small { margin-left: auto; }

/* ---------- Match center ---------- */
.game-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 24px; }
.game-head .team { display: flex; align-items: center; gap: 14px; }
.game-head .team.away { flex-direction: row-reverse; text-align: right; }
.game-head .team img { width: 72px; height: 72px; }
.game-head .team .name { font-family: var(--font-head); font-size: 24px; text-transform: uppercase; line-height: 1.1; }
.game-head .team .rec { color: var(--muted); font-size: 13px; }
.game-head .score { font-family: var(--font-head); font-size: 56px; font-weight: 700; line-height: 1; }
.game-head .score.loser { color: var(--muted); }
.game-head .status { text-align: center; }
.game-head .status .st { font-family: var(--font-head); font-size: 18px; text-transform: uppercase; color: var(--gold); }
.game-head .status .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.game-head .scorers { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-top: 4px; }
@media (max-width: 700px) {
  .game-head { grid-template-columns: 1fr; }
  .game-head .team, .game-head .team.away { flex-direction: row; text-align: left; justify-content: space-between; }
  .game-head .score { font-size: 40px; }
}
.timeline { display: flex; flex-direction: column; }
.tl-ev { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.tl-ev:last-child { border-bottom: 0; }
.tl-ev .min { text-align: center; font-family: var(--font-head); color: var(--muted); font-size: 14px; }
.tl-ev .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-ev .side.r { justify-content: flex-end; text-align: right; }
.tl-ev .side .who { font-weight: 600; }
.tl-ev .side .what { color: var(--muted); font-size: 12px; display: block; }
.tl-ev .ico { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.tl-ev .ico.goal { background: rgba(74,222,128,.2); color: #86efac; }
.tl-ev .ico.yellow { background: #fbbf24; width: 14px; height: 18px; border-radius: 2px; }
.tl-ev .ico.red { background: #ef4444; width: 14px; height: 18px; border-radius: 2px; }
.tl-ev .ico.sub { background: var(--surface-3); color: var(--text-2); }
.tl-ev .ico.var { background: rgba(96,165,250,.2); color: #93c5fd; font-size: 9px; font-weight: 700; }
.tl-ev.milestone { grid-template-columns: 1fr; text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 6px 0; }
.tl-ev .sc { font-family: var(--font-head); color: var(--text); font-size: 13px; margin-left: 6px; }
.lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .lineups { grid-template-columns: 1fr; } }
.lineup h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.lineup h4 img { width: 22px; height: 22px; }
.lineup h4 .fm { margin-left: auto; color: var(--muted); font-size: 12px; font-family: var(--font-body); font-weight: 500; }
.lineup ul { list-style: none; margin: 0; padding: 0; }
.lineup li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.lineup li:last-child { border-bottom: 0; }
.lineup li .no { width: 26px; text-align: right; color: var(--muted); font-family: var(--font-head); font-size: 14px; }
.lineup li .pos { color: var(--muted); font-size: 11px; width: 38px; white-space: nowrap; }
.lineup li .ev { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); }
.lineup li .ev i { display: inline-block; font-style: normal; }
.lineup li .ev .card-y { width: 9px; height: 12px; background: #fbbf24; border-radius: 1px; }
.lineup li .ev .card-r { width: 9px; height: 12px; background: #ef4444; border-radius: 1px; }
.lineup .bench-head { margin: 12px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pitch { position: relative; aspect-ratio: 68/105; max-height: 520px; margin: 0 auto 12px; width: 100%; max-width: 340px; border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(180deg, #1f6b3a 0 12.5%, #1b5f34 12.5% 25%); border: 2px solid rgba(255,255,255,.25); }
.pitch::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent calc(50% - 1px), rgba(255,255,255,.35) calc(50% - 1px), rgba(255,255,255,.35) calc(50% + 1px), transparent calc(50% + 1px)); }
.pitch::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1.5px solid rgba(255,255,255,.35); border-radius: 50%; }
.pitch .box { position: absolute; left: 20%; right: 20%; height: 16%; border: 1.5px solid rgba(255,255,255,.35); }
.pitch .box.top { top: -2px; border-top: 0; } .pitch .box.bot { bottom: -2px; border-bottom: 0; }
.pitch .dot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 1; }
.pitch .dot .kit { --sz: 30px; box-shadow: 0 2px 6px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.25); }
.pitch .dot.opp .kit { background: #f3f4f6; color: #111; }
.pitch .dot span { font-size: 10px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); white-space: nowrap; max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
.commentary { max-height: 480px; overflow: auto; }
.cm { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cm:last-child { border-bottom: 0; }
.cm .min { font-family: var(--font-head); color: var(--muted); }
.cm.goal { background: rgba(74,222,128,.08); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; }

/* Paired comparison bars (Barça vs opponent) */
.cmp { display: flex; flex-direction: column; gap: 12px; }
.cmp-row .lbl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.cmp-row .lbl .k { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.cmp-row .bars { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; height: 10px; }
.cmp-row .bar { position: relative; height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cmp-row .bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.cmp-row .bar.l i { right: 0; background: var(--opp); }
.cmp-row .bar.r i { left: 0; background: var(--gold); }
.cmp-row .bar.l.bar-us i { background: var(--gold); }
.cmp-row .bar.r.opp i { background: var(--opp); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--sw); }

/* ---------- Leaders ---------- */
.leader-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.leader-card .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.leader { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.leader:last-child { border-bottom: 0; }
.leader .nm { font-weight: 600; font-size: 14px; }
.leader .pos { color: var(--muted); font-size: 12px; }
.leader .val { margin-left: auto; font-family: var(--font-head); font-size: 22px; }
.leader.first .val { font-size: 28px; color: var(--gold); }

/* ---------- Standings ---------- */
.standings-group { margin-bottom: 20px; }
.standings-group h3 { padding: 12px 16px 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }

/* ---------- Player modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.modal-panel { position: relative; width: min(760px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-3); color: #fff; font-size: 22px; line-height: 1; z-index: 1; }
.modal-body { padding: 22px; }
.player-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.player-head .kit { --sz: 110px; border: 3px solid var(--gold); }
.player-head .kit b { font-size: 44px; }
.player-head h2 { font-size: 30px; }
.player-head .bio { color: var(--text-2); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.kv div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.kv .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kv .v { font-weight: 600; margin-top: 2px; }

/* ---------- Skeleton / empty / error ---------- */
.skeleton { display: flex; flex-direction: column; gap: 12px; }
.skeleton .sk { height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton .sk.lg { height: 120px; }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.error { padding: 16px; border-radius: var(--radius); background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fecaca; }
.note { padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(237,187,0,.08); border: 1px solid rgba(237,187,0,.25); color: var(--text-2); font-size: 14px; }
details.collapsible { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
details.collapsible summary { cursor: pointer; padding: 12px 16px; font-family: var(--font-head); font-size: 16px; text-transform: uppercase; letter-spacing: .03em; list-style: none; display: flex; justify-content: space-between; }
details.collapsible summary::after { content: "+"; color: var(--gold); }
details.collapsible[open] summary::after { content: "–"; }
details.collapsible .table-wrap { padding: 0 8px 8px; }

/* ---------- Page banners (photo + gradient) ---------- */
.banner {
  position: relative; display: flex; align-items: flex-end; min-height: 200px; padding: 24px; margin-bottom: 20px;
  border-radius: var(--radius); overflow: hidden; background-size: cover; background-position: center; border: 1px solid var(--border);
}
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,10,26,.15) 0%, rgba(18,10,26,.55) 55%, rgba(18,10,26,.95) 100%); }
.banner > * { position: relative; }
.banner .eyebrow { color: var(--gold); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.banner p { margin: 6px 0 0; }
.hero.hero { background-size: cover; background-position: center; }
@media (max-width: 600px) { .banner { min-height: 150px; padding: 16px; } }

/* ---------- Podcasts ---------- */
.pod-card { display: flex; flex-direction: column; gap: 12px; }
.pod-head { display: flex; gap: 14px; align-items: flex-start; }
.pod-head img { width: 96px; height: 96px; border-radius: 10px; flex: none; background: var(--surface-2); }
.pod-head h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.25; margin: 0 0 2px; }
.pod-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pod-desc { margin: 0; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pod-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.eps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ep { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ep:last-child { border-bottom: 0; }
.ep .play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--gold); color: var(--bg-900); font-size: 13px; flex: none; display: flex; align-items: center; justify-content: center; padding: 0 0 0 2px; }
.ep .play:hover { background: var(--gold-600); }
.ep .play.muted { background: var(--surface-3); color: var(--muted); }
.ep .ep-art { width: 40px; height: 40px; border-radius: 6px; flex: none; }
.ep .ep-body { min-width: 0; }
.ep .ep-t { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ep .ep-t a { color: inherit; }
.pod-list .pod-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.pod-list .pod-row:last-child { border-bottom: 0; }
.pod-row img { width: 56px; height: 56px; border-radius: 8px; background: var(--surface-2); }
.pod-row-t { font-weight: 600; font-size: 15px; }
.pod-row-actions { display: flex; gap: 6px; }
.pod-row-eps, .pod-more { grid-column: 1 / -1; padding-top: 6px; }
@media (max-width: 600px) { .pod-list .pod-row { grid-template-columns: 48px 1fr; } .pod-row-actions { grid-column: 1 / -1; } }
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--blau-700); border-top: 2px solid var(--gold); box-shadow: 0 -6px 20px rgba(0,0,0,.4);
}
.player img { width: 44px; height: 44px; border-radius: 6px; }
.player .pmeta { min-width: 0; flex: 1; }
.player .pt { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player audio { width: min(420px, 45vw); height: 36px; }
.player .pclose { background: none; border: 0; color: #fff; font-size: 22px; }
body.has-player { padding-bottom: 76px; }
@media (max-width: 600px) { .player { flex-wrap: wrap; } .player audio { width: 100%; order: 3; } body.has-player { padding-bottom: 120px; } }
.controls label.chip { display: inline-flex; align-items: center; cursor: pointer; }

/* ---------- Club records ---------- */
.rec-card { padding: 14px 16px; }
.rec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rec-head h3 { font-family: var(--font-head); font-size: 17px; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.rec-list { list-style: none; margin: 0; padding: 0; }
.rec-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.rec-row:last-child { border-bottom: 0; }
.rec-row:first-child .rec-val { color: var(--gold); font-size: 22px; }
.rec-row:first-child .rec-name { font-weight: 700; }
.rec-row.hit { background: rgba(237,187,0,.1); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; }
.rec-rank { font-family: var(--font-head); color: var(--muted); text-align: right; }
.rec-name { font-size: 14px; min-width: 0; }
.rec-name .badge { margin-left: 4px; vertical-align: middle; }
.rec-years { display: block; color: var(--muted); font-size: 12px; }
.rec-val { font-family: var(--font-head); font-size: 18px; font-variant-numeric: tabular-nums; }
.honours { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.honour { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.honour .n { font-family: var(--font-head); font-size: 34px; color: var(--gold); line-height: 1; min-width: 44px; text-align: center; }
.honour .t { font-weight: 600; font-size: 14px; line-height: 1.25; }
.honour .s { color: var(--muted); font-size: 12px; }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; align-items: baseline; }
.fact-list li:last-child { border-bottom: 0; }
.fact-list li .k { color: var(--text-2); }
.fact-list li .v { font-family: var(--font-head); font-size: 17px; text-align: right; }
.fact-list li .v small { display: block; color: var(--muted); font-family: var(--font-body); font-size: 12px; }

/* ---------- Social ---------- */
.bsky-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.bsky-post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.bsky-via { color: var(--muted); font-size: 12px; }
.bsky-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.bsky-head img { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); }
.bsky-who { min-width: 0; font-size: 14px; line-height: 1.25; }
.bsky-who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bsky-who .muted { font-size: 12px; }
.bsky-time { white-space: nowrap; }
.bsky-text { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.bsky-imgs { display: grid; gap: 4px; border-radius: 10px; overflow: hidden; }
.bsky-imgs.n2, .bsky-imgs.n3, .bsky-imgs.n4 { grid-template-columns: 1fr 1fr; }
.bsky-imgs img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.bsky-imgs.n1 img { aspect-ratio: auto; max-height: 420px; }
.bsky-video { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.bsky-video img { width: 100%; max-height: 420px; object-fit: cover; }
.bsky-link { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; color: inherit; background: var(--surface-2); }
.bsky-link:hover { text-decoration: none; border-color: var(--surface-3); }
.bsky-link img { width: 96px; height: 96px; object-fit: cover; }
.bsky-link > div { padding: 8px 10px 8px 0; min-width: 0; }
.bsky-link:not(:has(img)) > div { padding-left: 10px; grid-column: 1 / -1; }
.bsky-link .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.bsky-link .d { color: var(--text-2); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.bsky-link .h { color: var(--muted); font-size: 11px; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
.bsky-quote { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: inherit; font-size: 13px; background: var(--surface-2); }
.bsky-quote:hover { text-decoration: none; border-color: var(--surface-3); }
.bsky-stats { display: flex; gap: 16px; margin-top: auto; }
.embed-card { min-height: 200px; }
.embed-label { padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--border); }
#tiktok-embed, #fb-embed { padding: 10px; display: flex; justify-content: center; }
.social-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.social-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: inherit; }
.social-link:hover { background: var(--surface-2); text-decoration: none; }
.social-link .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.yt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.yt-thumb { position: relative; aspect-ratio: 16/9; background: #000; }
.yt-thumb img, .yt-thumb iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.yt-meta { padding: 10px 12px; }
.yt-meta .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
