/* Seguimiento público: cómo va cada categoría, los puntos y el historial. Solo lectura, con la energía en la entrada. */
body.seguimiento { min-height: 100dvh; background: radial-gradient(ellipse 70% 40% at 50% -5%, rgba(212,164,55,.14), transparent 60%), var(--negro); display: flex; flex-direction: column; }
.barra { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: rgba(10,10,11,.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--linea); }
.barra-titulo { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sello { font-family: var(--cifra); font-weight: 600; font-size: 13px; letter-spacing: .18em; color: var(--oro); }
#subtitulo { font-size: 13px; color: var(--humo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contenido { width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px; flex: 1; }
.nota { color: var(--humo); font-size: 14px; line-height: 1.5; }
.vacio { padding: 28px; border-radius: 16px; border: 1px dashed var(--linea); color: var(--humo); font-size: 14px; text-align: center; }
.aviso-prueba { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--oro); color: var(--oro); font-size: 13px; font-weight: 600; }
.pie-seg { padding: 18px 20px; text-align: center; font-size: 12px; color: var(--humo); border-top: 1px solid var(--linea); }

.portada h1 { font-size: clamp(40px, 7vw, 72px); line-height: .92; }
.portada p { margin: 10px 0 0; max-width: 60ch; }
.campeonatos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 22px; }
.campeonato { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: var(--carbon); border: 1px solid var(--linea); color: var(--hueso); text-align: left; cursor: pointer; transition: border-color 140ms ease, transform 140ms var(--curva); }
.campeonato:active { transform: scale(.98); }
.campeonato h2 { font-size: 26px; line-height: 1; }
.campeonato .fechas { display: flex; flex-wrap: wrap; gap: 6px; }
.campeonato .fechas span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--linea); font-size: 12px; color: var(--humo); }
.campeonato .fechas span.viva { border-color: var(--linea-oro); color: var(--oro); }

.cabeza { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.cabeza h1 { font-size: clamp(30px, 4.5vw, 48px); line-height: .95; }
.cabeza .sub { color: var(--humo); font-size: 14px; margin-top: 6px; }
.volver { background: none; border: 0; color: var(--oro); cursor: pointer; font: 600 14px var(--texto); padding: 8px 0; min-height: 44px; }

/* Pestañas con píldora que se desliza */
.pestanas { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--linea); overflow: auto; scrollbar-width: none; margin-bottom: 18px; }
.pestanas button { position: relative; z-index: 1; flex: none; border: 0; background: none; cursor: pointer; color: var(--humo); font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 10px; min-height: 44px; transition: color 160ms ease; }
.pestanas button[aria-current="page"] { color: var(--negro); }
.pestanas .pildora { position: absolute; top: 4px; left: 0; height: calc(100% - 8px); border-radius: 10px; background: var(--hueso); transition: transform 260ms var(--curva), width 260ms var(--curva); will-change: transform; }

