:root {
  --cream: #fff8f0;
  --blush: #ffb5c5;
  --peach: #ffd6c4;
  --lavender: #ead9ff;
  --rose: #e85a71;
  --rose-deep: #d94864;
  --ink: #5a3d4a;
  --soft: #8a6573;
  --white: #fffdfb;
  --shadow: 0 16px 36px rgba(232, 90, 113, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

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

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, #ffe3c4 0 8%, transparent 9%),
    radial-gradient(circle at 86% 18%, #ffd0dc 0 10%, transparent 11%),
    radial-gradient(circle at 12% 78%, #e4d4ff 0 9%, transparent 10%),
    linear-gradient(180deg, #fff8f0 0%, #ffe8ef 42%, #ead9ff 100%);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  width: min(100%, 420px);
  text-align: center;
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.is-active {
  display: block;
}

.card {
  position: relative;
  background: rgba(255, 253, 251, 0.82);
  border: 3px solid #fff;
  border-radius: 32px;
  padding: 28px 22px 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card::before,
.card::after {
  position: absolute;
  font-size: 1.15rem;
  pointer-events: none;
}

.card::before {
  content: "♡";
  top: 12px;
  left: 16px;
  color: #ff8aa0;
  transform: rotate(-14deg);
}

.card::after {
  content: "✦";
  top: 14px;
  right: 16px;
  color: #c9a4ff;
}

.eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--rose);
}

.hey {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--soft);
}

.name {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(2.6rem, 11vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--rose-deep);
}

.question,
.win-title {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(1.35rem, 5.8vw, 1.7rem);
  line-height: 1.35;
  margin: 0 0 12px;
  font-weight: 600;
}

.compliment {
  margin: 0 auto 12px;
  max-width: 34ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
}

.whisper {
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 0.95rem;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.date-actions {
  position: relative;
  min-height: 96px;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  padding-top: 8px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  min-height: 52px;
  min-width: 128px;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-soft {
  background: var(--white);
  color: var(--rose-deep);
  border: 2px solid #ffd0dc;
}

.btn-rose,
.btn-yes {
  background: linear-gradient(180deg, #ff8aa0, var(--rose));
  color: white;
}

.btn-yes {
  position: relative;
  z-index: 1;
  min-width: 150px;
  font-size: 1.15rem;
}

.btn-no {
  position: relative;
  z-index: 3;
  min-width: 110px;
  background: #fff;
  color: var(--soft);
  border: 2px dashed #e7c9d2;
  box-shadow: 0 8px 18px rgba(90, 61, 74, 0.12);
  transform-origin: center center;
  transition: transform 0.2s ease-out;
  touch-action: none;
}

.polaroid {
  width: min(78%, 260px);
  margin: 10px auto 16px;
  padding: 10px 10px 8px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(90, 61, 74, 0.14);
  transform: rotate(-2.5deg);
}

.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

.polaroid figcaption {
  margin: 8px 0 2px;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--soft);
}

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

.float {
  position: absolute;
  animation: drift 7s ease-in-out infinite;
  opacity: 0.72;
}

.heart {
  color: #ff8aa0;
  font-size: 1.6rem;
}

.spark {
  color: #c9a4ff;
  font-size: 1.1rem;
}

.cloud {
  color: rgba(255, 255, 255, 0.8);
  font-size: 2.4rem;
}

.flower {
  color: #ffb27a;
  font-size: 1.2rem;
}

.plane {
  color: #e85a71;
  font-size: 1.35rem;
}

.h1 { top: 12%; left: 8%; animation-delay: 0s; }
.h2 { top: 68%; left: 78%; animation-delay: 1.4s; }
.h3 { top: 38%; left: 86%; animation-delay: 2.2s; font-size: 1.1rem; }
.s1 { top: 18%; left: 78%; animation-delay: 0.6s; }
.s2 { top: 82%; left: 14%; animation-delay: 1.8s; }
.s3 { top: 48%; left: 6%; animation-delay: 2.8s; }
.s4 { top: 8%; left: 48%; animation-delay: 1.1s; }
.c1 { top: 22%; left: 18%; animation-duration: 11s; }
.c2 { top: 72%; left: 62%; animation-duration: 13s; animation-delay: 2s; }
.f1 { top: 58%; left: 18%; animation-delay: 0.9s; }
.f2 { top: 14%; left: 62%; animation-delay: 1.6s; }
.p1 { top: 30%; left: 72%; animation-duration: 9s; }

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

.burst span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: var(--size);
  animation: pop 1.1s ease-out forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-14px) rotate(8deg);
  }
}

@keyframes pop {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.15) rotate(28deg);
  }
}

@media (min-width: 720px) {
  .app {
    max-width: 430px;
    margin: 0 auto;
  }
}
