:root {
  --bg-deep: #050510;
  --bg-mid: #0a0a1f;
  --blue: #1a2a6c;
  --purple: #4a1a6b;
  --rose: #e8a0bf;
  --rose-soft: #f3c4d8;
  --rose-glow: rgba(232, 160, 191, 0.45);
  --text: #f5eef5;
  --text-soft: rgba(245, 238, 245, 0.72);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --gold: #e8c98a;
  --gold-soft: rgba(232, 201, 138, 0.55);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", "Cormorant Garamond", cursive;
  --font-ui: "Outfit", system-ui, sans-serif;
  --ease-cinema: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --app-height: 100dvh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  height: var(--app-height);
  height: -webkit-fill-available;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  min-height: var(--app-height);
  min-height: -webkit-fill-available;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(74, 26, 107, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(26, 42, 108, 0.4), transparent 50%),
    radial-gradient(ellipse 50% 40% at 15% 70%, rgba(232, 160, 191, 0.08), transparent 45%),
    var(--bg-deep);
}

#app {
  position: relative;
  width: 100%;
  height: var(--app-height);
  min-height: -webkit-fill-available;
  overflow: hidden;
}

#bg-canvas,
#heart-canvas,
#name-sparkles {
  display: block;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle, var(--rose-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.35;
  mix-blend-mode: screen;
  transition: opacity 0.4s ease;
  will-change: left, top;
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.65) 100%);
}

#bloom {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(232, 160, 191, 0.06), transparent 45%);
  opacity: 0.8;
}

.scene {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    calc(1.25rem + var(--safe-top))
    calc(1.25rem + var(--safe-right))
    calc(1.5rem + var(--safe-bottom))
    calc(1.25rem + var(--safe-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.96);
  transform-origin: center center;
  transition:
    opacity 0.7s var(--ease-cinema),
    visibility 0.7s,
    transform 0.85s var(--ease-cinema);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  perspective: 1200px;
}

.scene.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) rotateY(0) scale(1);
}

.scene.leaving {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.scene.leave-left {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-28%) rotateY(28deg) scale(0.92);
}

.scene.leave-right {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(28%) rotateY(-28deg) scale(0.92);
}

.scene.enter-right {
  opacity: 0;
  transform: translateX(32%) rotateY(-32deg) scale(0.9);
}

.scene.enter-left {
  opacity: 0;
  transform: translateX(-32%) rotateY(32deg) scale(0.9);
}

/* —— Gate —— */
.scene--gate {
  z-index: 20;
  background: radial-gradient(circle at center, #0c0c1c 0%, #020208 100%);
}

.enter-btn {
  position: relative;
  width: 120px;
  height: 120px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(232, 160, 191, 0.2), rgba(74, 26, 107, 0.35));
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 40px rgba(232, 160, 191, 0.25),
    inset 0 0 20px rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--ease-cinema), box-shadow 0.4s ease;
}

.enter-btn:hover,
.enter-btn:focus-visible {
  transform: scale(1.06);
  box-shadow:
    0 0 60px rgba(232, 160, 191, 0.4),
    inset 0 0 24px rgba(255, 255, 255, 0.12);
  outline: none;
}

.enter-btn__ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(232, 201, 138, 0.45);
  animation: pulse-ring 2.8s ease-out infinite;
}

.enter-btn::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px dashed rgba(232, 160, 191, 0.25);
  animation: slow-spin 14s linear infinite;
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

.enter-btn__label {
  position: relative;
  z-index: 1;
}

.gate-hint {
  margin-top: 1.75rem;
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0.8;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* —— Intro —— */
.scene--intro {
  background: transparent;
}

.intro-light {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 20px 8px rgba(255, 255, 255, 0.9),
    0 0 60px 24px rgba(232, 160, 191, 0.5),
    0 0 120px 48px rgba(74, 26, 107, 0.35);
  opacity: 0;
  transform: scale(0.2);
  will-change: transform, opacity;
}

.name-stage {
  position: relative;
  z-index: 1;
  width: min(80vw, 560px);
  min-height: clamp(5.5rem, 22vw, 9rem);
  max-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  overflow: visible;
}

.name-stage.active {
  opacity: 1;
}

#name-sparkles {
  position: absolute;
  inset: -12% -8%;
  width: 116%;
  height: 124%;
  pointer-events: none;
  z-index: 0;
}

