:root {
  --bg: #030303;
  --text-glow: rgba(236, 245, 255, 0.98);
  --text-shadow: rgba(171, 218, 255, 0.74);
  --pink-shadow: rgba(255, 192, 232, 0.56);
  --card-border: rgba(255, 255, 255, 0.12);
  --font-stack: "Trebuchet MS", "Avenir Next", "Gill Sans", sans-serif;
  --heart-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 64'%3E%3Cdefs%3E%3CclipPath id='heart-clip'%3E%3Cpath d='M36 60C27 52 8 41 8 22C8 11 16 4 25 4C31 4 35.2 7.3 36 13C36.8 7.3 41 4 47 4C56 4 64 11 64 22C64 41 45 52 36 60Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23heart-clip)' stroke='%23f5fbff' stroke-width='3' opacity='0.94'%3E%3Cline x1='11' y1='0' x2='11' y2='64'/%3E%3Cline x1='19' y1='0' x2='19' y2='64'/%3E%3Cline x1='27' y1='0' x2='27' y2='64'/%3E%3Cline x1='35' y1='0' x2='35' y2='64'/%3E%3Cline x1='43' y1='0' x2='43' y2='64'/%3E%3Cline x1='51' y1='0' x2='51' y2='64'/%3E%3Cline x1='59' y1='0' x2='59' y2='64'/%3E%3C/g%3E%3Cpath d='M36 60C27 52 8 41 8 22C8 11 16 4 25 4C31 4 35.2 7.3 36 13C36.8 7.3 41 4 47 4C56 4 64 11 64 22C64 41 45 52 36 60Z' fill='none' stroke='%23f5fbff' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
}

body {
  font-family: var(--font-stack);
  color: white;
  touch-action: manipulation;
}

button {
  font: inherit;
}

.birthday-scene {
  position: relative;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 10%, rgba(156, 208, 255, 0.18), transparent 22%),
    radial-gradient(circle at 84% 16%, rgba(255, 202, 232, 0.18), transparent 24%),
    radial-gradient(circle at 56% 84%, rgba(135, 183, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #050507 0%, #020203 100%);
  transform: scale(1.05);
  filter: saturate(0.88) brightness(0.82);
  transition:
    transform 1.2s cubic-bezier(0.18, 1, 0.3, 1),
    filter 1.2s ease;
}

body.experience-started .birthday-scene {
  transform: scale(1);
  filter: saturate(1.06) brightness(1);
}

.flash-overlay {
  position: absolute;
  inset: -8%;
  z-index: 18;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.88), transparent 18%),
    radial-gradient(circle at 50% 46%, rgba(188, 226, 255, 0.54), transparent 32%),
    radial-gradient(circle at 50% 46%, rgba(255, 208, 235, 0.28), transparent 46%);
}

.flash-overlay.is-flashing {
  animation: reveal-flash 1.15s ease-out;
}

.ambient-glow {
  position: absolute;
  inset: auto;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.62;
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-left {
  top: -7rem;
  left: -7rem;
  width: 19rem;
  height: 19rem;
  background: rgba(177, 218, 255, 0.18);
}

.ambient-glow-right {
  top: 12%;
  right: -6rem;
  width: 17rem;
  height: 17rem;
  background: rgba(255, 209, 235, 0.15);
}

.ambient-glow-bottom {
  right: 16%;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  background: rgba(173, 217, 255, 0.14);
}

.starfield,
.stars,
.shooting-stars,
.grain,
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.starfield {
  z-index: 1;
  overflow: hidden;
}

.star {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  opacity: var(--star-opacity);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(176, 218, 255, 0.44);
  animation: twinkle var(--twinkle-duration) ease-in-out infinite;
  animation-delay: calc(var(--twinkle-delay) * -1s);
}

.star.soft-pink {
  background: rgba(255, 236, 246, 0.96);
  box-shadow:
    0 0 8px rgba(255, 243, 250, 0.78),
    0 0 18px rgba(255, 188, 233, 0.38);
}

.star.big-star {
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.95),
    0 0 26px rgba(169, 217, 255, 0.52);
}

.stars {
  z-index: 2;
  opacity: 0.3;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 24% 64%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.4px),
    radial-gradient(circle at 68% 53%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.5px),
    radial-gradient(circle at 87% 74%, rgba(255, 255, 255, 0.48) 0 1px, transparent 1.5px),
    radial-gradient(circle at 44% 86%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.5px);
  animation: star-drift 26s linear infinite;
}

.shooting-stars {
  z-index: 3;
  overflow: hidden;
}

.shooting-star {
  position: absolute;
  width: var(--trail-length);
  height: 2px;
  border-radius: 999px;
  opacity: 0;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.94) 34%, rgba(153, 218, 255, 0.5) 100%);
  filter:
    blur(0.2px)
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.72))
    drop-shadow(0 0 16px rgba(178, 224, 255, 0.36));
  animation: shooting-star var(--shooting-duration) linear infinite;
  animation-delay: calc(var(--shooting-delay) * -1s);
}

.shooting-star::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.3rem;
  width: 0.5rem;
  height: 0.5rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 24px rgba(177, 224, 255, 0.42);
}

