@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Great+Vibes&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap");

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    margin: 0;
    padding: 0;
    background: #737b57;
}

:root {
    --dy-shell-max: 72rem;
    --dy-content-max: 42rem;
    --dy-section-inline: clamp(1rem, 4vw, 2rem);
}

body.dy-invite {
    margin: 0;
    padding: 0;
    font-family: "Lora", Georgia, serif;
    color: #3a3f32;
    background: #f4efe7;
    line-height: 1.55;
    width: 100%;
    overflow-x: clip;
}

#top {
    width: 100%;
    overflow-x: clip;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

body.dy-scroll-lock {
    overflow: hidden;
}

body.dy-scroll-lock > *:not(#invitation-envelope-overlay):not(#invitation-banquet-overlay) {
    pointer-events: none;
}

.theme-night {
    color-scheme: dark;
}

#invitation-banquet-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.55s ease, visibility 0.55s ease;
    z-index: 999998;
    background: #0a0f18;
}

/* Envelope intro page: hide the real site until the intro completes */
html.dy-envelope-intro,
html.dy-envelope-intro body {
    height: 100%;
    overflow: hidden;
    background: #f4efe7;
}

html.dy-envelope-intro body#top > *:not(#invitation-envelope-overlay) {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* First paint before JS: hide envelope when localStorage says intro was already completed
   (see home.blade.php head script + app.js ENVELOPE_SKIP_IF_ALREADY_SEEN). */
html.dy-envelope-skipped-first-paint #invitation-envelope-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Full-screen fixed shell: must not use height:auto with only out-of-flow children — the box
   collapses (~0), overflow:hidden clips taps. Viewport units track Safari chrome without JS. */
#invitation-envelope-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #000;
    overflow: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: auto;
    cursor: pointer;
    touch-action: manipulation;
}

#invitation-envelope-overlay::before,
#invitation-envelope-overlay::after {
    content: none;
}

/* Catches taps on mobile when nested media uses pointer-events:none (WebKit hit-testing). */
#invitation-envelope-overlay .envelope-intro-tap-catcher {
    position: absolute;
    inset: 0;
    z-index: 2147483646;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: auto;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#invitation-envelope-overlay.is-video-playing .envelope-intro-tap-catcher {
    pointer-events: none;
}

#invitation-envelope-overlay.is-hidden,
#invitation-banquet-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* legacy butterfly visuals removed from opener */
.dy-butterfly-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

.dy-butterfly-layer--behind {
    z-index: 12;
}

.dy-butterfly-layer--front {
    z-index: 55;
}

.dy-butterfly {
    position: absolute;
    width: 26px;
    height: 26px;
    opacity: 0;
    will-change: transform, opacity, filter;
}

.dy-butterfly-inner {
    width: 100%;
    height: 100%;
    animation: dyButterflyFloat 0.6s ease-in-out infinite alternate;
}

.dy-butterfly svg {
    width: 100%;
    height: 100%;
    display: block;
}

.dy-butterfly-svg .wing-left,
.dy-butterfly-svg .wing-right {
    transform-box: fill-box;
}

.dy-butterfly-svg .wing-left {
    transform-origin: 100% 50%;
    animation: dyWingLeft 0.2s ease-in-out infinite alternate;
}

.dy-butterfly-svg .wing-right {
    transform-origin: 0% 50%;
    animation: dyWingRight 0.2s ease-in-out infinite alternate;
}

.dy-butterfly--hero .dy-butterfly-inner {
    animation-duration: 0.46s;
}

.dy-butterfly--hero .dy-butterfly-svg .wing-left,
.dy-butterfly--hero .dy-butterfly-svg .wing-right {
    animation-duration: 0.16s;
}

@keyframes dyWingLeft {
    from { transform: scaleX(1) rotate(-3deg); }
    to { transform: scaleX(0.62) rotate(6deg); }
}

@keyframes dyWingRight {
    from { transform: scaleX(1) rotate(3deg); }
    to { transform: scaleX(0.62) rotate(-6deg); }
}

@keyframes dyButterflyFloat {
    from { transform: translateY(0px) rotate(-1.5deg); }
    to { transform: translateY(-3px) rotate(1.5deg); }
}

body.dy-site-entering #top > *:not(#invitation-envelope-overlay):not(#invitation-banquet-overlay) {
    animation: dySiteFadeIn 1.65s cubic-bezier(0.22, 1, 0.36, 1) both;
    pointer-events: auto;
}

/* Opener acts as a mask only; disable site fade treatment. */
body.dy-site-entering #top > *:not(#invitation-envelope-overlay):not(#invitation-banquet-overlay) {
    animation: none;
    filter: none;
    opacity: 1;
    transform: none;
}

