
.text-content-wrapper {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem; border-radius: 18px;
}

/* ---------- Photo scene ---------- */
.photo-wrapper { width: 100%; height: 100%; position: absolute; inset: 0; }
.full-screen-photo {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s var(--ease-silk);
  cursor: zoom-in;
}
.scene-container.active .full-screen-photo { transform: scale(1.0); }
.full-screen-photo.zoomable.zoomed { transform: scale(1.32); cursor: zoom-out; }
.dark-gradient-overlay {
  position: absolute; inset: 0; background: var(--overlay-gradient);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 3.5rem 2rem; pointer-events: none;
}
.photo-scene::after {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px; pointer-events: none; z-index: 3;
}

/* ---------- Video scene ---------- */
.video-wrapper { width: 100%; height: 100%; position: absolute; inset: 0; background: #000; }
.story-video { width: 100%; height: 100%; object-fit: cover; }
.video-controls {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.28); opacity: 0; transition: opacity 0.4s ease; z-index: 10;
}
.video-scene.active:hover .video-controls,
.video-scene.active .video-controls.show { opacity: 1; }
.play-pause-btn {
  background: rgba(20,8,14,0.6); border: 1.5px solid rgba(255,255,255,0.75); color: white;
  border-radius: 50%; width: 68px; height: 68px; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform 0.3s var(--ease-soft);
  backdrop-filter: blur(6px);
}
.play-pause-btn:hover { transform: scale(1.1); }

/* ---------- Letter scene ---------- */
.letter-scene { padding-top: 1rem; }
.envelope-wrapper {
  position: relative; width: 280px; height: 180px; cursor: pointer;
  perspective: 1200px; z-index: 10; margin-top: 20px;
  animation: envelopeInvite 3.2s ease-in-out infinite;
}
.envelope-wrapper.is-open { animation: none; cursor: default; }
.envelope-hint {
  position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-ui); font-style: italic; font-size: 1rem;
  color: var(--text-muted); letter-spacing: 0.03em;
  width: max-content; max-width: min(90vw, 320px); text-align: center;
  opacity: 0; animation: fadeRiseIn 1s var(--ease-silk) 0.6s forwards;
  transition: opacity 0.5s ease;
}
.envelope-wrapper.is-open .envelope-hint { opacity: 0 !important; }

