:root {
  --hot-pink: #FF1493;
  --neon-pink: #FF2A85;
  --blush-rose: #FF69B4;
  --soft-petal-pink: #FFB6C1;
  --fairy-pink: #FFF0F5;
  --creamy-blush: #FFF8FA;
  --deep-velvet-rose: #590D22;
  --dark-crimson: #380415;
  
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-hand: 'Sacramento', cursive;
  --font-letter: 'Dancing Script', cursive;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  
  --smooth-glide: cubic-bezier(0.22, 1, 0.36, 1);
  --cinematic-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hidden {
  display: none !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--creamy-blush);
  color: var(--deep-velvet-rose);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  transition: background-color 1.2s ease;
}

body.dark-mosaic-mode {
  background-color: #070608 !important;
  color: #fff !important;
  overflow-y: auto !important;
}

body.finale-mode {
  background-color: #050308 !important;
  color: #fff !important;
  overflow: hidden !important;
}

/* Ambient Canvas (Full Viewport - Behind content) */
#ambientCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1 !important;
}

/* Atmospheric Glow Stage */
.light-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 45%, #FFFFFF 0%, #FFF0F5 45%, #FFE4ED 75%, #FFD6E5 100%);
  overflow: hidden;
  transition: opacity 1.2s ease;
}

.light-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.orb-primary {
  width: 680px; height: 680px;
  background: radial-gradient(circle, rgba(255, 105, 180, 0.35) 0%, rgba(255, 20, 147, 0.16) 55%, transparent 75%);
  top: -150px; left: -120px;
  animation: driftAmbient 16s ease-in-out infinite alternate;
}

.orb-secondary {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255, 42, 133, 0.3) 0%, rgba(255, 182, 193, 0.15) 55%, transparent 75%);
  bottom: -150px; right: -100px;
  animation: driftAmbient 14s ease-in-out infinite alternate-reverse;
}

.orb-tertiary {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(255, 182, 193, 0.3) 0%, rgba(255, 105, 180, 0.1) 50%, transparent 80%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: breatheAura 8s ease-in-out infinite alternate;
}

.orb-quaternary {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255, 20, 147, 0.22) 0%, transparent 70%);
  top: 15%; right: 12%;
  animation: driftAmbient 12s ease-in-out infinite alternate;
}

@keyframes driftAmbient {
  0% { transform: translate(0, 0); }
  100% { transform: translate(35px, 25px); }
}

@keyframes breatheAura {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.95; }
}

.grain-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(89, 13, 34, 0.035) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.75;
}

.vignette-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(89, 13, 34, 0.06) 100%);
}

