:root {
  --bg-cream: #fff6e8;
  --bg-rose: #f8ddd6;
  --bg-peach: #ffd6b5;
  --ink: #2f1c16;
  --ink-soft: #6c4f42;
  --accent: #d62839;
  --accent-deep: #9d1d2d;
  --card: rgba(255, 255, 255, 0.75);
  --border: rgba(109, 57, 43, 0.2);
  --shadow: 0 14px 42px rgba(97, 43, 28, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.8), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(255, 221, 187, 0.62), transparent 30%),
    linear-gradient(140deg, var(--bg-cream), var(--bg-rose) 45%, var(--bg-peach));
  line-height: 1.65;
  overflow-x: hidden;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.sparkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 10px rgba(255, 214, 176, 0.9);
  opacity: 0;
  animation: twinkle linear forwards;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  filter: blur(2px);
  opacity: 0.8;
  pointer-events: none;
}

.bg-shape-1 {
  width: 300px;
  height: 300px;
  border-radius: 40% 60% 50% 50%;
  background: rgba(214, 40, 57, 0.18);
  top: -90px;
  right: -80px;
  animation: driftA 12s ease-in-out infinite alternate;
}

.bg-shape-2 {
  width: 220px;
  height: 220px;
  border-radius: 58% 42% 40% 60%;
  background: rgba(255, 181, 133, 0.25);
  bottom: 8%;
  left: -60px;
  animation: driftB 11s ease-in-out infinite alternate;
}

.section {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) brightness(0.84);
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.8s ease, transform 6s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 227, 190, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(34, 17, 16, 0.38), rgba(34, 17, 16, 0.5));
}

.hero-content {
  text-align: center;
  padding: 4rem 0 3rem;
  z-index: 2;
  color: #fff7ef;
}

.hero-content .eyebrow {
  color: #ffe4cd;
}

.hero-content .subtitle {
  color: #ffe9d8;
}

.music-panel {
  margin: 1.3rem auto 0;
  width: min(760px, 100%);
  padding: 0.9rem 1rem;
  background: rgba(255, 250, 244, 0.8);
  color: #5b3026;
}

.music-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.music-copy {
  margin: 0.1rem 0 0.6rem;
  color: #6d483d;
}

.music-controls {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

#audioFileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(121, 56, 42, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #6b3427;
  padding: 0.58rem 1.1rem;
  cursor: pointer;
  font-size: 1rem;
}

.music-status {
  margin: 0.55rem 0 0;
  font-size: 1rem;
  color: #6d483d;
}

.hero {
  text-align: center;
}

.eyebrow {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0;
  color: var(--accent-deep);
}

.title {
  margin: 0.3rem 0;
  font-size: clamp(2.1rem, 6vw, 4.1rem);
  letter-spacing: 0.01em;
}

.subtitle {
  color: var(--ink-soft);
  max-width: 700px;
  margin: 0.9rem auto 1.8rem;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.tilt-card.tilting {
  box-shadow: 0 24px 44px rgba(97, 43, 28, 0.22);
}

#letter {
  margin-bottom: 3.2rem;
  padding: 1.8rem clamp(1.1rem, 2.7vw, 2.4rem);
}

h2 {
  margin-top: 0.2rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
}

.centered {
  text-align: center;
}

.section-copy {
  color: var(--ink-soft);
  margin-top: 0;
  margin-bottom: 1.3rem;
  font-size: 1.15rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}

.photo-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 18px;
  margin: 0;
  padding: 0.65rem;
  box-shadow: var(--shadow);
  transform: translateY(10px);
  opacity: 0;
  animation: revealUp 0.75s ease forwards;
}

.photo-card:nth-child(1) {
  animation-delay: 0.08s;
}

.photo-card:nth-child(2) {
  animation-delay: 0.2s;
}

.photo-card:nth-child(3) {
  animation-delay: 0.32s;
}

.photo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.photo-card figcaption {
  padding: 0.6rem 0.35rem 0.2rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  text-align: center;
}

.birthday {
  margin: 3.3rem auto;
  position: relative;
  overflow: hidden;
  padding: 1.4rem clamp(1rem, 2.9vw, 2.2rem);
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 228, 196, 0.8), transparent 35%),
    radial-gradient(circle at 90% 82%, rgba(214, 40, 57, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.8);
}

.birthday::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 21px;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.2)
  );
}

.birthday-top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: center;
}

.birthday-tag {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(146, 57, 44, 0.2);
  background: rgba(255, 244, 233, 0.8);
  color: #8e3128;
  font-size: 1rem;
}

