:root {
  --rose: #ed5b8c;
  --rose-dark: #c83b6b;
  --ink: #513645;
  --cream: #fff9f4;
  --lavender: #eee6ff;
  --shadow: 0 22px 70px rgba(145, 70, 105, .18);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  background: linear-gradient(145deg, #fff1f5, #f4edff 55%, #fff8df);
}

button, input, textarea { font: inherit; }
button { touch-action: manipulation; }
[hidden], .hidden { display: none !important; }

.background-hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .3;
  background-image: radial-gradient(circle at 12% 22%, #ff9abb 0 4px, transparent 5px), radial-gradient(circle at 82% 18%, #bba0ff 0 5px, transparent 6px), radial-gradient(circle at 72% 78%, #ffb0c9 0 4px, transparent 5px);
}

.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 28px 18px;
  align-items: center;
  justify-content: center;
  overflow-x: clip;
}

.screen.active, .lock-screen { display: flex; }

.card {
  position: relative;
  min-width: 0;
  width: min(760px, 100%);
  padding: clamp(28px, 6vw, 60px);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 32px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: appear .55s ease both;
}

.small-card { max-width: 520px; }
.form-card { text-align: left; }
.form-card > h1, .form-card > p, .form-card > .celebration, .form-card > .cat, .form-card > .gif-wrap { text-align: center; margin-inline: auto; }

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; font: 400 clamp(2.5rem, 9vw, 4.5rem)/1.1 Pacifico, cursive; color: var(--rose-dark); }
h2 { margin: 34px auto 24px; max-width: 550px; font-size: clamp(1.25rem, 4vw, 1.7rem); }
.lead { font-size: clamp(1.05rem, 3vw, 1.25rem); line-height: 1.7; }
.eyebrow { margin-bottom: 10px; color: var(--rose-dark); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.signature { margin: 30px 0 0; font: 400 1.5rem Pacifico, cursive; }

.gif-wrap {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 0 auto 22px;
}

.internet-gif {
  display: block;
  width: min(210px, 58vw);
  height: 165px;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 10px 16px rgba(116, 66, 91, .16));
}

.cat-row { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 24px; }
.cat {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 68px;
  margin: 0 auto 24px;
  border: 4px solid var(--ink);
  border-radius: 46% 46% 48% 48%;
  background: #ffdca8;
  font-weight: 700;
}
.cat-row .cat { margin: 0; }
.cat::before, .cat::after { content: ""; position: absolute; z-index: -1; top: -17px; width: 28px; height: 32px; border: 4px solid var(--ink); background: #ffdca8; transform: rotate(45deg); }
.cat::before { left: 4px; border-radius: 7px 2px 12px 2px; }
.cat::after { right: 4px; border-radius: 2px 7px 2px 12px; }
.cat span { font-size: 1.1rem; }
.floating-heart { font-size: 2rem; animation: pulse 1s infinite alternate; }
.bob { animation: bob 1.8s ease-in-out infinite; }
.bob.delayed { animation-delay: -.8s; background: #d8c5ff; }
.celebration { margin-bottom: 12px; font-size: 2.5rem; letter-spacing: .15em; animation: pulse .8s infinite alternate; }

.answer-zone { min-height: 130px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 18px; padding: 10px; }
.button { border: 0; border-radius: 999px; padding: 14px 24px; cursor: pointer; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: linear-gradient(135deg, var(--rose), #a869dc); box-shadow: 0 10px 25px rgba(210, 67, 118, .28); }
.button.primary:hover { box-shadow: 0 14px 30px rgba(210, 67, 118, .38); }
.button.secondary { color: var(--ink); background: #eee8ef; }
.button.big { padding: 17px 30px; font-size: 1.05rem; }
.evasive { z-index: 50; white-space: nowrap; transition: left .38s ease, top .38s ease, transform .2s; }
.tease { min-height: 24px; margin: 4px 0; color: var(--rose-dark); font-weight: 700; }

.stack { display: grid; gap: 16px; margin-top: 28px; }
.stack label, legend { font-weight: 700; }
input, textarea { width: 100%; border: 2px solid #ecdde6; border-radius: 14px; padding: 13px 15px; color: var(--ink); background: #fff; outline: none; }
input:focus, textarea:focus { border-color: #cf78a1; box-shadow: 0 0 0 4px #f9ddeb; }
textarea { resize: vertical; }
fieldset { min-width: 0; margin: 4px 0; padding: 0; border: 0; }
legend { margin-bottom: 12px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); gap: 10px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 13px 10px; text-align: center; border: 2px solid #f0dfe7; border-radius: 14px; background: #fff; cursor: pointer; transition: .18s; }
.choice input:checked + span { border-color: var(--rose); color: var(--rose-dark); background: #fff0f5; transform: translateY(-2px); }
.choice input:focus-visible + span { outline: 3px solid #bda4ef; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-columns > div { display: grid; gap: 8px; }
.error { min-height: 20px; margin: 0; color: #b51d45; font-weight: 700; }
.success-card { overflow: hidden; }

@keyframes appear { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes bob { 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes pulse { to { transform: scale(1.16) rotate(3deg); } }

@media (max-width: 560px) {
  .card { padding: 30px 20px; border-radius: 24px; }
  .two-columns { grid-template-columns: 1fr; }
  .answer-zone { min-height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
