:root {
  --rose-50: #fff7fb;
  --rose-100: #fdf1f7;
  --rose-200: #f7dfe9;
  --rose-300: #efc5d7;
  --rose-400: #e7a9c3;
  --rose-500: #db8db4;
  --rose-600: #c86d9d;
  --blush: #f8e7d6;
  --cream: #f7f2ee;
  --sand: #e7d7c5;
  --gold: #d7b77d;
  --wine: #7d425a;
  --wine-dark: #4f2230;
  --text: #3d2f34;
  --muted: #7b5b66;
  --shadow-soft: 0 20px 45px rgba(134, 86, 97, 0.14);
  --shadow-card: 0 15px 35px rgba(112, 72, 81, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(246, 213, 223, 0.8), transparent 30%),
    linear-gradient(180deg, #fff8fb 0%, #fffdfc 20%, #fdf8f3 100%);
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow-x: hidden;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 8% -12% auto auto;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 200, 226, 0.42), rgba(255, 200, 226, 0) 68%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.page-shell::after {
  content: "";
  position: fixed;
  inset: auto auto 8% -14%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(244, 210, 168, 0.3), rgba(244, 210, 168, 0) 68%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 6rem 0;
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading.center {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--wine);
  font-size: 0.8rem;
  letter-spacing: 0.24rem;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--wine-dark);
  font-family: "Cormorant Garamond", serif;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3.2rem, 6vw, 6rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(255, 250, 252, 0.75);
  border-bottom: 1px solid rgba(125, 66, 90, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  font-family: "Parisienne", cursive;
  font-size: 2.2rem;
  color: var(--wine);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--wine);
}

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 35%),
    linear-gradient(140deg, rgba(247, 201, 220, 0.9), rgba(255, 246, 248, 0.7) 40%, rgba(230, 222, 210, 0.75));
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 2rem;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  letter-spacing: 0.22rem;
}

.lead {
  margin-top: 1rem;
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.35) 40%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 30px rgba(125, 66, 90, 0.2);
  filter: saturate(1.1);
}

.btn:hover::before {
  transform: translateX(120%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--wine) 0%, var(--rose-600) 100%);
  color: white;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--wine);
  border: 1px solid rgba(125, 66, 90, 0.18);
}

.hero-ornament {
  position: relative;
  height: 420px;
  display: grid;
  place-items: center;
}

.heart {
  position: absolute;
  background: linear-gradient(135deg, rgba(255, 176, 214, 0.7), rgba(160, 81, 110, 0.8));
  transform: rotate(-45deg);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 20px 35px rgba(168, 87, 126, 0.22);
  animation: pulseHeart 4s ease-in-out infinite;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 50%;
}

.heart::before {
  top: -50%;
  left: 0;
}

.heart::after {
  left: 50%;
  top: 0;
}

.heart-large {
  width: 120px;
  height: 120px;
}

.heart-medium {
  width: 86px;
  height: 86px;
  right: 22%;
  top: 18%;
  animation-delay: 0.7s;
}

.heart-small {
  width: 56px;
  height: 56px;
  left: 18%;
  bottom: 18%;
  animation-delay: 1.6s;
}

@keyframes pulseHeart {
  0%,
  100% {
    transform: rotate(-45deg) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: rotate(-45deg) scale(1.08);
    opacity: 1;
  }
}

.surprise {
  background: rgba(255, 255, 255, 0.38);
}

.envelope-wrapper {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.envelope-button {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  transform-origin: center;
  transition: transform 0.4s ease;
}

.envelope-button:hover {
  transform: translateY(-4px);
}

.envelope {
  position: relative;
  width: min(540px, 78vw);
  height: 310px;
  background: linear-gradient(180deg, #f9e5de 0%, #f0d2d8 100%);
  border: 1px solid rgba(125, 66, 90, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(125,66,90,0.04));
}

.envelope::before,
.envelope::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: 18px;
}

.envelope::before {
  clip-path: polygon(0 0, 50% 50%, 100% 0);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(237,196,201,0.9));
  height: 54%;
}

.envelope::after {
  clip-path: polygon(0 0, 100% 0, 50% 50%);
  background: linear-gradient(180deg, rgba(240,210,214,0.95), rgba(255,255,255,0.7));
  height: 54%;
}

.envelope-flap {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(244, 216, 223, 0.9), rgba(212, 121, 150, 0.7));
  clip-path: polygon(0 0, 100% 0, 50% 60%);
  transform-origin: top center;
  transition: transform 0.65s ease;
}

.letter-preview {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200px;
  height: 120px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(125, 66, 90, 0.12);
  transform: translate(-50%, -50%) rotate(-4deg);
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 30px rgba(103, 71, 80, 0.08);
  color: var(--wine);
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}

.envelope-open .envelope-flap {
  transform: rotateX(180deg);
}

