/*
 * El diálogo de la sorpresa (views/partials/sorpresa.hbs): la ventana, el acertijo, los adjuntos y los formatos
 * (carta, cupón, compañero de aventura y constelación). Viene de main.css, games.css, game-reward.css y
 * surprise-formats.css de la app vieja, con los mismos valores.
 * Dentro del diálogo se lee sobre papel claro: por eso la regla .regalo-sorpresa cambia los tokens del sitio.
 * Solo tokens de tema.css: ningún color suelto (Forma §8.2).
 */

/* ── El diálogo y su cuerpo ── */
/* Con la sorpresa abierta, la página de atrás no se desplaza (es el único <dialog> del sitio). */
body:has(dialog[open]) {
    overflow: hidden;
}

.regalo-sorpresa {
    color-scheme: light;
    background: var(--cs-sorpresa-papel);
    color: var(--cs-sorpresa-tinta);
    border: 0;
    border-radius: 16px;
    padding: 0;
    width: min(570px, calc(100% - 32px));
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    box-shadow: 0 24px 90px rgb(0 0 0 / 35%);
    animation: sorpresa-desenvolver 350ms cubic-bezier(.16, 1, .3, 1);

    /* Dentro del diálogo, los tokens del sitio toman los valores del papel claro. */
    --cs-principal: var(--cs-sorpresa-principal);
    --cs-tarjeta: var(--cs-sorpresa-tarjeta);
    --cs-titulo: var(--cs-sorpresa-tinta);
    --cs-tenue: var(--cs-sorpresa-tenue);
    --cs-texto: var(--cs-sorpresa-texto);
    --cs-campo: var(--cs-sorpresa-campo);
    --cs-borde: var(--cs-sorpresa-borde);
    --cs-borde-sutil: var(--cs-sorpresa-borde-sutil);
}

.regalo-sorpresa::backdrop {
    background: rgb(3 15 13 / 78%);
    backdrop-filter: blur(5px);
}

.regalo-sorpresa-cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--cs-sorpresa-cerrar);
}

.regalo-sorpresa .regalo-sorpresa-cerrar {
    z-index: 2;
    background: var(--cs-sorpresa-papel);
}

#sorpresa-cuerpo {
    padding: 48px 48px 38px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

@keyframes sorpresa-desenvolver {
    from {
        opacity: .5;
        transform: translateY(12px);
        clip-path: inset(0 0 8% 0 round 16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 round 16px);
    }
}

/* ── Encabezado y textos de la sorpresa ── */
.regalo-sorpresa h2 {
    font-size: 1.9rem;
    margin-bottom: 25px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.regalo-sorpresa p {
    color: var(--cs-sorpresa-texto);
    white-space: pre-line;
    line-height: 1.9;
    overflow-wrap: anywhere;
    font-size: .95rem;
}

.regalo-sorpresa-dia {
    display: block;
    margin-bottom: 13px;
    color: var(--cs-sorpresa-dia);
    font-size: .75rem;
}

.regalo-sorpresa-adorno {
    color: var(--cs-sorpresa-adorno);
    margin-bottom: 18px;
}

.regalo-sorpresa-adorno > .cs-simbolo {
    width: 35px;
    height: 35px;
    stroke-width: 1;
}

.regalo-sorpresa-foto {
    border-radius: 10px;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    margin-bottom: 25px;
}

/* ── Botones y ayudas del sitio dentro del diálogo ── */
.regalo-sorpresa .cs-boton--principal {
    background: var(--cs-sorpresa-boton);
    color: var(--cs-sorpresa-boton-texto);
}

.regalo-sorpresa .cs-boton--principal:hover {
    background: var(--cs-sorpresa-boton-activo);
}

.regalo-sorpresa .cs-boton--borde {
    color: var(--cs-sorpresa-boton);
    border-color: var(--cs-sorpresa-boton-borde);
}

.regalo-sorpresa .cs-boton--borde:hover {
    background: var(--cs-sorpresa-tarjeta);
}

.regalo-sorpresa .cs-ayuda {
    font-size: .8rem;
}

/* ── Cuando la sorpresa es un juego ── */
.regalo-sorpresa--juego #sorpresa-cuerpo {
    padding: 38px 35px 30px;
}