.grain {
  z-index: 10;
  background-image:
    linear-gradient(transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px);
  background-size: 100% 100%, 4px 4px;
  mix-blend-mode: screen;
  opacity: 0.22;
}

.vignette {
  z-index: 11;
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.92);
}

.hero-burst {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: min(94vw, 42rem);
  transform: translate(-50%, -50%) scale(0.74);
  text-align: center;
  pointer-events: none;
  opacity: 0;
}

body.experience-started .hero-burst {
  animation: hero-burst 4.4s cubic-bezier(0.18, 1, 0.3, 1) forwards;
}

.hero-burst p {
  margin: 0 0 0.55rem;
  color: rgba(255, 235, 247, 0.9);
  font-size: clamp(0.64rem, 2vw, 0.96rem);
  letter-spacing: 0.44rem;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(255, 200, 234, 0.22);
}

.hero-burst h1 {
  margin: 0;
  color: rgba(244, 250, 255, 0.98);
  font-size: clamp(3rem, 12vw, 7rem);
  line-height: 0.84;
  letter-spacing: -0.08em;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.92),
    0 0 36px rgba(188, 224, 255, 0.6),
    0 0 68px rgba(162, 212, 255, 0.28);
}

.stream {
  position: absolute;
  inset: -32vh 0 -28vh;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.9s ease 0.18s;
}

body.experience-started .stream {
  opacity: 1;
}

.floating-item {
  position: absolute;
  top: -38vh;
  left: 0;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: drift-down;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: calc(var(--duration) * 1s);
  animation-delay: calc(var(--delay) * -1s);
}

.floating-item > * {
  animation: glow-breathe var(--pulse-speed) ease-in-out infinite alternate;
}

.floating-text__content {
  --blur-size: 0px;
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  white-space: nowrap;
  font-size: var(--font-size);
  line-height: 0.86;
  letter-spacing: -0.075em;
  color: var(--text-glow);
  text-shadow:
    0 0 12px rgba(240, 247, 255, 0.96),
    0 0 26px var(--text-shadow),
    0 0 50px rgba(179, 219, 255, 0.5);
  filter: blur(var(--blur-size));
  mix-blend-mode: screen;
}

.floating-text__content.tint-pink {
  color: rgba(255, 242, 249, 0.97);
  text-shadow:
    0 0 11px rgba(255, 244, 251, 0.94),
    0 0 24px var(--pink-shadow),
    0 0 44px rgba(255, 183, 229, 0.3);
}

.heart-icon {
  width: 0.9em;
  height: 0.86em;
  display: inline-block;
  background-image: var(--heart-icon);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: translateY(0.04em);
  filter:
    drop-shadow(0 0 6px rgba(241, 248, 255, 0.96))
    drop-shadow(0 0 18px rgba(186, 219, 255, 0.45));
}

.floating-photo {
  perspective: 1200px;
}

.photo-card {
  position: relative;
  width: var(--photo-width);
  aspect-ratio: 4 / 5.2;
  padding: 0.38rem;
  border-radius: 1.35rem;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.1),
    0 0 42px rgba(170, 209, 255, 0.12);
  backdrop-filter: blur(8px);
  transform: rotateX(4deg) rotateY(-2deg);
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.12));
  pointer-events: none;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.22), transparent 38%);
  pointer-events: none;
}

.photo-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 1rem;
  filter: saturate(0.98) contrast(1.04) brightness(0.97);
}

.floating-heart__content {
  font-size: var(--heart-size);
  line-height: 1;
  color: rgba(255, 70, 54, 0.98);
  text-shadow:
    0 0 12px rgba(255, 105, 94, 0.96),
    0 0 28px rgba(255, 60, 60, 0.84),
    0 0 48px rgba(255, 46, 46, 0.52);
  filter: blur(var(--heart-blur));
  mix-blend-mode: screen;
}

.audio-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.48);
  color: rgba(240, 247, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 18px rgba(176, 214, 255, 0.12);
  cursor: pointer;
}

.audio-toggle[aria-pressed="false"] {
  background: rgba(78, 18, 18, 0.44);
  color: rgba(255, 226, 226, 0.95);
}

.audio-toggle:focus-visible,
.start-button:focus-visible,
.start-screen:focus-visible {
  outline: 2px solid rgba(200, 229, 255, 0.9);
  outline-offset: 4px;
}

.start-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  overflow: hidden;
  cursor: pointer;
  background:
    radial-gradient(circle at 16% 12%, rgba(170, 215, 255, 0.16), transparent 24%),
    radial-gradient(circle at 82% 82%, rgba(255, 205, 236, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(2, 3, 7, 0.94), rgba(5, 5, 8, 0.88));
  backdrop-filter: blur(12px);
}

body.experience-started .start-screen {
  animation: start-screen-out 0.85s ease forwards;
  pointer-events: none;
}

.start-spark {
  position: absolute;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(84px);
  opacity: 0.52;
  animation: soft-float 8s ease-in-out infinite alternate;
}

