:root {
    --teal: #087E83;
    --teal-dark: #043F43;
    --teal-deep: #062F35;
    --teal-light: #15999A;
    --gold: #D9B56F;
    --gold-light: #F5E5B8;
    --ivory: #FFF9ED;
    --ink: #17494A;
}

* {
    box-sizing: border-box;
}

/* =========================================
   MAIN PAGE LAYOUT
========================================= */

html {
    min-height: 100%;
    scroll-behavior: auto;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--ivory);
    font-family: "Cormorant Garamond", Georgia, serif;
    background: radial-gradient( ellipse at 50% 35%, rgba(21, 153, 154, 0.65), transparent 55% ), linear-gradient( 135deg, var(--teal-dark), var(--teal), var(--teal-deep) );
}

.stage {
    min-height: 100vh;
    overflow: visible;
}

.hidden {
    display: none !important;
}

/* =========================================
   CURTAIN OPENING SCENE
========================================= */

.curtain-scene {
    position: relative;
    isolation: isolate;
    perspective: 1200px;
    width: min(100%, 390px);
    height: 530px;
    flex-shrink: 0;
}

    /* =========================================
   INVITATION BEHIND THE CURTAINS
========================================= */

    .curtain-scene .invitation-paper {
        position: absolute;
        z-index: 1;
        inset: 24px 15px;
        min-width: 0;
        min-height: 0;
        padding: 12px;
        overflow: hidden;
        color: var(--ink);
        text-align: center;
        background: linear-gradient( 145deg, #FFFCF4, #F4EBDD );
        box-shadow: 0 15px 35px #001c2040;
        opacity: 0;
        visibility: hidden;
        transform: translateY(18px) scale(.97);
        transition: opacity 1s ease .45s, transform 1s ease .45s, visibility 0s linear 1.45s;
    }

    .curtain-scene.open .invitation-paper {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        transition: opacity 1s ease .45s, transform 1s ease .45s, visibility 0s;
    }

/* =========================================
   INVITATION GOLD FRAME
========================================= */

.gold-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 10px 6px;
    overflow: hidden;
    border: 1px solid #B58B43;
    outline: 1px solid #B58B43;
    outline-offset: -6px;
}

.eyebrow {
    margin: 10px 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1.6;
    text-align: center;
}

.small-label {
    margin: 10px 0;
    font-size: 10px;
    letter-spacing: 3px;
}

.couple-name {
    margin: 7px 0;
    color: var(--teal);
    font-size: clamp(36px, 9vw, 47px);
    font-weight: 500;
    line-height: 1.05;
}

.ornament {
    margin: 5px 0;
    color: #B58B43;
    font-size: 26px;
}

.invitation-message {
    max-width: 250px;
    margin: 12px auto;
    font-size: 16px;
    line-height: 1.5;
}

.gold-line {
    width: 65%;
    height: 1px;
    margin: 8px auto;
    background: #B58B43;
}

.wedding-date {
    margin: 7px 0;
    font-size: 17px;
    font-weight: 600;
}

.wedding-time {
    margin: 3px 0;
    font-size: 15px;
}

.venue {
    margin: 8px 0;
    color: #075B46;
    font-size: 19px;
    font-weight: 600;
}

.footer-note {
    margin-top: 12px;
    font-size: 8px;
    letter-spacing: 1.5px;
}

/* =========================================
   CURTAIN PANELS
========================================= */

.curtain-panel {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    background: repeating-linear-gradient( 90deg, rgba(0, 0, 0, .18) 0, rgba(0, 0, 0, .18) 4px, rgba(255, 255, 255, .07) 12px, transparent 24px, rgba(0, 0, 0, .14) 34px ), linear-gradient( 90deg, #032F32, #087E83 24%, #07595D 48%, #15999A 70%, #043F43 );
    box-shadow: inset 0 0 35px rgba(0, 0, 0, .35), 0 0 20px rgba(0, 0, 0, .15);
    transition: transform 1.8s cubic-bezier(.65, 0, .35, 1);
}

.curtain-left {
    left: 0;
    border-right: 2px solid var(--gold);
    transform: translateX(0);
    transform-origin: left center;
}

.curtain-right {
    right: 0;
    border-left: 2px solid var(--gold);
    transform: translateX(0);
    transform-origin: right center;
}

.curtain-decoration {
    position: absolute;
    top: 12px;
    bottom: 12px;
    width: 85%;
    border-top: 1px solid rgba(245, 229, 184, .75);
    border-bottom: 1px solid rgba(245, 229, 184, .75);
    pointer-events: none;
}

.curtain-left .curtain-decoration {
    left: 8px;
    border-left: 1px solid rgba(245, 229, 184, .5);
}

.curtain-right .curtain-decoration {
    right: 8px;
    border-right: 1px solid rgba(245, 229, 184, .5);
}

.curtain-panel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12%;
    width: 20%;
    background: linear-gradient( 90deg, transparent, rgba(245, 229, 184, .08), transparent );
    pointer-events: none;
}