.envelope-body {
  position: absolute; inset: 0; background: linear-gradient(160deg, var(--envelope-color), var(--envelope-shadow));
  border-radius: 8px; box-shadow: 0 18px 40px rgba(0,0,0,0.55); z-index: 2;
  display: flex; justify-content: center; align-items: center;
}
.envelope-flap {
  position: absolute; top: 0; left: 0; width: 100%; height: 110px;
  background: linear-gradient(160deg, #d8c4a4, #bca08b);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; z-index: 4;
  transition: transform 1s var(--ease-silk);
}
.envelope-wrapper.is-open .envelope-flap { transform: rotateX(180deg); z-index: 1; }

.letter-paper {
  position: absolute; top: 10px; left: 10px; right: 10px; height: 340px;
  background: linear-gradient(170deg, var(--letter-bg), var(--letter-bg-2));
  z-index: 2; transition: all 1.3s var(--ease-silk);
  border-radius: 3px; padding: 2.2rem 1.75rem; box-shadow: 0 10px 34px rgba(0,0,0,0.4);
  overflow-y: auto; opacity: 0;
}
.envelope-wrapper.is-open .letter-paper {
  transform: translateY(-220px) rotate(-0.4deg); z-index: 5; opacity: 1; cursor: auto;
}
.seal {
  position: absolute; top: 85px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; background: radial-gradient(circle at 35% 30%, #b5233a, #7c0f22);
  border-radius: 50%; z-index: 5; transition: opacity 0.4s;
  display: flex; align-items: center; justify-content: center; color: #ffe9c7;
  font-weight: 600; font-family: var(--font-display); font-size: 0.85rem;
  animation: sealGlow 2.6s ease-in-out infinite;
}
.envelope-wrapper.is-open .seal { opacity: 0; pointer-events: none; }
.letter-signoff { margin-top: 1.4rem; font-family: var(--font-hand); font-size: 1.9rem; color: #6b3a24; }
.letter-title { font-family: var(--font-hand); font-size: 1.7rem; color: #6b3a24; margin-bottom: 0.6rem; }
.letter-voice-notes { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.2rem; }
.letter-voice-btn {
  align-self: flex-start; padding: 8px 16px; border-radius: 20px;
  background: rgba(107,58,36,0.12); border: 1px solid rgba(107,58,36,0.3);
  color: #6b3a24; font-family: var(--font-ui); font-size: 0.9rem; cursor: pointer;
}
.letter-voice-btn:hover { background: rgba(107,58,36,0.2); }

.letter-continue-btn {
  margin-top: 2rem; padding: 12px 30px; border-radius: 30px;
  background: var(--primary-strong); color: #fff; border: none;
  font-family: var(--font-ui); font-size: 1.05rem; letter-spacing: 0.02em;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.8s ease 0.4s, transform 0.3s var(--ease-soft);
  box-shadow: 0 8px 22px rgba(201,67,90,0.4);
}
.letter-continue-btn.visible { opacity: 1; pointer-events: auto; }
.letter-continue-btn:hover { transform: translateY(-2px); }

/* ---------- Interactive scene ---------- */
.interactive-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; position: relative; z-index: 5; text-align: center; }
.interactive-hint {
  font-family: var(--font-ui); font-style: italic; font-size: 1rem;
  color: var(--text-muted); margin-bottom: 1.6rem; opacity: 0;
  animation: fadeRiseIn 1s var(--ease-silk) 0.4s forwards;
  transition: opacity 0.4s ease;
}
.interactive-item { cursor: pointer; transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275); user-select: none; animation: gentleBreath 3.4s ease-in-out infinite; }
.interactive-item:active { transform: scale(0.92); }
.heart-icon { font-size: 78px; filter: drop-shadow(0 0 22px rgba(232,137,154,0.65)); }
.gift-box, .flower-icon, .star-icon { font-size: 78px; filter: drop-shadow(0 0 16px rgba(232,194,122,0.4)); }
.interactive-message {
  margin-top: 28px; font-family: var(--font-display); font-style: italic; font-size: 1.55rem;
  opacity: 0; transform: translateY(12px); transition: all 0.7s var(--ease-silk);
  max-width: 520px; text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.interactive-message.visible { opacity: 1; transform: translateY(0); }
.continue-btn {
  margin-top: 28px; padding: 12px 30px; background: var(--primary-strong);
  border: none; border-radius: 30px; color: white; font-family: var(--font-ui);
  font-size: 1.05rem; opacity: 0; cursor: pointer; transition: all 0.5s ease; pointer-events: none;
  box-shadow: 0 8px 22px rgba(201,67,90,0.4);
}
.continue-btn.visible { opacity: 1; pointer-events: auto; }
.continue-btn:hover { transform: translateY(-2px); }
.floating-heart { position: absolute; font-size: 22px; opacity: 0; pointer-events: none; z-index: 20; }

/* ---------- Ending scene ---------- */
.ending-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; position: relative; text-align: center; z-index: 5; padding: 2rem; }
.ending-title {
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 600;
  margin: 0 0 1rem; color: #ffd9e2; text-shadow: 0 2px 16px rgba(0,0,0,0.85);
  opacity: 0; animation: fadeRiseIn 1.1s var(--ease-silk) 0.2s forwards, glowPulse 5s ease-in-out 1.4s infinite;
}
.ending-subtitle {
  font-family: var(--font-body); font-style: italic; font-size: 1.35rem;
  margin-bottom: 1.6rem; max-width: 560px; line-height: 1.6; color: #f3e9e6;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  opacity: 0; animation: fadeRiseIn 1.1s var(--ease-silk) 0.9s forwards;
}
.ending-credit {
  font-family: var(--font-hand); font-size: 1.6rem; color: var(--accent-gold);
  margin-bottom: 2.4rem; opacity: 0; animation: fadeRiseIn 1.1s var(--ease-silk) 1.5s forwards;
}
.ending-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; opacity: 0; animation: fadeRiseIn 1.1s var(--ease-silk) 2s forwards; }
.ending-btn { padding: 13px 26px; border-radius: 30px; font-family: var(--font-ui); font-size: 1.05rem; cursor: pointer; border: none; transition: all 0.35s var(--ease-soft); }
.ending-btn.primary { background: var(--primary-strong); color: white; box-shadow: 0 8px 22px rgba(201,67,90,0.4); }
.ending-btn.secondary { background: rgba(255,255,255,0.1); color: white; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.2); }
.ending-btn:hover { transform: translateY(-2px); }

.bg-floating-heart { position: absolute; font-size: 18px; pointer-events: none; animation: floatBgHeart 7s linear infinite; opacity: 0.65; }
@keyframes floatBgHeart { 0% { transform: translateY(100vh) scale(0.8); opacity: 0; } 15% { opacity: 0.75; } 100% { transform: translateY(-20vh) scale(1.15); opacity: 0; } }

.farewell-overlay {
  position: fixed; inset: 0; background: #0d0508; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 1.4s var(--ease-silk);
}
.farewell-overlay.visible { opacity: 1; pointer-events: auto; }
.farewell-text { font-family: var(--font-hand); font-size: 2.4rem; color: var(--accent-gold); text-align: center; opacity: 0; transform: translateY(10px); transition: all 1.2s var(--ease-silk) 0.5s; }
.farewell-overlay.visible .farewell-text { opacity: 1; transform: translateY(0); }
