/* Bounded desktop invitation. Phone and tablet layout deliberately unchanged. */
@media screen and (min-width:1024px){
 :root{--desktop-height:min(860px,calc(100dvh - 48px));--page-height:var(--desktop-height);--page-top:46px;--page-bottom:24px;--nav-height:64px}
 body{background:radial-gradient(ellipse at 50% 38%,#fffaf0,#ede3cf)!important}
 body.leaf-ready{height:100dvh;display:grid;place-items:center}
 body.leaf-ready .invitation-shell{width:780px;max-width:calc(100vw - 80px);height:var(--desktop-height);border:1px solid #a9864820;box-shadow:0 12px 50px #634c2310;background:var(--ground);border-radius:8px;overflow:hidden;position:relative}
 body.leaf-ready #main{width:100%;max-width:100%}
 body.leaf-ready #main>section{padding:46px 48px 24px}
 body.leaf-ready #main>section h1:focus,body.leaf-ready #main>section h2:focus{outline:none}
 body.leaf-ready #main>section .canopy-corner{width:290px;height:118px}
 body.leaf-ready .leaf-nav{width:440px;background:transparent}
 #open-invitation{height:100dvh;background:transparent!important;overflow:hidden}
 #open-invitation .wedding-scenery{inset:auto;left:50%;bottom:calc((100dvh - var(--desktop-height))/2);width:1000px;max-width:calc(100vw - 64px);height:min(680px,75dvh);transform:translateX(-50%);background-size:contain;opacity:.30}
 #open-invitation>.canopy-corner{width:310px;height:128px;top:24px}
 #open-invitation>.canopy-left{left:28px}#open-invitation>.canopy-right{right:28px}
 #open-invitation>.envelope-summary__inner{gap:28px}
 #open-invitation .envelope{width:min(340px,calc((100dvh - 210px)*.666667))}
 body.leaf-ready #main>#top{justify-content:center;padding-top:44px;padding-bottom:28px}
 #main>#top .hero-stage{--couple-w:min(330px,max(180px,calc((var(--page-height) - 300px)*.666667)))}
 body.leaf-ready #top .couple-title{padding-top:0;margin-bottom:12px}
 body.leaf-ready #top .hero__details{margin:24px auto 0;padding-top:0}
 body.leaf-ready #top .hero__invite{font-size:21px;line-height:1.5}
 body.leaf-ready #main>#celebration{justify-content:center}
 body.leaf-ready #celebration .day__inner{min-height:0;height:auto;flex:none}
 body.leaf-ready #celebration .section-head{margin-bottom:22px}
 body.leaf-ready #celebration .day__body{flex:none}
 body.leaf-ready #celebration .generated-calendar{width:min(300px,calc(var(--page-height) - 410px));margin-bottom:18px}
 body.leaf-ready #celebration .cta-row{margin-top:24px;padding:0}
 body.leaf-ready #main>#venue{justify-content:center}
 body.leaf-ready #venue .split__head{margin-bottom:8px}
 body.leaf-ready #venue .venue__note{margin:8px auto 12px;max-width:480px;font-size:15px;line-height:1.55}
 body.leaf-ready #venue .venue__art{flex:none;width:560px;max-width:100%;margin:0;padding:0;min-height:0;order:3;align-items:center;transform:none!important}
 html.motion-on body.leaf-ready #venue .venue__art{transform:none!important}
 body.leaf-ready #venue .venue-illustration{width:100%;height:auto;max-height:none}
 body.leaf-ready #venue .venue-illustration img{width:100%;max-width:100%;height:auto;max-height:min(310px,calc(var(--page-height) - 420px));object-fit:contain;margin:0;transform:none}
 body.leaf-ready #venue .cta-row{flex:none;margin-top:12px;padding:0;order:4}
 body.leaf-ready #main>#rsvp{justify-content:center;padding:30px 48px 24px}
 body.leaf-ready #rsvp .rsvp__inner{max-width:500px;padding-top:56px}
 body.leaf-ready #main>#blessings{justify-content:center;padding:30px 48px 24px}
 body.leaf-ready #blessings .blessings__inner{max-width:540px}
 body.leaf-ready #blessings .families{margin-top:20px}
}
/* Latest direction: remove lower envelope backdrop at every screen size. */
#open-invitation .wedding-scenery{display:none!important;background:none!important}
@media screen and (min-width:1024px){
 body.leaf-ready #main>section{justify-content:safe center!important}
}
/* Turn a visible paper leaf rather than overlapping transparent page contents. */
body.leaf-ready #main{perspective:1300px}
body.leaf-ready #main>section.leaf-turn-out,body.leaf-ready #main>section.leaf-turn-in{background-color:var(--ground)}
body.leaf-ready #main>section.leaf-turn-out{box-shadow:12px 0 28px #6b4a2729;will-change:transform;transform-style:preserve-3d}
/* E19: match the requested portrait/mobile aspect instead of a near-square page. */
@media screen and (min-width:1024px){
 body.leaf-ready .invitation-shell{width:calc(var(--desktop-height) * .5625);max-width:calc(100vw - 64px)}
 body.leaf-ready #main>section{padding-left:24px;padding-right:24px}
 body.leaf-ready #main>#rsvp,body.leaf-ready #main>#blessings{padding-left:24px;padding-right:24px}
 body.leaf-ready #main>section .canopy-corner{width:48%;height:100px;top:4px}
 body.leaf-ready .leaf-nav{width:calc(100% - 48px)}
 body.leaf-ready #main h2{font-size:32px}
 body.leaf-ready #top .couple-title__text{font-size:40px}
 body.leaf-ready #rsvp .rsvp__intro h2{font-size:32px}
 body.leaf-ready #venue .venue__note{font-size:14px}
 body.leaf-ready #top .hero__invite{font-size:18px}
 body.leaf-ready #blessings .blessings__elders{font-size:20px}
 body.leaf-ready #blessings .families{width:100%}
}
@media screen and (min-width:1024px){
 body.leaf-ready #rsvp .rsvp__inner{--card-w:calc(var(--desktop-height) * .5625 - 50px);--arch-h:calc(var(--card-w) * .384)}
}

/* Five destination menu: Date, Venue, Home, RSVP, Details. */
body.leaf-ready .leaf-nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
body .leaf-nav button[data-page]{grid-column:auto;grid-row:1;justify-self:stretch;justify-content:center;min-width:44px;min-height:44px;width:auto;position:relative;padding:8px 2px;border-radius:8px;color:#76562e}
body .leaf-nav button[data-page] span{font:500 10px/1.4 'DM Sans',sans-serif;letter-spacing:.09em;text-transform:uppercase;opacity:1}
body .leaf-nav button[data-page][aria-current="page"]{background:rgba(172,130,61,.10);color:#624117}
body .leaf-nav button[data-page][aria-current="page"]:after{content:none;display:none}
body .leaf-nav button[data-page]:focus-visible{outline:2px solid #876a3a;outline-offset:1px}

/* E22: edge-to-edge footer within the invitation, soft white fade above. */
body.leaf-ready .leaf-nav{width:100%;max-width:none;gap:0;padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px));background:transparent;isolation:isolate}
body.leaf-ready .leaf-nav:before{content:"";display:block;position:absolute;inset:-24px 0 0;z-index:-1;pointer-events:none;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,.88) 35%,rgba(255,255,255,.98) 100%)}
body.leaf-ready #venue .venue-illustration img{transform:translateY(-10px)}
/* Softer shallow shadow beneath reply frame. */
body.leaf-ready #rsvp .rsvp__inner{box-shadow:0 12px 18px -14px rgba(58,40,22,.14),0 4px 8px -6px rgba(58,40,22,.08)}

/* E23: clean footer; composed venue stack and compact calendar CTA. */
body.leaf-ready .leaf-nav:before{display:none;background:none}
body.leaf-ready .leaf-nav{background:var(--ground)}
body.leaf-ready #celebration .cta-row{width:100%;justify-content:center}
body.leaf-ready #celebration .cta-row .button{width:auto;min-width:0;max-width:100%;padding-inline:18px;gap:8px}
body.leaf-ready #venue .venue__art{order:2;flex:0 1 auto;margin:12px auto 14px;padding:0;align-items:center;transform:none!important}
html.motion-on body.leaf-ready #venue .venue__art{transform:none!important}
body.leaf-ready #venue .venue-illustration img{transform:none;width:100%;max-width:100%;margin:0 auto;max-height:clamp(150px,calc(var(--page-height) - 430px),300px)}
body.leaf-ready #venue .venue__note{order:3;margin:0 auto 18px}
body.leaf-ready #venue .cta-row{order:4;margin:0;padding:0}

/* E24: bright calendar service button, raised venue and soft light behind art. */
body.leaf-ready #celebration .cta-row .button{background:#fff!important;background-image:none!important;color:#624719;border:1px solid #d9c49e;box-shadow:0 3px 0 #d5c4a5,0 5px 9px #72542312;padding:14px;min-height:48px}
body.leaf-ready #venue .venue__art{position:relative;isolation:isolate;margin-top:4px}
body.leaf-ready #venue .venue__art:before{content:"";position:absolute;inset:-8% -4%;background:radial-gradient(ellipse,#fff 0%,#ffffffc7 35%,#ffffff00 72%);z-index:-1;pointer-events:none}
body.leaf-ready #venue .venue-illustration img{transform:translateY(-5px)}
.hero-celebration{inset:12% 2% 10%}

/* E25: subtle upward adjustment without changing fixed navigation or art. */
body.leaf-ready #celebration .cta-row{position:relative;top:-8px}
body.leaf-ready #venue .venue__note{position:relative;top:-8px}

/* Approved soft white light behind artwork only; no change to layout or image size. */
body.leaf-ready #top #couple-illustration,
body.leaf-ready #venue .venue-illustration{position:relative;isolation:isolate}
body.leaf-ready #top #couple-illustration::before,
body.leaf-ready #venue .venue-illustration::before{content:'';display:block;position:absolute;inset:4% 5%;z-index:0;background:radial-gradient(ellipse at center,rgba(255,255,255,.78) 0%,rgba(255,255,255,.48) 34%,rgba(255,255,255,.16) 57%,rgba(255,255,255,0) 75%);filter:blur(12px);opacity:1;pointer-events:none;border:0;box-shadow:none}
body.leaf-ready #top #couple-illustration picture,
body.leaf-ready #venue .venue-illustration picture{position:relative;z-index:1}
