:root {
  --bg: #0b0c0f;
  --surface: #14161b;
  --surface-2: #1b1e25;
  --border: #262a33;
  --ink: #f1f3f6;
  --ink-2: #b4bac6;
  --muted: #7d8494;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.14);
  --good: #22c55e;
  --bad: #ef4444;
  --playoffs: #22c55e;
  --playin: #f59e0b;
  --live: #ef4444;
  --radius: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e1e4ea;
  --ink: #111318;
  --ink-2: #3f4552;
  --muted: #6b7280;
  --accent: #ea580c;
  --accent-soft: rgba(234, 88, 12, 0.1);
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.1);
  --good: #16a34a;
  --bad: #dc2626;
  --playoffs: #16a34a;
  --playin: #d97706;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.04em; font-size: 18px; white-space: nowrap; }
.brand b { color: var(--accent); }
.brand-ball { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fb923c, #c2410c); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.35); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.theme-toggle { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 16px; flex: none; }

/* Si el menú no cabe en una línea, pasa a una segunda fila completa (nunca se corta). */
@media (max-width: 1180px) {
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 10px 16px 0; gap: 8px; }
  .brand { flex: 1; }
  .nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
}

/* ---------- Estructura ---------- */
main { padding-top: 24px; padding-bottom: 40px; min-height: 70vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
h1 { font-size: 28px; line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card, .section + .section { margin-top: 16px; }
.section { margin-top: 28px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); white-space: nowrap; }
.pill.live { color: #fff; background: var(--live); border-color: transparent; }
.pill.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.pill.ok { color: var(--good); }
.pill.warn { color: var(--playin); }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- Controles ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.input, .select { background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; min-height: 42px; }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.input.search { flex: 1 1 260px; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237d8494' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
.select { flex: 0 1 200px; }
.btn { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 42px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--ink-2); padding: 7px 12px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--accent-soft); color: var(--ink); }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--surface-2); position: sticky; top: 0; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sorted { color: var(--accent); }
th.sorted::after { content: ' ↓'; }
th.sorted.asc::after { content: ' ↑'; }
td.l, th.l { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
tr.clickable { cursor: pointer; }
.team-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.team-cell img { width: 26px; height: 26px; object-fit: contain; }
.rank { color: var(--muted); width: 36px; position: relative; }
tr.zone-playoffs td.rank { box-shadow: inset 3px 0 0 var(--playoffs); }
tr.zone-playin td.rank { box-shadow: inset 3px 0 0 var(--playin); }
tr.cut td { border-bottom: 2px dashed var(--border); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.up { color: var(--good); }
.down { color: var(--bad); }

/* ---------- Jugadores ---------- */
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.player-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.12s, border-color 0.12s; display: flex; flex-direction: column; }
.player-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.player-card .ph { background: linear-gradient(180deg, var(--surface-2), var(--surface)); aspect-ratio: 4 / 3; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.player-card .ph img.head { width: 88%; height: 100%; object-fit: contain; object-position: bottom; }
.player-card .ph img.logo { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; opacity: 0.9; }
.player-card .ph .jersey { position: absolute; top: 8px; right: 10px; font-weight: 800; color: var(--muted); }
.player-card .info { padding: 10px 12px 12px; }
.player-card .name { font-weight: 700; line-height: 1.25; }
.player-card .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.noimg { width: 26px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 800; font-size: 9px; background: var(--surface-2); border-radius: 50%; overflow: hidden; }
.game-team .noimg { width: 32px; height: 32px; font-size: 10px; }
.noimg.head { width: 100%; height: 100%; font-size: 30px; background: none; border-radius: 0; }
.noimg.logo { position: absolute; top: 8px; left: 8px; }
.noimg.portrait { width: 200px; height: 150px; font-size: 44px; border-radius: 12px; }
.noimg.crest { width: 120px; height: 120px; font-size: 32px; }
.hero .eyebrow .noimg { width: 22px; height: 22px; font-size: 8px; }
@media (max-width: 600px) { .noimg.portrait { width: 160px; height: 120px; } .noimg.crest { width: 80px; height: 80px; } }

/* ---------- Ficha (jugador/equipo) ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 22px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 220px at 0% 0%, var(--team-color, var(--accent-soft)), transparent 70%); opacity: 0.35; pointer-events: none; }
.hero > * { position: relative; }
.hero .portrait { width: 200px; height: 150px; object-fit: contain; object-position: bottom; }
.hero .crest { width: 120px; height: 120px; object-fit: contain; }
.hero .eyebrow { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.hero .eyebrow img { width: 22px; height: 22px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-top: 16px; }
.fact .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.fact .v { font-size: 18px; font-weight: 700; }
@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero .portrait { width: 160px; height: 120px; }
  .hero .crest { width: 80px; height: 80px; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.kpi .k { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .v { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; }
.kpi .d { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.kpi.accent { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }

.stat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-tabs button { background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.stat-tabs button.on { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.stat-tabs button:disabled { opacity: 0.45; cursor: not-allowed; }

.compare { display: grid; gap: 10px; }
.compare-row { display: grid; grid-template-columns: 150px 1fr 56px; gap: 10px; align-items: center; font-size: 14px; }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; }
.bar-fill.season { background: var(--blue); }
.bar-fill.recent { background: var(--accent); }

/* ---------- Gráfico ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--accent); }
.chart .bar.dim { opacity: 0.45; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .ref-season { stroke: var(--blue); stroke-width: 2; stroke-dasharray: 6 4; }
.chart .ref-recent { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 2 4; }
.chart .ref-label { font-size: 11px; font-weight: 600; fill: var(--ink-2); }
.chart .val { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: 240px; }
.tooltip b { font-size: 15px; }

/* ---------- Partidos ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; }
.game { color: inherit; transition: border-color .12s, transform .12s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.game.is-live { border-color: color-mix(in srgb, var(--live) 60%, var(--border)); }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.game-team { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; }
.game-team img { width: 32px; height: 32px; object-fit: contain; }
.game-team .tn { font-weight: 600; line-height: 1.2; }
.game-team .tn small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.game-team .sc { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.game-team.lost .sc, .game-team.lost .tn { color: var(--muted); }
.game-foot { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.day-head { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 10px; }
.day-head h2 { margin: 0; }

/* ---------- Estados ---------- */
.state { padding: 48px 16px; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { border: 1px solid color-mix(in srgb, var(--bad) 50%, var(--border)); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); color: var(--ink); border-radius: var(--radius); padding: 16px; }
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--border); }
.links a { color: var(--blue); }
.links a:hover { text-decoration: underline; }

