/* Amigo Secreto Peludo — edición navideña · Pacto Histórico Mosquera
   Identidad: las cinco formas del logo del Pacto (naranja, azul, rojo, verde, morado) sobre una noche de Navidad */

@property --brillo { syntax: "<percentage>"; inherits: false; initial-value: -30%; }
:root {
  --naranja: #FEAE33; --azul: #343598; --rojo: #F8280C; --verde: #03AD43; --morado: #8F3292;
  --navidad: #E3170A; --dorado: #FFC531; --pino: #0B7A3B;
  --noche: #0D1236; --noche-2: #171E52; --noche-3: #232B6B;
  --tinta: #1F2C6B; --tinta-2: #565C86; --linea: #E5E1EE; --suave: #F4F1F9;
  --display: "Montserrat", system-ui, sans-serif;
  --texto: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --guion: "Pacifico", cursive;
  --ease: cubic-bezier(.2,.8,.2,1); --rebote: cubic-bezier(.34,1.56,.64,1);
  --sombra: 0 18px 44px rgba(0,0,0,.28);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100dvh; color: #fff; font: 400 1.0625rem/1.55 var(--texto); overflow-x: hidden;
  background: radial-gradient(900px 600px at 90% -10%, rgba(143,50,146,.55), transparent 60%),
              radial-gradient(800px 600px at -10% 110%, rgba(3,173,67,.22), transparent 60%),
              radial-gradient(700px 500px at 50% 120%, rgba(52,53,152,.7), transparent 60%), var(--noche);
  background-attachment: fixed; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--dorado); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; margin: 0 0 .4em; letter-spacing: -.025em; }
h2 { font-weight: 900; font-size: clamp(1.8rem, 6vw, 2.5rem); }
p { margin: 0 0 1em; }
.trampa { position: absolute; left: -5000px; }
.antetitulo { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: var(--dorado); margin-bottom: .5em; }
.sub { color: rgba(255,255,255,.75); }
.nota { font-size: .92rem; color: rgba(255,255,255,.7); text-align: center; }

/* ---------- Nieve y adornos de fondo ---------- */
#nieve { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.adornos { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.adornos span { position: absolute; left: var(--x); top: var(--y); font-size: calc(1.4rem * var(--s)); opacity: .16; animation: flota var(--d) ease-in-out var(--t) infinite; filter: saturate(.8); }
@keyframes flota { 50% { transform: translateY(-18px) rotate(8deg); } }

/* ---------- Pantalla de carga ---------- */
.cargador { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(circle at 50% 40%, var(--noche-3), var(--noche) 70%); transition: opacity .8s, visibility .8s; }
.cargador.fuera { opacity: 0; visibility: hidden; }
.carga-centro { display: grid; justify-items: center; gap: 22px; }
.circulos { position: relative; width: 220px; height: 220px; animation: giro 6s linear infinite; }
.circulos > span { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px; border-radius: 50%; background: var(--c); mix-blend-mode: screen; opacity: .92;
  animation: orbita 3.2s var(--ease) both; animation-delay: calc(var(--i) * .08s); }