.app-container {
  position: relative;
  z-index: 5 !important;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.camera-impact-shake {
  animation: cameraRumble 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes cameraRumble {
  10%, 90% { transform: translate3d(-3px, 2px, 0) rotate(-0.5deg); }
  20%, 80% { transform: translate3d(4px, -3px, 0) rotate(0.8deg); }
  30%, 50%, 70% { transform: translate3d(-5px, 4px, 0) rotate(-0.8deg); }
  40%, 60% { transform: translate3d(5px, -4px, 0) rotate(0.5deg); }
}

.scene {
  display: none;
  width: 100%;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s var(--cinematic-ease), transform 0.8s var(--cinematic-ease);
}

.scene.active {
  display: flex;
  opacity: 1;
}

/* SCREEN 1 */
.opening-stage {
  position: relative;
  max-width: 700px;
  width: 100%;
  text-align: center;
  padding: 1rem 1.5rem;
  animation: sceneEntrance 1.2s var(--cinematic-ease) forwards;
}

@keyframes sceneEntrance {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.crystal-heart-anchor {
  position: relative;
  width: 140px; height: 130px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.authentic-heart-img {
  width: 120px; height: auto; max-height: 120px;
  object-fit: contain;
  display: block;
  background: transparent !important;
  filter: drop-shadow(0 10px 22px rgba(255, 20, 147, 0.35));
  animation: gentleDoubleHeartbeat 1.5s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes gentleDoubleHeartbeat {
  0%, 60%, 100% { transform: scale(1); filter: drop-shadow(0 10px 22px rgba(255, 20, 147, 0.35)); }
  14% { transform: scale(1.1); filter: drop-shadow(0 14px 28px rgba(255, 20, 147, 0.55)); }
  28% { transform: scale(1.02); filter: drop-shadow(0 10px 22px rgba(255, 20, 147, 0.38)); }
  42% { transform: scale(1.14); filter: drop-shadow(0 16px 32px rgba(255, 20, 147, 0.6)); }
}

.whisper-caption {
  font-family: var(--font-hand);
  font-size: 2.9rem;
  color: var(--hot-pink);
  margin-bottom: 0.2rem;
  text-shadow: 0 2px 14px rgba(255, 20, 147, 0.28);
  line-height: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.9rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--dark-crimson);
  margin-bottom: 0.75rem;
}

.hero-subtext {
  font-size: 1.1rem;
  color: rgba(89, 13, 34, 0.75);
  margin-bottom: 2.8rem;
  font-weight: 400;
}

.interactive-arena {
  position: relative;
  min-height: 85px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.8rem;
  transition: all 0.6s var(--cinematic-ease);
}

.btn {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  outline: none;
  user-select: none;
  position: relative;
  height: 56px;
  min-width: 175px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-yes {
  padding: 0 2.2rem;
  background: linear-gradient(135deg, #FF69B4 0%, #FF1493 55%, #C20B68 100%);
  color: #FFF;
  box-shadow: 0 12px 32px rgba(255, 20, 147, 0.45), 0 4px 14px rgba(255, 105, 180, 0.35);
  transition: transform 0.6s var(--smooth-glide), box-shadow 0.4s ease;
  overflow: hidden;
  z-index: 4;
}

.btn-yes:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 18px 45px rgba(255, 20, 147, 0.65);
}

.btn-yes.centered-single {
  transform: scale(1.18);
  box-shadow: 0 20px 48px rgba(255, 20, 147, 0.65);
  transition: all 0.8s var(--smooth-glide);
}

.btn-sheen {
  position: absolute;
  top: -50%; left: -70%; width: 55%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: rotate(25deg);
  animation: sheenGlide 3.6s infinite ease-in-out;
}

@keyframes sheenGlide {
  0% { left: -70%; }
  35%, 100% { left: 150%; }
}

.btn-no {
  padding: 0 2.2rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  color: var(--dark-crimson);
  border: 1.5px solid rgba(255, 20, 147, 0.35);
  box-shadow: 0 10px 28px rgba(89, 13, 34, 0.08);
  transition: left 0.75s var(--smooth-glide), top 0.75s var(--smooth-glide), transform 0.75s var(--smooth-glide), opacity 0.45s ease;
  z-index: 10;
}

.btn-no.multiline {
  height: auto;
  min-height: 58px;
  padding: 0.85rem 2.4rem;
  min-width: 250px;
}

#btnNoText {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.35;
  white-space: nowrap !important;
}

#btnNoText span {
  display: block;
  white-space: nowrap !important;
}

.btn-no.fly-parabola {
  animation: flyToTopRight 1.4s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
  pointer-events: none;
}

@keyframes flyToTopRight {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; }
  30% { transform: translate(280px, -220px) rotate(320deg) scale(0.9); opacity: 0.9; }
  60% { transform: translate(650px, -440px) rotate(720deg) scale(0.7); opacity: 0.7; }
  100% { transform: translate(1200px, -780px) rotate(1150deg) scale(0.2); opacity: 0; }
}

.kick-impact {
  position: fixed;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.9rem;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF69B4 0%, #FF1493 60%, #D80064 100%);
  padding: 0.55rem 1.7rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 32px rgba(255, 20, 147, 0.95), 0 0 55px rgba(255, 105, 180, 0.8);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3) rotate(-12deg);
  pointer-events: none;
  z-index: 999;
}

.kick-impact.active {
  animation: impactBlast 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.3) forwards;
}