@keyframes dySiteFadeIn {
    from {
        opacity: 0.12;
        filter: blur(3px);
        transform: translateY(22px) scale(1.015);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

.dy-banquet-bg {
    position: absolute;
    inset: 0;
    background: url("../undangan/images/welcome-venue-hero.png") center 35% / cover no-repeat;
    filter: saturate(1.05);
}

.dy-banquet-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 12, 22, 0.38) 0%,
        rgba(8, 12, 22, 0.12) 40%,
        rgba(8, 12, 22, 0.55) 100%
    );
}

.theme-day .dy-banquet-bg::after {
    background: linear-gradient(
        180deg,
        rgba(255, 252, 245, 0.28) 0%,
        rgba(255, 250, 235, 0.1) 45%,
        rgba(45, 48, 40, 0.38) 100%
    );
}

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

.dy-stars span {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 248, 220, 0.95);
    box-shadow: 0 0 4px rgba(255, 240, 200, 0.85);
    animation: dyTwinkle 3.2s ease-in-out infinite;
}

.theme-day .dy-stars {
    opacity: 0.2;
}

@keyframes dyTwinkle {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.dy-banquet-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    max-width: 22rem;
    margin: auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dy-eyebrow {
    font-size: clamp(0.62rem, 2.6vw, 0.74rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255, 252, 245, 0.92);
    margin: 0 0 0.75rem;
}

.dy-script-title {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: clamp(2.75rem, 11vw, 4.25rem);
    line-height: 1.05;
    color: #fffef8;
    margin: 0 0 0.5rem;
    text-shadow: 0 4px 36px rgba(0, 0, 0, 0.45);
}

.dy-datecaps {
    font-size: clamp(0.78rem, 2.8vw, 0.92rem);
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(255, 250, 240, 0.9);
    margin: 0 0 2rem;
}

.dy-btn-pill {
    font-family: "Lora", serif;
    font-size: 0.7rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #fffef8;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    padding: 0.95rem 2rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.dy-btn-pill:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Fixed chrome */
.dy-daynight {
    position: fixed;
    top: max(clamp(0.65rem, 3vw, 1.1rem), env(safe-area-inset-top));
    right: max(clamp(0.65rem, 3vw, 1.1rem), env(safe-area-inset-right));
    z-index: 999990;
    display: flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(20, 22, 28, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.theme-day .dy-daynight {
    background: rgba(255, 252, 245, 0.78);
    border-color: rgba(60, 55, 48, 0.12);
}

.dy-daynight button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 250, 240, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-day .dy-daynight button {
    color: rgba(50, 48, 42, 0.4);
}

.dy-daynight button.is-active {
    background: rgba(255, 255, 255, 0.2);
    color: #fffef8;
}

.theme-day .dy-daynight button.is-active {
    background: rgba(125, 139, 94, 0.38);
    color: #2a2f22;
}

.dy-audio-wrap {
    position: fixed;
    right: max(clamp(0.65rem, 3vw, 1.1rem), env(safe-area-inset-right));
    bottom: max(clamp(0.85rem, 4vh, 1.75rem), env(safe-area-inset-bottom));
    z-index: 999990;
}

.dy-audio-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(20, 22, 28, 0.55);
    color: #fffef8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.theme-day .dy-audio-fab {
    background: rgba(255, 252, 245, 0.9);
    color: #3a3f32;
    border-color: rgba(60, 55, 48, 0.14);
}

/* Sticky section nav */
.dy-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(232, 230, 220, 0.92);
    border-bottom: 1px solid rgba(92, 99, 69, 0.12);
    backdrop-filter: blur(10px);
}

.dy-nav::-webkit-scrollbar {
    display: none;
}

.dy-nav a {
    flex: 0 0 auto;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: #7a6a58;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(92, 99, 69, 0.15);
    background: rgba(255, 255, 255, 0.55);
}

.dy-nav a:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* Hero */
.dy-hero {
    position: relative;
    --dy-hero-shift: 0px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: max(0.4rem, env(safe-area-inset-top)) var(--dy-section-inline) calc(4.5rem + env(safe-area-inset-bottom));
    color: #fffef8;
    text-align: center;
}

.dy-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.dy-hero-bg::before,
.dy-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: translate3d(0, calc(var(--dy-hero-shift) * -0.38), 0) scale(1.035);
    transition: opacity 1.2s ease;
    will-change: opacity;
}

.dy-hero-bg::before {
    opacity: 1;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%),
        url("../undangan/images/welcome-venue-hero.png");
}

.theme-day .dy-hero-bg::after {
    opacity: 1;
}

.dy-hero-bg::after {
    opacity: 0;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(40, 42, 36, 0.3) 100%),
        url("../undangan/images/welcome-venue-day.png");
}

.theme-day .dy-hero-bg::before {
    opacity: 0;
}