.regalo-sorpresa--juego .regalo-sorpresa-adorno {
    display: none;
}

.regalo-sorpresa--juego h2 {
    font-size: 1.65rem;
    margin-bottom: 20px;
}

.regalo-sorpresa--juego #sorpresa-titulo {
    padding-right: 30px;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ── Con el regalo ya revelado ── */
.con-regalo-revelado .regalo-sorpresa-adorno,
.con-regalo-revelado .regalo-sorpresa-dia,
.con-regalo-revelado #sorpresa-titulo {
    display: none;
}

/* ── Acertijo, invitación, canción y despedida ── */
.regalo-sorpresa-interaccion {
    margin-top: 24px;
}

.regalo-respuestas {
    display: grid;
    gap: 10px;
}

.regalo-respuestas .cs-boton {
    text-align: left;
    justify-content: flex-start;
    min-height: 48px;
}

.regalo-respuestas .cs-boton.correcta {
    background: var(--cs-sorpresa-acierto-fondo);
    border-color: var(--cs-sorpresa-acierto-borde);
    color: var(--cs-sorpresa-acierto-texto);
}

/* Con dos clases, para ganar a «.regalo-sorpresa p». */
.regalo-sorpresa .regalo-respuesta-estado {
    font-size: .875rem;
    margin: 15px 0 0;
    color: var(--cs-sorpresa-respuesta);
}

.regalo-pista {
    border: 0;
    background: none;
    padding: 10px 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--cs-sorpresa-pista);
    font-size: .8rem;
}

.regalo-evento {
    background: var(--cs-sorpresa-tarjeta);
    padding: 12px 16px;
    border-radius: 8px;
}

/* Con dos clases, para ganar a «.regalo-sorpresa p». */
.regalo-sorpresa .regalo-evento {
    font-size: .875rem;
}

.regalo-sorpresa-despedida {
    border-top: 1px solid var(--cs-sorpresa-separador);
    padding-top: 18px;
    text-align: center;
}

/* Con dos clases, para ganar a «.regalo-sorpresa p». */
.regalo-sorpresa .regalo-sorpresa-despedida {
    margin: 28px 0 0;
    color: var(--cs-sorpresa-despedida);
    font-size: .75rem;
}

.regalo-sorpresa-cancion {
    margin-top: 24px;
}

/* ── Constelación sencilla: estrellas en fila ── */
.regalo-constelacion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-block: 30px;
}

.regalo-constelacion .regalo-estrella {
    background: none;
    border: 0;
    color: var(--cs-sorpresa-estrella);
    width: 50px;
    height: 55px;
    transition: color 250ms, transform 250ms;
}

.regalo-estrella .cs-simbolo {
    width: 35px;
    height: 35px;
    fill: transparent;
    transition: fill 250ms;
}

.regalo-estrella.encendida {
    color: var(--cs-sorpresa-estrella-encendida);
    transform: scale(1.12);
}

.regalo-estrella.encendida .cs-simbolo {
    fill: var(--cs-sorpresa-estrella-relleno);
}

.regalo-constelacion .regalo-estrella:nth-child(2n) {
    transform: translateY(-20px);
}

.regalo-constelacion-revelada {
    animation: sorpresa-desenvolver 550ms cubic-bezier(.16, 1, .3, 1);
}

/* ── Adjuntos ── */
.regalo-adjuntos {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--cs-sorpresa-separador);
}

.regalo-adjuntos h3 {
    font-size: 1.1rem;
    margin-bottom: 18px;
}

.regalo-adjunto {
    margin-bottom: 22px;
}

