/* Ruleta Bull · Gran sorteo de Navidad 2026
   Paleta oficial Bull: #EF5F17 · #FF6900 · #CE8D00 */

:root {
  --negro: #0b0604;
  --carbon: #170b06;
  --naranja: #EF5F17;
  --naranja-vivo: #FF6900;
  --naranja-claro: #FF9459;
  --dorado: #CE8D00;
  --oro: #E9B949;
  --oro-claro: #FFE3A0;
  --crema: #FFF4E6;
  --texto: #FFF8F0;
  --texto-suave: rgba(255, 238, 222, .66);
  --vidrio: rgba(255, 240, 225, .055);
  --borde: rgba(255, 220, 180, .14);
  --d: min(83vh, 56vw);
  --gutter: clamp(16px, 3.6vw, 64px);
  --display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--display);
  color: var(--texto);
  background:
    radial-gradient(120% 80% at 30% -10%, #4b1a06 0%, rgba(75, 26, 6, 0) 55%),
    radial-gradient(90% 70% at 100% 110%, #3a1505 0%, rgba(58, 21, 5, 0) 60%),
    linear-gradient(180deg, #1a0b05 0%, var(--negro) 70%);
  background-color: var(--negro);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; color: inherit; }
button:focus-visible, textarea:focus-visible, input:focus-visible, .soltar:focus-within {
  outline: 2px solid var(--oro);
  outline-offset: 3px;
}

/* ───────── Fondo ───────── */
.aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.aurora span {
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  mix-blend-mode: screen;
  animation: deriva 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: radial-gradient(circle, #FF6900 0%, transparent 65%); left: -15vmax; top: -20vmax; }
.aurora span:nth-child(2) { background: radial-gradient(circle, #CE8D00 0%, transparent 65%); right: -20vmax; top: 10vmax; animation-duration: 32s; opacity: .22; }
.aurora span:nth-child(3) { background: radial-gradient(circle, #EF5F17 0%, transparent 65%); left: 25vw; bottom: -35vmax; animation-duration: 38s; opacity: .2; }

@keyframes deriva {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

#fondo { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

#guirnalda { position: fixed; top: 0; left: 0; width: 100%; height: 96px; pointer-events: none; z-index: 2; overflow: visible; }
#guirnalda .cable { fill: none; stroke: #2b1a10; stroke-width: 2; }
#guirnalda .foco { animation: titilar 2.6s ease-in-out infinite alternate; }
#guirnalda .casquillo { fill: #3b2a1c; }

@keyframes titilar {
  0%, 35% { opacity: 1; }
  60% { opacity: .35; }
  100% { opacity: .95; }
}

/* ───────── Intro ───────── */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: radial-gradient(70% 60% at 50% 45%, #3a1405 0%, #120704 60%, #070302 100%);
  transition: opacity .9s ease, visibility .9s ease, transform .9s ease;
  cursor: pointer;
}
.intro.fuera { opacity: 0; visibility: hidden; transform: scale(1.06); }
.intro-halo {
  position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 105, 0, .38), transparent 62%);
  filter: blur(10px);
  animation: latir 2.4s ease-in-out infinite;
}
.intro-logo {
  position: relative;
  width: min(58vw, 540px);
  aspect-ratio: 560 / 204;
  background: linear-gradient(100deg, #fff 0%, #fff 42%, #FFD27A 48%, #FF9459 50%, #FFD27A 52%, #fff 58%, #fff 100%);
  background-size: 320% 100%;
  background-position: 100% 0;
  -webkit-mask: url(../assets/logo-bull-white.png) center / contain no-repeat;
  mask: url(../assets/logo-bull-white.png) center / contain no-repeat;
  animation: logoEntra 1.1s cubic-bezier(.2, .8, .2, 1) both, barrido 1.8s .6s ease-in-out both;
}
.intro-sub {
  position: relative; margin: 0;
  font-weight: 600; text-transform: uppercase; letter-spacing: .42em; font-size: clamp(12px, 1.5vw, 18px);
  color: var(--texto-suave);
  animation: subir .9s .9s cubic-bezier(.2, .8, .2, 1) both;
}
.intro-sub em { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: .02em; font-size: 1.7em; color: var(--oro-claro); }
.intro-sub b { color: var(--naranja-vivo); font-weight: 900; }
.intro-barra { position: relative; width: min(260px, 60vw); height: 2px; background: rgba(255, 255, 255, .1); border-radius: 2px; overflow: hidden; }
.intro-barra span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--naranja-vivo), var(--oro-claro)); transform-origin: left; animation: cargar 2.6s ease-in-out both; }

@keyframes logoEntra { from { opacity: 0; transform: scale(.86); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes barrido { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cargar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes latir { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.05); opacity: 1; } }

/* ───────── Barra superior ───────── */
.barra {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 3vh, 34px) var(--gutter) 0;
}
.barra-logo { height: clamp(30px, 3.4vw, 46px); width: auto; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .5)); }
.barra-acciones { display: flex; gap: 10px; }

.icono {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--borde);
  background: rgba(20, 10, 6, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.icono:hover { background: rgba(255, 105, 0, .18); border-color: rgba(255, 150, 80, .5); }
.icono:active { transform: scale(.95); }
.icono svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icono svg path:first-child { fill: currentColor; }
#btnPantalla svg path:first-child, #btnDatos svg path:first-child, #btnCerrarCajon svg path:first-child { fill: none; }
.icono-texto span { font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
#btnSonido .no-sonido { display: none; }
#btnSonido.mudo .si-sonido { display: none; }
#btnSonido.mudo .no-sonido { display: block; }

/* ───────── Escenario ───────── */
.escenario {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 29vw, 480px);
  align-items: center;
  gap: clamp(16px, 3vw, 56px);
  padding: 8px var(--gutter);
  min-height: 0;
}

.zona-ruleta { display: flex; align-items: center; justify-content: center; min-height: 0; }

.ruleta { position: relative; width: var(--d); height: var(--d); flex-shrink: 0; }
.ruleta canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.ruleta-sombra {
  position: absolute; inset: 3%; border-radius: 50%;
  box-shadow: 0 calc(var(--d) * .06) calc(var(--d) * .1) calc(var(--d) * -.01) rgba(0, 0, 0, .85),
    0 0 calc(var(--d) * .16) calc(var(--d) * .01) rgba(255, 105, 0, .28);
  transition: box-shadow .6s;
}
.ruleta.girando .ruleta-sombra {
  box-shadow: 0 calc(var(--d) * .06) calc(var(--d) * .1) calc(var(--d) * -.01) rgba(0, 0, 0, .85),
    0 0 calc(var(--d) * .22) calc(var(--d) * .03) rgba(255, 105, 0, .45);
}
.ruleta.gano .ruleta-sombra { animation: destello .5s ease-in-out 4 alternate; }
@keyframes destello { to { box-shadow: 0 0 calc(var(--d) * .25) calc(var(--d) * .05) rgba(255, 210, 122, .65); } }

.puntero {
  position: absolute; z-index: 4;
  top: calc(var(--d) * -.045); left: 50%;
  width: calc(var(--d) * .085); height: auto;
  transform-origin: 50% 29%;
  transform: translateX(-50%);
  will-change: transform;
}

.centro {
  position: absolute; z-index: 3; left: 50%; top: 50%;
  width: 21%; height: 21%;
  transform: translate(-50%, -50%);
  border: none; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, #fbf3ea 55%, #e2cdb6 100%);
  box-shadow:
    0 0 0 calc(var(--d) * .011) #E9B949,
    0 0 0 calc(var(--d) * .019) #8a5600,
    0 calc(var(--d) * .012) calc(var(--d) * .04) rgba(0, 0, 0, .55),
    inset 0 calc(var(--d) * -.008) calc(var(--d) * .02) rgba(90, 40, 0, .18);
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2, 1.4, .4, 1);
}
.centro:hover { transform: translate(-50%, -50%) scale(1.05); }
.centro:active { transform: translate(-50%, -50%) scale(.97); }
.centro:disabled { cursor: default; }
.centro img { position: relative; z-index: 1; width: 74%; height: auto; pointer-events: none; }
.centro-anillo {
  position: absolute; inset: -9%; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(255, 210, 122, .85) 80%, transparent 96%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 70%, transparent 71%);
  mask: radial-gradient(circle, transparent 60%, #000 61%, #000 70%, transparent 71%);
  animation: rotar 3.2s linear infinite;
}
.ruleta.girando .centro-anillo { animation-duration: .9s; }
@keyframes rotar { to { transform: rotate(360deg); } }

/* ───────── Panel ───────── */
.panel {
  display: flex; flex-direction: column; gap: clamp(10px, 1.7vh, 18px);
  max-height: calc(100vh - 150px);
  overflow-y: auto; overflow-x: hidden;
  padding: 6px 4px 6px 0;
  scrollbar-width: thin; scrollbar-color: rgba(255, 200, 150, .25) transparent;
}
.panel > * { flex-shrink: 0; }
.panel > .lista-ganadores { flex-shrink: 1; min-height: 132px; display: flex; flex-direction: column; }

.titulo { text-align: left; }
.titulo-kicker {
  display: block; font-size: clamp(11px, .95vw, 14px); font-weight: 700;
  letter-spacing: .38em; text-transform: uppercase; color: var(--oro);
}
.titulo h1 { margin: 2px 0 0; line-height: .95; font-size: clamp(42px, 4.1vw, 78px); display: flex; align-items: baseline; gap: .18em; flex-wrap: wrap; }
.titulo h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(180deg, #FFF6DC 0%, #FFE3A0 40%, #E9B949 75%, #B07400 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(233, 185, 73, .25));
}
.titulo h1 b {
  font-weight: 900; font-size: .62em; letter-spacing: .02em;
  background: linear-gradient(180deg, #FFB27A 0%, #FF6900 55%, #D9480A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.titulo-lema {
  margin: 10px 0 0; display: flex; align-items: center; gap: 12px;
  font-weight: 900; font-size: clamp(13px, 1.25vw, 19px); letter-spacing: .34em; text-transform: uppercase;
  color: var(--crema);
}
.titulo-lema::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 220, 180, .5), transparent); }

.tarjeta {
  background: var(--vidrio);
  border: 1px solid var(--borde);
  border-radius: 20px;
  padding: clamp(12px, 1.6vh, 18px) 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 40px -24px rgba(0, 0, 0, .8);
}
.tarjeta h2 {
  margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--oro);
}
.etiqueta { display: block; font-size: 11px; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--oro); }

