@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fuentes/lilita-one-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fuentes/nunito-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fuentes/nunito-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fuentes/nunito-800-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Pacifico";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fuentes/pacifico-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --tinta: #1b2433;
  --nieve: #e8f6fc;
  --rojo: #e23d3d;
  --rojo-sombra: #9d1c18;
  --verde: #1f9a48;
  --verde-sombra: #0e5a28;
  --oro: #f6c445;
  --cielo: #1d4e9c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: #07122f; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--nieve);
  color: var(--tinta);
  font-family: "Nunito", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--oro);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.simbolos { position: absolute; width: 0; height: 0; overflow: hidden; }

html:not([data-vista="tablero"]) #vista-tablero { display: none; }
html[data-vista="tablero"] #vista-nombre { display: none; }

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

.vista-nombre, #vista-nombre {
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(255, 255, 255, .16), transparent 60%),
    linear-gradient(180deg, #07122f 0%, #102454 18%, #1d4d96 42%, #7eb4d6 68%, #c5dced 100%);
}
.poster-y-forma {
  width: min(1120px, calc(100% - 20px));
  margin: 0 auto;
  padding: 12px 0 calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.poster {
  margin: 0;
  position: relative;
  z-index: 7;
}
.poster img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(7, 18, 47, .35);
}