.regalo-adjunto-imagen {
    display: block;
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    height: auto;
}

.regalo-adjunto-video {
    display: block;
    width: 100%;
    max-height: 360px;
    height: auto;
    aspect-ratio: 16 / 9;
    background: var(--cs-sorpresa-video-fondo);
    border-radius: 10px;
}

.regalo-adjunto-leyenda {
    display: block;
    font-size: .8rem;
    color: var(--cs-juego-tenue);
    overflow-wrap: anywhere;
    margin-top: 8px;
}

.regalo-adjunto-enlace {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--cs-juego-lienzo-borde);
    border-radius: 8px;
    color: var(--cs-sorpresa-adjunto-enlace);
    text-decoration: none;
    overflow-wrap: anywhere;
    font-size: .875rem;
}

.regalo-adjunto-enlace:hover {
    background: var(--cs-sorpresa-tarjeta);
}

.regalo-sorpresa .regalo-adjunto-alterno {
    font-size: .8rem;
    color: var(--cs-juego-tenue);
    margin: 8px 0;
}

.regalo-premio-revelado .regalo-adjuntos {
    text-align: left;
    border-color: var(--cs-premio-separador);
    margin-top: 24px;
    padding-top: 20px;
}

.regalo-premio-revelado .regalo-adjuntos h3 {
    font-size: 1rem;
}

/* ── Formatos: lo común ── */
.regalo-formato {
    margin: 25px 0 12px;
    color: var(--cs-formato-tinta);
}

.regalo-sorpresa .regalo-formato-mensaje {
    margin: 0;
    font-size: 1rem;
    line-height: 1.9;
    white-space: pre-line;
    overflow-wrap: anywhere;
    color: var(--cs-formato-tinta);
}

.regalo-formato button {
    font: inherit;
    touch-action: manipulation;
}

.regalo-formato button:focus-visible {
    outline: 3px solid var(--cs-formato-acento);
    outline-offset: 4px;
}

.regalo-formato button:active {
    transform: translateY(1px);
}

/* ── Formato carta ── */
.regalo-formato-carta {
    position: relative;
    isolation: isolate;
    padding: 0 28px 34px;
    min-height: 210px;
    background: var(--cs-formato-papel);
    border-radius: 3px 3px 12px 12px;
    box-shadow: 0 9px 25px rgb(65 44 17 / 12%);
}

.regalo-formato-carta::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    content: '';
    background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgb(152 124 76 / 5%) 3px, rgb(152 124 76 / 5%) 4px);
    pointer-events: none;
}

.regalo-formato-carta::after {
    position: absolute;
    bottom: 9px;
    left: 17px;
    right: 17px;
    height: 1px;
    background: var(--cs-formato-carta-linea);
    content: '';
    box-shadow: 0 4px 0 var(--cs-formato-carta-linea-suave);
}

.regalo-formato-carta-pliegue {
    position: relative;
    height: 76px;
    margin: 0 -28px 23px;
    overflow: hidden;
    border-radius: 3px 3px 0 0;
    background: var(--cs-formato-carta-pliegue);
    clip-path: polygon(0 0, 100% 0, 100% 53%, 50% 100%, 0 53%);
}

.regalo-formato-carta-pliegue::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(155deg, transparent 49.7%, var(--cs-formato-carta-doblez) 50%, transparent 50.5%),
        linear-gradient(205deg, transparent 49.7%, var(--cs-formato-carta-doblez) 50%, transparent 50.5%);
    content: '';
}

.regalo-formato-carta-sello {
    position: absolute;
    left: 50%;
    top: 24px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cs-formato-sello);
    color: var(--cs-formato-sello-texto);
    transform: translateX(-50%);
}

.regalo-formato-carta-sello .cs-simbolo {
    width: 20px;
    height: 20px;
}