@keyframes orbita {
  0% { transform: rotate(calc(var(--i) * 72deg)) translateX(0) scale(0); }
  30% { transform: rotate(calc(var(--i) * 72deg + 40deg)) translateX(62px) scale(1); }
  65% { transform: rotate(calc(var(--i) * 72deg + 140deg)) translateX(58px) scale(1); }
  100% { transform: rotate(calc(var(--i) * 72deg + 220deg)) translateX(66px) scale(.62); }
}
@keyframes giro { to { transform: rotate(360deg); } }
.carga-paloma { position: absolute; inset: 52px; animation: contragiro 6s linear infinite; }
.carga-paloma img { width: 100%; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.15), 0 20px 60px rgba(143,50,146,.7); animation: aparece .9s 1.1s var(--rebote) both; }
.gorrito { position: absolute; width: 70%; left: 2%; top: -40%; transform: rotate(-18deg); animation: cae-gorro .8s 1.7s var(--rebote) both; }
@keyframes contragiro { to { transform: rotate(-360deg); } }
@keyframes aparece { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
@keyframes cae-gorro { from { transform: translateY(-120px) rotate(-60deg); opacity: 0; } }
.carga-logos { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.carga-logos > span { background: #fff; border-radius: 14px; padding: 8px 12px; height: 58px; display: grid; place-items: center; animation: sube .7s var(--rebote) both; }
.carga-logos > span:nth-child(1) { animation-delay: 1.5s; } .carga-logos > span:nth-child(2) { animation-delay: 1.7s; } .carga-logos > span:nth-child(3) { animation-delay: 1.9s; }
.carga-logos img { height: 40px; width: auto; }
.carga-luces { display: flex; gap: 10px; }
.carga-luces i { width: 12px; height: 16px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: rgba(255,255,255,.15); animation: enciende 3s steps(1) both; }
.carga-luces i:nth-child(5n+1) { --c: var(--naranja); } .carga-luces i:nth-child(5n+2) { --c: #6E70F0; } .carga-luces i:nth-child(5n+3) { --c: var(--rojo); } .carga-luces i:nth-child(5n+4) { --c: var(--verde); } .carga-luces i:nth-child(5n) { --c: #C760CB; }
.carga-luces i { animation-name: enciende; }
.carga-luces i:nth-child(1) { animation-delay: .1s } .carga-luces i:nth-child(2) { animation-delay: .35s } .carga-luces i:nth-child(3) { animation-delay: .6s } .carga-luces i:nth-child(4) { animation-delay: .85s } .carga-luces i:nth-child(5) { animation-delay: 1.1s }
.carga-luces i:nth-child(6) { animation-delay: 1.35s } .carga-luces i:nth-child(7) { animation-delay: 1.6s } .carga-luces i:nth-child(8) { animation-delay: 1.85s } .carga-luces i:nth-child(9) { animation-delay: 2.1s } .carga-luces i:nth-child(10) { animation-delay: 2.35s }
@keyframes enciende { 0% { background: rgba(255,255,255,.15); } 1%, 100% { background: var(--c); box-shadow: 0 0 14px var(--c); } }
.carga-texto { font-weight: 700; color: rgba(255,255,255,.8); margin: 0; animation: parpadea 1.6s ease-in-out infinite; }
@keyframes parpadea { 50% { opacity: .5; } }

/* ---------- App ---------- */
.app { position: relative; z-index: 2; overflow-x: clip; min-height: 100dvh; display: flex; flex-direction: column; max-width: 620px; margin: 0 auto; }
.cabecera { position: sticky; top: 0; z-index: 30; padding: 0 14px 10px; background: linear-gradient(var(--noche) 70%, transparent); }
.guirnalda { position: relative; height: 34px; margin: 0 -14px; }
.cable { position: absolute; inset: 0 0 auto; width: 100%; height: 26px; }
.cable path { fill: none; stroke: #2E7D4F; stroke-width: 2.5; }
.guirnalda i { position: absolute; left: var(--x); top: 14px; width: 11px; height: 16px; margin-left: -5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--c); box-shadow: 0 0 12px var(--c); animation: titila 1.4s ease-in-out var(--t) infinite alternate; }
.guirnalda i::before { content: ""; position: absolute; top: -4px; left: 3px; width: 5px; height: 5px; background: #2E7D4F; border-radius: 1px; }
@keyframes titila { from { opacity: .35; box-shadow: none; } }
.cabecera-fila { display: flex; align-items: center; gap: 12px; }
.cab-logo { flex: none; background: #fff; border-radius: 12px; padding: 4px 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.cab-logo img { height: 28px; width: auto; }
.progreso { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; align-items: center; }
.progreso li { flex: 1; position: relative; display: grid; justify-items: center; gap: 2px; font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.45); }
.progreso li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.18); border: 2px solid transparent; transition: .3s; z-index: 1; }
.progreso li::after { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,.15); }
.progreso li:first-child::after { display: none; }
.progreso li.hecho::before { background: var(--verde); }
.progreso li.hecho::after, .progreso li.actual::after { background: var(--verde); }
.progreso li.actual { color: #fff; }
.progreso li.actual::before { background: var(--dorado); box-shadow: 0 0 0 4px rgba(255,197,49,.25), 0 0 14px var(--dorado); }
@media (max-width: 380px) { .progreso li span { display: none; } .progreso li.actual span { display: block; } }

.pantallas { flex: 1; display: grid; }
.pantalla { grid-area: 1 / 1; display: none; flex-direction: column; min-height: calc(100dvh - 140px); }
.pantalla.activa { display: flex; animation: entra .55s var(--ease) both; }
.pantalla.activa.desde-izq { animation-name: entra-izq; }
@keyframes entra { from { opacity: 0; transform: translateX(40px); } }
@keyframes entra-izq { from { opacity: 0; transform: translateX(-40px); } }
.contenido { flex: 1; padding: 8px 18px 20px; }
.acciones { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--noche) 35%); }
.acciones .boton-grande:last-child { flex: 1; }

/* ---------- Botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font-family: var(--display); font-weight: 800; font-size: 1rem; text-decoration: none; transition: transform .2s var(--ease), filter .2s; position: relative; overflow: hidden; white-space: nowrap; }
.boton:hover { transform: translateY(-2px); filter: brightness(1.06); }
.boton:active { transform: scale(.97); }
.boton:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.boton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.boton-grande { min-height: 58px; font-size: 1.06rem; }
.boton-ancho { width: 100%; }
.boton-rojo { background: linear-gradient(135deg, #FF3B22, var(--navidad)); color: #fff; box-shadow: 0 12px 28px rgba(227,23,10,.45), inset 0 -3px 0 rgba(0,0,0,.15); }
.boton-dorado { background: linear-gradient(135deg, #FFD66B, var(--naranja)); color: var(--tinta); box-shadow: 0 12px 28px rgba(254,174,51,.45); }
.boton-fantasma { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.brilla::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent var(--brillo), rgba(255,255,255,.45) calc(var(--brillo) + 8%), transparent calc(var(--brillo) + 16%)); animation: brillo 3.2s ease-in-out infinite; }
@keyframes brillo { 0% { --brillo: -30%; } 60%, 100% { --brillo: 130%; } }
.cargando { color: transparent !important; }
.cargando::before { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--tinta); border-right-color: transparent; animation: giro .7s linear infinite; }

/* ---------- Inicio ---------- */
.inicio { text-align: center; }
.logos-alianza { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 6px 0 22px; }
.logo-tarjeta { position: relative; background: #fff; border-radius: 16px; padding: 10px; height: 72px; display: grid; place-items: center; box-shadow: var(--sombra); animation: cae .8s var(--rebote) both, flota 5s ease-in-out infinite; }
.logo-tarjeta img { max-height: 52px; width: auto; }
.lt-1 { animation-delay: .2s, 1s; } .lt-2 { animation-delay: .35s, 1.8s; } .lt-3 { animation-delay: .5s, 2.6s; }
.logo-tarjeta::after { content: ""; position: absolute; inset: auto 8px -6px; height: 10px; border-radius: 0 0 10px 10px; background: repeating-linear-gradient(90deg, #fff 0 10px, #E6ECFF 10px 20px); opacity: .9; }
.gorrito-mini { position: absolute; width: 46px; left: -12px; top: -22px; transform: rotate(-22deg); transform-origin: 30% 90%; animation: gorro-baila 2.4s ease-in-out infinite; }
@keyframes gorro-baila { 50% { transform: rotate(-8deg); } }
@keyframes cae { from { opacity: 0; transform: translateY(-40px) scale(.8); } }
@media (min-width: 520px) { .logo-tarjeta { height: 86px; } .logo-tarjeta img { max-height: 62px; } }

.sello { display: inline-block; font-family: var(--guion); font-size: 1.1rem; color: var(--dorado); margin-bottom: 4px; animation: sube .8s .5s var(--ease) both; }
.titulo { margin-bottom: 12px; animation: sube .8s .6s var(--ease) both; }
.titulo .t1 { display: block; font-weight: 900; font-size: clamp(2.2rem, 10vw, 3.4rem); letter-spacing: -.04em; }
.titulo .t2 { display: inline-flex; font-weight: 900; font-size: clamp(3rem, 15vw, 5rem); letter-spacing: -.04em; line-height: .95; }
.t2 i { font-style: normal; display: inline-block; animation: salta 2.6s var(--ease) infinite; text-shadow: 0 6px 0 rgba(0,0,0,.18); }
.t2 i:nth-child(1) { color: var(--naranja); } .t2 i:nth-child(2) { color: #7C7EF0; animation-delay: .1s; } .t2 i:nth-child(3) { color: #FF4A2E; animation-delay: .2s; }
.t2 i:nth-child(4) { color: #1FD169; animation-delay: .3s; } .t2 i:nth-child(5) { color: #D46BD8; animation-delay: .4s; } .t2 i:nth-child(6) { color: var(--naranja); animation-delay: .5s; }
.t2 i:nth-child(1)::before { content: ""; }
@keyframes salta { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-10px) rotate(-5deg); } }
@keyframes sube { from { opacity: 0; transform: translateY(22px); } }
.lead { font-size: 1.12rem; color: rgba(255,255,255,.85); max-width: 28em; margin: 0 auto 10px; animation: sube .8s .7s var(--ease) both; }
.lead b { color: var(--dorado); }
.duo { display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: 8px 0 18px; animation: sube .8s .8s var(--ease) both; }
.duo-av svg { width: clamp(104px, 32vw, 140px); height: auto; filter: drop-shadow(0 14px 24px rgba(0,0,0,.35)); }
.d1 { animation: rebota 2.4s ease-in-out infinite; } .d2 { animation: rebota 2.4s 1.2s ease-in-out infinite; }
@keyframes rebota { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
.duo-arbol { font-size: clamp(3rem, 12vw, 4.2rem); animation: arbol 3s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255,197,49,.5)); }
@keyframes arbol { 50% { transform: scale(1.06); filter: drop-shadow(0 0 28px rgba(255,197,49,.8)); } }
.cifras { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.cifras div { flex: 1; max-width: 170px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); }
.cifras b { display: block; font: 900 1.9rem/1 var(--display); color: var(--dorado); }
.cifras span { font-size: .82rem; color: rgba(255,255,255,.7); }
.mini-pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-pasos li { display: grid; justify-items: center; gap: 6px; font-size: .74rem; font-weight: 700; color: rgba(255,255,255,.75); line-height: 1.2; }
.mini-pasos span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: rgba(255,255,255,.09); font-size: 1.3rem; border: 1px solid rgba(255,255,255,.12); }

/* ---------- Regalos ---------- */
.pestanas-regalo { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.08); margin: 16px 0; }
.pestanas-regalo button { flex: 1; border: 0; background: none; padding: 10px 6px; border-radius: 999px; font-weight: 800; cursor: pointer; color: rgba(255,255,255,.7); font-family: var(--display); font-size: .9rem; transition: .25s; }
.pestanas-regalo button[aria-selected="true"] { background: #fff; color: var(--tinta); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.lista-regalos { display: grid; gap: 10px; min-height: 280px; }
.regalo { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: #fff; color: var(--tinta); font-weight: 700; box-shadow: var(--sombra); border-left: 6px solid var(--c); animation: carta .5s var(--rebote) both; animation-delay: calc(var(--i) * 70ms); }
.regalo-ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--suave); font-size: 1.5rem; animation: menea 3s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes carta { from { opacity: 0; transform: translateY(18px) rotate(-2deg) scale(.95); } }
@keyframes menea { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-5deg); } }
.regalo-sub { margin: 4px 0 0; text-align: center; font-weight: 700; color: #7CF0A9; }
.aviso-talla { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px; border-radius: 16px; background: rgba(255,197,49,.12); border: 1px dashed rgba(255,197,49,.5); font-size: .9rem; color: rgba(255,255,255,.85); }

/* ---------- Formulario ---------- */
#form-registro { display: flex; flex-direction: column; gap: 14px; }
#form-registro h2, #form-registro .sub, #form-registro .antetitulo { margin-bottom: 0; }
#form-registro .sub { margin-bottom: 6px; }
.campo { display: grid; gap: 6px; }
.campo > span { font-weight: 700; font-size: .95rem; }
.campo input, .tel { width: 100%; min-height: 56px; border-radius: 18px; border: 2px solid transparent; background: #fff; color: var(--tinta); padding: 0 16px; font-size: 1.05rem; transition: border-color .2s, box-shadow .2s; }
.campo input::placeholder { color: #9AA0C3; }
.campo input:focus, .tel:focus-within { outline: none; border-color: var(--dorado); box-shadow: 0 0 0 5px rgba(255,197,49,.25); }
.tel { display: flex; align-items: center; gap: 10px; padding: 0 0 0 14px; }
.tel em { font-style: normal; font-weight: 700; color: var(--tinta-2); padding-right: 10px; border-right: 1px solid var(--linea); white-space: nowrap; }
.tel input { border: 0 !important; background: transparent; min-height: 52px; padding: 0 10px 0 0; box-shadow: none !important; }
.con-error input, .con-error .tel { border-color: #FF6A4D; }
.error { color: #FF9A85; font-size: .85rem; font-weight: 700; }
.error:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .86rem; color: rgba(255,255,255,.75); cursor: pointer; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.06); }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--verde); }
.cerrado-aviso { padding: 14px; border-radius: 14px; background: rgba(255,197,49,.15); font-weight: 700; }

/* ---------- Sorteo ---------- */
.sorteo { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, var(--noche-3), var(--noche) 70%); opacity: 0; transition: opacity .35s; }
.sorteo.ver { opacity: 1; }
.sorteo-escena { display: grid; justify-items: center; gap: 24px; padding: 20px; text-align: center; }
.sorteo canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.caja { position: relative; width: 180px; height: 170px; }
.caja-cuerpo { position: absolute; bottom: 0; left: 12px; right: 12px; height: 116px; border-radius: 10px 10px 18px 18px; background: linear-gradient(90deg, transparent 42%, var(--dorado) 42% 58%, transparent 58%), linear-gradient(135deg, #FF3B22, #B80F05); box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.caja-tapa { position: absolute; top: 22px; left: 0; right: 0; height: 42px; border-radius: 12px; background: linear-gradient(90deg, transparent 42%, var(--dorado) 42% 58%, transparent 58%), linear-gradient(135deg, #FF5A3D, var(--navidad)); z-index: 2; transform-origin: 10% 100%; transition: transform .8s var(--rebote); }
.lazo { position: absolute; left: 50%; top: -32px; width: 76px; height: 36px; transform: translateX(-50%); }
.lazo::before, .lazo::after { content: ""; position: absolute; bottom: 0; width: 36px; height: 32px; border: 8px solid var(--dorado); border-radius: 50% 50% 0 50%; }
.lazo::before { left: 0; transform: rotate(-20deg); } .lazo::after { right: 0; transform: scaleX(-1) rotate(-20deg); }
.caja-luz { position: absolute; left: 50%; top: 40px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: translateX(-50%) scale(0); box-shadow: 0 0 80px 40px rgba(255,214,107,.8); transition: transform .5s .2s; z-index: 1; }
.caja.sacude { animation: sacude .45s ease-in-out infinite; }
@keyframes sacude { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg) translateY(-5px); } 75% { transform: rotate(7deg) translateY(-5px); } }
.caja.abre .caja-tapa { transform: translate(-36px, -90px) rotate(-38deg); }
.caja.abre .caja-luz { transform: translateX(-50%) scale(2); }
.ruleta { min-height: 70px; font: 900 clamp(2.6rem, 11vw, 3.8rem)/1.1 var(--display); opacity: 0; transform: scale(.8); transition: .3s; }
.ruleta.ver { opacity: 1; transform: none; }
.ruleta.final { animation: latido 1s 2; }
.sorteo-texto { color: rgba(255,255,255,.8); font-weight: 700; margin: 0; }