.birthday-cake {
  width: min(320px, 100%);
  justify-self: center;
  filter: drop-shadow(0 10px 26px rgba(108, 46, 37, 0.2));
  animation: candleGlow 2.1s ease-in-out infinite;
}

.balloon-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 1rem 0 0.75rem;
}

.balloon {
  width: 40px;
  height: 52px;
  border-radius: 56% 56% 52% 52%;
  position: relative;
  animation: balloonLift 4.2s ease-in-out infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 28px;
  background: rgba(90, 58, 47, 0.45);
}

.b1 {
  background: #ff8f8f;
  animation-delay: 0s;
}

.b2 {
  background: #ffcf7a;
  animation-delay: 0.3s;
}

.b3 {
  background: #ff7b9a;
  animation-delay: 0.7s;
}

.b4 {
  background: #f2a0ff;
  animation-delay: 1s;
}

.b5 {
  background: #8fd3ff;
  animation-delay: 1.3s;
}

.birthday-sign {
  margin: 0.5rem 0 0;
  text-align: center;
  color: #7d3328;
  font-size: 1.15rem;
  font-style: italic;
}

.birthday-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiDrop linear forwards;
}

.memory-slider {
  margin-top: 3.4rem;
}

.slider-shell {
  position: relative;
  padding: 1rem 3.3rem 3.2rem;
  overflow: hidden;
}

.slider-viewport {
  overflow: hidden;
  border-radius: 16px;
}

.slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.slide-card {
  flex: 0 0 100%;
  margin: 0;
  padding: 0.65rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0.9rem;
  align-items: center;
}

.slide-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.slide-card h3 {
  margin: 0 0 0.25rem;
  color: #7a2f2b;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
}

.slide-card p {
  margin: 0;
  color: #5d3d33;
  font-size: 1.18rem;
}

.slider-btn {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(126, 56, 43, 0.2);
  background: rgba(255, 255, 255, 0.85);
  color: #7b2d28;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease;
}

.slider-btn:hover {
  transform: translateY(-50%) scale(1.07);
  background: #fff;
}

.slider-prev {
  left: 0.7rem;
}

.slider-next {
  right: 0.7rem;
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 0.95rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(168, 82, 67, 0.35);
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.slider-dot.active {
  background: #c7424f;
  transform: scale(1.25);
}

.proposal {
  margin: 3.2rem auto;
  text-align: center;
  padding: 1.8rem clamp(1rem, 3vw, 2.4rem);
}

.reasons {
  margin-top: 3.2rem;
  padding: 1.6rem clamp(1rem, 3vw, 2.1rem);
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.95rem;
}

.reason-item {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1rem 0.85rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.reason-item:hover {
  transform: translateY(-5px);
}

.reason-item h3 {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
  color: #7a2f2b;
}

.reason-item p {
  margin: 0;
  font-size: 1.08rem;
}

.floating-moments {
  margin-top: 3.2rem;
}

.floating-photo-wrap {
  position: relative;
  min-height: 380px;
  padding: 1.2rem 0;
}

.float-photo {
  position: absolute;
  width: min(290px, 76vw);
  margin: 0;
  padding: 0.6rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: floatingPhoto 6.4s ease-in-out infinite;
}

.float-photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.float-photo figcaption {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin-top: 0.45rem;
}

.fp-a {
  left: 4%;
  top: 30px;
  --r: -4deg;
  animation-delay: 0s;
}

.fp-b {
  left: 35%;
  top: 110px;
  --r: 2deg;
  animation-delay: 0.6s;
}

.fp-c {
  right: 3%;
  top: 24px;
  --r: 5deg;
  animation-delay: 1.2s;
}

.promise-garden {
  margin-top: 3.4rem;
  margin-bottom: 1.4rem;
}

.garden {
  position: relative;
  overflow: hidden;
  padding: 1.2rem 1rem;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 219, 188, 0.7), transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(214, 40, 57, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.72);
}

.promise-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #5f3529;
  font-size: 1.13rem;
}

.promise-list li {
  margin: 0.35rem 0;
}

.garden-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.garden-heart {
  position: absolute;
  bottom: -18px;
  color: rgba(214, 40, 57, 0.58);
  font-size: 1rem;
  opacity: 0;
  animation: gardenHeartUp linear forwards;
}

.proposal p {
  font-size: 1.2rem;
}