/* Cascada al entrar: máximo 8 piezas con retraso, el resto aparece junto */
.cascada > * { animation: entra 320ms var(--curva) both; }
.cascada > :nth-child(1) { animation-delay: 0ms; } .cascada > :nth-child(2) { animation-delay: 40ms; } .cascada > :nth-child(3) { animation-delay: 80ms; } .cascada > :nth-child(4) { animation-delay: 120ms; }
.cascada > :nth-child(5) { animation-delay: 160ms; } .cascada > :nth-child(6) { animation-delay: 200ms; } .cascada > :nth-child(7) { animation-delay: 240ms; } .cascada > :nth-child(n+8) { animation-delay: 280ms; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

/* Categorías */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filtros select, .filtros input { min-height: 42px; padding: 0 12px; border-radius: 10px; background: var(--carbon); border: 1px solid var(--linea); color: var(--hueso); font-size: 14px; }
.filtros input { flex: 1; min-width: 180px; }
.grupos { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.grupo { padding: 14px 16px; border-radius: 16px; background: var(--carbon); border: 1px solid var(--linea); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.grupo.terminado { border-color: rgba(127,216,164,.35); }
.grupo-cabeza { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.grupo-cabeza h3 { font-size: 22px; }
.grupo-cabeza .sub { font-size: 12px; color: var(--humo); width: 100%; }
.etiqueta { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--linea); color: var(--humo); white-space: nowrap; }
.etiqueta.verde { border-color: rgba(127,216,164,.4); color: var(--verde-texto); }
.etiqueta.oro { border-color: var(--linea-oro); color: var(--oro); }
.etiqueta.rojo { border-color: rgba(215,25,45,.5); color: var(--rojo-texto); }
.pelea { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--negro); border: 1px solid var(--linea); font-size: 14px; }
.pelea .eti { font-family: var(--cifra); font-weight: 600; font-size: 15px; letter-spacing: .04em; color: var(--humo); white-space: nowrap; }
.pelea .lado { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pelea .lado small { display: block; font-weight: 500; font-size: 11px; color: var(--humo); }
.pelea .lado.azul { color: var(--azul-texto); }
.pelea .lado.rojo { color: var(--rojo-texto); text-align: right; }
.pelea .lado.espera { color: var(--humo); font-weight: 500; }
.pelea .lado.gana::before { content: '★ '; color: var(--oro); }
.pelea .vs { font-family: var(--cifra); font-weight: 600; color: var(--oro); }
.participantes { display: flex; flex-wrap: wrap; gap: 6px; }
.participantes button, .participantes span { padding: 5px 10px; border-radius: 999px; background: var(--negro); border: 1px solid var(--linea); font: 500 13px var(--texto); color: var(--hueso); cursor: pointer; }
.participantes span { cursor: default; }
.resultado { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--negro); border: 1px solid var(--linea); font-size: 14px; }
.resultado b { font-family: var(--cifra); font-size: 17px; font-weight: 600; }
.resultado.primero { border-color: var(--linea-oro); }

/* Ranking: podio y tabla que se reordena */
.podio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; margin: 8px 0 18px; min-height: 180px; }
.podio .puesto { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 8px; border-radius: 14px 14px 0 0; background: var(--carbon); border: 1px solid var(--linea); border-bottom: 3px solid var(--oro); text-align: center; animation: sube 520ms var(--curva-rebote) both; transform-origin: bottom; }
.podio .puesto.p1 { order: 2; min-height: 170px; border-bottom-color: var(--oro); }
.podio .puesto.p2 { order: 1; min-height: 130px; border-bottom-color: #C9D1E0; }
.podio .puesto.p3 { order: 3; min-height: 105px; border-bottom-color: #D08A4E; }
.podio .numero { font-family: var(--titulo); font-size: 34px; line-height: 1; color: var(--oro); }
.podio .p2 .numero { color: #C9D1E0; } .podio .p3 .numero { color: #D08A4E; }
.podio .nombre { font-weight: 600; font-size: 14px; }
.podio .pts { font-family: var(--cifra); font-size: 22px; font-weight: 600; }
.podio small { color: var(--humo); font-size: 12px; }
@keyframes sube { from { transform: scaleY(.6); opacity: 0; } }
.tabla-envoltura { overflow: auto; border-radius: 14px; border: 1px solid var(--linea); background: var(--carbon); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.tabla th { text-align: left; font-weight: 600; font-size: 12px; color: var(--humo); padding: 10px 12px; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.tabla td { padding: 10px 12px; border-bottom: 1px solid var(--linea); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num { font-family: var(--cifra); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tabla .total { color: var(--oro); }
.tabla tr.movida td { animation: destaca 900ms ease; }
@keyframes destaca { from { background: rgba(212,164,55,.18); } }
.tabla button.nombre { background: none; border: 0; color: var(--hueso); font: 600 14px var(--texto); cursor: pointer; padding: 6px 0; text-align: left; min-height: 36px; }
.tabla .team { color: var(--humo); font-size: 12px; }

/* Ficha del peleador */
dialog.ficha { width: min(560px, calc(100vw - 24px)); max-height: 86dvh; padding: 24px; border: 1px solid var(--oro); border-radius: 20px; background: var(--carbon); color: var(--hueso); overflow: auto; }
dialog.ficha::backdrop { background: rgba(0,0,0,.7); }
dialog.ficha[open] { animation: entra 240ms var(--curva); }
.ficha h2 { font-size: 34px; line-height: .95; }
.ficha .team { color: var(--humo); font-size: 14px; margin-top: 4px; }
.titulos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 16px 0; }
.titulos div { padding: 12px; border-radius: 12px; background: var(--negro); border: 1px solid var(--linea-oro); text-align: center; }
.titulos b { display: block; font-family: var(--cifra); font-size: 30px; font-weight: 600; line-height: 1; }
.titulos small { color: var(--humo); font-size: 11px; }
.historial { display: flex; flex-direction: column; gap: 6px; }
.historial div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 8px 10px; border-radius: 10px; background: var(--negro); border: 1px solid var(--linea); font-size: 13px; }
.historial b { font-family: var(--cifra); font-size: 16px; font-weight: 600; }
.actualizado { margin-top: 14px; font-size: 12px; color: var(--humo); text-align: right; }

@media (max-width: 640px) { .pelea { grid-template-columns: auto 1fr; } .pelea .lado.rojo { text-align: left; } .pelea .vs { display: none; } .contenido { padding: 16px 14px 40px; } .barra { padding: 10px 14px; } }
@media (hover: hover) and (pointer: fine) { .campeonato:hover, .participantes button:hover { border-color: var(--oro); } .pestanas button:hover { color: var(--hueso); } .pestanas button[aria-current="page"]:hover { color: var(--negro); } }
@media (prefers-reduced-motion: reduce) { .cascada > *, .podio .puesto { animation: none; } }