.surprise-letter {
  position: absolute;
  z-index: 3;
  width: min(520px, 78vw);
  max-height: min(78vh, 620px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.envelope-open + .surprise-letter,
.surprise-letter.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.letter-card {
  background: linear-gradient(180deg, #fffaf7 0%, #f5efe8 100%);
  border: 1px solid rgba(125, 66, 90, 0.12);
  border-radius: 20px;
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow-card);
  color: var(--text);
}

.letter-salute {
  margin: 0 0 1rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--wine);
}

.letter-card p {
  font-size: 1.08rem;
  line-height: 1.9;
  margin: 0;
  color: var(--text);
}

.verse-reference {
  display: inline-block;
  margin-top: 1rem;
  color: var(--wine);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.letter-card .verse-text {
  margin-top: 0.35rem;
  color: var(--wine-dark);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.5;
}

.letter-card .verse-reflection {
  margin-top: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.65;
}

.letter-paper {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fffdfc 0%, #f8f1ed 100%);
  border: 1px solid rgba(125, 66, 90, 0.12);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 2.2rem 2rem 2.6rem;
  overflow: hidden;
}

.letter-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(125, 66, 90, 0.045), rgba(255,255,255,0), rgba(125,66,90,0.03));
  pointer-events: none;
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.6rem;
  position: relative;
  z-index: 1;
}

.stamp {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(231, 169, 195, 0.18);
  color: var(--wine);
  font-size: 1.5rem;
  border: 1px solid rgba(125, 66, 90, 0.08);
}

.letter-header p {
  margin: 0;
  color: var(--wine);
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.letter-content {
  position: relative;
  z-index: 1;
  font-size: 1.08rem;
  line-height: 2.1;
  color: var(--text);
}

.letter-content p {
  margin: 0 0 1.1rem;
}

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 1.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(125,66,90,0.18), rgba(215,183,125,0.8), rgba(125,66,90,0.18));
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 2.4rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd9ea 0%, #d8b77d 100%);
  border: 4px solid #fff;
  box-shadow: 0 12px 24px rgba(125, 66, 90, 0.12);
}

.timeline-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(125, 66, 90, 0.08);
  border-radius: 18px;
  padding: 1.4rem 1.35rem;
  box-shadow: var(--shadow-card);
}

.timeline-date {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.42rem 0.8rem;
  border-radius: 99px;
  background: rgba(215, 183, 125, 0.22);
  color: var(--wine-dark);
  font-weight: 700;
  font-size: 0.77rem;
  letter-spacing: 0.07rem;
}

.timeline-card h3 {
  margin-bottom: 0.65rem;
  font-size: 2rem;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 22px;
  min-height: 260px;
  background: linear-gradient(135deg, rgba(247, 219, 228, 0.72), rgba(230, 212, 189, 0.72));
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(125, 66, 90, 0.08);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-item img,
.gallery-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-placeholder {
  display: grid;
  place-items: center;
  color: var(--wine);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(246, 218, 232, 0.65), rgba(240, 222, 205, 0.8));
}

.gallery-item.large {
  grid-column: span 2;
}

.videos,
.music {
  background: rgba(255,255,255,0.35);
}

.video-card,
.music-card {
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(125, 66, 90, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.video-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto 1rem;
}

.video-gallery[hidden] {
  display: none;
}

.video-item {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(125, 66, 90, 0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow-card);
}

.video-item h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.video-stage {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(38, 31, 36, 0.88), rgba(76, 45, 58, 0.9));
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #1a1117;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  gap: 1rem;
  color: rgba(255,255,255,0.82);
  background: radial-gradient(circle at center, rgba(255,255,255,0.06), rgba(25,17,21,0.62));
}

.video-placeholder i {
  font-size: 3rem;
  color: rgba(255,255,255,0.8);
}

.video-placeholder.hidden {
  display: none;
}

.controls-row {
  display: flex;
  justify-content: center;
  padding-top: 0.9rem;
}

.music-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.2rem;
  align-items: center;
}

.music-visual {
  display: grid;
  place-items: center;
  min-height: 240px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.7), rgba(236, 207, 220, 0.9));
  border-radius: 20px;
}

.disc {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #fff 0%, #f2d9dd 20%, #d7a6bd 38%, #8f526f 65%, #311c28 100%);
  box-shadow: 0 18px 32px rgba(100, 53, 74, 0.2);
  animation: spinDisc 8s linear infinite;
}

.disc.paused {
  animation-play-state: paused;
}

.disc-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: inset 0 0 0 10px rgba(125,66,90,0.1);
}

@keyframes spinDisc {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.music-content {
  padding: 0.7rem 1rem 0.7rem 0;
}

.track-label {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  color: var(--wine);
  font-weight: 700;
  font-size: 0.72rem;
}

.music-content h3 {
  margin-bottom: 1.2rem;
}

.spotify-player {
  display: block;
  width: 100%;
  min-height: 152px;
  border: 0;
  border-radius: 12px;
}

.spotify-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--wine);
  font-weight: 700;
}

