:root {
  --pink: #ff8fb1;
  --pink-deep: #ff5c8a;
  --rose: #ffd3e0;
  --blush: #fff0f5;
  --lilac: #e9ddff;
  --peach: #ffe6d6;
  --mint: #d9f5ea;
  --ink: #5b3546;
  --ink-soft: #a07888;
  --card: rgba(255, 255, 255, 0.88);
  --shadow: 0 14px 34px -14px rgba(255, 92, 138, 0.45);
  --radius: 26px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: 'Fredoka', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, #ffd9e6 0, transparent 38%),
    radial-gradient(circle at 88% 8%, var(--lilac) 0, transparent 34%),
    radial-gradient(circle at 75% 92%, var(--peach) 0, transparent 40%),
    radial-gradient(circle at 8% 85%, var(--mint) 0, transparent 30%),
    #fff6f9;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* polka dots */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 143, 177, 0.18) 2px, transparent 2.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ---------- floating hearts ---------- */
.floaties { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.floaty {
  position: absolute;
  bottom: -50px;
  opacity: 0;
  animation: floatUp linear infinite;
  filter: saturate(0.9);
}
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(-10deg); opacity: 0; }
  10% { opacity: 0.75; }
  50% { transform: translateY(-55vh) translateX(18px) rotate(10deg); }
  90% { opacity: 0.6; }
  100% { transform: translateY(-112vh) translateX(-10px) rotate(-8deg); opacity: 0; }
}

/* ---------- layout ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.brand {
  text-align: center;
  font-family: 'Pacifico', cursive;
  font-size: 1.9rem;
  color: var(--pink-deep);
  margin: 6px 0 18px;
  text-shadow: 0 3px 0 #fff, 0 6px 18px rgba(255, 92, 138, 0.25);
  letter-spacing: 0.5px;
}
.brand small {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-shadow: none;
  margin-top: 2px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.card {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 34px 24px 26px;
  box-shadow: var(--shadow);
  outline: 2px dashed var(--rose);
  outline-offset: -11px;
}
.card::after {
  /* little bow / tape on top */
  content: '🎀';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  font-size: 2rem;
  filter: drop-shadow(0 3px 4px rgba(255, 92, 138, 0.3));
}

.enter { animation: popIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes popIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

h1, h2 { margin: 0; line-height: 1.2; }
.q-title {
  font-size: 1.65rem;
  font-weight: 600;
  text-align: center;
  margin-top: 6px;
}
.q-sub {
  text-align: center;
  color: var(--ink-soft);
  margin: 8px 0 0;
  font-size: 1rem;
}
.q-count {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pink);
  font-weight: 600;
}

/* ---------- progress hearts ---------- */
.progress { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 0 0 22px; }
.pip {
  font-size: 1.05rem;
  color: #f3d2dd;
  transition: transform 0.3s, color 0.3s;
}
.pip.done { color: var(--pink); }
.pip.now { color: var(--pink-deep); transform: scale(1.35); animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1.25); } 50% { transform: scale(1.45); } }

/* ---------- options ---------- */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.options.three > .opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.options.multi { grid-template-columns: 1fr 1fr; }

.opt {
  position: relative;
  font: inherit;
  color: inherit;
  border: 2px solid #ffe1ea;
  background: #fff;
  border-radius: 22px;
  padding: 18px 10px 16px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s, background 0.18s;
  box-shadow: 0 6px 0 #ffe1ea;
  animation: popIn 0.4s backwards;
}
.opt:nth-child(2) { animation-delay: 0.05s; }
.opt:nth-child(3) { animation-delay: 0.1s; }
.opt:nth-child(4) { animation-delay: 0.15s; }
.opt:nth-child(5) { animation-delay: 0.2s; }
.opt:nth-child(6) { animation-delay: 0.25s; }
.opt:hover { transform: translateY(-3px) rotate(-1deg); border-color: var(--pink); box-shadow: 0 9px 0 var(--rose); }
.opt:active { transform: translateY(3px); box-shadow: 0 2px 0 #ffe1ea; }
.opt:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 3px; }

