/* ==========================================================
   DAWATI (دعواتي) - Luxury Digital Invitation Platform
   Haute Couture Editorial Design System (The Digital Yes Parity)
   ========================================================== */

:root {
    /* Pure Calm Light Mode Palette */
    --dwt-ivory-bg: #FAF8F5;
    --dwt-atelier-bg: #F5F1E9;
    --dwt-card-surface: #FFFFFF;
    --dwt-card-ivory: #FDFCF9;
    --dwt-gold: #9E723D;
    --dwt-gold-hover: #8C6230;
    --dwt-gold-light: #F6EFE5;
    --dwt-gold-border: #E5D7C3;
    --dwt-gold-shimmer: linear-gradient(135deg, #DDB668 0%, #BA915D 50%, #8C6230 100%);
    --dwt-text-main: #2C2522;
    --dwt-text-muted: #6E655F;
    --dwt-text-light: #948A82;
    --dwt-border-soft: #EDE5DA;
    --dwt-border-hairline: #F2ECE3;

    /* Fonts */
    --dwt-font-amiri: 'Amiri', serif;
    --dwt-font-cairo: 'Cairo', sans-serif;
    --dwt-font-tajawal: 'Tajawal', sans-serif;
    --dwt-font-aref: 'Aref Ruqaa', serif;
    --dwt-font-cormorant: 'Cormorant Garamond', serif;
    --dwt-font-playfair: 'Playfair Display', serif;
    --dwt-font-cinzel: 'Cinzel', serif;
}

/* Base Body & Layout - Serene & Calm Light Mode */
body {
    font-family: var(--dwt-font-tajawal);
    background-color: var(--dwt-ivory-bg);
    color: var(--dwt-text-main);
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
    letter-spacing: -0.2px;
    -webkit-font-smoothing: antialiased;
}

/* Typography Classes */
.font-amiri { font-family: var(--dwt-font-amiri); }
.font-cairo { font-family: var(--dwt-font-cairo); }
.font-tajawal { font-family: var(--dwt-font-tajawal); }
.font-aref { font-family: var(--dwt-font-aref); }
.font-cormorant { font-family: var(--dwt-font-cormorant); }
.font-playfair { font-family: var(--dwt-font-playfair); }
.font-cinzel { font-family: var(--dwt-font-cinzel); }

/* Calm Luxury Buttons */
.btn-gold {
    background: linear-gradient(135deg, #A87D48 0%, #BA915D 100%);
    color: #FFFFFF !important;
    border: 1px solid #9E723D;
    box-shadow: 0 4px 14px rgba(168, 125, 72, 0.22);
    font-weight: 500;
    border-radius: 50px;
    padding: 0.65rem 1.75rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 125, 72, 0.32);
    background: linear-gradient(135deg, #9E723D 0%, #AF8552 100%);
}

.btn-gold-outline {
    background: transparent;
    color: #9E723D !important;
    border: 1.5px solid #A87D48;
    border-radius: 50px;
    padding: 0.65rem 1.75rem;
    font-weight: 500;
    transition: all 0.25s ease;
}
.btn-gold-outline:hover {
    background: #9E723D;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(168, 125, 72, 0.2);
}

/* Calm Luxury Cards */
.card-luxury {
    background: #FFFFFF;
    border: 1px solid var(--dwt-border-soft);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(44, 37, 34, 0.035);
    transition: all 0.3s ease;
}

/* ==========================================================
   ATELIER STAGE & MOBILE-FIRST VIEWPORT (The Digital Yes Style)
   ========================================================== */
.atelier-body {
    background-color: var(--dwt-atelier-bg);
    background-image: radial-gradient(rgba(158, 114, 61, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.atelier-stage-canvas {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 12px 110px;
}

.invitation-mobile-viewport {
    max-width: 440px;
    width: 100%;
    background: #FCFAF7;
    min-height: calc(100vh - 48px);
    border-radius: 40px;
    box-shadow: 0 25px 80px rgba(44, 37, 34, 0.16), 0 0 0 1px rgba(158, 114, 61, 0.2), 0 0 0 6px #2C2522;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    margin: 10px auto;
}

@media (max-width: 575px) {
    .atelier-stage-canvas {
        padding: 0 0 90px;
    }
    .invitation-mobile-viewport {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        border: none;
        margin: 0;
        min-height: 100vh;
    }
}

body.has-sealed-envelope {
    overflow: hidden !important;
    touch-action: none;
}

/* ==========================================================
   PHOTOREALISTIC 3D ENVELOPE STAGE (The Haute Couture Opening Act)
   ========================================================== */
.envelope-hero-container {
    position: relative;
    width: 100%;
    min-height: 520px;
    height: 78vh;
    max-height: 580px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 45%, #FFFDF9 0%, #FAF6EE 55%, #EDE4D3 100%);
    padding: 30px 20px;
    border-radius: 40px 40px 0 0;
    overflow: visible;
    transition: max-height 0.85s cubic-bezier(0.25, 1, 0.5, 1), min-height 0.85s cubic-bezier(0.25, 1, 0.5, 1), height 0.85s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.75s ease, padding 0.85s ease, margin 0.85s ease;
}

@media (max-width: 575px) {
    .envelope-hero-container {
        min-height: 82vh;
        height: 82vh;
        border-radius: 0;
    }
}

.envelope-hero-container.is-dissolved {
    max-height: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    overflow: hidden;
}

.envelope-hero-container.is-hidden {
    display: none !important;
}

.envelope-stage {
    width: 440px;
    height: 295px;
    max-width: 92vw;
    position: relative;
    perspective: 1600px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 0 auto;
}

@media (max-width: 576px) {
    .envelope-stage {
        width: 345px;
        height: 235px;
    }
}

.envelope-stage:hover {
    transform: translateY(-4px) scale(1.01);
}

.envelope-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: #F5EFE6;
    box-shadow: 
        0 30px 75px rgba(44, 37, 34, 0.16),
        0 10px 28px rgba(44, 37, 34, 0.08),
        0 1px 3px rgba(44, 37, 34, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.85s ease, box-shadow 0.85s ease;
}

.envelope-stage.is-handover .envelope-wrapper {
    transform: translateY(70px) scale(0.96);
    opacity: 0;
    pointer-events: none;
}

/* Envelope Back & Interior Pattern */
.envelope-back {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: inherit;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.envelope-liner {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    transition: opacity 0.4s ease;
}

/* Exquisite Interior Liner Patterns */
.pattern-gold-mesh {
    background-image: 
        linear-gradient(45deg, #9E723D 25%, transparent 25%), 
        linear-gradient(-45deg, #9E723D 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #9E723D 75%), 
        linear-gradient(-45deg, transparent 75%, #9E723D 75%),
        radial-gradient(circle at 50% 50%, #D8AB56 1.5px, transparent 1.5px);
    background-size: 18px 18px, 18px 18px, 18px 18px, 18px 18px, 9px 9px;
}

.pattern-floral-lace {
    background-image: 
        radial-gradient(#9E723D 1.8px, transparent 1.8px),
        radial-gradient(#D8AB56 1px, transparent 1px);
    background-size: 16px 16px, 8px 8px;
    background-position: 0 0, 8px 8px;
}

.pattern-art-deco-gold {
    background-image: 
        linear-gradient(135deg, rgba(158, 114, 61, 0.25) 25%, transparent 25%), 
        linear-gradient(225deg, rgba(158, 114, 61, 0.25) 25%, transparent 25%), 
        linear-gradient(315deg, rgba(158, 114, 61, 0.25) 25%, transparent 25%), 
        linear-gradient(45deg, rgba(158, 114, 61, 0.25) 25%, transparent 25%);
    background-size: 20px 20px;
}

.pattern-damask-royal {
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(158, 114, 61, 0.4) 2px, transparent 2px),
        radial-gradient(circle at 0 0, rgba(216, 171, 86, 0.3) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
}

/* Mini Invitation Card peek inside Envelope Pocket */
.envelope-card {
    position: absolute;
    top: 12px;
    left: 16px;
    right: 16px;
    height: 295px;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(44, 37, 34, 0.08);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 18px;
    text-align: center;
    border: 1px solid rgba(197, 168, 128, 0.35);
    transition: transform 1.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.9s ease;
    overflow: hidden;
    background-image: linear-gradient(180deg, #FFFFFF 0%, #FAF8F5 100%);
}

.card-mini-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(197, 168, 128, 0.4);
    border-radius: 9px;
    padding: 16px 14px;
    position: relative;
    box-shadow: inset 0 0 16px rgba(246, 239, 229, 0.6);
}

.card-mini-preview::before,
.card-mini-preview::after {
    content: "✦";
    position: absolute;
    font-size: 10px;
    color: #C6A56B;
}
.card-mini-preview::before { top: 6px; left: 8px; }
.card-mini-preview::after { bottom: 6px; right: 8px; }

/* Unified Haute Couture Stationery Front Pocket (احترافي، أنيق، بسيط) */
.envelope-pocket-front {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: inherit;
    clip-path: polygon(0% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 4;
    border: 1px solid rgba(0, 0, 0, 0.04);
    filter: drop-shadow(0 -3px 8px rgba(44, 37, 34, 0.05));
    overflow: hidden;
}

.envelope-pocket-seam {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, transparent 49.5%, rgba(0,0,0,0.025) 50%, transparent 50.5%),
        linear-gradient(225deg, transparent 49.5%, rgba(0,0,0,0.025) 50%, transparent 50.5%);
    pointer-events: none;
}

/* Backward-compatible individual side and bottom pockets */
.envelope-pocket-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0% 0%, 0% 100%, 52% 50%);
    background: inherit;
    z-index: 3;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    filter: drop-shadow(1px 0 2px rgba(44, 37, 34, 0.03));
}

.envelope-pocket-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(100% 0%, 100% 100%, 48% 50%);
    background: inherit;
    z-index: 3;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    filter: drop-shadow(-1px 0 2px rgba(44, 37, 34, 0.03));
}

.envelope-pocket-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0% 100%, 100% 100%, 50% 48%);
    background: inherit;
    z-index: 4;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    box-shadow: 0 -3px 12px rgba(44, 37, 34, 0.04);
}

/* 3D Two-Sided Folding Top Flap */
.envelope-flap-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 52%;
    z-index: 6;
    transform-origin: top center;
    transform-style: preserve-3d;
    transition: transform 1.05s cubic-bezier(0.25, 1, 0.5, 1), z-index 0.01s ease 0.5s;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.envelope-flap-face {
    position: absolute;
    inset: 0;
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transform-style: preserve-3d;
}

/* Front Face: outer fine paper facing viewer when sealed */
.flap-face-front {
    transform: rotateX(0deg);
    background: inherit;
    z-index: 2;
    filter: drop-shadow(0 8px 18px rgba(44, 37, 34, 0.12));
}

/* Back Face: flips 180° revealing matching luxury liner pattern */
.flap-face-back {
    transform: rotateX(180deg);
    background: inherit;
    z-index: 1;
    overflow: hidden;
}

.flap-face-back .envelope-liner {
    opacity: 0.35;
}

.flap-liner-trim {
    position: absolute;
    inset: 8px;
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
    border-bottom: 1.5px solid rgba(198, 165, 107, 0.6);
    pointer-events: none;
}

.flap-crease-shadow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
    background: linear-gradient(180deg, rgba(44, 37, 34, 0.12) 0%, transparent 100%);
    pointer-events: none;
}

/* 3D Embossed Poured Sealing Wax (Haute Couture Seal) */
.wax-seal {
    position: absolute;
    bottom: -37px;
    left: 50%;
    transform: translateX(-50%) translateZ(8px);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #FDF1CF 0%, #D8AB56 32%, #A87D48 68%, #6E491E 100%);
    box-shadow: 
        0 16px 36px rgba(44, 37, 34, 0.32), 
        0 4px 10px rgba(44, 37, 34, 0.2), 
        inset 0 2.5px 4px rgba(255, 255, 255, 0.65), 
        inset 0 -3.5px 7px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    border: none;
    outline: none;
    padding: 0;
}

.wax-seal:hover {
    transform: translateX(-50%) translateZ(14px) scale(1.08);
    box-shadow: 
        0 20px 45px rgba(168, 125, 72, 0.45),
        0 6px 14px rgba(44, 37, 34, 0.22),
        inset 0 3px 5px rgba(255, 255, 255, 0.7),
        inset 0 -3.5px 7px rgba(0, 0, 0, 0.45);
}

/* Engraved Signet Ring */
.wax-seal-inner-ring {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.35),
        0 1px 1.5px rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.wax-seal-icon {
    font-size: 23px;
    color: #FFFDF9;
    font-family: var(--dwt-font-amiri);
    font-weight: bold;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
    width: 100%;
    height: 100%;
}

.wax-seal-icon .dawati-seal-emblem,
.wax-seal-icon .monasaba-seal-emblem,
.wax-seal-icon .monasaba-vector-icon {
    width: 58px;
    height: 58px;
    transition: transform 0.35s ease;
}

.wax-seal:hover .dawati-seal-emblem,
.wax-seal:hover .monasaba-seal-emblem,
.wax-seal:hover .monasaba-vector-icon {
    transform: scale(1.05);
}

.wax-seal-sparkle {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 11px;
    color: #FFF7D6;
    opacity: 0.85;
    pointer-events: none;
    animation: sparkleGlint 2.8s infinite ease-in-out;
}

@keyframes sparkleGlint {
    0%, 100% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(15deg); }
}

/* Seal Breaking Physics & Shatter Animation */
.wax-seal.is-breaking {
    animation: waxSealBreak 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes waxSealBreak {
    0% {
        transform: translateX(-50%) translateZ(6px) scale(1) rotate(0deg);
        filter: brightness(1);
    }
    25% {
        transform: translateX(-50%) translateZ(16px) scale(1.22) rotate(4deg);
        filter: brightness(1.35);
    }
    50% {
        transform: translateX(-50%) translateZ(20px) scale(1.28) rotate(-4deg);
        box-shadow: 0 0 35px rgba(223, 177, 91, 0.9);
    }
    75% {
        transform: translateX(-50%) translateZ(10px) scale(0.85) rotate(2deg);
        opacity: 0.75;
    }
    100% {
        transform: translateX(-50%) translateZ(0px) scale(0.05) rotate(0deg);
        opacity: 0;
        filter: blur(8px);
    }
}

/* Pulsing Open Hint Badge */
.open-hint-badge {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    color: var(--dwt-text-main);
    padding: 8px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(158, 114, 61, 0.16);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid #E5D7C3;
    animation: calmPulse 3s infinite ease-in-out;
    z-index: 10;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes calmPulse {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.95; }
    50% { transform: translateX(-50%) translateY(-3px); opacity: 1; box-shadow: 0 12px 30px rgba(158, 114, 61, 0.28); }
}

/* Envelope Open Physics Sequence */
.envelope-stage.is-open .envelope-flap-top {
    transform: rotateX(180deg);
    z-index: 1;
    transition: transform 1.05s cubic-bezier(0.34, 1.15, 0.64, 1), z-index 0.01s ease 0.5s;
}

.envelope-stage.is-open .wax-seal:not(.is-breaking) {
    opacity: 0;
    transform: translateX(-50%) translateZ(0px) scale(0.1);
    pointer-events: none;
    transition: all 0.3s ease;
}

.envelope-stage.is-open .open-hint-badge {
    opacity: 0;
    transform: translateX(-50%) translateY(14px);
    pointer-events: none;
}

.envelope-stage.is-open .envelope-card {
    transform: translateY(-265px) scale(1.03);
    z-index: 10;
    box-shadow: 0 36px 85px rgba(44, 37, 34, 0.28), 0 10px 24px rgba(44, 37, 34, 0.12);
}

@media (max-width: 576px) {
    .envelope-stage.is-open .envelope-card {
        transform: translateY(-210px) scale(1.02);
    }
}

/* ==========================================================
   FULL INVITATION CARD (Haute Couture Fine Stationery Presentation)
   ========================================================== */
#full-invitation-view {
    display: none;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1), transform 0.85s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    width: 100%;
}
#full-invitation-view.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.invitation-card-container {
    width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 54px 28px 64px;
    background: #FCFAF7;
    color: var(--dwt-text-main);
    border-radius: 32px;
    box-shadow: 
        0 4px 6px -1px rgba(44, 37, 34, 0.04),
        0 20px 45px -10px rgba(44, 37, 34, 0.12),
        0 40px 90px -20px rgba(44, 37, 34, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95),
        inset 0 0 40px rgba(158, 114, 61, 0.03);
    overflow: hidden;
}

@media (max-width: 575px) {
    .invitation-card-container {
        padding: 42px 20px 54px;
        border-radius: 20px;
    }
}

/* Haute Couture Fine Stationery Corner Ornaments & Inner Frame */
.stationery-frame-corner {
    position: absolute;
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 3;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}
.corner-tl { top: 18px; left: 18px; }
.corner-tr { top: 18px; right: 18px; transform: scaleX(-1); }
.corner-bl { bottom: 18px; left: 18px; transform: scaleY(-1); }
.corner-br { bottom: 18px; right: 18px; transform: scale(-1, -1); }

@media (max-width: 575px) {
    .stationery-frame-corner {
        width: 36px;
        height: 36px;
    }
    .corner-tl { top: 12px; left: 12px; }
    .corner-tr { top: 12px; right: 12px; }
    .corner-bl { bottom: 12px; left: 12px; }
    .corner-br { bottom: 12px; right: 12px; }
}

.stationery-inner-border {
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(158, 114, 61, 0.28);
    border-radius: 20px;
    pointer-events: none;
    z-index: 2;
}
@media (max-width: 575px) {
    .stationery-inner-border {
        inset: 10px;
        border-radius: 12px;
    }
}

/* Monogram Crest (Medallion) */
.monogram-crest-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
    position: relative;
    z-index: 4;
}
.monogram-crest {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 1.5px solid #9E723D;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #FFFFFF;
    box-shadow: 0 6px 20px rgba(158, 114, 61, 0.14), inset 0 0 12px rgba(158, 114, 61, 0.05);
    transition: transform 0.3s ease;
}
.monogram-inner-ring {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px dashed rgba(158, 114, 61, 0.45);
}
.monogram-text {
    font-family: var(--dwt-font-amiri);
    font-size: 24px;
    font-weight: 700;
    color: #9E723D;
    line-height: 1;
}

/* Quranic Verse / Poetry Header */
.verse-header-wrapper {
    max-width: 440px;
    margin: 0 auto 16px;
    position: relative;
    z-index: 4;
}
.verse-calligraphy-bismillah {
    font-family: var(--dwt-font-amiri);
    font-size: 1.55rem;
    color: #9E723D;
    margin-bottom: 8px;
    opacity: 0.95;
    letter-spacing: 2px;
    line-height: 1;
}
.verse-header {
    font-family: var(--dwt-font-amiri);
    font-size: 1.08rem;
    line-height: 2;
    color: #554433;
    font-weight: 400;
    max-width: 420px;
    margin: 0 auto;
}

.gold-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 22px auto;
    max-width: 240px;
    position: relative;
    z-index: 4;
}
.gold-divider::before,
.gold-divider::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #9E723D, transparent);
}

