/* ============================================================
   OUR LOVE STORY — Romantic Interactive Experience
   ============================================================ */

:root {
  --blush: #f6d6de;
  --rose: #e8a4b0;
  --rose-deep: #c96b7c;
  --champagne: #e8d5a3;
  --gold: #c9a96e;
  --ivory: #fff8f5;
  --warm-white: #fffefb;
  --ink: #4a3540;
  --ink-soft: #7a5f6a;
  --cream: #faf0eb;
  --petal: #f3c1cb;
  --shadow: 0 18px 50px rgba(74, 53, 64, 0.12);
  --shadow-soft: 0 8px 28px rgba(201, 107, 124, 0.15);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-script: "Caveat", cursive;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --stage-max: 920px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(246, 214, 222, 0.9), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(232, 213, 163, 0.45), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(243, 193, 203, 0.55), transparent 55%),
    linear-gradient(165deg, #fff8f5 0%, #faf0eb 40%, #f6e8ec 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* —— Floating hearts background —— */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  color: rgba(201, 107, 124, 0.28);
  font-size: 14px;
  animation: floatUp linear infinite;
  user-select: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-110vh) rotate(25deg) scale(1.2);
    opacity: 0;
  }
}

.sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(201, 169, 110, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 78% 18%, rgba(232, 164, 176, 0.5), transparent),
    radial-gradient(1px 1px at 45% 70%, rgba(201, 169, 110, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 88% 62%, rgba(246, 214, 222, 0.7), transparent),
    radial-gradient(1px 1px at 30% 85%, rgba(201, 169, 110, 0.45), transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}

/* —— Music toggle —— */
.music-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 100;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 254, 251, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  color: var(--rose-deep);
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease), background 0.25s;
}

.music-toggle:hover {
  transform: scale(1.06);
}

.music-toggle[data-playing="true"] {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: white;
}

.music-icon {
  transition: opacity 0.2s;
}

/* —— Progress —— */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px 18px 0;
  pointer-events: none;
}

.progress-track {
  height: 3px;
  background: rgba(201, 107, 124, 0.15);
  border-radius: 999px;
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  border-radius: inherit;
  transition: width 0.6s var(--ease);
}

.progress-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(201, 107, 124, 0.25);
  transition: background 0.3s, transform 0.3s;
}

.progress-dot.done,
.progress-dot.active {
  background: var(--rose-deep);
}

.progress-dot.active {
  transform: scale(1.35);
  box-shadow: 0 0 0 3px rgba(201, 107, 124, 0.2);
}

/* —— App shell —— */
.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 40px;
}

.stage {
  width: min(100%, var(--stage-max));
  animation: stageIn 0.7s var(--ease) both;
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stage-card {
  background: rgba(255, 254, 251, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  text-align: center;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-deep);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

h1,
h2,
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.display {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
}

.lead {
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 2.4vw, 1.1rem);
  max-width: 36rem;
  margin: 0.85rem auto 0;
  font-weight: 300;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  padding: 0.95rem 1.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-deep), #b85a6c);
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 28px rgba(201, 107, 124, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, filter 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(201, 107, 124, 0.42);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--rose-deep);
  box-shadow: none;
  border: 1.5px solid rgba(201, 107, 124, 0.35);
}

.btn-ghost:hover {
  background: rgba(246, 214, 222, 0.45);
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.btn-row .btn {
  margin-top: 0;
}

/* —— Stage 1: PIN —— */
.heart-lock {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.25rem;
  position: relative;
  animation: heartbeat 1.8s ease-in-out infinite;
}

.heart-lock svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 18px rgba(201, 107, 124, 0.35));
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.08);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.05);
  }
}

.pin-guide {
  margin-top: 1.15rem;
  font-size: 0.92rem;
  color: var(--rose-deep);
  font-weight: 500;
}

.pin-inputs {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.35rem;
  margin: 1.1rem 0 0.55rem;
  flex-wrap: wrap;
}

.pin-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.pin-group-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.pin-group-inputs {
  display: flex;
  gap: 0.4rem;
}

.pin-sep {
  align-self: flex-end;
  padding-bottom: 0.85rem;
  color: var(--rose);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0.7;
}