/* ---------- Tu amigo ---------- */
.ficha { background: #fff; color: var(--tinta); border-radius: 30px; overflow: hidden; box-shadow: var(--sombra); margin-top: 10px; }
.ficha.entra { animation: voltea .9s var(--ease) both; }
@keyframes voltea { from { opacity: 0; transform: perspective(900px) rotateY(-70deg) scale(.9); } }
.ficha-av { position: relative; display: grid; place-items: center; padding: 26px 0 18px; background: linear-gradient(180deg, #E8F0FF, #fff); }
.ficha-av::before { content: "❄ ✦ ❄ ✦ ❄ ✦ ❄"; position: absolute; top: 8px; letter-spacing: .6em; color: #B8C4F0; font-size: .9rem; }
.ficha-av svg { width: 200px; height: 200px; filter: drop-shadow(0 16px 26px rgba(31,44,107,.28)); animation: rebota 3s ease-in-out infinite; }
.ficha-cuerpo { padding: 4px 22px 22px; text-align: center; }
.chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--suave); font-weight: 800; font-size: .88rem; }
.ficha-nombre { font-size: clamp(2.6rem, 12vw, 3.4rem); font-weight: 900; margin: 8px 0; background: linear-gradient(90deg, var(--morado), var(--navidad), var(--naranja)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ficha-desc { font-size: 1.08rem; color: var(--tinta-2); }
.hogar { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(3,173,67,.12), rgba(52,53,152,.07)); border: 1px solid rgba(3,173,67,.25); }
.hogar > span { font-size: 1.8rem; }
.hogar div { display: grid; } .hogar small { color: var(--tinta-2); }
.regalos-amigo { margin: 18px 0 14px; border-radius: 22px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 4px 16px; }
.regalos-amigo summary { cursor: pointer; font: 800 1.05rem var(--display); padding: 12px 0; list-style: none; }
.regalos-amigo summary::-webkit-details-marker { display: none; }
.regalos-amigo summary::after { content: "▾"; float: right; transition: .2s; }
.regalos-amigo[open] summary::after { transform: rotate(180deg); }
.regalos-amigo h4 { font-size: .95rem; color: var(--dorado); margin: 6px 0 8px; }
.regalos-amigo ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.regalos-amigo li { display: flex; gap: 10px; align-items: center; font-size: .95rem; }
.regalos-amigo li span { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.1); }

/* ---------- Avatares animados ---------- */
.avatar .av-ojos { transform-box: fill-box; transform-origin: center; animation: parpadeo 4.5s infinite; }
@keyframes parpadeo { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.avatar .pompon { transform-box: view-box; transform-origin: 150px 30px; animation: pompon 1.8s ease-in-out infinite; }
@keyframes pompon { 50% { transform: rotate(14deg); } }
.avatar .cascabel { transform-box: fill-box; transform-origin: 50% 0; animation: cascabel 1.2s ease-in-out infinite; }
@keyframes cascabel { 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
.avatar .nariz-reno { animation: nariz 1.4s ease-in-out infinite; }
@keyframes nariz { 50% { fill: #FF6A4D; filter: drop-shadow(0 0 6px #FF3B22); } }
.avatar .oreja-i { transform-box: fill-box; transform-origin: 50% 0; animation: oreja 3s ease-in-out infinite; }
@keyframes oreja { 0%, 70%, 100% { transform: rotate(18deg); } 80% { transform: rotate(30deg); } 90% { transform: rotate(12deg); } }
.avatar .av-reno { transform-box: fill-box; transform-origin: 50% 100%; animation: reno 3s ease-in-out infinite; }
@keyframes reno { 50% { transform: rotate(3deg); } }

/* ---------- Firma ---------- */
.firma { display: grid; justify-items: center; gap: 4px; padding: 10px 16px 18px; text-align: center; position: relative; z-index: 2; }
.firma a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: .88rem; color: rgba(255,255,255,.8); padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.06); }
.firma img { width: 22px; height: 22px; border-radius: 6px; }
.firma b { font-family: var(--display); color: #fff; }
.firma small { font-size: .76rem; color: rgba(255,255,255,.5); }
.latido { display: inline-block; font-style: normal; animation: latido 1.2s infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); } 15%, 45% { transform: scale(1.25); } }

.aviso { position: fixed; z-index: 260; left: 50%; bottom: 96px; transform: translate(-50%, 20px); width: min(92vw, 460px); padding: 14px 18px; border-radius: 18px; background: #fff; color: var(--tinta); font-weight: 700; box-shadow: 0 18px 40px rgba(0,0,0,.4); opacity: 0; transition: .3s var(--ease); }
.aviso.ver { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Escritorio: la app se ve como una tarjeta inmersiva ---------- */
@media (min-width: 900px) {
  .app { margin: 24px auto; min-height: calc(100dvh - 48px); border-radius: 36px; background: rgba(13,18,54,.55); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 120px rgba(0,0,0,.5); backdrop-filter: blur(8px); overflow: clip; }
  .cabecera { background: linear-gradient(rgba(13,18,54,.95) 70%, transparent); }
  .acciones { background: linear-gradient(transparent, rgba(13,18,54,.98) 35%); }
  .pantalla { min-height: 640px; }
}

/* ---------- Plantilla del PDF (A4 = 794 px) ---------- */
.pdf-fuera { position: fixed; left: -10000px; top: 0; }
.pdf { width: 794px; height: 1122px; background: #fff; color: #1F2C6B; font-family: var(--texto); padding: 0 50px; position: relative; overflow: hidden; }
.pdf-franja { display: flex; height: 14px; margin: 0 -50px 24px; } .pdf-franja i { flex: 1; }
.pdf-franja i:nth-child(1) { background: var(--naranja); } .pdf-franja i:nth-child(2) { background: var(--azul); } .pdf-franja i:nth-child(3) { background: var(--rojo); } .pdf-franja i:nth-child(4) { background: var(--verde); } .pdf-franja i:nth-child(5) { background: var(--morado); }
.pdf-logos { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pdf-logos img { height: 64px; width: auto; }
.pdf-titulo { text-align: center; margin: 18px 0 8px; }
.pdf-titulo span { font-family: var(--guion); color: var(--navidad); font-size: 18px; }
.pdf-titulo h1 { font-size: 36px; color: var(--morado); margin: 0; }
.pdf-para { margin: 10px 0 16px; padding: 10px 16px; background: #F4F1F9; border-radius: 12px; font-size: 15px; text-align: center; }
.pdf-ficha { display: flex; gap: 24px; align-items: center; padding: 20px; border: 2px solid #E5E1EE; border-radius: 22px; }
.pdf-ficha img { flex: none; }
.pdf-ficha h2 { font-size: 40px; margin: 2px 0 8px; color: var(--morado); }
.pdf-ficha p { margin: 0 0 8px; font-size: 15px; }
.pdf-especie { font-weight: 700; color: #565C86; text-transform: uppercase; letter-spacing: .08em; font-size: 12px !important; }
.pdf-ubi { padding: 8px 12px; background: #E9F7EF; border-radius: 10px; }
.pdf h3 { margin: 22px 0 10px; font-size: 20px; }
.pdf-regalos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pdf-regalos > div { padding: 14px 16px; border-radius: 16px; background: #FBFAFD; border-top: 5px solid var(--navidad); }
.pdf-regalos > div + div { border-top-color: var(--verde); }
.pdf-regalos h4 { font-size: 15px; margin: 0 0 8px; }
.pdf-regalos ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.pdf-nota { font-size: 12px; color: #565C86; margin: 10px 0 0; text-align: center; }
.pdf-contacto { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #FFF4E0; font-size: 14px; }
.pdf-pie { position: absolute; left: 50px; right: 50px; bottom: 26px; display: grid; gap: 4px; text-align: center; font-size: 11px; color: #565C86; border-top: 1px solid #E5E1EE; padding-top: 10px; }

@media print { body.imprimiendo > *:not(.pdf-fuera) { display: none !important; } body.imprimiendo .pdf-fuera { position: static; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }
.gorrito .pompon, .gorrito-mini .pompon { transform-box: fill-box; transform-origin: 0 0; animation: pompon 1.8s ease-in-out infinite; }

/* ---------- Luces navideñas alrededor de los logos ---------- */
.logo-tarjeta, .carga-logos > span, .cab-logo { position: relative; overflow: visible; }
.marco-luces { position: absolute !important; inset: -6px; pointer-events: none; z-index: 3; border: 2px solid #1E6B3F; border-radius: 20px; background: none !important; padding: 0 !important; height: auto !important; animation: none !important; display: block !important; }
.marco-luces i { position: absolute; width: 8px; height: 12px; margin: -6px 0 0 -4px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--c);
  transform: rotate(var(--r)) translateY(5px); box-shadow: 0 0 10px var(--c), 0 0 2px #fff inset; animation: titila 1.1s ease-in-out var(--t) infinite alternate; }
.marco-luces i::before { content: ""; position: absolute; top: -3px; left: 2px; width: 4px; height: 4px; border-radius: 1px; background: #1E6B3F; }
.cab-logo .marco-luces { border-radius: 16px; }
.cab-logo .marco-luces i { width: 6px; height: 9px; margin: -4.5px 0 0 -3px; }
.logo-tarjeta::after { display: none; }
.logos-alianza { gap: 16px; margin-top: 14px; padding: 0 8px; }

/* ---------- Prioridad: alimento ---------- */
.prioridad { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 22px; margin: 14px 0;
  background: linear-gradient(135deg, rgba(255,197,49,.22), rgba(227,23,10,.18)); border: 1.5px solid rgba(255,197,49,.6);
  box-shadow: 0 0 0 0 rgba(255,197,49,.5); animation: aura 2.6s ease-in-out infinite; }
@keyframes aura { 50% { box-shadow: 0 0 26px 2px rgba(255,197,49,.35); } }
.prioridad b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.08rem; color: var(--dorado); }
.prioridad span { font-size: .93rem; color: rgba(255,255,255,.88); }
.prioridad span b { display: inline; font-family: inherit; font-size: inherit; }
.prio-plato { position: relative; flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #fff; font-size: 1.9rem; animation: menea 2.6s ease-in-out infinite; }
.prio-plato span { position: absolute; right: -6px; top: -8px; font-size: 1rem; animation: latido 1.2s infinite; }
.combo { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 12px; }
.combo-item { display: grid; justify-items: center; gap: 2px; width: 74px; padding: 8px 4px; border-radius: 16px; background: rgba(255,255,255,.09); font-size: 1.6rem; border: 1px solid rgba(255,255,255,.14); }
.combo-item small { font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.8); }
.combo-item:first-child { background: #fff; } .combo-item:first-child small { color: var(--tinta); }
.combo-final { background: rgba(3,173,67,.25); border-color: rgba(71,232,144,.5); }
.combo-mas, .combo-igual { font: 900 1.4rem var(--display); color: var(--dorado); }
.regalo-prio { border-left-color: var(--dorado) !important; box-shadow: 0 0 0 3px rgba(255,197,49,.65), var(--sombra); }
.regalo-prio .regalo-ico { background: #FFF2CC; }
.etq-prio { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--dorado); color: var(--tinta); font-style: normal; font-size: .72rem; font-weight: 800; vertical-align: middle; animation: latido 1.6s infinite; }
.li-prio { padding: 6px 8px; margin: 0 -8px; border-radius: 12px; background: rgba(255,197,49,.14); }
.li-prio .etq-prio { margin-left: 0; margin-top: 4px; }
.regalos-amigo li div { display: grid; justify-items: start; }
.pdf-prio { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: #FFF2CC; border: 2px solid #FFC531; font-size: 15px; }

/* En la pantalla principal solo van los 3 logos grandes */
body[data-pantalla="inicio"] .cab-logo { display: none; }

/* La "o" de Peludo: una huella con gorro de Navidad */
.t2 .huella-o { width: .92em; height: 1.0em; align-self: flex-end; margin: 0 0 -.02em .02em; color: var(--naranja); }
.t2 .huella-o svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 0 rgba(0,0,0,.18)); }
.h-gorro { transform-box: fill-box; transform-origin: 20% 100%; animation: gorro-baila 2.4s ease-in-out infinite; }
.h-pompon { transform-box: fill-box; transform-origin: 0 0; animation: pompon 1.6s ease-in-out infinite; }

/* ---------- Puente hacia "Deja tu huella" ---------- */
.puente { display: flex; align-items: center; gap: 14px; text-align: left; text-decoration: none; margin: 4px 0 18px; padding: 16px; border-radius: 22px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(143,50,146,.55), rgba(3,173,67,.35)); border: 1px solid rgba(255,255,255,.22); box-shadow: var(--sombra); transition: transform .25s var(--ease); }
.puente:hover { transform: translateY(-2px); }
.puente::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 45%, transparent 60%); background-size: 250% 100%; animation: barrido 4s ease-in-out infinite; }
@keyframes barrido { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.puente-huellas { flex: none; display: grid; width: 56px; height: 56px; place-items: center; position: relative; border-radius: 18px; background: rgba(255,255,255,.14); }
.puente-huellas i { position: absolute; font-style: normal; font-size: 1.1rem; opacity: 0; animation: pisada 2.4s infinite; }
.puente-huellas i:nth-child(1) { left: 8px; bottom: 6px; } .puente-huellas i:nth-child(2) { left: 20px; top: 18px; animation-delay: .4s; } .puente-huellas i:nth-child(3) { right: 6px; top: 4px; animation-delay: .8s; }
@keyframes pisada { 0% { opacity: 0; transform: scale(.4); } 15%, 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.puente-texto { flex: 1; display: grid; gap: 2px; position: relative; }
.puente-texto small { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: #B9F5CF; }
.puente-texto b { font: 900 1.12rem var(--display); }
.puente-texto span { font-size: .88rem; color: rgba(255,255,255,.85); }
.puente-ir { font: 900 1.4rem var(--display); animation: empuja 1.6s ease-in-out infinite; }
@keyframes empuja { 50% { transform: translateX(5px); } }
.puente-amigo { margin-top: 18px; }

.cab-huella { display: none; margin: 0; font: 800 .95rem var(--display); color: #B9F5CF; }
body[data-pantalla="huella"] .progreso { display: none; }
body[data-pantalla="huella"] .cab-huella { display: block; }

/* ---------- Pantalla "Deja tu huella" ---------- */
.huella-cabeza { position: relative; text-align: center; padding-top: 6px; }
.huellas-camino { display: flex; justify-content: center; gap: 10px; margin-bottom: 6px; }
.huellas-camino i { font-style: normal; font-size: 1.2rem; opacity: 0; animation: pisada 3s infinite; }
.huellas-camino i:nth-child(odd) { transform: translateY(-6px); }
.huellas-camino i:nth-child(2) { animation-delay: .3s; } .huellas-camino i:nth-child(3) { animation-delay: .6s; } .huellas-camino i:nth-child(4) { animation-delay: .9s; } .huellas-camino i:nth-child(5) { animation-delay: 1.2s; }
.huella-cabeza h2 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
.huella-cabeza h2 span { background: linear-gradient(90deg, #7CF0A9, var(--dorado), #E794EA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.huella-cabeza .sub b { color: #7CF0A9; }
.huella-pregunta { font: 800 1.05rem var(--display); margin: 18px 0 10px; }
.huella-pregunta small { display: block; font: 700 .8rem var(--texto); color: rgba(255,255,255,.6); }
.apoyos { display: grid; gap: 12px; }
.apoyo { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 22px; background: #fff; color: var(--tinta); cursor: pointer; box-shadow: var(--sombra); border: 3px solid transparent; transition: transform .25s var(--rebote), border-color .2s; animation: carta .6s var(--rebote) both; }
.apoyo:nth-child(2) { animation-delay: .12s; }
.apoyo input { position: absolute; opacity: 0; }
.apoyo:hover { transform: translateY(-2px); }
.apoyo.elegido { border-color: var(--c); transform: scale(1.015); }
.apoyo:has(input:focus-visible) { outline: 3px solid var(--dorado); outline-offset: 3px; }
.apoyo-ico { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; font-size: 1.7rem; background: color-mix(in srgb, var(--c) 14%, #fff); }
.apoyo-cuerpo { display: grid; gap: 4px; padding-right: 22px; }
.apoyo-cuerpo b { font: 900 1.06rem var(--display); }
.apoyo-cuerpo span { font-size: .92rem; color: var(--tinta-2); }
.apoyo-cuerpo em { justify-self: start; font-style: normal; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--c); color: #fff; }
.apoyo-check { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--linea); transition: .2s; }
.apoyo.elegido .apoyo-check { background: var(--c); border-color: var(--c); }
.apoyo.elegido .apoyo-check::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #fff; font-weight: 900; font-size: .85rem; }
.apoyo.elegido .apoyo-ico { animation: latido 1s 1; }
[data-error-apoyo] { display: block; margin-top: 8px; }
.huella-form { display: grid; gap: 14px; margin-top: 18px; }
#huella-campos { display: grid; gap: 14px; }
.soy { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.soy > span { font-size: 1.6rem; } .soy div { display: grid; } .soy small { color: rgba(255,255,255,.7); }
.huella-nota { margin: 0; }
.boton-verde { background: linear-gradient(135deg, #1FD169, var(--pino)); color: #fff; box-shadow: 0 12px 28px rgba(3,173,67,.45), inset 0 -3px 0 rgba(0,0,0,.15); }

.huella-gracias { text-align: center; padding-top: 30px; }
.sello-huella { width: 140px; height: 140px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(124,240,169,.35), transparent 70%); }
.sello-huella span { font-size: 4.5rem; animation: estampa .7s var(--rebote) both, flota 4s 1s ease-in-out infinite; }
@keyframes estampa { from { transform: scale(3) rotate(-30deg); opacity: 0; } }
.frase-final { margin-top: 22px; font-family: var(--guion); font-size: 1.15rem; line-height: 1.5; color: var(--dorado); }