.escenario {
  position: relative;
  flex: 1 1 auto;
  min-height: 64vh;
  overflow: hidden;
}
.escenario::before,
.escenario::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.escenario::before {
  background-image:
    radial-gradient(2px 2px at 8% 18%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 16% 32%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 28% 14%, #fff6c8 60%, transparent 62%),
    radial-gradient(1.4px 1.4px at 41% 26%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 57% 12%, #fff 60%, transparent 62%),
    radial-gradient(1.6px 1.6px at 69% 30%, #fff 60%, transparent 62%),
    radial-gradient(2.2px 2.2px at 78% 16%, #fff6c8 60%, transparent 62%),
    radial-gradient(1.4px 1.4px at 88% 24%, #fff 60%, transparent 62%),
    radial-gradient(1.8px 1.8px at 94% 10%, #fff 60%, transparent 62%),
    radial-gradient(1.3px 1.3px at 34% 8%, #fff 60%, transparent 62%);
}
.escenario::after {
  background-image:
    radial-gradient(2.4px 2.4px at 22% 20%, #fff 60%, transparent 62%),
    radial-gradient(2px 2px at 63% 22%, #fff 60%, transparent 62%),
    radial-gradient(2.2px 2.2px at 84% 12%, #fff6c8 60%, transparent 62%);
  animation: titilar 2.8s ease-in-out infinite;
}
.aldea { position: absolute; inset: 0; z-index: 2; }
.aldea-svg { display: block; width: 100%; height: 100%; }
.nieve-suelo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 42px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(transparent, var(--nieve) 78%);
}

.tira-luces {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 1.2%;
  pointer-events: none;
}
.cable {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 42px;
}
.foco {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 18px;
  border-radius: 8px 8px 11px 11px;
  background: radial-gradient(circle at 35% 30%, #fff, var(--c, #ffe28a) 45%, var(--c, #ffe28a));
  box-shadow: 0 0 12px var(--c, #ffe28a);
  animation: parpadeo 1.8s ease-in-out infinite;
}
.foco::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 6px;
  width: 2px;
  height: 9px;
  background: #2a2118;
}
.foco::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 3px;
  width: 8px;
  height: 4px;
  border-radius: 2px;
  background: #3a3128;
}
.foco:nth-child(4n + 2) { margin-top: 8px; }
.foco:nth-child(4n + 3) { margin-top: 24px; }
.foco:nth-child(4n + 4) { margin-top: 12px; }
.foco:nth-child(4n + 5) { margin-top: 28px; }
.foco:nth-child(5n + 2) { --c: #ffe28a; }
.foco:nth-child(5n + 3) { --c: #ffb3c7; animation-delay: .35s; }
.foco:nth-child(5n + 4) { --c: #bff3c8; animation-delay: .7s; }
.foco:nth-child(5n + 5) { --c: #c9dcff; animation-delay: .15s; }
.foco:nth-child(5n + 6) { --c: #ffd56a; animation-delay: .9s; }

.titulo {
  position: absolute;
  top: 62px;
  left: 8px;
  right: 8px;
  z-index: 4;
  margin: 0;
  text-align: center;
  pointer-events: none;
}
.linea {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.015em;
}
.linea-posada { font-size: clamp(42px, 11vw, 96px); }
.linea-bots { font-size: clamp(30px, 8vw, 82px); margin-top: -0.06em; }
.linea-bots .l-morado { margin-left: 0.22em; }
.letra {
  font-family: "Lilita One", "Arial Rounded MT Bold", sans-serif;
  font-weight: 400;
  line-height: 0.88;
  color: var(--c);
  -webkit-text-stroke: 0.045em #24180f;
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 #24180f;
}
.l-rojo { --c: #ff4b3e; }
.l-naranja { --c: #ff8a1f; }
.l-amarillo { --c: #ffe14a; }
.l-verde { --c: #3dce55; }
.l-turquesa { --c: #21c4d6; }
.l-azul { --c: #4c7dff; }
.l-morado { --c: #c44dff; }
.l-rosa { --c: #ff5ea8; }

.vidrio { animation: brillo 2.8s ease-in-out infinite; }
.bocanada { animation: humo 3.4s ease-in infinite; opacity: 0; }
.humo .bocanada:nth-child(2) { animation-delay: 1.1s; }
.humo .bocanada:nth-child(3) { animation-delay: 2.1s; }

.zona-baja,
.barra,
.contenido,
.pie { position: relative; z-index: 7; }

.zona-baja {
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cuando { text-align: center; color: #243040; }
.organizador {
  margin: 0 0 2px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hora {
  margin: 0;
  font-weight: 800;
  font-size: clamp(46px, 12vw, 86px);
  line-height: .85;
  letter-spacing: -0.04em;
}
.anio {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  font-size: .38em;
  letter-spacing: 0;
  margin-left: .12em;
  position: relative;
  top: -0.45em;
}
.fecha {
  margin: 4px 0 0;
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  font-size: clamp(22px, 6.4vw, 58px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.adornos {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
.adornos svg { width: 34px; height: 34px; overflow: visible; }

.tarjeta-ingreso,
.persona,
.modal-tarjeta {
  background: #fff;
  border: 3px solid var(--tinta);
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--tinta);
}
.tarjeta-ingreso { padding: 18px 16px 14px; text-align: left; }
.tarjeta-ingreso h2,
.intro h2,
.modal-tarjeta h2,
.persona-cabeza h2 {
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  letter-spacing: .01em;
}
.tarjeta-ingreso h2 { margin: 0 0 6px; font-size: 1.6rem; }
.ayuda, .aviso-nombre, .letra-chica, .pista, .conteo {
  margin: 0 0 12px;
  color: #3c4c5c;
}
.aviso-nombre { color: #8a4b12; }
.letra-chica { margin: 10px 0 0; font-size: .86rem; }
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.campo label { font-weight: 800; }
.req, .opc {
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-left: 6px;
}
.req { color: #c42828; }
.opc { color: #5c6b7a; }
input, textarea {
  width: 100%;
  background: #fff;
  border: 2.5px solid var(--tinta);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 16px;
}
textarea { resize: vertical; min-height: 68px; }
.nombre-input {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 10px;
}
.fila-nombre, .modal-acciones, .barra-acciones, .acciones-deseo, .pie-tarjeta, .fichas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fila-nombre { flex-direction: column; }
.error-forma { color: #a11d2b; font-weight: 800; margin: 0 0 8px; }

.boton-principal,
.boton-fantasma,
.boton-regalo,
.boton-peligro {
  font-weight: 800;
  border-radius: 999px;
  border: 3px solid var(--tinta);
  min-height: 42px;
  padding: 8px 14px;
  cursor: pointer;
  line-height: 1.1;
}
.boton-principal {
  background: var(--rojo);
  color: #fff;
  box-shadow: 0 4px 0 var(--rojo-sombra);
}
.boton-fantasma {
  background: #fff;
  color: var(--tinta);
  box-shadow: 0 4px 0 #c5d5e2;
}
.boton-regalo {
  background: var(--verde);
  color: #fff;
  box-shadow: 0 4px 0 var(--verde-sombra);
}
.boton-peligro {
  background: #fff;
  color: #a11d2b;
  box-shadow: 0 4px 0 #f0c9ce;
}
.boton-principal:hover { background: #ef4e49; }
.boton-regalo:hover { background: #25ad52; }
.boton-fantasma:hover, .boton-peligro:hover { background: #f4fbfe; }
.boton-principal:active,
.boton-fantasma:active,
.boton-regalo:active,
.boton-peligro:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tinta); }
button:disabled { opacity: .65; cursor: wait; }
.boton-chico { min-height: 38px; padding: 6px 12px; font-size: .88rem; }
.boton-texto {
  background: none;
  border: 0;
  padding: 6px 2px;
  min-height: 40px;
  color: #7a4450;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#vista-tablero { background: var(--nieve); min-height: 100dvh; }
.fondo-posada {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/fondo-listas.jpg") center 30% / cover no-repeat;
  opacity: 0.2;
}
#vista-tablero .cabecera,
#vista-tablero .contenido,
#vista-tablero .pie { position: relative; z-index: 8; }
#vista-tablero .contenido { margin-top: 20px; }
#vista-tablero .intro {
  background: rgba(247, 252, 255, .94);
  border: 3px solid var(--tinta);
  border-radius: 22px;
  padding: 14px 14px 12px;
  margin-bottom: 16px;
  box-shadow: 4px 4px 0 rgba(27, 36, 51, .15);
}
.selector-vista {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: min(100%, 440px);
  margin: 0 0 12px;
  padding: 5px;
  background: #fff;
  border: 3px solid var(--tinta);
  border-radius: 16px;
}
.selector-opcion {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--tinta);
  font-weight: 800;
  cursor: pointer;
}
.selector-opcion[aria-pressed="true"] {
  background: var(--rojo);
  color: #fff;
}
#vista-tablero #rejilla > .vacio,
#vista-tablero #rejilla > .cargando {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 12px;
  padding: 10px 14px;
  background: rgba(247, 252, 255, .92);
  color: #1b2433;
  border-radius: 14px;
}
#vista-tablero .pie {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 16px calc(22px + env(safe-area-inset-bottom));
  background: rgba(247, 252, 255, .9);
  border-radius: 16px 16px 0 0;
  color: var(--tinta);
}

.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 14px;
  background: rgba(232, 246, 252, .94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(27, 36, 51, .08);
}
.barra-marca {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}
.barra-marca strong { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.15rem; }
.en-vivo, .actualizado { font-size: .82rem; color: #3c4c5c; }
.punto {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-radius: 50%;
  background: #1f9a48;
  box-shadow: 0 0 0 0 rgba(31, 154, 72, .7);
  animation: pulso 1.6s ease-out infinite;
}
.punto-alerta { background: #e0a106; animation: none; }
.hola { margin: 0; }

.contenido {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 28px;
}
.intro h2 { margin: 0 0 4px; font-size: 1.5rem; }
.conteo { margin-bottom: 4px; font-weight: 800; color: var(--tinta); }
.alerta {
  background: #fff6f6;
  border: 3px solid var(--tinta);
  border-radius: 16px;
  padding: 10px 12px;
  margin: 0 0 12px;
  box-shadow: 4px 4px 0 var(--tinta);
}

.rejilla {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.persona { overflow: hidden; background: #fff; }
.persona.es-tuya {
  background: #fffdf6;
  box-shadow: 6px 6px 0 #e0b33a;
}
.persona-cabeza {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px 6px;
}
.gorro { width: 44px; height: 44px; flex: none; }
.persona-cabeza h2 { margin: 0; font-size: 1.45rem; overflow-wrap: anywhere; }
.cuenta { margin: 0; color: #4a5968; font-weight: 800; font-size: .92rem; }
.etiqueta-tu {
  display: inline-block;
  margin-left: 8px;
  background: var(--oro);
  border: 2px solid var(--tinta);
  border-radius: 999px;
  padding: 1px 8px 2px;
  font-family: "Nunito", sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  vertical-align: middle;
}
.deseos { list-style: none; margin: 0; padding: 0; }
.deseo {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-top: 2px dashed #d5e4ee;
}
.deseo.apartado { background: linear-gradient(#f3fff6, #fff); }
.icono-regalo { width: 40px; height: 40px; display: block; }
.papel-0 { color: #e23d3d; }
.papel-1 { color: #1f9a48; }
.papel-2 { color: #3d7cff; }
.papel-3 { color: #d89a12; }
.papel-4 { color: #ff5ea8; }
.papel-5 { color: #7a4dff; }
.deseo-cuerpo h3 { margin: 0; font-size: .98rem; overflow-wrap: anywhere; }
.ficha {
  background: #eef6fb;
  border: 2px solid var(--tinta);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .78rem;
  font-weight: 800;
}
.liston { background: #e5f8ea; color: #0f6a32; }
.deseo-texto {
  margin: 2px 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  color: #7b8794;
  overflow-wrap: anywhere;
}
.acciones-deseo { margin-top: 8px; }
.acciones-deseo button { min-height: 36px; padding: 4px 10px; font-size: .84rem; }
.vacio-lista, .vacio, .cargando {
  margin: 0;
  padding: 4px 14px 14px;
  color: #3c4c5c;
}
.vacio, .cargando { padding: 18px 4px; }
.pie-tarjeta { padding: 0 14px 12px; align-items: center; }

.pie {
  text-align: center;
  padding: 8px 16px calc(22px + env(safe-area-inset-bottom));
  color: #3c4c5c;
}
.pie p { margin: 0; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.modal-fondo {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 47, .55);
}
.modal-tarjeta {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92dvh, 780px);
  overflow: auto;
  padding: 16px 16px 14px;
}
.modal-acciones { justify-content: flex-end; margin-top: 4px; }
body.modal-abierto { overflow: hidden; }

.brindis {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  width: max-content;
  max-width: min(92vw, 440px);
  background: var(--tinta);
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.noscript {
  margin: 12px;
  padding: 12px;
  background: #fff;
  border: 3px solid var(--tinta);
  border-radius: 16px;
}

@media (max-width: 700px) {
  .poster-y-forma { width: min(560px, calc(100% - 16px)); padding-top: 8px; }
  .poster img { border-radius: 14px; }
  #vista-tablero .contenido { margin-top: 12px; }
  .selector-vista { width: 100%; }
  .tarjeta-ingreso { padding: 14px 14px 12px; }
  .tarjeta-ingreso h2 { font-size: 1.55rem; margin-bottom: 4px; }
  .ayuda { margin-bottom: 8px; }
}

@media (max-width: 560px) {
  .tarjeta-ingreso, .persona, .modal-tarjeta {
    border-radius: 20px;
    box-shadow: 4px 4px 0 var(--tinta);
  }
  .persona.es-tuya { box-shadow: 4px 4px 0 #e0b33a; }
  .barra-acciones { width: 100%; }
  #pedir-arriba { flex: 1; }
}

@media (min-width: 760px) {
  .rejilla { grid-template-columns: 1fr 1fr; }
  .modal { place-items: center; }
}

@media (min-width: 900px) {
  .poster-y-forma {
    width: min(1080px, calc(100% - 40px));
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(300px, 420px);
    align-items: end;
    gap: 32px;
    padding-top: 24px;
    padding-bottom: 32px;
  }
  .poster img {
    width: auto;
    max-width: 100%;
    max-height: calc(100dvh - 48px);
    margin-inline: auto;
  }
}

@media (min-width: 1100px) {
  .rejilla { grid-template-columns: 1fr 1fr 1fr; }
}

/* Celulares: todo más compacto. Los campos conservan 16px para que iOS no haga zoom. */
@media (max-width: 480px) {
  body { font-size: 14.5px; }
  #vista-nombre { min-height: 100svh; }
  .poster-y-forma { width: calc(100% - 14px); gap: 6px; padding-top: 6px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .poster { display: flex; justify-content: center; min-height: 0; }
  .poster img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 48svh;
    object-fit: contain;
    object-position: center;
    margin-inline: auto;
    border-radius: 12px;
  }
  .zona-baja { gap: 6px; flex: 0 0 auto; }
  .adornos svg { width: 28px; height: 28px; }

  .tarjeta-ingreso, .persona, .modal-tarjeta {
    border-width: 2.5px;
    border-radius: 16px;
    box-shadow: 3px 3px 0 var(--tinta);
  }
  .persona.es-tuya { box-shadow: 3px 3px 0 #e0b33a; }
  .tarjeta-ingreso { padding: 8px 10px 8px; }
  .tarjeta-ingreso h2 { font-size: 1.12rem; margin-bottom: 2px; }
  .ayuda, .aviso-nombre, .letra-chica, .pista, .conteo { font-size: .85rem; line-height: 1.3; }
  .ayuda { margin-bottom: 4px; }
  .letra-chica { font-size: .7rem; margin-top: 4px; }
  #vista-nombre .ayuda, #vista-nombre .aviso-nombre { font-size: .78rem; line-height: 1.25; }
  #vista-nombre .letra-chica { font-size: .7rem; }
  #vista-nombre .campo { gap: 3px; margin-bottom: 6px; }
  #vista-nombre .campo label { font-size: .82rem; }
  .campo { gap: 4px; margin-bottom: 8px; }
  .campo label { font-size: .88rem; }
  .req, .opc { font-size: .6rem; margin-left: 4px; }
  input, textarea {
    font-size: 16px;
    line-height: 1.25;
    padding: 8px 10px;
    border-width: 2px;
    border-radius: 11px;
  }
  textarea { min-height: 58px; }
  .nombre-input { font-size: 16px; padding: 8px 10px; min-height: 40px; }
  #vista-nombre .boton-principal,
  #vista-nombre .boton-fantasma { min-height: 40px; }
  .fila-nombre, .modal-acciones, .barra-acciones, .acciones-deseo, .pie-tarjeta, .fichas { gap: 6px; }
  .error-forma { font-size: .85rem; margin-bottom: 6px; }

  .boton-principal, .boton-fantasma, .boton-regalo, .boton-peligro {
    min-height: 40px;
    padding: 6px 12px;
    font-size: .88rem;
    border-width: 2.5px;
  }
  .boton-principal { box-shadow: 0 3px 0 var(--rojo-sombra); }
  .boton-fantasma { box-shadow: 0 3px 0 #c5d5e2; }
  .boton-regalo { box-shadow: 0 3px 0 var(--verde-sombra); }
  .boton-peligro { box-shadow: 0 3px 0 #f0c9ce; }
  .boton-principal:active, .boton-fantasma:active, .boton-regalo:active, .boton-peligro:active { box-shadow: 0 1px 0 var(--tinta); }
  .boton-chico { min-height: 36px; padding: 4px 10px; font-size: .8rem; }
  .boton-texto { min-height: 36px; padding: 4px 2px; font-size: .8rem; }

  .barra { padding: 6px 10px; gap: 4px 8px; }
  .barra-marca { gap: 2px 8px; }
  .barra-marca strong { font-size: .98rem; }
  .en-vivo, .actualizado { font-size: .7rem; }
  .punto { width: 7px; height: 7px; margin-right: 3px; }
  .hola { font-size: .85rem; }
  .barra-acciones { flex-wrap: nowrap; align-items: center; }
  .barra-acciones .hola { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .barra-acciones .boton-chico { flex: 0 0 auto; }
  #pedir-arriba { flex: 0 0 auto; }

  #vista-tablero .contenido { margin-top: 8px; }
  .contenido { width: calc(100% - 14px); padding: 8px 0 14px; }
  #vista-tablero .intro { padding: 8px 10px 6px; border-width: 2.5px; border-radius: 16px; margin-bottom: 10px; box-shadow: 3px 3px 0 rgba(27, 36, 51, .15); }
  .intro h2 { font-size: 1.28rem; margin-bottom: 4px; }
  .selector-vista { padding: 3px; gap: 4px; margin-bottom: 8px; border-width: 2.5px; border-radius: 12px; }
  .selector-opcion { min-height: 38px; border-radius: 9px; font-size: .9rem; }
  .conteo, .pista { margin-bottom: 4px; }
  .alerta { padding: 6px 10px; font-size: .85rem; border-width: 2.5px; border-radius: 12px; margin-bottom: 8px; box-shadow: 3px 3px 0 var(--tinta); }
  #vista-tablero #rejilla > .vacio, #vista-tablero #rejilla > .cargando { padding: 8px 10px; font-size: .85rem; }

  .rejilla { gap: 10px; }
  .persona-cabeza { gap: 8px; padding: 8px 10px 6px; }
  .gorro { width: 36px; height: 36px; }
  .persona-cabeza h2 { font-size: 1.2rem; }
  .cuenta { font-size: .76rem; }
  .etiqueta-tu { font-size: .6rem; margin-left: 6px; padding: 0 6px 1px; border-width: 1.5px; }
  .deseo { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 8px 10px; }
  .icono-regalo { width: 30px; height: 30px; }
  .deseo-cuerpo h3 { font-size: .9rem; }
  .deseo-texto { font-size: .74rem; }
  .acciones-deseo { margin-top: 6px; }
  .acciones-deseo button { min-height: 36px; padding: 3px 10px; font-size: .78rem; }
  .vacio-lista { padding: 2px 10px 10px; font-size: .85rem; }
  .pie-tarjeta { padding: 0 10px 8px; }
  #vista-tablero .pie { width: calc(100% - 14px); padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); font-size: .74rem; }

  .modal { padding: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .modal-tarjeta { padding: 12px 12px 10px; }
  .modal-tarjeta h2 { font-size: 1.28rem; margin: 0 0 8px; }
  .modal-acciones { margin-top: 2px; }
  .modal-acciones button { flex: 1 1 0; }
  .brindis { font-size: .82rem; padding: 8px 12px; bottom: calc(10px + env(safe-area-inset-bottom)); }
}



/* Portada: el flyer llena toda la pantalla y el formulario flota centrado sobre la nieve. */
html:not([data-vista="tablero"]) {
  background: #07122f;
}
html:not([data-vista="tablero"]) body {
  background: #07122f;
  overflow: hidden;
  height: 100svh;
  height: 100dvh;
}

#vista-nombre {
  position: relative;
  height: 100svh;
  height: 100dvh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background: #07122f;
}

#vista-nombre .poster-y-forma {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
  grid-template-columns: none;
}

#vista-nombre .poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

#vista-nombre .poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0a1a3a url("/folleto.jpg") center / cover no-repeat;
  filter: blur(32px) saturate(1.2);
  transform: scale(1.14);
}

#vista-nombre .poster img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: center top;
  /* En escritorio el flyer se sienta arriba y deja la nieve de abajo para el formulario. */
}

#vista-nombre .zona-baja {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom) + 80px);
  pointer-events: none;
}

#vista-nombre .tarjeta-ingreso {
  pointer-events: auto;
  width: min(360px, calc(100% - 8px));
  margin: 0 auto;
  padding: 16px 18px 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow:
    0 18px 44px rgba(7, 18, 47, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

#vista-nombre .tarjeta-ingreso h2 {
  margin: 0 0 2px;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

#vista-nombre .ayuda,
#vista-nombre .aviso-nombre {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: #4a5968;
}

#vista-nombre .aviso-nombre { color: #8a4b12; }

#vista-nombre .campo {
  gap: 5px;
  margin-bottom: 10px;
  text-align: left;
}

#vista-nombre .campo label {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

#vista-nombre .nombre-input {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  border-width: 1.5px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(7, 18, 47, 0.08);
}

#vista-nombre .error-forma { margin: 0 0 8px; font-size: 0.82rem; }

#vista-nombre .fila-nombre {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#vista-nombre .boton-principal,
#vista-nombre .boton-fantasma {
  width: 100%;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  border-width: 0;
  box-shadow: 0 6px 16px rgba(157, 28, 24, 0.28);
}

#vista-nombre .boton-fantasma {
  box-shadow: 0 2px 8px rgba(27, 36, 51, 0.12);
  border: 1.5px solid rgba(27, 36, 51, 0.18);
}

#vista-nombre .boton-principal:active,
#vista-nombre .boton-fantasma:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(157, 28, 24, 0.25);
}

#vista-nombre .letra-chica {
  margin: 8px 0 0;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.3;
  color: #5c6b7a;
}

@media (max-width: 480px) and (max-height: 700px) {
  #vista-nombre .tarjeta-ingreso { padding: 12px 14px 10px; border-radius: 18px; }
  #vista-nombre .tarjeta-ingreso h2 { font-size: 1.05rem; }
  #vista-nombre .ayuda, #vista-nombre .aviso-nombre { font-size: 0.7rem; margin-bottom: 6px; }
  #vista-nombre .campo { margin-bottom: 8px; }
  #vista-nombre .letra-chica { margin-top: 6px; font-size: 0.6rem; }
  #vista-nombre .zona-baja { padding: 8px 14px calc(10px + env(safe-area-inset-bottom) + 72px); }
}

@media (min-width: 760px) {
  #vista-nombre .poster img {
    object-fit: contain;
    object-position: center top;
    padding-bottom: 300px;
    box-sizing: border-box;
  }
  #vista-nombre .zona-baja {
    padding: 24px 24px calc(32px + env(safe-area-inset-bottom));
  }
  #vista-nombre .tarjeta-ingreso {
    width: min(380px, 100%);
    padding: 20px 24px 18px;
  }
  #vista-nombre .tarjeta-ingreso h2 { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes parpadeo {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: .62; filter: brightness(.85); }
}
@keyframes titilar {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@keyframes brillo {
  0%, 100% { fill: #ffe28a; }
  50% { fill: #fff6c2; }
}
@keyframes humo {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: .8; }
  100% { transform: translateY(-42px); opacity: 0; }
}
@keyframes pulso {
  70% { box-shadow: 0 0 0 7px rgba(31, 154, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 154, 72, 0); }
}