/* ---------- En directo ---------- */
.game:hover { border-color: var(--accent); transform: translateY(-1px); }
.game.flash, .sb-score.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); } 100% { box-shadow: none; } }
.game-leaders { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--border); padding-top: 8px; }
.game-leaders em { color: var(--muted); font-style: normal; margin-left: auto; }
.nav-live { display: inline-flex; align-items: center; gap: 6px; }
.badge { background: var(--live); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
.live-empty { display: grid; gap: 6px; }
.back { display: inline-block; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.back:hover { color: var(--ink); }
.scoreboard { display: grid; gap: 14px; }
.scoreboard.is-live { border-color: color-mix(in srgb, var(--live) 60%, var(--border)); }
.sb-status { display: flex; justify-content: center; }
.sb-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.sb-team { display: grid; justify-items: center; gap: 4px; text-align: center; }
.sb-team.lost .sb-name { color: var(--muted); }
.sb-logo, .noimg.sb-logo { width: 72px; height: 72px; object-fit: contain; font-size: 18px; }
.sb-name { font-weight: 700; font-size: 16px; }
.sb-score { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; border-radius: 12px; padding: 0 10px; white-space: nowrap; }
.sb-score span { color: var(--muted); margin: 0 10px; font-weight: 400; }
.sb-venue { text-align: center; }
.quarters { max-width: 640px; margin: 0 auto; width: 100%; }
@media (max-width: 600px) { .sb-score { font-size: 34px; } .sb-score span { margin: 0 4px; } .sb-logo, .noimg.sb-logo { width: 48px; height: 48px; } .sb-name { font-size: 13px; } }
.tstats { display: grid; gap: 2px; font-size: 14px; }
.ts-head, .ts-row { display: grid; grid-template-columns: 70px 1fr 70px; text-align: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ts-head { font-weight: 700; color: var(--muted); font-size: 12px; }
.ts-row:last-child { border-bottom: 0; }
.ts-row .best { font-weight: 800; color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.plays { display: grid; max-height: 520px; overflow-y: auto; }
.play { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; align-items: baseline; }
.play.scoring .pd { color: var(--ink); font-weight: 600; }
.play:not(.scoring) .pd { color: var(--ink-2); }
.pteam { color: var(--muted); font-size: 11px; }
.ps { color: var(--muted); font-weight: 600; }
.small-pill { padding: 0 5px; font-size: 10px; }
tr.dnp td { color: var(--muted); }
.badge[hidden] { display: none; }

/* ---------- Tendencias Over ---------- */
.trend-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; align-items: center; }
.range-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; }
.range-tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 16px; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.range-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.trend-table td.hr { text-align: center; font-weight: 600; color: var(--ink); }
.trend-table th { text-align: center; }
.trend-table th.l { text-align: left; }
.trend-table tbody tr:hover td.hr { filter: brightness(1.15); }
.trend-table .avg-row td { background: var(--surface-2); }
.th-team { justify-content: center; color: var(--ink); }
.custom-col { color: var(--accent) !important; }
.trend-table .avg-row td.num { text-align: center; }

/* ---------- Enfrentamientos ---------- */
.h2h-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.h2h-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.h2h-table { width: 100%; }
.h2h-table th { text-align: center; }
.h2h-table td { text-align: center; }
.h2h-table td.l, .h2h-table th.l { text-align: left; white-space: normal; }
.h2h-table td.best { font-weight: 800; box-shadow: inset 0 -2px 0 var(--accent); }
.h2h-table .avg-row td, .h2h-table .today-row td { background: var(--surface-2); }
.today-row td { border-top: 1px solid var(--accent); }
.win-score { font-weight: 800; }
.form-strip { display: grid; gap: 8px; padding: 12px 16px 16px; }
.form-strip > div { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.form-strip b { width: 40px; }
.form { display: inline-flex; width: 22px; height: 22px; border-radius: 5px; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink); }
.form.w { background: color-mix(in srgb, var(--good) 35%, var(--surface)); }
.form.l { background: color-mix(in srgb, var(--bad) 35%, var(--surface)); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Selector de idioma ---------- */
.lang-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; flex: none; }
.lang-switch button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.lang-switch .flag { display: inline-flex; width: 20px; height: 14px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.lang-switch .flag svg { width: 100%; height: 100%; display: block; }
.lang-switch button:not(.on) .flag { opacity: .7; }

/* ---------- iPhone / app instalada: respetar la isla, la muesca y la barra inferior ---------- */
.topbar { padding-top: env(safe-area-inset-top); }
.topbar-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.footer { padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 12px)); }
@media (display-mode: standalone) {
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
}

/* ---------- Cuentas: acceso, menú, formularios ---------- */
body.locked .nav { visibility: hidden; }
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 16px 0; }
.auth-card { width: 100%; max-width: 440px; padding: 24px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 24px; letter-spacing: .04em; margin-bottom: 8px; }
.auth-brand b { color: var(--accent); }
.auth-tabs { display: flex; width: 100%; margin-bottom: 16px; }
.auth-tabs button { flex: 1; }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .input, .field .select { width: 100%; max-width: none; font-weight: 400; }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.5; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; line-height: 1.45; }
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check a, .legal a { color: var(--blue); }
.auth-error { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--border)); color: var(--ink); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 60%, var(--border)); color: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 12%, var(--surface-2)); }
.btn:disabled { opacity: .6; cursor: wait; }
.account { position: relative; flex: none; }
.account[hidden] { display: none; }
.acct-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.acct-menu { position: absolute; right: 0; top: 44px; width: 250px; padding: 8px; z-index: 40; display: grid; gap: 2px; }
.acct-menu[hidden] { display: none; }
.acct-who { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; word-break: break-all; }
.acct-menu button { background: none; border: 0; color: var(--ink); font: inherit; font-size: 14px; text-align: left; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.acct-menu button:hover { background: var(--surface-2); }
.fb-ok { padding: 8px 0; }
.legal h3 { margin-top: 18px; }
.legal h3:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-2); font-size: 14px; }
.sug { padding: 14px; margin-bottom: 10px; }
.sug-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sug-head .small-btn { margin-left: auto; min-height: 30px; padding: 4px 10px; font-size: 12px; }
.sug-msg { white-space: pre-wrap; margin: 10px 0 0; }
@media (max-width: 760px) {
  .acct-menu { position: fixed; right: max(12px, env(safe-area-inset-right)); top: calc(env(safe-area-inset-top) + 56px); }
}
@media (max-width: 400px) {
  .topbar-inner { gap: 6px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand-ball { width: 18px; height: 18px; }
  .lang-switch button { padding: 4px 5px; gap: 4px; font-size: 11px; }
  .lang-switch .flag { width: 18px; height: 12px; }
  .acct-btn { width: 32px; height: 32px; }
  .account:not([hidden]) ~ .theme-toggle { display: none; } /* con cuenta, el tema se cambia desde su menú */
}

/* ---------- Líderes, tablas de estadísticas y rotación ---------- */
.leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; margin-bottom: 18px; }
.leader { padding: 12px; cursor: pointer; display: grid; gap: 4px; transition: border-color .12s; }
.leader:hover { border-color: var(--accent); }
.leader-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.leader-k .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.leader-top { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 4px 0 6px; border-bottom: 1px solid var(--border); }
.leader-top > span { display: grid; min-width: 0; }
.leader-photo, .noimg.leader-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-2); font-size: 12px; }
.leader-name { font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-v { font-size: 24px; font-weight: 800; }
.leader-row { display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--ink-2); padding: 2px 0; }
.leader-row b { margin-left: auto; color: var(--ink); }
.leader a:hover .leader-name, .leader-row:hover { color: var(--accent); }
td.sticky-col, th.sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
th.sticky-col { background: var(--surface-2); z-index: 2; }
tbody tr:hover td.sticky-col { background: var(--surface-2); }
.five { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 10px; }
.five-p { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.five-p:hover { border-color: var(--accent); }
.five-photo, .noimg.five-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface); font-size: 16px; }
.rot-table th, .rot-table td { text-align: center; }
.rot-table th.l, .rot-table td.l { text-align: left; }
.rot-h { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink-2); }
.rot { display: inline-block; min-width: 46px; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rot.st { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); color: var(--ink); }
.rot.bn { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }
.rot-sep td { background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 6px 12px; }
tr.is-starter td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.select[hidden] { display: none; }
.leaders > .card + .card, .five .card + .card { margin-top: 0; }
.leaders { align-items: start; }
.auth-error.info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 45%, var(--border)); }
.sys-note { margin-top: 12px; padding: 12px 14px; font-size: 14px; }
.sys-note.ok { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.sys-note.warn { border-color: color-mix(in srgb, var(--playin) 55%, var(--border)); }

/* ---------- Comparador ---------- */
:root { --cmp-a: #ea580c; --cmp-b: #3b82f6; }
:root[data-theme='light'] { --cmp-a: #ea580c; --cmp-b: #2563eb; }
.cmp-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.cmp-vs { align-self: center; font-weight: 800; font-size: 20px; color: var(--muted); padding-top: 10px; }
.cmp-side { display: grid; gap: 8px; min-width: 0; }
.cmp-card { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 96px; }
.cmp-card.a { box-shadow: inset 4px 0 0 var(--cmp-a); }
.cmp-card.b { box-shadow: inset 4px 0 0 var(--cmp-b); }
.cmp-card.empty-card { display: flex; justify-content: center; color: var(--muted); }
.cmp-photo, .noimg.cmp-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-2); font-size: 18px; }
.cmp-info { display: grid; gap: 3px; min-width: 0; }
.cmp-name { font-size: 18px; line-height: 1.2; }
.cmp-info .team-cell img { width: 18px; height: 18px; }
.cmp-pick { position: relative; }
.cmp-pick .input { width: 100%; }
.cmp-results { position: absolute; z-index: 30; left: 0; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.35); max-height: 340px; overflow-y: auto; }
.cmp-results[hidden] { display: none; }
.cmp-results button { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; padding: 8px 10px; cursor: pointer; }
.cmp-results button:hover { background: var(--surface-2); }
.cmp-results img, .cmp-results .noimg { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-2); }
@media (max-width: 640px) { .cmp-head { grid-template-columns: 1fr; } .cmp-vs { justify-self: center; padding: 0; } }