.premio-juego { display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden; }
.premio-juego::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 227, 160, .09) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: brillo 4.5s ease-in-out infinite;
  pointer-events: none;
}
.premio-juego-icono {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #FF8A3D, #D9480A);
  box-shadow: 0 10px 24px -8px rgba(255, 105, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.premio-juego-icono svg { width: 32px; height: 32px; fill: none; stroke: #FFF4E6; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.premio-juego strong { display: block; margin-top: 3px; font-size: clamp(18px, 1.6vw, 24px); font-weight: 900; line-height: 1.1; text-transform: uppercase; }
.premio-juego small { display: block; margin-top: 4px; font-size: 12px; color: var(--texto-suave); }
.premio-juego.elegido { border-color: rgba(233, 185, 73, .6); box-shadow: 0 0 0 1px rgba(233, 185, 73, .25), 0 0 40px -10px rgba(233, 185, 73, .5); }

@keyframes brillo { 0%, 20% { background-position: 120% 0; } 70%, 100% { background-position: -40% 0; } }

/* Botón girar */
.btn-girar {
  position: relative; overflow: hidden;
  height: clamp(66px, 8.4vh, 92px);
  border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #FF9A52 0%, #FF6900 42%, #E2500F 100%);
  box-shadow:
    0 0 0 3px rgba(233, 185, 73, .65),
    0 0 0 7px rgba(233, 185, 73, .12),
    0 22px 44px -12px rgba(255, 105, 0, .75),
    inset 0 2px 0 rgba(255, 255, 255, .5),
    inset 0 -8px 16px rgba(120, 30, 0, .45);
  transition: transform .2s cubic-bezier(.2, 1.4, .4, 1), filter .3s, box-shadow .3s;
  animation: llamar 2.2s ease-in-out infinite;
}
.btn-girar:hover { transform: translateY(-2px) scale(1.015); filter: brightness(1.06); }
.btn-girar:active { transform: translateY(1px) scale(.985); }
.btn-girar-texto {
  position: relative; z-index: 1;
  font-weight: 900; font-size: clamp(24px, 2.3vw, 36px); letter-spacing: .38em; text-transform: uppercase;
  padding-left: .38em;
  text-shadow: 0 2px 0 rgba(120, 30, 0, .45), 0 0 18px rgba(255, 220, 160, .35);
}
.btn-girar-brillo {
  position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: barrer 3.2s ease-in-out infinite;
}
.btn-girar:disabled { cursor: default; animation: none; filter: saturate(.55) brightness(.85); transform: none; }
.btn-girar:disabled .btn-girar-brillo { animation: none; opacity: 0; }

@keyframes barrer { 0%, 45% { left: -60%; } 75%, 100% { left: 130%; } }
@keyframes llamar {
  0%, 100% { box-shadow: 0 0 0 3px rgba(233, 185, 73, .65), 0 0 0 7px rgba(233, 185, 73, .12), 0 22px 44px -12px rgba(255, 105, 0, .75), inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -8px 16px rgba(120, 30, 0, .45); }
  50% { box-shadow: 0 0 0 3px rgba(233, 185, 73, .9), 0 0 0 12px rgba(233, 185, 73, .06), 0 22px 60px -8px rgba(255, 105, 0, .95), inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -8px 16px rgba(120, 30, 0, .45); }
}

.contadores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.contadores div {
  text-align: center; padding: 10px 6px; border-radius: 16px;
  background: rgba(255, 240, 225, .04); border: 1px solid rgba(255, 220, 180, .09);
}
.contadores b { display: block; font-size: clamp(22px, 2vw, 30px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.contadores span { display: block; margin-top: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); }

/* Chips de premios */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 7px 6px 11px; border-radius: 999px;
  border: 1px solid rgba(255, 220, 180, .16);
  background: rgba(255, 240, 225, .05);
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; text-align: left;
  cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.chip:hover { border-color: rgba(255, 150, 80, .55); background: rgba(255, 105, 0, .12); }
.chip b {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: linear-gradient(180deg, #FF8A3D, #E2500F); color: #fff; font-size: 12px; font-weight: 900;
}
.chip.elegido { border-color: var(--oro); background: rgba(233, 185, 73, .16); box-shadow: 0 0 18px -4px rgba(233, 185, 73, .6); }
.chip.elegido b { background: linear-gradient(180deg, #FFE3A0, #CE8D00); color: #3a2200; }
.chip.agotado { opacity: .38; cursor: default; text-decoration: line-through; }
.chip.agotado b { background: rgba(255, 255, 255, .15); }
.chips .vacio { margin: 0; }

/* Ganadores */
.lista-ganadores { min-height: 0; }
.lista-ganadores ol { list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 200, 150, .25) transparent; }
.lista-ganadores li {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 14px; background: rgba(255, 240, 225, .04);
  animation: entraFila .6s cubic-bezier(.2, 1.2, .4, 1) both;
}
.lista-ganadores li > span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: #3a2200;
  background: linear-gradient(160deg, #FFE3A0, #CE8D00);
}
.lista-ganadores li strong { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; text-transform: capitalize; }
.lista-ganadores li small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 700; color: var(--naranja-claro); text-transform: uppercase; letter-spacing: .03em; }
.vacio { margin: 0; font-size: 13px; color: var(--texto-suave); }
#listaGanadores:empty { display: none; }

@keyframes entraFila { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }

.pie { position: relative; z-index: 3; text-align: center; padding: 8px var(--gutter) 14px; font-size: 11px; letter-spacing: .08em; color: rgba(255, 238, 222, .38); }

/* ───────── Modal ganador ───────── */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(40, 14, 4, .78) 0%, rgba(5, 2, 1, .94) 100%);
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s ease;
}
.modal.abierto { opacity: 1; visibility: visible; }
.modal-rayos {
  position: absolute; width: 160vmax; height: 160vmax; left: 50%; top: 50%;
  margin: -80vmax 0 0 -80vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 190, 110, .13) 0deg 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .6) 22%, transparent 48%);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .6) 22%, transparent 48%);
  animation: rotar 40s linear infinite;
  pointer-events: none;
}
.modal-tarjeta {
  position: relative;
  width: min(880px, 94vw);
  padding: clamp(46px, 7vh, 64px) clamp(20px, 4vw, 56px) clamp(24px, 4vh, 40px);
  border-radius: 30px; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 105, 0, .22), transparent 60%),
    linear-gradient(170deg, #2b1309 0%, #150905 100%);
  border: 1px solid rgba(233, 185, 73, .55);
  box-shadow: 0 0 0 6px rgba(233, 185, 73, .08), 0 40px 120px -20px rgba(0, 0, 0, .9), 0 0 140px -30px rgba(255, 105, 0, .8);
  transform: scale(.7) translateY(30px); opacity: 0;
}
.modal.abierto .modal-tarjeta { animation: tarjetaEntra .8s .05s cubic-bezier(.2, 1.35, .4, 1) forwards; }
@keyframes tarjetaEntra { to { transform: none; opacity: 1; } }

