/* The invitation is a closed letter from its first rendered frame. */
body.letter-closed.letter-revealing main{visibility:visible}
.envelope-music{position:absolute;top:max(18px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));z-index:8;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #bca17b55;border-radius:50%;background:#fffaf04a;color:#a4885a}
.envelope-music .music-bars{height:15px;gap:3px}
.envelope-music .music-bars i{height:5px;background:#a4885a}
.envelope-music[aria-pressed="true"] .music-bars i{height:13px;animation:equalizer 1.2s ease-in-out infinite alternate}
.envelope-music.is-loading{opacity:.6}
.envelope:not(.is-opening) .envelope-letter{animation:letterInvitation 5.8s ease-in-out infinite}
.envelope:not(.is-opening) .envelope-seal{animation:sealInvitation 4.8s ease-in-out infinite}
.envelope-seal:after{content:"";position:absolute;inset:-9px;border:1px solid #b58b6970;border-radius:50%;pointer-events:none;opacity:0;animation:sealRipple 4.8s ease-out infinite}
.envelope:not(.is-opening) .open-invitation span{animation:invitationArrow 4.8s ease-in-out infinite}
.envelope.is-opening .envelope-seal:after{animation:none;opacity:0}
.envelope.is-opening .envelope-music{opacity:0;pointer-events:none;transition:opacity .35s}
.envelope{transition:opacity .65s ease,visibility .65s}
.envelope.is-opening .envelope-letter{transform:translateY(-66px);opacity:.88}
.envelope.is-opening .envelope-seal{transform:translateY(8px) scale(.92);opacity:0}
.is-backgrounded .envelope-letter,.is-backgrounded .envelope-seal,.is-backgrounded .envelope-seal:after,.is-backgrounded .open-invitation span{animation-play-state:paused!important}
@keyframes letterInvitation{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes sealInvitation{0%,65%,100%{transform:scale(1);box-shadow:0 4px 9px #86624c2e}32%{transform:scale(1.035);box-shadow:0 5px 16px #86624c40}}
@keyframes sealRipple{0%,12%{opacity:0;transform:scale(.88)}28%{opacity:.52}60%,100%{opacity:0;transform:scale(1.32)}}
@keyframes invitationArrow{0%,18%,55%,100%{transform:translate(0,0)}34%{transform:translate(3px,-3px)}}
@media(prefers-reduced-motion:reduce){
  .envelope .envelope-letter,.envelope .envelope-seal,.envelope .envelope-seal:after,.envelope .open-invitation span,.envelope-music .music-bars i{animation:none!important}
  .envelope,.envelope.is-opening .envelope-letter,.envelope.is-opening .envelope-seal{transition:none}
  .envelope.is-opening .envelope-letter{transform:none;opacity:1}
}

/* Keep the mobile composition airy without pushing its date behind the controls. */
@media(max-width:539px){
  .cover-title{padding-top:5px;padding-bottom:19px}
  .cover-lovebirds{width:clamp(140px,40vw,175px);margin-top:5px}
  .cover h1.name-lockup{margin-bottom:7px!important}
  .cover-foot{padding-top:20px;padding-bottom:15px}
  .cover-script{font-size:29px}
  .cover-foot>p{margin-top:11px}
  .cover-foot .scroll-cue{margin-top:5px;height:30px}
  .person-vow,.canton-copy,.venue-address{font-size:12.5px;line-height:2.25}
  .hotel-intro>p:not(.hotel-eyebrow){font-size:12.5px;line-height:2.25}
  .venue-time,.date-time{font-size:13px;line-height:1.9}
  .closing{height:100svh;min-height:0;max-height:none}
  .closing-copy{bottom:calc(var(--dock-clearance) + 64px)}
}
@media(max-width:539px) and (max-height:850px){
  .cover-photo{aspect-ratio:auto;height:min(440px,51svh);object-position:45% 33%}
}
@media(max-width:359px){
  .hotel-photo figcaption span:first-child{display:none}
  .hotel-photo figcaption{font-size:9px}
  .person-vow{letter-spacing:.1px}
  .closing-welcome{font-size:12px;letter-spacing:1px}
}
@media(max-width:539px) and (max-height:620px){
  .closing-copy{bottom:calc(var(--dock-clearance) + 61px)}
  .closing-script{font-size:25px}
  .closing-copy h2{font-size:29px;line-height:1.5;margin-top:10px}
  .closing-welcome{margin-top:9px}
  .closing-copy>p{margin-top:16px}
  .closing-date{margin-top:10px}
}

/* A small reading-size lift; retain the established hierarchy and name artwork. */
.letter-copy{font-size:15px}
.letter-copy .salutation{font-size:14px}
.person-vow,.canton-copy,.venue-address,.hotel-intro>p:not(.hotel-eyebrow){font-size:13.25px}
.photo-heading>p{font-size:12px}
.section-kicker span{font-size:9.5px}
.cover-subtitle{font-size:9.5px}
.date-border h2{font-size:15px}
.venue-time,.date-time{font-size:13.5px}
.text-link{font-size:10.75px}
.primary-button{font-size:12.5px}
.music-label,.story-toggle .story-toggle-label{font-size:10.5px}
.album-controls>p{font-size:9.5px}
.open-invitation{font-size:13.5px}
.envelope-actions .envelope-greeting{font-size:12.5px}
.closing-welcome{font-size:12.75px}
.closing-copy>p{font-size:14.75px}
footer>p{font-size:11.75px}
@media(min-width:540px){
  .letter-copy{font-size:17px}
  .letter-copy .salutation,.person-vow,.canton-copy,.hotel-intro>p:not(.hotel-eyebrow),.photo-heading>p{font-size:15px}
  .venue-address{font-size:16px}
  .date-border h2{font-size:18px}
  .closing-welcome{font-size:16px}
  .closing-copy>p{font-size:19px}
}
@media(max-width:359px){
  .letter-copy{font-size:13.25px}
  .letter-copy .salutation{font-size:13px}
  .date-border h2{font-size:13px}
  .primary-button{font-size:11.75px}
  .envelope-actions .envelope-greeting{font-size:11.5px}
  .closing-copy>p{font-size:12.75px}
}

/* The fixed invitation detail reads as one quiet line of stationery. */
.bottom-bar{
  border-top:1px solid #d7cbb566;
  background:#faf7f0fa;
  box-shadow:0 -4px 22px #66533b06;
  align-items:center;
}
.bottom-date{
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
  min-height:44px;gap:3px;
}
.bottom-date strong{
  font:500 15.5px/1.3 var(--sans);font-variant-numeric:tabular-nums;
  letter-spacing:.8px;color:#6d604b;
}
.bottom-date span{font:10.5px/1.5 var(--sans);letter-spacing:.6px;color:#958670}
.bottom-cta{
  min-width:0;min-height:44px;padding:9px 17px;
  border:1px solid #c5b497;border-radius:26px;
  background:#f1e9db;color:#806c4f;
  font:12px/1.5 var(--sans);letter-spacing:1.5px;gap:7px;
  transition:background-color .25s ease,border-color .25s ease;
}
.bottom-cta svg{width:16px;height:16px;stroke-width:1.25}
.bottom-cta:active{background:#e8dcc7;border-color:#b29a76}
@media(max-width:359px){
  .bottom-bar{padding-left:18px;padding-right:18px}
  .bottom-date strong{font-size:15px;letter-spacing:.6px}
  .bottom-date span{font-size:10px;letter-spacing:.35px}
  .bottom-cta{padding-left:14px;padding-right:14px;letter-spacing:1px}
}