.radar-card { padding: 14px; }
.radar-legend { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: 14px; font-weight: 600; }
.radar-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg.a { background: var(--cmp-a); } .lg.b { background: var(--cmp-b); }
.radar { width: 100%; height: auto; display: block; overflow: visible; }
.r-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.r-spoke { stroke: var(--border); stroke-width: 1; }
.r-area { stroke-width: 2; stroke-linejoin: round; }
.r-area.a { fill: color-mix(in srgb, var(--cmp-a) 22%, transparent); stroke: var(--cmp-a); }
.r-area.b { fill: color-mix(in srgb, var(--cmp-b) 22%, transparent); stroke: var(--cmp-b); }
.r-dot { stroke: var(--surface); stroke-width: 2; }
.r-dot.a { fill: var(--cmp-a); } .r-dot.b { fill: var(--cmp-b); }
.r-name { fill: var(--ink-2); font-size: 14px; font-weight: 600; }
.r-vals { fill: var(--ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.r-key.a { fill: var(--cmp-a); } .r-key.b { fill: var(--cmp-b); }
.r-key-html.a { color: var(--cmp-a); } .r-key-html.b { color: var(--cmp-b); }
.r-tick { fill: var(--muted); font-size: 10px; }
.r-hit { fill: transparent; cursor: pointer; }
.cmp-table { width: 100%; }
.cmp-table th { text-align: center; }
.cmp-table td { padding: 8px 10px; }
.cmp-stat { text-align: center; color: var(--ink-2); font-size: 12px; font-weight: 700; width: 70px; }
.cmp-v { width: 56px; text-align: center; }
.cmp-v.best { font-weight: 800; color: var(--ink); }
.cmp-v:not(.best) { color: var(--ink-2); }
.cmp-bar { width: 32%; }
.cmp-bar span { display: block; height: 8px; border-radius: 4px; }
.cmp-bar.a span { background: var(--cmp-a); margin-left: auto; border-radius: 4px 0 0 4px; }
.cmp-bar.b span { background: var(--cmp-b); border-radius: 0 4px 4px 0; }
@media (max-width: 640px) {
  .cmp-bar { display: none; }
  .cmp-table th:nth-child(2), .cmp-table th:nth-child(4) { display: none; }
  .cmp-v { width: auto; }
  .radar-card { padding: 10px 4px; }
}
/* ---------- Menú lateral (solo móvil) ---------- */
.menu-btn, .nav-head, .nav-backdrop { display: none; }
@media (max-width: 760px) {
  .topbar { backdrop-filter: none; background: var(--bg); }
  .topbar-inner { flex-wrap: nowrap; height: 56px; padding-top: 0; padding-bottom: 0; gap: 10px; }
  .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; flex: none; width: 40px; height: 40px; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
  .menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .brand { flex: 1; min-width: 0; }
  .nav {
    position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(72vw, 300px);
    flex-direction: column; flex-wrap: nowrap; gap: 4px; overflow-y: auto; padding: 0 12px 24px;
    padding-top: env(safe-area-inset-top); padding-left: max(12px, env(safe-area-inset-left));
    background: var(--surface); border-right: 1px solid var(--border); box-shadow: 8px 0 30px rgba(0, 0, 0, .45);
    transform: translateX(-105%); visibility: hidden; transition: transform .28s ease, visibility 0s .28s;
  }
  .menu-open .nav { transform: none; visibility: visible; transition: transform .28s ease; }
  .nav-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .nav-close { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); font-size: 14px; cursor: pointer; }
  .nav a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 16px; border-radius: 10px; }
  .nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .5); animation: fadeIn .25s ease; }
  .nav-backdrop[hidden] { display: none; }
  body.menu-open { overflow: hidden; }
  .menu-open .topbar { z-index: 50; }
  body.locked .menu-btn { display: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Gráficos propios: escudos de equipo y camisetas de jugador ---------- */
.gen { display: inline-block; flex: none; width: 26px; height: 26px; line-height: 0; }
.gen svg { width: 100%; height: 100%; display: block; overflow: visible; }
.team-cell .gen { width: 26px; height: 26px; }
.game-team .gen { width: 34px; height: 34px; }
.hero .eyebrow .gen { width: 24px; height: 24px; }
.player-card .ph .gen.head { width: 62%; height: auto; aspect-ratio: 1; margin: 0 auto 10%; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.player-card .ph .gen.logo { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; }
.player-card .ph { align-items: center; }
.gen.sb-logo { width: 76px; height: 76px; }
.gen.portrait { width: 150px; height: 150px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.gen.crest { width: 120px; height: 120px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.gen.leader-photo { width: 44px; height: 44px; }
.gen.five-photo { width: 64px; height: 64px; }
.gen.cmp-photo { width: 72px; height: 72px; }
.cmp-results .gen { width: 32px; height: 32px; }
.cmp-info .team-cell .gen { width: 18px; height: 18px; }
@media (max-width: 600px) { .gen.portrait { width: 120px; height: 120px; } .gen.crest { width: 84px; height: 84px; } .gen.sb-logo { width: 50px; height: 50px; } }
.leader-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Logo de CestoStats en la cabecera y en la pantalla de acceso */
.brand-logo { width: 30px; height: 30px; flex: none; display: block; }
.auth-brand .brand-logo { width: 40px; height: 40px; }
@media (max-width: 400px) { .brand-logo { width: 24px; height: 24px; } }

/* ---------- Picks de referencia ---------- */
.pk-list { display: grid; gap: 10px; }
.pk { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 14px; padding: 14px 16px; }
.pk + .pk { margin-top: 0; }
.pk-rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.pk-main { min-width: 0; }
.pk-who { display: flex; align-items: center; gap: 10px; }
.pk-who b { display: block; line-height: 1.2; }
.pk-who small { color: var(--muted); font-size: 12px; }
.pk-av, .noimg.pk-av, .gen.pk-av { width: 36px; height: 36px; flex: none; }
.pk-gameicon { display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 18px; }
.pk-title { margin: 8px 0 6px; font-weight: 700; font-size: 16px; }
.pk-evs { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-ev { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap; }
.pk-ev.good b { color: var(--good); }
.pk-ev.mid b { color: var(--playin); }
.pk-ev.bad b { color: var(--bad); }
.pk-spark { position: relative; display: flex; align-items: flex-end; gap: 3px; width: 120px; height: 46px; }
.pk-spark i { flex: 1; background: var(--border); border-radius: 3px 3px 0 0; }
.pk-spark i.on { background: var(--good); }
.pk-spark em { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--accent); }
.pk-odds { text-align: center; min-width: 96px; }
.pk-odds small { display: block; color: var(--muted); font-size: 11px; }
.pk-odds b { display: block; font-size: 26px; color: var(--accent); line-height: 1.1; margin: 2px 0 6px; }
.pk-prob { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 4px; }
.pk-prob i { display: block; height: 100%; background: var(--good); }
.pk-note { margin-top: 14px; }
.pk-game-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pk-game-head a { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--ink); }
.pk-logo, .noimg.pk-logo, .gen.pk-logo { width: 28px; height: 28px; }
.pk-more { margin-top: 10px; }
.pk-more summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
@media (max-width: 640px) {
  .pk { grid-template-columns: 30px 1fr auto; gap: 10px; padding: 12px; }
  .pk-spark { display: none; }
  .pk-odds { min-width: 74px; }
  .pk-odds b { font-size: 22px; }
  .pk-title { font-size: 15px; }
}

.pk-gametag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.pk-featured .pk { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* ---------- Pista (mapa de tiros) y dinámica del partido ---------- */
.ct-card { padding: 18px; }
.ct-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ct-filters .select { min-width: 150px; }
.ct-wrap { border-radius: 14px; overflow: hidden; border: 3px solid #1e4fa3; background: #1e4fa3; }
.ct-svg { display: block; width: 100%; height: auto; }
.ct-line { stroke: rgba(255, 255, 255, 0.85); stroke-width: 3; }
.ct-paint { fill: #2a63c4; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3; }
.ct-board { stroke: #fff; stroke-width: 5; }
.ct-rim { fill: none; stroke: #f97316; stroke-width: 3; }
.ct-shot { cursor: default; }
.ct-last circle { animation: ctpulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ctpulse { 50% { transform: scale(1.25); } }
.ct-label text { fill: #fff; font: 700 22px Inter, system-ui, sans-serif; }
.ct-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.ct-stat { display: inline-flex; align-items: center; gap: 6px; }
.ct-stat i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.fl-wrap { display: grid; grid-template-columns: 44px 1fr 38px; align-items: stretch; gap: 8px; }
.fl-teams, .fl-axis { display: flex; flex-direction: column; justify-content: space-between; font-weight: 800; font-size: 13px; padding: 6px 0; }
.fl-axis { color: var(--muted); font-weight: 600; font-size: 12px; text-align: right; }
.fl-svg { width: 100%; height: auto; display: block; }
.fl-bg { fill: var(--surface-2); }
.fl-future { opacity: 0.5; }
.fl-zero { stroke: var(--border); stroke-width: 1.5; }
.fl-now { stroke: #ef4444; stroke-width: 3; vector-effect: non-scaling-stroke; }
.fl-nowdot { fill: #ef4444; }
.fl-q { fill: var(--muted); font: 600 14px Inter, system-ui, sans-serif; }
@media (max-width: 640px) {
  .fl-svg { height: auto; }
  .fl-wrap { grid-template-columns: 36px 1fr 30px; gap: 4px; }
  .ct-filters .seg { width: 100%; }
  .ct-filters .seg button { flex: 1; }
  .ct-filters .select { min-width: 0; flex: 1 1 45%; }
}

/* Selector de zona horaria */
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tz-pick { display: inline-flex; align-items: center; gap: 6px; }
.tz-pick .select { max-width: 260px; }
@media (max-width: 640px) {
  .head-actions { width: 100%; }
  .tz-pick { flex: 1 1 100%; }
  .tz-pick .select { max-width: none; flex: 1; }
}

/* Clasificación: pestañas y divisiones */
.st-views { margin: 4px 0 18px; }
.st-divs .section h2 { font-size: 18px; }

/* ---------- Cuadro de playoffs ---------- */
.po-champ { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(234, 179, 8, 0.18), transparent); border: 1px solid rgba(234, 179, 8, 0.45); font-size: 18px; }
.po-champ b { font-size: 20px; }
.po-champ-logo, .noimg.po-champ-logo, .gen.po-champ-logo { width: 40px; height: 40px; }
.po-note { padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); font-size: 14px; color: var(--ink-2); }
.po-bracket { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.po-col { display: flex; flex-direction: column; min-width: 0; }
.po-round { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); text-align: center; margin-bottom: 8px; min-height: 28px; }
.po-stack { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-height: 520px; }
.po-col.fin .po-series { border-color: rgba(234, 179, 8, 0.6); box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.25); }
.po-series { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px 8px; color: var(--ink); cursor: pointer; font: inherit; }
.po-series:disabled { cursor: default; }
.po-series:not(:disabled):hover, .po-series.on { border-color: var(--accent); }
.po-series.proj { border-style: dashed; }
.po-team { display: grid; grid-template-columns: 14px 22px 1fr auto; align-items: center; gap: 6px; padding: 3px 0; font-weight: 600; font-size: 14px; }
.po-team.lose { opacity: 0.55; }
.po-team.win .po-abbr, .po-team.win .po-w { color: var(--accent); font-weight: 800; }
.po-seed { font-size: 11px; color: var(--muted); text-align: right; }
.po-logo, .noimg.po-logo, .gen.po-logo { width: 22px; height: 22px; }
.po-tbd { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.po-abbr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-w { font-variant-numeric: tabular-nums; font-weight: 800; }
.po-sum { display: block; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.po-empty { text-align: center; color: var(--muted); }
.po-playin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.po-playin span { display: inline-flex; align-items: center; gap: 5px; }
.po-games { margin-top: 16px; }
.po-game { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); color: var(--ink); font-variant-numeric: tabular-nums; }
.po-game:hover { color: var(--accent); }
.po-game .b { font-weight: 800; }
@media (max-width: 1000px) {
  .po-bracket { grid-template-columns: 1fr 1fr; }
  .po-col.fin { grid-column: 1 / -1; order: -1; }
  .po-col.w1 { order: 1; } .po-col.e1 { order: 2; }
  .po-col.w2 { order: 3; } .po-col.e2 { order: 4; }
  .po-col.w3 { order: 5; } .po-col.e3 { order: 6; }
  .po-stack { min-height: 0; justify-content: flex-start; }
  .po-round { min-height: 0; text-align: left; }
  .po-col.fin .po-stack { max-width: 360px; }
}