.luana-signature {
  position: relative;
  z-index: 1;
  display: block;
  width: min(80vw, 560px);
  height: auto;
  max-width: 100%;
  overflow: visible;
  /* Mesmo glow do nome original */
  filter: drop-shadow(0 0 18px rgba(232, 160, 191, 0.45))
    drop-shadow(0 10px 28px rgba(74, 26, 107, 0.35));
}

.luana-writing-path {
  fill: none;
}

.luana-fill-layer {
  opacity: 0;
  transition: opacity 0.65s ease;
  pointer-events: none;
}

.luana-fill-layer.is-revealed {
  opacity: 1;
}

.luana-stroke-layer {
  transition: opacity 0.65s ease;
}

.luana-signature.is-complete .luana-stroke-layer {
  opacity: 0;
}

.luana-pen {
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.luana-signature.is-breathing {
  animation: respirarBrilho 5.5s ease-in-out infinite;
}

@keyframes respirarBrilho {
  0%,
  100% {
    filter: drop-shadow(0 0 18px rgba(232, 160, 191, 0.45))
      drop-shadow(0 10px 28px rgba(74, 26, 107, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(232, 160, 191, 0.7))
      drop-shadow(0 0 48px rgba(232, 201, 138, 0.25))
      drop-shadow(0 12px 32px rgba(74, 26, 107, 0.4));
  }
}

.name-anim__underline {
  position: relative;
  z-index: 1;
  display: block;
  width: min(58%, 280px);
  height: 2px;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--rose-soft), var(--gold), transparent);
  box-shadow: 0 0 12px rgba(232, 160, 191, 0.55);
  transform: scaleX(0);
  transform-origin: left center;
}

.name-anim__underline.is-drawn {
  animation: desenharLinha 0.9s ease-out forwards;
}

@keyframes desenharLinha {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .luana-signature.is-breathing {
    animation: none;
  }

  .luana-fill-layer {
    opacity: 1;
  }

  .luana-stroke-layer {
    opacity: 0;
  }

  .name-anim__underline {
    transform: scaleX(1);
  }

  .name-anim__underline.is-drawn {
    animation: none;
  }
}

/* —— Glass —— */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* —— Messages —— */
.message-card {
  position: relative;
  max-width: min(560px, 92vw);
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 24px;
  text-align: center;
  transform-style: preserve-3d;
  perspective: 800px;
}

.message-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(232, 201, 138, 0.22);
  pointer-events: none;
}

.ornament {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.6em;
  padding-left: 0.6em;
  color: var(--gold-soft);
  text-shadow: 0 0 14px rgba(232, 201, 138, 0.35);
  user-select: none;
}

.ornament--top {
  margin-bottom: 1.1rem;
}

.ornament--bottom {
  margin-top: 1.2rem;
  color: rgba(232, 160, 191, 0.6);
  text-shadow: 0 0 14px var(--rose-glow);
}

.message-line {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.2vw, 2rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(18px);
}

.message-line--soft {
  margin-top: 0.85rem;
  color: var(--rose-soft);
  font-style: italic;
}

.message-line.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 1s var(--ease-cinema),
    transform 1s var(--ease-cinema);
}

/* —— Gallery —— */
.gallery-stage {
  width: min(760px, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.gallery-3d {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.gallery-side {
  position: absolute;
  top: 50%;
  width: 26%;
  aspect-ratio: 3 / 4;
  max-height: min(48vh, 420px);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0.45;
  filter: blur(1.5px) saturate(0.8) brightness(0.7);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.6s var(--ease-cinema);
  z-index: 0;
  pointer-events: auto;
  touch-action: manipulation;
}

.gallery-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-side--prev {
  left: 0;
  transform: translateY(-50%) rotateY(38deg) translateZ(-90px);
  transform-origin: right center;
}

.gallery-side--next {
  right: 0;
  transform: translateY(-50%) rotateY(-38deg) translateZ(-90px);
  transform-origin: left center;
}

.gallery-side:hover {
  opacity: 0.75;
  filter: blur(0.5px) saturate(1) brightness(0.85);
}

.gallery-frame {
  position: relative;
  width: min(64%, 440px);
  aspect-ratio: 3 / 4;
  max-height: min(62vh, 560px);
  border-radius: 20px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-cinema);
  will-change: transform;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(74, 26, 107, 0.35), rgba(5, 5, 16, 0.85));
  border: 1px solid rgba(232, 201, 138, 0.28);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(232, 160, 191, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: frame-float 7s ease-in-out infinite;
}

@keyframes frame-float {
  0%,
  100% {
    transform: translateY(0) rotateZ(0deg);
  }
  50% {
    transform: translateY(-8px) rotateZ(0.4deg);
  }
}

.gallery-frame:hover {
  animation-play-state: paused;
  transform: scale(1.03) rotateY(2deg);
}

.gallery-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.14) 46%,
    rgba(255, 255, 255, 0.05) 54%,
    transparent 70%
  );
  background-size: 250% 100%;
  animation: shine-sweep 5.5s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes shine-sweep {
  0%,
  60% {
    background-position: 120% 0;
  }
  100% {
    background-position: -130% 0;
  }
}

