.finale-scroll > .gift-next { display: flex; width: max-content; max-width: 100%; margin: 24px auto 12px; }
.gift-scroll { height: 100%; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #8d4962 transparent; padding: calc(135px + env(safe-area-inset-top)) 24px calc(55px + env(safe-area-inset-bottom)); }
.gift-content { max-width: 680px; margin: auto; text-align: center; }
.gift .quiet-note { margin-bottom: 24px; }
.gift .display { font-size: clamp(76px, 7.6vw, 112px); line-height: .94; }
.gift-message { color: #dfb9c6; font-size: 12px; line-height: 1.95; white-space: pre-line; overflow-wrap: anywhere; max-width: 440px; margin: 30px auto; }
.gift-code-updated { font-size: 10px; line-height: 1.7; color: #b78a9c; margin: -10px auto 18px; }
#our-photo img { height: auto; object-fit: contain; }
.gift-details { scroll-margin-top: calc(110px + env(safe-area-inset-top)); padding-top: 12px; }
.gift-envelope { width: 76px; height: 57px; fill: none; stroke: #dba0b8; stroke-width: .85; margin: 6px auto 16px; }
.gift-envelope .envelope-heart { fill: #5a1d3b; stroke: #ed9cbb; }
.gift-secret { color: var(--petal); font-family: var(--display); font-size: 29px; line-height: 1.15; margin: 0 auto 28px; }
.pickup-note { max-width: 360px; font-size: 11px; line-height: 1.85; color: #dfb9c6; white-space: pre-line; overflow-wrap: anywhere; margin: 0 auto 23px; }
.qr-button { display: block; width: min(270px, 100%); border: 0; padding: 16px; border-radius: 3px; background: #fff; margin: 0 auto; cursor: zoom-in; box-shadow: 0 12px 60px #0002; }
.qr-button img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; background: #fff; }
#open-gift-code-text { margin: 12px auto 0; }
.gift-afterword { color: var(--muted); font-size: 11px; line-height: 1.85; margin: 31px auto 18px; }
.gift-replay { display: flex; width: max-content; margin: 28px auto 0; }
body[data-scene="5"] .bottomline { opacity: 0; }
body[data-scene="5"] .topbar { background: linear-gradient(var(--night) 45%, transparent); }
body[data-scene="5"] .ambient { background: radial-gradient(ellipse at 50% 32%, #75314755, transparent 65%); }
.waltz-selected .waltz-icon { animation: waltz-sway 3s ease-in-out infinite; transform-origin: 50% 90%; }
.dance-trail { opacity: .5; }
@keyframes waltz-sway { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.scene.entering .gift-content { animation: arrive .85s cubic-bezier(.2,.65,.3,1) both; }
#gift-qr-dialog { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 36px); padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: var(--night); color: var(--petal); box-shadow: 0 30px 120px #0008; overflow-y: auto; }
#gift-qr-dialog::backdrop { background: #0b030be8; backdrop-filter: blur(8px); }
.qr-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.qr-dialog-header h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 27px; line-height: 1.05; }
.qr-dialog-header .icon-button { font-size: 24px; font-weight: 400; }
.qr-dialog-scroll { background: #fff; padding: 18px; border-radius: 2px; }
#gift-qr-large { width: 100%; height: auto; display: block; object-fit: contain; background: #fff; }
#save-gift-code { display: flex; width: max-content; margin: 12px auto 0; text-decoration: none; }
@media (max-width: 700px) {
  .progress { gap: 3px; }
  .progress button { width: 18px; }
  .gift-scroll { padding-top: calc(112px + env(safe-area-inset-top)); padding-left: 26px; padding-right: 26px; }
  .gift .display { font-size: clamp(66px, 18vw, 78px); }
  .gift .quiet-note { font-size: 10px; margin-bottom: 23px; }
  .gift-message { font-size: 11px; margin: 25px auto; }
  .gift-secret { font-size: 26px; }
  .pickup-note { font-size: 11px; }
  .qr-button { width: min(252px, 100%); }
  .gift-afterword { font-size: 10px; }
  #gift-qr-dialog { padding: 18px; }
  .qr-dialog-header h2 { font-size: 25px; }
}
@media (max-height: 640px) and (max-width: 700px) { .gift-scroll { padding-top: calc(95px + env(safe-area-inset-top)); } .gift .display { font-size: 61px; } }