.additional-track {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(125, 66, 90, 0.12);
}

.additional-track h4 {
  margin: 0 0 0.7rem;
  color: var(--wine-dark);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
}

.magic-box {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(248, 234, 240, 0.9));
  border: 1px solid rgba(125, 66, 90, 0.1);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  padding: 2.2rem 1.4rem 2rem;
  overflow: hidden;
}

.magic-box::before {
  content: "";
  position: absolute;
  inset: -20% 10% auto auto;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 223, 0.4), transparent 70%);
  filter: blur(10px);
}

.love-meter-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  margin: 1rem auto 1.4rem;
  max-width: 540px;
}

.love-meter {
  position: relative;
  width: 100%;
  height: 24px;
  border-radius: 999px;
  background: rgba(125, 66, 90, 0.08);
  border: 1px solid rgba(125, 66, 90, 0.1);
  overflow: hidden;
  box-shadow: inset 0 3px 10px rgba(125, 66, 90, 0.08);
}

.love-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f3bddd 0%, #e09cc1 40%, #c86d9d 100%);
  box-shadow: 0 10px 20px rgba(200, 109, 157, 0.2);
  transition: width 0.2s ease;
}

.love-meter-percent {
  text-align: center;
  font-weight: 700;
  color: var(--wine);
}

.magic-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.magic-reveal {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 1.6rem auto 0;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: all 0.5s ease;
  pointer-events: none;
}

.magic-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.reveal-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(247, 233, 238, 0.92));
  border: 1px solid rgba(125, 66, 90, 0.1);
  border-radius: 24px;
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.love-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.love-particle {
  position: absolute;
  color: rgba(200, 109, 157, 0.9);
  font-size: 1.5rem;
  animation: burstHeart 1.4s ease-out forwards;
}

@keyframes burstHeart {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(20deg);
  }
}

.love-mini-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.spark-heart {
  position: absolute;
  bottom: 8px;
  color: rgba(200, 109, 157, 0.85);
  font-size: 0.85rem;
  animation: sparkRise 0.9s ease-out forwards;
}

@keyframes sparkRise {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.7);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift-x), -26px) scale(1.1);
  }
}

.surprise-badge {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.46rem 0.8rem;
  border-radius: 999px;
  background: rgba(215, 183, 125, 0.25);
  color: var(--wine-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.couple-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.2rem 0 1rem;
}

.avatar {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(243, 190, 214, 0.8), rgba(255,255,255,0.6));
  border: 2px solid rgba(125, 66, 90, 0.12);
  color: var(--wine-dark);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(125, 66, 90, 0.12);
}

.avatar-heart {
  font-size: 2rem;
  color: var(--rose-600);
  animation: pulseHeart 2.2s ease-in-out infinite;
}

.reveal-card p {
  margin: 0;
  line-height: 1.8;
  color: var(--muted);
}

.games {
  background: rgba(255, 255, 255, 0.3);
}

.memory-game {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}

.memory-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(247,234,240,0.72));
  border: 1px solid rgba(125, 66, 90, 0.1);
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: var(--shadow-card);
}

.memory-panel p {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.memory-stats {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--wine-dark);
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 0.7rem;
}

.memory-card {
  position: relative;
  aspect-ratio: 1;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(247, 219, 228, 0.8), rgba(230, 212, 189, 0.9));
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.memory-card:hover {
  transform: translateY(-2px);
}

.memory-card.is-visible,
.memory-card.is-matched {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(249, 237, 241, 0.98));
  box-shadow: 0 18px 32px rgba(150, 92, 117, 0.18), 0 0 0 2px rgba(215, 183, 125, 0.3);
}

.memory-card-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  font-weight: 700;
  color: var(--wine-dark);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.memory-card.is-visible .memory-card-inner,
.memory-card.is-matched .memory-card-inner {
  opacity: 1;
  transform: scale(1);
}

.memory-card::before {
  content: "♥";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: rgba(125, 66, 90, 0.7);
  transition: opacity 0.2s ease;
}

.memory-card.is-visible::before,
.memory-card.is-matched::before {
  opacity: 0;
}

.memory-message {
  max-width: 760px;
  margin: 1.4rem auto 0;
  padding: 0.8rem 1rem;
  text-align: center;
  color: var(--wine-dark);
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.18rem;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.7;
  min-height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.75), rgba(247, 221, 232, 0.72));
  border: 1px solid rgba(125, 66, 90, 0.08);
  box-shadow: 0 12px 28px rgba(125, 66, 90, 0.08);
  text-shadow: 0 2px 18px rgba(125, 66, 90, 0.08);
  animation: pulseMessage 2.5s ease-in-out infinite;
}