/* ── Formato cupón ── */
.regalo-formato-cupon {
    display: grid;
    grid-template-columns: 113px minmax(0, 1fr);
    min-height: 210px;
    border-radius: 12px;
    background: var(--cs-formato-cupon-fondo);
    overflow: hidden;
    color: var(--cs-formato-cupon-tinta);
}

.regalo-formato-cupon-talon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 27px 15px;
    border-right: 2px dashed var(--cs-formato-cupon-corte);
    text-align: center;
    background: var(--cs-formato-cupon-talon);
}

.regalo-formato-cupon-talon::before,
.regalo-formato-cupon-talon::after {
    position: absolute;
    right: -11px;
    width: 20px;
    height: 20px;
    z-index: 1;
    border-radius: 50%;
    background: var(--cs-sorpresa-papel);
    content: '';
}

.regalo-formato-cupon-talon::before {
    top: -10px;
}

.regalo-formato-cupon-talon::after {
    bottom: -10px;
}

.regalo-formato-cupon-simbolo .cs-simbolo {
    width: 37px;
    height: 37px;
    color: var(--cs-formato-cupon-simbolo);
}

.regalo-formato-cupon-nombre {
    font-family: var(--cs-letra-titulos);
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.5;
}

.regalo-formato-cupon-principal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 19px;
    padding: 28px 26px;
}

.regalo-sorpresa .regalo-formato-cupon-mensaje {
    font-family: var(--cs-letra-titulos);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.7;
    color: var(--cs-formato-cupon-mensaje);
}

.regalo-sorpresa .regalo-formato-cupon-fecha {
    margin: 0;
    font-size: .8rem;
    line-height: 1.6;
    color: var(--cs-formato-cupon-dato);
    white-space: normal;
}

.regalo-sorpresa .regalo-formato-cupon-confirmado {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: .75rem;
    line-height: 1.6;
    white-space: normal;
    color: var(--cs-formato-cupon-dato);
}

.regalo-formato-cupon-confirmado .cs-simbolo {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

/* ── Formato compañero de aventura ── */
.regalo-formato-aventura {
    padding: 26px 24px 20px;
    border-radius: 14px;
    background: var(--cs-formato-aventura-fondo);
}

.regalo-sorpresa .regalo-formato-aventura-mensaje {
    margin-bottom: 25px;
}

.regalo-formato-companeros {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.regalo-formato-companero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 175px;
    padding: 18px 10px 14px;
    border: 1px solid var(--cs-formato-companero-borde);
    border-radius: 12px;
    background: var(--cs-formato-papel);
    color: var(--cs-formato-tinta);
    cursor: pointer;
    transition: background-color 150ms, border-color 150ms, transform 150ms;
}

.regalo-formato-companero:hover {
    border-color: var(--cs-formato-acento);
    background: var(--cs-formato-companero-activo);
}

.regalo-formato-companero[aria-pressed="true"] {
    border-color: var(--cs-formato-acento);
    background: var(--cs-formato-companero-elegido);
    outline: 1px solid var(--cs-formato-acento);
    outline-offset: -3px;
}

.regalo-formato-companero-emblema {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cs-formato-emblema-1-fondo);
    color: var(--cs-formato-emblema-1-tinta);
}

.regalo-formato-companero--2 .regalo-formato-companero-emblema {
    background: var(--cs-formato-emblema-2-fondo);
    color: var(--cs-formato-emblema-2-tinta);
}

.regalo-formato-companero--3 .regalo-formato-companero-emblema {
    background: var(--cs-formato-emblema-3-fondo);
    color: var(--cs-formato-emblema-3-tinta);
}

.regalo-formato-companero-emblema .cs-simbolo {
    width: 27px;
    height: 27px;
}

.regalo-formato-companero-nombre {
    font-family: var(--cs-letra-titulos);
    font-size: .95rem;
    font-weight: 500;
    overflow-wrap: anywhere;
    text-align: center;
}