.proposal-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.3rem 0;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.78rem 1.35rem;
  font-size: 1.03rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-soft {
  background: #ffffff;
  color: var(--accent-deep);
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow);
}

.btn-yes {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(214, 40, 57, 0.35);
}

.btn-think {
  background: #ffe3cf;
  color: #583225;
}

.proposal-result {
  min-height: 2.1rem;
  font-weight: 700;
  color: var(--accent-deep);
  font-size: 1.2rem;
}

.floating-heart {
  position: fixed;
  bottom: -16px;
  transform: translateX(-50%);
  color: #d62839;
  font-size: 1.4rem;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  animation-name: floatHeart;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.footer {
  text-align: center;
  padding: 0 0 2.2rem;
  color: #52352c;
  font-size: 1.08rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes driftA {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(-12px, 20px, 0) rotate(9deg);
  }
}

@keyframes driftB {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(16px, -15px, 0) rotate(-8deg);
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.8);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -240px) scale(1.2);
  }
}

@keyframes floatingPhoto {
  0% {
    transform: translateY(0) rotate(var(--r, 0deg));
  }
  50% {
    transform: translateY(-13px) rotate(calc(var(--r, 0deg) + 1deg));
  }
  100% {
    transform: translateY(0) rotate(var(--r, 0deg));
  }
}

@keyframes gardenHeartUp {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.75);
  }
  25% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translateY(-210px) scale(1.35);
  }
}

@keyframes candleGlow {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 8px 18px rgba(214, 40, 57, 0.15));
  }
  50% {
    transform: scale(1.02);
    filter: drop-shadow(0 10px 26px rgba(214, 40, 57, 0.28));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 8px 18px rgba(214, 40, 57, 0.15));
  }
}

@keyframes balloonLift {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2.5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes confettiDrop {
  0% {
    opacity: 0;
    transform: translateY(-10px) rotate(0deg);
  }
  15% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(390px) rotate(220deg);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.3);
  }
  20% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(1.4);
  }
}

@media (max-width: 640px) {
  .hero-content {
    padding-top: 2.5rem;
  }

  .music-panel {
    padding: 0.75rem 0.7rem;
  }

  .birthday-top {
    grid-template-columns: 1fr;
  }

  .birthday-cake {
    width: min(260px, 85%);
  }

  .slider-shell {
    padding: 0.8rem 0.7rem 2.8rem;
  }

  .slide-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 0.9rem;
  }

  .slide-card img {
    height: 220px;
  }

  .slider-btn {
    width: 38px;
    height: 38px;
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }

  .slider-btn:hover {
    transform: scale(1.04);
  }

  .slider-prev {
    left: 0.75rem;
  }

  .slider-next {
    right: 0.75rem;
  }

  .photo-card img {
    height: 200px;
  }

  .proposal p {
    font-size: 1.1rem;
  }

  .floating-photo-wrap {
    min-height: 620px;
  }

  .float-photo {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    width: min(360px, 100%);
    margin: 0 auto 0.9rem;
  }

  .fp-a,
  .fp-b,
  .fp-c {
    left: auto;
    right: auto;
    top: auto;
    transform: none;
  }
}

/* ---------- Icons ---------- */
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.14em;
  flex: none;
}

h2 .icon {
  color: var(--accent);
  margin-right: 0.15rem;
}

.icon.beat {
  animation: heartbeat 2.4s ease-in-out infinite;
}

h2.centered::after {
  content: "\2766";
  display: block;
  font-size: 0.95rem;
  color: var(--accent);
  opacity: 0.7;
  margin-top: 0.1rem;
}

/* ---------- Hero: bunting + portrait ---------- */
.bunting {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
  overflow: hidden;
  pointer-events: none;
}

.bunting::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  border-top: 2px solid rgba(255, 255, 255, 0.7);
}

.bunting span {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 46px solid #ff8f8f;
  transform-origin: top center;
  animation: bunting-sway 3.2s ease-in-out infinite;
}

.bunting span:nth-child(5n + 2) {
  border-top-color: #ffcf7a;
  animation-delay: 0.3s;
}

.bunting span:nth-child(5n + 3) {
  border-top-color: #ff7b9a;
  animation-delay: 0.6s;
}

.bunting span:nth-child(5n + 4) {
  border-top-color: #f2a0ff;
  animation-delay: 0.9s;
}

.bunting span:nth-child(5n) {
  border-top-color: #8fd3ff;
  animation-delay: 1.2s;
}

