/* Marcador de pabellón: azul noche, números en condensada y naranja balón para lo importante */
:root {
  color-scheme: light;
  --fondo: #eef1f5;
  --superficie: #ffffff;
  --superficie-2: #f2f4f8;
  --borde: #dde2ea;
  --texto: #0d1726;
  --texto-2: #4a5568;
  --texto-3: #7a8496;
  --noche: #12305a;
  --noche-2: #1d4f91;
  --noche-texto: #ffffff;
  --acento: #1d4f91;
  --acento-texto: #ffffff;
  --balon: #e0621f;
  --balon-suave: #fdebe1;
  --gana: #0f7a3d;
  --gana-suave: #dcf3e5;
  --pierde: #b3261e;
  --pierde-suave: #fbe1df;
  --estrella: #e0a100;
  --serie-1: #2a78d6;
  --serie-2: #eb6834;
  --serie-3: #1baf7a;
  --serie-4: #eda100;
  --pista: #efd9b4;
  --pista-zona: #e4c48f;
  --pista-linea: #8c6a3a;
  --sombra: 0 1px 2px rgba(13, 23, 38, .06), 0 4px 14px rgba(13, 23, 38, .06);
  --f-titulo: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --f-texto: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fondo: #0b111b;
    --superficie: #141c29;
    --superficie-2: #1b2535;
    --borde: #2a3547;
    --texto: #eef2f7;
    --texto-2: #b9c3d1;
    --texto-3: #8592a6;
    --noche: #0f2547;
    --noche-2: #1d4f91;
    --noche-texto: #ffffff;
    --acento: #78aef0;
    --acento-texto: #0b111b;
    --balon: #f08a4b;
    --balon-suave: #3a2418;
    --gana: #4cc27a;
    --gana-suave: #173524;
    --pierde: #f07a72;
    --pierde-suave: #3d1d1b;
    --estrella: #f2bf3a;
    --serie-1: #3987e5;
    --serie-2: #d95926;
    --serie-3: #199e70;
    --serie-4: #c98500;
    --pista: #3a2f20;
    --pista-zona: #4a3b26;
    --pista-linea: #a88a5c;
    --sombra: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fondo: #0b111b;
  --superficie: #141c29;
  --superficie-2: #1b2535;
  --borde: #2a3547;
  --texto: #eef2f7;
  --texto-2: #b9c3d1;
  --texto-3: #8592a6;
  --noche: #0f2547;
  --noche-2: #1d4f91;
  --noche-texto: #ffffff;
  --acento: #78aef0;
  --acento-texto: #0b111b;
  --balon: #f08a4b;
  --balon-suave: #3a2418;
  --gana: #4cc27a;
  --gana-suave: #173524;
  --pierde: #f07a72;
  --pierde-suave: #3d1d1b;
  --estrella: #f2bf3a;
  --serie-1: #3987e5;
  --serie-2: #d95926;
  --serie-3: #199e70;
  --serie-4: #c98500;
  --pista: #3a2f20;
  --pista-zona: #4a3b26;
  --pista-linea: #a88a5c;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 15px/1.45 var(--f-texto);
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--balon); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: var(--f-titulo); text-wrap: balance; }
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: .01em; margin-bottom: 8px; }
h2 { font-size: 1.35rem; font-weight: 700; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
h2 .icono { width: 20px; height: 20px; color: var(--estrella); fill: currentColor; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 18px 0 8px; color: var(--texto-2); text-transform: uppercase; letter-spacing: .04em; }
h3.con-escudo { display: flex; align-items: center; gap: 8px; color: var(--texto); }

.icono { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ---- Barra y menú ---- */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(135deg, var(--noche), var(--noche-2));
  color: var(--noche-texto);
}
.marca { display: flex; align-items: center; gap: 10px; font-family: var(--f-titulo); font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; }
.marca small { font-weight: 600; opacity: .7; font-size: .9rem; }
.boton-icono { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .12); }

main { max-width: 1000px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); }
.cargando, .vacio { color: var(--texto-3); text-align: center; padding: 28px 8px; }

.menu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around;
  background: var(--superficie); border-top: 1px solid var(--borde);
  padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.menu a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; font-size: .72rem; font-weight: 600; color: var(--texto-3); }