@keyframes impactBlast {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-12deg); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(6deg); }
  75% { opacity: 1; transform: translate(-50%, -65%) scale(1.32) rotate(8deg); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(1.4) rotate(10deg); }
}

/* SCREEN 1 BEAR RIG */
.plush-actor {
  position: fixed;
  bottom: 0; right: 0;
  z-index: 30;
  pointer-events: none;
  filter: drop-shadow(0 14px 28px rgba(89, 13, 34, 0.2));
  transition: transform 0.85s var(--smooth-glide), opacity 0.6s ease, left 0.8s var(--smooth-glide), top 0.8s var(--smooth-glide);
}

.plush-actor.hidden {
  opacity: 0;
  transform: translateY(260px) !important;
  pointer-events: none;
}

.plush-sprite {
  width: 210px;
  height: auto;
  display: block;
  background: transparent !important;
}

.plush-actor.peeking {
  opacity: 1; bottom: 0; right: 15px; transform: translateY(0);
}
.plush-actor.peeking .plush-sprite { width: 320px; }
.plush-actor.peeking .plush-bubble {
  bottom: 155px; right: 35px; left: auto; transform: none;
}

.plush-actor.warning-stand {
  opacity: 1; bottom: 12px; right: 35px; transform: translateY(0);
  animation: warningWiggle 2.2s ease-in-out infinite alternate;
}
.plush-actor.warning-stand .plush-sprite { width: 200px; }
.plush-actor.warning-stand .plush-bubble {
  bottom: 100%; right: 20px; left: auto; transform: none; margin-bottom: 10px;
}

@keyframes warningWiggle {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-4px) rotate(2deg); }
}

.plush-actor.leaping-kick {
  opacity: 1; transform-origin: center;
  animation: leapKickSnap 0.65s ease-out forwards;
}
.plush-actor.leaping-kick .plush-sprite { width: 210px; }
.plush-actor.leaping-kick .plush-bubble {
  bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 12px;
}

@keyframes leapKickSnap {
  0% { transform: scale(0.85) rotate(-18deg); }
  60% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1.08) rotate(0deg); }
}

.plush-actor.sitting-proud {
  opacity: 1; transform: scale(1.05);
  animation: sittingBreathing 2.6s ease-in-out infinite alternate;
}
.plush-actor.sitting-proud .plush-sprite { width: 205px; }

.plush-actor.sitting-proud .plush-bubble {
  bottom: auto;
  top: 15%;
  right: calc(100% + 15px);
  left: auto;
  transform: none;
  margin-bottom: 0;
}

@keyframes sittingBreathing {
  0% { transform: scale(1.05) translateY(0); }
  100% { transform: scale(1.08) translateY(-4px); }
}