.dy-hero-content {
    position: relative;
    z-index: 1;
    max-width: 28rem;
    margin: 0 auto;
    transform: translate3d(0, calc(var(--dy-hero-shift) * 0.08), 0);
    transition: transform 120ms linear;
}

.dy-hero .dy-script-title {
    margin-bottom: 0.35rem;
}

.dy-hero .dy-eyebrow {
    color: rgba(255, 252, 245, 0.95);
}

.theme-day .dy-hero .dy-eyebrow,
.theme-day .dy-hero .dy-datecaps,
.theme-day .dy-hero .dy-script-title {
    color: #fffef8;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.dy-hero-scroll {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.62rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 252, 245, 0.75);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 252, 245, 0.35);
}

.theme-day .dy-hero-scroll {
    color: rgba(30, 34, 24, 0.65);
    border-bottom-color: rgba(30, 34, 24, 0.25);
}

/* Countdown band */
.dy-countdown-wrap {
    background: linear-gradient(180deg, #cbb9a0 0%, #af9a7f 100%);
    color: #f2f0e6;
    text-align: center;
    padding: clamp(2rem, 5vw, 2.75rem) var(--dy-section-inline);
}

.dy-countdown-logo {
    width: clamp(110px, 30vw, 190px);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0.75rem;
    background: transparent;
}

.dy-mono {
    font-family: "Great Vibes", cursive;
    font-size: clamp(2.5rem, 12vw, 3.75rem);
    line-height: 1;
    margin-bottom: 0.25rem;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.06em;
}

.dy-mono .dy-monogram-dot {
    font-size: 0.42em;
    font-family: "Lora", serif;
    font-weight: 300;
    opacity: 0.88;
    padding: 0 0.02em;
}

.dy-countdown-title {
    font-family: "Great Vibes", cursive;
    font-size: clamp(1.6rem, 5vw, 2rem);
    margin: 0.15rem 0;
}

.dy-countdown-sub {
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    opacity: 0.75;
    margin: 0 0 1.5rem;
}

.dy-countdown {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(0.65rem, 3vw, 1.25rem);
}

.dy-countdown .unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dy-countdown .num {
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 300;
    line-height: 1.1;
}

.dy-countdown .lbl {
    font-size: 0.55rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 0.35rem;
}

/* Sections */
.dy-section {
    padding: clamp(2rem, 6vw, 3rem) var(--dy-section-inline);
    max-width: var(--dy-content-max);
    margin: 0 auto;
}

.dy-section--alt {
    background: #f3eee6;
}

.dy-scroll-picture {
    margin: 0;
    padding: 0;
    background: #f3eee6;
}

.dy-scroll-picture__img {
    height: clamp(320px, 62vw, 620px);
    background: url("./scroll-scene-1.png") center 46% / contain no-repeat;
}

@media (min-width: 900px) {
    .dy-scroll-picture__img {
        background-attachment: fixed;
    }
}

.dy-section-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: rgba(58, 63, 50, 0.65);
    text-align: center;
    margin: 0 0 0.35rem;
}

.dy-section-title {
    font-family: "Great Vibes", cursive;
    font-size: clamp(2.2rem, 8vw, 2.85rem);
    text-align: center;
    color: #7a6a58;
    margin: 0 0 1.25rem;
    line-height: 1.1;
}

.dy-order-logo {
    display: block;
    width: min(100%, 420px);
    margin: 0 auto 0.45rem;
}

.dy-prose {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.65;
}

.dy-prose h3 {
    font-family: "Lora", serif;
    font-size: 1.05rem;
    color: #7a6a58;
    margin: 1.5rem 0 0.5rem;
}

/* Welcome (above Couple) */
.dy-welcome-block .dy-welcome-inner {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto;
}

.dy-welcome-heading {
    font-family: "Lora", serif;
    font-size: clamp(1.05rem, 3.2vw, 1.22rem);
    font-weight: 600;
    color: #7a6a58;
    margin: 0 0 0.85rem;
    line-height: 1.45;
    letter-spacing: 0.02em;
}

.dy-welcome-block .dy-welcome-inner p {
    margin: 0;
    opacity: 0.92;
}

.dy-dress-reference {
    width: min(100%, 640px);
    display: block;
    margin: 0.5rem auto 1.25rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(36, 41, 29, 0.12);
    background: transparent;
}

.dy-dress-embed {
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
}

.dy-dress-reference--card {
    width: min(100%, 1200px);
    max-width: 1200px;
    margin: 0 auto 0.2rem;
    border-radius: 0;
    object-fit: contain;
    object-position: center;
    box-shadow: none;
    background: transparent;
    /* no white “mat” behind RGBA artwork */
}

.dy-dress-kicker {
    margin: 0 0 0.55rem;
    text-align: center;
    font-size: 0.74rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: rgba(90, 84, 72, 0.72);
}

#dy-dress .dy-section-title {
    margin-bottom: 0.22rem;
    line-height: 0.98;
}

