/* =========================================================
   V10 - Postales multimedia: imagen, efectos, sonido, YouTube
   ========================================================= */

.postal-live-preview,
.postal-full-v10,
.postal-mini-preview {
    --postal-bg1: #9F2D56;
    --postal-bg2: #F8D7E2;
    --postal-text: #FFFFFF;
    --postal-accent: #FFD6A5;
    --postal-font: 'Cormorant Garamond', serif;
    position: relative;
    overflow: hidden;
    color: var(--postal-text);
    background:
        linear-gradient(135deg, rgba(0,0,0,.18), rgba(0,0,0,.38)),
        var(--postal-bg-image, linear-gradient(135deg, var(--postal-bg1), var(--postal-bg2)));
    background-size: cover;
    background-position: center;
    font-family: var(--postal-font);
    box-shadow: 0 24px 70px rgba(80, 20, 45, 0.22);
}

.postal-live-preview {
    min-height: 520px;
    border-radius: 34px;
    padding: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postal-full-v10 {
    max-width: 900px;
    margin: 0 auto 24px;
    min-height: 620px;
    border-radius: 36px;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postal-live-inner,
.postal-full-inner {
    position: relative;
    z-index: 3;
    width: min(100%, 720px);
    margin: auto;
    text-align: center;
    padding: 34px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
}

.postal-live-preview h3,
.postal-full-v10 h1 {
    font-family: var(--postal-font);
    color: var(--postal-text);
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1;
    margin: 14px 0 18px;
    text-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.postal-live-preview .message,
.postal-full-v10 .big-message {
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    line-height: 1.7;
    color: var(--postal-text);
    text-shadow: 0 6px 18px rgba(0,0,0,.20);
}

.postal-signature,
.postal-live-preview strong {
    display: block;
    margin-top: 18px;
    font-size: 1.2rem;
    color: var(--postal-accent);
}

.frame-gold .postal-live-inner,
.frame-gold .postal-full-inner {
    border: 2px solid color-mix(in srgb, var(--postal-accent), white 12%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 36px rgba(255,214,165,.18);
}

.frame-glass .postal-live-inner,
.frame-glass .postal-full-inner {
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(14px);
}

.frame-classic .postal-live-inner,
.frame-classic .postal-full-inner {
    background: rgba(255,248,240,.88);
    color: #3a2430;
    border: 1px solid rgba(120,65,45,.20);
}

.frame-classic h1,
.frame-classic h3,
.frame-classic .message,
.frame-classic .big-message {
    color: #3a2430;
    text-shadow: none;
}

.frame-neon .postal-live-inner,
.frame-neon .postal-full-inner {
    border: 1px solid rgba(255,255,255,.35);
    box-shadow: 0 0 24px color-mix(in srgb, var(--postal-accent), transparent 45%);
}

.postal-mini-preview {
    min-height: 150px;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 12px;
}

.postal-mini-content {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 8px;
}

.postal-mini-content strong {
    font-size: 1.25rem;
}

.postal-mini-content span {
    font-family: 'Montserrat', sans-serif;
    font-size: .9rem;
    line-height: 1.45;
}

.postal-youtube-box,
.postal-youtube-preview {
    width: min(100%, 640px);
    margin: 26px auto 0;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(0,0,0,.24);
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

.postal-youtube-box iframe,
.postal-youtube-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.postal-audio-box {
    margin-top: 22px;
}

.postal-sound-btn {
    position: relative;
    z-index: 5;
}

.postal-effect {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.postal-effect span {
    position: absolute;
    bottom: -50px;
    left: 50%;
    color: rgba(255,255,255,.78);
    font-size: 28px;
    animation: postalFloat 9s linear infinite;
    text-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.postal-effect span:nth-child(1) { left: 8%;  animation-delay: 0s;   font-size: 24px; }
.postal-effect span:nth-child(2) { left: 22%; animation-delay: 1.3s; font-size: 32px; }
.postal-effect span:nth-child(3) { left: 36%; animation-delay: 2.1s; font-size: 22px; }
.postal-effect span:nth-child(4) { left: 50%; animation-delay: 3.4s; font-size: 36px; }
.postal-effect span:nth-child(5) { left: 64%; animation-delay: 1.9s; font-size: 26px; }
.postal-effect span:nth-child(6) { left: 78%; animation-delay: 4.4s; font-size: 34px; }
.postal-effect span:nth-child(7) { left: 88%; animation-delay: 2.8s; font-size: 24px; }
.postal-effect span:nth-child(8) { left: 94%; animation-delay: 5.2s; font-size: 30px; }

.postal-effect-petals span,
.postal-effect-confetti span {
    animation-name: postalFall;
    top: -40px;
    bottom: auto;
}

.postal-effect-sparkles span,
.postal-effect-stars span {
    animation-name: postalTwinkle;
    bottom: auto;
    top: 50%;
}

@keyframes postalFloat {
    0% { transform: translateY(0) scale(.75) rotate(0deg); opacity: 0; }
    12% { opacity: .95; }
    100% { transform: translateY(-720px) scale(1.35) rotate(22deg); opacity: 0; }
}

@keyframes postalFall {
    0% { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
    12% { opacity: .9; }
    100% { transform: translateY(720px) translateX(70px) rotate(220deg); opacity: 0; }
}

@keyframes postalTwinkle {
    0%, 100% { transform: scale(.75); opacity: .15; }
    50% { transform: scale(1.35); opacity: .95; }
}

@media (max-width: 768px) {
    .postal-live-preview,
    .postal-full-v10 {
        min-height: 520px;
        padding: 24px;
        border-radius: 26px;
    }

    .postal-live-inner,
    .postal-full-inner {
        padding: 24px 18px;
        border-radius: 22px;
    }
}


/* =========================================================
   V10.1 - Opciones visuales del usuario + vistas + buzón
   ========================================================= */

.postal-user-design-panel {
    margin: 18px 0 22px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(159,45,86,.08), rgba(159,45,86,.035));
    border: 1px solid rgba(159,45,86,.12);
}

.postal-user-design-panel h3 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    color: #243047;
}

.postal-color-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.postal-color-grid input[type="color"] {
    width: 100%;
    height: 46px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.postal-public-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 auto 18px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(159,45,86,.08);
    color: #243047;
    font-weight: 700;
}

.postcard-inbox-list {
    display: grid;
    gap: 16px;
}

.postcard-inbox-item {
    border-left: 5px solid rgba(159,45,86,.25);
}

.postcard-inbox-item.is-unread {
    border-left-color: #a7355c;
    background: linear-gradient(180deg, #fff, #fff7fa);
}

.postcard-inbox-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.postcard-inbox-head a {
    display: inline-block;
    margin-left: 8px;
    text-decoration: none;
}

.postcard-inbox-source {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(159,45,86,.07);
}

.postcard-inbox-source a {
    font-weight: 800;
    color: #9f2d56;
    text-decoration: none;
}

@media (max-width: 768px) {
    .postal-color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .postcard-inbox-head {
        display: grid;
    }
}