.regalo-formato-companero-ruta {
    margin-top: auto;
    font-size: .6875rem;
    line-height: 1.5;
    color: var(--cs-formato-tenue);
    text-align: center;
}

.regalo-formato-aventura-sendero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 20px 0 0;
}

.regalo-formato-aventura-sendero span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--cs-formato-sendero);
}

.regalo-formato-aventura-sendero span:nth-child(2n) {
    transform: translateY(3px);
}

.regalo-formato-aventura-nota {
    margin-top: 20px;
    padding: 22px;
    border-radius: 12px;
    background: var(--cs-formato-papel);
    border: 1px solid var(--cs-formato-aventura-nota-borde);
    line-height: 1.6;
}

.regalo-formato-aventura-nota strong {
    font-family: var(--cs-letra-titulos);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--cs-formato-acento);
}

.regalo-sorpresa .regalo-formato-aventura-nota p {
    margin: 11px 0 0;
    font-size: .875rem;
    line-height: 1.8;
    white-space: normal;
    color: var(--cs-formato-tenue);
}

/* ── Formato constelación ── */
.regalo-formato-cielo {
    overflow: hidden;
    padding: 25px 20px 22px;
    border-radius: 14px;
    background: var(--cs-formato-cielo-fondo);
    color: var(--cs-formato-cielo-tinta);
}

.regalo-sorpresa .regalo-formato-cielo-ayuda {
    margin: 0;
    font-size: .9rem;
    line-height: 1.7;
    white-space: normal;
    color: var(--cs-formato-cielo-ayuda);
    text-align: center;
}

.regalo-formato-mapa {
    position: relative;
    height: 320px;
    margin: 8px 0 0;
    isolation: isolate;
}

.regalo-formato-conexiones {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.regalo-formato-conexiones line {
    stroke: var(--cs-formato-conexion);
    stroke-width: 1;
    stroke-dasharray: 3 5;
    vector-effect: non-scaling-stroke;
    transition: stroke 200ms;
}

.regalo-formato-conexiones .encendida {
    stroke: var(--cs-formato-conexion-encendida);
    stroke-dasharray: none;
}

.regalo-formato-estrella {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 7px;
    border: 0;
    border-radius: 50%;
    background: var(--cs-formato-cielo-fondo);
    color: var(--cs-formato-estrella);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: color 150ms, background-color 150ms;
}

.regalo-formato-estrella .cs-simbolo {
    width: 28px;
    height: 28px;
    stroke-width: 1.4;
}

.regalo-formato-estrella:hover {
    background: var(--cs-formato-estrella-activa-fondo);
    color: var(--cs-formato-estrella-activa);
}

.regalo-formato-estrella[aria-pressed="true"] {
    color: var(--cs-formato-estrella-encendida);
}

.regalo-formato-estrella[aria-pressed="true"] .cs-simbolo {
    fill: var(--cs-formato-estrella-relleno);
    stroke: var(--cs-formato-estrella-trazo);
}

/* Con dos clases, para ganar a «.regalo-formato button:active». */
.regalo-formato .regalo-formato-estrella:active {
    transform: translate(-50%, -50%) scale(.95);
}

.regalo-formato .regalo-formato-estrella:focus-visible {
    outline-color: var(--cs-formato-cielo-foco);
    outline-offset: 2px;
}

.regalo-formato-estrella--1 {
    left: 12%;
    top: 25%;
}

.regalo-formato-estrella--2 {
    left: 30%;
    top: 14%;
}

.regalo-formato-estrella--3 {
    left: 49%;
    top: 23%;
}

.regalo-formato-estrella--4 {
    left: 70%;
    top: 11%;
}

.regalo-formato-estrella--5 {
    left: 86%;
    top: 30%;
}

.regalo-formato-estrella--6 {
    left: 73%;
    top: 47%;
}

.regalo-formato-estrella--7 {
    left: 90%;
    top: 65%;
}

.regalo-formato-estrella--8 {
    left: 64%;
    top: 77%;
}

.regalo-formato-estrella--9 {
    left: 46%;
    top: 60%;
}

.regalo-formato-estrella--10 {
    left: 25%;
    top: 80%;
}

.regalo-formato-estrella--11 {
    left: 10%;
    top: 58%;
}

.regalo-formato-estrella--12 {
    left: 30%;
    top: 42%;
}

.regalo-sorpresa .regalo-formato-cielo-cuenta {
    margin: 0;
    font-size: .75rem;
    line-height: 1.6;
    text-align: center;
    white-space: normal;
    color: var(--cs-formato-cielo-cuenta);
    font-variant-numeric: tabular-nums;
}

.regalo-formato-leer {
    display: block;
    min-height: 44px;
    margin: 10px auto 0;
    padding: 10px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--cs-formato-leer);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

/* Con dos clases, para ganar a «.regalo-formato button». */
.regalo-formato .regalo-formato-leer {
    font-size: .8125rem;
}

.regalo-formato-leer:hover {
    color: var(--cs-formato-leer-activo);
}

.regalo-formato .regalo-formato-leer:focus-visible {
    outline-color: var(--cs-formato-cielo-foco);
}

.regalo-formato-estrella-mensaje {
    position: relative;
    margin-top: 22px;
    padding: 25px 24px;
    border-radius: 12px;
    background: var(--cs-formato-estrella-mensaje-fondo);
}

.regalo-sorpresa .regalo-formato-estrella-mensaje .regalo-formato-mensaje {
    font-family: var(--cs-letra-titulos);
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--cs-formato-estrella-mensaje-tinta);
}