.gallery-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  z-index: 3;
  pointer-events: none;
  border-color: rgba(232, 201, 138, 0.75);
  border-style: solid;
  border-width: 0;
  filter: drop-shadow(0 0 6px rgba(232, 201, 138, 0.4));
}

.gallery-corner--tl {
  top: 10px;
  left: 10px;
  border-top-width: 1.5px;
  border-left-width: 1.5px;
  border-top-left-radius: 10px;
}

.gallery-corner--tr {
  top: 10px;
  right: 10px;
  border-top-width: 1.5px;
  border-right-width: 1.5px;
  border-top-right-radius: 10px;
}

.gallery-corner--bl {
  bottom: 10px;
  left: 10px;
  border-bottom-width: 1.5px;
  border-left-width: 1.5px;
  border-bottom-left-radius: 10px;
}

.gallery-corner--br {
  bottom: 10px;
  right: 10px;
  border-bottom-width: 1.5px;
  border-right-width: 1.5px;
  border-bottom-right-radius: 10px;
}

.gallery-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gallery-media img,
.gallery-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  opacity: 0;
  transform: scale(1.08) rotateY(-8deg);
  transition:
    opacity 0.85s var(--ease-cinema),
    transform 1s var(--ease-cinema);
  filter: saturate(1.05) contrast(1.02);
}

.gallery-media img.active,
.gallery-media video.active {
  opacity: 1;
  transform: scale(1) rotateY(0deg);
}

.gallery-media img.leaving,
.gallery-media video.leaving {
  opacity: 0;
  transform: scale(0.94) rotateY(8deg);
}

.gallery-reflection {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.gallery-caption {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  color: var(--rose-soft);
  letter-spacing: 0.03em;
  min-height: 1.4em;
  text-align: center;
  opacity: 0.95;
  text-shadow:
    0 0 18px rgba(232, 160, 191, 0.4),
    0 2px 12px rgba(0, 0, 0, 0.5);
}

.gallery-nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  pointer-events: auto;
}

.nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(232, 201, 138, 0.35);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(74, 26, 107, 0.35));
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

.nav-btn:hover {
  background: rgba(232, 160, 191, 0.28);
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(232, 160, 191, 0.25);
}

.nav-btn:active {
  transform: scale(0.94);
}

.gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  max-width: 180px;
}

.gallery-dots button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
  transition: transform 0.3s ease, background 0.3s ease;
}

.gallery-dots button.active {
  background: var(--rose);
  transform: scale(1.35);
}

/* —— Video —— */
.video-card {
  width: min(720px, 94vw);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 60vh;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.scene--video .continue-btn {
  margin-top: 1.5rem;
}

/* —— Finale —— */
.scene--finale {
  z-index: 6;
}

#heart-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}

.finale-text {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: min(560px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.finale-line {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.8vw, 1.85rem);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(24px);
}

.finale-line.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 1.2s var(--ease-cinema),
    transform 1.2s var(--ease-cinema);
}

.finale-line--sign {
  margin-top: 0.75rem;
  color: var(--rose-soft);
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  text-shadow: 0 0 22px rgba(232, 160, 191, 0.45);
}

.finale-line--love {
  margin-top: 1.1rem;
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  background: linear-gradient(120deg, #fff, var(--rose-soft), #e8a0bf, var(--gold));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(232, 160, 191, 0.55));
  animation: love-shimmer 3.5s ease-in-out infinite;
}

.finale-line--love.visible {
  animation: love-shimmer 3.5s ease-in-out infinite, love-pulse 1.8s ease-in-out infinite;
}

@keyframes love-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes love-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.04);
  }
}

