/* ========== Variables & Base ========== */
:root {
  --rose: #e91e63;
  --rose-light: #f8bbd9;
  --rose-dark: #c2185b;
  --cream: #fff5f8;
  --gold: #d4a574;
  --text: #2d1b2e;
  --shadow: rgba(233, 30, 99, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Quicksand', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ========== Main Page (index.html) ========== */
.main-page {
  background: linear-gradient(160deg, #fff5f8 0%, #ffe4ec 40%, #ffd6e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.main-container {
  position: relative;
  text-align: center;
  z-index: 1;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin-bottom: 0.5rem;
  animation: fadeInDown 0.7s ease-out;
}

.main-subtitle {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 1.75rem;
  opacity: 0.95;
  animation: fadeInDown 0.8s ease-out 0.15s backwards;
}

.main-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  animation: fadeInDown 0.8s ease-out 0.3s backwards;
}

.main-buttons.no-shook .btn-no {
  animation: btnNoShake 0.5s ease;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-yes {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 24px var(--shadow);
}

.btn-yes:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 32px var(--shadow);
}

.btn-no {
  background: rgba(255, 255, 255, 0.9);
  color: var(--rose-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.btn-no:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

@keyframes btnNoShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ========== No page (no.html) ========== */
.no-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
  overflow-x: hidden;
}

.no-page-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #ffe8f0 0%, #ffd6e0 40%, #ffe0e8 100%);
  z-index: 0;
}

.no-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 360px;
}

.no-figure {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 1rem;
  animation: noSadBounce 2s ease-in-out infinite;
}

.no-message {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin-bottom: 0.5rem;
}

.no-sub {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.75rem;
  opacity: 0.9;
}

.btn-try-again {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 24px var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-try-again:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 32px var(--shadow);
}

@keyframes noSadBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

.main-hint {
  font-size: 1rem;
  color: var(--rose-dark);
  margin-bottom: 1.5rem;
  opacity: 0.9;
  animation: fadeInDown 0.8s ease-out;
}

.photo-link {
  display: inline-block;
  text-decoration: none;
}

.photo-frame {
  position: relative;
  width: 280px;
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 50px var(--shadow),
    0 0 0 4px rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(233, 30, 99, 0.2);
  animation: photoFloat 3s ease-in-out infinite, frameIn 0.9s ease-out;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.photo-frame:hover {
  transform: scale(1.03);
  box-shadow:
    0 25px 60px var(--shadow),
    0 0 0 6px rgba(255, 255, 255, 0.9);
}

.photo-frame:active {
  transform: scale(0.98);
}

.main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--rose-light) 0%, var(--rose) 100%);
}

.main-photo[src=""],
.main-photo:not([src]) {
  opacity: 0.7;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(201, 24, 91, 0.85) 0%,
    rgba(233, 30, 99, 0.4) 40%,
    transparent 70%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1.5rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.photo-frame:hover .photo-overlay {
  opacity: 1;
}

.click-text {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: pulse 1.5s ease-in-out infinite;
}

/* Bouquets & flowers – main page */
.bouquet-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  animation: bouquetIn 0.8s ease-out backwards;
}

.bouquet-row.bouquet-top {
  animation-delay: 0.2s;
}

.bouquet-row.bouquet-bottom {
  margin-top: 1rem;
  margin-bottom: 0;
  animation-delay: 0.35s;
}

.bouquet-flower {
  display: inline-block;
  animation: flowerSway 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px var(--shadow));
}

.bouquet-flower:nth-child(1) { animation-delay: 0s; }
.bouquet-flower:nth-child(2) { animation-delay: 0.2s; }
.bouquet-flower:nth-child(3) { animation-delay: 0.4s; }
.bouquet-flower:nth-child(4) { animation-delay: 0.6s; }
.bouquet-flower:nth-child(5) { animation-delay: 0.8s; }
.bouquet-flower:nth-child(6) { animation-delay: 1s; }
.bouquet-flower:nth-child(7) { animation-delay: 1.2s; }