.hero-portrait {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 1rem;
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ffd59a, #ff8fa3, #f2a0ff, #8fd3ff, #ffd59a);
  animation: spin 9s linear infinite;
  filter: blur(1px);
}

.hero-portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  display: block;
}

.portrait-badge {
  position: absolute;
  right: -4px;
  bottom: 6px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.35rem;
  border: 3px solid #fff;
  animation: heartbeat 2s ease-in-out infinite;
}

/* ---------- Bookish love letter ---------- */
#letter {
  position: relative;
  background:
    linear-gradient(90deg, rgba(120, 70, 40, 0.1), transparent 6%),
    repeating-linear-gradient(transparent 0 33px, rgba(160, 110, 80, 0.13) 33px 34px),
    #fffaf0;
  border-left: 6px solid #8e2b3a;
}

#letter .book-ribbon {
  right: 8%;
}

#letter h2 {
  font-family: "Playfair Display", Georgia, serif;
  color: #6f2230;
}

#letter p:not(.chapter-no) {
  font-size: 1.22rem;
}

#letter h2 + p::first-letter {
  float: left;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3.6rem;
  line-height: 0.85;
  padding: 0.25rem 0.5rem 0 0;
  color: var(--accent);
}

.chapter-no {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9d5a4c;
}

.book-ribbon {
  position: absolute;
  top: -6px;
  right: 12%;
  width: 26px;
  height: 84px;
  background: linear-gradient(180deg, #e0364a, #a61d30);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  z-index: 4;
  pointer-events: none;
}

/* ---------- Infographic ---------- */
.infographic {
  margin-top: 3.4rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 1.2rem 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 182, 163, 0.35);
}

.stat-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd9cc, #ffb3a6);
  color: #9d1d2d;
  font-size: 1.7rem;
  animation: heartbeat 2.6s ease-in-out infinite;
}

.stat-num {
  display: block;
  margin-top: 0.4rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.3rem;
  color: #8e2330;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.stat-bar {
  height: 8px;
  margin-top: 0.7rem;
  border-radius: 99px;
  background: rgba(150, 80, 60, 0.15);
  overflow: hidden;
}

.stat-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d62839, #ff9f7a);
  transition: width 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.infographic.visible .stat-bar i {
  width: var(--w);
}

/* ---------- Storybook ---------- */
.book-section {
  margin-top: 3.4rem;
}

.book {
  position: relative;
  width: min(940px, 100%);
  margin: 0 auto;
  perspective: 1800px;
  filter: drop-shadow(0 22px 30px rgba(70, 30, 20, 0.28));
}

.book::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 28px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(80, 40, 25, 0.3), transparent);
  z-index: 3;
  pointer-events: none;
}

.book-spread {
  display: none;
  grid-template-columns: 1fr 1fr;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7b2231, #5a1622);
}

.book-spread.active {
  display: grid;
}

.book-page {
  position: relative;
  min-height: 430px;
  padding: 1.6rem 1.5rem;
  background:
    repeating-linear-gradient(transparent 0 31px, rgba(160, 110, 80, 0.14) 31px 32px),
    #fffaf0;
}

.book-page.left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 8px 0 0 8px;
  background:
    linear-gradient(270deg, rgba(0, 0, 0, 0.09), transparent 14%),
    repeating-linear-gradient(transparent 0 31px, rgba(160, 110, 80, 0.14) 31px 32px),
    #fffaf0;
}

.book-page.right {
  border-radius: 0 8px 8px 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.09), transparent 14%),
    repeating-linear-gradient(transparent 0 31px, rgba(160, 110, 80, 0.14) 31px 32px),
    #fffaf0;
}

.book-spread.active .book-page.right {
  transform-origin: left center;
  animation: pageTurn 0.75s ease;
}

.page-photo {
  position: relative;
  width: min(250px, 100%);
  aspect-ratio: 3 / 4;
  padding: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(70, 30, 20, 0.25);
  transform: rotate(-2deg);
}

.page-photo::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 24px;
  transform: translateX(-50%) rotate(3deg);
  background: rgba(255, 207, 122, 0.7);
}

.page-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-caption {
  margin: 0.9rem 0 0;
  font-family: "Great Vibes", cursive;
  font-size: 1.9rem;
  color: #7a2f2b;
}

.chapter-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.6rem;
  background: #fff;
}

.book-page.right h3 {
  margin: 0.2rem 0 0.6rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #6f2230;
}

.book-page.right h3 + p {
  margin: 0;
  font-size: 1.2rem;
  color: #4f3027;
}