/* —— Assinatura 3D —— */
.signature-3d {
  margin-top: 1.75rem;
  perspective: 900px;
  perspective-origin: 50% 40%;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.signature-3d.visible {
  opacity: 1;
  transition: opacity 0.6s ease;
}

.signature-3d__stack {
  position: relative;
  transform-style: preserve-3d;
  opacity: 0;
  will-change: transform, opacity;
}

.signature-3d__layer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateZ(var(--z));
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: rgba(74, 26, 107, calc(0.12 + var(--i) * 0.035));
  text-shadow: none;
  user-select: none;
}

.signature-3d__layer--front {
  position: relative;
  left: auto;
  top: auto;
  transform: translateZ(0);
  background: linear-gradient(
    135deg,
    #fff 0%,
    var(--rose-soft) 35%,
    #e8a0bf 55%,
    #c9a0e8 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(232, 160, 191, 0.55))
    drop-shadow(0 8px 24px rgba(74, 26, 107, 0.45));
}

.signature-3d__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateZ(8px);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: transparent;
  text-shadow:
    0 0 28px rgba(243, 196, 216, 0.7),
    0 0 60px rgba(232, 160, 191, 0.35);
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: screen;
}

/* —— Nav / progress —— */
.stage-sides {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}

.stage-sides[hidden] {
  display: none;
}

.stage-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) perspective(600px) rotateY(0deg);
  width: 58px;
  height: 58px;
  border: 1px solid rgba(232, 201, 138, 0.4);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(74, 26, 107, 0.42));
  color: var(--text);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(232, 160, 191, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.35s var(--ease-cinema), opacity 0.35s ease, box-shadow 0.35s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-arrow--prev {
  left: calc(0.75rem + var(--safe-left));
  transform: translateY(-50%) perspective(600px) rotateY(18deg);
}

.stage-arrow--next {
  right: calc(0.75rem + var(--safe-right));
  transform: translateY(-50%) perspective(600px) rotateY(-18deg);
}

.stage-arrow__face {
  font-size: 2rem;
  line-height: 1;
  transform: translateZ(12px);
  text-shadow: 0 0 16px rgba(232, 160, 191, 0.5);
}

.stage-arrow:hover:not(.is-disabled) {
  box-shadow:
    0 16px 44px rgba(232, 160, 191, 0.28),
    0 0 30px rgba(232, 201, 138, 0.2);
}

.stage-arrow--prev:hover:not(.is-disabled) {
  transform: translateY(-50%) perspective(600px) rotateY(8deg) scale(1.08);
}

.stage-arrow--next:hover:not(.is-disabled) {
  transform: translateY(-50%) perspective(600px) rotateY(-8deg) scale(1.08);
}

.stage-arrow:active:not(.is-disabled) {
  transform: translateY(-50%) scale(0.94);
}

.stage-arrow.is-disabled {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

.stage-arrow.pulse {
  animation: arrow-pulse 0.4s ease;
}

@keyframes arrow-pulse {
  50% {
    box-shadow: 0 0 28px rgba(232, 160, 191, 0.55);
  }
}

.scene-nav {
  position: fixed;
  left: 50%;
  bottom: calc(1.75rem + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: auto;
}

/* Galeria: Continuar some; setas laterais de etapa ficam nas laterais,
   setas de foto ficam sob a moldura — sem sobreposição */
body[data-scene="gallery"] .scene-nav {
  display: none !important;
}

body[data-scene="gallery"] .stage-arrow--next {
  top: auto;
  bottom: calc(6.5rem + var(--safe-bottom));
  right: calc(1rem + var(--safe-right));
  transform: perspective(600px) rotateY(-14deg);
}

body[data-scene="gallery"] .stage-arrow--prev {
  top: auto;
  bottom: calc(6.5rem + var(--safe-bottom));
  left: calc(1rem + var(--safe-left));
  transform: perspective(600px) rotateY(14deg);
}

body.lyrics-on[data-scene="gallery"] .stage-arrow--next,
body.lyrics-on[data-scene="gallery"] .stage-arrow--prev {
  bottom: calc(7.75rem + var(--safe-bottom));
}

body[data-scene="gallery"] .scene--gallery {
  padding-bottom: calc(2rem + var(--safe-bottom));
}

.continue-btn {
  appearance: none;
  border: 1px solid rgba(232, 201, 138, 0.4);
  background: linear-gradient(135deg, rgba(232, 160, 191, 0.28), rgba(74, 26, 107, 0.45));
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.95rem 2rem;
  min-height: 52px;
  min-width: 160px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(232, 160, 191, 0.18);
  transition: transform 0.35s var(--ease-cinema), box-shadow 0.35s ease, opacity 0.4s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(232, 160, 191, 0.3);
}

.continue-btn:active {
  transform: scale(0.97);
}

.continue-btn[hidden],
.scene-nav[hidden] {
  display: none;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.06);
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--rose));
  box-shadow: 0 0 12px var(--rose-glow);
  transition: width 0.6s var(--ease-cinema);
}