.start-spark-left {
  top: -7rem;
  left: -7rem;
  background: rgba(174, 219, 255, 0.18);
}

.start-spark-right {
  right: -7rem;
  bottom: -7rem;
  background: rgba(255, 202, 234, 0.18);
  animation-duration: 10s;
}

.start-card {
  position: relative;
  width: min(92vw, 28rem);
  padding: 2rem 1.35rem 1.4rem;
  text-align: center;
  border-radius: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(17, 17, 25, 0.84), rgba(8, 8, 12, 0.62));
  box-shadow:
    0 0 30px rgba(165, 210, 255, 0.12),
    inset 0 0 30px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
}

body.experience-started .start-card {
  animation: start-card-out 0.78s cubic-bezier(0.18, 1, 0.3, 1) forwards;
}

.start-card::after {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -1;
  background: conic-gradient(from 180deg, rgba(179, 222, 255, 0.22), rgba(255, 202, 234, 0.12), rgba(179, 222, 255, 0.22));
  filter: blur(48px);
  animation: slow-spin 11s linear infinite;
}

.start-kicker {
  margin: 0 0 0.55rem;
  color: rgba(234, 246, 255, 0.8);
  font-size: 0.78rem;
  letter-spacing: 0.38rem;
  text-transform: uppercase;
}

.start-title {
  margin: 0;
  color: rgba(246, 250, 255, 0.98);
  font-size: clamp(3rem, 13vw, 5rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.94),
    0 0 26px rgba(181, 224, 255, 0.56),
    0 0 54px rgba(176, 209, 255, 0.24);
}

.start-subtitle {
  margin: 0.95rem auto 0;
  max-width: 18rem;
  color: rgba(232, 238, 247, 0.82);
  font-size: 1rem;
  line-height: 1.45;
}

.start-button {
  margin-top: 1.1rem;
  min-width: 13rem;
  padding: 0.95rem 1.5rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #0b1320;
  background: linear-gradient(90deg, #eff8ff 0%, #ffdbe9 100%);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.18),
    0 0 42px rgba(188, 223, 255, 0.22);
  animation: button-pulse 1.8s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: calc(var(--star-opacity) * 0.55);
    transform: scale(0.82);
  }

  50% {
    opacity: var(--star-opacity);
    transform: scale(1.18);
  }
}

@keyframes star-drift {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(10px);
  }
}

@keyframes shooting-star {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-24deg) scaleX(0.3);
  }

  8% {
    opacity: 1;
  }

  70% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--shoot-distance-x), var(--shoot-distance-y), 0) rotate(-24deg) scaleX(1.08);
  }
}

@keyframes drift-down {
  0% {
    transform: translate3d(0, -18vh, 0) rotate(var(--rotate-start)) scale(var(--scale));
    opacity: 0;
  }

  8% {
    opacity: var(--opacity);
  }

  88% {
    opacity: var(--opacity);
  }

  100% {
    transform: translate3d(calc(var(--drift-x) * 1vw), 152vh, 0) rotate(var(--rotate-end)) scale(var(--scale));
    opacity: 0;
  }
}

@keyframes glow-breathe {
  0% {
    transform: translate3d(0, 0, 0) scale(0.985);
    opacity: 0.84;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1.02);
    opacity: 1;
  }
}

@keyframes reveal-flash {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }

  24% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes hero-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.74);
    filter: blur(12px);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }

  64% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(1.02);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -54%) scale(1.08);
    filter: blur(10px);
  }
}

@keyframes start-screen-out {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes start-card-out {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.9) translateY(-1rem);
    filter: blur(10px);
  }
}

@keyframes button-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 18px rgba(255, 255, 255, 0.18),
      0 0 42px rgba(188, 223, 255, 0.22);
  }

  50% {
    transform: scale(1.04);
    box-shadow:
      0 0 24px rgba(255, 255, 255, 0.24),
      0 0 56px rgba(198, 228, 255, 0.28);
  }
}

@keyframes soft-float {
  0% {
    transform: translate3d(0, 0, 0) scale(0.96);
  }

  100% {
    transform: translate3d(0, 1rem, 0) scale(1.04);
  }
}

@keyframes slow-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .vignette {
    box-shadow: inset 0 0 92px rgba(0, 0, 0, 0.94);
  }

  .hero-burst p {
    letter-spacing: 0.28rem;
  }

  .photo-card {
    border-radius: 1.05rem;
  }

  .photo-card img {
    border-radius: 0.8rem;
  }

  .audio-toggle {
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.58rem 0.88rem;
    font-size: 0.92rem;
  }

  .start-card {
    padding: 1.7rem 1.15rem 1.3rem;
  }

  .start-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.26rem;
  }

  .start-subtitle {
    font-size: 0.92rem;
  }

  .start-button {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-scene,
  .flash-overlay,
  .star,
  .stars,
  .shooting-star,
  .hero-burst,
  .floating-item,
  .floating-item > *,
  .start-spark,
  .start-card::after,
  .start-button {
    animation: none !important;
    transition: none !important;
  }

  .shooting-stars {
    display: none;
  }

  .stream {
    opacity: 1;
  }
}