.pin-digit {
  width: 44px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid rgba(201, 107, 124, 0.28);
  background: rgba(255, 255, 255, 0.75);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pin-digit:focus {
  border-color: var(--rose-deep);
  box-shadow: 0 0 0 4px rgba(201, 107, 124, 0.15);
}

.pin-format {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.pin-format strong {
  color: var(--rose-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pin-error {
  min-height: 1.4rem;
  color: var(--rose-deep);
  font-size: 0.92rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.pin-error.show {
  opacity: 1;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.unlock-burst .heart-lock {
  animation: unlockPop 0.8s var(--ease) forwards;
}

@keyframes unlockPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.25) rotate(-6deg);
  }
  100% {
    transform: scale(0.4);
    opacity: 0;
  }
}

/* —— Puzzle —— */
.puzzle-wrap {
  margin-top: 1.25rem;
}

.puzzle-board {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  display: grid;
  gap: 3px;
  background: rgba(201, 107, 124, 0.15);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  touch-action: none;
}

.puzzle-slot {
  position: relative;
  background: rgba(255, 248, 245, 0.5);
  border-radius: 2px;
}

.puzzle-slot.correct {
  outline: 2px solid rgba(201, 169, 110, 0.7);
  outline-offset: -2px;
}

.puzzle-piece {
  width: 100%;
  height: 100%;
  background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%);
  background-repeat: no-repeat;
  cursor: grab;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(74, 53, 64, 0.12);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
  user-select: none;
  -webkit-user-drag: element;
}

.puzzle-piece:active,
.puzzle-piece.dragging {
  cursor: grabbing;
  transform: scale(1.04);
  box-shadow: 0 10px 24px rgba(74, 53, 64, 0.22);
  z-index: 5;
  opacity: 0.95;
}

.puzzle-piece.locked {
  cursor: default;
  box-shadow: none;
}

.puzzle-preview {
  width: min(100%, 360px);
  margin: 0 auto 1rem;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-soft);
}

.puzzle-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(0.85);
  transform: scale(1.08);
  transition: filter 0.8s var(--ease), transform 0.8s;
}

.puzzle-preview.revealed img {
  filter: blur(0) saturate(1);
  transform: scale(1);
}

.puzzle-preview.hidden-preview {
  display: none;
}

.puzzle-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem auto 0;
  max-width: 360px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.puzzle-complete-msg {
  margin-top: 1.25rem;
  animation: stageIn 0.6s var(--ease);
}

.puzzle-complete-msg p {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-style: italic;
  color: var(--ink);
  max-width: 34rem;
  margin: 0 auto;
}

/* —— Timeline —— */
.timeline {
  position: relative;
  max-width: 680px;
  margin: 1.5rem auto 0;
  text-align: left;
  padding-left: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--rose), var(--champagne), var(--rose));
  border-radius: 2px;
}

.memory-card {
  position: relative;
  margin-bottom: 1.35rem;
  padding: 1rem;
  background: rgba(255, 254, 251, 0.9);
  border: 1px solid rgba(232, 164, 176, 0.25);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: center;
  animation: stageIn 0.55s var(--ease) both;
}

.memory-card:hover {
  transform: translateY(-3px) rotate(-0.3deg);
  box-shadow: 0 14px 36px rgba(201, 107, 124, 0.18);
}

.memory-card::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose-deep);
  border: 2px solid var(--warm-white);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(201, 107, 124, 0.2);
}

.memory-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(74, 53, 64, 0.12);
}

.memory-date {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.memory-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0.2rem 0 0.35rem;
}

.memory-caption {
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-actions {
  text-align: center;
  margin-top: 0.5rem;
}

/* —— Quiz —— */
.quiz-card {
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
}

.quiz-progress {
  font-size: 0.8rem;
  color: var(--rose-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  margin-bottom: 1.25rem;
}

.quiz-options {
  display: grid;
  gap: 0.7rem;
}

.quiz-option {
  width: 100%;
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(201, 107, 124, 0.22);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.95rem;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--rose-deep);
  background: rgba(246, 214, 222, 0.45);
  transform: translateX(4px);
}

.quiz-option.correct {
  border-color: #7aad7a;
  background: rgba(180, 220, 180, 0.35);
}

.quiz-option.wrong {
  border-color: var(--rose-deep);
  background: rgba(232, 164, 176, 0.35);
  animation: shake 0.35s ease;
}

.quiz-reaction {
  margin-top: 1rem;
  min-height: 1.5rem;
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--rose-deep);
  text-align: center;
}

.quiz-score {
  text-align: center;
}

.score-ring {
  width: 110px;
  height: 110px;
  margin: 1rem auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--rose-deep) calc(var(--pct) * 1%), rgba(201, 107, 124, 0.15) 0);
  position: relative;
}

.score-ring::after {
  content: attr(data-score);
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--warm-white);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}

/* —— Love letter —— */
.envelope-stage {
  perspective: 1200px;
}