/* =========================================
   CENTER GOLD OPEN BUTTON
========================================= */

.seal {
    position: absolute;
    z-index: 5;
    top: 215px;
    left: 50%;
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border: 2px solid var(--gold-light);
    border-radius: 50%;
    background: radial-gradient( circle at 35% 30%, #FFF0BE, #D9B56F 55%, #98712F );
    color: #07516A;
    font-family: inherit;
    font-size: 29px;
    cursor: pointer;
    transform: translateX(-50%);
    box-shadow: 0 5px 20px #001c2060, 0 0 24px #D9B56F35;
    transition: opacity .4s ease, filter .3s ease;
}

.curtain-open-button {
    width: 72px;
    height: 72px;
    color: #063F43;
    box-shadow: 0 0 0 7px rgba(217, 181, 111, .15), 0 5px 25px rgba(0, 0, 0, .4), 0 0 25px rgba(245, 229, 184, .2);
    animation: sealGlow 2s ease-in-out infinite;
}

.seal:hover {
    filter: brightness(1.08);
}

.seal:focus-visible {
    outline: 3px solid var(--ivory);
    outline-offset: 5px;
}

.open-hint {
    position: absolute;
    z-index: 6;
    top: 300px;
    left: 0;
    width: 100%;
    padding: 0 8px;
    color: var(--gold-light);
    font-size: 11px;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 0 2px 6px #001c20;
    pointer-events: none;
    transition: opacity .4s ease;
}

/* =========================================
   OPENING ANIMATION
========================================= */

.curtain-scene.open .curtain-left {
    transform: translateX(-100%);
}

.curtain-scene.open .curtain-right {
    transform: translateX(100%);
}

.curtain-scene.open .curtain-open-button,
.curtain-scene.open .open-hint {
    opacity: 0;
    pointer-events: none;
}

.curtain-scene.open .curtain-open-button {
    animation: none;
}

@keyframes sealGlow {
    0%, 100% {
        box-shadow: 0 0 0 7px rgba(217, 181, 111, .12), 0 5px 25px rgba(0, 0, 0, .4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(217, 181, 111, .08), 0 5px 30px rgba(0, 0, 0, .4), 0 0 25px rgba(245, 229, 184, .25);
    }
}

/* =========================================
   WEDDING DETAILS
========================================= */

.details {
    width: min(100%, 440px);
    padding: 26px 10px;
    text-align: center;
    flex-shrink: 0;
    animation: appear 1.2s ease both;
}

    .details.hidden {
        display: none !important;
    }

    .details .eyebrow {
        display: block;
        position: relative;
        z-index: 2;
        width: 100%;
        margin: 12px 0 18px;
        color: var(--gold-light);
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 3px;
        line-height: 1.8;
        opacity: 1;
        visibility: visible;
    }

    .details h2 {
        color: var(--gold-light);
        font-size: clamp(26px, 6vw, 32px);
        font-weight: 500;
        line-height: 1.2;
    }

.details-intro {
    color: #E4F3EE;
    font-size: 17px;
    line-height: 1.6;
}

/* =========================================
   COUPLE PHOTO IN INVITATION
========================================= */

.couple-photo-frame {
    width: 115px;
    height: 115px;
    margin: 8px auto;
    padding: 4px;
    border: 2px solid #B58B43;
    border-radius: 50%;
    background: linear-gradient( 135deg, #F5E5B8, #D9B56F, #98712F );
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
    overflow: hidden;
    flex-shrink: 0;
}

.couple-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* =========================================
   COUPLE PHOTO IN DETAILS
========================================= */

.details-couple-photo {
    width: min(100%, 320px);
    aspect-ratio: 4 / 5;
    margin: 24px auto;
    padding: 5px;
    border: 1px solid var(--gold);
    border-radius: 160px 160px 12px 12px;
    background: var(--gold);
    overflow: hidden;
    box-shadow: 0 12px 30px #001c2040;
}

    .details-couple-photo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: inherit;
    }

/* =========================================
   COUNTDOWN
========================================= */

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 26px 0;
}

.countdown-item {
    padding: 12px 3px;
    border: 1px solid var(--gold);
    border-radius: 8px;
    background: linear-gradient( 145deg, #087E8330, #043F4340 );
}

    .countdown-item strong,
    .countdown-item span {
        display: block;
    }

    .countdown-item strong {
        color: var(--gold-light);
        font-size: clamp(22px, 6vw, 29px);
    }

    .countdown-item span {
        color: #E6F2E9;
        font-size: 14px;
    }

.countdown-message {
    color: var(--gold-light);
    line-height: 1.5;
}

/* =========================================
   VENUE CARD
========================================= */

.venue-card {
    margin: 26px 0;
    padding: 20px 14px;
    border: 1px solid #D9B56F;
    border-radius: 12px;
    background: linear-gradient( 145deg, #087E8328, #043F4340 );
}

    .venue-card h3 {
        margin: 8px 0;
        color: var(--gold-light);
        font-size: 27px;
        font-weight: 500;
    }

    .venue-card p {
        line-height: 1.6;
    }

/* =========================================
   BUTTONS
========================================= */

.gold-button,
.music-button {
    display: inline-block;
    margin: 8px 4px;
    padding: 12px 20px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease;
}

.gold-button {
    color: #063C40;
    border: 1px solid var(--gold-light);
    background: linear-gradient( 120deg, #F5E5B8, #D9B56F, #B58B43 );
}

.music-button {
    color: var(--gold-light);
    border: 1px solid var(--gold);
    background: #087E8330;
}

    .gold-button:hover,
    .music-button:hover {
        transform: translateY(-2px);
    }

    .gold-button:focus-visible,
    .music-button:focus-visible {
        outline: 2px solid var(--ivory);
        outline-offset: 3px;
    }

.music-note {
    color: #D8EAE5;
    font-size: 14px;
}

/* =========================================
   CLOSING MESSAGE
========================================= */

.closing-ornament {
    margin-top: 25px;
    color: var(--gold);
    font-size: 26px;
}

.closing {
    color: var(--gold-light);
    font-size: 22px;
    line-height: 1.5;
}

.signature {
    font-size: 20px;
    font-style: italic;
}

/* =========================================
   FALLING PETALS
========================================= */

.petal-layer {
    position: fixed;
    inset: 0;
    z-index: 10;
    overflow: hidden;
    pointer-events: none;
}

.petal {
    position: absolute;
    top: -35px;
    color: #B7E8DA;
    opacity: .85;
    animation: fall linear forwards;
    filter: drop-shadow(0 0 5px #B7E8DA30);
}

@keyframes fall {
    to {
        transform: translate3d( var(--drift), 110vh, 0 ) rotate(720deg);
        opacity: .15;
    }
}

/* =========================================
   DETAILS APPEAR ANIMATION
========================================= */

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   INVITATION FITS INSIDE THE CURTAINS
========================================= */

.curtain-scene .invitation-paper {
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.curtain-scene .gold-frame {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 10px 6px;
    justify-content: space-evenly;
}

.curtain-scene .eyebrow {
    margin: 3px 0;
    font-size: 10px;
    letter-spacing: 1.5px;
    line-height: 1.3;
}

.curtain-scene .small-label {
    margin: 4px 0;
    font-size: 9px;
    letter-spacing: 2px;
}

.curtain-scene .couple-name {
    margin: 3px 0;
    font-size: clamp(27px, 7vw, 37px);
    line-height: 1;
}

.curtain-scene .ornament {
    margin: 2px 0;
    font-size: 20px;
    line-height: 1.1;
}

.curtain-scene .couple-photo-frame {
    width: 82px;
    height: 82px;
    margin: 4px auto;
    padding: 3px;
    flex-shrink: 0;
}

.curtain-scene .invitation-message {
    max-width: 240px;
    margin: 5px auto;
    font-size: 13px;
    line-height: 1.25;
}

.curtain-scene .gold-line {
    margin: 4px auto;
}

.curtain-scene .wedding-date {
    margin: 3px 0;
    font-size: 14px;
    line-height: 1.2;
}

.curtain-scene .wedding-time {
    margin: 2px 0;
    font-size: 13px;
}

.curtain-scene .venue {
    margin: 4px 0;
    font-size: 16px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.curtain-scene .footer-note {
    margin: 4px 0 0;
    font-size: 7px;
    letter-spacing: 1px;
    line-height: 1.2;
}

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */

@media (max-width: 420px) {

    .stage {
        padding: 24px 14px;
    }

    .curtain-scene {
        width: 100%;
        max-width: 360px;
        height: 490px;
    }

        .curtain-scene .invitation-paper {
            inset: 12px 8px;
            padding: 7px;
        }

        .curtain-scene .gold-frame {
            padding: 8px 5px;
        }

        .curtain-scene .couple-name {
            font-size: clamp(25px, 7.5vw, 32px);
        }

        .curtain-scene .couple-photo-frame {
            width: 72px;
            height: 72px;
        }

        .curtain-scene .invitation-message {
            font-size: 12px;
        }

        .curtain-scene .wedding-date {
            font-size: 13px;
        }

        .curtain-scene .venue {
            font-size: 14px;
        }

    .curtain-open-button {
        top: 200px;
    }

    .curtain-scene .open-hint {
        top: 285px;
        font-size: 10px;
    }

    .countdown {
        gap: 5px;
    }

    .countdown-item {
        padding: 10px 2px;
    }
}

/* =========================================
   ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================
   DESKTOP RESPONSIVE LAYOUT
   Keep existing mobile layout unchanged
========================================= */

@media (min-width: 768px) {

    /* Center the invitation on the screen */
    .stage {
        width: 100%;
        min-height: 100vh;
        padding: 40px 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
    }

    /* Larger opening invitation */
    .curtain-scene {
        width: min(100%, 480px);
        height: 620px;
        flex-shrink: 0;
    }

        /* Give the invitation more space */
        .curtain-scene .invitation-paper {
            inset: 24px 20px;
            padding: 16px;
        }

        .curtain-scene .gold-frame {
            padding: 18px 12px;
        }

        .curtain-scene .eyebrow {
            font-size: 12px;
            letter-spacing: 2px;
            margin: 8px 0;
        }

        .curtain-scene .small-label {
            font-size: 11px;
            margin: 8px 0;
        }

        .curtain-scene .couple-name {
            font-size: clamp(36px, 4vw, 48px);
            margin: 5px 0;
        }

        .curtain-scene .ornament {
            font-size: 26px;
            margin: 5px 0;
        }

        .curtain-scene .couple-photo-frame {
            width: 110px;
            height: 110px;
            margin: 8px auto;
            padding: 4px;
        }

        .curtain-scene .invitation-message {
            max-width: 300px;
            font-size: 16px;
            line-height: 1.5;
            margin: 10px auto;
        }

        .curtain-scene .wedding-date {
            font-size: 17px;
            margin: 6px 0;
        }

        .curtain-scene .wedding-time {
            font-size: 15px;
        }

        .curtain-scene .venue {
            font-size: 19px;
            margin: 8px 0;
        }

        .curtain-scene .footer-note {
            font-size: 9px;
            letter-spacing: 1.5px;
            margin-top: 8px;
        }

    /* Center the seal on the larger curtain */
    .curtain-open-button {
        top: 50%;
        width: 78px;
        height: 78px;
        transform: translate(-50%, -50%);
    }

    .curtain-scene .open-hint {
        top: calc(50% + 60px);
        font-size: 12px;
    }

    /* Wider wedding details on desktop */
    .details {
        width: min(100%, 680px);
        padding: 40px 30px;
        margin: 0 auto;
    }

        .details h2 {
            font-size: 38px;
            margin: 18px 0;
        }

    .details-intro {
        max-width: 520px;
        margin: 0 auto;
        font-size: 19px;
    }

    /* Larger couple photograph */
    .details-couple-photo {
        width: min(100%, 360px);
        margin: 30px auto;
    }

    /* Spacious countdown */
    .countdown {
        max-width: 560px;
        margin: 32px auto;
        gap: 16px;
    }

    .countdown-item {
        padding: 20px 10px;
    }

        .countdown-item strong {
            font-size: 36px;
        }

        .countdown-item span {
            font-size: 16px;
        }

    /* Wider venue card */
    .venue-card {
        max-width: 540px;
        margin: 32px auto;
        padding: 30px 24px;
    }

        .venue-card h3 {
            font-size: 32px;
        }

        .venue-card p {
            font-size: 17px;
        }

    .gold-button {
        padding: 14px 26px;
        font-size: 17px;
    }

    .closing {
        font-size: 25px;
    }

    .signature {
        font-size: 23px;
    }
}

/* =========================================
   LARGE DESKTOP SCREENS
========================================= */

@media (min-width: 1200px) {

    .stage {
        padding: 50px 24px;
        gap: 40px;
    }

    .curtain-scene {
        width: 500px;
        height: 650px;
    }

        .curtain-scene .invitation-paper {
            inset: 26px 22px;
        }

    .curtain-open-button {
        width: 82px;
        height: 82px;
    }

    .details {
        width: min(100%, 760px);
        padding: 45px 36px;
    }

        .details h2 {
            font-size: 42px;
        }

    .details-couple-photo {
        width: 380px;
    }

    .countdown {
        max-width: 600px;
        gap: 20px;
    }

    .countdown-item {
        padding: 24px 12px;
    }

        .countdown-item strong {
            font-size: 40px;
        }

    .venue-card {
        max-width: 580px;
        padding: 34px;
    }
}

/* =========================================
   WEDDING COUPLE PORTRAIT
   Portrait photo + double gold frame
========================================= */

.wedding-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 28px auto 10px;
    color: var(--gold-light);
}

.wedding-emblem::before,
.wedding-emblem::after {
    content: "";
    display: block;
    width: clamp(28px, 10vw, 70px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.wedding-emblem::after {
    transform: scaleX(-1);
}

.wedding-emblem-symbol {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-light);
    font-size: 36px;
    font-weight: 500;
    line-height: 1;
    text-shadow: 0 0 16px rgba(245, 229, 184, .25);
    box-shadow: 0 0 0 5px rgba(217, 181, 111, .10), inset 0 0 18px rgba(217, 181, 111, .08);
}

.wedding-emblem-label {
    margin: 0 auto 18px;
    color: var(--gold-light);
    font-size: 11px;
    letter-spacing: 3px;
    text-align: center;
}

.wedding-photo-composition {
    position: relative;
    isolation: isolate;
    width: min(100%, 520px);
    height: 460px;
    margin: 28px auto 20px;
    padding: 12px;
    box-sizing: border-box;
}

/* Outer gold frame */
.wedding-photo-composition::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid var(--gold);
    border-radius: 24px;
    pointer-events: none;
}

/* Inner gold detail */
.wedding-photo-composition::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid var(--gold-light);
    border-radius: 18px;
    pointer-events: none;
}

.wedding-portrait-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 78%;
    height: 90%;
    padding: 7px;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    border: 4px solid var(--gold);
    border-radius: 180px 180px 18px 18px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), #98712F);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    overflow: hidden;
}

.wedding-main-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    opacity: 1;
    filter: none;
}

.photo-caption {
    margin: 18px 0 6px;
    color: var(--gold-light);
    font-size: 27px;
    font-weight: 500;
    text-align: center;
}

.photo-description {
    max-width: 420px;
    margin: 0 auto 25px;
    padding: 0 10px;
    color: #E4F3EE;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

/* Gentle emphasis for the wedding countdown without distracting from the portrait */
.countdown-item strong {
    text-shadow: 0 0 12px rgba(245, 229, 184, .18);
    transition: text-shadow .25s ease;
}

@media (min-width: 768px) {
    .wedding-emblem-symbol {
        width: 76px;
        height: 76px;
        font-size: 43px;
    }

    .wedding-photo-composition {
        width: min(100%, 600px);
        height: 500px;
    }

    .wedding-portrait-frame {
        width: 72%;
        height: 90%;
    }
}

@media (max-width: 420px) {
    .wedding-emblem {
        margin-top: 22px;
    }

    .wedding-emblem-symbol {
        width: 58px;
        height: 58px;
        font-size: 32px;
    }

    .wedding-emblem-label {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .wedding-photo-composition {
        width: 100%;
        height: 380px;
        margin: 22px auto 15px;
        padding: 8px;
    }

    .wedding-photo-composition::before {
        border-radius: 20px;
    }

    .wedding-photo-composition::after {
        inset: 6px;
        border-radius: 15px;
    }

    .wedding-portrait-frame {
        width: 84%;
        height: 88%;
        padding: 5px;
        border-width: 3px;
        border-radius: 140px 140px 14px 14px;
    }

    .photo-caption {
        font-size: 23px;
    }

    .photo-description {
        font-size: 15px;
    }
}


/* Wedding invitation template refinements */
.wedding-emblem-label {
    text-transform: uppercase;
}
.venue-card .small-label {
    color: var(--gold-light);
    line-height: 1.7;
}
.venue-card .gold-button {
    margin-top: 12px;
}
.closing {
    color: var(--gold-light);
    font-size: 18px;
    line-height: 1.6;
}
.signature {
    color: var(--ivory);
    font-size: 21px;
    line-height: 1.5;
}


/* Seven-second opening countdown badge */
.opening-countdown {
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    z-index: 30;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d4af62;
    border-radius: 50%;
    background: rgba(18, 61, 59, 0.94);
    color: #f4d88e;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22), inset 0 0 0 3px rgba(212, 175, 98, 0.18);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.opening-countdown.finished {
    opacity: 0;
    transform: scale(0.82);
}
@media (max-width: 480px) {
    .opening-countdown { width: 42px; height: 42px; font-size: 22px; }
}


/* Invitation letter and closing invitation cards */
.invitation-letter-card,
.please-join-card {
    max-width: 540px;
    margin: 24px auto;
}
.invitation-letter-text {
    margin: 22px auto 4px;
    padding: 20px 18px;
    border: 1px solid rgba(217, 181, 111, 0.65);
    border-radius: 10px;
    background: rgba(2, 45, 47, 0.38);
    color: var(--ivory);
    text-align: left;
    line-height: 1.8;
}
.invitation-letter-text p {
    margin: 0 0 12px;
}
.invitation-letter-text .letter-signature {
    margin-top: 18px;
    color: var(--gold-light);
    text-align: right;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 21px;
}
@media (max-width: 480px) {
    .invitation-letter-text { padding: 16px 13px; }
}



/* =========================================================
   FINAL HEADER, FOOTER AND RESPONSIVE LAYOUT FIXES
   ========================================================= */

/* Brand: small, unobtrusive, fixed to the upper-left */
.site-header {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    z-index: 2000;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.site-brand {
    display: inline-block;
    color: var(--ivory);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .3px;
    line-height: 1.2;
    text-decoration: none;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}

.site-brand:hover,
.site-brand:focus {
    color: var(--ivory);
}

/* Footer: centered at the bottom, in gold */
.site-footer {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 12px max(14px, env(safe-area-inset-bottom));
    clear: both;
    text-align: center;
    color: var(--gold-light);
    background: transparent;
    border: 0;
    box-sizing: border-box;
}

.site-footer-text {
    width: 100%;
    margin: 0 auto;
    color: var(--gold-light);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    line-height: 1.4;
    text-align: center;
}

/* Global overflow and sizing protection for phones/tablets */
html {
    width: 100%;
    min-height: 100%;
    overflow-x: clip;
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: clip;
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: 64px 14px 28px;
    gap: 20px;
}

.curtain-scene {
    width: min(100%, 390px);
    max-width: 100%;
    height: clamp(440px, 72svh, 530px);
    min-width: 0;
    margin: 0 auto;
}

.curtain-scene .invitation-paper {
    inset: 12px 9px;
    min-width: 0;
    min-height: 0;
}

.details {
    display: block;
    width: min(100%, 680px);
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: 28px 12px;
    overflow-wrap: anywhere;
}

.details.hidden {
    display: none !important;
}

.details img,
.invitation-letter-image img {
    max-width: 100%;
    height: auto;
}

.wedding-photo-composition {
    width: min(100%, 600px);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.wedding-portrait-frame {
    max-width: 100%;
}

.venue-card,
.invitation-letter-card,
.please-join-card {
    width: 100%;
    max-width: 540px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
}

.countdown {
    width: 100%;
    max-width: 560px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-left: auto;
    margin-right: auto;
}

.countdown-item {
    min-width: 0;
}

.gold-button {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Compact phone screens */
@media (max-width: 600px) {
    .stage {
        justify-content: flex-start;
        padding: 58px 10px 20px;
        gap: 14px;
    }

    .curtain-scene {
        width: 100%;
        max-width: 360px;
        height: clamp(430px, 70svh, 500px);
    }

    .curtain-scene .invitation-paper {
        inset: 10px 7px;
        padding: 6px;
    }

    .curtain-scene .gold-frame {
        padding: 7px 5px;
    }

    .curtain-scene .eyebrow {
        font-size: clamp(8px, 2.5vw, 10px);
        letter-spacing: 1.2px;
    }

    .curtain-scene .small-label {
        font-size: 8px;
        letter-spacing: 1.3px;
    }

    .curtain-scene .couple-name {
        font-size: clamp(25px, 7.5vw, 32px);
    }

    .curtain-scene .couple-photo-frame {
        width: clamp(62px, 19vw, 76px);
        height: clamp(62px, 19vw, 76px);
    }

    .curtain-scene .invitation-message {
        max-width: 92%;
        font-size: 12px;
        line-height: 1.25;
    }

    .curtain-scene .wedding-date {
        font-size: 13px;
    }

    .curtain-scene .venue {
        max-width: 95%;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .curtain-open-button {
        top: 50%;
        width: 60px;
        height: 60px;
        transform: translate(-50%, -50%);
    }

    .curtain-scene .open-hint {
        top: calc(50% + 48px);
        max-width: 90%;
        font-size: 9px;
        text-align: center;
    }

    .opening-countdown {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .details {
        padding: 22px 8px;
    }

    .details h2 {
        font-size: clamp(24px, 7vw, 31px);
        line-height: 1.2;
    }

    .details-intro {
        font-size: 15px;
        line-height: 1.55;
    }

    .wedding-photo-composition {
        width: 100%;
        height: clamp(300px, 105vw, 380px);
        padding: 7px;
    }

    .wedding-portrait-frame {
        width: 88%;
        height: 88%;
    }

    .countdown {
        gap: 5px;
    }

    .countdown-item {
        padding: 9px 2px;
    }

    .countdown-item strong {
        font-size: clamp(19px, 6vw, 25px);
    }

    .countdown-item span {
        font-size: 11px;
    }

    .venue-card,
    .invitation-letter-card,
    .please-join-card {
        padding: 20px 14px;
        margin-top: 18px;
        margin-bottom: 18px;
    }

    .venue-card h3 {
        font-size: 24px;
    }

    .venue-card p {
        font-size: 15px;
        line-height: 1.5;
    }

    .closing {
        padding: 0 8px;
        font-size: 16px;
    }

    .signature {
        font-size: 19px;
    }

    .site-brand {
        font-size: 14px;
    }

    .site-footer {
        padding-top: 10px;
    }

    .site-footer-text {
        font-size: 14px;
    }
}

/* Very narrow phones */
@media (max-width: 360px) {
    .stage {
        padding-left: 7px;
        padding-right: 7px;
    }

    .curtain-scene {
        height: 435px;
    }

    .countdown {
        gap: 3px;
    }

    .countdown-item strong {
        font-size: 18px;
    }

    .countdown-item span {
        font-size: 10px;
    }

    .site-header {
        left: 9px;
    }
}

/* Short landscape phone screens */
@media (max-height: 520px) and (max-width: 900px) {
    .stage {
        justify-content: flex-start;
        padding-top: 54px;
    }

    .curtain-scene {
        height: 410px;
    }
}
