/* =========================================================================
 * cumple.css — Modo cumpleaños de "Shala".
 *
 * Se activa solo el día del cumpleaños (o con ?cumple=preview). Ofrece una
 * intro festiva: confeti/globos, pastel con velas que se soplan, "vueltas al
 * sol", caja de regalo (carta + reel de recuerdos) y muro de felicitaciones.
 * En los días previos muestra una cuenta regresiva en el inicio.
 *
 * FORMATO: una regla por bloque; convive con app.css (prefijo cumple-/cos-).
 * Paleta festiva sobre el tema espacial: dorado #ffdf73 + rosa #ff4d6d.
 * ========================================================================= */

/* --- Overlay principal --- */
#cumple-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;                 /* por encima de todo, incluso coming-soon */
    overflow: hidden;
    /* Noche rosita (color favorito de Shala) con brillo cálido abajo. */
    background:
        radial-gradient(90% 70% at 80% 92%, rgba(255, 143, 199, 0.18), transparent 60%),
        radial-gradient(120% 90% at 50% 0%, #4a1440 0%, #2e0f2e 44%, #14071a 86%);
    -webkit-tap-highlight-color: transparent;
}
#cumple-overlay.abierto { display: block; }

/* Cursor de PASTEL solo dentro de la sorpresa (fiesta + cuenta regresiva).
 * Fuera de ahí (universo, feed, panel de fotos, inicio) queda el cursor normal. */
#cumple-overlay, #cumple-overlay *,
#cumple-reloj, #cumple-reloj * {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34'><text y='27' font-size='26'>🎂</text></svg>") 6 6, auto !important;
}

/* Gran final: destello y sacudida al terminar la cuenta regresiva. */
#cumple-overlay.finale::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.9), rgba(255, 143, 199, 0.3) 45%, transparent 70%);
    animation: cumpleFlash 1s ease-out forwards;
}
@keyframes cumpleFlash {
    0%   { opacity: 0.95; }
    100% { opacity: 0; }
}
#cumple-overlay.finale .cumple-card {
    animation: cumpleShake 0.6s ease-in-out;
}
@keyframes cumpleShake {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    20%      { transform: translateY(-50%) translateX(-7px) rotate(-1.5deg); }
    40%      { transform: translateY(-50%) translateX(7px) rotate(1.5deg); }
    60%      { transform: translateY(-50%) translateX(-5px) rotate(-1deg); }
    80%      { transform: translateY(-50%) translateX(5px) rotate(1deg); }
}

/* Capas de efectos (confeti y fuegos) por encima del fondo, bajo la tarjeta. */
#cumple-confeti, #cumple-fuegos {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.cumple-confeti-pieza {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.9;
    animation: cumpleCaer linear forwards;
}
@keyframes cumpleCaer {
    0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(720deg); opacity: 0.9; }
}

.cumple-globo {
    position: absolute;
    bottom: -120px;
    width: 42px;
    height: 54px;
    border-radius: 50% 50% 48% 48%;
    opacity: 0.85;
    animation: cumpleSubir linear forwards;
}
.cumple-globo::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.4);
}
@keyframes cumpleSubir {
    0%   { transform: translateY(0) translateX(0); opacity: 0.9; }
    100% { transform: translateY(-118vh) translateX(30px); opacity: 0.7; }
}