/* Dignified Host Names */
.host-title {
    font-size: 0.96rem;
    margin-bottom: 12px;
    line-height: 1.9;
    color: #6B5B4E;
    font-weight: 400;
    position: relative;
    z-index: 4;
    letter-spacing: 0.2px;
}

/* The Names Display (Majestic Haute Couture Gold Foil) */
.names-editorial-wrapper {
    position: relative;
    padding: 10px 0;
    z-index: 4;
}
.names-display {
    font-family: var(--dwt-font-amiri);
    font-size: clamp(2.1rem, 5.5vw, 2.9rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.5px;
    color: var(--names-accent, #9E723D);
    background: linear-gradient(135deg, #7A531C 0%, #D8AB56 35%, #FFF0CD 50%, #C49842 70%, #7A531C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(158, 114, 61, 0.16));
}
.names-connector {
    display: block;
    font-family: var(--dwt-font-aref);
    font-size: 1.45rem;
    font-style: italic;
    opacity: 0.75;
    margin: 4px 0;
    -webkit-text-fill-color: var(--names-accent, #9E723D);
}

/* Invitation Body Text */
.invitation-body-text {
    font-size: 1.02rem;
    line-height: 2.3;
    margin: 20px auto;
    max-width: 440px;
    color: #4A3E38;
    font-weight: 300;
    text-align: center;
    position: relative;
    z-index: 4;
}

/* ==========================================================
   EDITORIAL SECTION NUMBERING & HEADERS (The Digital Yes Style)
   ========================================================== */
.editorial-section {
    margin: 48px 0;
    position: relative;
    z-index: 4;
}

.editorial-header {
    text-align: center;
    margin-bottom: 22px;
}

.editorial-num {
    display: inline-block;
    font-family: var(--dwt-font-cormorant);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #9E723D;
    background: #FAF5EC;
    border: 1px solid #E5D5BF;
    padding: 3px 14px;
    border-radius: 50px;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(158, 114, 61, 0.06);
}

.editorial-title {
    font-family: var(--dwt-font-amiri);
    font-size: 1.45rem;
    font-weight: 700;
    color: #2C2522;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.editorial-subtitle {
    font-size: 0.85rem;
    color: var(--dwt-text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ==========================================================
   01 · COUNTDOWN MINIMAL (Airy & Elegant)
   ========================================================== */
.countdown-minimal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background: #FFFFFF;
    border: 1px solid #EDE5DA;
    border-radius: 24px;
    padding: 20px 16px;
    margin: 16px auto;
    direction: ltr;
    box-shadow: 0 8px 25px rgba(44, 37, 34, 0.04), 0 1px 3px rgba(44, 37, 34, 0.02);
    max-width: 440px;
}

.c-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
}
.c-val {
    font-family: var(--dwt-font-cormorant);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    color: #9E723D;
    background: linear-gradient(135deg, #7A531C 0%, #D8AB56 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.c-lbl {
    font-size: 0.76rem;
    color: var(--dwt-text-muted);
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.c-sep {
    font-size: 1.5rem;
    color: #D3C5B4;
    line-height: 1;
    opacity: 0.6;
}

/* ==========================================================
   02 · INTERACTIVE SCRATCH TO REVEAL CARD
   ========================================================== */
.scratch-foil-card {
    background: #FFFFFF;
    border: 1.5px solid #E5D7C3;
    border-radius: 24px;
    padding: 22px 18px;
    box-shadow: 0 12px 35px rgba(158, 114, 61, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    margin-top: 14px;
    text-align: center;
    position: relative;
}

.scratch-canvas-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 215px;
    min-height: 215px;
    margin: 0 auto 14px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(44, 37, 34, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    border: 1.5px solid #E5D7C3;
    background: #FAF6EE;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

/* 1. Underlying Hidden Secret Card */
.scratch-hidden-card {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, #FFFDF9 0%, #F9F3E8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px 20px;
    text-align: center;
    z-index: 1;
}

.scratch-surprise-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(158, 114, 61, 0.1);
    border: 1px solid rgba(158, 114, 61, 0.28);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #8C6230;
    margin-bottom: 10px;
}

.scratch-surprise-title {
    font-family: var(--dwt-font-amiri);
    font-size: 1.25rem;
    font-weight: 700;
    color: #9E723D;
    margin-bottom: 8px;
    line-height: 1.35;
}

.scratch-surprise-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #4A3E39;
    margin-bottom: 0;
    max-width: 320px;
    font-family: var(--dwt-font-tajawal);
}

/* 2. Metallic Scratch Foil Canvas */
.scratch-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    z-index: 2;
    transition: opacity 0.5s ease;
}
.scratch-canvas:active {
    cursor: grabbing;
}

/* 3. Luxury Floating Prompt Badge on top of Foil */
.scratch-foil-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
    padding: 16px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.scratch-foil-overlay.is-scratching {
    opacity: 0;
    transform: scale(0.92);
}

.scratch-coin-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFF5D6 0%, #D8AB56 50%, #9E723D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 6px 18px rgba(44, 37, 34, 0.28), 
        inset 0 2px 3px rgba(255, 255, 255, 0.7),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    animation: calmPulse 3s infinite ease-in-out;
}

.scratch-badge-sparkle {
    font-size: 20px;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    line-height: 1;
}

.scratch-foil-title {
    font-family: var(--dwt-font-amiri);
    font-size: 1.35rem;
    font-weight: 700;
    color: #382717;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85), 0 0 8px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.scratch-foil-sub {
    font-size: 0.84rem;
    color: #5C4528;
    margin-bottom: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.btn-reveal-instant {
    background: #FAF6EE;
    border: 1px solid #E5D7C3;
    font-size: 0.82rem;
    font-weight: 600;
    color: #8C6230;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.25s ease;
    margin-top: 8px;
    box-shadow: 0 2px 6px rgba(44, 37, 34, 0.04);
}
.btn-reveal-instant:hover {
    color: #FFFFFF;
    background: #9E723D;
    border-color: #9E723D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(158, 114, 61, 0.25);
}

/* ==========================================================
   03 · RUNWAY TIMELINE (Programme of the Day)
   ========================================================== */
.runway-timeline {
    position: relative;
    padding: 14px 0;
    margin-top: 14px;
}
.runway-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    right: 82px;
    width: 2px;
    background: linear-gradient(180deg, #E5D7C3 0%, #D4AF37 50%, rgba(229, 215, 195, 0.25) 100%);
}

.runway-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}
.runway-item:last-child {
    margin-bottom: 0;
}

.runway-time {
    width: 72px;
    font-family: var(--dwt-font-cormorant);
    font-size: 1.05rem;
    font-weight: 700;
    color: #9E723D;
    text-align: left;
    padding-top: 10px;
    flex-shrink: 0;
    direction: ltr;
}

.runway-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2.5px solid #9E723D;
    box-shadow: 0 0 0 4px #FAF6EE, 0 2px 6px rgba(158, 114, 61, 0.2);
    flex-shrink: 0;
    margin-top: 9px;
    z-index: 2;
    transition: transform 0.2s ease;
}
.runway-item:hover .runway-dot {
    transform: scale(1.2);
}

.runway-details {
    background: #FFFFFF;
    border: 1px solid #EDE5DA;
    border-radius: 18px;
    padding: 14px 18px;
    flex-grow: 1;
    box-shadow: 0 4px 14px rgba(44, 37, 34, 0.03);
    text-align: right;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.runway-item:hover .runway-details {
    transform: translateX(-3px);
    box-shadow: 0 6px 20px rgba(158, 114, 61, 0.07);
}

.runway-event-title {
    font-family: var(--dwt-font-amiri);
    font-size: 1.12rem;
    font-weight: 700;
    color: #2C2522;
    margin-bottom: 3px;
}
.runway-event-desc {
    font-size: 0.84rem;
    color: var(--dwt-text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ==========================================================
   04 · VENUE & 1-TAP CALENDAR
   ========================================================== */
.venue-minimal-card {
    background: #FFFFFF;
    border: 1.5px solid #EDE5DA;
    border-radius: 24px;
    padding: 26px 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(44, 37, 34, 0.04);
}

.venue-icon-crest {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FAF5EC;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border: 1.5px solid #E5D7C3;
    box-shadow: 0 4px 12px rgba(158, 114, 61, 0.08);
}

.venue-name {
    font-family: var(--dwt-font-amiri);
    font-size: 1.35rem;
    font-weight: 700;
    color: #2C2522;
    margin-bottom: 6px;
}
.venue-location {
    font-size: 0.9rem;
    color: var(--dwt-text-muted);
    margin-bottom: 18px;
    line-height: 1.6;
}

.venue-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    margin: 0 auto;
}

.btn-venue-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #FCFAF7;
    border: 1px solid #E5D7C3;
    border-radius: 50px;
    padding: 10px 18px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #4A3E39;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(44, 37, 34, 0.02);
}
.btn-venue-pill:hover {
    background: #9E723D;
    color: #FFFFFF !important;
    border-color: #9E723D;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(158, 114, 61, 0.25);
}
.btn-venue-pill:hover i {
    color: #FFFFFF !important;
}

/* ==========================================================
   05 · DRESS CODE & PALETTE SWATCHES
   ========================================================== */
.palette-swatches-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
}

.palette-swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.swatch-circle-gem {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2.5px solid #FFFFFF;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14), 0 0 0 1.5px #D4AF37;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}
.swatch-circle-gem:hover {
    transform: scale(1.18);
}

.swatch-title {
    font-size: 0.78rem;
    color: #554433;
    font-weight: 600;
}

/* ==========================================================
   06 · GIFTS & HEARTFELT WISHES
   ========================================================== */
.gift-heartfelt-box {
    background: #FFFFFF;
    border: 1.5px solid #EDE5DA;
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 25px rgba(44, 37, 34, 0.04);
}

.gift-quote-mark {
    font-family: var(--dwt-font-amiri);
    font-size: 42px;
    color: #9E723D;
    line-height: 1;
    display: block;
    margin-bottom: -10px;
    opacity: 0.8;
}

.gift-quote-text {
    font-family: var(--dwt-font-amiri);
    font-size: 1.18rem;
    line-height: 2;
    color: #4A3E39;
    margin-bottom: 0;
}

.travel-info-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 50px;
    background: #FAF6EE;
    border: 1px solid #EAE0D0;
    font-size: 0.82rem;
    color: #6E5334;
}

/* ==========================================================
   07 · REAL-TIME RSVP RESPONSE STATIONERY
   ========================================================== */
.rsvp-editorial-card {
    background: #FFFFFF;
    border: 1.5px solid #E5D7C3;
    border-radius: 28px;
    padding: 28px 22px;
    box-shadow: 0 12px 40px rgba(158, 114, 61, 0.09);
    position: relative;
}

.rsvp-toggle-pills {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.rsvp-chip {
    flex: 1;
    border: 1.5px solid #EDE5DA;
    border-radius: 50px;
    padding: 10px 14px;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FCFAF7;
    color: #5C4B38;
}

.rsvp-chip input {
    display: none;
}

.rsvp-chip.active,
.rsvp-chip:has(input:checked) {
    background: linear-gradient(135deg, #F9F4EB 0%, #F4ECE0 100%);
    border-color: #9E723D;
    color: #9E723D;
    box-shadow: 0 4px 12px rgba(158, 114, 61, 0.15);
    font-weight: 700;
}

.rsvp-input {
    background: #FCFAF7;
    border: 1.5px solid #EDE5DA;
    border-radius: 50px;
    padding: 11px 20px;
    font-size: 0.9rem;
    color: var(--dwt-text-main);
    width: 100%;
    margin-bottom: 14px;
    transition: all 0.25s ease;
}
.rsvp-input:focus {
    outline: none;
    border-color: #9E723D;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(158, 114, 61, 0.12);
}

.rsvp-textarea {
    border-radius: 18px;
    resize: none;
    padding: 12px 18px;
}

.btn-rsvp-submit {
    width: 100%;
    background: linear-gradient(135deg, #A87D48 0%, #BA915D 100%);
    color: #FFFFFF;
    border: 1px solid #9E723D;
    border-radius: 50px;
    padding: 13px 24px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(168, 125, 72, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}
.btn-rsvp-submit:hover {
    background: linear-gradient(135deg, #9E723D 0%, #AF8552 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(168, 125, 72, 0.38);
}

/* ==========================================================
   FLOATING FROSTED GLASS ACTION BAR (Haute Couture)
   ========================================================== */
.floating-glass-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #E5D7C3;
    border-radius: 50px;
    padding: 6px 12px;
    box-shadow: 0 12px 35px rgba(44, 37, 34, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.glass-btn {
    background: transparent;
    border: none;
    color: #4A3E39;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.glass-btn:hover {
    background: #F6EFE5;
    color: #9E723D;
}

.glass-btn-primary {
    background: #9E723D;
    color: #FFFFFF !important;
    padding: 7px 16px;
}
.glass-btn-primary:hover {
    background: #8C6230;
    color: #FFFFFF !important;
}

/* Animated Equalizer Waves */
.audio-waves {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}
.audio-waves.is-playing {
    display: flex;
}
.audio-waves span {
    width: 2.5px;
    background: #9E723D;
    border-radius: 2px;
    animation: waveBar 1.2s infinite ease-in-out;
}
.audio-waves span:nth-child(1) { height: 6px; animation-delay: 0s; }
.audio-waves span:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.audio-waves span:nth-child(3) { height: 8px; animation-delay: 0.4s; }

@keyframes waveBar {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

/* Particle Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
}

/* ==========================================================
   THE 7 SIGNATURE COLLECTION THEMES (Haute Couture Fine Stationery)
   ========================================================== */

/* 1. Royal (الملكي الأصيل) */
.theme-royal .invitation-card-container,
.invitation-card-container.theme-royal,
.theme-luxury-gold-wedding .invitation-card-container,
.invitation-card-container.theme-luxury-gold-wedding {
    background-color: #FDFBF7;
    border: 1.5px solid #C8A261;
    box-shadow: 
        0 10px 30px -5px rgba(158, 114, 61, 0.12),
        0 25px 70px -10px rgba(44, 37, 34, 0.16),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}
.theme-royal .stationery-frame-corner,
.invitation-card-container.theme-royal .stationery-frame-corner,
.theme-luxury-gold-wedding .stationery-frame-corner,
.invitation-card-container.theme-luxury-gold-wedding .stationery-frame-corner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpath d='M4 56V20C4 11.163 11.163 4 20 4H56' stroke='%23C8A261' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M10 56V22C10 15.373 15.373 10 22 10H56' stroke='%23C8A261' stroke-width='0.8' stroke-dasharray='2 2'/%3E%3Ccircle cx='20' cy='20' r='3.5' fill='%23C8A261'/%3E%3Ccircle cx='20' cy='20' r='6' stroke='%23C8A261' stroke-width='0.7'/%3E%3Cpath d='M20 7C20 14.18 14.18 20 7 20' stroke='%23C8A261' stroke-width='0.8'/%3E%3Cpath d='M30 4C25 12 12 25 4 30' stroke='%23C8A261' stroke-width='0.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.theme-royal .stationery-inner-border,
.invitation-card-container.theme-royal .stationery-inner-border,
.theme-luxury-gold-wedding .stationery-inner-border,
.invitation-card-container.theme-luxury-gold-wedding .stationery-inner-border {
    border: 1px solid rgba(200, 162, 97, 0.35);
    outline: 1px dashed rgba(200, 162, 97, 0.2);
    outline-offset: -5px;
}
.theme-royal .names-display,
.invitation-card-container.theme-royal .names-display,
.theme-luxury-gold-wedding .names-display,
.invitation-card-container.theme-luxury-gold-wedding .names-display {
    font-family: var(--dwt-font-amiri);
    background: linear-gradient(135deg, #7A531C 0%, #D8AB56 35%, #FFF0CD 50%, #C49842 70%, #7A531C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-royal .monogram-crest,
.theme-luxury-gold-wedding .monogram-crest {
    border-color: #C8A261;
    color: #9E723D;
    box-shadow: 0 6px 20px rgba(158, 114, 61, 0.16);
}
.theme-royal .editorial-num,
.theme-luxury-gold-wedding .editorial-num {
    color: #9E723D;
    background: #FAF5EC;
    border-color: #E5D5BF;
}

/* 2. LACE (الدانتيل واللؤلؤ الفاخر) */
.theme-lace .invitation-card-container,
.invitation-card-container.theme-lace,
.theme-romantic-blush-wedding .invitation-card-container,
.invitation-card-container.theme-romantic-blush-wedding {
    background-color: #FFFFFF;
    border: 1.5px solid #E6D2BC;
    background-image: radial-gradient(rgba(179, 143, 92, 0.06) 1.2px, transparent 1.2px);
    background-size: 16px 16px;
    box-shadow: 
        0 10px 30px -5px rgba(184, 149, 104, 0.08),
        0 25px 70px -10px rgba(70, 50, 40, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}
.theme-lace .stationery-frame-corner,
.invitation-card-container.theme-lace .stationery-frame-corner,
.theme-romantic-blush-wedding .stationery-frame-corner,
.invitation-card-container.theme-romantic-blush-wedding .stationery-frame-corner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpath d='M4 56V24C4 12.954 12.954 4 24 4H56' stroke='%23B89568' stroke-width='1.2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='46' r='2' fill='%23B89568'/%3E%3Ccircle cx='10' cy='34' r='2' fill='%23B89568'/%3E%3Ccircle cx='10' cy='22' r='2' fill='%23B89568'/%3E%3Ccircle cx='22' cy='10' r='2' fill='%23B89568'/%3E%3Ccircle cx='34' cy='10' r='2' fill='%23B89568'/%3E%3Ccircle cx='46' cy='10' r='2' fill='%23B89568'/%3E%3Cpath d='M6 26C12 26 16 22 16 16C16 10 12 6 6 6' stroke='%23B89568' stroke-width='0.8'/%3E%3C/svg%3E");
}
.theme-lace .stationery-inner-border,
.invitation-card-container.theme-lace .stationery-inner-border,
.theme-romantic-blush-wedding .stationery-inner-border,
.invitation-card-container.theme-romantic-blush-wedding .stationery-inner-border {
    border: 1.5px dashed rgba(184, 149, 104, 0.35);
}
.theme-lace .names-display,
.invitation-card-container.theme-lace .names-display,
.theme-romantic-blush-wedding .names-display,
.invitation-card-container.theme-romantic-blush-wedding .names-display {
    font-family: var(--dwt-font-aref);
    background: linear-gradient(135deg, #8E6534 0%, #C49856 40%, #E8CBA0 60%, #8E6534 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-lace .monogram-crest,
.theme-romantic-blush-wedding .monogram-crest {
    border-color: #B89568;
    color: #B89568;
    background: #FFFEFA;
}
.theme-lace .editorial-num,
.theme-romantic-blush-wedding .editorial-num {
    color: #A37E4C;
    background: #FAF6EF;
    border-color: #E8D9C5;
}

/* 3. Stained Glass (الزجاج المعشق والزهور) */
.theme-stained-glass .invitation-card-container,
.invitation-card-container.theme-stained-glass,
.theme-festive-eid-emerald .invitation-card-container,
.invitation-card-container.theme-festive-eid-emerald {
    background-color: #FCFAF6;
    border: 1.5px solid #DFD0BC;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(184, 134, 11, 0.08) 0%, rgba(93, 137, 168, 0.05) 45%, transparent 75%);
    box-shadow: 
        0 10px 30px -5px rgba(140, 98, 57, 0.1),
        0 25px 70px -10px rgba(44, 37, 34, 0.14),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}
.theme-stained-glass .stationery-frame-corner,
.invitation-card-container.theme-stained-glass .stationery-frame-corner,
.theme-festive-eid-emerald .stationery-frame-corner,
.invitation-card-container.theme-festive-eid-emerald .stationery-frame-corner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpath d='M4 56V20C4 11.163 11.163 4 20 4H56' stroke='%238C6239' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M4 20C12 20 20 12 20 4' stroke='%238C6239' stroke-width='1'/%3E%3Cpath d='M4 4C14 4 20 10 20 20' stroke='%238C6239' stroke-width='0.7' stroke-dasharray='2 2'/%3E%3Ccircle cx='12' cy='12' r='3' fill='%23C49A45' opacity='0.8'/%3E%3C/svg%3E");
}
.theme-stained-glass .stationery-inner-border,
.invitation-card-container.theme-stained-glass .stationery-inner-border,
.theme-festive-eid-emerald .stationery-inner-border,
.invitation-card-container.theme-festive-eid-emerald .stationery-inner-border {
    border: 1.2px solid rgba(140, 98, 57, 0.3);
}
.theme-stained-glass .names-display,
.invitation-card-container.theme-stained-glass .names-display,
.theme-festive-eid-emerald .names-display,
.invitation-card-container.theme-festive-eid-emerald .names-display {
    font-family: var(--dwt-font-amiri);
    background: linear-gradient(135deg, #6B451B 0%, #B37D3B 40%, #E0B56A 60%, #6B451B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-stained-glass .monogram-crest,
.theme-festive-eid-emerald .monogram-crest {
    border-color: #8C6239;
    color: #8C6239;
    background: radial-gradient(circle, #FFFDF8 0%, #F5ECE0 100%);
}
.theme-stained-glass .editorial-num,
.theme-festive-eid-emerald .editorial-num {
    color: #8C6239;
    background: #F8F1E7;
    border-color: #DFCFBB;
}

/* 4. La Maison Dorée (الدار المذهبة) */
.theme-maison-doree .invitation-card-container,
.invitation-card-container.theme-maison-doree {
    background-color: #FFFDF9;
    border: 1.5px solid #E5CF9F;
    box-shadow: 
        0 10px 30px -5px rgba(196, 154, 69, 0.12),
        0 25px 70px -10px rgba(50, 40, 30, 0.16),
        inset 0 0 0 1px #E0C078, 
        inset 0 0 0 4px #FFFDF8, 
        inset 0 0 0 5.5px #D4AF37;
}
.theme-maison-doree .stationery-frame-corner,
.invitation-card-container.theme-maison-doree .stationery-frame-corner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpath d='M4 56V20C4 11.163 11.163 4 20 4H56' stroke='%23C49A45' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M10 56V22C10 15.373 15.373 10 22 10H56' stroke='%23C49A45' stroke-width='0.8' stroke-dasharray='2 2'/%3E%3Ccircle cx='20' cy='20' r='3.5' fill='%23C49A45'/%3E%3Ccircle cx='20' cy='20' r='6' stroke='%23C49A45' stroke-width='0.7'/%3E%3Cpath d='M20 7C20 14.18 14.18 20 7 20' stroke='%23C49A45' stroke-width='0.8'/%3E%3Cpath d='M30 4C25 12 12 25 4 30' stroke='%23C49A45' stroke-width='0.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.theme-maison-doree .stationery-inner-border,
.invitation-card-container.theme-maison-doree .stationery-inner-border {
    border: 1px solid rgba(196, 154, 69, 0.35);
}
.theme-maison-doree .names-display,
.invitation-card-container.theme-maison-doree .names-display {
    font-family: var(--dwt-font-playfair), var(--dwt-font-amiri);
    background: linear-gradient(135deg, #7D5920 0%, #D4A84B 35%, #FFF2D1 50%, #C4983E 70%, #7D5920 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-maison-doree .monogram-crest {
    border-color: #C49A45;
    color: #C49A45;
    box-shadow: 0 4px 16px rgba(196, 154, 69, 0.2);
}
.theme-maison-doree .editorial-num {
    color: #9B7438;
    background: #FAF2E1;
    border-color: #EAD0A0;
}

/* 5. Bella Vista (بيلا فيستا توسكانا) */
.theme-bella-vista .invitation-card-container,
.invitation-card-container.theme-bella-vista,
.theme-minimalist-green-graduation .invitation-card-container,
.invitation-card-container.theme-minimalist-green-graduation {
    background-color: #FAF9F4;
    border: 1.5px solid #CCD8CA;
    box-shadow: 
        0 10px 30px -5px rgba(92, 107, 87, 0.08),
        0 25px 70px -10px rgba(44, 48, 42, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}
.theme-bella-vista .stationery-frame-corner,
.invitation-card-container.theme-bella-vista .stationery-frame-corner,
.theme-minimalist-green-graduation .stationery-frame-corner,
.invitation-card-container.theme-minimalist-green-graduation .stationery-frame-corner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpath d='M4 56V22C4 12.059 12.059 4 22 4H56' stroke='%236B7D66' stroke-width='1.2' stroke-linecap='round'/%3E%3Cellipse cx='18' cy='12' rx='6' ry='3' transform='rotate(-30 18 12)' fill='%238F9E8B' opacity='0.7'/%3E%3Cellipse cx='12' cy='18' rx='6' ry='3' transform='rotate(60 12 18)' fill='%238F9E8B' opacity='0.7'/%3E%3Ccircle cx='16' cy='16' r='2' fill='%236B7D66'/%3E%3C/svg%3E");
}
.theme-bella-vista .stationery-inner-border,
.invitation-card-container.theme-bella-vista .stationery-inner-border,
.theme-minimalist-green-graduation .stationery-inner-border,
.invitation-card-container.theme-minimalist-green-graduation .stationery-inner-border {
    border: 1px solid rgba(107, 125, 102, 0.35);
}
.theme-bella-vista .names-display,
.invitation-card-container.theme-bella-vista .names-display,
.theme-minimalist-green-graduation .names-display,
.invitation-card-container.theme-minimalist-green-graduation .names-display {
    font-family: var(--dwt-font-amiri);
    color: #4C5D48;
    background: linear-gradient(135deg, #3C4A39 0%, #63755E 50%, #4C5D48 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-bella-vista .monogram-crest,
.theme-minimalist-green-graduation .monogram-crest {
    border-color: #6B7D66;
    color: #6B7D66;
}
.theme-bella-vista .editorial-num,
.theme-minimalist-green-graduation .editorial-num {
    color: #5C6B57;
    background: #EFF2EE;
    border-color: #D3DED1;
}

/* 6. Editorial (إيديتوريال فاشن العصري) */
.theme-editorial .invitation-card-container,
.invitation-card-container.theme-editorial,
.theme-modern-black-wedding .invitation-card-container,
.invitation-card-container.theme-modern-black-wedding,
.theme-navy-silver-birthday .invitation-card-container,
.invitation-card-container.theme-navy-silver-birthday {
    background-color: #FFFFFF;
    border: 1.5px solid #2C2522;
    box-shadow: 
        0 10px 30px -5px rgba(0, 0, 0, 0.08),
        0 25px 70px -10px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px #2C2522;
}
.theme-editorial .stationery-frame-corner,
.invitation-card-container.theme-editorial .stationery-frame-corner,
.theme-modern-black-wedding .stationery-frame-corner,
.invitation-card-container.theme-modern-black-wedding .stationery-frame-corner,
.theme-navy-silver-birthday .stationery-frame-corner,
.invitation-card-container.theme-navy-silver-birthday .stationery-frame-corner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpath d='M4 40V4H40' stroke='%231C1917' stroke-width='1.5'/%3E%3Cpath d='M10 34V10H34' stroke='%231C1917' stroke-width='0.6'/%3E%3Crect x='4' y='4' width='6' height='6' fill='%231C1917'/%3E%3C/svg%3E");
}
.theme-editorial .stationery-inner-border,
.invitation-card-container.theme-editorial .stationery-inner-border,
.theme-modern-black-wedding .stationery-inner-border,
.invitation-card-container.theme-modern-black-wedding .stationery-inner-border,
.theme-navy-silver-birthday .stationery-inner-border,
.invitation-card-container.theme-navy-silver-birthday .stationery-inner-border {
    border: 1px solid rgba(44, 37, 34, 0.2);
}
.theme-editorial .names-display,
.invitation-card-container.theme-editorial .names-display,
.theme-modern-black-wedding .names-display,
.invitation-card-container.theme-modern-black-wedding .names-display,
.theme-navy-silver-birthday .names-display,
.invitation-card-container.theme-navy-silver-birthday .names-display {
    font-family: var(--dwt-font-cairo), var(--dwt-font-playfair);
    color: #1C1917;
    background: none;
    -webkit-text-fill-color: initial;
    letter-spacing: 1px;
}
.theme-editorial .monogram-crest,
.theme-modern-black-wedding .monogram-crest,
.theme-navy-silver-birthday .monogram-crest {
    border-color: #2C2522;
    color: #2C2522;
    border-radius: 4px;
}
.theme-editorial .editorial-num,
.theme-modern-black-wedding .editorial-num,
.theme-navy-silver-birthday .editorial-num {
    background: #1C1917;
    color: #FFFFFF;
    border-color: #1C1917;
    border-radius: 4px;
}

/* 7. Embroidered Garden (الحديقة المطرزة) */
.theme-garden .invitation-card-container,
.invitation-card-container.theme-garden {
    background-color: #FFFDFD;
    border: 1.5px solid #E8CECA;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(200, 125, 133, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(142, 170, 138, 0.04) 0%, transparent 50%);
    box-shadow: 
        0 10px 30px -5px rgba(184, 107, 99, 0.08),
        0 25px 70px -10px rgba(50, 40, 40, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}
.theme-garden .stationery-frame-corner,
.invitation-card-container.theme-garden .stationery-frame-corner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' fill='none'%3E%3Cpath d='M4 56V24C4 12.954 12.954 4 24 4H56' stroke='%23C87D85' stroke-width='1.2' stroke-linecap='round'/%3E%3Ccircle cx='18' cy='18' r='4' fill='%23E2A9B0'/%3E%3Ccircle cx='18' cy='18' r='2' fill='%23C87D85'/%3E%3Cellipse cx='12' cy='28' rx='4' ry='2' transform='rotate(45 12 28)' fill='%23A4B8A0'/%3E%3Cellipse cx='28' cy='12' rx='4' ry='2' transform='rotate(-45 28 12)' fill='%23A4B8A0'/%3E%3C/svg%3E");
}
.theme-garden .stationery-inner-border,
.invitation-card-container.theme-garden .stationery-inner-border {
    border: 1px solid rgba(200, 125, 133, 0.35);
}
.theme-garden .names-display,
.invitation-card-container.theme-garden .names-display {
    font-family: var(--dwt-font-aref);
    background: linear-gradient(135deg, #8E4640 0%, #C87D85 50%, #8E4640 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-garden .monogram-crest {
    border-color: #B86B63;
    color: #B86B63;
}
.theme-garden .editorial-num {
    color: #A8625B;
    background: #FAF0F0;
    border-color: #E8D0D0;
}

/* ==========================================================
   OPENED ENVELOPE TEMPLATE SHOWCASE MOCKUPS
   ========================================================== */
.template-image-showcase {
    position: relative;
    overflow: hidden;
    background-color: #F8F5EE;
    border-bottom: 1px solid #EDE5DA;
    cursor: pointer;
}

.template-hover-zoom {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.card:hover .template-hover-zoom {
    transform: scale(1.06);
}

.template-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 37, 34, 0.38);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.card:hover .template-hover-overlay {
    opacity: 1;
}

.template-card-preview-mini {
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid #EDE5DA;
    background: #F8F5EE;
}



/* ==========================================================================
   ACT 1-B: THE ROYAL THEATRE VELVET CURTAINS (الستارة المسرحية الملكية الفاخرة)
   Photorealistic 3D Velvet Drapes with Scalloped Swags, Bullion Fringe, & Gold Cord
   ========================================================================== */

.curtain-hero-container {
    position: relative;
    width: 100%;
    min-height: 560px;
    height: 84vh;
    max-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 35%, #251614 0%, #120A08 65%, #050202 100%);
    perspective: 1400px;
    overflow: hidden;
    border-radius: 28px;
    margin-bottom: 2rem;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(0, 0, 0, 0.9);
    transition: max-height 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s ease,
                margin 0.9s ease;
    user-select: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .curtain-hero-container {
        min-height: 86vh;
        height: 86vh;
        max-height: 720px;
        border-radius: 20px;
        margin-bottom: 1.5rem;
    }
}

.curtain-hero-container.is-dissolved {
    max-height: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    overflow: hidden;
}

.curtain-hero-container.is-hidden {
    display: none !important;
}

/* Theatrical Spotlight Beam Casting from Ceiling */
.theatre-spotlight-beam {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    max-width: 95vw;
    height: 620px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 230, 160, 0.32) 0%, rgba(255, 205, 110, 0.1) 42%, transparent 72%);
    pointer-events: none;
    z-index: 6;
    mix-blend-mode: screen;
}

/* Proscenium Golden Arch Outer Frame */
.theatre-gold-frame {
    position: absolute;
    inset: 8px;
    border: 2px solid #D4AF37;
    border-radius: 22px;
    pointer-events: none;
    z-index: 28;
    box-shadow: inset 0 0 16px rgba(212, 175, 55, 0.3), 0 0 15px rgba(0, 0, 0, 0.85);
}

.theatre-gold-frame::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(255, 240, 190, 0.45);
    border-radius: 18px;
}

/* Grand Scalloped Top Valance (البرقع الملكي المسرحي) */
.curtain-valance {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    z-index: 25;
    pointer-events: none;
}

/* Gilded Header Bar at the Very Top */
.curtain-valance-header {
    height: 16px;
    background: linear-gradient(90deg, #4A3512 0%, #B8923A 15%, #FFF6DB 50%, #B8923A 85%, #4A3512 100%);
    border-bottom: 1.5px solid #8C6F2D;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Row of Scalloped Swags (الأقواس الهلالية المسدولة) */
.curtain-valance-swags {
    display: flex;
    height: 70px;
    position: relative;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.8));
}

.curtain-valance-swag {
    flex: 1;
    position: relative;
    margin: 0 -3px;
    height: 100%;
    background-color: var(--curtain-base, #5B0E1B);
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(255, 140, 160, 0.35) 0%, transparent 68%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.85) 100%);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    border-bottom: 3.5px solid #D4AF37;
    overflow: hidden;
}

.curtain-valance-swag::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    border-bottom: 2px dashed rgba(255, 240, 180, 0.45);
    box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.65);
}

.curtain-valance-swag::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 4%;
    right: 4%;
    height: 7px;
    background: repeating-linear-gradient(90deg, #D4AF37 0px, #FFF5D6 3px, #8C6F2D 5px);
    border-radius: 0 0 4px 4px;
}

/* Side Cascading Jabots (الكورنيش المسدول يميناً ويساراً) */
.curtain-valance-jabot {
    position: absolute;
    top: 14px;
    width: 34px;
    height: 155px;
    background: var(--curtain-base, #5B0E1B);
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(255, 120, 140, 0.3) 50%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 24;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.75);
}

.curtain-valance-jabot-left {
    left: 0;
    clip-path: polygon(0 0, 100% 0, 12% 100%, 0 85%);
    border-right: 2px solid #D4AF37;
}

.curtain-valance-jabot-right {
    right: 0;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 88% 100%);
    border-left: 2px solid #D4AF37;
}

/* Stage & Curtain Panels */
.curtain-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.curtain-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 53%;
    height: 100%;
    z-index: 10;
    overflow: hidden;
    transition: transform 1.45s cubic-bezier(0.75, 0, 0.15, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.85);
}

.curtain-panel-left {
    left: 0;
    transform-origin: left center;
    border-right: 3px solid #D4AF37;
}

.curtain-panel-right {
    right: 0;
    transform-origin: right center;
    border-left: 3px solid #D4AF37;
}

/* 3D Cylindrical Deep Velvet Drapery */
.curtain-fabric {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--curtain-base, #5B0E1B);
    background-image: 
        /* 3D Cylindrical lighting for realistic folds */
        linear-gradient(90deg,
            var(--curtain-shadow, rgba(16, 2, 4, 0.96)) 0%,
            var(--curtain-mid, rgba(72, 8, 19, 0.72)) 12%,
            var(--curtain-highlight, rgba(195, 35, 60, 0.58)) 25%,
            var(--curtain-mid, rgba(72, 8, 19, 0.72)) 38%,
            var(--curtain-shadow, rgba(16, 2, 4, 0.96)) 50%,
            var(--curtain-mid, rgba(72, 8, 19, 0.72)) 62%,
            var(--curtain-highlight, rgba(195, 35, 60, 0.58)) 75%,
            var(--curtain-mid, rgba(72, 8, 19, 0.72)) 88%,
            var(--curtain-shadow, rgba(16, 2, 4, 0.96)) 100%
        ),
        /* Satin top sheen and floor shadow */
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.18) 0%,
            transparent 22%,
            rgba(0, 0, 0, 0.35) 75%,
            rgba(0, 0, 0, 0.8) 100%
        );
    background-size: 80px 100%, 100% 100%;
}

/* Heavy Bullion Fringe along Bottom Hem */
.curtain-hem-fringe {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: repeating-linear-gradient(90deg, 
        #D4AF37 0px, 
        #FFF5D6 3px, 
        #9E723D 6px, 
        #5A4016 8px, 
        #D4AF37 10px
    );
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.8);
    border-top: 2px solid #FFF5D6;
    z-index: 2;
}

/* Card Preview Behind the Curtains */
.curtain-card-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 330px;
    max-width: 86vw;
    padding: 34px 22px;
    border-radius: 22px;
    background: #FCFAF7;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
    z-index: 4;
    opacity: 0.95;
    border: 2px solid #D4AF37;
    pointer-events: none;
    transition: transform 1.3s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.8s ease;
}

/* Center Braided Gold Rope & Royal Seal */
.curtain-tie-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 22;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* 3D Braided Golden Rope */
.curtain-gold-rope {
    position: absolute;
    width: 310px;
    max-width: 88vw;
    height: 14px;
    background: repeating-linear-gradient(45deg,
        #8C6F2D 0px,
        #D4AF37 6px,
        #FFF5D6 10px,
        #D4AF37 14px,
        #5C4516 20px
    );
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), inset 0 2px 3px rgba(255, 255, 255, 0.8);
    border: 1px solid #FFF5D6;
    pointer-events: none;
    z-index: 1;
}

/* Embossed Royal Seal Medallion Button */
.curtain-emblem-btn {
    position: relative;
    z-index: 2;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3.5px solid #FFF5D6;
    outline: none;
    cursor: pointer;
    background: radial-gradient(circle at 35% 35%, #FFF0C2 0%, #D4AF37 35%, #8C6920 80%, #4D370B 100%);
    box-shadow: 
        0 18px 45px rgba(0, 0, 0, 0.75),
        0 0 35px rgba(212, 175, 55, 0.65),
        inset 0 3px 5px rgba(255, 255, 255, 0.9),
        inset 0 -4px 6px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: sealPulseGlow 3s infinite ease-in-out;
}

.curtain-emblem-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.85), 0 0 45px rgba(212, 175, 55, 0.9);
}

@keyframes sealPulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(212, 175, 55, 0.5);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 22px 50px rgba(0, 0, 0, 0.85), 0 0 40px rgba(212, 175, 55, 0.8);
    }
}

.curtain-emblem-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Golden Bullion Tassels Swaying Below Seal */
.curtain-tassels {
    position: absolute;
    bottom: -44px;
    display: flex;
    gap: 22px;
    pointer-events: none;
}

.curtain-tassels .tassel {
    width: 16px;
    height: 46px;
    background: repeating-linear-gradient(90deg, #D4AF37 0px, #FFF5D6 3px, #8C6F2D 5px);
    border-radius: 4px 4px 8px 8px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
    transform-origin: top center;
    animation: tasselBreeze 3s infinite ease-in-out alternate;
}

.curtain-tassels .tassel-right {
    animation-delay: -1.5s;
}

@keyframes tasselBreeze {
    0% { transform: rotate(-7deg); }
    100% { transform: rotate(7deg); }
}

.curtain-sparkle {
    position: absolute;
    top: 3px;
    right: 9px;
    color: #FFFDF9;
    font-size: 19px;
    animation: sparkleGlint 2.8s infinite ease-in-out;
}

/* Pulsing Invitation Call-to-Action Pill */
.curtain-open-hint {
    margin-top: 66px;
    background: rgba(20, 14, 12, 0.94);
    border: 1.5px solid #D4AF37;
    border-radius: 50px;
    padding: 9px 24px;
    color: #FFF5D6;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 175, 55, 0.3);
    animation: ctaBreath 2.8s infinite ease-in-out;
    pointer-events: none;
    white-space: nowrap;
}

@keyframes ctaBreath {
    0%, 100% { opacity: 0.95; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

/* ==========================================================
   VELVET COLOR PALETTES (Rich 3D Cylindrical Values)
   ========================================================== */

/* 1. Royal Burgundy (عنابي مخملي ملكي) */
.curtain-burgundy {
    --curtain-base: #5B0E1B;
    --curtain-shadow: rgba(16, 2, 4, 0.96);
    --curtain-mid: rgba(72, 8, 19, 0.72);
    --curtain-highlight: rgba(195, 35, 60, 0.58);
}

/* 2. Emerald Green (أخضر زمردي فاخر) */
.curtain-emerald {
    --curtain-base: #0B3B24;
    --curtain-shadow: rgba(2, 18, 10, 0.96);
    --curtain-mid: rgba(8, 48, 28, 0.72);
    --curtain-highlight: rgba(25, 145, 78, 0.58);
}

/* 3. Royal Navy Blue (كحلي لؤلؤي ملكي) */
.curtain-navy {
    --curtain-base: #0A192F;
    --curtain-shadow: rgba(2, 6, 18, 0.96);
    --curtain-mid: rgba(10, 28, 60, 0.72);
    --curtain-highlight: rgba(30, 88, 185, 0.58);
}

/* 4. Golden Champagne (عاجي وذهب فاخر) */
.curtain-gold {
    --curtain-base: #7A5B20;
    --curtain-shadow: rgba(30, 20, 5, 0.96);
    --curtain-mid: rgba(90, 68, 24, 0.72);
    --curtain-highlight: rgba(220, 180, 75, 0.65);
}

/* 5. Imperial Black & Gold (أسود ملكي وذهب - Noir) */
.curtain-black {
    --curtain-base: #141112;
    --curtain-shadow: rgba(3, 2, 2, 0.98);
    --curtain-mid: rgba(25, 20, 22, 0.82);
    --curtain-highlight: rgba(80, 70, 74, 0.62);
}

/* ==========================================================
   OPENING & GATHERING ANIMATION SEQUENCE
   ========================================================== */

.curtain-stage.is-opening .curtain-tie-wrapper {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
    pointer-events: none;
}

.curtain-stage.is-open .curtain-panel-left {
    transform: translateX(-88%) scaleX(0.20);
}

.curtain-stage.is-open .curtain-panel-right {
    transform: translateX(88%) scaleX(0.20);
}

.curtain-stage.is-open .curtain-card-preview {
    transform: translate(-50%, -50%) scale(1.04);
    opacity: 1;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 40px rgba(212, 175, 55, 0.4);
}

.curtain-stage.is-handover .curtain-card-preview {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.15);
}