.plush-bubble {
  position: absolute;
  background: #FFF;
  color: var(--deep-velvet-rose);
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(89, 13, 34, 0.15);
  border: 1.5px solid rgba(255, 20, 147, 0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  min-width: 210px;
  white-space: nowrap;
}

.plush-bubble span { white-space: nowrap !important; }
.plush-actor.peeking .plush-bubble,
.plush-actor.warning-stand .plush-bubble,
.plush-actor.sitting-proud .plush-bubble,
.plush-actor.leaping-kick .plush-bubble { opacity: 1; }

.screen-footer-hint {
  margin-top: 2.8rem;
  font-size: 0.88rem;
  color: rgba(89, 13, 34, 0.55);
}

/* SCREEN 2 */
.celebration-stage {
  max-width: 680px;
  width: 100%;
  text-align: center;
  padding: 2.5rem 1.5rem;
  position: relative;
  animation: celebrationEntrance 0.85s var(--smooth-glide) forwards;
}

@keyframes celebrationEntrance {
  0% { opacity: 0; transform: scale(0.92) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.celebration-badge {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  animation: naturalHeartbeat 2s infinite;
}

.celebration-whisper {
  font-family: var(--font-hand);
  font-size: 2.6rem;
  color: var(--hot-pink);
  margin-bottom: 0.4rem;
  line-height: 1.1;
}

.celebration-heading {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 600;
  color: var(--dark-crimson);
  margin-bottom: 1.2rem;
  line-height: 1.15;
}

.celebration-quote {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.75;
  color: rgba(89, 13, 34, 0.85);
  margin-bottom: 2.6rem;
}

.btn-continue {
  padding: 1.15rem 3.2rem;
  background: linear-gradient(135deg, #FF69B4 0%, #FF1493 55%, #C20B68 100%);
  color: #FFF;
  font-size: 1.1rem;
  box-shadow: 0 14px 35px rgba(255, 20, 147, 0.45);
  transition: transform 0.4s var(--cinematic-ease), box-shadow 0.4s ease;
}

.btn-continue:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 20px 48px rgba(255, 105, 180, 0.6);
}

@keyframes naturalHeartbeat {
  0%, 100% { transform: scale(1); }
  22% { transform: scale(1.15); }
  38% { transform: scale(1.04); }
  52% { transform: scale(1.19); }
  70% { transform: scale(1); }
}

/* Side Slider Bear for Screen 2 */
.side-slider-bear {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  z-index: 15;
  transition: transform 0.85s var(--smooth-glide), opacity 0.6s ease;
}

.side-slider-bear.off-right {
  transform: translateX(350px);
  opacity: 0;
}

.side-slider-bear.slide-in {
  transform: translateX(0);
  opacity: 1;
}

.side-slider-img {
  width: 140px;
  height: auto;
  background: transparent !important;
  filter: drop-shadow(0 10px 24px rgba(255, 20, 147, 0.25));
}

.side-slider-bubble {
  background: #FFF;
  color: var(--deep-velvet-rose);
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  border: 1.5px solid rgba(255, 20, 147, 0.35);
  box-shadow: 0 6px 18px rgba(89, 13, 34, 0.12);
  white-space: nowrap;
}

/* SCREEN 3: CLEAN SEQUENCED 3D ENVELOPE & LETTER */
.envelope-screen-wrapper {
  max-width: 820px;
  width: 100%;
  text-align: center;
  perspective: 1400px;
  position: relative;
}

.envelope-whisper {
  font-family: var(--font-hand);
  font-size: 2.8rem;
  color: var(--hot-pink);
  margin-bottom: 0.2rem;
}

.envelope-tagline {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  color: rgba(89, 13, 34, 0.9);
  line-height: 1.6;
  margin-bottom: 2.2rem;
}

.envelope-theatre {
  width: 440px;
  height: 290px;
  margin: 0 auto 2.2rem;
  position: relative;
  transition: all 1s var(--cinematic-ease);
}

.envelope-3d-box {
  width: 100%;
  height: 100%;
  position: relative;
  background: #fcd5e5;
  border-radius: 12px;
  box-shadow: 0 25px 55px rgba(255, 20, 147, 0.25), 0 8px 24px rgba(89, 13, 34, 0.12);
  transform-style: preserve-3d;
}

.env-back {
  position: absolute;
  inset: 0;
  background: #f7b7d2;
  border-radius: 12px;
}

/* Pocket Flaps */
.env-pocket-left {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 145px 0 145px 220px;
  border-color: transparent transparent transparent #f9c0d7;
  border-radius: 12px 0 0 12px;
  z-index: 4;
}

.env-pocket-right {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 145px 220px 145px 0;
  border-color: transparent #f9c0d7 transparent transparent;
  border-radius: 0 12px 12px 0;
  z-index: 4;
}

.env-pocket-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 220px 160px 220px;
  border-color: transparent transparent #f5adc8 transparent;
  border-radius: 0 0 12px 12px;
  z-index: 5;
}

.env-top-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 155px 220px 0 220px;
  border-color: #f7a0c0 transparent transparent transparent;
  border-radius: 12px 12px 0 0;
  transform-origin: top center;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 6;
}

.env-wax-stamp {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  background: radial-gradient(circle, #ff2a85 0%, #d80064 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(216, 0, 100, 0.6);
  z-index: 7;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.env-stamp-symbol { font-size: 1.45rem; color: #fff; }

/* The Letter Sheet embedded inside the pocket */
.env-letter-sheet {
  position: absolute;
  top: 10px;
  left: 5%;
  width: 90%;
  height: 90%;
  background: #FFFDF9;
  border-radius: 10px;
  padding: 1.5rem 1.8rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 182, 193, 0.45);
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  text-align: left;
  z-index: 2;
  transition: transform 1s var(--smooth-glide), opacity 0.7s ease, width 0.9s var(--smooth-glide), height 0.9s var(--smooth-glide), top 0.9s var(--smooth-glide), left 0.9s var(--smooth-glide);
}

.envelope-theatre.flap-opened .env-top-flap {
  transform: rotateX(180deg);
  z-index: 1 !important;
}

.envelope-theatre.flap-opened .env-wax-stamp {
  opacity: 0;
  transform: translate(-50%, -80%) scale(0.3);
  pointer-events: none;
}

.envelope-theatre.letter-revealed .env-letter-sheet {
  opacity: 1;
  pointer-events: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(740px, 92vw);
  height: min(84vh, 720px);
  transform: translate(-50%, -50%);
  overflow-y: auto;
  padding: 3rem 2.8rem;
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(89, 13, 34, 0.25);
  z-index: 100;
}

.wax-seal-header { text-align: center; margin-bottom: 1.2rem; }
.wax-seal-circle {
  display: inline-flex;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #FF69B4, #D80064);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(216, 0, 100, 0.4);
}

.letter-greeting {
  font-family: var(--font-letter);
  font-size: 2.8rem;
  color: var(--hot-pink);
  margin-bottom: 1.2rem;
}

.letter-body {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.85;
  color: rgba(56, 4, 21, 0.92);
}

.letter-body p { margin-bottom: 1.2rem; }

.letter-closing-signature {
  font-family: var(--font-letter);
  font-size: 2.1rem;
  color: var(--dark-crimson);
  margin-top: 1.8rem;
  line-height: 1.3;
}

.letter-action-footer {
  text-align: center;
  margin-top: 2rem;
}

/* Corner Reading Bear */
.corner-reading-bear {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  z-index: 110;
  transition: transform 0.85s var(--smooth-glide), opacity 0.6s ease;
}

.corner-reading-bear.off-screen {
  transform: translateX(350px);
  opacity: 0;
}

.corner-reading-bear.slide-in {
  transform: translateX(0);
  opacity: 1;
}

.corner-reading-img {
  width: 130px;
  height: auto;
  background: transparent !important;
  filter: drop-shadow(0 10px 24px rgba(255, 20, 147, 0.3));
}

.corner-reading-bubble {
  background: #FFF;
  color: var(--deep-velvet-rose);
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  border: 1.5px solid rgba(255, 20, 147, 0.35);
  box-shadow: 0 6px 18px rgba(89, 13, 34, 0.12);
  white-space: nowrap;
}

/* SCREEN 5 */
.mosaic-scroll-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem 5rem;
}

.mosaic-header {
  text-align: center;
  max-width: 1150px;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.mosaic-poetic-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.6;
  color: #fff;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 25px rgba(255, 42, 133, 0.4);
}

.mosaic-stage-box {
  width: 100%;
  max-width: 1280px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(255, 42, 133, 0.15);
  border: 1px solid rgba(255, 182, 193, 0.2);
  background: transparent !important;
  z-index: 10 !important;
  margin: 0 auto;
  padding: 0 !important;
  display: block;
  font-size: 0;
  line-height: 0;
}

.hearts-explosion-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
}

#heartsExplosionCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

#mosaic {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  cursor: grab;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
}