.dy-dress-subtitle {
    margin: 0;
    text-align: center;
    font-size: 1.34rem;
    letter-spacing: 0.23em;
    color: rgba(122, 106, 88, 0.92);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 500;
}

.dy-dress-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0.08rem auto 0.12rem;
    color: rgba(146, 129, 96, 0.86);
}

.dy-dress-divider::before,
.dy-dress-divider::after {
    content: "";
    width: 66px;
    height: 1px;
    background: rgba(180, 158, 118, 0.65);
}

.dy-dress-divider span {
    font-size: 1rem;
    line-height: 1;
}

#dy-dress.dy-section {
    padding-top: clamp(1.3rem, 3.5vw, 2rem);
    padding-bottom: clamp(0.6rem, 2vw, 1.05rem);
}

.dy-venue-frame {
    width: min(100%, 22rem);
    margin: 0.5rem auto 1.1rem;
    padding: 0.7rem;
    background: linear-gradient(180deg, #d8c9b3 0%, #b9a589 100%);
    border-radius: 22px;
    box-shadow:
        0 14px 32px rgba(36, 41, 29, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dy-venue-frame--standalone {
    width: min(100%, 56rem);
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border-radius: 24px;
    box-shadow: 0 16px 34px rgba(48, 56, 39, 0.14);
}

.dy-venue-frame-inner {
    background: #eef0e6;
    border-radius: 16px;
    padding: 0.7rem;
    border: 1px solid rgba(92, 99, 69, 0.22);
}

.dy-venue-frame--standalone .dy-venue-frame-inner {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 24px;
}

.dy-venue-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(92, 99, 69, 0.22);
}

.dy-venue-frame--standalone .dy-venue-photo {
    aspect-ratio: 16 / 10;
    transform: none;
    border: 0;
    border-radius: 24px;
}

.dy-location-preview {
    display: block;
    width: 98%;
    max-width: 960px;
    margin: 2px auto 0.45rem;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

#dy-location {
    background: #f5efe6;
}

.dy-location-caption-top {
    margin: 0 0 0.18rem;
    text-align: center;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.8rem;
    color: #6d7453;
    font-style: italic;
}

.dy-location-caption-main {
    margin: 0;
    text-align: center;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.65rem, 3.6vw, 2.2rem);
    letter-spacing: 0.06em;
    color: #5f6848;
    font-weight: 700;
    line-height: 1.05;
}

.dy-location-caption-sub {
    margin: 0 0 0.02rem;
    text-align: center;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    letter-spacing: 0.12em;
    color: #727b5a;
    font-weight: 600;
}

.dy-location-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0.2rem auto 0.3rem;
    color: #7e8964;
}

#dy-location {
    transform: translateY(-0.5rem);
}

#dy-stay.dy-section {
    padding-top: clamp(0.45rem, 1.4vw, 0.9rem);
}

.dy-location-divider::before,
.dy-location-divider::after {
    content: "";
    width: 66px;
    height: 1px;
    background: rgba(110, 122, 88, 0.55);
}

.dy-location-divider span {
    font-size: 1rem;
    line-height: 1;
}

#dy-location .dy-btn {
    background: #6d7453;
    color: #f7f2e8;
    border: 1px solid rgba(78, 88, 58, 0.82);
}

#dy-location .dy-btn:hover {
    background: #616a49;
}

.dy-couple-card {
    margin-bottom: 1.8rem;
    text-align: center;
}

.dy-couple-card .name {
    font-weight: 700;
    font-size: clamp(1.55rem, 4vw, 1.95rem);
    letter-spacing: 0.01em;
    color: #6f604f;
    margin-bottom: 0.25rem;
}

.dy-couple-role {
    margin: 0;
    font-family: "Lora", serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(90, 84, 72, 0.88);
}

.dy-couple-parents {
    margin: 0.45rem auto 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.1rem, 2.8vw, 1.35rem);
    line-height: 1.45;
    font-weight: 700;
    color: #3f4336;
}

/* Timeline — centered stacked blocks like reference */
.dy-timeline {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
    max-width: 30rem;
    margin: 0 auto;
}

.dy-tl-item {
    padding: 0.9rem 0.5rem 0;
    max-width: 24rem;
    margin: 0 auto;
}

.dy-tl-segment {
    display: block;
    width: 1px;
    height: 3.2rem;
    margin: 0;
    margin: 0.7rem auto 0;
    background: rgba(92, 99, 69, 0.42);
}

.dy-tl-item time {
    display: block;
    font-size: 0.8rem;
    opacity: 0.62;
    margin-bottom: 0.2rem;
}

.dy-tl-item h3 {
    font-family: "Lora", serif;
    font-size: 2rem;
    margin: 0 0 0.2rem;
    color: #7a6a58;
    font-weight: 400;
}

