@charset "UTF-8";

:root {
  --ivory: #fbf6f1;
  --blush: #f6d5dc;
  --rose: #e7b0ba;
  --champagne: #f3e6d4;
  --gold: #c4a574;
  --burgundy: #6b2d3c;
  --wine: #8c3a4a;
  --ink: #3c2730;
  --pad: 20px;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --script: "Dancing Script", "Segoe Script", cursive;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  background: #f6ebe6;
  transition: background 0.8s ease;
  -webkit-tap-highlight-color: transparent;
}

body[data-scene="welcome"] { background: #f7e7e6; }
body[data-scene="listen"] { background: #f8f1ea; }
body[data-scene="apology"] { background: #efe6ea; }
body[data-scene="gallery"] { background: #f6ece4; }
body[data-scene="letter"] { background: #f3e0dc; }
body[data-scene="question"] { background: #f8eee9; }
body[data-scene="finale"] { background: #f4e3e4; }

button,
a {
  font-family: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

::selection {
  background: #f0c2cb;
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

.atmosphere,
.vignette,
#gold,
.gold-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.atmosphere { z-index: 0; overflow: hidden; }
.vignette {
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(90, 48, 58, 0.08) 100%);
}
#gold { z-index: 1; width: 100%; height: 100%; }
#gold[hidden] { display: none !important; }

.gold-flash {
  z-index: 6;
  opacity: 0;
  background: radial-gradient(circle at 50% 40%, rgba(243, 214, 168, 0.62), transparent 58%);
}
.gold-flash.is-on { animation: goldPulse 1.6s ease forwards; }

@keyframes goldPulse {
  0% { opacity: 0; }
  28% { opacity: 1; }
  100% { opacity: 0; }
}

.glow {
  position: absolute;
  width: 78vw;
  height: 78vw;
  border-radius: 50%;
  will-change: transform;
}
.glow-a {
  top: -18vw;
  left: -24vw;
  background: radial-gradient(circle, rgba(244, 190, 198, 0.95), rgba(244, 190, 198, 0) 68%);
}
.glow-b {
  right: -28vw;
  bottom: -20vw;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(243, 214, 176, 0.9), rgba(243, 214, 176, 0) 68%);
}

.petal,
.floating-heart {
  position: absolute;
  top: -12vh;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.petal {
  width: 13px;
  height: 17px;
  border-radius: 80% 10% 75% 15%;
  background: linear-gradient(135deg, #f8d5dc, #d9899a);
  opacity: 0.8;
}

.floating-heart {
  width: 12px;
  height: 12px;
}
.floating-heart i {
  display: block;
  width: 10px;
  height: 10px;
  background: #c45c6e;
  transform: rotate(45deg);
  opacity: 0.55;
  position: relative;
}
.floating-heart i::before,
.floating-heart i::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: inherit;
}
.floating-heart i::before { top: -5px; left: 0; }
.floating-heart i::after { left: -5px; top: 0; }

@keyframes fall {
  0% { transform: translate3d(0, -12vh, 0) rotate(0deg); opacity: 0; }
  12% { opacity: var(--op, 0.75); }
  100% { transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin)); opacity: 0.15; }
}

.chapters {
  position: fixed;
  z-index: 40;
  top: calc(18px + env(safe-area-inset-top));
  left: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.chapters span {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(107, 45, 60, 0.28);
  transition: width 0.35s var(--ease), background 0.35s ease;
}
.chapters span.is-current {
  width: 16px;
  background: var(--wine);
}

.music-btn {
  position: fixed;
  z-index: 40;
  top: calc(10px + env(safe-area-inset-top));
  right: 14px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 250, 247, 0.62);
  color: var(--burgundy);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(107, 45, 60, 0.08);
  display: grid;
  place-items: center;
}
.music-btn .icon { width: 20px; height: 20px; }
.music-btn .slash {
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(-42deg);
}
.music-btn.is-on .slash { display: none; }
.music-btn.is-on::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(140, 58, 74, 0.35);
  animation: ring 2.6s ease-out infinite;
}
@keyframes ring {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.18); opacity: 0; }
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #f6ebe4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.veil.is-on {
  opacity: 0.72;
  pointer-events: auto;
}

.stage {
  position: relative;
  z-index: 2;
  height: 100%;
}

.scene {
  display: none;
  position: relative;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 58, 74, 0.35) transparent;
}
.scene.is-active {
  display: flex;
  flex-direction: column;
}
body.lightbox-open .scene.is-active { overflow: hidden; }

.scene-inner {
  width: min(100%, 520px);
  margin: 0 auto auto;
  padding: calc(58px + env(safe-area-inset-top)) var(--pad) calc(28px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.scene-welcome .scene-inner {
  padding-top: calc(18px + env(safe-area-inset-top));
}

.welcome-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.scene-welcome .bouquet { animation: bouquetIn 1.2s var(--ease) both; }
.scene-welcome .bouquet.is-blooming {
  animation: flowerOpen 1.05s var(--ease) forwards;
  transform-origin: 50% 72%;
}
@keyframes flowerOpen {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1.06); }
}
@keyframes bouquetIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bouquet { position: relative; }
.scene-welcome .bouquet::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 78%;
  height: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 226, 230, 0.95), transparent 70%);
  z-index: -1;
}
.bouquet svg {
  width: auto;
  height: min(40vh, 390px);
  max-width: 88vw;
  display: block;
  margin: 0 auto;
  overflow: visible;
}
.bouquet-sway {
  animation: sway 7.5s ease-in-out infinite;
  transform-origin: 50% 86%;
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.6deg); }
}

