/* ==========================================================
   Your Light / Tu Luz — Lights Will Guide You
   Un cielo de estrellas de papel colgadas sobre el mapa del
   mundo, como el telón de estrellas del espectáculo.
   ========================================================== */
:root {
  --noche: #100D26;     /* fondo: la sala a oscuras */
  --telon: #1A1638;     /* superficies */
  --papel: #F8F7FB;     /* estrellas de papel */
  --bruma: #A9A4C6;     /* texto secundario */
  --hilo:  #2D2853;     /* líneas y puntos del mapa */
  --orbe:  #FFD93D;     /* la luz propia: el orbe del show */
  --foco-v: #A98BFF;    /* foco violeta */
  --foco-c: #4EE5E5;    /* foco cian / mar */
  --tinta: #16132F;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --suave: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--noche); color: var(--papel); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
html[data-lang="es"] .en, html[data-lang="en"] .es { display: none !important; }
:focus-visible { outline: 2px solid var(--orbe); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--orbe); color: var(--tinta); }
a { color: inherit; }

/* ---------- Barra ---------- */
.barra { position: absolute; z-index: 20; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center; padding: max(.9rem, env(safe-area-inset-top)) var(--gutter) .9rem; pointer-events: none; }
.barra > * { pointer-events: auto; }
/* El nombre usa las letras del logo oficial (todo en mayúsculas) */
.marca { --alto: clamp(11.7px, 3.24vw, 15.6px); display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--papel); }
.marca-estrella { flex: none; width: .95rem; height: .95rem; fill: var(--orbe); filter: drop-shadow(0 0 4px rgba(255, 217, 61, .6)); }
.palabra { display: block; height: var(--alto); width: calc(var(--alto) * 17.07); fill: currentColor; overflow: visible; }
.idioma { display: inline-flex; gap: .15rem; padding: .25rem; border: 1px solid var(--hilo); border-radius: 99px; background: rgba(16, 13, 38, .6); color: var(--bruma); font: 600 .78rem/1 var(--sans); cursor: pointer; }
.idioma span { padding: .4rem .55rem; border-radius: 99px; }
html[data-lang="es"] .idioma [data-l="es"], html[data-lang="en"] .idioma [data-l="en"] { background: var(--papel); color: var(--tinta); }

/* ---------- Escena ---------- */
.escena { position: relative; isolation: isolate; }
.lienzo { position: relative; height: clamp(600px, 86svh, 780px); overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #1E1846 0%, var(--noche) 60%); }
@media (min-width: 960px) { .lienzo { height: clamp(680px, 100svh, 980px); } }
.focos { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    conic-gradient(from 168deg at 14% -4%, transparent 0deg, rgba(169, 139, 255, .16) 8deg, rgba(169, 139, 255, .05) 22deg, transparent 30deg),
    conic-gradient(from 162deg at 88% -4%, transparent 0deg, rgba(78, 229, 229, .12) 9deg, rgba(78, 229, 229, .04) 20deg, transparent 28deg); }
.cielo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; touch-action: pan-y; cursor: grab; }
.cielo.is-arrastre { cursor: grabbing; }

