/* ============================================================
   assets/css/publico/en_vivo.css — Pantalla EN VIVO (proyector / celular)
   Pensada para verse de lejos: tipografía grande, alto contraste.
   ============================================================ */
:root {
    --fondo: #060a14;
    --panel: rgba(15, 23, 42, 0.72);
    --borde: rgba(148, 163, 184, 0.18);
    --oro: #f5b301;
    --oro-suave: rgba(245, 179, 1, 0.16);
    --cian: #22d3ee;
    --texto: #f8fafc;
    --gris: #94a3b8;
    --ok: #4ade80;
    --rojo: #f43f5e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(34, 211, 238, 0.12), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(245, 179, 1, 0.10), transparent 60%),
        var(--fondo);
    background-attachment: fixed;
    color: var(--texto);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}
body.sin-cursor, body.sin-cursor * { cursor: none !important; }
[hidden] { display: none !important; }

.vivo { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: clamp(12px, 1.6vw, 26px); padding: clamp(14px, 2vw, 34px); }

/* ---------- Cabecera ---------- */
.vivo-cab { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 28px); }
.vivo-logo-sc { width: clamp(56px, 6.5vw, 120px); height: clamp(56px, 6.5vw, 120px); object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5)); }
.vivo-titulo { flex: 1; min-width: 0; }
.vivo-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(244, 63, 94, 0.16); color: #fda4af; font-size: clamp(0.7rem, 0.85vw, 0.95rem); font-weight: 800; letter-spacing: 0.18em; }
.vivo-chip .punto { width: 9px; height: 9px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); animation: latido 1.8s infinite; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); } }
.vivo-titulo h1 { margin-top: 6px; font-size: clamp(1.3rem, 2.6vw, 3rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vivo-titulo p { margin-top: 4px; color: var(--gris); font-size: clamp(0.8rem, 1.1vw, 1.25rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vivo-reloj { display: flex; align-items: center; gap: 12px; }
.vivo-reloj strong { font-size: clamp(1.3rem, 2.6vw, 3rem); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--oro); }
.vivo-pantalla { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); font-size: 1.2rem; cursor: pointer; }
.vivo-pantalla:hover { border-color: var(--cian); }

/* ---------- Cuerpo: en escena + orden ---------- */
.vivo-cuerpo { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(12px, 1.6vw, 26px); min-height: 0; }
.vivo-escena {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: clamp(18px, 3vw, 54px);
    border-radius: clamp(16px, 1.6vw, 30px);
    background:
        linear-gradient(160deg, rgba(245, 179, 1, 0.14), transparent 45%),
        var(--panel);
    border: 1px solid rgba(245, 179, 1, 0.35);
    box-shadow: inset 0 0 120px rgba(245, 179, 1, 0.06);
}
.vivo-escena.entra { animation: entra 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes entra { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.vivo-etiqueta { position: absolute; top: clamp(14px, 1.6vw, 28px); left: clamp(14px, 1.6vw, 28px); padding: 6px 14px; border-radius: 999px; background: var(--oro); color: #1a1200; font-weight: 900; font-size: clamp(0.75rem, 1vw, 1.1rem); letter-spacing: 0.14em; text-transform: uppercase; }
.vivo-escena.vacia .vivo-etiqueta { background: var(--c-surface-3, #334155); color: var(--texto); }
.vivo-escena-logo { width: clamp(110px, min(17vw, 30vh), 330px); aspect-ratio: 1; flex-shrink: 0; margin-bottom: clamp(12px, 1.6vw, 26px); }
.vivo-escena-img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: #fff; padding: 6%; box-shadow: 0 0 0 6px rgba(245, 179, 1, 0.55), 0 20px 60px rgba(0, 0, 0, 0.55); }
.vivo-escena.vacia .vivo-escena-logo { display: none; }
.vivo-escena h2 { font-size: clamp(1.6rem, 4.2vw, 5.2rem); font-weight: 900; line-height: 1.02; letter-spacing: -0.015em; text-transform: uppercase; max-width: 100%; overflow-wrap: anywhere; }
.vivo-escena.vacia h2 { font-size: clamp(1.4rem, 3vw, 3.4rem); color: var(--gris); }
.vivo-escena > p { margin-top: 10px; color: var(--cian); font-size: clamp(0.9rem, 1.5vw, 1.7rem); font-weight: 600; }
.vivo-escena-pie { display: flex; gap: clamp(20px, 4vw, 70px); margin-top: clamp(16px, 2.4vw, 40px); }
.vivo-escena-pie div { display: flex; flex-direction: column; gap: 2px; }
.vivo-escena-pie small { color: var(--gris); font-size: clamp(0.7rem, 0.9vw, 1rem); text-transform: uppercase; letter-spacing: 0.12em; }
.vivo-escena-pie strong { font-size: clamp(1.1rem, 2vw, 2.4rem); font-weight: 800; font-variant-numeric: tabular-nums; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#v-escena-tiempo { color: var(--oro); }

.vivo-orden { display: flex; flex-direction: column; min-height: 0; padding: clamp(14px, 1.4vw, 26px); border-radius: clamp(16px, 1.6vw, 30px); background: var(--panel); border: 1px solid var(--borde); }
.vivo-orden h3 { font-size: clamp(0.8rem, 1vw, 1.15rem); text-transform: uppercase; letter-spacing: 0.16em; color: var(--gris); margin-bottom: 12px; }
.vivo-orden ol { list-style: none; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: calc(100vh - 300px); scrollbar-width: thin; }
.vivo-orden li { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 12px; padding: clamp(8px, 0.8vw, 14px) 12px; border-radius: 12px; background: rgba(148, 163, 184, 0.06); border: 1px solid transparent; transition: background 0.3s, border-color 0.3s; }
.vivo-orden .num { width: 2em; text-align: center; font-weight: 900; font-size: clamp(0.95rem, 1.2vw, 1.4rem); color: var(--gris); font-variant-numeric: tabular-nums; }
.vivo-orden .mini, .vivo-tabla .mini { width: clamp(30px, 2.6vw, 48px); height: clamp(30px, 2.6vw, 48px); border-radius: 50%; object-fit: contain; background: #fff; padding: 2px; flex-shrink: 0; }
.vivo-orden .info { min-width: 0; }
.vivo-orden .info strong { display: block; font-size: clamp(0.85rem, 1.15vw, 1.35rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vivo-orden .info small { color: var(--gris); font-size: clamp(0.7rem, 0.8vw, 0.95rem); }
.vivo-orden .estado { padding: 4px 10px; border-radius: 999px; font-size: clamp(0.65rem, 0.78vw, 0.9rem); font-weight: 800; white-space: nowrap; background: rgba(148, 163, 184, 0.14); color: var(--gris); }
.vivo-orden .est-escena { background: var(--oro-suave); border-color: rgba(245, 179, 1, 0.55); }
.vivo-orden .est-escena .num { color: var(--oro); }
.vivo-orden .est-escena .estado { background: var(--oro); color: #1a1200; }
.vivo-orden .est-calificando .estado { background: rgba(34, 211, 238, 0.16); color: var(--cian); }
.vivo-orden .est-ok { opacity: 0.78; }
.vivo-orden .est-ok .estado { background: rgba(74, 222, 128, 0.15); color: var(--ok); }
.vivo-iniciales { display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: #0f172a; background: #e2e8f0 !important; font-size: 0.8em; }
.vivo-escena-img.vivo-iniciales { font-size: clamp(2.4rem, 5vw, 6rem); }

/* ---------- Resultados ---------- */
.vivo-resultados { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2vw, 34px); }
.vivo-res-titulo { font-size: clamp(1.4rem, 3vw, 3.6rem); font-weight: 900; text-transform: uppercase; color: var(--oro); letter-spacing: 0.04em; }
.vivo-podio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: clamp(10px, 2vw, 34px); width: min(1300px, 100%); }
.vivo-podio > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; animation: entra 0.8s both; }
.vivo-podio .podio-1 { animation-delay: 0.5s; }
.vivo-podio .podio-3 { animation-delay: 0.25s; }
.vivo-podio .medalla { font-size: clamp(2rem, 4vw, 4.6rem); line-height: 1; }
.vivo-podio .podio-img { width: clamp(80px, 10vw, 190px); height: clamp(80px, 10vw, 190px); border-radius: 50%; object-fit: contain; background: #fff; padding: 5%; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.vivo-podio .podio-1 .podio-img { width: clamp(100px, 13vw, 240px); height: clamp(100px, 13vw, 240px); box-shadow: 0 0 0 6px var(--oro), 0 18px 50px rgba(0, 0, 0, 0.55); }
.vivo-podio strong { font-size: clamp(0.95rem, 1.7vw, 2rem); font-weight: 900; text-transform: uppercase; line-height: 1.08; overflow-wrap: anywhere; }
.vivo-podio small { color: var(--cian); font-size: clamp(0.9rem, 1.4vw, 1.6rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.vivo-podio .base { width: 100%; display: flex; align-items: center; justify-content: center; border-radius: 14px 14px 0 0; font-size: clamp(1.6rem, 3vw, 3.6rem); font-weight: 900; color: rgba(255, 255, 255, 0.9); background: linear-gradient(180deg, rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0.08)); }
.vivo-podio .podio-1 .base { height: clamp(90px, 12vw, 220px); background: linear-gradient(180deg, rgba(245, 179, 1, 0.6), rgba(245, 179, 1, 0.08)); }
.vivo-podio .podio-2 .base { height: clamp(66px, 8.5vw, 160px); }
.vivo-podio .podio-3 .base { height: clamp(50px, 6vw, 120px); background: linear-gradient(180deg, rgba(205, 127, 50, 0.5), rgba(205, 127, 50, 0.08)); }
.vivo-tabla { width: min(1000px, 100%); border-collapse: separate; border-spacing: 0 6px; }
.vivo-tabla td { padding: 10px 14px; background: var(--panel); font-size: clamp(0.85rem, 1.2vw, 1.4rem); font-variant-numeric: tabular-nums; }
.vivo-tabla td:first-child { border-radius: 10px 0 0 10px; width: 4.5em; font-weight: 900; color: var(--gris); text-align: center; }
.vivo-tabla td:last-child { border-radius: 0 10px 10px 0; text-align: right; color: var(--cian); font-weight: 700; }
.vivo-tabla .col-nombre { display: flex; align-items: center; gap: 12px; font-weight: 700; }

/* ---------- Pie ---------- */
.vivo-pie { display: flex; flex-direction: column; gap: 8px; }
.vivo-progreso { height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.16); overflow: hidden; }
.vivo-progreso span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--cian), var(--ok)); transition: width 0.8s ease; }
.vivo-pie > p { color: var(--gris); font-size: clamp(0.75rem, 0.95vw, 1.05rem); }
.vivo-anuncio { overflow: hidden; border-radius: 12px; background: var(--oro); color: #1a1200; font-weight: 800; font-size: clamp(0.95rem, 1.5vw, 1.8rem); white-space: nowrap; padding: 10px 0; }
.vivo-anuncio span { display: inline-block; padding-left: 100%; animation: ticker 22s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }
.vivo-sin-conexion { position: fixed; right: 16px; bottom: 16px; padding: 8px 14px; border-radius: 10px; background: rgba(244, 63, 94, 0.9); color: var(--c-text, #fff); font-weight: 700; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
    .vivo-escena.entra, .vivo-podio > div { animation: none; }
    .vivo-anuncio span { animation-duration: 60s; }
    .vivo-chip .punto { animation: none; }
}

/* ---------- Celular ---------- */
@media (max-width: 820px) {
    .vivo-cuerpo { grid-template-columns: 1fr; }
    .vivo-orden ol { max-height: none; }
    .vivo-titulo h1 { white-space: normal; }
    .vivo-escena-pie strong { max-width: 60vw; }
    .vivo-podio { gap: 8px; }
}

/* ---------- Proyector: todo en una sola pantalla, sin barra de desplazamiento ---------- */
@media (min-width: 821px) {
    .vivo:not(.modo-resultados) { height: 100vh; overflow: hidden; }
    .vivo:not(.modo-resultados) .vivo-orden ol { max-height: none; flex: 1; min-height: 0; }
}
@media (max-width: 520px) {
    .vivo-reloj strong { font-size: 1.05rem; }
    .vivo-escena-pie { flex-direction: column; gap: 10px; }
    .vivo-escena-pie strong { max-width: 80vw; }
    .vivo-orden li { grid-template-columns: auto auto 1fr; }
    .vivo-orden .estado { grid-column: 3; justify-self: start; }
}

/* =================== v2.7: nuevos elementos y modos =================== */
/* Temas de la banda en escena */
.vivo-temas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(10px, 1.2vw, 20px); }
.vivo-tema { padding: 6px 14px; border-radius: 999px; font-size: clamp(0.75rem, 1vw, 1.15rem); font-weight: 700; background: rgba(148, 163, 184, 0.12); color: var(--gris); border: 1px solid transparent; }
.vivo-tema.hecho { color: var(--ok); background: rgba(74, 222, 128, 0.1); }
.vivo-tema.hecho::before { content: '✓ '; }
.vivo-tema.actual { color: #1a1200; background: var(--oro); box-shadow: 0 0 0 4px rgba(245, 179, 1, 0.25); }

/* Tiempo límite */
.vivo-tiempo { width: min(620px, 100%); margin-top: clamp(12px, 1.4vw, 24px); }
.vivo-tiempo-barra { height: clamp(10px, 1vw, 16px); border-radius: 999px; background: rgba(148, 163, 184, 0.18); overflow: hidden; }
.vivo-tiempo-barra span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--ok), #a3e635); transition: width 1s linear; }
.vivo-tiempo-texto { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; gap: 12px; }
.vivo-tiempo-texto strong { font-size: clamp(1.4rem, 2.6vw, 3rem); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--oro); }
.vivo-tiempo-texto span { color: var(--gris); font-size: clamp(0.8rem, 1vw, 1.15rem); font-variant-numeric: tabular-nums; }
.vivo-tiempo.aviso .vivo-tiempo-barra span { background: linear-gradient(90deg, #facc15, #f97316); }
.vivo-tiempo.aviso .vivo-tiempo-texto span { color: var(--c-warning-text, #fdba74); }
.vivo-tiempo.excedido .vivo-tiempo-barra span { background: var(--rojo); }
.vivo-tiempo.excedido strong, .vivo-tiempo.excedido .vivo-tiempo-texto span { color: #fda4af; }
.vivo-tiempo.excedido { animation: alerta 1.2s ease-in-out infinite; }
@keyframes alerta { 50% { opacity: 0.65; } }

/* Avance de cada jurado */
.vivo-jurados { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(10px, 1.2vw, 18px); }
.vivo-jurado { padding: 5px 12px; border-radius: 10px; font-size: clamp(0.72rem, 0.9vw, 1rem); font-weight: 700; background: rgba(148, 163, 184, 0.12); color: var(--gris); }
.vivo-jurado.calificando { background: rgba(34, 211, 238, 0.14); color: var(--cian); }
.vivo-jurado.listo { background: rgba(74, 222, 128, 0.14); color: var(--ok); }
.vivo-escena-pie { margin-top: clamp(12px, 1.6vw, 26px); }

/* Orden agrupado por categoría */
.vivo-orden .vivo-orden-cat { display: block; padding: 10px 4px 2px; background: none; border: 0; color: var(--oro); font-size: clamp(0.7rem, 0.85vw, 0.95rem); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }

/* QR para el público (en la cabecera) */
.vivo-qr { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; background: #fff; color: #0f172a; font-weight: 800; font-size: clamp(0.62rem, 0.75vw, 0.85rem); line-height: 1.15; flex-shrink: 0; }
.vivo-qr canvas { width: clamp(58px, 5.4vw, 96px) !important; height: auto !important; display: block; }

/* «En escena» siempre cabe en la pantalla */
.vivo-escena { justify-content: space-evenly; gap: clamp(4px, 0.8vh, 12px); padding-top: clamp(40px, 6vh, 70px); }
.vivo-escena-logo { width: clamp(80px, min(13vw, 22vh), 300px); margin-bottom: 0; }
.vivo-escena h2 { font-size: clamp(1.4rem, min(3.8vw, 7vh), 5rem); }
.vivo-escena > p { margin-top: 0; }
.vivo-temas, .vivo-tiempo, .vivo-jurados, .vivo-escena-pie { margin-top: 0; }
.vivo-tiempo-texto strong { font-size: clamp(1.2rem, min(2.4vw, 4.4vh), 3rem); }

/* Intermedio */
.vivo-intermedio { position: relative; display: flex; flex-direction: column; min-height: 0; }
.vivo-slide { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.slide { width: min(1300px, 100%); text-align: center; animation: entra 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.slide h2 { font-size: clamp(1.4rem, 3vw, 3.4rem); font-weight: 900; color: var(--oro); margin-bottom: clamp(14px, 2vw, 30px); text-transform: uppercase; letter-spacing: 0.02em; }
.slide-vacio p { color: var(--gris); font-size: clamp(1rem, 1.8vw, 2rem); }
.slide-tabla { list-style: none; display: flex; flex-direction: column; gap: 10px; width: min(1000px, 100%); margin: 0 auto; }
.slide-tabla li { display: grid; grid-template-columns: 4em auto 1fr auto; align-items: center; gap: 16px; padding: clamp(10px, 1vw, 16px) 18px; border-radius: 14px; background: var(--panel); text-align: left; font-size: clamp(1rem, 1.6vw, 1.9rem); }
.slide-tabla li.top1 { border: 1px solid rgba(245, 179, 1, 0.6); background: var(--oro-suave); }
.slide-tabla .pos { font-weight: 900; text-align: center; color: var(--gris); }
.slide-tabla .pts { font-weight: 900; color: var(--cian); font-variant-numeric: tabular-nums; }
.slide-tabla .mini { width: clamp(36px, 3vw, 56px); height: clamp(36px, 3vw, 56px); border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; }
.slide-foto { max-width: 100%; max-height: calc(100vh - 260px); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); object-fit: contain; }
.slide-noticias article { max-width: 1000px; margin: 0 auto 18px; padding: 16px 22px; border-radius: 14px; background: var(--panel); text-align: left; }
.slide-noticias h3 { font-size: clamp(1.1rem, 1.8vw, 2rem); }
.slide-noticias p { color: var(--gris); margin-top: 6px; font-size: clamp(0.9rem, 1.2vw, 1.3rem); }
.slide-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(20px, 3vw, 50px); }
.slide-logos img { max-height: clamp(70px, 10vw, 170px); max-width: clamp(140px, 18vw, 320px); object-fit: contain; background: #fff; border-radius: 14px; padding: 12px; }
.vivo-slide-puntos { display: flex; justify-content: center; gap: 8px; padding: 10px; }
.vivo-slide-puntos span { width: 10px; height: 10px; border-radius: 50%; background: rgba(148, 163, 184, 0.35); }
.vivo-slide-puntos span.activo { background: var(--oro); width: 26px; border-radius: 999px; }

/* Revelación */
.vivo-revelacion { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: clamp(14px, 2vw, 30px); min-height: 0; }
.vivo-rev-titulo { grid-column: 1 / -1; text-align: center; font-size: clamp(1.4rem, 3vw, 3.4rem); font-weight: 900; text-transform: uppercase; }
.vivo-rev-titulo span { color: var(--gris); font-weight: 700; }
.vivo-rev-titulo strong { color: var(--oro); }
.vivo-rev-destacado { display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; }
.rev-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: clamp(20px, 3vw, 50px); border-radius: 24px; background: var(--panel); border: 1px solid var(--borde); width: 100%; }
.rev-card.top1 { border-color: var(--oro); box-shadow: 0 0 80px rgba(245, 179, 1, 0.35); background: linear-gradient(180deg, rgba(245, 179, 1, 0.18), var(--panel)); }
.rev-card.aparece { animation: revela 1.1s cubic-bezier(0.2, 0.9, 0.2, 1.2); }
@keyframes revela { 0% { opacity: 0; transform: scale(0.6) rotateX(60deg); filter: blur(10px); } 60% { opacity: 1; transform: scale(1.06); filter: none; } 100% { transform: none; } }
.rev-puesto { font-size: clamp(1.1rem, 2.2vw, 2.6rem); font-weight: 900; color: var(--oro); text-transform: uppercase; }
.rev-logo { width: clamp(110px, 14vw, 260px); height: clamp(110px, 14vw, 260px); border-radius: 50%; background: #fff; object-fit: contain; padding: 6%; box-shadow: 0 0 0 6px rgba(245, 179, 1, 0.5); }
.rev-nombre { font-size: clamp(1.4rem, 3.4vw, 4rem); font-weight: 900; text-transform: uppercase; line-height: 1.05; }
.rev-pts { font-size: clamp(1.1rem, 2vw, 2.4rem); font-weight: 800; color: var(--cian); font-variant-numeric: tabular-nums; }
.rev-espera { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rev-espera span { font-size: clamp(3rem, 7vw, 8rem); animation: latido 1.2s infinite; }
.rev-espera strong { font-size: clamp(1.6rem, 3.4vw, 4rem); }
.rev-espera small { color: var(--gris); font-size: clamp(1rem, 1.4vw, 1.6rem); }
.vivo-rev-lista { list-style: none; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.vivo-rev-lista li { display: grid; grid-template-columns: 3.4em auto 1fr auto; align-items: center; gap: 12px; padding: clamp(8px, 0.9vw, 14px) 14px; border-radius: 12px; background: var(--panel); font-size: clamp(0.95rem, 1.4vw, 1.6rem); }
.vivo-rev-lista li.oculto { grid-template-columns: 3.4em 1fr; color: #475569; background: rgba(15, 23, 42, 0.45); background: color-mix(in srgb, var(--c-surface-0) 45%, transparent); border: 1px dashed rgba(148, 163, 184, 0.2); }
.vivo-rev-lista li.oculto.podio { color: #fde68a; border: 1px dashed rgba(245, 179, 1, 0.55); background: rgba(245, 179, 1, 0.10); }
.rev-card.rev-podio .rev-pts { font-weight: 700; }
.vivo-rev-lista li.revelado { animation: entra 0.6s both; }
.vivo-rev-lista li.top1 { border: 1px solid var(--oro); background: var(--oro-suave); }
.vivo-rev-lista .pos { font-weight: 900; text-align: center; }
.vivo-rev-lista .pts { color: var(--cian); font-weight: 800; font-variant-numeric: tabular-nums; }
.vivo-rev-lista .mini { width: clamp(32px, 2.6vw, 48px); height: clamp(32px, 2.6vw, 48px); border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; }
.vivo-confeti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 20; }

/* Resultados: pestañas de categoría */
.vivo-res-titulo span { color: var(--texto); }
.vivo-res-pestanas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vivo-res-pestanas span, .vivo-res-pestanas button { border: 0; cursor: pointer; font-family: inherit; padding: 6px 16px; border-radius: 999px; background: rgba(148, 163, 184, 0.12); color: var(--gris); font-weight: 700; font-size: clamp(0.8rem, 1vw, 1.1rem); }
.vivo-res-pestanas span.activo, .vivo-res-pestanas button.activo { background: var(--oro); color: #1a1200; }

@media (min-width: 821px) {
    .vivo[data-modo="intermedio"], .vivo[data-modo="revelacion"] { height: 100vh; overflow: hidden; }
}
@media (max-width: 820px) {
    .vivo-revelacion { grid-template-columns: 1fr; }
    .vivo-qr { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .rev-card.aparece, .vivo-rev-lista li.revelado, .slide, .vivo-tiempo.excedido { animation: none; }
}

/* Revelación e intermedio: siempre dentro de la pantalla */
.vivo-revelacion { grid-template-rows: auto minmax(0, 1fr); }
.vivo-rev-titulo { font-size: clamp(1.2rem, min(3vw, 5.5vh), 3.4rem); }
.vivo-rev-destacado { min-height: 0; overflow: hidden; }
.rev-card { padding: clamp(12px, 2.6vh, 44px); gap: clamp(4px, 1.2vh, 14px); max-height: 100%; }
.rev-logo { width: clamp(80px, min(14vw, 24vh), 260px); height: clamp(80px, min(14vw, 24vh), 260px); }
.rev-nombre { font-size: clamp(1.2rem, min(3.4vw, 6vh), 4rem); }
.rev-puesto { font-size: clamp(1rem, min(2.2vw, 4vh), 2.6rem); }
.rev-pts { font-size: clamp(1rem, min(2vw, 3.6vh), 2.4rem); }
.vivo-rev-lista { min-height: 0; }
.vivo-rev-lista li { padding: clamp(6px, 1.1vh, 14px) 14px; font-size: clamp(0.9rem, min(1.4vw, 2.6vh), 1.6rem); }
.slide { max-height: 100%; }
.slide h2 { font-size: clamp(1.2rem, min(3vw, 5.4vh), 3.4rem); margin-bottom: clamp(8px, 2vh, 30px); }
.slide-tabla { gap: clamp(4px, 1vh, 10px); }
.slide-tabla li { padding: clamp(6px, 1.2vh, 16px) 18px; font-size: clamp(0.95rem, min(1.6vw, 3.2vh), 1.9rem); }
.slide-tabla .mini { width: clamp(30px, min(3vw, 5.5vh), 56px); height: clamp(30px, min(3vw, 5.5vh), 56px); }
.vivo-rev-destacado { overflow: visible; }
.rev-card.top1 { box-shadow: 0 0 50px rgba(245, 179, 1, 0.28); }
.vivo-podio { display: flex; justify-content: center; align-items: flex-end; }
.vivo-podio > div { flex: 0 1 33%; max-width: 420px; }

/* ===== Favorito del público y transmisión ===== */
.vivo-qr.votar { background: linear-gradient(135deg, #fff1f2, #ffffff); box-shadow: 0 0 0 3px #f43f5e, 0 0 30px rgba(244, 63, 94, 0.45); }
.vivo-qr.votar span b { color: #e11d48; font-size: 1.15em; }
.vivo-tv { margin: 0 0 12px; }
.vivo-tv-marco { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid rgba(148, 163, 184, 0.2); }
.vivo-tv-marco iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vivo-votar { display: block; align-self: start; margin: 0 0 12px; padding: 14px; border-radius: 14px; text-align: center; text-decoration: none; font-weight: 800; color: #fff; background: linear-gradient(135deg, #e11d48, #be123c); box-shadow: 0 10px 24px rgba(244, 63, 94, 0.3); }
.vivo-votar[hidden], .vivo-tv[hidden], .vivo-favorito[hidden] { display: none; }
.vivo-favorito { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 14px auto 0; padding: 12px 22px; max-width: 520px; border-radius: 16px; background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(190, 18, 60, 0.15)); border: 1px solid rgba(244, 63, 94, 0.5); text-align: center; }
.vivo-favorito span { color: #fda4af; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.vivo-favorito strong { font-size: min(2.2vw, 3.2vh, 1.6rem); color: var(--c-text, #fff); }
.vivo-favorito small { color: #fecdd3; }
@media (max-width: 819px) { .vivo-favorito strong { font-size: 1.2rem; } }

/* ===== Interacción del público ===== */
.vivo-encuesta { position: fixed; right: max(16px, 1.6vw); bottom: calc(min(9vh, 90px) + 10px); z-index: 30; width: min(34vw, 560px); padding: min(1.6vw, 22px); border-radius: 18px; background: rgba(8, 13, 26, 0.95); border: 1px solid rgba(245, 179, 1, 0.5); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); animation: vivo-encuesta-entra 0.4s ease-out; }
.vivo-encuesta[hidden] { display: none; }
@keyframes vivo-encuesta-entra { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.vivo-encuesta-tipo { display: block; color: var(--c-accent-text, #fcd34d); font-weight: 800; font-size: min(1vw, 0.85rem); letter-spacing: 0.12em; text-transform: uppercase; }
.vivo-encuesta strong { display: block; margin: 4px 0 10px; font-size: min(1.6vw, 2.2vh, 1.5rem); line-height: 1.2; }
.vivo-enc-fila { margin-bottom: 8px; }
.vivo-enc-txt { display: flex; justify-content: space-between; gap: 10px; font-size: min(1.15vw, 1.7vh, 1.05rem); }
.vivo-enc-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vivo-enc-barra { height: min(1vw, 12px); margin-top: 4px; border-radius: 999px; background: rgba(148, 163, 184, 0.18); overflow: hidden; }
.vivo-enc-barra span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22d3ee, #6366f1); transition: width 0.6s ease; }
.vivo-enc-fila.lider .vivo-enc-barra span { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.vivo-encuesta small { display: block; margin-top: 6px; color: var(--c-text-2, #94a3b8); font-size: min(1vw, 1.5vh, 0.9rem); }
.vivo-aplausos { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: min(1vh, 10px) 0; padding: min(0.9vh, 10px) 16px; border-radius: 999px; background: rgba(245, 179, 1, 0.12); border: 1px solid rgba(245, 179, 1, 0.4); }
.vivo-aplausos[hidden] { display: none; }
.vivo-aplausos-t { color: var(--c-accent-text, #fcd34d); font-weight: 800; font-size: min(0.9vw, 1.4vh, 0.85rem); letter-spacing: 0.12em; text-transform: uppercase; }
.vivo-aplausos-n { display: flex; gap: 16px; font-size: min(1.6vw, 2.4vh, 1.5rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.vivo-aplausos.latido { animation: vivo-latido 0.5s ease-out; }
@keyframes vivo-latido { 30% { transform: scale(1.08); box-shadow: 0 0 30px rgba(245, 179, 1, 0.5); } }
.vivo-aplaudida { background: linear-gradient(135deg, rgba(245, 179, 1, 0.2), rgba(180, 83, 9, 0.15)); border-color: rgba(245, 179, 1, 0.5); }
.vivo-aplaudida span { color: var(--c-accent-text, #fcd34d); }
.vivo-min-cel { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(15, 23, 42, 0.85); background: color-mix(in srgb, var(--c-surface-0) 85%, transparent); border: 1px solid rgba(148, 163, 184, 0.16); }
.vivo-min-cel[hidden] { display: none; }
.vivo-min-cel h3 { margin: 0 0 6px; font-size: 0.95rem; }
.vivo-min-cel ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vivo-min-cel li { display: flex; gap: 8px; font-size: 0.88rem; line-height: 1.35; }
.vivo-min-cel time { color: var(--c-accent-text, #fcd34d); font-weight: 800; flex-shrink: 0; }
.vivo-min-cel a { display: inline-block; margin-top: 8px; color: var(--c-primary-text, #67e8f9); font-weight: 700; font-size: 0.85rem; }
@media (max-width: 819px) {
    .vivo-encuesta { position: static; width: auto; margin: 0 0 12px; padding: 14px; }
    .vivo-encuesta-tipo { font-size: 0.72rem; } .vivo-encuesta strong { font-size: 1.05rem; }
    .vivo-enc-txt { font-size: 0.9rem; } .vivo-enc-barra { height: 10px; } .vivo-encuesta small { font-size: 0.8rem; }
    .vivo-aplausos-t { font-size: 0.72rem; } .vivo-aplausos-n { font-size: 1.15rem; }
}
@media (min-width: 820px) {
    .vivo-votar { display: none !important; }            /* en el proyector se usa el QR */
    .vivo-escena { position: relative; }
    .vivo-aplausos { position: absolute; top: min(1.6vh, 18px); right: min(1.2vw, 18px); margin: 0; z-index: 2; }
}

/* Transmisión: botón para activar el sonido (los navegadores no permiten sonido automático) */
.tv-sonido { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 999px; background: rgba(220, 38, 38, 0.95); color: var(--c-text, #fff); font: 800 1rem system-ui, sans-serif; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); animation: tv-sonido-latido 1.6s ease-in-out infinite; white-space: nowrap; }
.tv-sonido span { font-size: 1.2rem; }
@keyframes tv-sonido-latido { 50% { transform: translateX(-50%) scale(1.06); } }

/* Hora aproximada de cada banda pendiente */
.vivo-orden .info small.hora { display: block; color: var(--c-accent-text, #fcd34d); font-weight: 700; }

/* ============================================================
   v4.8 — TANDA DE AUSPICIADORES (pantalla completa, sobre todo lo demás)
   ============================================================ */
.vivo-tanda { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 2vh; padding: 3vh 4vw 0;
    background: radial-gradient(70% 60% at 50% 40%, rgba(245, 179, 1, 0.16), transparent 70%), radial-gradient(1200px 600px at 10% 110%, rgba(34, 211, 238, 0.16), transparent 60%), #050914;
    animation: tanda-entra 0.5s ease; }
@keyframes tanda-entra { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.vivo-tanda-cab { display: flex; align-items: center; justify-content: center; gap: 1.2vw; font-size: clamp(0.9rem, 1.6vw, 1.8rem); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gris); }
.vivo-tanda-cab b { padding: 0.35em 0.9em; border-radius: 999px; font-size: 0.8em; letter-spacing: 0.14em; color: #1a1200; background: var(--oro); }
.vivo-tanda-cab b:empty { display: none; }
.vivo-tanda-escena { display: grid; place-items: center; min-height: 0; }
.vivo-tanda-pieza { display: grid; justify-items: center; align-content: center; gap: 2.4vh; max-width: 100%; max-height: 100%; text-align: center; animation: tanda-pieza 0.6s ease; }
@keyframes tanda-pieza { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.vivo-tanda-logo { display: flex; align-items: center; justify-content: center; width: min(52vh, 70vw); height: min(52vh, 70vw); padding: 5%; border-radius: 6%; background: #fff; box-shadow: 0 0 0 1vh rgba(245, 179, 1, 0.35), 0 4vh 8vh rgba(0, 0, 0, 0.6); }
.vivo-tanda-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.vivo-tanda-pieza h2 { font-size: clamp(1.6rem, 4.2vw, 5rem); line-height: 1.05; color: #fff; text-shadow: 0 0.06em 0.2em rgba(0, 0, 0, 0.6); }
.vivo-tanda-pieza p { max-width: 40ch; font-size: clamp(1rem, 2vw, 2.2rem); color: #cbd5e1; }
.vivo-tanda-pieza.con-banner { width: 100%; height: 100%; }
.vivo-tanda-banner { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 1.5vh; box-shadow: 0 4vh 8vh rgba(0, 0, 0, 0.6); }
.vivo-tanda-tira { display: flex; justify-content: center; gap: 1.2vw; flex-wrap: wrap; }
.vivo-tanda-tira span { display: flex; align-items: center; justify-content: center; width: clamp(60px, 8vw, 140px); height: clamp(40px, 5vw, 80px); padding: 0.5vh; border-radius: 1vh; background: #fff; opacity: 0.45; transition: opacity 0.3s, transform 0.3s; }
.vivo-tanda-tira span.activo { opacity: 1; transform: translateY(-4px); box-shadow: 0 0 0 3px var(--oro); }
.vivo-tanda-tira img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.vivo-tanda-barra { height: 0.8vh; min-height: 5px; margin: 0 -4vw; background: rgba(255, 255, 255, 0.08); }
.vivo-tanda-barra span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cian), var(--oro)); transition: width 0.25s linear; }
body.con-tanda { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .vivo-tanda, .vivo-tanda-pieza { animation: none; } }
@media (max-width: 700px) { .vivo-tanda-cab { flex-direction: column; gap: 8px; letter-spacing: 0.14em; } .vivo-tanda-cab b { letter-spacing: 0.08em; } }

/* ===== v4.12: llamado a escena (cuenta regresiva a pantalla completa) ===== */
.vivo-llamado { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 4vh 4vw;
    background: radial-gradient(circle at 50% 40%, rgba(255, 196, 0, .28), rgba(6, 10, 30, .94) 65%); backdrop-filter: blur(4px); }
.vivo-llamado[hidden] { display: none; }
.vivo-llamado-caja { display: flex; flex-direction: column; align-items: center; gap: 1.6vh; text-align: center; color: #fff; max-width: 92vw; animation: llamadoEntra .5s cubic-bezier(.2, .9, .3, 1.2); }
.vivo-llamado-etq { font-size: clamp(1rem, 2.4vw, 1.8rem); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ffd54a; }
.vivo-llamado-logo img, .vivo-llamado-logo .llamado { width: clamp(90px, 16vh, 180px); height: clamp(90px, 16vh, 180px); border-radius: 50%; object-fit: cover; background: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: clamp(2rem, 6vh, 4rem); font-weight: 800; color: #0b1a4a; box-shadow: 0 0 0 6px rgba(255, 213, 74, .6); }
.vivo-llamado-caja strong { font-size: clamp(2rem, 7vw, 6rem); line-height: 1.05; font-weight: 900; text-wrap: balance; }
.vivo-llamado-sub { font-size: clamp(1.4rem, 4vw, 3.4rem); font-weight: 800; color: #ffd54a; }
.vivo-llamado-cuenta { font-size: clamp(4rem, 16vh, 11rem); line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 40px rgba(255, 213, 74, .7); }
.vivo-llamado.final .vivo-llamado-cuenta { color: #ff6b5b; animation: llamadoLatido 1s ease-in-out infinite; }
body.con-llamado { overflow: hidden; }
@keyframes llamadoEntra { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes llamadoLatido { 50% { transform: scale(1.08); } }

/* ===== v4.12: botón de sonido de la revelación ===== */
.vivo-sonido { position: absolute; right: 2vw; bottom: 2vh; z-index: 5; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(0, 0, 0, .45); color: #fff; font-weight: 700; cursor: pointer; opacity: .75; }
.vivo-sonido:hover, .vivo-sonido:focus-visible { opacity: 1; }
.vivo-sonido[aria-pressed="true"] { background: rgba(31, 168, 85, .55); border-color: rgba(31, 168, 85, .9); }
body.sin-cursor .vivo-sonido { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .vivo-llamado-caja, .vivo-llamado.final .vivo-llamado-cuenta { animation: none; } }

/* v4.16.1 — el podio no se revela en pantalla: se anuncia en la premiación */
.rev-podio-aviso { margin: 0; padding: 10px 18px; border-radius: 999px; border: 1px dashed rgba(245, 179, 1, 0.6); background: rgba(245, 179, 1, 0.12); color: #fde68a; font-weight: 700; font-size: clamp(0.95rem, 1.5vw, 1.6rem); text-align: center; }
:root[data-theme="light"] .rev-podio-aviso, :root[data-theme="light"] .vivo-rev-lista li.oculto.podio { color: #92400e; }

/* ===== v4.17: sorteo del orden de una categoría ===== */
.vivo-sorteo { position: fixed; inset: 0; z-index: 69; display: grid; place-items: center; padding: 4vh 4vw;
    background: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, .22), rgba(6, 10, 30, .95) 65%); backdrop-filter: blur(4px); }
.vivo-sorteo[hidden] { display: none; }
.vivo-sorteo-caja { width: min(1100px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 1.6vh; color: #fff; text-align: center; }
.vivo-sorteo-cat { font-size: clamp(1.8rem, 4.6vw, 4.4rem); font-weight: 900; line-height: 1.05; text-transform: uppercase; }
.vivo-sorteo-lista { list-style: none; margin: 1vh 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.2vh 1.4vw; }
.vivo-sorteo-lista li { display: grid; grid-template-columns: 3.2em auto 1fr; align-items: center; gap: 14px; padding: 1.2vh 1.2vw; border-radius: 14px;
    background: rgba(15, 23, 42, .75); border: 1px solid rgba(148, 163, 184, .25); font-size: clamp(1rem, 1.9vw, 1.9rem); text-align: left; }
.vivo-sorteo-lista .pos { font-weight: 900; color: #ffd54a; font-variant-numeric: tabular-nums; }
.vivo-sorteo-lista li.oculto { color: #64748b; border-style: dashed; }
.vivo-sorteo-lista li.oculto .mini, .vivo-sorteo-lista li.oculto img { opacity: .25; filter: grayscale(1); }
.vivo-sorteo-lista li.sale { border-color: #ffd54a; box-shadow: 0 0 0 2px rgba(255, 213, 74, .35); animation: sorteoSale .6s cubic-bezier(.2, .9, .3, 1.3); }
.vivo-sorteo-cod { color: #cbd5e1; font-size: clamp(.85rem, 1.2vw, 1.2rem); letter-spacing: .04em; }
@keyframes sorteoSale { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vivo-sorteo-lista li.sale { animation: none; } }

/* ===== v4.17: mensajes de aliento del público ===== */
.vivo-alientos { position: fixed; left: 0; bottom: 0; width: 40vw; height: 70vh; pointer-events: none; z-index: 40; overflow: hidden; }
.vivo-aliento { position: absolute; bottom: -10vh; padding: .5em 1em; border-radius: 999px; background: rgba(245, 179, 1, .92); color: #111827; font-weight: 900;
    font-size: clamp(1rem, 2vw, 2.2rem); white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); animation: alientoSube 6.4s ease-out forwards; }
@keyframes alientoSube { 0% { transform: translateY(0) scale(.8); opacity: 0; } 10% { opacity: 1; transform: translateY(-12vh) scale(1); } 80% { opacity: 1; } 100% { transform: translateY(-72vh); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vivo-aliento { animation: alientoQuieto 6.4s linear forwards; bottom: 4vh; } @keyframes alientoQuieto { 0%, 90% { opacity: 1; } 100% { opacity: 0; } } }
.vivo-sorteo-lista .mini, .vivo-sorteo-lista img { width: 1.9em; height: 1.9em; border-radius: 50%; object-fit: cover; background: #fff; color: #0b1a4a; display: inline-flex; align-items: center; justify-content: center; font-size: .7em; font-weight: 800; }

/* ===== v4.18: formato de la pantalla (panel de control o ?formato= en la dirección) ===== */
/* Vertical (pantalla LED o televisor girado): todo en una columna */
body.fmt-vertical .vivo-cuerpo, body.fmt-vertical .vivo-revelacion { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.3fr) minmax(0, 1fr); }
body.fmt-vertical .vivo-titulo h1 { white-space: normal; font-size: clamp(1.6rem, 4.6vw, 4.4rem); }
body.fmt-vertical .vivo-titulo p, body.fmt-vertical .vivo-orden li { font-size: clamp(1rem, 2.2vw, 2rem); }
body.fmt-vertical .vivo-logo-sc { width: clamp(70px, 11vw, 180px); height: clamp(70px, 11vw, 180px); }
body.fmt-vertical .vivo-alientos { width: 70vw; height: 50vh; }
/* Automático: una pantalla grande puesta en vertical se acomoda sola */
@media (orientation: portrait) and (min-width: 821px) {
    body:not(.fmt-horizontal) .vivo-cuerpo, body:not(.fmt-horizontal) .vivo-revelacion { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.3fr) minmax(0, 1fr); }
    body:not(.fmt-horizontal) .vivo-titulo h1 { white-space: normal; }
}
/* Horizontal: dos columnas aunque la pantalla sea angosta */
@media (max-width: 820px) { body.fmt-horizontal .vivo-cuerpo { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } }
/* Proyector: fondo negro sólido, sin transparencias ni degradados y textos secundarios más claros (se leen mejor proyectados) */
body.fmt-proyector { --fondo: #000; --panel: #0f172a; --borde: rgba(255, 255, 255, 0.4); --gris: #e2e8f0; background: #000; }
body.fmt-proyector .vivo-escena, body.fmt-proyector .vivo-orden, body.fmt-proyector .vivo-orden li { background: #0f172a; backdrop-filter: none; box-shadow: none; }
body.fmt-proyector .vivo-orden li { border: 1px solid rgba(255, 255, 255, 0.25); }
body.fmt-proyector .vivo-titulo p, body.fmt-proyector .vivo-orden small { color: #e2e8f0; }
/* v4.18: en el celular la pantalla se desplaza: ninguna fila se estira (antes el botón «Participa» crecía) */
@media (max-width: 820px) { .vivo { grid-template-rows: none; grid-auto-rows: auto; } }

/* v4.21.4: revelación con suspenso (del 4.° al 1.°) */
.rev-suspenso { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2vh, 24px); padding: clamp(18px, 3vh, 44px); border-radius: 24px; background: radial-gradient(ellipse at 50% 40%, rgba(245, 179, 1, .16), var(--panel) 70%); border: 1px solid var(--borde); overflow: hidden; }
.rev-suspenso.final { border-color: var(--oro); box-shadow: 0 0 80px rgba(245, 179, 1, .3); }
.rev-sus-titulo { font-size: clamp(1.2rem, min(3vw, 5vh), 3.2rem); font-weight: 900; letter-spacing: .04em; text-align: center; color: var(--oro); animation: rev-pulso 1s ease-in-out infinite; }
@keyframes rev-pulso { 50% { transform: scale(1.05); opacity: .85; } }
.rev-ruleta { min-height: clamp(150px, 30vh, 360px); display: grid; place-items: center; width: 100%; }
.rev-ruleta-item { display: flex; flex-direction: column; align-items: center; gap: 10px; filter: blur(.4px); opacity: .92; }
.rev-ruleta-item strong { font-size: clamp(1.1rem, min(2.6vw, 4.4vh), 2.8rem); font-weight: 800; text-align: center; }
.rev-cuenta { font-size: clamp(5rem, 18vh, 14rem); font-weight: 900; color: var(--oro); }
.rev-sus-barra { display: block; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--oro), #fff); transform-origin: left; animation: rev-barra linear forwards; }
@keyframes rev-barra { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rev-suspenso.rev-flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: rev-flash .28s ease-out forwards; }
@keyframes rev-flash { from { opacity: .95; } to { opacity: 0; } }
.vivo-rev-lista li.oculto.en-juego { border: 1px solid var(--oro); color: #fde68a; animation: latido 1s infinite; }
@media (prefers-reduced-motion: reduce) { .rev-sus-titulo, .vivo-rev-lista li.oculto.en-juego { animation: none; } .rev-suspenso.rev-flash::after { animation: none; opacity: 0; } }

/* v4.21.5: pestañas de categoría tocables (resultados) */
.vivo-res-pestanas button { min-height: 42px; padding: 8px 18px; transition: background .2s, color .2s, transform .1s; }
.vivo-res-pestanas button:active { transform: scale(.96); }
.vivo-res-pestanas button:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
/* v4.21.6: que un toque largo no seleccione el texto de la pestaña */
.vivo-res-pestanas, .vivo-res-pestanas button { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; position: relative; z-index: 2; }

/* v4.21.7: botón de foto de la tabla (solo superadmin) */
.vivo-res-foto { display: block; margin: 18px auto 0; padding: 12px 22px; min-height: 46px; border-radius: 999px; border: 2px solid var(--oro); background: transparent; color: var(--oro); font: 700 1rem/1.2 inherit; cursor: pointer; }
.vivo-res-foto small { font-weight: 500; opacity: .75; }
.vivo-res-foto:disabled { opacity: .6; cursor: wait; }
.fmt-proyector .vivo-res-foto { display: none; }
/* v4.21.8: dos botones de foto (categoría y tabla general) */
.vivo-res-fotos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; }
.vivo-res-fotos .vivo-res-foto { margin: 0; }
.vivo-res-fotos > small { flex-basis: 100%; text-align: center; color: var(--gris); font-size: .8rem; }
.fmt-proyector .vivo-res-fotos { display: none; }

/* =========================================================================================
   v4.22.1 — Pulido de movimiento: revelación y podio (momentos de celebración, pocas veces por
   concurso). Solo transform y opacity; curva de salida fuerte; nada aparece desde tamaño cero.
   ========================================================================================= */

/* Ruleta tipo rodillo: los nombres se apilan en la misma celda y el JS los desliza (WAAPI) */
.rev-ruleta { display: grid; place-items: center; overflow: hidden; }
.rev-ruleta-item { grid-area: 1 / 1; filter: none; opacity: 1; will-change: transform, opacity; }

/* Tarjeta del ganador: sube y se asienta; luego entran sus partes, una tras otra */
.rev-card.aparece { position: relative; animation: rev-card-entra 700ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; }
.rev-card.aparece > * { animation: rev-hijo 520ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; }
.rev-card.aparece > :nth-child(1) { animation-delay: 120ms; }
.rev-card.aparece > :nth-child(2) { animation-delay: 200ms; }
.rev-card.aparece > :nth-child(3) { animation-delay: 300ms; }
.rev-card.aparece > :nth-child(4) { animation-delay: 380ms; }
@keyframes rev-card-entra { from { opacity: 0; transform: translateY(28px) scale(0.94); } 70% { opacity: 1; transform: translateY(0) scale(1.015); } to { opacity: 1; transform: none; } }
@keyframes rev-hijo { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* 1.er puesto: un halo dorado que se expande una sola vez detrás de la tarjeta */
.rev-card.aparece.top1::before { content: ""; position: absolute; inset: -4%; border-radius: 32px; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(245, 179, 1, 0.55), rgba(245, 179, 1, 0) 70%);
    animation: rev-halo 1400ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 150ms both; }
@keyframes rev-halo { from { opacity: 0.9; transform: scale(0.8); } to { opacity: 0; transform: scale(1.35); } }

/* Lista de puestos: solo la fila recién revelada entra (las demás ya estaban) */
.vivo-rev-lista li.revelado { animation: none; }
.vivo-rev-lista li.recien { animation: rev-fila 600ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 250ms both; }
@keyframes rev-fila { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* Podio: 3.° → 2.° → 1.° (crescendo). Primero crece la base, luego llegan escudo, nombre y puntaje */
.vivo-podio > div { animation: none; }
.vivo-podio .base { transform-origin: bottom; animation: podio-base 600ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; }
.vivo-podio > div > :not(.base) { animation: podio-sube 560ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; }
.vivo-podio .podio-3 .base { animation-delay: 0ms; }
.vivo-podio .podio-2 .base { animation-delay: 160ms; }
.vivo-podio .podio-1 .base { animation-delay: 340ms; }
.vivo-podio .podio-3 > :not(.base) { animation-delay: 260ms; }
.vivo-podio .podio-2 > :not(.base) { animation-delay: 420ms; }
.vivo-podio .podio-1 > :not(.base) { animation-delay: 620ms; }
.vivo-podio .podio-1 .medalla { animation: podio-medalla 700ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 760ms both; }
@keyframes podio-base { from { opacity: 0; transform: scaleY(0.15); } to { opacity: 1; transform: none; } }
@keyframes podio-sube { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes podio-medalla { from { opacity: 0; transform: translateY(-24px) scale(0.9); } 60% { opacity: 1; transform: translateY(3px) scale(1.04); } to { opacity: 1; transform: none; } }

/* Tabla (4.° en adelante): filas escalonadas 50 ms, después del podio */
.vivo-tabla tr { animation: podio-sube 420ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; animation-delay: calc(700ms + var(--i, 0) * 50ms); }

/* Menos movimiento: se conserva la aparición (opacidad), sin desplazamientos ni halos */
@media (prefers-reduced-motion: reduce) {
    .rev-card.aparece, .rev-card.aparece > *, .vivo-rev-lista li.recien, .vivo-podio .base, .vivo-podio > div > :not(.base), .vivo-podio .podio-1 .medalla, .vivo-tabla tr { animation: vivo-solo-opacidad 300ms ease both; animation-delay: 0ms; }
    .rev-card.aparece.top1::before { animation: none; opacity: 0; }
}
@keyframes vivo-solo-opacidad { from { opacity: 0; } to { opacity: 1; } }