.rose-bloom {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.74);
  transition: transform 1.25s var(--ease);
}
.bouquet.is-blooming .rose-bloom { transform: scale(1); }
.p-out {
  opacity: 0.25;
  transition: opacity 0.45s ease;
}
.bouquet.is-blooming .p-out { opacity: 1; }
.p-out { fill: #f0b7c2; }
.p-in { fill: #c45c72; }
.rose-left .p-out { fill: #e7a3b2; }
.rose-right .p-out { fill: #f3c9c4; }
.rose-bud .p-out { fill: #d9899c; }
.rose-core { fill: #6e2436; }
.rose-heart { fill: #f6d5c8; }
.leaf { fill: #7f9a78; }
.leaf-soft { fill: #a8c0a0; }
.stem { fill: none; stroke: #3e5a45; stroke-width: 3; stroke-linecap: round; }
.wrap { fill: #f6eadf; }
.wrap-shade { fill: #e7d3c3; }
.ribbon { stroke: #7a3144; stroke-width: 7; stroke-linecap: round; }
.bow { fill: #8c3a4a; }
.breath { fill: #fffaf8; }
.ground-shadow { fill: rgba(107, 45, 60, 0.12); }

.scene-finale .bouquet {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.scene-finale .bouquet svg {
  height: min(82vh, 820px);
  max-width: none;
}

.her-name {
  margin: 0;
  font-size: clamp(2.1rem, 9vw, 2.8rem);
  color: var(--wine);
}
.her-name[hidden] { display: none !important; }

.whisper {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.42rem, 5.8vw, 1.95rem);
  line-height: 1.35;
  color: #5c2a36;
}
.welcome-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 6px;
  max-width: 22rem;
}
.welcome-actions {
  width: min(100%, 360px);
  margin-top: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
}
.reveal:not(.is-in) { pointer-events: none; }
.reveal.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 1s ease, transform 1s var(--ease);
}

.glass {
  background: rgba(255, 250, 247, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  padding: 26px 20px 22px;
  box-shadow: 0 18px 46px rgba(107, 45, 60, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ornament span {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.ornament i {
  font-style: normal;
  color: var(--wine);
  font-size: 13px;
}

.scene-title {
  margin: 0 0 16px;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 8.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--burgundy);
}
.script,
.gallery-title,
.letter-greet,
.letter-sign,
.emphasis,
.lightbox-caption,
.pocket-label,
.her-name {
  font-family: var(--script);
  font-weight: 600;
  font-style: normal;
  line-height: 1.35;
}

.gallery-title {
  font-size: clamp(2.15rem, 9vw, 3.1rem);
  margin-bottom: 4px;
  color: var(--burgundy);
}

.prose p,
.finale-body p,
.response p {
  margin: 0 0 0.9rem;
  font-size: 1.2rem;
  line-height: 1.62;
  font-weight: 500;
}
.prose p:last-child,
.response p:last-child { margin-bottom: 0; }

.emphasis {
  text-align: center;
  color: var(--wine);
  font-size: 1.85rem !important;
  line-height: 1.35;
  margin: 0.4rem 0 1rem !important;
}

.typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.95em;
  margin-left: 2px;
  background: var(--wine);
  vertical-align: text-bottom;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #8f3d4e 0%, #6b2d3c 100%);
  color: #fffaf7;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  box-shadow:
    0 10px 24px rgba(107, 45, 60, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.7s ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { cursor: default; }
.btn.is-waiting:not(.is-ready),
.btn.is-waiting:not(.is-ready):disabled {
  opacity: 0;
  pointer-events: none;
}
.btn.is-chosen {
  box-shadow:
    0 0 0 2px #fffaf7,
    0 0 0 4px rgba(140, 58, 74, 0.55),
    0 10px 24px rgba(107, 45, 60, 0.18);
}
.welcome-actions .btn,
.choices .btn { margin-top: 0; }
#w-btn.is-in { animation: ctaGlow 3.2s ease-in-out infinite; }
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 10px 24px rgba(107, 45, 60, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
  50% { box-shadow: 0 12px 28px rgba(140, 58, 74, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heart-wrap {
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
  position: relative;
}
.heart-wrap::before {
  content: "";
  position: absolute;
  width: min(62vw, 220px);
  height: min(62vw, 220px);
  background: radial-gradient(circle, rgba(232, 170, 178, 0.55), transparent 68%);
}
.apology-heart {
  width: min(46vw, 190px);
  height: auto;
  position: relative;
  filter: drop-shadow(0 12px 18px rgba(140, 58, 74, 0.16));
}
.scene-apology.is-active .apology-heart { animation: heartbeat 3s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  16% { transform: scale(1.045); }
  30% { transform: scale(1); }
  46% { transform: scale(1.03); }
}
.heart-path {
  fill: #c45c6e;
  fill-opacity: 0;
  stroke: var(--wine);
  stroke-width: 0.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.drop {
  position: absolute;
  top: -12%;
  width: 1.5px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, rgba(96, 112, 130, 0.42));
  animation-name: rain;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes rain {
  to { transform: translateY(120vh); }
}

.scene-gallery .gallery {
  position: relative;
  margin-inline: calc(var(--pad) * -1);
  padding: 16px calc(50% - min(34vw, 120px)) 6px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc(50% - min(34vw, 120px));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }

.polaroid {
  flex: 0 0 auto;
  width: min(68vw, 240px);
  scroll-snap-align: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  animation: rise 0.85s var(--ease) both;
}
.polaroid:nth-child(2) { animation-delay: 0.08s; }
.polaroid:nth-child(3) { animation-delay: 0.16s; }
.polaroid:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.polaroid-tilt {
  display: block;
  background: #fffaf7;
  padding: 10px 10px 14px;
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(80, 40, 50, 0.12);
  position: relative;
}
.polaroid:nth-child(odd) .polaroid-tilt { transform: rotate(-1.6deg); }
.polaroid:nth-child(even) .polaroid-tilt { transform: rotate(1.5deg); }
.polaroid:active .polaroid-tilt { transform: rotate(0deg) scale(0.985); }
.polaroid-tilt::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 52px;
  height: 16px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 248, 240, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 8px rgba(107, 45, 60, 0.05);
}
.polaroid-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(165deg, #f8e6e2, #e7c4bc 55%, #f3e6d4);
  display: grid;
  place-items: center;
}
.polaroid-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.polaroid-photo img.is-loaded { opacity: 1; transition: opacity 0.45s ease; }
.placeholder-art { width: 78%; height: auto; }
.polaroid-note {
  display: block;
  min-height: 3.2rem;
  padding: 12px 8px 4px;
  font-family: var(--script);
  font-size: 1.2rem;
  line-height: 1.25;
  color: var(--burgundy);
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(107, 45, 60, 0.25);
}
.dot.is-current { background: var(--wine); transform: scale(1.25); }

.scene-cta { width: min(100%, 360px); margin: 8px auto 0; }

.envelope {
  display: block;
  width: min(86vw, 340px);
  margin: 18px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  perspective: 900px;
}
.envelope-card {
  position: relative;
  display: block;
  height: 196px;
  border-radius: 12px;
  background: linear-gradient(165deg, #fbf6ef, #ecd9c8);
  box-shadow:
    0 18px 40px rgba(90, 40, 50, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
}
.flap {
  position: absolute;
  inset: 0 0 auto 0;
  height: 118px;
  background: linear-gradient(180deg, #f7d9d4, #e8b7b4);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: center top;
  transition: transform 0.9s var(--ease);
  z-index: 2;
  backface-visibility: hidden;
}
.envelope.is-open .flap { transform: rotateX(188deg); }
.seal {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 92px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c26476, #6b2d3c 72%);
  box-shadow: 0 8px 14px rgba(80, 20, 30, 0.25);
  transform: translateX(-50%);
  animation: sealPulse 2.8s ease-in-out infinite;
}
.seal::before {
  content: "♥";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f8e6e2;
  font-size: 18px;
}
@keyframes sealPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}
.envelope.is-open .seal {
  animation: none;
  opacity: 0;
  transform: translateX(-50%) scale(0.45);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.pocket-label {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 22px;
  text-align: center;
  font-size: 1.45rem;
  color: var(--burgundy);
  transition: opacity 0.4s ease;
}
.envelope.is-open .pocket-label { opacity: 0; }
@media (hover: hover) {
  .envelope:hover .envelope-card { transform: translateY(-3px); }
}

.sheet-clip {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 1s var(--ease), margin-top 1s var(--ease);
}
.letter-block.is-open .sheet-clip {
  grid-template-rows: 1fr;
  margin-top: 18px;
}
.letter-sheet {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 180, 184, 0.38), transparent 30%),
    linear-gradient(180deg, #fffaf6, #fbf3ea);
  border-radius: 18px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 36px rgba(80, 40, 50, 0.08);
  transition: opacity 0.8s ease 0.2s, transform 0.8s var(--ease) 0.2s, padding 0.8s ease;
}
.letter-block.is-open .letter-sheet {
  opacity: 1;
  transform: none;
  padding: 22px 18px 8px;
}
.letter-greet {
  font-size: 2rem;
  color: var(--wine);
  margin: 0 0 10px;
}
.letter-sheet p {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.16rem;
  line-height: 1.55;
  color: #3c2730;
}
.letter-close {
  margin-top: 1.1rem !important;
  font-style: italic;
}
.letter-sign {
  font-size: 1.85rem;
  color: var(--wine);
  margin-top: 0 !important;
}

.ask {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 5.4vw, 1.7rem);
  line-height: 1.4;
  color: #5c2a36;
}

.response {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 250, 247, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.75);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
}
.response:empty { display: none; }
.response.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s var(--ease);
}
.response p {
  font-size: 1.12rem;
  line-height: 1.5;
}

.finale-card {
  background: rgba(255, 250, 247, 0.64);
}
.finale-lines p {
  margin: 0 0 8px;
  text-align: center;
  font-style: italic;
  font-size: 1.28rem;
  font-weight: 500;
}
.finale-body { text-align: center; margin-bottom: 4px; }
.finale-body p { margin-bottom: 0.7rem; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  align-content: center;
  padding: 72px 20px 28px;
  background: rgba(42, 24, 30, 0.74);
}
.lightbox.is-open { display: grid; }
.lightbox-glow {
  position: absolute;
  width: min(92vw, 440px);
  height: min(92vw, 440px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 214, 168, 0.62), rgba(232, 160, 170, 0.12) 46%, transparent 70%);
  pointer-events: none;
}
.lightbox-frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}
.lightbox-frame img,
.lightbox-frame .placeholder-art {
  max-width: min(86vw, 420px);
  max-height: 62dvh;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #f6e4df;
}
.lightbox-frame .placeholder-art {
  width: min(78vw, 340px);
  padding: 28px;
}
.lightbox-caption {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  max-width: 18rem;
  text-align: center;
  color: #fffaf7;
  font-size: 1.7rem;
}
.lightbox-close {
  position: absolute;
  z-index: 2;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 247, 0.92);
  color: var(--burgundy);
  font-size: 28px;
  line-height: 1;
}

.noscript {
  position: fixed;
  z-index: 80;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--ivory);
  text-align: center;
  box-shadow: 0 10px 30px rgba(80, 40, 50, 0.12);
}

body.is-paused .petal,
body.is-paused .floating-heart,
body.is-paused .drop,
body.is-paused .bouquet-sway {
  animation-play-state: paused;
}

body.is-blooming .welcome-copy {
  opacity: 0.28;
  transition: opacity 0.7s ease;
}

@media (min-width: 390px) {
  :root { --pad: 24px; }
}
@media (min-width: 430px) {
  :root { --pad: 26px; }
  .prose p,
  .letter-sheet p { font-size: 1.26rem; }
  .glass { padding: 28px 24px 24px; }
}
@media (min-height: 780px) {
  .scene-welcome .scene-inner {
    padding-top: calc(5vh + env(safe-area-inset-top));
  }
  .bouquet svg { height: min(42vh, 420px); }
}
@media (max-height: 700px) {
  .bouquet svg { height: min(32vh, 270px); }
  .whisper { font-size: 1.32rem; }
  .apology-heart { width: min(34vw, 140px); }
}
@media (min-width: 768px) {
  .scene-inner { width: min(100%, 480px); }
  .scene-gallery .scene-inner { width: min(100%, 860px); }
  .glass { padding: 32px 30px 26px; }
  .petal { width: 15px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .petal,
  .floating-heart,
  .drop { display: none !important; }
  .bouquet-sway,
  .music-btn.is-on::after,
  .seal,
  .apology-heart { animation: none !important; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