.menu a.activo { color: var(--balon); }
.menu a.activo .icono { stroke-width: 2.3; }
@media (min-width: 900px) {
  .menu { justify-content: center; gap: 10px; }
  .menu a { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 14px 20px; font-size: .9rem; }
}

/* ---- Escudos y avatares ---- */
.escudo, .avatar { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; overflow: hidden; }
.escudo img, .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.escudo img { object-fit: contain; }
.escudo b, .avatar b { font-family: var(--f-titulo); font-weight: 700; color: var(--texto-2); }
.escudo { width: 24px; height: 24px; border-radius: 6px; }
.escudo b { font-size: .6rem; }
.escudo:has(img) { background: none; }
.escudo:not(:has(img)) { background: var(--superficie-2); }
.escudo.xs { width: 18px; height: 18px; }
.escudo.s { width: 28px; height: 28px; }
.escudo.m { width: 40px; height: 40px; }
.escudo.l { width: 40px; height: 40px; }
.escudo.xl { width: 64px; height: 64px; }
.escudo.xl b { font-size: 1.2rem; }
.escudo.xxl { width: 96px; height: 96px; }
.escudo.xxl b { font-size: 1.6rem; }
.barra .escudo:not(:has(img)) { background: rgba(255, 255, 255, .15); }
.barra .escudo b { color: var(--noche-texto); }

.avatar { border-radius: 50%; background: var(--superficie-2); border: 2px solid var(--superficie); box-shadow: 0 0 0 1px var(--borde); }
.avatar img { object-fit: cover; object-position: center 15%; }
.avatar.xs { width: 22px; height: 22px; border-width: 1px; }
.avatar.xs b { font-size: .55rem; }
.avatar.s { width: 36px; height: 36px; }
.avatar.s b { font-size: .8rem; }
.avatar.m { width: 44px; height: 44px; }
.avatar.l { width: 60px; height: 60px; }
.avatar.l b { font-size: 1.2rem; }
.avatar.xl { width: 76px; height: 76px; border-width: 3px; }
.avatar.xl b { font-size: 1.5rem; }
.avatar.xxl { width: 112px; height: 112px; border-width: 4px; }
.avatar.xxl b { font-size: 2.2rem; }

/* ---- Tarjetas ---- */
.tarjeta {
  display: block; background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px;
  padding: 14px; margin-bottom: 10px; box-shadow: var(--sombra);
}
.tarjeta.aviso { display: flex; gap: 12px; align-items: center; color: var(--texto-2); }
.tarjeta.aviso .icono { color: var(--estrella); width: 28px; height: 28px; }
.rejilla { display: grid; gap: 10px; grid-template-columns: 1fr; }
.rejilla .tarjeta { margin-bottom: 0; }
@media (min-width: 700px) { .rejilla.dos { grid-template-columns: 1fr 1fr; } }