.progress[hidden] {
  display: none;
}

/* —— Letra da música (rodapé) —— */
.lyrics-bar {
  position: fixed;
  left: 50%;
  bottom: calc(0.85rem + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: min(680px, calc(100vw - 1.5rem));
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(232, 160, 191, 0.1),
    rgba(74, 26, 107, 0.22),
    rgba(26, 42, 108, 0.18)
  );
  border: 1px solid rgba(232, 201, 138, 0.22);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 0.8s var(--ease-cinema), transform 0.8s var(--ease-cinema),
    visibility 0.8s;
}

.lyrics-bar.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.lyrics-bar__note {
  color: var(--gold-soft);
  font-size: 1rem;
  text-shadow: 0 0 12px rgba(232, 201, 138, 0.5);
  animation: note-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

.lyrics-bar__note:last-child {
  animation-delay: 1.2s;
}

@keyframes note-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.lyrics-bar__text {
  text-align: center;
  min-width: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.lyrics-bar--in .lyrics-bar__text {
  opacity: 1;
  transform: translateY(0);
}

.lyrics-bar__pt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  color: var(--rose-soft);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyrics-bar__en {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(0.68rem, 2vw, 0.78rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 238, 245, 0.5);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empurra o botão Continuar para cima quando a letra está visível */
body.lyrics-on .scene-nav {
  bottom: calc(5.75rem + var(--safe-bottom));
}

body.lyrics-on .scene--video #video-continue {
  margin-bottom: 4.5rem;
}

/* —— Burst particles overlay —— */
.burst-layer {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  overflow: hidden;
}

.burst-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rose-soft);
  box-shadow: 0 0 8px var(--rose-glow);
  opacity: 0;
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.2s !important;
  }

  #cursor-glow {
    display: none;
  }
}