.photo-and-bouquets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.side-bouquet {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 1.5rem;
  animation: sideBouquetIn 0.9s ease-out backwards;
  filter: drop-shadow(0 3px 8px var(--shadow));
}

.side-bouquet span {
  display: block;
  animation: flowerSway 4s ease-in-out infinite;
}

.side-bouquet-left {
  animation-delay: 0.25s;
}

.side-bouquet-left span:nth-child(1) { animation-delay: 0s; }
.side-bouquet-left span:nth-child(2) { animation-delay: 0.3s; }
.side-bouquet-left span:nth-child(3) { animation-delay: 0.6s; }
.side-bouquet-left span:nth-child(4) { animation-delay: 0.9s; }
.side-bouquet-left span:nth-child(5) { animation-delay: 1.2s; }

.side-bouquet-right {
  animation-delay: 0.3s;
}

.side-bouquet-right span:nth-child(1) { animation-delay: 0.2s; }
.side-bouquet-right span:nth-child(2) { animation-delay: 0.5s; }
.side-bouquet-right span:nth-child(3) { animation-delay: 0.8s; }
.side-bouquet-right span:nth-child(4) { animation-delay: 1.1s; }
.side-bouquet-right span:nth-child(5) { animation-delay: 1.4s; }

/* Floating hearts & flowers background (main page) */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hearts-bg::before,
.hearts-bg::after {
  content: '♥';
  position: absolute;
  font-size: 1.5rem;
  color: var(--rose-light);
  opacity: 0.4;
  animation: heartFloat 8s ease-in-out infinite;
}

.hearts-bg::before {
  left: 15%;
  top: 20%;
  animation-delay: 0s;
}

.hearts-bg::after {
  right: 20%;
  bottom: 25%;
  animation-delay: -4s;
}

.floating-flowers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-flower {
  position: absolute;
  font-size: 1.25rem;
  opacity: 0.35;
  animation: flowerFloat 12s ease-in-out infinite;
  pointer-events: none;
}

.floating-flower.f1 { left: 8%; top: 15%; animation-delay: 0s; }
.floating-flower.f2 { right: 12%; top: 30%; animation-delay: -2s; }
.floating-flower.f3 { left: 20%; bottom: 20%; animation-delay: -5s; }
.floating-flower.f4 { right: 8%; bottom: 35%; animation-delay: -7s; }
.floating-flower.f5 { left: 45%; top: 8%; animation-delay: -3s; }
.floating-flower.f6 { right: 35%; bottom: 10%; animation-delay: -6s; }
.floating-flower.f7 { left: 5%; top: 50%; animation-delay: -4s; }
.floating-flower.f8 { right: 5%; top: 55%; animation-delay: -8s; }
.floating-flower.f9 { left: 35%; bottom: 40%; animation-delay: -1s; }
.floating-flower.f10 { right: 25%; top: 12%; animation-delay: -9s; }
.floating-flower.f11 { left: 55%; bottom: 25%; animation-delay: -2.5s; }
.floating-flower.f12 { left: 70%; top: 45%; animation-delay: -5.5s; }
.floating-flower.f13 { right: 60%; bottom: 50%; animation-delay: -7.5s; }
.floating-flower.f14 { left: 80%; top: 70%; animation-delay: -1.5s; }
.floating-flower.f15 { left: 10%; top: 75%; animation-delay: -4.5s; }
.floating-flower.f16 { right: 15%; top: 80%; animation-delay: -6.5s; }
.floating-flower.f17 { left: 50%; top: 60%; animation-delay: -3.5s; }
.floating-flower.f18 { right: 70%; top: 25%; animation-delay: -8.5s; }
.floating-flower.f19 { left: 25%; top: 40%; animation-delay: -0.5s; }
.floating-flower.f20 { right: 45%; bottom: 60%; animation-delay: -9.5s; }

/* ========== Hearts / Choose Page (choose.html) ========== */
.hearts-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