.book-page.right h3 + p::first-letter {
  float: left;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3.2rem;
  line-height: 0.85;
  padding: 0.2rem 0.45rem 0 0;
  color: var(--accent);
}

.page-no {
  position: absolute;
  bottom: 0.8rem;
  left: 0;
  right: 0;
  text-align: center;
  font-style: italic;
  color: #9d5a4c;
}

.book-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.book-indicator {
  color: #6f2230;
  font-size: 1.1rem;
}

/* ---------- Timeline ---------- */
.timeline-section {
  margin-top: 3.4rem;
}

.timeline {
  position: relative;
  max-width: 840px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), #f2a28f);
}

.tl-item {
  position: relative;
  display: flex;
  margin-bottom: 1.4rem;
}

.tl-item:nth-child(odd) {
  justify-content: flex-start;
  padding-right: calc(50% + 34px);
}

.tl-item:nth-child(even) {
  justify-content: flex-end;
  padding-left: calc(50% + 34px);
}

.tl-icon {
  position: absolute;
  left: 50%;
  top: 0.5rem;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  color: var(--accent);
  font-size: 1.3rem;
  z-index: 1;
  box-shadow: 0 0 0 6px rgba(214, 40, 57, 0.12);
}

.tl-card {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.tl-card h3 {
  margin: 0 0 0.15rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  color: #6f2230;
}

.tl-card p {
  margin: 0;
  font-size: 1.1rem;
}

/* ---------- Rabiya photo album ---------- */
.rabiya-gallery {
  margin-top: 3.4rem;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.6rem 1.1rem;
  padding: 0.6rem;
}

.polaroid {
  position: relative;
  margin: 0;
  padding: 0.7rem 0.7rem 0.9rem;
  background: #fff;
  box-shadow: 0 14px 30px rgba(70, 30, 20, 0.22);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 70px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 207, 122, 0.7);
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 22px 40px rgba(70, 30, 20, 0.3);
  z-index: 2;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.polaroid figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-family: "Great Vibes", cursive;
  font-size: 1.6rem;
  color: #7a2f2b;
}

.polaroid figcaption .icon {
  color: var(--accent);
}

.upload-row {
  margin-top: 1.4rem;
  text-align: center;
}

#rabiyaPhotoInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-row .file-picker {
  box-shadow: var(--shadow);
}

.upload-hint {
  margin: 0.6rem auto 0;
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Birthday wish + celebration ---------- */
.wish-row {
  margin-top: 0.9rem;
  text-align: center;
}

.wish-text {
  min-height: 1.8rem;
  margin: 0.7rem 0 0;
  font-size: 1.2rem;
  font-style: italic;
  color: #8e2330;
}

.rise-balloon {
  position: fixed;
  bottom: -90px;
  width: 44px;
  height: 56px;
  border-radius: 56% 56% 52% 52%;
  opacity: 0.92;
  z-index: 5;
  pointer-events: none;
  animation: riseUp linear forwards;
}

.rise-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 34px;
  background: rgba(90, 58, 47, 0.5);
}

.fall-confetti {
  position: fixed;
  top: -20px;
  width: 9px;
  height: 15px;
  border-radius: 2px;
  z-index: 5;
  pointer-events: none;
  animation: confettiFall linear forwards;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.18);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.12);
  }
}

@keyframes bunting-sway {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pageTurn {
  from {
    transform: rotateY(-80deg);
    opacity: 0.2;
  }
  to {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

@keyframes riseUp {
  0% {
    transform: translate(0, 0) rotate(-4deg);
  }
  50% {
    transform: translate(var(--sway, 20px), -60vh) rotate(4deg);
  }
  100% {
    transform: translate(0, -125vh) rotate(-3deg);
  }
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--dx, 0px), 110vh, 0) rotate(720deg);
    opacity: 0.9;
  }
}

@media (max-width: 720px) {
  .book-spread.active {
    grid-template-columns: 1fr;
  }

  .book::before {
    display: none;
  }

  .book-page {
    min-height: 0;
    padding-bottom: 2.6rem;
  }

  .book-page.left {
    border-radius: 8px 8px 0 0;
    padding-bottom: 1.6rem;
  }

  .book-page.right {
    border-radius: 0 0 8px 8px;
  }

  .timeline::before {
    left: 22px;
  }

  .tl-item:nth-child(odd),
  .tl-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 64px;
    padding-right: 0;
  }

  .tl-icon {
    left: 22px;
  }

  .hero-portrait {
    width: 140px;
    height: 140px;
  }

  .bunting span {
    border-left-width: 14px;
    border-right-width: 14px;
    border-top-width: 34px;
  }
}

