:root{
  --burgundy:#a85f72;
  --deep:#5a2d39;
  --rose:#c99a95;
  --blush:#f7e6e3;
  --cream:#fffaf2;
  --paper:#fff8ea;
  --ink:#331922;
  --muted:#7b5e65;
  --green:#37581a;
  --shadow:0 28px 80px rgba(64,22,32,.22);
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink);background:radial-gradient(circle at top left,#fff4f1 0,#fffaf4 35%,#f5dedb 100%);min-height:100vh;overflow-x:hidden}body.invitation-opened{overflow-anchor:none}.hero.unlocked-away{display:none!important}.site-shell{width:min(1120px,92vw);margin:auto}.hero{min-height:100vh;display:grid;place-items:center;gap:28px;padding:48px 0;position:relative}.intro-copy{text-align:center;z-index:2}.eyebrow{margin:0 0 8px;color:var(--burgundy);font-weight:800;letter-spacing:.16em;text-transform:uppercase;font-size:.78rem}.intro-copy h1{font-family:'Playfair Display',serif;font-size:clamp(2.6rem,8vw,5rem);line-height:.95;margin:0;color:var(--deep)}.intro-copy p{margin:14px 0 0;color:var(--muted);font-size:1.05rem}.soft-glow{position:absolute;border-radius:50%;filter:blur(20px);opacity:.35}.glow-one{width:260px;height:260px;background:#d7aaa3;left:4%;top:12%}.glow-two{width:220px;height:220px;background:#ead18e;right:8%;bottom:18%}
.envelope-scene{--w:min(470px,86vw);--h:calc(var(--w)*.74);position:relative;width:var(--w);height:calc(var(--h) + 170px);border:0;background:transparent;cursor:pointer;padding:0;perspective:1200px;outline-offset:8px}.envelope-shadow{position:absolute;width:86%;height:28px;background:rgba(67,20,31,.2);border-radius:999px;left:7%;bottom:18px;filter:blur(18px)}.envelope-back{position:absolute;width:var(--w);height:var(--h);left:0;bottom:52px;border-radius:14px;background:linear-gradient(135deg,#d8a0a5,#b86f7d);box-shadow:var(--shadow);overflow:hidden}.envelope-back-flap{position:absolute;left:12%;bottom:calc(52px + var(--h)*.70);width:76%;height:calc(var(--h)*.56);background:linear-gradient(145deg,#e7b7bc,#c58491);clip-path:polygon(50% 0,100% 100%,0 100%);border-radius:18px 18px 0 0;z-index:1;box-shadow:inset 0 -10px 20px rgba(255,255,255,.12)}.invitation-peek{position:absolute;left:50%;bottom:calc(52px + var(--h)*.25);width:68%;height:calc(var(--h)*1.16);transform:translateX(-50%);border-radius:10px 10px 5px 5px;background:var(--paper);z-index:3;box-shadow:0 18px 30px rgba(41,16,22,.22);overflow:hidden;transition:transform .55s cubic-bezier(.2,.8,.2,1),bottom .55s cubic-bezier(.2,.8,.2,1)}.invitation-peek img{width:100%;height:100%;object-fit:cover;object-position:50% 17%;display:block}.paper-stack{position:absolute;bottom:calc(52px + var(--h)*.34);width:13px;height:calc(var(--h)*.86);background:repeating-linear-gradient(90deg,#ded5c6 0 2px,#fff8ea 2px 5px);border-radius:7px;z-index:2;opacity:.75}.stack-left{left:18%}.stack-right{right:18%;opacity:.35}.envelope-pocket{position:absolute;left:0;bottom:52px;width:var(--w);height:var(--h);background:linear-gradient(150deg,#d59aa3,#b96f80);clip-path:polygon(0 38%,50% 72%,100% 38%,100% 100%,0 100%);border-radius:0 0 14px 14px;z-index:5;box-shadow:inset 0 1px 0 rgba(255,255,255,.22)}.envelope-side{position:absolute;bottom:52px;width:50%;height:var(--h);z-index:6}.envelope-side.left{left:0;background:linear-gradient(138deg,#c78391,#a65b70);clip-path:polygon(0 0,100% 72%,0 100%);border-radius:0 0 0 14px}.envelope-side.right{right:0;background:linear-gradient(218deg,#e0a8ae,#b96b7b);clip-path:polygon(100% 0,0 72%,100% 100%);border-radius:0 0 14px 0}.envelope-front-flap{position:absolute;left:0;bottom:52px;width:var(--w);height:calc(var(--h)*.72);background:linear-gradient(180deg,#cf8e9a,#a85c71);clip-path:polygon(0 0,50% 100%,100% 0,100% 100%,0 100%);border-radius:0 0 14px 14px;z-index:7;transform-origin:50% 100%;transition:transform .8s cubic-bezier(.2,.75,.18,1)}.wax-dot{position:absolute;left:50%;bottom:calc(52px + var(--h)*.27);transform:translateX(-50%);width:56px;height:56px;border-radius:50%;background:linear-gradient(145deg,#b26477,#8c3f55);color:#fffaf2;display:grid;place-items:center;font-size:22px;font-weight:800;z-index:8;box-shadow:0 10px 20px rgba(45,12,22,.3)}.open-hint{position:absolute;left:50%;bottom:0;transform:translateX(-50%);display:grid;gap:2px;text-align:center;color:var(--deep);z-index:9;transition:opacity .3s ease,transform .3s ease}.open-hint strong{font-size:1rem}.open-hint em{font-style:normal;font-weight:700}.envelope-scene:not(.opened) .invitation-peek{animation:desktopPeek 3.2s ease-in-out infinite}@keyframes desktopPeek{0%,100%{transform:translateX(-50%)}50%{transform:translateX(-50%) translateY(-18px)}}.envelope-scene:hover .invitation-peek,.envelope-scene:focus-visible .invitation-peek{transform:translateX(-50%) translateY(-44px);animation:none}.envelope-scene:hover .open-hint{transform:translateX(-50%) translateY(-6px)}.envelope-scene.opened{pointer-events:none}.envelope-scene.opened .open-hint{opacity:0}.envelope-scene.opened .front-flap,.envelope-scene.opened .envelope-front-flap{transform:rotateX(170deg)}.envelope-scene.opened .wax-dot{opacity:0;transition:opacity .2s}.envelope-scene.opened .invitation-peek{animation:pullCard 1.15s cubic-bezier(.18,.85,.2,1) forwards}@keyframes pullCard{0%{transform:translateX(-50%) translateY(-44px) scale(1)}55%{transform:translateX(-50%) translateY(-215px) scale(1.04)}100%{transform:translateX(-50%) translateY(-180px) scale(1.14);opacity:0}}
.hero.unlocked-away{animation:fadeEnvelopeAway .55s ease forwards;pointer-events:none}@keyframes fadeEnvelopeAway{to{opacity:0;transform:translateY(-24px) scale(.98);visibility:hidden}}
.content-lock{display:none;opacity:0;transform:translateY(30px);padding:24px 0 80px}.content-lock.unlocked{display:block;animation:unlock .7s ease forwards}@keyframes unlock{to{opacity:1;transform:none}}.invitation-card-wrap{width:min(620px,94vw);margin:0 auto 24px;border-radius:24px;overflow:hidden;box-shadow:0 26px 70px rgba(82,29,43,.2);background:#fff}.full-invitation{display:block;width:100%;height:auto}.actions-row{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;margin:24px 0 34px}.button{border:0;text-decoration:none;border-radius:999px;padding:14px 22px;font-weight:800;font-size:.95rem;cursor:pointer;transition:transform .2s,box-shadow .2s}.button:hover{transform:translateY(-2px)}.primary,.submit{background:var(--burgundy);color:#fff;box-shadow:0 12px 28px rgba(135,40,69,.24)}.secondary{background:#fff;color:var(--burgundy);border:1px solid rgba(135,40,69,.18)}.rsvp-panel{width:min(760px,94vw);margin:0 auto;background:rgba(255,255,255,.82);border:1px solid rgba(135,40,69,.13);backdrop-filter:blur(14px);border-radius:28px;padding:clamp(22px,4vw,40px);box-shadow:0 24px 70px rgba(86,32,47,.13)}.panel-heading{text-align:center;margin-bottom:24px}.panel-heading h2{font-family:'Playfair Display',serif;font-size:clamp(1.9rem,4vw,2.7rem);margin:0;color:var(--deep)}.panel-heading p:last-child{color:var(--muted);margin:.5rem 0 0}.rsvp-form{display:grid;gap:22px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.count-grid{grid-template-columns:repeat(3,minmax(0,1fr))}label span,legend{display:block;font-weight:800;margin-bottom:8px;color:var(--deep)}input,textarea{width:100%;border:1px solid rgba(88,30,45,.18);border-radius:16px;padding:14px 15px;font:inherit;background:#fffaf8;color:var(--ink);outline:none}input:focus,textarea:focus{border-color:var(--burgundy);box-shadow:0 0 0 4px rgba(135,40,69,.12)}fieldset{border:0;padding:0;margin:0}.choice-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.choice-card{padding:16px;border:1px solid rgba(88,30,45,.18);border-radius:18px;background:#fffaf8;display:flex;align-items:center;gap:10px;cursor:pointer}.choice-card input{width:auto;accent-color:var(--burgundy)}.form-section{display:grid;gap:14px}.form-section h3{margin:0;color:var(--burgundy);font-size:1rem;font-weight:900;letter-spacing:.04em;text-transform:uppercase}.guest-details[hidden]{display:none!important}.guest-details{display:grid;gap:16px;animation:showDetails .32s ease}@keyframes showDetails{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}.full-field{display:block}.submit{justify-self:center;padding-inline:34px}.form-status{text-align:center;font-weight:800;min-height:24px;margin:0}.form-status.success{color:var(--green)}.form-status.error{color:#9b2238}@media(max-width:720px){.hero{padding:30px 0}.envelope-scene{--w:92vw;height:calc(var(--h) + 140px)}.intro-copy p{font-size:.95rem}.wax-dot{width:46px;height:46px}.form-grid,.count-grid,.choice-row{grid-template-columns:1fr}.envelope-scene .invitation-peek{animation:mobilePeek 3s ease-in-out infinite}@keyframes mobilePeek{0%,100%{transform:translateX(-50%)}50%{transform:translateX(-50%) translateY(-18px)}}.envelope-scene.opened .invitation-peek{animation:pullCardMobile 1.05s cubic-bezier(.18,.85,.2,1) forwards}@keyframes pullCardMobile{0%{transform:translateX(-50%) translateY(-20px) scale(1)}70%{transform:translateX(-50%) translateY(-145px) scale(1.04)}100%{transform:translateX(-50%) translateY(-120px) scale(1.12);opacity:0}}}

.calendar-dropdown{position:relative;display:inline-flex;z-index:20}.calendar-toggle{display:inline-flex;align-items:center;gap:10px}.calendar-toggle-icon{font-size:.8rem;transition:transform .2s ease}.calendar-dropdown.open .calendar-toggle-icon{transform:rotate(180deg)}.calendar-menu{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%) translateY(-6px);min-width:235px;background:rgba(255,255,255,.96);border:1px solid rgba(135,40,69,.16);border-radius:20px;padding:8px;box-shadow:0 20px 50px rgba(82,29,43,.18);display:grid;gap:6px;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,transform .2s ease,visibility .2s ease}.calendar-dropdown.open .calendar-menu{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(-50%) translateY(0)}.calendar-option{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;text-decoration:none;color:var(--deep);font-weight:800}.calendar-option:hover,.calendar-option:focus-visible{background:#fff3ef;outline:none}.calendar-logo{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#fff;box-shadow:0 5px 14px rgba(82,29,43,.1)}@media(max-width:720px){.calendar-dropdown,.calendar-toggle{width:100%;justify-content:center}.calendar-menu{left:0;right:0;transform:translateY(-6px);min-width:100%}.calendar-dropdown.open .calendar-menu{transform:translateY(0)}.actions-row{align-items:stretch}.actions-row>.button,.actions-row>.calendar-dropdown{width:100%}}


/* v10 polish: softer rounded envelope, luxury open animation, mobile-safe dropdown */
.envelope-scene{--w:min(430px,84vw);--h:calc(var(--w)*.88)}
.envelope-back{border-radius:24px;background:linear-gradient(135deg,#e8bbc1,#c98c9b)}
.envelope-back-flap{
  left:50%;
  bottom:calc(52px + var(--h)*.52);
  width:calc(var(--w)*.62);
  height:calc(var(--w)*.62);
  transform:translateX(-50%) rotate(45deg);
  clip-path:none;
  border-radius:34px 18px 28px 18px;
  background:linear-gradient(145deg,#f0c9ce,#d49aa8 72%);
  z-index:1;
  box-shadow:inset 10px 10px 22px rgba(255,255,255,.18), inset -14px -14px 24px rgba(108,37,57,.10);
}
.envelope-pocket{background:linear-gradient(150deg,#e1acb7,#c78a9a);border-radius:0 0 24px 24px}
.envelope-side.left{background:linear-gradient(138deg,#d39aaa,#bb788c);border-radius:0 0 0 24px}
.envelope-side.right{background:linear-gradient(218deg,#edbdc4,#ca8899);border-radius:0 0 24px 0}
.envelope-front-flap{background:linear-gradient(180deg,#dda6b2,#bd7b8f);border-radius:0 0 24px 24px;filter:drop-shadow(0 -4px 10px rgba(87,28,45,.08))}
.wax-dot{background:linear-gradient(145deg,#c88196,#a95f78)}
.envelope-scene.opened .envelope-front-flap{transform:rotateX(172deg) translateY(8px);filter:drop-shadow(0 18px 16px rgba(87,28,45,.18))}
.envelope-scene.opened .envelope-pocket,.envelope-scene.opened .envelope-side{animation:envelopeBloom .72s ease forwards}
@keyframes envelopeBloom{50%{filter:brightness(1.06);transform:translateY(3px) scale(1.012)}100%{filter:none;transform:none}}
.envelope-scene.opened .envelope-back-flap{animation:softBackFlap .8s ease forwards}
@keyframes softBackFlap{50%{filter:brightness(1.06)}100%{filter:none}}
.confetti-layer{position:fixed;inset:0;z-index:999;pointer-events:none;overflow:hidden}
.confetti-layer span{position:absolute;top:-24px;left:var(--x);width:9px;height:14px;border-radius:3px;opacity:.9;animation:confettiFall var(--duration) ease-in var(--delay) forwards;transform:translateY(-20px) rotate(0deg)}
.confetti-layer span.petal{width:11px;height:16px;border-radius:999px 999px 999px 2px}
@keyframes confettiFall{0%{transform:translateY(-20px) translateX(0) rotate(0deg);opacity:0}12%{opacity:1}100%{transform:translateY(105vh) translateX(var(--drift)) rotate(var(--rotate));opacity:0}}
.full-invitation{animation:cardSettle .8s ease both .08s}
@keyframes cardSettle{from{transform:translateY(14px) scale(.985);opacity:.84}to{transform:none;opacity:1}}
@media(max-width:720px){.envelope-scene{--w:min(360px,88vw);--h:calc(var(--w)*.92)}.calendar-menu{position:absolute;top:calc(100% + 8px);z-index:50}.calendar-option{min-height:52px}.confetti-layer span{width:7px;height:11px}}

/* v11 final polish: preserve invitation image clarity, round top envelope corners, seamless reveal */
:root{
  --envelope-light:#efc4cd;
  --envelope-mid:#dfa8b7;
  --envelope-deep:#c98298;
  --envelope-shadow:#9f526b;
}
.hero{overflow:hidden;}
.envelope-scene{
  --w:min(430px,86vw);
  --h:calc(var(--w)*.9);
  height:calc(var(--h) + 150px);
  animation:gentleEnvelopeBreath 4.2s ease-in-out infinite;
}
@keyframes gentleEnvelopeBreath{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-5px)}
}
.envelope-scene:hover{animation:none;}
.envelope-back{
  border-radius:34px 34px 26px 26px;
  background:linear-gradient(135deg,var(--envelope-light),var(--envelope-deep));
  overflow:hidden;
}
.envelope-back::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(115deg,rgba(255,255,255,.28),transparent 38%,rgba(90,45,57,.08));
}
.envelope-back-flap{
  left:0;
  bottom:calc(52px + var(--h)*.48);
  width:var(--w);
  height:calc(var(--h)*.62);
  transform:none;
  clip-path:polygon(0 100%,50% 0,100% 100%);
  border-radius:36px 36px 0 0;
  background:linear-gradient(145deg,#f4ccd3,#d99cac 72%);
  z-index:2;
  box-shadow:inset 0 12px 22px rgba(255,255,255,.17), inset 0 -16px 30px rgba(108,37,57,.09);
}
.invitation-peek{
  bottom:calc(52px + var(--h)*.27);
  width:67%;
  height:calc(var(--h)*1.12);
  border-radius:16px 16px 8px 8px;
  z-index:4;
  background:#fffaf2;
  opacity:1 !important;
  box-shadow:0 20px 42px rgba(64,22,32,.22);
}
.invitation-peek img{opacity:1 !important;filter:none !important;}
.paper-stack{z-index:3;}
.envelope-pocket{
  background:linear-gradient(150deg,#e6b3c0,#ca8399);
  clip-path:polygon(0 34%,50% 72%,100% 34%,100% 100%,0 100%);
  border-radius:26px;
  border-top-left-radius:34px;
  border-top-right-radius:34px;
  z-index:5;
}
.envelope-side{
  top:auto;
  border-top-left-radius:34px;
  border-top-right-radius:34px;
}
.envelope-side.left{
  background:linear-gradient(138deg,#e4b0bf,#c77d94);
  clip-path:polygon(0 0,100% 72%,0 100%);
  border-radius:34px 0 0 26px;
}
.envelope-side.right{
  background:linear-gradient(218deg,#f1c4cc,#d08ca0);
  clip-path:polygon(100% 0,0 72%,100% 100%);
  border-radius:0 34px 26px 0;
}
.envelope-front-flap{
  background:linear-gradient(180deg,#e7b1bf,#c77f96);
  clip-path:polygon(0 0,50% 100%,100% 0,100% 100%,0 100%);
  border-radius:0 0 26px 26px;
  z-index:7;
  transform-origin:50% 100%;
  backface-visibility:hidden;
}
.wax-dot{background:linear-gradient(145deg,#ce879e,#ac657e);}
.open-hint{bottom:4px;}
.envelope-scene:not(.opened) .invitation-peek{animation:premiumPeek 3.5s ease-in-out infinite;}
@keyframes premiumPeek{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-16px)}}
.envelope-scene:hover .invitation-peek,.envelope-scene:focus-visible .invitation-peek{transform:translateX(-50%) translateY(-38px);animation:none;}
.envelope-scene.opened{animation:none;}
.envelope-scene.opened .open-hint{opacity:0;transform:translateX(-50%) translateY(10px);}
.envelope-scene.opened .wax-dot{opacity:0;transform:translateX(-50%) scale(.6);transition:opacity .18s ease,transform .18s ease;}
.envelope-scene.opened .envelope-front-flap{
  transform:rotateX(178deg) translateY(4px);
  transition:transform .68s cubic-bezier(.22,.8,.22,1);
}
.envelope-scene.opened .envelope-back-flap{
  animation:backFlapGlow .75s ease forwards;
}
@keyframes backFlapGlow{0%,100%{filter:none}45%{filter:brightness(1.05)}}
.envelope-scene.opened .envelope-pocket,.envelope-scene.opened .envelope-side,.envelope-scene.opened .envelope-back,.envelope-scene.opened .envelope-back-flap{
  animation:envelopeSettle .8s ease forwards;
}
@keyframes envelopeSettle{50%{transform:translateY(2px)}100%{transform:none}}
.envelope-scene.opened .invitation-peek{
  animation:cardRevealClean 1.05s cubic-bezier(.18,.86,.2,1) forwards;
}
@keyframes cardRevealClean{
  0%{transform:translateX(-50%) translateY(-22px) scale(1);opacity:1}
  55%{transform:translateX(-50%) translateY(-175px) scale(1.035);opacity:1}
  88%{transform:translateX(-50%) translateY(-190px) scale(1.06);opacity:1}
  100%{transform:translateX(-50%) translateY(-190px) scale(1.06);opacity:0}
}
.content-lock.unlocked{display:block;animation:unlockClean .72s cubic-bezier(.2,.75,.2,1) forwards;}
@keyframes unlockClean{from{opacity:0;transform:translateY(12px) scale(.99)}to{opacity:1;transform:none}}
.full-invitation{animation:none !important;opacity:1 !important;filter:none !important;}
.hero.unlocked-away{display:none!important;}
.guest-details[hidden]{display:none!important;}
.guest-details{overflow:hidden;}
.calendar-menu{z-index:60;}
.confetti-layer{position:fixed;inset:0;z-index:9999;pointer-events:none;overflow:hidden;}
.confetti-layer span{box-shadow:0 1px 2px rgba(90,45,57,.08)}
@media(max-width:720px){
  .envelope-scene{--w:min(350px,90vw);--h:calc(var(--w)*.96);height:calc(var(--h) + 128px)}
  .intro-copy h1{font-size:clamp(2.1rem,11vw,3.2rem)}
  .intro-copy p{max-width:300px;margin-inline:auto;}
  .envelope-back,.envelope-pocket{border-radius:28px;}
  .envelope-back-flap{border-radius:30px 30px 0 0;}
  .envelope-side.left{border-radius:28px 0 0 24px;}
  .envelope-side.right{border-radius:0 28px 24px 0;}
  .invitation-peek{width:69%;height:calc(var(--h)*1.08)}
  .envelope-scene.opened .invitation-peek{animation:cardRevealCleanMobile 1.02s cubic-bezier(.18,.86,.2,1) forwards;}
  @keyframes cardRevealCleanMobile{
    0%{transform:translateX(-50%) translateY(-16px) scale(1);opacity:1}
    65%{transform:translateX(-50%) translateY(-122px) scale(1.035);opacity:1}
    100%{transform:translateX(-50%) translateY(-128px) scale(1.05);opacity:0}
  }
  .calendar-menu{position:absolute;top:calc(100% + 8px);left:0;right:0;min-width:100%;transform:translateY(-6px)}
  .calendar-dropdown.open .calendar-menu{transform:translateY(0)}
}

/* v11 polish: clearer invitation, stronger mobile layout, confirmation actions */
.invitation-card-wrap{
  width:min(720px,96vw) !important;
  margin-bottom:clamp(22px,4vw,34px) !important;
  border-radius:22px !important;
  background:#fff !important;
  box-shadow:0 30px 90px rgba(82,29,43,.22), 0 0 0 1px rgba(255,255,255,.75) !important;
}
.full-invitation{
  width:100% !important;
  image-rendering:auto;
  transform:translateZ(0);
}
.actions-row.final-actions{
  margin:18px 0 0 !important;
  align-items:center;
}
.confirmation-actions[hidden]{display:none!important;}
.confirmation-actions{
  margin-top:18px;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg,rgba(255,250,248,.94),rgba(255,243,239,.88));
  border:1px solid rgba(135,40,69,.13);
  animation:confirmationIn .38s ease both;
}
@keyframes confirmationIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.confirmation-note{
  margin:0;
  text-align:center;
  color:var(--muted);
  font-weight:700;
}
.button{
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-align:center;
  line-height:1.15;
  white-space:normal;
}
.choice-card{
  min-height:58px;
  word-break:normal;
}
.confetti-layer span{
  position:absolute;
  top:-12px;
  left:var(--x);
  width:9px;
  height:15px;
  border-radius:2px;
  animation:confettiFall var(--duration) cubic-bezier(.2,.65,.25,1) var(--delay) forwards;
  transform:translate3d(0,0,0) rotate(0deg);
}
.confetti-layer span.petal{
  width:13px;
  height:9px;
  border-radius:70% 30% 70% 30%;
}
@keyframes confettiFall{
  0%{opacity:0;transform:translate3d(0,-12px,0) rotate(0deg) scale(.8)}
  8%{opacity:1}
  100%{opacity:0;transform:translate3d(var(--drift),105vh,0) rotate(var(--rotate)) scale(1)}
}
@media(max-width:720px){
  .site-shell{width:min(100%,96vw)}
  .content-lock{padding:14px 0 46px !important;}
  .invitation-card-wrap{width:min(100%,98vw) !important;border-radius:18px !important;}
  .rsvp-panel{width:min(100%,96vw) !important;padding:22px 16px !important;border-radius:24px !important;}
  .button,.submit,.calendar-toggle,.map-button{width:100%;min-height:54px;padding:14px 16px;font-size:1rem;}
  .submit{justify-self:stretch !important;}
  .choice-row{gap:10px !important;}
  .choice-card{padding:15px 14px;min-height:56px;}
  .actions-row.final-actions{display:grid;grid-template-columns:1fr;gap:12px;width:100%;}
  .calendar-dropdown{width:100%;display:block;}
  .calendar-menu{position:absolute;top:calc(100% + 8px);left:0;right:0;width:100%;min-width:100%;}
  .calendar-option{min-height:56px;font-size:.98rem;}
  .confirmation-actions{padding:16px 12px;border-radius:20px;}
  .confirmation-note{font-size:.94rem;}
}

/* v15: restored v11 feel with slower, fuller confetti and premium confirmation */
.calendar-toggle-icon{display:none!important;}
.confetti-layer span{
  width:10px!important;
  height:16px!important;
  opacity:.95;
  animation-timing-function:cubic-bezier(.16,.7,.24,1)!important;
}
.confetti-layer span.petal{
  width:14px!important;
  height:10px!important;
  border-radius:75% 30% 75% 30%!important;
}
.professional-confirmation{
  display:grid;
  justify-items:center;
  gap:8px;
  margin:8px 0 0;
  padding:26px 22px;
  min-height:auto;
  border-radius:24px;
  border:1px solid rgba(135,40,69,.14);
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,244,241,.92));
  color:var(--deep)!important;
  box-shadow:0 20px 55px rgba(82,29,43,.13);
  animation:confirmationIn .42s ease both;
}
.confirmation-check{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(135deg,#c995a0,#9f536a);
  color:#fff;
  font-size:1.7rem;
  font-weight:900;
  box-shadow:0 12px 30px rgba(135,40,69,.22);
  animation:checkPop .45s cubic-bezier(.2,1.2,.2,1) both;
}
.confirmation-title{
  display:block;
  font-family:'Playfair Display',serif;
  font-size:clamp(1.45rem,4vw,2rem);
  color:var(--deep);
  line-height:1.1;
}
.confirmation-copy{
  display:block;
  max-width:520px;
  color:var(--muted);
  font-weight:650;
  line-height:1.55;
}
.confirmation-actions{
  margin-top:18px!important;
  padding:22px!important;
}
@keyframes checkPop{0%{transform:scale(.55);opacity:0}70%{transform:scale(1.08);opacity:1}100%{transform:scale(1)}}
@media(max-width:720px){
  .professional-confirmation{padding:22px 14px;border-radius:22px;}
  .confirmation-check{width:48px;height:48px;}
}


/* v16: keep pulled invitation above intro text and guide guests to RSVP */
.hero.is-opening .intro-copy{
  opacity:.16;
  filter:blur(1.5px);
  transform:translateY(-10px) scale(.98);
  transition:opacity .35s ease, filter .35s ease, transform .35s ease;
  pointer-events:none;
}
.hero.is-opening .envelope-scene{
  z-index:40;
}
.hero.is-opening .invitation-peek{
  z-index:80!important;
}
.hero.is-opening .envelope-front-flap{
  z-index:60!important;
}
.rsvp-jump-wrap{
  display:flex;
  justify-content:center;
  margin:-2px auto 28px;
}
.rsvp-jump{
  padding-inline:30px;
  box-shadow:0 16px 36px rgba(135,40,69,.22);
  animation:rsvpButtonPulse 2.8s ease-in-out infinite;
}
@keyframes rsvpButtonPulse{
  0%,100%{transform:translateY(0);box-shadow:0 16px 36px rgba(135,40,69,.22)}
  50%{transform:translateY(-3px);box-shadow:0 20px 42px rgba(135,40,69,.28)}
}
.rsvp-panel{
  scroll-margin-top:24px;
}
@media(max-width:720px){
  .rsvp-jump-wrap{width:100%;margin:0 auto 22px;}
  .rsvp-jump{width:min(100%,96vw);}
  .hero.is-opening .intro-copy{opacity:.08;}
}


/* v17: user-controlled RSVP flow, desktop-visible CTA, no hover/pulse on Continue button */
@media (min-width: 900px){
  .content-lock.unlocked{
    padding-top:18px !important;
  }
  .invitation-card-wrap{
    width:min(560px,88vw) !important;
    margin-bottom:18px !important;
  }
  .rsvp-jump-wrap{
    margin:0 auto 30px !important;
  }
}
.rsvp-jump{
  animation:none !important;
  transform:none !important;
  box-shadow:0 14px 30px rgba(135,40,69,.20) !important;
}
.rsvp-jump:hover,
.rsvp-jump:focus-visible{
  transform:none !important;
  box-shadow:0 14px 30px rgba(135,40,69,.20) !important;
}
@media (max-width:720px){
  .rsvp-jump{
    width:min(420px,96vw) !important;
  }
}

/* v21: mobile envelope spacing fixes */
@media (max-width:720px){
  .hero{
    min-height:100svh;
    gap:12px;
    padding:18px 0 calc(44px + env(safe-area-inset-bottom));
    align-content:center;
  }
  .intro-copy{margin-bottom:2px;}
  .intro-copy .eyebrow{font-size:.68rem;margin-bottom:4px;}
  .intro-copy h1{font-size:clamp(1.9rem,10vw,2.7rem);}
  .intro-copy p{font-size:.9rem;line-height:1.35;margin-top:8px;max-width:280px;}
  .envelope-scene{
    --w:min(330px,88vw);
    --h:calc(var(--w)*.93);
    height:calc(var(--h) + 118px);
  }
  .open-hint{
    bottom:18px;
    width:100%;
    padding-bottom:env(safe-area-inset-bottom);
  }
  .open-hint strong{font-size:.95rem;}
  .open-hint em{font-size:.82rem;}
  @keyframes premiumPeek{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-9px)}}
  .envelope-scene:not(.opened) .invitation-peek{animation:premiumPeek 3.6s ease-in-out infinite;}
}

@media (max-width:720px) and (max-height:740px){
  .hero{gap:8px;padding-top:12px;padding-bottom:calc(34px + env(safe-area-inset-bottom));}
  .intro-copy .eyebrow{display:none;}
  .intro-copy h1{font-size:clamp(1.65rem,8.5vw,2.25rem);}
  .intro-copy p{font-size:.82rem;max-width:260px;margin-top:5px;}
  .envelope-scene{
    --w:min(290px,82vw);
    --h:calc(var(--w)*.91);
    height:calc(var(--h) + 104px);
  }
  .open-hint{bottom:14px;}
  .wax-dot{width:42px;height:42px;font-size:18px;}
}

@media (max-width:380px){
  .envelope-scene{--w:min(285px,84vw);height:calc(var(--h) + 106px);}
  .intro-copy p{max-width:245px;}
}

/* v22: user favicon + cleaner compact envelope preview spacing */
.envelope-scene:not(.opened) .invitation-peek{
  bottom:calc(52px + var(--h)*.12);
  height:calc(var(--h)*1.02);
  width:64%;
  animation:barelyPeek 3.8s ease-in-out infinite;
}
@keyframes barelyPeek{
  0%,100%{transform:translateX(-50%) translateY(0)}
  50%{transform:translateX(-50%) translateY(-6px)}
}
.envelope-scene:hover:not(.opened) .invitation-peek,
.envelope-scene:focus-visible:not(.opened) .invitation-peek{
  transform:translateX(-50%) translateY(-14px);
  animation:none;
}
.envelope-scene:not(.opened) .paper-stack{
  bottom:calc(52px + var(--h)*.20);
  height:calc(var(--h)*.70);
}
.envelope-scene:not(.opened) .wax-dot{
  bottom:calc(52px + var(--h)*.23);
}
@media (max-width:720px){
  .hero{
    min-height:100svh;
    grid-template-rows:auto auto;
    align-content:center;
    gap:14px;
    padding-top:max(16px, env(safe-area-inset-top));
    padding-bottom:calc(58px + env(safe-area-inset-bottom));
  }
  .intro-copy{margin-bottom:0;}
  .intro-copy p{max-width:300px;}
  .envelope-scene{
    --w:min(320px,86vw);
    --h:calc(var(--w)*.90);
    height:calc(var(--h) + 124px);
  }
  .envelope-scene:not(.opened) .invitation-peek{
    bottom:calc(52px + var(--h)*.10);
    width:63%;
    height:calc(var(--h)*.98);
    animation:barelyPeekMobile 3.6s ease-in-out infinite;
  }
  @keyframes barelyPeekMobile{
    0%,100%{transform:translateX(-50%) translateY(0)}
    50%{transform:translateX(-50%) translateY(-5px)}
  }
  .envelope-scene:hover:not(.opened) .invitation-peek,
  .envelope-scene:focus-visible:not(.opened) .invitation-peek{
    transform:translateX(-50%) translateY(-8px);
  }
  .open-hint{
    bottom:18px;
    line-height:1.12;
  }
}
@media (max-width:720px) and (max-height:740px){
  .hero{
    gap:8px;
    padding-top:max(8px, env(safe-area-inset-top));
    padding-bottom:calc(48px + env(safe-area-inset-bottom));
  }
  .intro-copy p{font-size:.8rem;max-width:260px;}
  .envelope-scene{
    --w:min(278px,80vw);
    --h:calc(var(--w)*.88);
    height:calc(var(--h) + 112px);
  }
  .envelope-scene:not(.opened) .invitation-peek{
    bottom:calc(52px + var(--h)*.08);
    height:calc(var(--h)*.94);
  }
  .open-hint{bottom:16px;}
}
@media (max-width:380px){
  .envelope-scene{
    --w:min(270px,82vw);
    height:calc(var(--h) + 108px);
  }
}

/* v23: clean envelope after card exits + smoother reveal */
.envelope-scene .paper-stack{
  transition:opacity .24s ease, transform .46s cubic-bezier(.2,.78,.22,1);
}
.envelope-scene.opened .paper-stack{
  opacity:0 !important;
  transform:translateY(-16px) scaleY(.82);
}
.envelope-scene.opened .invitation-peek{
  box-shadow:0 26px 58px rgba(64,22,32,.24);
  animation:cardRevealSeamless 1.28s cubic-bezier(.18,.88,.2,1) forwards !important;
}
@keyframes cardRevealSeamless{
  0%{transform:translateX(-50%) translateY(-10px) scale(1);opacity:1;filter:none}
  28%{transform:translateX(-50%) translateY(-72px) scale(1.015);opacity:1;filter:none}
  68%{transform:translateX(-50%) translateY(-188px) scale(1.055);opacity:1;filter:none}
  92%{transform:translateX(-50%) translateY(-198px) scale(1.065);opacity:1;filter:none}
  100%{transform:translateX(-50%) translateY(-198px) scale(1.065);opacity:0;filter:none}
}
.envelope-scene.opened .envelope-front-flap{
  transition:transform .9s cubic-bezier(.22,.82,.2,1) !important;
  transform:rotateX(176deg) translateY(6px) !important;
}
.envelope-scene.opened .envelope-pocket,
.envelope-scene.opened .envelope-side,
.envelope-scene.opened .envelope-back,
.envelope-scene.opened .envelope-back-flap{
  animation:cleanEnvelopeSettle 1.05s cubic-bezier(.2,.78,.22,1) forwards !important;
}
@keyframes cleanEnvelopeSettle{
  0%{filter:none}
  38%{filter:brightness(1.045);transform:translateY(3px)}
  100%{filter:none;transform:translateY(0)}
}
.envelope-scene.opened .envelope-back::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,rgba(255,255,255,.16),transparent 44%,rgba(90,45,57,.06));
  opacity:0;
  animation:envelopeCleanSheen .8s ease .18s forwards;
  pointer-events:none;
}
@keyframes envelopeCleanSheen{50%{opacity:1}100%{opacity:0}}
@media(max-width:720px){
  .envelope-scene.opened .invitation-peek{
    animation:cardRevealSeamlessMobile 1.18s cubic-bezier(.18,.88,.2,1) forwards !important;
  }
  @keyframes cardRevealSeamlessMobile{
    0%{transform:translateX(-50%) translateY(-8px) scale(1);opacity:1;filter:none}
    35%{transform:translateX(-50%) translateY(-58px) scale(1.015);opacity:1;filter:none}
    78%{transform:translateX(-50%) translateY(-126px) scale(1.05);opacity:1;filter:none}
    100%{transform:translateX(-50%) translateY(-132px) scale(1.055);opacity:0;filter:none}
  }
}