.regalo-formato-brisa {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.regalo-formato-brisa-estrella {
    position: absolute;
    display: none;
    color: var(--cs-formato-brisa);
}

.regalo-formato-brisa-estrella .cs-simbolo {
    width: 15px;
    height: 15px;
    stroke-width: 1;
    fill: var(--cs-formato-brisa);
}

.regalo-formato-brisa-estrella:nth-child(3n) .cs-simbolo {
    width: 9px;
    height: 9px;
}

.regalo-formato-brisa-estrella--1,
.regalo-formato-brisa-estrella--7,
.regalo-formato-brisa-estrella--13 {
    left: 8%;
    top: 40%;
}

.regalo-formato-brisa-estrella--2,
.regalo-formato-brisa-estrella--8,
.regalo-formato-brisa-estrella--14 {
    left: 25%;
    top: 54%;
}

.regalo-formato-brisa-estrella--3,
.regalo-formato-brisa-estrella--9,
.regalo-formato-brisa-estrella--15 {
    left: 42%;
    top: 31%;
}

.regalo-formato-brisa-estrella--4,
.regalo-formato-brisa-estrella--10,
.regalo-formato-brisa-estrella--16 {
    left: 57%;
    top: 64%;
}

.regalo-formato-brisa-estrella--5,
.regalo-formato-brisa-estrella--11,
.regalo-formato-brisa-estrella--17 {
    left: 71%;
    top: 41%;
}

.regalo-formato-brisa-estrella--6,
.regalo-formato-brisa-estrella--12,
.regalo-formato-brisa-estrella--18 {
    left: 85%;
    top: 68%;
}

.revelando .regalo-formato-brisa-estrella {
    display: block;
    animation: formato-brisa 900ms cubic-bezier(.23, 1, .32, 1) both;
}

.revelando .regalo-formato-brisa-estrella:nth-child(2n) {
    animation-name: formato-brisa-suave;
    animation-duration: 1050ms;
}

.revelando .regalo-formato-brisa-estrella:nth-child(3n) {
    animation-delay: 50ms;
}

@keyframes formato-brisa {
    0% {
        opacity: 1;
        transform: translate(-10px, 10px) rotate(-10deg);
    }

    75% {
        opacity: .8;
    }

    100% {
        opacity: 0;
        transform: translate(72px, -90px) rotate(85deg);
    }
}

@keyframes formato-brisa-suave {
    0% {
        opacity: 1;
        transform: translate(0, 10px) rotate(8deg);
    }

    75% {
        opacity: .8;
    }

    100% {
        opacity: 0;
        transform: translate(38px, -125px) rotate(-65deg);
    }
}

/* ── Pantallas de hasta 700 px ── */
@media (max-width: 700px) {
    .regalo-sorpresa {
        max-height: calc(100dvh - 32px);
    }

    #sorpresa-cuerpo {
        padding: 42px 25px 28px;
        max-height: calc(100dvh - 32px);
    }

    .regalo-sorpresa h2 {
        font-size: 1.7rem;
    }

    .regalo-sorpresa p {
        font-size: .875rem;
    }

    .regalo-sorpresa--juego #sorpresa-cuerpo {
        padding: 40px 20px 25px;
    }

    .regalo-sorpresa--juego h2 {
        font-size: 1.4rem;
        margin-bottom: 18px;
    }

    .regalo-constelacion {
        gap: 0;
    }

    .regalo-constelacion .regalo-estrella {
        width: 42px;
    }

    .regalo-formato {
        margin-top: 21px;
    }

    .regalo-formato-carta {
        padding: 0 20px 30px;
    }

    .regalo-formato-carta-pliegue {
        height: 64px;
        margin: 0 -20px 21px;
    }

    .regalo-formato-carta-sello {
        top: 19px;
        width: 34px;
        height: 34px;
    }

    .regalo-formato-cupon {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .regalo-formato-cupon-talon {
        padding: 22px 10px;
        gap: 12px;
    }

    .regalo-formato-cupon-nombre {
        font-size: .75rem;
    }

    .regalo-formato-cupon-simbolo .cs-simbolo {
        width: 30px;
        height: 30px;
    }

    .regalo-formato-cupon-principal {
        gap: 17px;
        padding: 23px 17px;
    }

    .regalo-sorpresa .regalo-formato-cupon-mensaje {
        font-size: 1rem;
    }

    .regalo-formato-aventura {
        padding: 22px 15px 17px;
    }

    .regalo-formato-companeros {
        gap: 7px;
    }

    .regalo-formato-companero {
        min-height: 156px;
        padding: 15px 6px 11px;
        gap: 10px;
    }

    .regalo-formato-companero-emblema {
        width: 41px;
        height: 41px;
    }

    .regalo-formato-companero-emblema .cs-simbolo {
        width: 24px;
        height: 24px;
    }

    .regalo-formato-companero-nombre {
        font-size: .8125rem;
    }

    .regalo-formato-companero-ruta {
        font-size: .625rem;
    }

    .regalo-formato-aventura-nota {
        padding: 19px 16px;
    }

    .regalo-formato-cielo {
        padding: 22px 12px 19px;
    }

    .regalo-formato-mapa {
        height: 300px;
    }

    .regalo-formato-estrella-mensaje {
        padding: 22px 18px;
    }

    .regalo-sorpresa .regalo-formato-estrella-mensaje .regalo-formato-mensaje {
        font-size: 1rem;
    }
}

/* ── Para el dedo: por debajo de 992 px, los botones miden al menos 44 px (Forma Robin §8.5) ── */
@media (max-width: 991.98px) {
    .regalo-pista {
        min-height: 44px;
    }
}

/* ── Con «reducir movimiento» ── */
@media (prefers-reduced-motion: reduce) {
    .regalo-formato button,
    .regalo-formato-conexiones line {
        transition: none;
    }

    /* Con tres clases y al final de la hoja, para ganar a las reglas de «.revelando». */
    .regalo-formato .revelando .regalo-formato-brisa-estrella {
        display: none;
        animation: none;
    }
}