.dy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.dy-timeline .dy-actions {
    justify-content: center;
}

/* Buttons (gifts + livewire) */
.dy-btn {
    display: inline-block;
    font-family: "Lora", serif;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(92, 99, 69, 0.35);
    color: #7a6a58;
    background: rgba(255, 255, 255, 0.65);
    cursor: pointer;
}

.dy-btn:hover {
    background: #fff;
}

/* RSVP (Digital Yes-style minimal section) */
.dy-rsvp-section {
    background: #efe7dc;
    padding-top: clamp(2.25rem, 6vw, 3rem);
    padding-bottom: clamp(2.5rem, 7vw, 3.5rem);
}

.dy-rsvp-block {
    max-width: 28rem;
    margin: 0 auto;
}

.dy-rsvp-script {
    font-family: "Great Vibes", cursive;
    font-size: clamp(2.8rem, 9vw, 3.5rem);
    line-height: 1;
    color: #7a6a58;
    margin: 0;
    text-align: center;
}

.dy-rsvp-kicker {
    text-align: center;
    font-size: 0.66rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: rgba(58, 63, 50, 0.65);
    margin: 0.45rem 0 0.35rem;
}

.dy-rsvp-deadline {
    display: block;
    width: fit-content;
    max-width: calc(100% - 1.5rem);
    margin: 0 auto 1.5rem;
    padding: 0.55rem 1.35rem;
    border-radius: 999px;
    text-align: center;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.02rem, 2.4vw, 1.22rem);
    font-style: italic;
    color: #fffef8;
    letter-spacing: 0.02em;
    background: rgba(45, 50, 36, 0.88);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

/* Hero RSVP line: text only (no pill); shadow keeps it readable on photos */
.dy-hero-rsvp-deadline {
    display: block;
    width: fit-content;
    max-width: calc(100% - 1.5rem);
    margin: 0.7rem auto 0;
    padding: 0;
    text-align: center;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    font-style: italic;
    letter-spacing: 0.02em;
    color: #fffef8;
    background: none;
    border-radius: 0;
    box-shadow: none;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 0 18px rgba(0, 0, 0, 0.35);
}

.theme-night .dy-hero-rsvp-deadline,
.theme-day .dy-hero-rsvp-deadline {
    color: #fffef8;
    background: none;
    box-shadow: none;
}

.theme-day .dy-hero-rsvp-deadline {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 0 22px rgba(0, 0, 0, 0.38);
}

/* RSVP section: same white-on-dark treatment in both themes (section bg is cream) */
.theme-night .dy-rsvp-deadline,
.theme-day .dy-rsvp-deadline {
    color: #fffef8;
    background: rgba(45, 50, 36, 0.88);
}

.dy-gifts-intro {
    max-width: 32rem;
    margin: 0 auto;
}

.dy-gifts-intro-lead {
    text-align: center;
    margin-bottom: 0.4rem;
}

.dy-gifts-intro-note {
    margin: 0;
    text-align: center;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.05rem, 2.3vw, 1.28rem);
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #5f6848;
}

.dy-rsvp-card {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dy-rsvp-card--solo {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(92, 99, 69, 0.16);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.dy-rsvp-label {
    display: block;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: rgba(58, 63, 50, 0.88);
    margin: 1.05rem 0 0.35rem;
    font-weight: 500;
}

.dy-req {
    color: #8b2942;
}

.dy-rsvp-fieldset {
    border: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

.dy-rsvp-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0.5rem 0;
    cursor: pointer;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.96rem;
    color: rgba(58, 63, 50, 0.86);
}

.dy-rsvp-radio input {
    margin-top: 0.2rem;
    accent-color: #7a6a58;
}

.dy-input,
.dy-textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(92, 99, 69, 0.2);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.76);
    color: rgba(58, 63, 50, 0.92);
}

.dy-textarea {
    resize: vertical;
    min-height: 6rem;
}

.dy-rsvp-hint {
    font-size: 0.9rem;
    color: rgba(58, 63, 50, 0.66);
    margin: 0 0 0.5rem;
}

.dy-companion-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.dy-chip-btn {
    min-width: 3.2rem;
    min-height: 2.5rem;
    padding: 0 0.55rem;
    border-radius: 3px;
    border: 1px solid rgba(92, 99, 69, 0.25);
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    color: #7a6a58;
}

.dy-chip-label {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.92rem;
    margin-right: 0.35rem;
}

.dy-chip-spacer {
    width: 0.75rem;
}

.dy-rsvp-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 1.15rem 0;
    cursor: pointer;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.95rem;
}

.dy-rsvp-check input {
    margin-top: 0.2rem;
    accent-color: #7a6a58;
}

.dy-rsvp-submit {
    width: 100%;
    margin-top: 1.1rem;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 4px;
    background: #8c7a64;
    color: #fffef8;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-shadow: none;
}