.mosaic-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  transition: opacity 0.5s ease;
  line-height: 1.4;
  z-index: 15;
}

.mosaic-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070608;
  color: #ff2a85;
  font-size: 1.2rem;
  font-weight: 600;
  z-index: 20;
  transition: opacity 0.8s ease;
  line-height: 1.4;
}

.mosaic-loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

.mosaic-loading.hidden {
  display: none !important;
}

.mosaic-zoom-controls {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  z-index: 15;
  line-height: 1.4;
}

.mosaic-zoom-controls button {
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.mosaic-zoom-controls button:hover {
  background: #ff2a85;
  border-color: #ff2a85;
  transform: scale(1.05);
}

.mosaic-footer {
  width: 100%;
  max-width: 1280px;
  display: flex;
  justify-content: space-between;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  padding: 0 0.5rem;
  line-height: 1.4;
}

.mosaic-footer .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff2a85;
  margin-right: 6px;
}

/* Bottom Page Transition Trigger */
.mosaic-bottom-trigger {
  margin-top: 3.5rem;
  text-align: center;
  transition: opacity 1s ease, transform 1s var(--cinematic-ease);
}

.mosaic-bottom-trigger.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px);
}

.bottom-bear-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  animation: guideWiggle 2.5s ease-in-out infinite alternate;
}

