/* Sorteo en vivo: escenario vertical 9:16 para proyectar o grabar */
html, body { height: 100%; overflow: hidden; background: #000; }
.escenario {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(100vw, 56.25vh); height: min(100vh, 177.78vw); container-type: size; overflow: hidden; isolation: isolate;
  background: radial-gradient(80% 45% at 50% 58%, rgba(60, 100, 170, .45), transparent 70%),
    linear-gradient(180deg, #010d24 0%, #03152f 30%, #071d38 60%, #0f2848 85%, #163259 100%);
  display: grid; grid-template-rows: auto auto 1fr auto auto; justify-items: center; align-items: start;
  padding: 5cqh 5cqw 4cqh; text-align: center;
}
@media (max-aspect-ratio: 9/16) { .escenario { width: 100vw; height: 100vh; height: 100dvh; } }
.nieve, .confeti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nieve { z-index: 0; }
.confeti { z-index: 20; }
.luz { position: absolute; left: 50%; top: 58%; width: 120cqw; height: 120cqw; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255, 200, 110, .16), transparent 60%); z-index: 0; pointer-events: none; }
.escenario > *:not(.nieve):not(.luz):not(.confeti):not(.v-ganador) { position: relative; z-index: 1; }

.v-cab { display: grid; justify-items: center; }
.v-kicker { margin: 0; font: 700 5.2cqw/1 var(--f-acento); color: var(--oro-luz); }
.v-cab h1 { font-size: 12cqw; color: var(--crema); margin-top: .6cqh; text-shadow: 0 .6cqw 2cqw rgba(1, 8, 24, .8); }
.v-fecha { margin: 1cqh 0 0; font: 700 2.6cqw/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }

.v-premio {
  margin-top: 2.6cqh; width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 4cqw; align-items: center; text-align: left;
  padding: 3cqw 4cqw; border-radius: 5cqw; background: linear-gradient(180deg, rgba(20, 48, 98, .72), rgba(6, 18, 44, .82));
  border: 1px solid rgba(245, 196, 81, .45); box-shadow: 0 3cqw 8cqw -3cqw rgba(0, 0, 0, .8);
}
.v-premio:empty { display: none; }
.v-premio img, .v-premio .regalo { width: 19cqw; height: 19cqw; border-radius: 3.6cqw; object-fit: cover; background: radial-gradient(circle at 50% 35%, #2a5aa0, #0b2350); display: grid; place-items: center; }
.v-premio .regalo svg { width: 12cqw; height: 12cqw; }
.v-premio small { display: block; font: 700 2.4cqw/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--oro); }
.v-premio b { display: block; margin-top: 1.2cqw; font: 400 6.2cqw/1.05 var(--f-display); color: var(--crema); }
.v-premio span { display: block; margin-top: 1cqw; font-size: 3.2cqw; color: #c6d0ec; }

.v-rueda { align-self: center; width: 90cqw; aspect-ratio: 1; margin-top: 1cqh; }
.v-rueda canvas { width: 100%; height: 100%; display: block; }
.v-estado { margin: 1.4cqh 0 0; font: 700 4cqw/1.2 var(--f-texto); color: var(--crema); min-height: 1.2em; }
.v-estado b { color: var(--oro); font-weight: 800; }
.v-ganadores { list-style: none; margin: 1.6cqh 0 0; padding: 0; display: flex; gap: 2cqw; justify-content: center; flex-wrap: wrap; max-width: 100%; }
.v-ganadores li { display: flex; align-items: center; gap: 1.6cqw; padding: 1cqw 3cqw 1cqw 1cqw; border-radius: 999px; background: rgba(6, 18, 44, .7); border: 1px solid var(--linea-2); font: 700 2.6cqw/1.1 var(--f-texto); }
.v-ganadores .ava { padding: .4cqw; }

/* Revelación del ganador */
.v-ganador { position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, rgba(30, 60, 120, .7), rgba(1, 8, 24, .96) 70%); }
.v-ganador[hidden] { display: none; }
.rayos { position: absolute; left: 50%; top: 44%; width: 200cqw; height: 200cqw; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(255, 214, 120, .16) 0deg 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 15%, transparent 55%); mask: radial-gradient(circle, #000 15%, transparent 55%); animation: girar 24s linear infinite; }
@keyframes girar { to { transform: translate(-50%, -50%) rotate(360deg); } }
.v-ganador-in { position: relative; display: grid; justify-items: center; gap: 1.4cqh; padding: 0 6cqw; }
.v-gano { margin: 0; font: 700 9cqw/1 var(--f-acento); color: var(--oro-luz); }
.v-ganador .ava { padding: 2.4cqw; box-shadow: 0 4cqw 10cqw -2cqw rgba(0, 0, 0, .85); }
.v-ganador h2 { font-size: 13cqw; color: var(--crema); text-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .7); overflow-wrap: anywhere; }
.v-ganador-area { margin: 0; font: 700 3cqw/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--oro); }
.v-ganador-premio { margin: 1cqh 0 0; padding: 2cqw 5cqw; border-radius: 999px; background: linear-gradient(180deg, #ffd97a, var(--oro) 45%, var(--oro-2)); color: #241703; font: 700 4.2cqw/1.2 var(--f-texto); }
.v-ganador-premio b { font-weight: 900; }

/* Controles (solo admin); se esconden solos para grabar limpio */
.v-control {
  position: fixed; z-index: 50; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(94vw, 520px); padding: 14px; display: grid; gap: 10px; border-radius: 18px;
  background: rgba(4, 14, 36, .94); border: 1px solid var(--linea-2); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .9);
  transition: opacity .4s, transform .4s var(--ease);
}
.v-control[hidden] { display: none; }
.v-control.dormido { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.v-control .chk { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.v-control .chk input { width: 20px; height: 20px; accent-color: var(--oro); }
.v-control-acc { display: flex; gap: 8px; flex-wrap: wrap; }
.v-control-acc .btn.oro { flex: 1; min-width: 160px; font-size: 17px; }
.v-control-nota { margin: 0; font-size: 13px; color: var(--mute); }
.v-control-nota:empty { display: none; }
