:root {
  --bg: #fbf5f4;
  --pink: #f7b5cf;
  --pink-soft: #f7d9e6;
  --rose: #d84b5a;
  --rose-deep: #c03d4a;
  --text: #2c2c2c;
  --muted: #8f8f8f;
  --blue: #9ec1e6;
  --blue-dark: #7fa8ce;
  --max-width: 920px;
  --nav-h: 92px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: radial-gradient(circle at top left, #fff8f8 0%, #fde5eb 100%) fixed;
  color: var(--text);
  font-family: "Montserrat", system-ui, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* ---------- STAGE / SLIDES ---------- */
.stage {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 20px calc(var(--nav-h) + 24px);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slide {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeUp 0.6s ease both;
}
.slide.active { display: flex; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- PROGRESS DOTS ---------- */
.progress {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 50;
}
.progress .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(216, 75, 90, 0.25);
  transition: all 0.25s;
}
.progress .dot.active {
  background: var(--rose);
  transform: scale(1.35);
}

/* ===================== SLIDE 1 — SORRY ===================== */
.brand-top {
  position: absolute;
  top: 40px;
  left: 0; right: 0;
  text-align: center;
  z-index: 5;
}
.brand-top .pre {
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #111;
  font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.7rem);
  margin-bottom: 6px;
}
.brand-top .title {
  font-family: "Playfair Display", serif;
  color: var(--pink);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: clamp(2rem, 8vw, 4rem);
}
.sorry-col {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: clamp(120px, 22vw, 170px);
}
.iam-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iam {
  font-family: "Playfair Display", serif;
  color: var(--pink);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: .95;
  display: flex;
  align-items: flex-end;
}
.iam-i { margin-right: .11em; }
.iam-am-wrap { position: relative; display: inline-block; }
.iam-am { padding: 0 14px 0 10px; }
.iam-badge {
  position: absolute;
  left: 55%;
  top: -1.3em;
  transform: translateX(-50%) rotate(-10deg);
  background: var(--pink-soft);
  padding: 6px 16px 7px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16,16,16,.07);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(12px, 2vw, 20px);
  color: #222;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .055em;
}
.hero-large {
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  color: rgba(0,0,0,.98);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  margin: 0;
}
.subtext {
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--muted);
  max-width: 420px;
  line-height: 1.7;
  margin: 4px 0 0;
}
.subtext .highlight { color: var(--pink); font-weight: 700; }
.diamond {
  width: 12px; height: 12px;
  background: linear-gradient(180deg, var(--pink) 0%, var(--pink-soft) 100%);
  transform: rotate(45deg);
  border-radius: 2px;
  margin: 6px auto 0;
}
.illustration {
  width: 82%;
  max-width: 420px;
  margin: 24px auto 0;
}
.illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(16,16,16,.06);
}