.bottom-bear-avatar {
  width: 140px;
  height: auto;
  background: transparent !important;
  filter: drop-shadow(0 12px 30px rgba(255, 42, 133, 0.5));
  transition: transform 0.3s ease;
}

.bottom-bear-wrap:hover .bottom-bear-avatar {
  transform: scale(1.1) rotate(4deg);
}

.bottom-bear-bubble {
  background: rgba(255, 255, 255, 0.94);
  color: #380415;
  border: 1.5px solid #ff2a85;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 6px 22px rgba(255, 42, 133, 0.35);
  margin-bottom: 8px;
  white-space: nowrap;
}

@keyframes guideWiggle {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(-2deg); }
}

/* SCREEN 6 */
.finale-stage {
  max-width: 820px;
  width: 100%;
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
  animation: finaleEntrance 1.2s var(--cinematic-ease) forwards;
  z-index: 10;
}

@keyframes finaleEntrance {
  0% { opacity: 0; transform: scale(0.92) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.finale-badge {
  font-size: 3rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.2rem;
  animation: naturalHeartbeat 2s infinite;
}

.finale-sub {
  font-family: var(--font-hand);
  font-size: 3.2rem;
  color: #ff69b4;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 20px rgba(255, 42, 133, 0.6);
}

.finale-title {
  font-family: var(--font-display);
  font-size: 4.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.8rem;
  text-shadow: 0 0 35px rgba(255, 42, 133, 0.85), 0 4px 15px rgba(0, 0, 0, 0.5);
}

.finale-bear-wrap { margin: 1.2rem auto 2.2rem; }

.finale-bear-img {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto;
  background: transparent !important;
  filter: drop-shadow(0 15px 35px rgba(255, 42, 133, 0.5));
  animation: finaleBearHop 1.6s ease-in-out infinite alternate;
}

@keyframes finaleBearHop {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-16px) scale(1.05); }
}

.finale-message {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-style: italic;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2.8rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.finale-replay-btn {
  background: linear-gradient(135deg, #ff2a85 0%, #ff1493 50%, #9b00e8 100%);
  box-shadow: 0 10px 40px rgba(255, 42, 133, 0.6);
}

/* LIGHTBOX VIEWER */
.viewer {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.94);
  backdrop-filter: blur(18px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.viewer.open { display: flex; }

.viewer-body {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.viewer-content {
  max-width: 82vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-content img,
.viewer-content video {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  object-fit: contain;
}

.viewer-caption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.viewer .close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.viewer .close:hover { opacity: 1; color: #ff2a85; }

.viewer .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.viewer .nav:hover {
  background: #ff2a85;
  transform: translateY(-50%) scale(1.1);
}

.viewer .prev { left: 24px; }
.viewer .next { right: 24px; }

@media (max-width: 650px) {
  .hero-title { font-size: 2.8rem; }
  .whisper-caption { font-size: 2.2rem; }
  .authentic-heart-img { width: 95px; }
  .plush-sprite { width: 140px; }
  .envelope-theatre { width: 320px; height: 215px; }
  .mosaic-poetic-title { font-size: 1.35rem; }
  .finale-title { font-size: 2.7rem; }
  .finale-sub { font-size: 2.2rem; }
  .finale-message { font-size: 1.2rem; }
}