.cinta {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  padding: 14px 52px;
  background: linear-gradient(180deg, #FFF0C4 0%, #E9B949 50%, #B07400 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 50%, 100% 100%, 0 100%, 22px 50%);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5));
  white-space: nowrap;
}
.cinta span { font-weight: 900; font-size: clamp(14px, 1.5vw, 20px); letter-spacing: .28em; text-transform: uppercase; color: #3a2200; }

.ganador-nombre {
  margin: 0; font-weight: 900; text-transform: uppercase;
  font-size: clamp(32px, 4.8vw, 72px); line-height: 1.02; letter-spacing: -.01em;
  text-wrap: balance;
}
.ganador-nombre.largo { font-size: clamp(28px, 3.8vw, 58px); }
.ganador-nombre .letra {
  display: inline-block;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF1D2 45%, #FFD27A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 20px rgba(255, 150, 60, .35));
  opacity: 0; transform: translateY(.4em) scale(.6) rotate(-6deg);
  animation: letra .55s cubic-bezier(.2, 1.5, .4, 1) forwards;
}
.ganador-nombre .palabra { display: inline-block; white-space: nowrap; }
@keyframes letra { to { opacity: 1; transform: none; } }

.ganador-doc { margin: 12px 0 0; font-size: clamp(14px, 1.4vw, 18px); font-weight: 600; letter-spacing: .22em; color: var(--texto-suave); min-height: 1.2em; }

.revelado { position: relative; height: clamp(170px, 24vh, 230px); margin-top: 10px; display: grid; place-items: center; pointer-events: none; }
.revelado::before {
  content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 222, 150, .55) 0%, rgba(255, 105, 0, .18) 35%, transparent 65%);
  transform: scale(0); opacity: 0;
  transition: transform .8s cubic-bezier(.2, 1, .3, 1), opacity .8s;
}
.revelado.abierto::before { transform: scale(1.15); opacity: 1; }
.revelado.sin-premio { display: none; }