.cabecera { position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); top: 4.4rem; max-width: 36rem; pointer-events: none; }
h1 { margin: 0; font: 400 clamp(2.1rem, 8.4vw, 3.6rem)/1 var(--serif); font-variation-settings: 'SOFT' 100, 'opsz' 144; letter-spacing: -.02em; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(16, 13, 38, .95); }
.bajada { margin: .8rem 0 0; max-width: 30rem; color: #D9D4EA; font-size: clamp(.98rem, 1.3vw, 1.08rem); text-shadow: 0 1px 12px rgba(16, 13, 38, 1); }
.contador { margin: .7rem 0 0; font: italic 400 1.05rem/1.3 var(--serif); color: var(--orbe); min-height: 1.3em; text-shadow: 0 1px 12px rgba(16, 13, 38, 1); }
.pista { position: absolute; z-index: 5; left: 50%; bottom: 3.5%; transform: translateX(-50%); margin: 0; padding: .45rem .9rem; border-radius: 99px; background: rgba(16, 13, 38, .78); color: var(--bruma); font-size: .8rem; white-space: nowrap; pointer-events: none; transition: opacity .6s; }
.pista.is-fuera { opacity: 0; }
@media (min-width: 960px) {
  .pista { display: none; }
  /* El texto baja a la franja del mar, como un subtítulo de escena; el cielo queda libre arriba */
  .cabecera { top: auto; bottom: clamp(1.8rem, 5vh, 3.2rem); right: auto; max-width: min(34rem, 40vw); }
  h1 { font-size: clamp(2.3rem, 3.6vw, 3.5rem); }
}

/* Tarjeta de una estrella */
.tarjeta { position: absolute; z-index: 8; max-width: min(19rem, 80vw); padding: .85rem 1rem .8rem; border-radius: 4px 14px 14px 14px; background: var(--papel); color: var(--tinta);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45); pointer-events: none; opacity: 0; transform: translate(-12px, 14px) scale(.96); transform-origin: 0 0; transition: opacity .2s, transform .25s var(--suave); }
.tarjeta.is-on { opacity: 1; transform: translate(-12px, 14px) scale(1); }
.tarjeta.is-izq { border-radius: 14px 4px 14px 14px; transform-origin: 100% 0; transform: translate(calc(-100% + 12px), 14px) scale(.96); }
.tarjeta.is-izq.is-on { transform: translate(calc(-100% + 12px), 14px) scale(1); }
.tarjeta q { display: block; font: italic 400 1.12rem/1.3 var(--serif); quotes: '“' '”'; overflow-wrap: anywhere; }
.tarjeta small { display: block; margin-top: .45rem; color: #625D7C; font-size: .8rem; }
.tarjeta.is-propia { background: var(--orbe); }
.tarjeta.is-propia small { color: #5C4500; }

/* ---------- Mar y barquito ---------- */
.mar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 20%; pointer-events: none; }
@media (min-width: 960px) { .mar { height: 32%; } }
.ola { position: absolute; left: 0; width: 200%; height: 70px; }
.ola path { fill: currentColor; }
.ola--3 { top: 0; color: #1C2560; animation: deriva 38s linear infinite; }
.ola--2 { top: 22px; color: #172E66; animation: deriva 26s linear infinite reverse; }
.ola--1 { top: 46px; color: #102552; animation: deriva 18s linear infinite; }
.mar::after { content: ''; position: absolute; inset: 96px 0 0; background: linear-gradient(#102552, #0A1838 70%); }
@keyframes deriva { to { transform: translateX(-50%); } }
/* El barquito va metido en el agua: la ola de atrás queda detrás y las dos de adelante le tapan el casco.
   Sin z-index para respetar ese orden. luz.js lo sube y baja con la ola por dentro del SVG (nítido en cada cuadro). */
.barquito { --bw: clamp(76px, 8.5vw, 128px); position: absolute; left: 50%; top: calc(52px - var(--bw) * .56); width: var(--bw); margin-left: calc(var(--bw) / -2); }
@media (max-width: 959px) { .barquito { left: 72%; } }
.barquito svg { display: block; width: 100%; height: auto; overflow: visible; }
#orbe { transition: opacity .4s; }
/* Reflejo dorado de la esfera sobre el agua, justo bajo el barquito */
.reflejo { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(closest-side, rgba(255, 217, 61, .5), rgba(255, 217, 61, .16) 55%, rgba(255, 217, 61, 0)); }

/* ---------- Panel / formulario ---------- */
.panel { position: relative; z-index: 6; }
.formulario, .listo { background: rgba(26, 22, 56, .92); border: 1px solid var(--hilo); border-radius: 18px; padding: 1.15rem 1.15rem 1rem; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.campo { display: block; position: relative; }
.campo + .campo, .fila { margin-top: .8rem; }
.fila { display: grid; grid-template-columns: 1.15fr 1fr; gap: .7rem; }
.fila .campo + .campo { margin-top: 0; }
.etiqueta { display: block; margin-bottom: .35rem; color: var(--bruma); font-size: .82rem; }
textarea, input, select { width: 100%; border: 1px solid #3A3466; border-radius: 10px; background: var(--noche); color: var(--papel); font: 400 1rem/1.35 var(--sans); padding: .7rem .8rem; }
textarea { resize: none; font: italic 400 1.2rem/1.3 var(--serif); min-height: 3.4rem; }
textarea::placeholder, input::placeholder { color: #6F6992; }
select { appearance: none; -webkit-appearance: none; padding-right: 2rem; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A9A4C6' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: .7rem; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--orbe); box-shadow: 0 0 0 3px rgba(255, 217, 61, .2); }
.cuenta { position: absolute; right: .7rem; bottom: .45rem; color: #6F6992; font-size: .72rem; }
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.9rem; padding: .7rem 1.2rem; border: 0; border-radius: 99px; background: var(--orbe); color: var(--tinta); font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform .2s var(--suave), box-shadow .2s; }
.boton svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.boton:hover:not(:disabled) { box-shadow: 0 0 0 5px rgba(255, 217, 61, .2); }
.boton:active:not(:disabled) { transform: scale(.97); }
.boton:disabled { opacity: .45; cursor: not-allowed; }
.boton--linea { background: transparent; color: var(--papel); box-shadow: inset 0 0 0 1px #4A4380; }
.boton--linea:hover { box-shadow: inset 0 0 0 1px var(--papel); }
.formulario > .boton { width: 100%; margin-top: 1rem; }
.aviso { margin: .6rem 0 0; color: #FF8AAE; font-size: .88rem; min-height: 0; }
.aviso:empty { display: none; }
.letra-chica { margin: .7rem 0 0; color: #7C76A0; font-size: .78rem; line-height: 1.45; }
.listo-t { margin: 0; font: italic 400 1.35rem/1.25 var(--serif); color: var(--orbe); }
.listo-s { margin: .35rem 0 1rem; color: var(--bruma); font-size: .95rem; }
.acciones { display: flex; flex-wrap: wrap; gap: .5rem; }
.acciones .boton { flex: 1 1 0; white-space: nowrap; padding-inline: .9rem; }
.otra { margin-top: .8rem; padding: .3rem 0; border: 0; background: none; color: var(--bruma); font: 500 .88rem/1.2 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Móvil: el formulario va debajo del cielo */
@media (max-width: 959px) {
  .panel { margin-top: -1.2rem; padding: 0 var(--gutter) 2.5rem; }
  .formulario, .listo { background: var(--telon); }
}
/* Escritorio: el formulario flota sobre el mar, a la derecha */
@media (min-width: 960px) {
  .panel { position: absolute; right: var(--gutter); bottom: clamp(1.2rem, 4vh, 2.4rem); width: 24rem; }
  .formulario, .listo { padding: 1rem 1rem .85rem; }
  textarea { min-height: 2.9rem; }
}

/* ---------- Carrera y últimas luces ---------- */
.envoltura { max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }
.carrera { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--noche); }
.dos { display: grid; gap: 3.5rem; }
@media (min-width: 900px) { .dos { grid-template-columns: 1fr 1.35fr; gap: 5rem; } }
h2 { margin: 0; font: 400 clamp(1.7rem, 3vw, 2.3rem)/1.1 var(--serif); font-variation-settings: 'SOFT' 100; letter-spacing: -.01em; }
.nota { margin: .7rem 0 1.6rem; color: var(--bruma); max-width: 30rem; }
.ranking { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.ranking li { counter-increment: r; display: grid; grid-template-columns: 2.1rem 1fr auto; align-items: baseline; gap: .4rem; padding: .7rem 0; border-bottom: 1px solid var(--hilo); }
.ranking li::before { content: counter(r); color: #6F6992; font: 400 1rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.ranking li:first-child { color: var(--orbe); }
.ranking li:first-child::before { color: var(--orbe); }
.ranking .n { font: italic 400 1.15rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.ranking .barra-luz { grid-column: 2 / 4; height: 3px; margin-top: .4rem; border-radius: 3px; background: linear-gradient(90deg, var(--papel), rgba(248, 247, 251, .15)); transform-origin: 0 50%; }
.ranking li:first-child .barra-luz { background: linear-gradient(90deg, var(--orbe), rgba(255, 217, 61, .15)); }
.ranking li.vacio { display: block; color: var(--bruma); }
.ranking li.vacio::before { content: none; }
.ultimas { list-style: none; margin: 1.5rem 0 0; padding: 0; columns: 2 15rem; column-gap: 2rem; }
.ultimas li { break-inside: avoid; margin: 0 0 1.6rem; }
.ultimas q { display: block; font: italic 400 1.2rem/1.3 var(--serif); quotes: '“' '”'; overflow-wrap: anywhere; }
.ultimas small { display: block; margin-top: .35rem; color: var(--bruma); font-size: .82rem; }
.ultimas li.propia { --c: var(--orbe); }

.escenario { padding: clamp(3rem, 7vw, 5rem) 0 clamp(3.5rem, 8vw, 6rem); background: linear-gradient(var(--noche), #0A1838); text-align: center; }
.escenario .logo { display: block; width: clamp(150px, 20vw, 210px); aspect-ratio: 1612 / 1240; margin: 0 auto clamp(1.8rem, 4vw, 2.6rem); fill: var(--papel); }
.promesa { margin: 0 auto 1.6rem; max-width: 34rem; font: 400 clamp(1.35rem, 2.6vw, 1.85rem)/1.3 var(--serif); font-variation-settings: 'SOFT' 100; text-wrap: balance; }
.volver { display: inline-flex; padding: .8rem 1.4rem; border-radius: 99px; box-shadow: inset 0 0 0 1px #4A4380; text-decoration: none; font-weight: 600; }
.volver:hover { box-shadow: inset 0 0 0 1px var(--papel); }
.pie { padding: 1.6rem var(--gutter) max(1.6rem, env(safe-area-inset-bottom)); background: #0A1838; color: #6F6992; font-size: .78rem; text-align: center; }
.pie p { max-width: 46rem; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .ola, .barquito { animation: none; }
  .tarjeta, .boton { transition: none; }
}

/* Pantalla de "listo": compartir en historias */
[hidden] { display: none !important; }
.vuelta { margin: 0 0 .85rem; padding: .55rem .8rem; border: 1px solid rgba(255, 217, 61, .35); border-radius: 12px; background: rgba(255, 217, 61, .08); color: var(--orbe); font-size: .88rem; line-height: 1.35; }
.listo-cabeza { display: grid; grid-template-columns: 1fr auto; gap: .9rem; align-items: start; }
.mini { display: block; flex: none; width: 54px; padding: 0; border: 0; border-radius: 7px; background: var(--noche); overflow: hidden; cursor: zoom-in;
  transform: rotate(3deg); box-shadow: 0 0 0 1px #4A4380, 0 10px 22px rgba(0, 0, 0, .45); transition: transform .25s var(--suave); }
.mini:hover, .mini:focus-visible { transform: rotate(0) scale(1.04); }
.mini img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; }
.boton--ancho { width: 100%; }
.nota-app { margin: .55rem 0 0; color: var(--bruma); font-size: .82rem; line-height: 1.4; text-align: center; }
.pasos-t { margin: 1.15rem 0 .55rem; color: var(--papel); font-size: .86rem; font-weight: 600; }
.pasos { display: grid; gap: .6rem; margin: 0 0 1.1rem; padding: 0; list-style: none; color: var(--bruma); font-size: .86rem; line-height: 1.4; }
.pasos li { display: grid; grid-template-columns: 28px 1fr; gap: .75rem; align-items: center; }
.pasos b { color: var(--papel); font-weight: 600; }
.tel { display: block; width: 28px; height: auto; overflow: visible; }
.tel-c { fill: rgba(248, 247, 251, .04); stroke: #4A4380; stroke-width: 1.5; }
.tel-img { fill: rgba(255, 217, 61, .14); }
.tel-oro { fill: var(--orbe); }
.tel-hoja { fill: #2D2853; }
.tel-punto { fill: #4A4380; }
.tel-anillo { fill: rgba(255, 217, 61, .22); stroke: var(--orbe); stroke-width: 1.6; }
.tel-linea { fill: none; stroke: #6E67A0; stroke-width: 1.5; }
.tel-pastilla { fill: var(--papel); }
.tel-cadena { fill: none; stroke: #C99500; stroke-width: 1.5; stroke-linecap: round; }
.tel-texto { fill: #A9A4C6; }
.tel-arroba { fill: var(--tinta); font: 700 8.5px var(--sans); }
.enlace { margin-left: .25rem; padding: .1rem .55rem; border: 1px solid #4A4380; border-radius: 99px; background: transparent; color: var(--orbe); font: 600 .8rem var(--sans); cursor: pointer; white-space: nowrap; }
.enlace.is-copiado { border-color: rgba(255, 217, 61, .55); }
.seguir { display: flex; justify-content: center; align-items: center; min-height: 2.75rem; margin-top: .7rem; border-radius: 99px; box-shadow: inset 0 0 0 1px #4A4380; color: var(--papel); font-weight: 600; text-decoration: none; }
.seguir:hover { box-shadow: inset 0 0 0 1px var(--papel); }

/* Imagen en grande: se guarda manteniendo el dedo encima */
body.con-visor { overflow: hidden; }
.visor { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow-y: auto;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(8, 6, 22, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.visor-caja { width: 100%; max-width: 25rem; text-align: center; }
.visor-t { margin: 0; font: italic 400 1.25rem/1.25 var(--serif); color: var(--orbe); }
.visor-img { display: block; width: auto; height: min(54svh, 520px); max-width: 100%; aspect-ratio: 9 / 16; margin: .8rem auto; border-radius: 14px; background: var(--telon);
  box-shadow: 0 0 0 1px #4A4380, 0 18px 50px rgba(0, 0, 0, .55); -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; object-fit: contain; }
.visor-s { margin: 0 auto 1rem; max-width: 22rem; color: #D9D4EA; font-size: .9rem; line-height: 1.45; }
.visor-acciones { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.visor-acciones .boton { flex: 1 1 100%; }

/* Aviso corto arriba ("Enlace copiado…") */
.brindis { position: fixed; z-index: 110; left: 50%; top: max(.8rem, env(safe-area-inset-top)); max-width: calc(100% - 2rem); margin: 0; padding: .65rem 1.05rem;
  border-radius: 14px; background: var(--papel); color: var(--tinta); font: 600 .86rem/1.35 var(--sans); text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  opacity: 0; transform: translate(-50%, -140%); transition: transform .35s var(--suave), opacity .35s; pointer-events: none; }
.brindis.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .brindis, .mini { transition: none; } }

/* ==========================================================
   v6 — abanico de respuestas, zoom, chispas, colores, arcoíris
   ========================================================== */
/* La línea que abre la pregunta a todo tipo de luces */
.abanico { margin: .75rem 0 0; max-width: 30rem; font: 500 clamp(.98rem, 2.5vw, 1.08rem)/1.45 var(--sans); letter-spacing: .005em; text-wrap: balance;
  background: linear-gradient(90deg, #4EE5E5, #A98BFF 45%, #FF3D7F 80%, #FF8A3D); -webkit-background-clip: text; background-clip: text; color: transparent; }
.abanico + .bajada { margin-top: .5rem; }

/* Zoom del mapa */
.zoom { position: absolute; z-index: 6; left: var(--gutter); bottom: calc(20% + .9rem); display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; max-width: calc(100% - 2 * var(--gutter)); pointer-events: none; }
@media (min-width: 960px) { .zoom { bottom: calc(32% + 1rem); } }
.zoom button { pointer-events: auto; min-width: 2.6rem; height: 2.6rem; padding: 0 .9rem; border: 1px solid #3A3466; border-radius: 99px; background: rgba(16, 13, 38, .82); color: var(--papel); font: 500 1.35rem/1 var(--sans); cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .2s, opacity .2s; }
.zoom button:hover:not(:disabled) { border-color: var(--orbe); }
.zoom button:disabled { opacity: .35; cursor: default; }
.zoom .zoom-mundo { font-size: .85rem; font-weight: 600; }
.zoom-pais { flex-basis: 100%; margin: .1rem 0 0 .2rem; font: italic 400 1.05rem/1.2 var(--serif); color: var(--orbe); text-shadow: 0 1px 10px rgba(16, 13, 38, 1); min-height: 1.2em; }
.zoom-pais:empty { display: none; }
.ranking li.con-zoom { cursor: pointer; }
.ranking li.con-zoom:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }

/* El barquito se puede tocar: suelta chispas de colores */
.barquito { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.barquito:focus-visible { outline-offset: 6px; }
#orbe { transform-box: fill-box; transform-origin: center; }
.chispa { position: absolute; left: 50%; top: 34%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c), 0 0 22px var(--c); pointer-events: none; opacity: 0;
  animation: chispa var(--t, 1.2s) cubic-bezier(.16, .84, .44, 1) forwards; }
.chispa--estrella { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 0; clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%); }
@keyframes chispa {
  0% { opacity: 0; transform: translate(0, 0) scale(.2); }
  12% { opacity: 1; }
  70% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(160deg); }
}

/* Últimas luces: cada una con su color */
.ultimas li { --c: var(--papel); }
.ultimas q { display: inline-block; max-width: 100%; color: var(--c); padding: .5rem 1rem .55rem; border-radius: 1.4rem; font-size: 1.12rem;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 11%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 16%, transparent); }
.ultimas small { margin: .45rem 0 0 1rem; }
.ultimas li.propia { --c: var(--orbe); }

/* Abajo: arcoíris de luz y una multitud con pulseras de colores */
.escenario { position: relative; overflow: hidden; isolation: isolate; padding-bottom: clamp(6rem, 14vw, 9rem); }
.escenario .envoltura { position: relative; z-index: 2; }
.aurora { position: absolute; z-index: 0; inset: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; width: 70vmax; height: 38vmax; border-radius: 50%; filter: blur(70px); opacity: .32; mix-blend-mode: screen; animation: deriva-aurora 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { left: -20%; bottom: -12%; background: radial-gradient(closest-side, #4EE5E5, transparent); }
.aurora i:nth-child(2) { left: 22%; bottom: -20%; background: radial-gradient(closest-side, #A98BFF, transparent); animation-duration: 28s; animation-delay: -8s; }
.aurora i:nth-child(3) { right: -25%; bottom: -10%; background: radial-gradient(closest-side, #FF3D7F, transparent); animation-duration: 25s; animation-delay: -14s; opacity: .26; }
@keyframes deriva-aurora { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6%, -6%) scale(1.12); } 100% { transform: translate(-5%, 3%) scale(.95); } }
.escenario .logo { filter: drop-shadow(0 0 18px rgba(16, 13, 38, .9)); }
.promesa, .volver { text-shadow: 0 1px 14px rgba(16, 13, 38, 1); }
.volver { background: rgba(16, 13, 38, .6); }
.multitud { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: clamp(5rem, 12vw, 8rem); pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }
.multitud i { position: absolute; width: calc(5px * var(--s)); height: calc(5px * var(--s)); border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c), 0 0 16px var(--c); animation: pulsera 3s ease-in-out infinite; }
@keyframes pulsera { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .aurora i { animation: none; }
  .multitud i { animation: none; opacity: .7; }
  .chispa { display: none; }
}

/* ---------- Compartir (botón de arriba, de abajo y hoja) ---------- */
.barra-der { display: flex; align-items: center; gap: .45rem; }
.compartir-p { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.15rem; padding: .35rem .8rem; border: 1px solid var(--hilo); border-radius: 99px; background: rgba(16, 13, 38, .6); color: var(--papel); font: 600 .8rem/1 var(--sans); cursor: pointer; }
.compartir-p:hover { border-color: var(--papel); }
.ico { width: 1rem; height: 1rem; flex: none; fill: none !important; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.boton--ancho + .boton--ancho { margin-top: .6rem; }
.escenario-acciones { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.hoja { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(8, 6, 22, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hoja-caja { width: 100%; max-width: 24rem; padding: 1.4rem 1.2rem 1rem; border-radius: 20px; background: var(--noche); box-shadow: inset 0 0 0 1px #3A3466, 0 20px 60px rgba(0, 0, 0, .5); text-align: center; }
.hoja-t { margin: 0; font: italic 400 1.3rem/1.25 var(--serif); color: var(--orbe); }
.hoja-texto { margin: .6rem 0 1.1rem; color: #D9D4EA; font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }
.hoja-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.hoja-opciones .boton:first-child, .hoja-opciones .boton:last-child { grid-column: 1 / -1; }
@media (max-width: 440px) { .compartir-p { padding: .35rem .6rem; } .compartir-p > span { display: none; } }