.dy-rsvp-submit:hover {
    filter: brightness(1.03);
}

.dy-rsvp-submit-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.dy-plane {
    flex-shrink: 0;
}

.dy-error {
    display: block;
    color: #8b2942;
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.dy-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.dy-alert--success {
    background: rgba(125, 139, 94, 0.18);
    border: 1px solid rgba(125, 139, 94, 0.35);
    color: #3a4a30;
}

.desc {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #3a3f32;
    margin: 0 0 0.75rem;
}

.u-fullwidth {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(92, 99, 69, 0.2);
    font-family: "Lora", serif;
    font-size: 1rem;
    background: #fdfcf9;
}

.btn--primary {
    font-family: "Lora", serif;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(180deg, #cbb9a0, #af9a7f);
    color: #fffef8;
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn--primary:hover {
    filter: brightness(1.05);
}

.error {
    display: block;
    color: #8b2942;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.alert-box {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.alert-box--success {
    background: rgba(125, 139, 94, 0.15);
    border: 1px solid rgba(125, 139, 94, 0.35);
    color: #3a4a30;
}

.alert-box--error {
    background: rgba(139, 41, 66, 0.08);
    border: 1px solid rgba(139, 41, 66, 0.25);
}

.alert-box--notice {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(92, 99, 69, 0.12);
    margin-bottom: 0.65rem;
    font-size: 0.92rem;
    text-align: left;
}

/* Wishes column */
.dy-wishes-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 700px) {
    .dy-wishes-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dy-wish-list {
    max-height: 420px;
    overflow: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    border: 1px solid rgba(92, 99, 69, 0.1);
}

/* Gift registry boxes */
.dy-gift-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

@media (min-width: 560px) {
    .dy-gift-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dy-gift-box {
    padding: 1.75rem 1.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(92, 99, 69, 0.12);
    box-shadow: 0 14px 40px rgba(58, 63, 50, 0.08);
    text-align: center;
}

.dy-gift-box h3 {
    font-family: "Lora", serif;
    font-size: 1.08rem;
    color: #7a6a58;
    margin: 0 0 0.65rem;
}

/* VIP */
.vip-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: linear-gradient(145deg, #f8f6f0, #ebe4d8);
    border: 2px solid #c4a574;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.vip-badge {
    display: inline-block;
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(92, 99, 69, 0.12);
    color: #7a6a58;
    margin-bottom: 0.75rem;
}

/* Scroll reveal */
.dy-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.dy-reveal.is-inview {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.dy-footer {
    text-align: center;
    padding: 0;
    font-size: 0.78rem;
    color: rgba(58, 63, 50, 0.65);
}

.dy-footer-art {
    width: 100%;
    height: clamp(170px, 28vw, 250px);
    background: url("../undangan/images/welcome-venue-hero.png") center bottom / cover no-repeat;
    border-top: 1px solid rgba(92, 99, 69, 0.2);
}

.dy-footer-meta {
    background: #f5f3e9;
    padding: 0.75rem 1rem 0.95rem;
}

.dy-footer-couple {
    margin: 0;
    font-family: "Great Vibes", cursive;
    font-size: 1.45rem;
    color: rgba(92, 99, 69, 0.78);
    line-height: 1.1;
}

.dy-footer-date {
    margin: 0.15rem 0 0.35rem;
    font-size: 0.78rem;
    color: rgba(58, 63, 50, 0.58);
}

.dy-footer-made {
    margin: 0;
    font-size: 0.68rem;
    color: rgba(58, 63, 50, 0.62);
}

.dy-footer-made a {
    color: inherit;
}

/* Toast copy */
.copy-toast {
    position: fixed;
    bottom: calc(5.5rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 2000000;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.copy-toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: rgba(30, 32, 28, 0.92);
    color: #fff;
    border-radius: 999px;
    font-size: 0.85rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Responsive scale system (Tailwind-aligned breakpoints) --- */
/* base: 320+ mobile first */
html {
    font-size: clamp(15px, 0.6vw + 12px, 18px);
}

.dy-envelope-bg {
    width: min(94vw, 430px);
}

.dy-envelope-copy {
    width: min(92vw, 380px);
}

.dy-envelope-hint {
    font-size: clamp(0.62rem, 2.8vw, 0.76rem);
}

.dy-hero-content {
    max-width: min(92vw, 34rem);
}

.dy-prose,
.desc {
    word-break: normal;
    overflow-wrap: anywhere;
}

/* sm >= 640 */
@media (min-width: 640px) {
    :root {
        --dy-content-max: 44rem;
    }

    .dy-gift-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dy-wishes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* md >= 768 */
@media (min-width: 768px) {
    :root {
        --dy-content-max: 48rem;
    }

    .dy-section {
        padding-top: clamp(2.5rem, 5vw, 4rem);
        padding-bottom: clamp(2.5rem, 5vw, 4rem);
    }

    .dy-scroll-picture__img {
        height: clamp(380px, 52vw, 700px);
    }

    .dy-rsvp-block {
        max-width: 38rem;
    }
}

/* lg >= 1024 */
@media (min-width: 1024px) {
    :root {
        --dy-content-max: 56rem;
    }

    .dy-hero-content {
        max-width: 40rem;
    }

    .dy-section {
        max-width: var(--dy-shell-max);
    }

    .dy-section > .dy-prose,
    .dy-section > .dy-timeline,
    .dy-section > .dy-wishes-grid,
    .dy-section > .dy-gift-grid,
    .dy-section > .dy-venue-frame {
        max-width: 52rem;
        margin-left: auto;
        margin-right: auto;
    }
}

/* xl >= 1280 */
@media (min-width: 1280px) {
    :root {
        --dy-shell-max: 78rem;
        --dy-section-inline: clamp(2rem, 3vw, 2.75rem);
    }

    .dy-hero-content {
        max-width: 44rem;
    }

    .dy-rsvp-block {
        max-width: 44rem;
    }
}

/* 2xl >= 1536 */
@media (min-width: 1536px) {
    :root {
        --dy-shell-max: 84rem;
    }

    .dy-section > .dy-prose,
    .dy-section > .dy-timeline,
    .dy-section > .dy-wishes-grid,
    .dy-section > .dy-gift-grid,
    .dy-section > .dy-venue-frame {
        max-width: 60rem;
    }
}

/* Responsive audit hardening */
body.dy-invite,
#top {
    min-width: 320px;
}

.dy-envelope-bg {
    width: min(94vw, 430px);
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 1rem);
}

.dy-envelope-copy {
    width: min(92vw, 380px);
    bottom: clamp(0.85rem, 4vh, 1.75rem);
}

.dy-envelope-hint {
    bottom: clamp(0.9rem, 3.8vh, 1.8rem);
    font-size: clamp(0.68rem, 2.8vw, 0.8rem);
    letter-spacing: 0.24em;
}

.dy-btn-pill {
    min-height: 44px;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    padding: 0.85rem 1.35rem;
}

.dy-nav {
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
}

.dy-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    padding: 0.65rem 0.95rem;
}

.dy-hero-scroll {
    font-size: 0.72rem;
    letter-spacing: 0.24em;
}

.dy-countdown-sub {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
}

.dy-countdown .lbl {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
}

.dy-section-kicker,
.dy-rsvp-kicker,
.vip-badge {
    font-size: 0.74rem;
    letter-spacing: 0.18em;
}

.dy-prose {
    font-size: clamp(1.08rem, 1.1vw + 0.9rem, 1.3rem);
    line-height: 1.68;
}

.dy-actions {
    gap: 0.75rem;
}

.dy-btn {
    min-height: 44px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    padding: 0.72rem 1rem;
}

.dy-input,
.dy-textarea,
.dy-rsvp-submit,
.dy-chip-btn {
    min-height: 44px;
}

.dy-wish-list {
    max-height: min(420px, 52vh);
}

@media (max-width: 374px) {
    .dy-section {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .dy-hero {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .dy-countdown .unit {
        min-width: 4.8rem;
    }
}

@media (min-width: 1024px) {
    .dy-section {
        max-width: min(78rem, 96vw);
    }

    .dy-section > .dy-prose,
    .dy-section > .dy-timeline,
    .dy-section > .dy-wishes-grid,
    .dy-section > .dy-gift-grid,
    .dy-section > .dy-venue-frame,
    .dy-section > .dy-dress-reference {
        max-width: 58rem;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Production responsive matrix (mobile-first: 320px -> 1440px+) */
:root {
    --dy-mobile-min: 320px;
}

body.dy-invite,
#top {
    min-width: var(--dy-mobile-min);
}

.dy-countdown .unit {
    min-width: clamp(4.8rem, 20vw, 7.5rem);
}

.dy-prose,
.desc {
    max-width: 68ch;
    margin-left: auto;
    margin-right: auto;
}

.dy-actions > * {
    flex: 0 0 auto;
}

.dy-scroll-picture__img {
    background-size: cover;
    background-position: center;
}

@media (max-width: 374px) {
    .dy-section {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .dy-hero {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .dy-envelope-hint {
        letter-spacing: 0.2em;
    }
}

@media (min-width: 640px) {
    .dy-section {
        max-width: 46rem;
    }

    .dy-hero-content {
        max-width: 36rem;
    }
}

@media (min-width: 768px) {
    .dy-section {
        max-width: 52rem;
    }

    .dy-hero-content {
        max-width: 40rem;
    }
}

@media (min-width: 1024px) {
    .dy-section {
        max-width: 66rem;
    }

    .dy-hero-content {
        max-width: 44rem;
    }
}

@media (min-width: 1280px) {
    .dy-section {
        max-width: 74rem;
    }

    .dy-hero-content {
        max-width: 48rem;
    }

    .dy-gift-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    .dy-section {
        max-width: 82rem;
    }

    .dy-hero-content {
        max-width: 52rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dy-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .dy-hero-content,
    .dy-hero-bg::before,
    .dy-hero-bg::after {
        transform: none;
    }
    .dy-stars span {
        animation: none;
    }
    .dy-timeline::before {
        transition: none;
        height: 100%;
    }
    #invitation-envelope-overlay,
    #invitation-envelope-overlay * {
        animation: none !important;
        transition: none !important;
    }
}

#invitation-envelope-overlay:not(.is-hidden) {
    display: block !important;
}

html.dy-envelope-intro #invitation-envelope-overlay:not(.is-hidden) {
    background: #000 !important;
}

/* Full-viewport stack: no card, no flex centering, no max-width */
#invitation-envelope-overlay .envelope-wrapper {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    z-index: 9999;
    background: #000;
}

#invitation-envelope-overlay .envelope-wrapper .envelope-intro-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: linear-gradient(168deg, #faf7f0 0%, #f3ebe0 42%, #e9dcc6 100%);
}

#invitation-envelope-overlay .envelope-wrapper .envelope {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    display: grid;
    place-items: center;
    isolation: isolate;
    perspective: 2400px;
    perspective-origin: 50% 0%;
    transform-style: preserve-3d;
    opacity: 1;
    transform: scale(1);
    transition: none;
}

#invitation-envelope-overlay.is-intro-outro .envelope-wrapper .envelope {
    opacity: 0;
    transform: scale(0.94);
    transition:
        opacity 0.62s ease,
        transform 0.62s cubic-bezier(0.33, 1, 0.32, 1);
}

#invitation-envelope-overlay .envelope-wrapper .envelope-stage {
    display: none;
    position: relative;
    width: min(100vw, calc(100svh * 1.5));
    aspect-ratio: 1537 / 1023;
    overflow: visible;
}

#invitation-envelope-overlay .envelope-wrapper .envelope-stage .env-flap {
    z-index: 3;
    pointer-events: none;
    transform-origin: top center;
}

#invitation-envelope-overlay .envelope-wrapper .envelope-stage .env-flap,
#invitation-envelope-overlay .envelope-wrapper .envelope-stage .envelope-seal {
    display: none;
}

#invitation-envelope-overlay.is-intro-image-hidden .envelope-wrapper .envelope .intro-still-picture {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#invitation-envelope-overlay .envelope-wrapper .envelope .intro-still-picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    display: block;
    z-index: 65;
    pointer-events: none;
}