.regalo { position: relative; width: 150px; height: 150px; }
.regalo.sacude { animation: sacudir 1.1s ease-in-out; }
.regalo-caja {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 96px; border-radius: 10px;
  background: linear-gradient(180deg, #FF7A1F 0%, #D9480A 100%);
  box-shadow: inset 0 -10px 18px rgba(110, 25, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .25), 0 18px 30px -10px rgba(0, 0, 0, .7);
  transition: transform .6s .12s cubic-bezier(.4, 0, .2, 1), opacity .5s .15s;
}
.regalo-caja i, .regalo-tapa i {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 24px; margin-left: -12px;
  background: linear-gradient(90deg, #9a6400, #FFE7A0 50%, #9a6400);
}
.regalo-tapa {
  position: absolute; left: 0; right: 0; top: 34px; height: 34px; z-index: 2; border-radius: 9px;
  background: linear-gradient(180deg, #FF9A52 0%, #E85A12 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 8px 14px -6px rgba(0, 0, 0, .6);
  transition: transform .75s cubic-bezier(.2, .8, .2, 1), opacity .6s .2s;
}
.regalo-tapa b {
  position: absolute; top: -30px; width: 44px; height: 34px;
  border: 9px solid #E9B949; border-radius: 50% 50% 8px 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 240, 200, .5);
}
.regalo-tapa b:nth-of-type(1) { left: 30px; transform: rotate(-28deg); }
.regalo-tapa b:nth-of-type(2) { right: 30px; transform: rotate(28deg) scaleX(-1); }
.revelado.abierto .regalo-tapa { transform: translate(-40px, -160px) rotate(-38deg); opacity: 0; }
.revelado.abierto .regalo-caja { transform: translateY(50px) scale(.6); opacity: 0; }

@keyframes sacudir {
  0%, 100% { transform: none; }
  10% { transform: rotate(-6deg) translateY(-4px); }
  20% { transform: rotate(6deg); }
  30% { transform: rotate(-8deg) translateY(-6px); }
  40% { transform: rotate(8deg); }
  50% { transform: rotate(-10deg) translateY(-8px) scale(1.04); }
  60% { transform: rotate(10deg) scale(1.06); }
  70% { transform: rotate(-12deg) translateY(-10px) scale(1.08); }
  80% { transform: rotate(12deg) scale(1.1); }
  90% { transform: rotate(-4deg) translateY(-12px) scale(1.12); }
}

.premio-revelado {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.4) translateY(30px);
  transition: opacity .5s .28s, transform .8s .28s cubic-bezier(.2, 1.5, .4, 1);
  pointer-events: none;
}
.revelado.abierto .premio-revelado { opacity: 1; transform: none; }
.premio-revelado span { font-size: 12px; font-weight: 800; letter-spacing: .34em; text-transform: uppercase; color: var(--oro-claro); }
.premio-revelado strong {
  margin-top: 6px; padding: 0 10px;
  font-size: clamp(28px, 3.8vw, 54px); font-weight: 900; line-height: 1.04; text-transform: uppercase; text-wrap: balance;
  background: linear-gradient(180deg, #FFF6DC 0%, #FFD27A 55%, #E9B949 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 170, 60, .55));
}

.btn-continuar {
  margin-top: clamp(14px, 2.4vh, 26px);
  padding: 15px 42px; border-radius: 999px; cursor: pointer;
  font-weight: 900; font-size: 15px; letter-spacing: .24em; text-transform: uppercase;
  border: 1px solid rgba(233, 185, 73, .7);
  background: linear-gradient(180deg, rgba(255, 227, 160, .18), rgba(233, 185, 73, .06));
  color: var(--oro-claro);
  transition: background .2s, transform .2s;
}
.btn-continuar:hover { background: linear-gradient(180deg, rgba(255, 227, 160, .3), rgba(233, 185, 73, .12)); transform: translateY(-1px); }

/* ───────── Cajón de datos ───────── */
.cajon-fondo { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.cajon-fondo.abierto { opacity: 1; visibility: visible; }
.cajon {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1d0e07, #110805);
  border-left: 1px solid var(--borde);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .6);
  transform: translateX(105%); transition: transform .45s cubic-bezier(.2, .9, .2, 1);
}
.cajon.abierto { transform: none; }
.cajon-cabeza { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 14px; border-bottom: 1px solid rgba(255, 220, 180, .08); }
.cajon-cabeza h2 { margin: 0; font-size: 20px; font-weight: 900; }
.cajon-cuerpo { flex: 1; overflow-y: auto; padding: 8px 24px 32px; }

.bloque { padding: 18px 0; border-bottom: 1px solid rgba(255, 220, 180, .08); }
.bloque:last-child { border-bottom: none; }
.bloque h3 { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--oro); }
.bloque-titulo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bloque-titulo h3 { margin: 0; }
.pildora { padding: 3px 10px; border-radius: 999px; background: rgba(255, 105, 0, .18); color: var(--naranja-claro); font-size: 12px; font-weight: 800; }

.soltar {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 22px 16px; border-radius: 18px; cursor: pointer;
  border: 1.5px dashed rgba(255, 150, 80, .5); background: rgba(255, 105, 0, .05);
  transition: background .2s, border-color .2s;
}
.soltar:hover, .soltar.encima { background: rgba(255, 105, 0, .12); border-color: var(--naranja-vivo); }
.soltar svg { width: 30px; height: 30px; stroke: var(--naranja-claro); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.soltar strong { font-size: 14px; }
.soltar small { font-size: 12px; color: var(--texto-suave); }

.enlace { margin-top: 10px; padding: 0; border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--naranja-claro); text-decoration: underline; text-underline-offset: 3px; }

.campo { display: block; margin-top: 16px; }
.campo span { display: block; margin-bottom: 8px; font-size: 13px; color: var(--texto-suave); }
.campo code { color: var(--oro-claro); font-size: 12px; }
textarea, .editor-premios input {
  width: 100%; border-radius: 12px; border: 1px solid rgba(255, 220, 180, .16);
  background: rgba(0, 0, 0, .3); color: var(--texto);
  font: 500 13px/1.5 ui-monospace, "SF Mono", Menlo, monospace; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 120px; }

.fila-botones { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn {
  flex: 1; min-width: 0; padding: 12px 10px; border-radius: 12px; cursor: pointer;
  font-weight: 800; font-size: 12.5px; letter-spacing: .02em; white-space: nowrap;
  border: none; background: linear-gradient(180deg, #FF8A3D, #E2500F); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn:hover { filter: brightness(1.08); }
.btn-fantasma { background: transparent; border: 1px solid rgba(255, 220, 180, .25); box-shadow: none; }
.btn-peligro { background: transparent; border: 1px solid rgba(255, 110, 90, .5); color: #FFB4A6; box-shadow: none; }

.editor-premios { display: flex; flex-direction: column; gap: 8px; }
.fila-premio { display: grid; grid-template-columns: 1fr 74px 36px; gap: 8px; align-items: center; }
.editor-premios input { font-family: var(--display); font-weight: 600; padding: 9px 10px; }
.editor-premios input[type="number"] { text-align: center; }
.quitar { height: 36px; border-radius: 10px; border: 1px solid rgba(255, 220, 180, .16); background: transparent; cursor: pointer; font-size: 18px; line-height: 1; color: var(--texto-suave); }
.quitar:hover { color: #FFB4A6; border-color: rgba(255, 110, 90, .5); }

.opcion { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 14px; }
.segmentado { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 220, 180, .12); }
.segmentado button { padding: 7px 12px; border: none; border-radius: 9px; background: transparent; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--texto-suave); }
.segmentado button.activo { background: linear-gradient(180deg, #FF8A3D, #E2500F); color: #fff; }

.nota { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--texto-suave); }
kbd { padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255, 220, 180, .25); font: 600 11px var(--display); }

/* Aviso */
.aviso {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; visibility: hidden;
  max-width: min(560px, 92vw); padding: 13px 22px; border-radius: 18px;
  background: rgba(30, 14, 7, .92); border: 1px solid rgba(233, 185, 73, .45);
  font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.aviso.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ───────── Responsive ───────── */
@media (max-width: 960px) {
  html, body { height: auto; }
  body { overflow-x: hidden; overflow-y: auto; grid-template-rows: auto auto auto; }
  .escenario { grid-template-columns: 1fr; align-items: start; padding-top: 10px; padding-bottom: 20px; gap: 16px; }
  .panel { display: contents; }
  .titulo { order: -1; }
  .panel > * { width: 100%; max-width: 560px; justify-self: center; }
  .ruleta { --d: min(90vw, 560px); }
  .titulo { text-align: center; }
  .titulo h1 { justify-content: center; }
  .titulo-lema { justify-content: center; }
  .titulo-lema::before { content: ""; flex: 1; height: 1px; background: linear-gradient(270deg, rgba(255, 220, 180, .5), transparent); }
  .lista-ganadores ol { max-height: none; overflow: visible; }
  .panel > .lista-ganadores { min-height: 0; }
  .icono-texto span { display: none; }
  #guirnalda { height: 70px; }
}

@media (max-height: 820px) and (min-width: 961px) {
  .titulo-kicker, .contadores, .premio-juego small { display: none; }
  .titulo h1 { font-size: clamp(38px, 3.6vw, 60px); }
  .titulo-lema { margin-top: 6px; }
  .premio-juego { padding-top: 10px; padding-bottom: 10px; }
  .premio-juego-icono { width: 44px; height: 44px; border-radius: 13px; }
  .premio-juego-icono svg { width: 26px; height: 26px; }
  .tarjeta { padding-top: 10px; padding-bottom: 10px; }
  .chips { gap: 6px; }
  .chip { padding: 5px 6px 5px 10px; font-size: 11px; }
  .chip b { min-width: 20px; height: 20px; font-size: 11px; }
  .lista-ganadores li { padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora span, .modal-rayos, .btn-girar, .btn-girar-brillo, .premio-juego::before, #guirnalda .foco, .intro-halo { animation: none; }
}
