*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --rose: #e8a4b8;
  --rose-deep: #c97a94;
  --blush: #fdf0f4;
  --cream: #fffaf9;
  --ink: #3d2c33;
  --ink-soft: #6b5560;
  --shadow: 0 20px 60px rgba(201, 122, 148, 0.18);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: linear-gradient(165deg, var(--cream) 0%, var(--blush) 45%, #fae8ee 100%);
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
  background: rgba(232, 164, 184, 0.45);
}

.bg-glow--2 {
  width: 220px;
  height: 220px;
  bottom: 10%;
  left: -70px;
  background: rgba(255, 200, 210, 0.5);
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}

.card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 2rem 1.6rem 1.8rem;
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: 0.6rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 9vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.45s forwards;
}

.story {
  margin-bottom: 1.6rem;
}

.story p,
.question,
.signature {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.story p + p {
  margin-top: 1rem;
}

.story em {
  font-style: italic;
  color: var(--rose-deep);
}

.nowrap {
  white-space: nowrap;
}

.line {
  opacity: 0;
  transform: translateY(14px);
}

.line--1 { animation: fadeUp 0.8s ease 0.7s forwards; }
.line--2 { animation: fadeUp 0.8s ease 0.95s forwards; }
.line--3 { animation: fadeUp 0.8s ease 1.2s forwards; }

.question {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 6.5vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.8rem;
  line-height: 1.3;
  text-wrap: pretty;
}

.line--4 { animation: fadeUp 0.8s ease 1.45s forwards; }

.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.7s forwards;
  position: relative;
  min-height: 52px;
}

.btn {
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97);
}

.btn--yes {
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: white;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(201, 122, 148, 0.35);
}

.btn--yes:hover,
.btn--yes:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(201, 122, 148, 0.42);
}

.btn--yes.pulse {
  animation: pulse 1.4s ease infinite;
}

.btn--no {
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  border: 1px solid rgba(201, 122, 148, 0.25);
  position: relative;
}

.btn--no.dodge {
  position: absolute;
  transition: left 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
              top 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
              transform 0.35s ease,
              opacity 0.3s ease;
}

.btn--no.shrink {
  transform: scale(0.75);
  opacity: 0.7;
}

.btn--no.vanish {
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
}

.hint {
  min-height: 2.8rem;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--rose-deep);
  font-style: italic;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-wrap: pretty;
}

.hint.visible {
  opacity: 1;
}

.signature {
  margin-top: 1.4rem;
  text-align: right;
  font-style: italic;
  color: var(--ink);
}

.line--5 {
  animation: fadeUp 0.8s ease 1.9s forwards;
}

.hidden {
  display: none !important;
}

.card.exit {
  animation: cardOut 0.6s ease forwards;
}

.celebration {
  width: min(100%, 420px);
  text-align: center;
  animation: fadeUp 0.9s ease forwards;
}

.celebration__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: 0.8rem;
}

.celebration__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 7vw, 2.3rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--ink);
  text-wrap: pretty;
}

.celebration__text {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  text-wrap: pretty;
}

.celebration__sign {
  font-style: italic;
  color: var(--ink);
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardOut {
  to {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 10px 28px rgba(201, 122, 148, 0.35);
  }
  50% {
    box-shadow: 0 10px 36px rgba(201, 122, 148, 0.55), 0 0 0 8px rgba(232, 164, 184, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