.hearts-page-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(165deg, #ffe8f0 0%, #ffd6e0 30%, #ffe0e8 60%, #fff0f5 100%);
  z-index: 0;
}

.hearts-page-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(233, 30, 99, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(244, 143, 177, 0.12) 0%, transparent 45%);
  pointer-events: none;
}

.hearts-container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hearts-page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin-bottom: 0.35rem;
  animation: heartsTitleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.hearts-page-sub {
  font-size: 1rem;
  color: var(--text);
  opacity: 0.9;
  margin-bottom: 2rem;
  animation: heartsTitleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}

.hearts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* Heart shape from inline SVG (data URI works from file://) + heartbeat */
.heart-card {
  aspect-ratio: 0.9;
  max-width: 160px;
  width: 100%;
  min-height: 150px;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              filter 0.3s ease;
  position: relative;
  cursor: pointer;
  animation: heartCardIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,
             heartbeat 1.2s ease-in-out infinite;
  animation-delay: var(--card-delay, 0.2s), 1s;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  text-decoration: none;
  color: inherit;
}

.heart-card-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Different colors for each heart */
.heart-card[data-delay="0"] {
  --card-delay: 0.2s;
  animation-delay: 0.2s, 1s;
  background: linear-gradient(145deg, #c2185b 0%, #e91e63 50%, #ad1457 100%);
}
.heart-card[data-delay="1"] {
  --card-delay: 0.35s;
  animation-delay: 0.35s, 1.2s;
  background: linear-gradient(145deg, #ec407a 0%, #f06292 50%, #e91e63 100%);
}
.heart-card[data-delay="2"] {
  --card-delay: 0.5s;
  animation-delay: 0.5s, 1.4s;
  background: linear-gradient(145deg, #f48fb1 0%, #f8bbd9 50%, #f06292 100%);
}
.heart-card[data-delay="3"] {
  --card-delay: 0.65s;
  animation-delay: 0.65s, 1.6s;
  background: linear-gradient(145deg, #fce4ec 0%, #f8bbd9 50%, #f48fb1 100%);
}

.heart-card:hover,
.heart-card.heart-hover {
  transform: scale(1.08) translateY(-6px);
  box-shadow: 0 22px 50px rgba(233, 30, 99, 0.35);
  filter: brightness(1.08);
  animation-play-state: paused;
}

/* Hint shown until heart is clicked */
.heart-hint {
  position: absolute;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.heart-card.revealed .heart-hint,
.heart-card-link .heart-hint {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

/* Content revealed on click */
.heart-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.heart-card.revealed .heart-content,
.heart-card-link .heart-content {
  opacity: 1;
  transform: scale(1);
}

.heart-card-link .heart-content {
  pointer-events: none;
}

.heart-icon {
  font-size: 2rem;
  margin-bottom: 0.35rem;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  animation: heartIconFloat 3s ease-in-out infinite;
}

.heart-card[data-delay="0"] .heart-icon { animation-delay: 0s; }
.heart-card[data-delay="1"] .heart-icon { animation-delay: 0.3s; }
.heart-card[data-delay="2"] .heart-icon { animation-delay: 0.6s; }
.heart-card[data-delay="3"] .heart-icon { animation-delay: 0.9s; }

.heart-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.heart-label em {
  display: block;
  font-size: 0.7rem;
  font-style: normal;
  opacity: 0.95;
  margin-top: 0.2rem;
}

.heart-card[data-delay="3"] .heart-label {
  color: #5d2d3a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
}

@keyframes heartsTitleIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartCardIn {
  from {
    transform: scale(0.7) translateY(20px);
  }
  to {
    transform: scale(1) translateY(0);
  }
}

@keyframes heartIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.06); }
  28% { transform: scale(1); }
  42% { transform: scale(1.05); }
  56% { transform: scale(1); }
  70% { transform: scale(1.03); }
  84% { transform: scale(1); }
}

/* ========== Greeting Page ========== */
.greeting-page {
  background: linear-gradient(160deg, #1a0a0f 0%, #2d1b2e 50%, #1a0a0f 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem 1rem 5.5rem;
}

#explosion-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#particles-container {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.greeting-photo-wrapper {
  position: relative;
  z-index: 10;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.7s ease 0.4s, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}

.greeting-photo-wrapper.visible {
  opacity: 1;
  transform: scale(1);
}

.greeting-photo {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.4);
  display: block;
  background: linear-gradient(135deg, var(--rose-light) 0%, var(--rose) 100%);
}

.letter-wrapper {
  position: relative;
  z-index: 10;
  padding: 2rem;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.8s ease 0.5s, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s;
}

.letter-wrapper.visible {
  opacity: 1;
  transform: scale(1);
}

/* Bouquets around the letter (greeting page) */
.letter-bouquet {
  position: absolute;
  font-size: 1.35rem;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  animation: letterBouquetIn 0.6s ease-out backwards;
  z-index: 9;
}

.letter-wrapper.visible .letter-bouquet {
  animation: letterBouquetIn 0.6s ease-out backwards, flowerSway 4s ease-in-out 0.8s infinite;
}

.letter-bouquet-tl { top: -0.5rem; left: -0.5rem; }
.letter-bouquet-tr { top: -0.5rem; right: -0.5rem; }
.letter-bouquet-bl { bottom: -0.5rem; left: -0.5rem; }
.letter-bouquet-br { bottom: -0.5rem; right: -0.5rem; }

.letter-wrapper.visible .letter-bouquet-tl { animation-delay: 0s, 0.8s; }
.letter-wrapper.visible .letter-bouquet-tr { animation-delay: 0.05s, 0.85s; }
.letter-wrapper.visible .letter-bouquet-bl { animation-delay: 0.1s, 0.9s; }
.letter-wrapper.visible .letter-bouquet-br { animation-delay: 0.15s, 0.95s; }

@keyframes letterBouquetIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 0.9;
    transform: scale(1);
  }
}

.letter-top-flowers,
.letter-bottom-flowers {
  font-size: 1.25rem;
  letter-spacing: 0.35rem;
  margin-bottom: 0.75rem;
  animation: letterFlowerRow 3s ease-in-out infinite;
}

.letter-bottom-flowers {
  margin-bottom: 0;
  margin-top: 0.75rem;
  animation-delay: 0.5s;
}

@keyframes letterFlowerRow {
  0%, 100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

.letter {
  background: linear-gradient(145deg, #fff9fc 0%, #ffe8f0 100%);
  max-width: 420px;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: letterShine 4s ease-in-out infinite;
}

.letter-inner {
  position: relative;
}

.letter-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: var(--rose-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.letter-name {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
  animation: nameGlow 2s ease-in-out infinite;
}

.letter-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4a3549;
  margin-bottom: 1rem;
}

.letter-hearts {
  font-size: 1.5rem;
  color: var(--rose);
  letter-spacing: 0.5rem;
  animation: heartsPulse 1.5s ease-in-out infinite;
}

/* ========== Keyframe Animations ========== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

@keyframes photoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes frameIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

@keyframes heartFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.4;
  }
  25% {
    transform: translate(10px, -15px) rotate(5deg);
    opacity: 0.6;
  }
  50% {
    transform: translate(-5px, -25px) rotate(-3deg);
    opacity: 0.35;
  }
  75% {
    transform: translate(15px, -10px) rotate(8deg);
    opacity: 0.5;
  }
}

@keyframes bouquetIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes flowerSway {
  0%, 100% {
    transform: rotate(-4deg) scale(1);
  }
  50% {
    transform: rotate(4deg) scale(1.05);
  }
}

@keyframes sideBouquetIn {
  from {
    opacity: 0;
    transform: translateX(0) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.side-bouquet-left {
  transform-origin: right center;
}

.side-bouquet-right {
  transform-origin: left center;
}

@keyframes flowerFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.25;
  }
  25% {
    transform: translate(8px, -12px) rotate(6deg);
    opacity: 0.45;
  }
  50% {
    transform: translate(-6px, -20px) rotate(-5deg);
    opacity: 0.3;
  }
  75% {
    transform: translate(10px, -8px) rotate(10deg);
    opacity: 0.4;
  }
}

@keyframes letterShine {
  0%, 100% {
    box-shadow:
      0 30px 80px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }
  50% {
    box-shadow:
      0 30px 80px rgba(233, 30, 99, 0.15),
      0 0 0 1px rgba(255, 255, 255, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

@keyframes nameGlow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(233, 30, 99, 0.3);
  }
  50% {
    text-shadow: 0 0 30px rgba(233, 30, 99, 0.5);
  }
}

@keyframes heartsPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

/* ========== Responsive: Tablet ========== */
@media (max-width: 768px) {
  .main-page,
  .hearts-page {
    padding: 1.25rem 1rem;
  }

  .main-title {
    font-size: 1.65rem;
  }

  .gift-page {
    padding: 1.5rem 1rem 5rem;
  }

  .gift-content {
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .gift-card {
    padding: 2rem 1.5rem;
  }

  .gift-title {
    font-size: 1.5rem;
  }

  .gift-message {
    font-size: 1rem;
  }

  .bouquet-svg-wrap {
    width: min(94vw, 340px);
  }

  .letter-wrapper {
    padding: 1.5rem;
  }

  .letter {
    padding: 2rem;
  }

  .greeting-page {
    padding: 1.5rem 0.75rem 5.5rem;
  }

  .gift-back {
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ========== Responsive: Mobile ========== */
@media (max-width: 480px) {
  .main-page {
    padding: 1rem 0.75rem;
  }

  .main-container {
    max-width: 100%;
  }

  .main-title {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .main-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .main-buttons {
    gap: 0.75rem;
  }

  .btn {
    padding: 0.8rem 1.35rem;
    font-size: 1rem;
    min-height: 44px;
  }

  .photo-frame {
    width: 260px;
    height: 300px;
  }

  .side-bouquet {
    font-size: 1.1rem;
  }

  .bouquet-row {
    font-size: 1.25rem;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
  }

  .bouquet-row.bouquet-bottom {
    margin-top: 0.75rem;
  }

  .hearts-page {
    padding: 1rem 0.75rem;
  }

  .hearts-container {
    max-width: 100%;
  }

  .hearts-page-title {
    font-size: 1.4rem;
  }

  .hearts-page-sub {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .hearts-grid {
    gap: 1rem;
    max-width: 280px;
    margin-bottom: 1.5rem;
  }

  .heart-card {
    max-width: 130px;
    min-height: 120px;
    padding: 1rem 0.5rem;
  }

  .heart-label {
    font-size: 0.7rem;
  }

  .heart-label em {
    font-size: 0.65rem;
  }

  .gift-page {
    padding: 1.25rem 0.75rem 5rem;
  }

  .gift-card {
    padding: 1.5rem 1.25rem;
    border-radius: 20px;
  }

  .gift-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
  }

  .gift-message {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .greeting-page {
    padding: 1.25rem 0.75rem 5.75rem;
  }

  .gift-back {
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    padding: 0.75rem 1.15rem;
    font-size: 0.9rem;
    min-height: 48px;
    min-width: 160px;
  }

  .bouquet-badge {
    font-size: 3rem;
  }

  .bouquet-label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .bouquet-svg-wrap {
    width: min(96vw, 300px);
  }

  .flowers-emoji-row {
    font-size: 1.2rem;
    letter-spacing: 0.15rem;
  }

  .petals-fall span {
    font-size: 1rem;
  }

  .music-notes {
    font-size: 1rem;
    letter-spacing: 0.5rem;
  }

  .song-icon {
    font-size: 2.5rem;
  }

  .song-embed-wrap {
    border-radius: 12px;
    margin-top: 0.25rem;
  }

  .song-meta {
    font-size: 0.95rem;
  }

  .song-time {
    font-size: 0.85rem;
  }

  .letter-envelope {
    max-width: 100%;
  }

  .letter-paper {
    padding: 1.5rem 1.25rem;
    border-radius: 10px;
  }

  .letter-greeting {
    font-size: 1rem;
  }

  .letter-paper .letter-hearts {
    font-size: 1.25rem;
    letter-spacing: 0.35rem;
  }

  .greeting-photo {
    width: 200px;
    height: 200px;
  }

  .letter {
    padding: 1.5rem 1.25rem;
  }

  .letter-title {
    font-size: 1.35rem;
  }

  .letter-name {
    font-size: 1.5rem;
  }

  .letter-bouquet {
    font-size: 1rem;
  }

  .letter-top-flowers,
  .letter-bottom-flowers {
    font-size: 0.95rem;
    letter-spacing: 0.2rem;
  }
}

/* ========== Responsive: Hearts grid - single column on very small ========== */
@media (max-width: 520px) {
  .hearts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 280px;
  }

  .heart-card {
    max-width: 130px;
    min-height: 120px;
  }
}

@media (max-width: 360px) {
  .hearts-grid {
    max-width: 240px;
    gap: 0.75rem;
  }

  .heart-card {
    max-width: 110px;
    min-height: 105px;
    padding: 0.75rem 0.4rem;
  }

  .heart-icon {
    font-size: 1.5rem;
  }

  .heart-label {
    font-size: 0.65rem;
  }

  .main-title {
    font-size: 1.25rem;
  }

  .bouquet-svg-wrap {
    width: 96vw;
    max-width: 280px;
  }

  .gift-card {
    padding: 1.25rem 1rem;
  }

  .gift-title {
    font-size: 1.2rem;
  }

  .gift-back {
    min-width: 130px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }

  .greeting-page {
    padding-bottom: 5.5rem;
  }
}

/* ========== Gift pages (flowers, song, letter, bestpicture) ========== */
.gift-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  overflow-x: hidden;
}

.gift-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.flowers-bg {
  background: linear-gradient(165deg, #fff8fa 0%, #ffe4ec 40%, #ffd6e0 100%);
}

.song-bg {
  background: linear-gradient(165deg, #fce4ec 0%, #f8bbd9 30%, #f48fb1 100%);
}

.letter-bg {
  background: linear-gradient(165deg, #fff5f8 0%, #ffe0e8 50%, #ffecf0 100%);
}

.gift-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 24px 60px rgba(233, 30, 99, 0.2);
  text-align: center;
  opacity: 0;
  transform: scale(0.85) translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-card.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.gift-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: var(--rose-dark);
  margin-bottom: 1rem;
  font-weight: 600;
}

.gift-message {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4a3549;
  margin-bottom: 1rem;
}

.gift-back {
  position: fixed;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rose-dark);
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-height: 44px;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.gift-back:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.gift-back-dark {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.gift-back-dark:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Flowers page */
/* Falling petals background */
.petals-fall {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.petals-fall span {
  position: absolute;
  font-size: 1.25rem;
  opacity: 0.5;
  animation: fallDown 8s linear infinite;
}

.petals-fall .p1 { left: 5%; animation-delay: 0s; animation-duration: 10s; }
.petals-fall .p2 { left: 15%; animation-delay: 1s; animation-duration: 9s; }
.petals-fall .p3 { left: 25%; animation-delay: 2.5s; animation-duration: 11s; }
.petals-fall .p4 { left: 40%; animation-delay: 0.5s; animation-duration: 8s; }
.petals-fall .p5 { left: 55%; animation-delay: 3s; animation-duration: 10s; }
.petals-fall .p6 { left: 70%; animation-delay: 1.5s; animation-duration: 9s; }
.petals-fall .p7 { left: 85%; animation-delay: 2s; animation-duration: 11s; }
.petals-fall .p8 { left: 95%; animation-delay: 0.8s; animation-duration: 8s; }
.petals-fall .p9 { left: 30%; animation-delay: 4s; animation-duration: 12s; }
.petals-fall .p10 { left: 60%; animation-delay: 3.5s; animation-duration: 9s; }
.petals-fall .p11 { left: 80%; animation-delay: 5s; animation-duration: 10s; }

@keyframes fallDown {
  0% {
    transform: translateY(-10vh) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(30px);
    opacity: 0;
  }
}

/* Big SVG bouquet hero */
.bouquet-hero {
  margin-bottom: 1.5rem;
  position: relative;
  text-align: center;
}

.bouquet-badge {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 12px rgba(233, 30, 99, 0.25));
  animation: badgeFloat 2.5s ease-in-out infinite;
}

.bouquet-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin-bottom: 0.75rem;
  opacity: 0.95;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.flowers-emoji-row {
  font-size: 1.5rem;
  letter-spacing: 0.25rem;
  margin-bottom: 0.75rem;
  animation: flowersRowPulse 2s ease-in-out infinite;
}

@keyframes flowersRowPulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

.bouquet-svg-wrap {
  width: min(92vw, 380px);
  max-width: 380px;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.6) translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bouquet-svg-wrap.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: bouquetSway 5s ease-in-out infinite 1s;
}

.bouquet-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Whole bouquet sways */
@keyframes bouquetSway {
  0%, 100% { transform: scale(1) translateY(0) rotate(-3deg); }
  50% { transform: scale(1) translateY(0) rotate(3deg); }
}

/* Ribbon wiggle */
.bouquet-svg .bouquet-ribbon-svg {
  animation: svgRibbonWiggle 2.5s ease-in-out infinite;
}

@keyframes svgRibbonWiggle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Song page */
.music-notes {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.25rem;
  letter-spacing: 1rem;
  color: var(--rose);
  opacity: 0.5;
  z-index: 0;
  animation: notesFloat 4s ease-in-out infinite;
}

@keyframes notesFloat {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-8px); opacity: 0.8; }
}

.song-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: songBounce 1.5s ease-in-out infinite;
}

.song-meta {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin-bottom: 0.5rem;
}

.song-time {
  font-weight: 400;
  color: #888;
  font-size: 0.9rem;
}

.song-unmute {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.song-fallback {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--rose);
  text-decoration: none;
  font-weight: 500;
}

.song-fallback:hover {
  text-decoration: underline;
}

.song-player-wrap {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}
.song-cover-wrap {
  width: min(88px, 24vw);
  height: min(88px, 24vw);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.song-cover {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}
.song-audio-wrap {
  width: 100%;
  max-width: 320px;
  min-width: 0;
}
.song-audio-player {
  width: 100%;
  height: 48px;
  border-radius: 24px;
  accent-color: var(--rose);
}

@media (max-width: 480px) {
  .song-cover-wrap {
    width: min(72px, 20vw);
    height: min(72px, 20vw);
  }
}

.song-embed-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 0.5rem;
}

.song-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@keyframes songBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Letter page - envelope */
.letter-content {
  perspective: 800px;
}

.letter-envelope {
  width: 100%;
  max-width: 320px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, #f8bbd9 0%, #f48fb1 100%);
  border-radius: 8px 8px 0 0;
  transform-origin: top center;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 2;
}

.letter-envelope.open .envelope-flap {
  transform: rotateX(-160deg);
}

.letter-paper {
  background: linear-gradient(145deg, #fffbfc 0%, #fff0f5 100%);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.letter-envelope.open .letter-paper {
  opacity: 1;
  transform: translateY(0);
}

.letter-greeting {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--rose-dark);
  margin-bottom: 0.75rem;
  text-align: left;
}

.letter-sign {
  font-style: italic;
  color: var(--text);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.letter-paper .letter-hearts {
  font-size: 1.5rem;
  color: var(--rose);
  letter-spacing: 0.5rem;
}