.hero {
  background: linear-gradient(160deg, var(--noche) 0%, var(--noche-2) 100%); color: var(--noche-texto);
  border-radius: 18px; padding: 16px; margin: 4px 0 14px; box-shadow: var(--sombra);
}
.hero .sub, .hero .nota { color: rgba(255, 255, 255, .75); }
.hero h1, .hero h2 { color: var(--noche-texto); margin: 0; }
.hero .tarjeta { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: var(--noche-texto); box-shadow: none; }
.hero .tarjeta .pie-partido { color: rgba(255, 255, 255, .75); }
.hero .escudo:not(:has(img)), .hero .avatar { background: rgba(255, 255, 255, .15); }
.hero .escudo b, .hero .avatar b { color: var(--noche-texto); }
.hero .avatar { border-color: rgba(255, 255, 255, .25); box-shadow: none; }
.hero-tit { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.hero-tit > span:first-of-type { font-family: var(--f-titulo); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; }
.hero-tit .icono { color: var(--balon); }
.hero h3 { color: rgba(255, 255, 255, .8); }
.hero .info { color: rgba(255, 255, 255, .8); }
.hero .cifra { background: rgba(255, 255, 255, .1); }
.hero .cifra span { color: rgba(255, 255, 255, .75); }
.hero .linea-fav { background: rgba(255, 255, 255, .08); border-color: transparent; }
.hero .leyenda { color: rgba(255, 255, 255, .85); }

/* ---- Partidos ---- */
.partido { padding: 12px 14px 10px; transition: transform .15s; }
a.partido:active { transform: scale(.99); }
.partido.mio { border-color: var(--balon); box-shadow: 0 0 0 1px var(--balon), var(--sombra); }
.hero .partido.mio { box-shadow: none; border-color: rgba(255, 255, 255, .14); }
.duelo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; }
.duelo .lado { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.duelo .nom { font-weight: 600; font-size: .85rem; line-height: 1.2; overflow-wrap: anywhere; }
.duelo .pts { font-family: var(--f-titulo); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.duelo .gano .pts { color: inherit; }
.duelo .gano .nom { font-weight: 800; }
.duelo .centro { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: center; min-width: 64px; }
.duelo .hora { font-family: var(--f-titulo); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.duelo .dia { font-size: .78rem; color: var(--texto-3); text-transform: capitalize; }
.hero .duelo .dia { color: rgba(255, 255, 255, .75); }
.duelo .final { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-3); font-weight: 700; }
.partido.grande .duelo .nom { font-size: 1rem; }
.partido.grande .duelo .pts { font-size: 2.8rem; }
.partido.grande .duelo .hora { font-size: 2.2rem; }
.hero .duelo .pts { color: rgba(255, 255, 255, .55); }
.hero .duelo .gano .pts { color: var(--noche-texto); }
.pie-partido { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: .78rem; color: var(--texto-3); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--balon-suave); color: var(--balon); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.badge.mio { background: var(--balon); color: #fff; }
.caras { display: inline-flex; align-items: center; margin-left: auto; color: var(--estrella); font-weight: 700; }
.caras .avatar { margin-left: -6px; }
.caras > span { margin-left: 4px; }

.nav-jornada { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; margin-bottom: 4px; text-align: center; }
.nav-jornada b { display: block; font-family: var(--f-titulo); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.nav-jornada span { font-size: .8rem; color: var(--texto-3); }
.flecha { display: grid; place-items: center; height: 44px; border-radius: 12px; background: var(--superficie); border: 1px solid var(--borde); font-size: 1.6rem; line-height: 1; }
.flecha.off { opacity: .3; pointer-events: none; }
.volver-hoy { display: block; text-align: center; color: var(--balon); font-weight: 600; font-size: .85rem; margin-bottom: 8px; }

.previa { display: grid; gap: 10px; margin-top: 10px; }
.previa > div { display: flex; align-items: center; gap: 10px; }
.previa > div > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 12px;
  background: var(--balon); color: #fff; font-weight: 700; margin-top: 10px; border: 0; cursor: pointer;
}
.boton .icono { width: 18px; height: 18px; }
.boton.secundario { background: var(--superficie); color: var(--acento); border: 1px solid var(--borde); margin-top: 14px; }

.forma { display: inline-flex; gap: 3px; }
.forma a { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: .65rem; font-weight: 800; color: #fff; }
.forma .g { background: var(--gana); }
.forma .p { background: var(--pierde); }

.linea-fav {
  display: grid; grid-template-columns: auto 1fr repeat(4, 42px); gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 12px; background: var(--superficie); border: 1px solid var(--borde); margin-bottom: 6px;
}
.linea-fav .quien { min-width: 0; display: flex; flex-direction: column; }
.linea-fav .quien b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini { text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.mini b { font-family: var(--f-titulo); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.mini span { font-size: .65rem; color: var(--texto-3); font-weight: 600; }
.hero .mini span { color: rgba(255, 255, 255, .7); }
.mini.va b { color: var(--balon); }

details.mas { margin: 14px 0; }
details.mas > summary { cursor: pointer; color: var(--acento); font-weight: 700; padding: 10px 0; list-style: none; }
details.mas > summary::before { content: "+ "; }
details.mas[open] > summary::before { content: "– "; }
details.mas > summary::-webkit-details-marker { display: none; }

/* ---- Chips, pestañas y controles ---- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--borde); background: var(--superficie);
  border-radius: 999px; padding: 7px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip.activo { background: var(--texto); border-color: var(--texto); color: var(--superficie); }
.controles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.controles select, .controles input, .ajustes select {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px; padding: 9px 10px; min-width: 0; flex: 1 1 140px;
}
.pestanas { display: flex; gap: 4px; background: var(--superficie-2); border-radius: 12px; padding: 4px; margin: 14px 0 12px; }
.pestanas button {
  flex: 1; border: 0; background: none; padding: 9px 8px; cursor: pointer; color: var(--texto-2); border-radius: 9px; font-weight: 600; white-space: nowrap;
}
.pestanas button.activo { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }

/* ---- Tablas ---- */
.tabla-scroll { overflow-x: auto; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); margin-bottom: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--borde); }
th { color: var(--texto-2); font-weight: 700; background: var(--superficie-2); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.izq, th.izq { text-align: left; }
.fija { position: sticky; left: 0; background: var(--superficie); z-index: 1; max-width: 48vw; overflow: hidden; text-overflow: ellipsis; }
th.fija { background: var(--superficie-2); z-index: 2; }
tr.total td { font-weight: 700; background: var(--superficie-2); }
tr.yo td { background: var(--balon-suave); font-weight: 700; }
.clasif .posc { font-family: var(--f-titulo); font-size: 1.05rem; font-weight: 700; color: var(--texto-3); }
.sub { color: var(--texto-3); font-size: .78rem; }
.jug { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.jug > span { overflow: hidden; text-overflow: ellipsis; }
.estrella { border: 0; background: none; padding: 2px; cursor: pointer; line-height: 1; font-size: 1.15rem; color: var(--texto-3); }
.estrella.si { color: var(--estrella); }
.estrella.grande { font-size: 1.8rem; }
.hero .estrella:not(.si) { color: rgba(255, 255, 255, .6); }

/* ---- Cifras ---- */
.cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.cifras.dos { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.cifra { background: var(--superficie-2); border-radius: 12px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.cifra b { font-family: var(--f-titulo); font-size: 1.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.cifra span { font-size: .72rem; color: var(--texto-2); font-weight: 600; }
.cifras.grandes .cifra b { font-size: 2.1rem; }
.cifra.destacada b { color: var(--balon); }
.hero .cifra.destacada b { color: #ffb37f; }
.destaca { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.destaca .cifra { background: var(--superficie); border: 1px solid var(--borde); }
.destaca .cifra b { color: var(--balon); }
@media (min-width: 700px) { .destaca { grid-template-columns: repeat(6, 1fr); } }

.anillos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 14px; justify-items: center; }
.anillo, .anillo-dato { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 72px; }
.anillo svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.anillo-fondo { fill: none; stroke: rgba(255, 255, 255, .15); stroke-width: 3.5; }
.anillo-valor { fill: none; stroke: #ffb37f; stroke-width: 3.5; stroke-linecap: round; }
.anillo b { position: absolute; top: 17px; width: 100%; text-align: center; font-family: var(--f-titulo); font-size: 1.05rem; }
.anillo span, .anillo-dato span { font-size: .64rem; color: rgba(255, 255, 255, .75); white-space: nowrap; }
.anillo-dato { justify-content: center; height: 56px; margin-top: 0; }
.anillo-dato b { font-family: var(--f-titulo); font-size: 1.3rem; line-height: 1; }

/* ---- Héroes de ficha ---- */
.equipo-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.equipo-hero .cifras { width: 100%; }
.equipo-hero .info { text-align: center; }
.datos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .88rem; margin-top: 4px; }
.datos.centro { justify-content: center; }
.hero .datos { color: rgba(255, 255, 255, .85); }
.pill-pos { background: var(--balon); color: #fff; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.info { color: var(--texto-2); font-size: .85rem; margin-top: 10px; display: grid; gap: 2px; }

.jugador-hero { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.jugador-hero .cifras, .jugador-hero .anillos { grid-column: 1 / -1; }
.jh-datos { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.jh-nombre { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.jh-nombre h1 { font-size: 1.8rem; }
@media (max-width: 420px) { .avatar.xxl { width: 88px; height: 88px; } .jh-nombre h1 { font-size: 1.5rem; } }

.rival { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.rival h2 { font-size: 1.6rem; }

.cuartos { margin-top: 12px; }
.cuarto { display: grid; grid-template-columns: 30px 1fr 28px 1fr 28px; gap: 6px; align-items: center; margin: 4px 0; font-variant-numeric: tabular-nums; }
.cuarto .q { font-family: var(--f-titulo); font-weight: 700; color: var(--texto-3); }
.hero .cuarto .q { color: rgba(255, 255, 255, .7); }
.cuarto .b { height: 10px; background: var(--superficie-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.hero .cuarto .b { background: rgba(255, 255, 255, .1); }
.cuarto .b i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.cuarto b { font-family: var(--f-titulo); font-size: 1.05rem; }

/* ---- Podio y rankings ---- */
.podio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; align-items: end; }
.podio-item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px; padding: 12px 6px; box-shadow: var(--sombra); position: relative;
}
.podio-item b { font-size: .8rem; line-height: 1.2; overflow-wrap: anywhere; }
.podio-item.p1 { padding-top: 22px; border-color: var(--estrella); }
.medalla { position: absolute; top: 6px; left: 8px; font-family: var(--f-titulo); font-weight: 800; color: var(--texto-3); }
.p1 .medalla { color: var(--estrella); }
.va-grande { font-family: var(--f-titulo); font-size: 1.9rem; font-weight: 800; color: var(--balon); line-height: 1; }
.va-grande small { font-size: .8rem; color: var(--texto-3); }
.ranking { list-style: none; margin: 0; padding: 0; }
.ranking li { display: grid; grid-template-columns: 24px auto 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--borde); }
.ranking li:last-child { border-bottom: 0; }
.ranking .pos { color: var(--texto-3); text-align: right; font-family: var(--f-titulo); font-weight: 700; }
.ranking .nom { min-width: 0; }
.ranking .nom a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ranking .nom .sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .val { font-family: var(--f-titulo); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.35rem; }
.barrita { display: block; height: 4px; background: var(--superficie-2); border-radius: 2px; margin-top: 4px; }
.barrita i { display: block; height: 100%; background: var(--balon); border-radius: 2px; }

/* ---- Plantillas ---- */
.plantilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .plantilla { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .plantilla { grid-template-columns: repeat(4, 1fr); } }
.ficha-mini {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px; padding: 14px 8px 10px; box-shadow: var(--sombra); min-width: 0;
}
.ficha-mini .estrella { position: absolute; top: 6px; right: 6px; }
.ficha-mini .nombre { font-weight: 700; font-size: .88rem; line-height: 1.2; overflow-wrap: anywhere; }
.trio { display: flex; justify-content: center; gap: 12px; margin-top: 4px; }
.trio span { display: flex; flex-direction: column; align-items: center; font-size: .65rem; color: var(--texto-3); font-weight: 600; }
.trio b { font-family: var(--f-titulo); font-size: 1.25rem; color: var(--texto); font-variant-numeric: tabular-nums; }
.trio.grande { justify-content: space-around; margin: 8px 0; }
.trio.grande b { font-size: 1.6rem; }

.partido-jug .pj-cab { display: flex; align-items: center; gap: 10px; }
.partido-jug .pj-cab > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.partido-jug .res { font-family: var(--f-titulo); font-size: 1.2rem; }
.partido-jug .trio { justify-content: space-around; margin: 8px 0 4px; }

/* ---- Scouting ---- */
.claves { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.claves li { background: var(--superficie); border: 1px solid var(--borde); border-left: 4px solid var(--balon); border-radius: 10px; padding: 10px 12px; }
.quinteto { display: flex; justify-content: space-between; gap: 6px; overflow-x: auto; }
.quinteto a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 60px; font-weight: 600; font-size: .82rem; }
.scout-jugadores { display: grid; gap: 10px; }
@media (min-width: 700px) { .scout-jugadores { grid-template-columns: 1fr 1fr; } }
.scout { margin: 0; }
.scout-cab { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.scout-cab > div { display: flex; flex-direction: column; min-width: 0; }
.tiro-linea { display: flex; justify-content: space-between; gap: 6px; font-size: .85rem; background: var(--superficie-2); padding: 6px 10px; border-radius: 8px; }
.tiro-linea b { font-family: var(--f-titulo); font-size: 1.05rem; }
.tiro-linea small { color: var(--texto-3); }
.etiquetas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.etq { padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--superficie-2); color: var(--texto-2); }
.etq.peligro { background: var(--pierde-suave); color: var(--pierde); }
.etq.ventaja { background: var(--gana-suave); color: var(--gana); }
.scout-tiro { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.zonas-mini { display: grid; gap: 4px; font-size: .8rem; }
.zonas-mini b { font-family: var(--f-titulo); font-size: 1.05rem; }
.zonas-mini small { color: var(--texto-3); }

.perfil .metrica { padding: 6px 0 10px; border-bottom: 1px solid var(--borde); }
.perfil .metrica:last-of-type { border-bottom: 0; }
.m-tit { display: flex; align-items: baseline; gap: 8px; font-size: .88rem; }
.m-tit span:first-child { flex: 1; }
.m-tit b { font-family: var(--f-titulo); font-size: 1.15rem; }
.tira { position: relative; height: 16px; margin: 6px 6px 0; }
.tira::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--borde); border-radius: 1px; }
.tira i { position: absolute; top: 3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; }
.tira .otro, .punto.otro { background: var(--texto-3); opacity: .35; }
.tira .media { top: 0; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--texto-2); }
.tira .este, .punto.este { background: var(--balon); box-shadow: 0 0 0 2px var(--superficie); width: 14px; height: 14px; top: 1px; margin-left: -7px; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.raya { display: inline-block; width: 2px; height: 12px; background: var(--texto-2); margin-right: 6px; vertical-align: -2px; }

/* ---- Gráficos ---- */
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; margin: 6px 0; color: var(--texto-2); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.tit-graf { font-family: var(--f-titulo); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); }
.graf-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.graf-cab select { background: var(--superficie-2); border: 0; border-radius: 8px; padding: 6px 8px; max-width: 55%; }
.columnas { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 18px; margin-top: 8px; }
.columnas .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; gap: 3px; }
.columnas .col div { width: 100%; max-width: 34px; background: var(--balon); border-radius: 4px 4px 0 0; }
.columnas .col b { font-family: var(--f-titulo); font-size: .9rem; }
.columnas .col:hover div { opacity: .8; }
.media-l { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--texto-3); margin-bottom: 21px; pointer-events: none; }
.marcador-svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.marcador-svg .eje { stroke: var(--texto-3); stroke-width: 1; }
.marcador-svg .rejilla-l { stroke: var(--borde); stroke-width: 1; stroke-dasharray: 2 3; }

.comp-stat { padding: 8px 0; border-bottom: 1px solid var(--borde); }
.comp-stat:last-child { border-bottom: 0; }
.comp-stat .tit { font-size: .82rem; color: var(--texto-2); margin-bottom: 4px; font-weight: 600; }
.barra-fila { display: grid; grid-template-columns: 1fr 56px; gap: 8px; align-items: center; margin-top: 2px; }
.barra-pista { height: 12px; }
.barra-relleno { height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.barra-fila .v { font-variant-numeric: tabular-nums; text-align: right; font-size: .85rem; }
.barra-fila .v.mejor { font-weight: 800; }
.comparados { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
@media (min-width: 700px) { .comparados { grid-template-columns: repeat(4, 1fr); } }
.comparado {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px 10px;
  background: var(--superficie); border: 1px solid var(--borde); border-top: 4px solid var(--c, var(--borde)); border-radius: 14px; min-width: 0;
}
.comparado b { font-size: .85rem; overflow-wrap: anywhere; }
.comparado a { position: absolute; top: 6px; right: 10px; color: var(--texto-3); }
.comparado.hueco { border-style: dashed; justify-content: center; color: var(--texto-3); }
.comparado.hueco > span:first-child { font-size: 2rem; line-height: 1; }
.resultados-busqueda { max-height: 300px; overflow: auto; }
.resultados-busqueda button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--borde);
  background: none; padding: 8px 2px; cursor: pointer;
}

/* ---- Jugada a jugada ---- */
.pbp { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.pbp li { display: grid; grid-template-columns: 62px 1fr 52px; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--borde); align-items: center; }
.pbp li > span:nth-child(2) { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pbp .t { white-space: nowrap; font-size: .78rem; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.pbp .m { text-align: right; font-variant-numeric: tabular-nums; color: var(--texto-3); font-family: var(--f-titulo); font-size: 1rem; }
.pbp li.canasta { font-weight: 700; }
.pbp li.canasta .m { color: var(--texto); }
.pbp li.periodo { background: var(--superficie-2); font-weight: 700; border-radius: 8px; }
.pbp .lado { display: inline-block; width: 4px; align-self: stretch; border-radius: 2px; flex: 0 0 4px; }

/* ---- Pista ---- */
.pista svg, .mini-pista, .pista-grande { width: 100%; height: auto; display: block; border-radius: 10px; }
.pista-grande { max-width: 480px; margin: 0 auto; }
.fondo { fill: var(--pista); }
.zona-pintada { fill: var(--pista-zona); }
.linea { fill: none; stroke: var(--pista-linea); stroke-width: .06; }
.tiro-dentro { stroke: var(--superficie); stroke-width: .06; }
.tiro-fuera { fill: none; stroke-width: .09; }
.zonas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }

/* ---- Ajustes ---- */
.ajustes { display: grid; gap: 12px; }
.ajustes label { display: flex; flex-direction: column; gap: 2px; }
.ajustes label.check { flex-direction: row; gap: 10px; align-items: flex-start; }
.ajustes label.check > span { display: flex; flex-direction: column; }
.ajustes input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--balon); margin-top: 2px; }

.nota { color: var(--texto-3); font-size: .8rem; margin: 6px 0; }
details.nota summary { cursor: pointer; }
.pie { color: var(--texto-3); font-size: .75rem; text-align: center; margin-top: 28px; }
.ver-mas { display: inline-block; margin-top: 6px; color: var(--acento); font-weight: 700; font-size: .9rem; }
.v-gana { color: var(--gana); font-weight: 700; }
.v-pierde { color: var(--pierde); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* scouting: puestos, emparejamientos e informes */
.etq.puesto { background: color-mix(in srgb, var(--serie-1) 16%, transparent); color: var(--serie-1); }
.etq.puesto.base { background: color-mix(in srgb, var(--serie-3) 16%, transparent); color: var(--serie-3); }
.etq.puesto.interior { background: color-mix(in srgb, var(--serie-4) 18%, transparent); color: var(--serie-4); }
.etq.tirador { background: var(--balon); color: #fff; }
.marcas { display: grid; gap: 10px; }
@media (min-width: 700px) { .marcas { grid-template-columns: 1.3fr 1fr 1fr; align-items: start; } }
.marca { margin: 0; }
.marca.principal { border: 2px solid var(--balon); }
.prob { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--balon); }
.consejos { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .86rem; }
.consejos li { padding-left: 14px; position: relative; }
.consejos li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--balon); }
button.enlace { background: none; border: 0; padding: 10px 0 0; color: var(--acento); font: inherit; font-weight: 700; cursor: pointer; }
details.informe { margin-top: 12px; border-top: 1px solid var(--borde); }
details.informe > summary { cursor: pointer; color: var(--acento); font-weight: 700; padding: 10px 0 2px; list-style: none; }
details.informe > summary::-webkit-details-marker { display: none; }
details.informe > summary::after { content: " ▾"; }
details.informe[open] > summary::after { content: " ▴"; }
details.informe h4 { margin: 14px 0 6px; font-family: var(--f-titulo); font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); }
.informe-texto { line-height: 1.5; font-size: .9rem; margin: 10px 0 0; }
.puesto-sel { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .85rem; font-weight: 600; }
.puesto-sel select { flex: 1; min-width: 0; }
.pap { display: grid; gap: 4px; }
.pap a { display: grid; grid-template-columns: auto 34px 30px 1fr; gap: 8px; align-items: center; padding: 4px 0; color: inherit; text-decoration: none; }
.pap b { font-family: var(--f-titulo); font-size: 1.1rem; text-align: right; }
.umbrales { display: grid; gap: 8px; }
.umbrales label { font-size: .9rem; }
.umbrales input { width: 64px; font: inherit; padding: 4px 6px; border: 1px solid var(--borde); border-radius: 8px; background: var(--superficie); color: var(--texto); }
.scout-jugadores > *, .marcas > * { min-width: 0; }
.escudo-menu { display: grid; place-items: center; }
.escudo-menu .escudo { width: 24px; height: 24px; }
.menu a:not(.activo) .escudo-menu img { filter: grayscale(1); opacity: .75; }
