body.intro-active { overflow: hidden; }
#lovebox-intro {
  --intro-plum: #2d1c38;
  --intro-pink: #f6c4d5;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--intro-plum);
  color: #fff9fb;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: none;
}
#lovebox-intro:not([open]) { display: none; }
#lovebox-intro::backdrop { background: #2d1c38; backdrop-filter: none; }
.intro-shell { min-height: 100%; display: flex; flex-direction: column; isolation: isolate; }
.intro-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: max(25px, env(safe-area-inset-top)) 45px 15px; z-index: 3; }
.intro-brand { display: flex; align-items: center; gap: 6px; font-size: 35px; font-weight: 750; letter-spacing: -2px; }
.intro-brand svg { width: 19px; height: 19px; stroke: var(--intro-pink); }
.intro-skip { min-height: 44px; background: none; border: 0; padding: 10px 0 10px 12px; color: #decfe6; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; }
.intro-stage { position: relative; overflow: clip; width: 100%; max-width: 1350px; margin: auto; flex: 1; display: grid; place-items: center; min-height: 680px; padding: 20px 25px 25px; }
.intro-ribbons { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; fill: none; stroke: var(--intro-pink); stroke-width: 1.5; opacity: .16; z-index: -2; }
.intro-ribbons path:nth-child(2) { stroke: #f6d470; }
.intro-ready { position: relative; text-align: center; width: min(100%, 670px); }
.intro-from { font-size: 16px; color: #dec9e6; margin: 0 0 16px; overflow-wrap: anywhere; }
#lovebox-intro .intro-title { font-size: clamp(46px, 6.5vw, 82px); line-height: .99; font-weight: 650; letter-spacing: -.06em; margin: 0; overflow-wrap: anywhere; }
.intro-name { overflow-wrap: anywhere; }
.intro-present { position: relative; display: block; width: min(100%, 410px); margin: -5px auto -5px; padding: 0; border: 0; border-radius: 20px; background: none; color: inherit; animation: intro-float 4.8s ease-in-out infinite; }
.intro-present .box-art { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 24px 30px #160c2340); }
.intro-present .box-letter { opacity: 0; }
.intro-present .box-lid { transform-box: fill-box; transform-origin: 50% 85%; }
.intro-handnote { position: absolute; right: -30px; top: 50%; max-width: 130px; font: 30px/1.05 var(--hand); color: var(--intro-pink); transform: rotate(10deg); }
.intro-primary { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; max-width: 100%; border: 0; border-radius: 16px; padding: 16px 29px; background: #f6c4d5; color: #38203d; font: 550 17px/1.5 var(--font); box-shadow: 0 5px 0 #a96789; transition: transform .2s, background .2s; }
.intro-primary:hover { background: #ffdfeb; transform: translateY(-2px); }
.intro-primary:disabled { cursor: wait; }
.intro-primary svg { width: 23px; height: 23px; }
#lovebox-intro button:focus-visible { outline: 3px solid #f6d470; outline-offset: 6px; }
.intro-whisper { margin: 22px 0 0; font-size: 15px; color: #d6bfdc; }
.intro-error { font-size: 15px; line-height: 1.6; margin: 12px auto 0; max-width: 390px; color: #ffe28b; overflow-wrap: anywhere; }
.intro-error:empty { display: none; }
.intro-bottom { padding: 15px 24px max(25px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 14px; color: #bca6c7; }
.intro-bottom svg { width: 14px; height: 14px; color: #ed7c99; fill: currentColor; }
.intro-reveal { position: relative; width: min(100%, 600px); text-align: center; z-index: 2; padding: 15px 0 20px; }
.intro-heart { display: inline-grid; place-items: center; margin-bottom: 20px; }
.intro-heart svg { width: 48px; height: 48px; fill: #ec4f5c; stroke: #ec4f5c; stroke-width: 1; }
#lovebox-intro .intro-greeting { font-size: clamp(43px, 6.4vw, 83px); font-weight: 650; line-height: 1.02; letter-spacing: -.06em; margin: 0 auto 23px; overflow-wrap: anywhere; }
.intro-reveal-copy { color: #e1cce8; font-size: 17px; line-height: 1.7; margin: 0 0 29px; }
.intro-signature { color: #f6c4d5; font: 31px/1.25 var(--hand); margin: 29px 0 0; overflow-wrap: anywhere; }
.intro-photo-cloud { position: absolute; inset: 0; overflow: clip; pointer-events: none; z-index: -1; }
.intro-photo { position: absolute; width: clamp(110px, 16vw, 195px); padding: 9px 9px 28px; margin: 0; background: #fff9fb; box-shadow: 0 15px 40px #140b2240; transform: rotate(var(--photo-angle)); animation: intro-photo-in .95s cubic-bezier(.18,.8,.3,1) both; animation-delay: var(--photo-delay, 0ms); }
.intro-photo img { display: block; width: 100%; aspect-ratio: .93; object-fit: cover; background: #d8c7e3; }
.intro-photo-0 { left: 7%; top: 5%; --photo-angle: -12deg; }
.intro-photo-1 { right: 6%; top: 1%; --photo-angle: 11deg; --photo-delay: 80ms; }
.intro-photo-2 { left: 1%; top: 43%; --photo-angle: 7deg; --photo-delay: 140ms; }
.intro-photo-3 { right: 1%; top: 42%; --photo-angle: -9deg; --photo-delay: 200ms; }
.intro-photo-4 { left: 15%; bottom: 0; --photo-angle: -8deg; --photo-delay: 250ms; }
.intro-photo-5 { right: 15%; bottom: 0; --photo-angle: 12deg; --photo-delay: 300ms; }
.intro-confetti { position: absolute; top: 48%; left: 50%; width: 1px; height: 1px; pointer-events: none; z-index: 4; }
.intro-confetti i { position: absolute; width: 7px; height: 14px; background: #f6d470; opacity: 0; border-radius: 2px; }
.intro-confetti i:nth-child(3n) { background: #ec4f5c; width: 10px; height: 10px; border-radius: 50%; }
.intro-confetti i:nth-child(3n+1) { background: #f6c4d5; }
#lovebox-intro[data-phase="opening"] .intro-present { animation: none; }
#lovebox-intro[data-phase="opening"] .box-lid { animation: intro-lid .9s cubic-bezier(.2,.65,.2,1) both; }
#lovebox-intro[data-phase="opening"] .box-letter { animation: intro-letter .9s ease-out both; }
#lovebox-intro[data-phase="opening"] .intro-title { animation: intro-title-away .8s ease both; }
#lovebox-intro[data-phase="celebration"] .intro-reveal { animation: intro-greeting-in .65s ease-out both; }
#lovebox-intro[data-phase="celebration"] .intro-confetti i { animation: intro-confetti 1.5s ease-out both; animation-delay: var(--confetti-delay); }
.site-footer .intro-replay { min-height: 44px; padding: 10px 0; color: #80648e; background: none; border: 0; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.access-changing #workspace { visibility: hidden; }
.access-loading { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 24px; background: #f0ebf6; color: #33233f; font-size: 18px; text-align: center; }
@keyframes intro-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@keyframes intro-lid { 0% { transform: translate(0,0) rotate(0); } 20% { transform: translateY(6px) rotate(-3deg); } 100% { transform: translate(15px,-190px) rotate(-24deg); opacity: 0; } }
@keyframes intro-letter { 0% { opacity: 0; transform: translateY(50px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-150px) rotate(12deg); } }
@keyframes intro-title-away { to { opacity: 0; transform: translateY(-20px); } }
@keyframes intro-photo-in { from { opacity: 0; transform: translateY(65px) rotate(0) scale(.6); } to { opacity: 1; transform: translateY(0) rotate(var(--photo-angle)) scale(1); } }
@keyframes intro-greeting-in { from { opacity: 0; transform: scale(.91); } to { opacity: 1; transform: scale(1); } }
@keyframes intro-confetti { 0% { opacity: 0; transform: translate(0,0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--confetti-x),var(--confetti-y)) rotate(var(--confetti-turn)); } }
@media (max-width: 760px) {
  .intro-top { padding: max(18px, env(safe-area-inset-top)) 23px 10px; gap: 10px; }
  .intro-brand { font-size: 32px; }
  .intro-brand svg { width: 15px; height: 15px; }
  .intro-skip { font-size: 14px; }
  .intro-stage { min-height: 590px; padding: 20px 22px 28px; }
  .intro-from { font-size: 15px; margin-bottom: 20px; }
  #lovebox-intro .intro-title { font-size: clamp(43px, 12vw, 65px); }
  .intro-present { width: min(100%, 345px); margin: 12px auto 4px; }
  .intro-handnote { font-size: 26px; right: -5px; top: 55%; max-width: 96px; }
  .intro-primary { font-size: 16px; min-height: 54px; padding: 15px 23px; }
  .intro-whisper { font-size: 14px; margin-top: 22px; }
  .intro-bottom { font-size: 13px; gap: 10px; padding-top: 8px; }
  .intro-photo { width: 110px; padding: 6px 6px 20px; }
  .intro-photo-0 { left: -11px; top: 0; --photo-angle: -14deg; }
  .intro-photo-1 { right: -12px; top: 0; --photo-angle: 13deg; }
  .intro-photo-2 { left: -40px; top: auto; bottom: 56px; --photo-angle: 9deg; }
  .intro-photo-3 { right: -40px; top: auto; bottom: 56px; --photo-angle: -12deg; }
  .intro-photo-4,.intro-photo-5 { display: none; }
  .intro-reveal { padding: 122px 0 135px; }
  .intro-heart { margin-bottom: 15px; }
  .intro-heart svg { width: 35px; height: 35px; }
  #lovebox-intro .intro-greeting { font-size: clamp(41px, 10.8vw, 59px); line-height: 1.05; margin-bottom: 23px; }
  .intro-reveal-copy { font-size: 16px; margin-bottom: 25px; }
  .intro-signature { font-size: 29px; margin-top: 24px; }
  .site-footer { flex-wrap: wrap; }
  .site-footer .intro-replay { order: 3; width: 100%; text-align: center; }
}
@media (max-height: 730px) and (min-width: 761px) {
  .intro-stage { min-height: 530px; }
  .intro-present { width: 300px; }
  #lovebox-intro .intro-title { font-size: 65px; }
}
@media (max-width: 760px) and (max-height: 730px) {
  .intro-stage { min-height: 465px; padding-top: 13px; padding-bottom: 18px; }
  .intro-from { margin-bottom: 12px; }
  .intro-present { width: 260px; margin: 0 auto; }
  .intro-whisper { margin-top: 18px; }
  .intro-reveal { padding-top: 98px; padding-bottom: 90px; }
  .intro-photo { width: 94px; }
}
@media (prefers-reduced-motion: reduce) {
  #lovebox-intro *, #lovebox-intro *::before, #lovebox-intro *::after { animation: none !important; transition: none !important; }
  .intro-confetti { display: none; }
}