@media (hover: none) {
  #cursor-glow {
    display: none;
  }

  .gallery-frame:hover {
    transform: none;
  }

  .continue-btn:hover {
    transform: none;
  }

  .nav-btn:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .scene {
    padding:
      calc(1rem + var(--safe-top))
      calc(0.9rem + var(--safe-right))
      calc(5.5rem + var(--safe-bottom))
      calc(0.9rem + var(--safe-left));
    justify-content: safe center;
  }

  .scene--gallery,
  .scene--finale,
  .scene--video {
    justify-content: flex-start;
    padding-top: calc(1.5rem + var(--safe-top));
  }

  .message-card {
    border-radius: 18px;
    padding: 1.4rem 1.15rem;
    width: 100%;
  }

  .message-line {
    font-size: clamp(1.2rem, 5.2vw, 1.65rem);
  }

  .gallery-stage {
    width: min(100%, 420px);
    gap: 0.9rem;
  }

  .gallery-side {
    width: 20%;
    opacity: 0.3;
  }

  .gallery-frame {
    width: min(78%, 340px);
    aspect-ratio: 3 / 4;
    max-height: min(50dvh, 460px);
    border-radius: 16px;
  }

  .gallery-corner {
    width: 18px;
    height: 18px;
  }

  .gallery-caption {
    font-size: 1.35rem;
    padding: 0 0.5rem;
  }

  .lyrics-bar {
    bottom: calc(0.6rem + var(--safe-bottom));
    padding: 0.5rem 1rem;
    gap: 0.6rem;
    max-width: calc(100vw - 1rem);
  }

  body.lyrics-on .scene-nav {
    bottom: calc(6.25rem + var(--safe-bottom)) !important;
  }

  body.lyrics-on .scene {
    padding-bottom: calc(9.5rem + var(--safe-bottom));
  }

  .stage-arrow {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .stage-arrow__face {
    font-size: 1.75rem;
  }

  body[data-scene="gallery"] .stage-arrow--next,
  body[data-scene="gallery"] .stage-arrow--prev {
    bottom: calc(5.5rem + var(--safe-bottom));
  }

  body.lyrics-on[data-scene="gallery"] .stage-arrow--next,
  body.lyrics-on[data-scene="gallery"] .stage-arrow--prev {
    bottom: calc(7rem + var(--safe-bottom));
  }

  .name-stage {
    width: min(88vw, 560px);
    min-height: clamp(4.5rem, 20vw, 7.5rem);
    max-height: 34dvh;
  }

  .luana-signature {
    width: min(88vw, 560px);
  }

  .nav-btn {
    width: 54px;
    height: 54px;
    font-size: 1.8rem;
  }

  .gallery-dots button {
    width: 12px;
    height: 12px;
  }

  .gallery-nav {
    gap: 1.25rem;
    padding: 0.35rem 0 0.5rem;
  }

  .video-card {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(42dvh, 360px);
    border-radius: 14px;
  }

  .scene--video .continue-btn,
  #video-continue {
    margin-top: 1rem;
    min-height: 52px;
    min-width: 170px;
    position: relative;
    z-index: 6;
  }

  .finale-text {
    width: 100%;
    gap: 0.85rem;
    padding-bottom: 1rem;
  }

  .finale-line {
    font-size: clamp(1.15rem, 4.8vw, 1.55rem);
    padding: 0 0.25rem;
  }

  .finale-line--sign {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }

  .signature-3d {
    margin-top: 1.25rem;
    min-height: 3.5rem;
    width: 100%;
    overflow: visible;
  }

  .signature-3d__layer,
  .signature-3d__glow {
    font-size: clamp(2.1rem, 14vw, 3.4rem);
    letter-spacing: 0.06em;
  }

  .enter-btn {
    width: 104px;
    height: 104px;
    font-size: 1.2rem;
  }

  .gate-hint {
    font-size: 0.75rem;
  }

  .continue-btn {
    min-height: 52px;
    min-width: 170px;
    padding: 1rem 1.75rem;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
  }

  .scene-nav {
    bottom: calc(1.25rem + var(--safe-bottom));
    width: max-content;
    max-width: calc(100% - 2rem);
  }

  #cursor-glow {
    width: 160px;
    height: 160px;
    opacity: 0.18;
  }
}

@media (max-width: 380px) {
  .signature-3d__layer,
  .signature-3d__glow {
    font-size: clamp(1.85rem, 13vw, 2.6rem);
    letter-spacing: 0.04em;
  }

  .gallery-frame {
    max-height: min(48dvh, 400px);
  }

  .gallery-side {
    display: none;
  }

  .gallery-frame {
    width: 92%;
  }

  .message-line {
    font-size: 1.15rem;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .scene {
    justify-content: flex-start;
    padding-top: calc(0.75rem + var(--safe-top));
    padding-bottom: calc(4.5rem + var(--safe-bottom));
  }

  .enter-btn {
    width: 72px;
    height: 72px;
    font-size: 1rem;
  }

  .gallery-side {
    display: none;
  }

  .gallery-frame {
    width: auto;
    max-height: min(58dvh, 280px);
    aspect-ratio: 4 / 3;
  }

  .video-card {
    max-height: min(55dvh, 260px);
  }

  .lyrics-bar {
    display: none;
  }

  body.lyrics-on .scene-nav {
    bottom: calc(1.1rem + var(--safe-bottom)) !important;
  }

  body.lyrics-on .scene--video #video-continue {
    margin-bottom: 0;
  }

  body[data-scene="gallery"] .stage-arrow--next,
  body[data-scene="gallery"] .stage-arrow--prev {
    bottom: calc(1rem + var(--safe-bottom));
  }

  .stage-arrow {
    width: 42px;
    height: 42px;
  }

  .finale-text {
    gap: 0.5rem;
  }

  .finale-line {
    font-size: 1.05rem;
  }

  .signature-3d {
    margin-top: 0.6rem;
    min-height: 2.5rem;
  }

  .signature-3d__layer,
  .signature-3d__glow {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }
}