/* =====================================================
   Premium layer: gate, ceremony, balloons, reel, petals
   ===================================================== */
body.locked {
  overflow: hidden;
}

/* ---------- Intro gate ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 143, 163, 0.35), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(242, 160, 255, 0.28), transparent 40%),
    linear-gradient(160deg, #2a0f26, #4a1530 55%, #2a1030);
  transition: opacity 0.9s ease, transform 0.9s ease, visibility 0.9s;
}

.gate.open {
  opacity: 0;
  transform: scale(1.06);
  visibility: hidden;
  pointer-events: none;
}

.gate::before,
.ceremony::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 28% 68%, #ffe9c4, transparent),
    radial-gradient(1.8px 1.8px at 46% 14%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 63% 52%, #ffd6e6, transparent),
    radial-gradient(1.6px 1.6px at 78% 24%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 90% 72%, #ffe9c4, transparent),
    radial-gradient(1.4px 1.4px at 8% 84%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 54% 88%, #fff, transparent);
  animation: starTwinkle 3.4s ease-in-out infinite alternate;
}

.gate-card {
  position: relative;
  width: min(460px, 100%);
  text-align: center;
  padding: 2rem 1.6rem 1.8rem;
  border-radius: 26px;
  background: rgba(255, 247, 240, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff3e6;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 70px rgba(255, 120, 150, 0.25);
}

.gate-heart {
  display: inline-block;
  font-size: 3.4rem;
  color: #ff6f8e;
  filter: drop-shadow(0 0 18px rgba(255, 111, 142, 0.8));
  animation: heartbeat 1.6s ease-in-out infinite;
}

.gate-heart .icon {
  fill: currentColor;
}

.gate-card .eyebrow {
  color: #ffd9c4;
}

.gate-title {
  margin: 0.2rem 0 0.4rem;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  color: #fff3e6;
}

.gate-card p {
  color: #ffe6d6;
  font-size: 1.2rem;
}

.gate .btn-yes {
  margin-top: 0.4rem;
  padding: 0.9rem 1.9rem;
  font-size: 1.15rem;
  animation: ringPulse 2.2s infinite;
}

/* ---------- Music button ---------- */
.music-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #d62839, #ff7b9a);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(214, 40, 57, 0.45);
  transition: transform 0.2s ease;
}

.music-fab:hover {
  transform: scale(1.08);
}

.music-fab[aria-pressed="true"] {
  animation: ringPulse 2.4s infinite;
}

.music-fab[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(-45deg);
}

/* ---------- Hero typewriter ---------- */
.typewriter {
  min-height: 2rem;
  margin: 0 auto 1.2rem;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  color: #ffd9c4;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 3px;
  background: #ffd9c4;
  vertical-align: -0.15em;
  animation: caretBlink 1s steps(1) infinite;
}

/* ---------- Cake ceremony ---------- */
.ceremony {
  position: relative;
  overflow: hidden;
  margin: 3.4rem auto;
  padding: 1.8rem clamp(1rem, 3vw, 2.4rem) 1.6rem;
}

.ceremony::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 170, 90, 0.28), transparent 42%),
    linear-gradient(180deg, #1b0f26, #2d1230 60%, #3b1630);
}

.ceremony::before,
.ceremony::after {
  z-index: 0;
  transition: opacity 1.4s ease;
}

.ceremony:not([data-step="lit"])::before,
.ceremony:not([data-step="lit"])::after {
  opacity: 0;
}

.ceremony > * {
  position: relative;
  z-index: 1;
}

.ceremony h2,
.ceremony .section-copy,
.ceremony-note {
  transition: color 1.2s ease;
}

.ceremony[data-step="lit"] h2 {
  color: #fff0e0;
}

.ceremony[data-step="lit"] .section-copy,
.ceremony[data-step="lit"] .ceremony-note {
  color: #f6d9c8;
}

.cake-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 400px;
  padding: 1.2rem 0 0.4rem;
  touch-action: pan-y;
}

.ceremony[data-step="blown"] .cake-stage {
  cursor: none;
  touch-action: none;
}

.ceremony[data-step="lit"] .cake-wrap {
  cursor: pointer;
}

.cake-glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(520px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 190, 110, 0.45), rgba(255, 150, 80, 0.14) 45%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
  animation: glowFlicker 1.6s ease-in-out infinite alternate;
}

