.invitation-experience { min-width: 0; --invitation-accent: #355b4a; }
.invitation-experience [hidden] { display: none !important; }
.invitation-cover { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 680px; min-height: min(780px, max(620px, calc(100svh - 110px))); overflow: hidden; background: #edf3ee; color: #fff; }
.invitation-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: #102d25; opacity: .38; }
.invitation-cover:not(:has(.invitation-cover-photo))::after { opacity: .95; }
.invitation-cover-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.invitation-cover-content { width: min(100%, 760px); padding: 48px 24px 32px; text-align: center; }
.invitation-eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 500; }
.invitation-title { margin: 0 auto 14px; font-family: 'Cormorant Variable', Georgia, serif; font-size: 64px; font-weight: 400; line-height: 1.05; text-wrap: balance; overflow-wrap: anywhere; text-shadow: 0 1px 14px #142b2566; }
[data-invitation-font="sans"] .invitation-title { font-family: 'Manrope Variable', Arial, sans-serif; font-size: 48px; }
.invitation-date { margin: 0 0 6px; font-size: 17px; }
.invitation-location { margin: 0 auto; max-width: 38rem; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.invitation-countdown { margin: 18px 0 0; font-size: 22px; }
.invitation-envelope { position: relative; margin: 32px auto 28px; width: min(100%, 400px); height: 210px; perspective: 1200px; background: #e6ddd8; box-shadow: 0 12px 35px #0d241f40; }
.invitation-letter { position: absolute; inset: 12px 12px 8px; background: #fff; display: flex; flex-direction: column; justify-content: center; gap: 6px; color: #355b4a; border: 1px solid #e2e9e4; }
.invitation-letter span:first-child { font-family: 'Cormorant Variable', Georgia, serif; font-size: 42px; }
.invitation-letter span:last-child { font-family: 'Cormorant Variable', Georgia, serif; font-size: 21px; font-style: italic; }
.invitation-envelope-front { position: absolute; inset: 0; background: #f7f9f6; clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%); }
.invitation-envelope-flap { position: absolute; inset: 0; background: #fff; clip-path: polygon(0 0, 100% 0, 50% 61%); transform-origin: center top; backface-visibility: hidden; }
.invitation-seal { position: absolute; top: 46%; left: calc(50% - 29px); display: grid; place-items: center; width: 58px; height: 58px; padding: 4px; overflow-wrap: anywhere; line-height: 1.1; border: 2px solid #b997624d; border-radius: 50%; background: #ecd8b4; color: #3b433a; font-family: 'Cormorant Variable', Georgia, serif; font-size: 18px; box-shadow: 0 3px 6px #36443426; }
.invitation-open { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 200px; max-width: 100%; padding: 12px 24px; border: 1px solid #fff; background: #fff; color: #253e33; border-radius: 4px; font-size: 15px; font-weight: 600; text-decoration: none; }
.invitation-seal-long { font-size: 12px; }
.invitation-open:hover { background: #eef4ef; }
.invitation-skip { display: block; width: fit-content; margin: 8px auto 0; padding: 10px 16px; min-height: 44px; color: #fff; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.invitation-experience a:focus-visible, .invitation-experience button:focus-visible { outline: 3px solid #eebc4b; outline-offset: 4px; }
.invitation-replay-bar { display: flex; justify-content: flex-end; background: #f7faf8; padding: 4px 16px; }
.invitation-replay-bar button { min-height: 44px; color: #355b4a; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
[data-invitation-details] { scroll-margin-top: 80px; outline: none; }
[data-invitation-details]:focus-visible { outline: 2px solid #355b4a; outline-offset: -2px; }
[data-opening]:not([data-opening="envelope_open"]) .invitation-envelope { display: none; }
[data-opening]:not([data-opening="envelope_open"]) .invitation-open { margin-top: 32px; }
.invitation-preview-dialog { width: min(960px, calc(100% - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 1px solid #d4ded7; border-radius: 6px; margin: auto; overflow: auto; }
.invitation-preview-dialog::backdrop { background: #10241fcc; }
.invitation-preview-dialog header { display: flex; position: sticky; top: 0; z-index: 5; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: #fff; color: #253e33; }
.invitation-preview-dialog header button { min-width: 44px; min-height: 44px; }
.invitation-preview-dialog .invitation-cover { min-height: 600px; }
@media (max-width: 640px) {
    .invitation-cover { min-height: 600px; min-height: min(720px, max(590px, calc(100svh - 85px))); }
    .invitation-cover-content { padding: 32px 20px 24px; }
    .invitation-title { font-size: 46px; }
    [data-invitation-font="sans"] .invitation-title { font-size: 34px; }
    .invitation-envelope { max-width: 330px; height: 180px; margin-top: 26px; }
    .invitation-date { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .invitation-experience *, .invitation-experience *::before, .invitation-experience *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
    .invitation-cover, .invitation-replay-bar { display: none !important; }
    .invitation-experience [data-invitation-details][hidden] { display: block !important; }
}