/* ===================== SLIDE 2 — LETTER ===================== */
.letter-group {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 40px auto;
}
.letter-card {
  position: relative;
  background: rgba(255,255,255,.96);
  border-radius: 2.2rem;
  box-shadow: 0 12px 40px rgba(193,173,173,.18);
  border: 2.5px solid #f1dede;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.4rem, 6vw, 5rem);
  text-align: center;
  z-index: 2;
}
.letter-top-img {
  position: absolute;
  top: -50px; right: -30px;
  width: clamp(90px, 18vw, 180px);
  z-index: 10;
  pointer-events: none;
}
.stamp-svg {
  position: absolute;
  bottom: -60px; left: -30px;
  width: clamp(110px, 22vw, 220px);
  height: clamp(110px, 22vw, 220px);
  z-index: 10;
  pointer-events: none;
}
.letter-h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: .23em;
  color: #4d4d4d;
  margin: 0;
  text-transform: uppercase;
}
.letter-h2 {
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-family: "Playfair Display", serif;
  font-weight: 900;
  color: var(--pink);
  margin: 18px 0 0;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.letter-h3 {
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  font-family: "Playfair Display", serif;
  color: var(--pink);
  font-style: italic;
  margin: 1.6rem 0 0;
  font-weight: 700;
}
.letter-text {
  color: #414141;
  margin: 1.8rem 0;
  font-size: clamp(1.05rem, 2.6vw, 1.6rem);
  line-height: 1.6;
}
.letter-h4 {
  font-size: clamp(1.2rem, 3.4vw, 2rem);
  font-family: "Playfair Display", serif;
  color: #1f1f1f;
  font-style: italic;
  font-weight: 800;
  margin: 1.4rem 0 0;
}
.big-emoji { font-size: 1.6em; vertical-align: middle; }
.big-emoji.pink { color: var(--pink); }

/* ===================== SLIDE 3 — SPECIAL CARDS ===================== */
.card-container {
  background: rgba(255,255,255,.85);
  border: 2.5px solid #e7d8d2;
  border-radius: 28px;
  box-shadow: 0 16px 60px rgba(193,173,173,.23);
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(6px);
}
.card-header { padding: clamp(20px, 5vw, 40px) clamp(20px, 6vw, 60px) 0; text-align: center; }
.card-title {
  font-family: "Playfair Display", serif;
  color: var(--rose);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin: 0 0 10px;
}
.card-header-bar {
  border-top: 2px solid #22222220;
  border-bottom: 2px solid #22222220;
  margin-top: 18px;
}
.card-meta-row {
  display: flex;
  justify-content: space-between;
  color: #444;
  font-size: clamp(.85rem, 2.4vw, 1.05rem);
  margin: 14px 0;
  padding: 0 .5rem;
}
.card-meta-row span span { font-weight: 700; }
.card-image-section {
  background: #faf4f3;
  margin: 18px clamp(14px, 4vw, 38px) 0;
  border: 2px solid #2c2c2c30;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.carousel-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 18px;
  opacity: 0;
  transition: opacity .35s;
  z-index: 2;
}
.carousel-image.active { opacity: 1; z-index: 3; }
.carousel-caption {
  position: absolute;
  bottom: 18px;
  width: 100%;
  text-align: center;
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-family: "Dancing Script", cursive;
  color: var(--rose);
  font-style: italic;
  text-shadow: 0 1px 10px #fff7f7;
  pointer-events: none;
  z-index: 12;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff5f4cc;
  border: 1.5px solid #d84b5a80;
  border-radius: 50%;
  width: clamp(40px, 9vw, 52px);
  height: clamp(40px, 9vw, 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  color: var(--rose);
  cursor: pointer;
  z-index: 20;
  backdrop-filter: blur(8px);
  transition: background .2s, color .2s;
}
.carousel-arrow:hover { background: var(--rose); color: #fff; }
.carousel-arrow.left { left: 12px; }
.carousel-arrow.right { right: 12px; }
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  font-size: clamp(.95rem, 2.4vw, 1.17rem);
  border-top: 2px solid #22222220;
  margin-top: 18px;
  padding: 22px clamp(20px, 6vw, 60px) 28px;
}
.card-footer .card-date,
.card-footer .card-valid { font-weight: 600; margin-bottom: 3px; }
.card-footer .card-date span,
.card-footer .card-valid span { font-weight: 700; }
.card-footer .footer-note {
  text-align: right;
  color: var(--rose);
  font-family: "Dancing Script", cursive;
  font-size: 1.3em;
  margin-left: auto;
}

/* ===================== SLIDE 4 — SONG ===================== */
.music-card {
  background: rgba(255,255,255,.97);
  border: 3px solid #e7d8d2;
  box-shadow: 0 16px 56px #c1adad22;
  border-radius: 40px;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(36px, 8vw, 70px) clamp(24px, 6vw, 64px);
}
.music-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 6vw, 3.3rem);
  font-weight: 700;
  color: var(--rose);
  margin: 0 0 32px;
}
.music-title .heart { font-size: .65em; vertical-align: middle; margin-left: 8px; }
.avatar-shell {
  width: clamp(200px, 60vw, 300px);
  height: clamp(200px, 60vw, 300px);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 12px 36px #d84b5a22;
  border: 2px solid #d84b5a33;
  background: #fff;
  margin-bottom: 38px;
}
.avatar-shell img { width: 100%; height: 100%; object-fit: cover; }
.info-panel {
  background: rgba(255,255,255,.72);
  border-radius: 20px;
  border: 2px solid #e7d8d2;
  max-width: 420px;
  width: 100%;
  margin: 0 auto 34px;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.status-text {
  font-size: clamp(.9rem, 2.4vw, 1.2rem);
  letter-spacing: .17em;
  color: var(--rose);
  text-transform: uppercase;
  font-weight: 700;
}
.song-title {
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  font-weight: 700;
  color: #232323;
  margin: 0;
}
.music-slider-section { width: 100%; max-width: 420px; margin-bottom: 34px; }
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: clamp(.95rem, 2.6vw, 1.3rem);
  margin-bottom: 12px;
}
.music-range-slider {
  width: 100%;
  accent-color: var(--rose);
  height: 8px;
  border-radius: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--rose); border: 3px solid #fff;
  box-shadow: 0 0 7px #d84b5a55; cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--rose); border: 3px solid #fff; cursor: pointer;
}
.controls-bar { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 6vw, 44px); }
.control-btn {
  width: clamp(54px, 14vw, 68px);
  height: clamp(54px, 14vw, 68px);
  border-radius: 50%;
  border: 2px solid var(--rose);
  background: #fff;
  color: var(--rose);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 20px #d84b5a2c;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.control-btn:hover { background: var(--rose); color: #fff; }
.control-btn.play {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  border-color: #a83545;
  font-size: clamp(2rem, 7vw, 2.7rem);
  width: clamp(82px, 22vw, 104px);
  height: clamp(82px, 22vw, 104px);
}

/* ===================== SLIDE 5 — THANK YOU ===================== */
.thank-card {
  position: relative;
  background: linear-gradient(180deg, #fffdfa 0%, #fff7f7 100%);
  border-radius: 40px;
  box-shadow: 0 28px 110px #c1adad15;
  border: 2.5px solid #f1dede;
  max-width: 760px;
  width: 100%;
  padding: clamp(48px, 12vw, 110px) clamp(24px, 8vw, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.thank-top-row {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  margin-bottom: 10px;
}
.top-left-msg {
  font-size: clamp(.9rem, 2.6vw, 1.4rem);
  color: #333;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .86;
}
.top-right-star { color: #f19ac0; font-size: clamp(1.4rem, 4vw, 2.4rem); opacity: .4; }
.thank-headline {
  font-family: "Playfair Display", serif;
  color: #f19ac0;
  font-size: clamp(2.8rem, 12vw, 6rem);
  font-style: italic;
  font-weight: 500;
  margin: clamp(24px, 6vw, 70px) 0 0;
  line-height: 1.08;
}
.thank-sub {
  font-size: clamp(1.5rem, 6vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  color: #333;
  margin: 24px 0 36px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
}
.sub-heart { font-size: .8em; color: #f19ac0; }
.card-message {
  color: #4b4b4b;
  font-size: clamp(1.05rem, 3vw, 1.8rem);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.8;
}
.hello-kitty-img {
  width: clamp(120px, 30vw, 260px);
  margin: 8px auto 0;
  pointer-events: none;
  filter: drop-shadow(0 12px 32px #f19ac07c);
}
.thank-footnote {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.1rem, 3vw, 1.65rem);
  color: var(--text);
  margin-top: 30px;
  opacity: .84;
}
.thank-footnote .pink { color: #f19ac0; font-size: 1.2em; }
.thank-footnote .shine { color: #fcc82c; font-size: 1.1em; }

/* ===================== BOTTOM NAV ===================== */
.nav-row {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px max(16px, env(safe-area-inset-left)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  background: linear-gradient(180deg, rgba(251,245,244,0) 0%, rgba(251,245,244,.92) 38%);
  z-index: 60;
  pointer-events: none;
}
.nav-btn {
  pointer-events: auto;
  border: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 3vw, 1.3rem);
  padding: clamp(12px, 3vw, 18px) clamp(26px, 7vw, 48px);
  border-radius: 2em;
  cursor: pointer;
  box-shadow: 0 6px 22px #d84b5a33;
  transition: transform .16s, background .2s, opacity .2s;
}
.nav-btn:hover:not(:disabled) { transform: translateY(-3px); }
.nav-btn:disabled { opacity: 0; pointer-events: none; }
.nav-btn.back { background: var(--blue); color: #333; }
.nav-btn.back:hover { background: var(--blue-dark); }
.nav-btn.next { background: var(--pink-soft); color: #333; margin-left: auto; }
.nav-btn.next:hover { background: var(--pink); }

/* ===================== HEART MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 20, 30, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  animation: fadeIn .3s ease both;
}
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  background: #fffdfd;
  border: 2.5px solid #f1dede;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(120, 40, 60, .35);
  width: 100%;
  max-width: 520px;
  padding: clamp(28px, 6vw, 44px) clamp(22px, 5vw, 40px);
  text-align: center;
  animation: popIn .35s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  font-size: 2rem; line-height: 1;
  color: #c9a9b3; cursor: pointer;
}
.modal-close:hover { color: var(--rose); }
.modal-heart { font-size: clamp(2.6rem, 9vw, 3.6rem); }
.modal-title {
  font-family: "Playfair Display", serif;
  color: var(--rose);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  margin: 8px 0 10px;
}
.modal-sub {
  color: #6a6a6a;
  font-size: clamp(.95rem, 2.6vw, 1.1rem);
  line-height: 1.6;
  margin: 0 auto 18px;
  max-width: 420px;
}
.modal-textarea {
  width: 100%;
  border: 2px solid #f1dede;
  border-radius: 16px;
  padding: 14px 16px;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  color: var(--text);
  resize: vertical;
  min-height: 110px;
  background: #fff8f8;
  transition: border-color .2s, box-shadow .2s;
}
.modal-textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(247,181,207,.25);
}
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.modal-btn {
  border: none;
  border-radius: 2em;
  padding: 13px 30px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .16s, background .2s;
}
.modal-btn:hover { transform: translateY(-2px); }
.modal-btn.primary { background: var(--rose); color: #fff; box-shadow: 0 8px 24px #d84b5a55; }
.modal-btn.primary:hover { background: var(--rose-deep); }
.modal-btn.ghost { background: #f3e6ea; color: #8a6a72; }
.modal-note {
  margin-top: 16px;
  color: var(--rose);
  font-family: "Dancing Script", cursive;
  font-size: 1.3rem;
}

/* ===================== PHONE TWEAKS ===================== */
@media (max-width: 560px) {
  .stage { padding: 48px 14px calc(var(--nav-h) + 16px); }
  .brand-top { top: 24px; }
  .letter-group { margin: 30px auto; }
  .letter-top-img { right: -6px; top: -34px; }
  .stamp-svg { left: -6px; bottom: -34px; }
  .card-footer { flex-direction: column; align-items: flex-start; }
  .card-footer .footer-note { text-align: left; margin-left: 0; }
  .nav-btn { flex: 1; padding: 14px 10px; }
}

@media (min-width: 1024px) {
  .stage { padding-top: 80px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slide, .modal-overlay, .modal-card { animation: none; }
  .nav-btn:hover:not(:disabled) { transform: none; }
}
