/* One paper construction: full back, continuous pocket, hinged flap. */
.crafted-envelope{position:relative;width:min(570px,86vw);aspect-ratio:600/380;perspective:1600px;isolation:isolate;filter:drop-shadow(0 20px 26px #4c242327)}
.crafted-back,.crafted-pocket,.crafted-lid{position:absolute;inset:0;pointer-events:none}
.crafted-back{z-index:0;background:#761a29;border-radius:3px}
.crafted-envelope svg{display:block;width:100%;height:100%;overflow:hidden}
.crafted-pocket{z-index:3}.crafted-pocket .fold-lines{position:absolute;inset:0}
.crafted-lid{z-index:4;transform-origin:50% 0.5%;backface-visibility:visible;transform:rotateX(0deg)}
.crafted-card{position:absolute;inset:6% 7% 5%;z-index:2;background:linear-gradient(110deg,#fff9ee,#f8eddb);border:1px solid #dbc6a9;box-shadow:0 4px 14px #30070f22;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;color:var(--ink);opacity:1;transition:transform 1.65s cubic-bezier(.3,0,.25,1) 2.1s}
.crafted-card>span{font-size:clamp(10px,2vw,15px);font-style:italic}.crafted-card>span:last-child{letter-spacing:.16em;font-size:12px;font-style:normal}.crafted-card strong{font-family:'Marck Script',cursive;font-size:clamp(32px,5.5vw,53px);line-height:1.04;font-weight:400}.crafted-card small{font-size:.55em}
.crafted-envelope .crafted-seal{left:50%;top:59%;width:clamp(62px,13vw,91px);height:clamp(62px,13vw,91px);z-index:5;border:2px solid #58301d;border-radius:46% 54% 48% 52% / 52% 44% 56% 48%;background:radial-gradient(ellipse at 28% 20%,#b88050 0%,#865030 25%,#5d301b 55%,#754123 74%,#a86e40 84%,#4c2617 95%);box-shadow:0 4px 6px #260b0c4d,inset 0 0 0 4px #b17b4844,inset 0 0 0 7px #47241977;color:#d3a06c;transition:opacity .65s ease,transform .8s ease}
.crafted-seal svg{width:82%;height:82%;margin:auto;filter:drop-shadow(0 1px 0 #32180f)}
.crafted-envelope .crafted-seal:hover{transform:translate(-50%,-50%) scale(1.045)}
.crafted-envelope .crafted-seal:focus-visible{outline:2px solid #f7e5c8;outline-offset:5px}
.invitation-gate.is-opening .crafted-seal{opacity:0;transform:translate(-50%,-62%) scale(1.07);pointer-events:none}
.invitation-gate.is-opening .crafted-lid{animation:paper-open 2.8s cubic-bezier(.42,0,.22,1) .4s forwards}
.invitation-gate.is-opening .crafted-card{opacity:1;transform:translateY(-54%)}
@keyframes paper-open{0%{transform:rotateX(0deg);z-index:4}49%{z-index:4}50%{z-index:1}100%{transform:rotateX(178deg);z-index:1}}
/* Keep the reverse face opaque throughout the rotation. */
.crafted-lid:before{content:'';position:absolute;inset:0;background:#842332;clip-path:polygon(.3% .5%,99.7% .5%,52.7% 58%,50% 60%,47.3% 58%);z-index:-1}
@media(max-width:600px){.crafted-card{gap:10px}.crafted-card>span:last-child{font-size:10px}.crafted-envelope{width:87vw}}
@media(prefers-reduced-motion:reduce){.invitation-gate.is-opening .crafted-lid{animation:none}.crafted-card,.crafted-envelope .crafted-seal{transition:none}}
/* Watercolor fabric and pearls frame only the introductory envelope screen. */
.envelope-scene{position:relative;isolation:isolate;overflow:hidden}
.gate-decoration{position:absolute;z-index:-1;pointer-events:none;user-select:none}
.gate-decoration svg{display:block;width:100%;height:auto;overflow:hidden}
.gate-decoration-top{width:clamp(240px,40vw,520px);left:-65px;top:-35px;transform:rotate(-13deg)}
.gate-decoration-bottom{width:clamp(190px,27vw,350px);right:-60px;bottom:-65px;transform:rotate(8deg)}
@media(max-width:600px){.gate-decoration-top{width:255px;left:-85px;top:-22px}.gate-decoration-bottom{width:190px;right:-62px;bottom:-48px}.envelope-scene{padding-top:90px;padding-bottom:115px}}
@media(max-height:650px) and (min-width:601px){.gate-decoration-top{width:260px;left:-85px}.gate-decoration-bottom{width:190px;right:-70px}}/* Complete lower drapery and a larger upper corner. */
.gate-decoration-top{width:clamp(350px,53vw,650px);left:-55px;top:-28px;transform:rotate(-8deg)}
.gate-decoration-bottom{width:clamp(230px,34vw,360px);right:18px;bottom:16px;transform:none}
.envelope-scene{padding-bottom:180px;padding-top:135px}
@media(max-width:600px){.gate-decoration-top{width:335px;left:-65px;top:-22px}.gate-decoration-bottom{width:225px;right:14px;bottom:14px}.envelope-scene{padding-top:150px;padding-bottom:175px}}
@media(max-height:650px) and (min-width:601px){.gate-decoration-top{width:350px;left:-60px}.gate-decoration-bottom{width:220px;right:18px;bottom:14px}.envelope-scene{padding-top:130px;padding-bottom:170px}}/* A larger dedication and the complete supplied corner illustration. */
.envelope-scene{padding-top:185px;padding-bottom:190px}
.envelope-kicker{font-size:27px;line-height:1.4;margin:0 0 40px}
.gate-decoration-bottom{width:clamp(220px,31vw,320px);right:14px;bottom:12px;transform:none}
.gate-decoration-bottom img{display:block;width:100%;height:auto}
@media(max-width:600px){.envelope-scene{padding-top:180px;padding-bottom:205px}.envelope-kicker{font-size:23px;margin-bottom:32px}.gate-decoration-bottom{width:205px;right:10px;bottom:10px}}
@media(max-height:650px) and (min-width:601px){.envelope-scene{padding-top:170px;padding-bottom:195px}.gate-decoration-bottom{width:205px}}