#invitation-envelope-overlay .envelope-wrapper .envelope .intro-still-picture .intro-still-image {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    -webkit-user-drag: none;
    user-select: none;
    cursor: pointer;
    background: #000;
    pointer-events: none;
}

#invitation-envelope-overlay.is-video-playing .envelope-wrapper .envelope .intro-still-picture {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.intro-video {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    object-fit: cover;
    z-index: 9999;
}

#invitation-envelope-overlay .envelope-wrapper .envelope-intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    object-fit: cover;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #000;
}

#invitation-envelope-overlay.is-video-playing .envelope-wrapper .envelope-intro-video {
    opacity: 1;
    visibility: visible;
}

#invitation-envelope-overlay .envelope-wrapper .envelope-stage .env-base,
#invitation-envelope-overlay .envelope-wrapper .envelope-stage .env-flap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    display: block;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    -webkit-user-drag: none;
    user-select: none;
    box-shadow: none;
}

#invitation-envelope-overlay .envelope-wrapper .envelope-stage .env-base {
    z-index: 1;
    opacity: 1;
    transition: opacity 0.95s ease;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

#invitation-envelope-overlay .envelope-wrapper .envelope-stage .envelope-seal {
    position: absolute;
    left: 50%;
    top: 53%;
    width: clamp(110px, 15vw, 220px);
    height: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    display: block;
    transform: translate(-50%, -50%);
    z-index: 30;
    object-fit: contain;
    cursor: pointer;
    transform-origin: center center;
    transition:
        transform 0.45s cubic-bezier(0.33, 1, 0.32, 1),
        opacity 0.42s ease;
    -webkit-user-drag: none;
    user-select: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

/* Site visible again after intro (html.dy-envelope-intro removed in JS) */
body.dy-scroll-lock > *:not(#invitation-envelope-overlay):not(#invitation-banquet-overlay),
body.dy-site-entering #top > *:not(#invitation-envelope-overlay):not(#invitation-banquet-overlay) {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
}

#invitation-banquet-overlay {
    display: none !important;
}