@keyframes pulseMessage {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 12px 28px rgba(125, 66, 90, 0.08);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 16px 32px rgba(125, 66, 90, 0.12);
  }
}

.victory-letter-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  z-index: 120;
  background: radial-gradient(circle at center, rgba(255, 224, 235, 0.28), rgba(74, 42, 58, 0.62));
  backdrop-filter: blur(1.5px);
  transition: opacity 0.3s ease;
}

.victory-letter-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.victory-letter-card {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(480px, 82vw);
  min-height: 260px;
  padding: 2rem 1.8rem 1.6rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,235,238,0.96));
  border: 1px solid rgba(125, 66, 90, 0.16);
  border-radius: 22px;
  box-shadow: 0 30px 60px rgba(82, 48, 61, 0.18);
  transform: translate(var(--tx, -50%), var(--ty, -50%)) rotate(var(--rot, 0deg)) scale(0.7);
  opacity: 0;
  transition: transform 1.3s cubic-bezier(0.18, 0.89, 0.32, 1.1), opacity 0.5s ease;
  overflow: hidden;
}

.victory-letter-card::before,
.victory-letter-card::after {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 195, 218, 0.5), rgba(255,195,218,0) 70%);
  filter: blur(8px);
}

.victory-letter-card::after {
  inset: auto -12% -18% auto;
  background: radial-gradient(circle, rgba(217, 189, 104, 0.4), rgba(217,189,104,0) 70%);
}

.victory-letter-overlay.is-visible .victory-letter-card {
  opacity: 1;
}

.victory-letter-card.is-open {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.close-victory-letter {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(125, 66, 90, 0.08);
  color: var(--wine-dark);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.close-victory-letter:hover {
  background: rgba(125, 66, 90, 0.14);
  transform: scale(1.05);
}

.letter-seal {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(215, 183, 125, 0.2);
  color: var(--wine);
  font-size: 1.5rem;
  border: 1px solid rgba(125, 66, 90, 0.12);
  margin-bottom: 0.8rem;
}

.letter-signature,
.letter-body {
  font-family: "Uncial Antiqua", serif;
  font-style: italic;
  color: var(--wine-dark);
}

.letter-signature {
  margin: 0 0 0.8rem;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

.letter-body {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.7rem);
  line-height: 1.8;
  text-align: center;
}

body.victory-open {
  overflow: hidden;
}

.final-inner {
  display: grid;
  place-items: center;
}

.final-card {
  max-width: 860px;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(248, 234, 240, 0.9));
  border: 1px solid rgba(125, 66, 90, 0.1);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  padding: 3rem 1.5rem;
}

.final-card h2 {
  margin-bottom: 1.5rem;
}

.final-hearts {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  font-size: 2rem;
  color: var(--rose-600);
  animation: floatHearts 2.8s ease-in-out infinite;
}

.final-hearts span:nth-child(2) {
  animation-delay: 0.2s;
}

.final-hearts span:nth-child(3) {
  animation-delay: 0.4s;
}

.final-hearts span:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes floatHearts {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.scroll-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.5rem;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), var(--wine));
  color: white;
  box-shadow: 0 18px 26px rgba(125, 66, 90, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 40;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 25;
}

.confetti-piece {
  position: absolute;
  top: -10vh;
  width: 11px;
  height: 18px;
  opacity: 0;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
  animation: confettiFall linear forwards;
}

.confetti-piece::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0));
  border-radius: inherit;
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.7);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)) scale(1.12);
    opacity: 0;
  }
}

.floating-petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.petal {
  position: absolute;
  width: 13px;
  height: 18px;
  top: -20%;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(250, 190, 214, 0.8));
  border-radius: 60% 0 60% 0;
  box-shadow: 0 0 10px rgba(255, 170, 200, 0.3);
  opacity: 0.75;
  animation: fallPetal linear infinite;
}

@keyframes fallPetal {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translate3d(var(--drift), 110vh, 0) rotate(360deg);
    opacity: 0;
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 800px) {
  .nav {
    flex-direction: column;
    justify-content: center;
    padding: 0.7rem 0;
  }

  .nav-links {
    justify-content: center;
  }

  .hero-inner,
  .music-card,
  .memory-game {
    grid-template-columns: 1fr;
  }

  .hero-ornament {
    height: 260px;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item.large {
    grid-column: span 2;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 4.5rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 0.75rem;
  }

  .gallery-item.large {
    grid-column: span 2;
  }

  .gallery-item {
    min-height: 160px;
  }

  .video-gallery {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    overflow-x: auto;
    padding-bottom: 0.75rem;
  }

  .letter-paper,
  .letter-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .memory-board {
    grid-template-columns: repeat(4, minmax(58px, 1fr));
  }
}