.cumple-chispa {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: cumpleChispa 1s ease-out forwards;
}
@keyframes cumpleChispa {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* Flores / moños / corazones que caen meciéndose. */
.cumple-emoji-cae {
    position: absolute;
    top: -40px;
    pointer-events: none;
    will-change: transform;
    animation: cumpleEmojiCae linear forwards;
}
@keyframes cumpleEmojiCae {
    0%   { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    50%  { transform: translateY(52vh) translateX(24px) rotate(calc(var(--rot) / 2)); }
    100% { transform: translateY(110vh) translateX(-24px) rotate(var(--rot)); opacity: 0.85; }
}

/* Corazones / flores que suben desde abajo. */
.cumple-corazon-sube {
    position: absolute;
    bottom: -40px;
    pointer-events: none;
    will-change: transform;
    animation: cumpleCorazonSube linear forwards;
}
@keyframes cumpleCorazonSube {
    0%   { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
    15%  { opacity: 1; }
    100% { transform: translateY(-118vh) translateX(var(--drift)) scale(1.1); opacity: 0; }
}

/* Brillos que titilan. */
.cumple-brillo {
    position: absolute;
    pointer-events: none;
    animation: cumpleTitilar 1.8s ease-in-out infinite;
}
@keyframes cumpleTitilar {
    0%, 100% { opacity: 0.15; transform: scale(0.6); }
    50%      { opacity: 1; transform: scale(1.15); }
}

/* Guirnalda de moños y flores en lo alto de la tarjeta. */
.cumple-guirnalda {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 22px;
    margin-bottom: 6px;
}
.cumple-guirnalda span {
    display: inline-block;
    animation: cumpleColgar 2.4s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
@keyframes cumpleColgar {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50%      { transform: translateY(-5px) rotate(6deg); }
}

/* --- Tarjeta central --- */
.cumple-card {
    position: relative;
    z-index: 4;
    max-width: 440px;
    width: 92%;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    max-height: 92vh;
    overflow-y: auto;
    text-align: center;
    padding: 26px 22px 30px;
    color: #fff;
    animation: cumpleEntra 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes cumpleEntra {
    from { opacity: 0; transform: translateY(-46%) scale(0.9); }
    to   { opacity: 1; transform: translateY(-50%) scale(1); }
}
.cumple-card::-webkit-scrollbar { width: 6px; }
.cumple-card::-webkit-scrollbar-thumb { background: rgba(255, 223, 115, 0.5); border-radius: 10px; }

.cumple-x {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
}

.cumple-kicker {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ffcf8f;
}
.cumple-titulo {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1.1;
    margin: 6px 0 4px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 77, 109, 0.7);
}
.cumple-titulo span {
    background: linear-gradient(90deg, #ff4d6d, #ffb3d9, #ffdf73, #ff8fc7, #ff4d6d);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: cumpleBrilloTexto 4s linear infinite;
}
@keyframes cumpleBrilloTexto {
    to { background-position: 300% 0; }
}
.cumple-vueltas {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #ffe6a8;
    margin-bottom: 14px;
}

/* --- Pastel con velas --- */
.cumple-pastel {
    position: relative;
    width: 190px;
    height: 150px;
    margin: 6px auto 4px;
    cursor: pointer;
}
.cumple-vela {
    position: absolute;
    bottom: 96px;
    width: 8px;
    height: 30px;
    border-radius: 3px;
    background: repeating-linear-gradient(45deg, #ff6b9d 0 6px, #fff 6px 12px);
    z-index: 3;
}
.cumple-llama {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 18px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 50% 70%, #fff 0%, #ffd83d 40%, #ff8a00 80%);
    box-shadow: 0 0 12px 4px rgba(255, 170, 0, 0.7);
    transform-origin: bottom center;
    animation: cumpleFlama 0.4s ease-in-out infinite alternate;
}
@keyframes cumpleFlama {
    from { transform: translateX(-50%) scale(1) rotate(-4deg); }
    to   { transform: translateX(-50%) scale(1.12) rotate(4deg); }
}
.cumple-pastel.apagado .cumple-llama { opacity: 0; transform: translateX(-50%) scale(0); transition: 0.3s; }
.cumple-humo {
    position: absolute;
    top: -18px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(220, 220, 230, 0.6);
    opacity: 0;
}
.cumple-pastel.apagado .cumple-humo { animation: cumpleHumo 1s ease-out forwards; }
@keyframes cumpleHumo {
    0%   { opacity: 0.7; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -34px) scale(2.4); }
}

.cumple-piso {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px;
}
.cumple-piso.p1 { bottom: 60px; width: 120px; height: 40px; background: linear-gradient(#ffe6f0, #ffb3d1); box-shadow: inset 0 -6px 0 rgba(0,0,0,0.06); z-index: 2; }
.cumple-piso.p2 { bottom: 24px; width: 160px; height: 44px; background: linear-gradient(#fff0d6, #ffd27f); box-shadow: inset 0 -6px 0 rgba(0,0,0,0.06); z-index: 1; }
.cumple-piso.p3 { bottom: 0; width: 190px; height: 40px; background: linear-gradient(#e9d3ff, #c49bff); box-shadow: inset 0 -6px 0 rgba(0,0,0,0.06); }
/* Betún ondulado en cada piso. */
.cumple-piso.p1::before, .cumple-piso.p2::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 14px;
    background: radial-gradient(circle at 10px 0, transparent 8px, #fff 9px) repeat-x;
    background-size: 20px 14px;
}

.cumple-lazo {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 26px;
    z-index: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.cumple-hint {
    font-size: 12px;
    color: #cbb9e6;
    margin-top: 2px;
}
.cumple-deseo {
    min-height: 22px;
    font-family: 'Pacifico', cursive;
    font-size: 18px;
    color: #ffdf73;
    text-shadow: 0 0 14px rgba(255, 223, 115, 0.6);
    margin: 8px 0 2px;
    opacity: 0;
    transition: opacity 0.5s;
}
.cumple-deseo.visible { opacity: 1; }

/* --- Botones --- */
.cumple-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 16px 0 10px;
}
.cumple-btn {
    padding: 10px 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.cumple-btn:hover { transform: translateY(-2px); background: rgba(255, 223, 115, 0.18); border-color: #ffdf73; }
.cumple-entrar {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 13px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, #ff4d6d, #c9184a);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 77, 109, 0.45);
}

/* --- Paneles (regalo / muro) --- */
.cumple-panel {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 110%);
    width: 100%;
    max-width: 460px;
    z-index: 6;
    max-height: 88vh;
    overflow-y: auto;
    background: rgba(18, 12, 30, 0.9);
    border: 1px solid rgba(255, 223, 115, 0.28);
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    padding: 16px 16px 28px;
    backdrop-filter: blur(16px);
    box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.cumple-panel.abierto { transform: translate(-50%, 0); }
.cumple-panel::-webkit-scrollbar { width: 6px; }
.cumple-panel::-webkit-scrollbar-thumb { background: rgba(255, 223, 115, 0.5); border-radius: 10px; }
.cumple-panel h3 {
    font-family: 'Pacifico', cursive;
    color: #ffdf73;
    font-size: 1.5rem;
    text-align: center;
    margin: 4px 0 12px;
}
.cumple-panel-x {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* Carta dedicada. */
.cumple-carta {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #ffe9ef;
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}
.cumple-firma { text-align: right; font-family: 'Pacifico', cursive; color: #ff9ab0; margin-top: 8px; }

/* Reel de recuerdos. */
.cumple-reel {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: 14px;
    overflow: hidden;
    background: #120a1e;
}
.cumple-reel img, .cumple-reel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s;
}
.cumple-reel .activa { opacity: 1; }
.cumple-reel-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #fff;
    text-align: left;
}

/* Muro de felicitaciones. */
.cumple-muro-lista { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cumple-msg {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #fff;
    line-height: 1.5;
}
.cumple-msg .cumple-msg-autor { color: #ffdf73; font-weight: 600; margin-right: 6px; }
.cumple-muro-nombre {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 143, 199, 0.4);
    background: rgba(255, 143, 199, 0.08);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}
.cumple-muro-form { display: flex; gap: 8px; }
.cumple-muro-form input {
    flex: 1;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
}
.cumple-muro-form button {
    padding: 11px 16px;
    border-radius: 12px;
    border: none;
    background: #ff4d6d;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.cumple-muro-vacio { color: #b0a2c8; font-size: 13px; text-align: center; padding: 10px; }

/* Gestor de fotos del regalo "Para ti" (subir/borrar, solo dueños). */
.regalo-gestor { margin-top: 14px; text-align: center; }
.regalo-btn {
    padding: 11px 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 143, 199, 0.5);
    background: rgba(255, 143, 199, 0.14);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.regalo-btn:hover { background: rgba(255, 143, 199, 0.28); }
.regalo-msg { font-size: 12px; color: #ffdf73; min-height: 16px; margin-top: 8px; }
.regalo-tira {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}
.regalo-mini {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #0c0c14;
}
.regalo-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.regalo-mini-x {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Música de fondo: el iframe se reproduce pero queda OCULTO (fuera de pantalla),
 * así solo se escucha el audio sin ver el video. Se mantiene un tamaño real
 * (no display:none) para que YouTube no pause la reproducción. */
#cumple-musica {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 320px;
    height: 180px;
    opacity: 0;
    pointer-events: none;
}
#cumple-musica iframe { width: 320px; height: 180px; border: 0; }

/* --- FAB para reabrir el modo cumpleaños --- */
.cumple-fab {
    position: fixed;
    top: 12px;
    right: 108px;                   /* a la izquierda de la campana (right:60) */
    z-index: 260;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ffdf73, #ff4d6d);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 77, 109, 0.5);
    display: none;
    animation: cumpleLatirFab 1.8s infinite alternate;
}
.cumple-fab.visible { display: block; }
@keyframes cumpleLatirFab {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}

/* --- Cuenta regresiva en el inicio (días previos) --- */
#cumple-cuenta {
    display: none;
    margin-top: 12px;
    padding: 8px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 223, 115, 0.2), rgba(255, 77, 109, 0.2));
    border: 1px solid rgba(255, 223, 115, 0.4);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    pointer-events: auto;
}
#cumple-cuenta.visible { display: inline-block; }
#cumple-cuenta b { color: #ffdf73; }

/* --- Gorrito de fiesta sobre el sol (el día del cumpleaños) --- */
#gorrito-sol {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 11;                    /* sobre el sol (z-10) */
    transform: translate(-50%, -140px);
    font-size: 46px;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    animation: gorritoFlota 3s ease-in-out infinite;
}
body.es-cumple #gorrito-sol { display: block; }
@keyframes gorritoFlota {
    0%, 100% { transform: translate(-50%, -140px) rotate(-6deg); }
    50%      { transform: translate(-50%, -148px) rotate(6deg); }
}

/* --- Galería de dedicatorias (manera especial de mostrar las felicitaciones) --- */
#cumple-dedicatorias {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10002;                 /* encima de la fiesta */
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    padding: 22px 16px 24px;
    background:
        radial-gradient(90% 60% at 80% 90%, rgba(255, 143, 199, 0.18), transparent 60%),
        radial-gradient(95% 70% at 50% 12%, #6a1a55 0%, #33113a 46%, #16081b 88%);
}
#cumple-dedicatorias.abierto { display: flex; }

.ded-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.ded-flor {
    position: absolute;
    bottom: -40px;
    pointer-events: none;
    animation: relojFlorSube linear infinite;
}

.ded-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.ded-header {
    position: relative;
    z-index: 2;
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    color: #ffdf73;
    text-shadow: 0 0 18px rgba(255, 77, 109, 0.5);
    text-align: center;
    margin: 6px 0 2px;
}
.ded-sub {
    position: relative;
    z-index: 2;
    color: #ffcfe6;
    font-size: 13px;
    margin-bottom: 14px;
}
.ded-escenario {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 470px;
    min-height: 300px;
}
.ded-nav {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 143, 199, 0.4);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.ded-nav:hover { background: rgba(255, 143, 199, 0.22); }
.ded-carta-cont {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.ded-carta {
    width: 100%;
    max-width: 320px;
    min-height: 180px;
    max-height: 100%;
    overflow-y: auto;               /* si el mensaje es muy largo, se desliza dentro */
    border-radius: 26px;
    padding: 26px 22px 22px;
    text-align: center;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 143, 199, 0.3);
    position: relative;
    animation: dedEntra 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes dedEntra {
    from { opacity: 0; transform: translateY(24px) scale(0.94) rotate(-1.5deg); }
    to   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
.ded-carta::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 20px;
    border: 1.5px dashed rgba(0, 0, 0, 0.12);
    pointer-events: none;
}
.ded-adorno { font-size: 34px; margin-bottom: 8px; }
.ded-texto {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    width: 100%;
    margin: 6px 0 8px;
    word-break: break-word;
    white-space: pre-wrap;          /* respeta saltos de línea y muestra TODO */
}
.ded-firma {
    font-family: 'Pacifico', cursive;
    font-size: 20px;
    margin-top: 14px;
    text-align: right;
}
.ded-dots {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 7px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 90%;
    margin: 14px 0 6px;
}
.ded-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
.ded-dot.activo { background: #ffdf73; transform: scale(1.35); }
.ded-contador { position: relative; z-index: 2; color: #ffb3d9; font-size: 12px; margin-bottom: 12px; }
.ded-escribir {
    position: relative;
    z-index: 2;
    padding: 11px 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 143, 199, 0.5);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.ded-escribir:hover { background: rgba(255, 143, 199, 0.2); }
.ded-vacio {
    position: relative;
    z-index: 2;
    color: #ffcfe6;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
    padding: 30px;
}

/* --- Pantalla de cuenta regresiva (a la hora de la fiesta) --- */
#cumple-reloj {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;                  /* debajo de la fiesta (10000), sobre el resto */
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #fff;
    background:
        radial-gradient(90% 70% at 50% 18%, rgba(255, 143, 199, 0.16), transparent 60%),
        radial-gradient(120% 90% at 50% 0%, #5a1550 0%, #2e0f2e 46%, #14071a 88%);
}
#cumple-reloj.abierto { display: flex; }

/* Estela de fuegos artificiales que sigue al cursor en la cuenta regresiva. */
.reloj-chispa-cursor {
    position: fixed;
    z-index: 6;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    pointer-events: none;
    background: currentColor;
    box-shadow: 0 0 8px 2px currentColor;
    animation: relojChispaCursor 0.65s ease-out forwards;
}
@keyframes relojChispaCursor {
    0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2); opacity: 0; }
}

#cumple-reloj-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.reloj-flor {
    position: absolute;
    bottom: -40px;
    pointer-events: none;
    animation: relojFlorSube linear infinite;
}
@keyframes relojFlorSube {
    0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    12%  { opacity: 0.9; }
    100% { transform: translateY(-116vh) translateX(var(--drift)) rotate(360deg); opacity: 0; }
}

.reloj-guirnalda {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 10px;
    font-size: 26px;
    margin-bottom: 10px;
}
.reloj-guirnalda span {
    display: inline-block;
    animation: cumpleColgar 2.4s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.reloj-kicker {
    position: relative;
    z-index: 2;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ffb3d9;
}
.reloj-titulo {
    position: relative;
    z-index: 2;
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    margin: 6px 0 4px;
    text-shadow: 0 0 20px rgba(255, 77, 109, 0.6);
}
.reloj-sub {
    position: relative;
    z-index: 2;
    font-size: 15px;
    color: #ffe0ef;
    margin-bottom: 22px;
    max-width: 340px;
}
.reloj-sub b { color: #ffdf73; }
.reloj-antes {
    position: relative;
    z-index: 2;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #ffe0ef;
    letter-spacing: 1px;
    margin: 4px 0 14px;
}
.reloj-frase {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    min-height: 26px;
    font-family: 'Pacifico', cursive;
    font-size: 18px;
    line-height: 1.4;
    color: #ffdf73;
    text-shadow: 0 0 14px rgba(255, 223, 115, 0.5);
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.reloj-frase.visible { opacity: 1; }
.reloj-digitos {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
}
.reloj-caja {
    min-width: 74px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 143, 199, 0.4);
    border-radius: 16px;
    padding: 14px 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: relojCajaGlow 2.8s ease-in-out infinite;
}
@keyframes relojCajaGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 143, 199, 0); border-color: rgba(255, 143, 199, 0.4); }
    50%      { box-shadow: 0 0 22px rgba(255, 143, 199, 0.35); border-color: rgba(255, 143, 199, 0.7); }
}
.reloj-num {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.3rem, 6vw, 1.9rem);
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 143, 199, 0.8);
}
.reloj-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffb3d9;
    margin-top: 10px;
}
.reloj-pastel {
    position: relative;
    z-index: 2;
    font-size: 44px;
    margin-top: 22px;
    animation: relojBob 2.5s ease-in-out infinite;
}
@keyframes relojBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.reloj-probar {
    position: relative;
    z-index: 2;
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px dashed rgba(255, 143, 199, 0.5);
    background: rgba(255, 255, 255, 0.06);
    color: #ffd8ec;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    cursor: pointer;
}
.reloj-probar:hover { background: rgba(255, 143, 199, 0.18); }

.reloj-entrar {
    position: relative;
    z-index: 2;
    margin-top: 14px;
    background: none;
    border: none;
    color: #c99bbf;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cumple-titulo { font-size: 2rem; }
    .cumple-pastel { transform: scale(0.92); }
    .cumple-fab { right: 104px; width: 38px; height: 38px; font-size: 18px; }
    #gorrito-sol { font-size: 38px; transform: translate(-50%, -110px); }
    @keyframes gorritoFlota {
        0%, 100% { transform: translate(-50%, -110px) rotate(-6deg); }
        50%      { transform: translate(-50%, -118px) rotate(6deg); }
    }
}