.envelope {
  width: min(100%, 360px);
  height: 230px;
  margin: 1.5rem auto;
  position: relative;
  transform-style: preserve-3d;
  cursor: pointer;
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #f0c4cc, #e8a4b0);
  border-radius: 8px 8px 12px 12px;
  box-shadow: var(--shadow);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(180deg, #d98a9a, #c96b7c);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform 0.9s var(--ease);
  z-index: 3;
}

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

.envelope-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  background: linear-gradient(180deg, #ebb0bc, #e08fa0);
  clip-path: polygon(0 40%, 50% 0, 100% 40%, 100% 100%, 0 100%);
  z-index: 2;
  border-radius: 0 0 12px 12px;
}

.envelope-seal {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8d5a3, #c9a96e 60%, #a8874e);
  z-index: 4;
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(168, 135, 78, 0.4);
  transition: opacity 0.4s, transform 0.4s;
}

.envelope.open .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

.letter-paper {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18%;
  height: 70%;
  background: #fffefb;
  border-radius: 4px;
  z-index: 1;
  box-shadow: 0 -4px 16px rgba(74, 53, 64, 0.1);
  transition: transform 0.9s var(--ease) 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-script);
  color: var(--rose-deep);
  font-size: 1.4rem;
}

.envelope.open .letter-paper {
  transform: translateY(-120%);
}

.letter-full {
  max-width: 540px;
  margin: 0 auto;
  text-align: left;
  background: linear-gradient(180deg, #fffefb, #fff5f0);
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: 4px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
  position: relative;
  animation: stageIn 0.7s var(--ease);
}

.letter-full::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(232, 164, 176, 0.3);
  pointer-events: none;
}

.letter-greeting {
  font-family: var(--font-script);
  font-size: 1.85rem;
  color: var(--rose-deep);
  margin-bottom: 1rem;
}

.letter-body p {
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1rem;
  min-height: 1.2em;
}

.letter-body p.typing::after {
  content: "▋";
  animation: blink 0.8s step-end infinite;
  color: var(--rose-deep);
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.letter-sign {
  font-family: var(--font-script);
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.letter-name {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--rose-deep);
}

/* —— Finale —— */
.finale-stage {
  width: min(100%, 720px);
  text-align: center;
}

.finale-photo {
  width: min(100%, 380px);
  margin: 0 auto 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(74, 53, 64, 0.22);
  position: relative;
  animation: photoReveal 1.2s var(--ease);
}

.finale-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.finale-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  pointer-events: none;
}

@keyframes photoReveal {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.finale-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  background: linear-gradient(120deg, var(--rose-deep), #a84d5f 40%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: stageIn 0.8s var(--ease) 0.2s both;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 360px;
  margin: 1.5rem auto;
}

.duration-item {
  background: rgba(255, 254, 251, 0.85);
  border-radius: 16px;
  padding: 0.9rem 0.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(232, 164, 176, 0.25);
}

.duration-num {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--rose-deep);
  line-height: 1;
}

.duration-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.finale-message {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  font-style: italic;
  max-width: 34rem;
  margin: 1rem auto;
  color: var(--ink);
}

.finale-closing {
  font-family: var(--font-script);
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  color: var(--rose-deep);
  max-width: 28rem;
  margin: 1.5rem auto 0;
  line-height: 1.4;
  animation: stageIn 1s var(--ease) 0.6s both;
}

.anniversary-date-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(232, 213, 163, 0.45);
  color: #8a7040;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

/* —— Lightbox —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(45, 28, 35, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  max-width: min(92vw, 520px);
  text-align: center;
}

.lightbox-content img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-content figcaption {
  color: rgba(255, 248, 245, 0.92);
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  color: white;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.85;
}

/* —— Confetti / petals —— */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 16px;
  border-radius: 80% 0 80% 0;
  background: var(--rose);
  opacity: 0.85;
  animation: petalFall linear forwards;
}

@keyframes petalFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(110vh) rotate(420deg);
    opacity: 0.2;
  }
}

/* —— Responsive —— */
@media (max-width: 560px) {
  .app {
    padding: 64px 14px 32px;
    align-items: flex-start;
  }

  .stage-card {
    padding: 1.35rem 1.15rem;
  }

  .pin-digit {
    width: 40px;
    height: 48px;
  }

  .pin-sep {
    padding-bottom: 0.75rem;
  }

  .memory-card {
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
  }

  .memory-thumb {
    width: 72px;
    height: 72px;
  }

  .duration-grid {
    gap: 0.5rem;
  }

  .duration-num {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .timeline {
    padding-left: 1.5rem;
  }
}