.ceremony[data-step="lit"] .cake-glow {
  opacity: 1;
}

.cake-wrap {
  position: relative;
  width: min(360px, 82vw);
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.28));
  user-select: none;
  -webkit-user-select: none;
}

.cake-inside,
.cake-half {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cake-half svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cake-half {
  transform-origin: 50% 100%;
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cake-half-left {
  clip-path: inset(0 49.8% 0 0);
}

.cake-half-right {
  clip-path: inset(0 0 0 49.8%);
}

.cake-wrap.cut-open .cake-half-left {
  transform: translateX(-7%) rotate(-2.5deg);
}

.cake-wrap.cut-open .cake-half-right {
  transform: translateX(7%) rotate(2.5deg);
}

.flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flicker 0.32s ease-in-out infinite alternate;
}

.flame-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: glowPulse 0.8s ease-in-out infinite alternate;
}

.flame-set {
  transition: opacity 0.35s ease;
}

.ceremony:not([data-step="lit"]) .flame-set {
  opacity: 0;
}

.smoke {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.ceremony:not([data-step="lit"]) .smoke {
  animation: smokeUp 2.2s ease-out;
}

.cut-trail {
  position: absolute;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 20%, #fff 80%, rgba(255, 255, 255, 0));
  box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}

.cut-trail.show {
  opacity: 0.9;
}

.knife {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 40px;
  height: 120px;
  transform-origin: 20px 118px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
  transition: opacity 0.2s ease;
}

.knife.show {
  opacity: 1;
}

.ceremony-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.ceremony-note {
  min-height: 1.5rem;
  margin: 0.6rem 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.ceremony:not([data-step="lit"]) .only-lit,
.ceremony:not([data-step="blown"]) .only-blown,
.ceremony:not([data-step="cut"]) .only-done {
  display: none;
}

/* ---------- Photo balloons, pops, petals, trail ---------- */
.photo-balloon {
  position: fixed;
  bottom: -190px;
  z-index: 6;
  width: 98px;
  cursor: pointer;
  will-change: transform;
  animation: riseFull linear forwards;
}

.pb-body {
  width: 98px;
  height: 120px;
  padding: 7px;
  border-radius: 50% 50% 48% 48%;
  background: var(--c, #ff8fa3);
  box-shadow:
    inset -10px -12px 18px rgba(0, 0, 0, 0.16),
    inset 8px 8px 16px rgba(255, 255, 255, 0.4),
    0 12px 24px rgba(70, 30, 20, 0.22);
}

.pb-body img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50% 50% 48% 48%;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.photo-balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 116px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid var(--c, #ff8fa3);
}

.photo-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 125px;
  width: 1px;
  height: 52px;
  background: rgba(90, 58, 47, 0.5);
  transform-origin: top center;
  animation: stringSway 2.4s ease-in-out infinite alternate;
}

.pop-bit {
  position: fixed;
  z-index: 7;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: popBit 0.8s ease-out forwards;
}

.petal {
  position: fixed;
  top: -30px;
  z-index: 4;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, var(--pc, #ff7b9a), #d62839);
  opacity: 0.85;
  pointer-events: none;
  animation: petalFall linear forwards;
}

.trail-heart {
  position: fixed;
  z-index: 7;
  font-size: 14px;
  color: #ff6f8e;
  text-shadow: 0 0 8px rgba(255, 111, 142, 0.7);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: trailFade 1s ease-out forwards;
}

/* ---------- Moving photo reel ---------- */
.reel-section {
  margin-top: 3.4rem;
}

.reel {
  position: relative;
  width: 100vw;
  margin: 0 0 1.1rem calc(50% - 50vw);
  padding: 0.8rem 0 1rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.reel-track {
  display: flex;
  width: max-content;
}

.reel-track.go-left {
  animation: reelLeft 46s linear infinite;
}

.reel-track.go-right {
  animation: reelRight 52s linear infinite;
}

.reel:hover .reel-track {
  animation-play-state: paused;
}

.reel-frame {
  flex: none;
  width: 170px;
  margin: 0 0.65rem;
  padding: 7px 7px 24px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 12px 24px rgba(70, 30, 20, 0.2);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.3s ease;
}

.reel-frame:nth-child(even) {
  margin-top: 14px;
}

.reel-frame:hover {
  transform: rotate(0deg) scale(1.08);
}

.reel-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ---------- Premium keyframes ---------- */
@keyframes starTwinkle {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}

@keyframes ringPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 111, 142, 0.55);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(255, 111, 142, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 111, 142, 0);
  }
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

@keyframes glowFlicker {
  from {
    transform: translate(-50%, -50%) scale(0.96);
  }
  to {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes flicker {
  from {
    transform: scale(1, 1) rotate(-2deg);
  }
  to {
    transform: scale(0.92, 1.08) rotate(2deg);
  }
}

@keyframes glowPulse {
  from {
    transform: scale(0.9);
    opacity: 0.8;
  }
  to {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes smokeUp {
  0% {
    opacity: 0.6;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-46px) scale(5);
  }
}

@keyframes riseFull {
  0% {
    transform: translate(0, 0) rotate(-3deg);
  }
  50% {
    transform: translate(var(--sway, 24px), calc(-50vh - 160px)) rotate(3deg);
  }
  100% {
    transform: translate(0, calc(-100vh - 360px)) rotate(-3deg);
  }
}

@keyframes stringSway {
  from {
    transform: rotate(-6deg);
  }
  to {
    transform: rotate(6deg);
  }
}

@keyframes popBit {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), var(--dy)) scale(0.2);
    opacity: 0;
  }
}

@keyframes petalFall {
  0% {
    transform: translate3d(0, -10px, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(calc(var(--dx) * 0.4 + 30px), 55vh, 0) rotate(calc(var(--rot) * 0.5));
  }
  100% {
    transform: translate3d(var(--dx), 112vh, 0) rotate(var(--rot));
  }
}

@keyframes trailFade {
  to {
    opacity: 0;
    transform: translate(-50%, -190%) scale(0.4);
  }
}

@keyframes reelLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes reelRight {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .cake-stage {
    min-height: 340px;
  }

  .photo-balloon {
    width: 78px;
  }

  .pb-body {
    width: 78px;
    height: 96px;
    padding: 5px;
  }

  .photo-balloon::before {
    top: 92px;
  }

  .photo-balloon::after {
    top: 101px;
  }

  .reel-frame {
    width: 140px;
  }
}

/* ---------- Love, Kisses & Hugs ---------- */
.kh-section {
  margin-top: 3.4rem;
}

.kh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.kh-card {
  position: relative;
  overflow: hidden;
  padding: 1.3rem 1.1rem 1.1rem;
  text-align: center;
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 143, 163, 0.28), transparent 38%),
    rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.kh-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd9cc, #ffb3a6);
  color: #9d1d2d;
  font-size: 1.6rem;
  animation: heartbeat 2.8s ease-in-out infinite;
}

.kh-card h3 {
  margin: 0.2rem 0 0.35rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  color: #6f2230;
}

.kh-card p {
  margin: 0;
  font-size: 1.12rem;
  color: #5d3d33;
}

.kh-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.kh-counter {
  margin: 0.8rem 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.kh-counter span {
  font-weight: 700;
  color: var(--accent-deep);
}

.kh-message {
  min-height: 1.8rem;
  margin: 0.4rem 0 0;
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: #8e2330;
}

.kiss-float {
  position: fixed;
  z-index: 8;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 8px rgba(214, 40, 57, 0.35));
  animation: kissFloat var(--dur, 2s) ease-out forwards;
}

@keyframes kissFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% - var(--dy, 220px))) scale(1.2) rotate(var(--rot, 0deg));
  }
}

/* ---------- Sign-off: With Kisses and Hugs ---------- */
.signoff {
  margin: 3.2rem auto 2.4rem;
  padding: 2.4rem 1rem 1.6rem;
  text-align: center;
}

.seal {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6f8e, #b3182b 70%);
  color: #fff;
  font-size: 1.9rem;
  box-shadow: 0 10px 22px rgba(160, 24, 40, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.25);
  animation: heartbeat 2s ease-in-out infinite;
}

.seal .icon {
  fill: currentColor;
}

.signoff-line {
  margin: 0.9rem 0 0;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
}

.signoff-script {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 1.15;
  color: #b3182b;
  text-shadow: 0 2px 14px rgba(214, 40, 57, 0.25);
}

.signoff-name {
  margin: 0.1rem 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  color: #6f2230;
}

.signoff-xo {
  margin: 0.2rem 0 0;
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 0.15em;
}

@media (prefers-reduced-motion: reduce) {
  .kiss-float,
  .kh-icon,
  .seal {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reel-track,
  .hero-portrait::before,
  .bunting span,
  .icon.beat,
  .flame,
  .caret {
    animation: none;
  }
}