.opt .emoji { display: block; font-size: 2.6rem; line-height: 1.1; margin-bottom: 8px; transition: transform 0.25s; }
.opt:hover .emoji { transform: scale(1.12) rotate(6deg); }
.opt .label { display: block; font-weight: 600; font-size: 1.08rem; }
.opt .note { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }

.opt.small { padding: 14px 8px 12px; }
.opt.small .emoji { font-size: 2rem; margin-bottom: 4px; }
.opt.small .label { font-size: 0.98rem; }

.opt.selected {
  background: linear-gradient(160deg, #ffb3c9, var(--pink-deep));
  border-color: var(--pink-deep);
  color: #fff;
  box-shadow: 0 6px 0 #e0446f;
  animation: squish 0.4s;
}
.opt.selected .note { color: #ffe8ef; }
.opt.selected::after {
  content: '💖';
  position: absolute;
  top: -10px;
  right: -8px;
  font-size: 1.35rem;
  animation: popIn 0.3s;
}
@keyframes squish {
  0% { transform: scale(1); }
  35% { transform: scale(0.92, 1.06); }
  65% { transform: scale(1.06, 0.95); }
  100% { transform: scale(1); }
}

textarea {
  width: 100%;
  margin-top: 22px;
  min-height: 120px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  border: 2px solid #ffe1ea;
  border-radius: 20px;
  padding: 16px;
  resize: vertical;
  background: #fffafc;
}
textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 143, 177, 0.2); }

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  box-shadow: 0 6px 0 #e0446f, 0 12px 24px -8px rgba(255, 92, 138, 0.6);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #e0446f; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.ghost {
  background: #fff;
  color: var(--pink-deep);
  box-shadow: 0 5px 0 #ffd3e0;
  border: 2px solid #ffd3e0;
}
.btn.big { font-size: 1.25rem; padding: 16px 36px; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  gap: 12px;
  min-height: 52px;
}
.link {
  background: none;
  border: none;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px 4px;
  font-size: 1rem;
}
.link:hover { color: var(--pink-deep); }

.center { text-align: center; }

/* ---------- welcome ---------- */
.welcome .big-emoji { font-size: 4.2rem; display: block; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.welcome h1 { font-family: 'Pacifico', cursive; font-weight: 400; color: var(--pink-deep); font-size: 2.2rem; margin: 10px 0 12px; }
.welcome p { font-size: 1.12rem; line-height: 1.55; color: var(--ink); max-width: 420px; margin: 0 auto 26px; }
.stickers { display: flex; justify-content: center; gap: 14px; font-size: 1.6rem; margin-bottom: 22px; }
.stickers span { animation: bob 3s ease-in-out infinite; }
.stickers span:nth-child(2) { animation-delay: 0.3s; }
.stickers span:nth-child(3) { animation-delay: 0.6s; }
.stickers span:nth-child(4) { animation-delay: 0.9s; }
.stickers span:nth-child(5) { animation-delay: 1.2s; }

/* ---------- summary ---------- */
.dream {
  font-family: 'Caveat', cursive;
  font-size: 1.75rem;
  line-height: 1.3;
  text-align: center;
  color: var(--pink-deep);
  margin: 14px 0 20px;
}
.recap { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; }
.recap li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid #ffe8ef;
  border-radius: 18px;
  padding: 10px 14px;
  animation: popIn 0.4s backwards;
}
.recap .r-emoji { font-size: 1.6rem; min-width: 2.2rem; text-align: center; }
.recap .r-body { flex: 1; min-width: 0; }
.recap .r-label { font-size: 0.75rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); }
.recap .r-value { font-weight: 600; overflow-wrap: anywhere; }
.recap .edit { font-size: 0.9rem; }

.error { color: #d6336c; text-align: center; margin-top: 12px; min-height: 1.2em; }

/* ---------- confetti ---------- */
.confetti {
  position: fixed;
  top: -40px;
  z-index: 50;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0.9; }
}

.footer-note { text-align: center; color: var(--ink-soft); font-size: 0.85rem; margin-top: 22px; }

@media (max-width: 420px) {
  .card { padding: 30px 16px 22px; }
  .q-title { font-size: 1.4rem; }
  .options { gap: 11px; }
  .opt .emoji { font-size: 2.2rem; }
  .opt .note { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .floaties, .confetti { display: none; }
}
