* {
  box-sizing: border-box;
}

:root {
  --bg1: #fff5f8;
  --bg2: #ffe5ee;
  --ink: #241820;
  --muted: #765f6d;
  --pink: #ff4f83;
  --pink-dark: #e83970;
  --white: rgba(255,255,255,.84);
  --line: rgba(255,255,255,.72);
  --shadow: 0 24px 70px rgba(128, 40, 74, .16);
}

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

body {
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.95), transparent 32%),
    linear-gradient(145deg, var(--bg1), var(--bg2));
}

button, input, a {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  pointer-events: none;
  opacity: .55;
}

.ambient-one {
  width: 260px;
  height: 260px;
  background: #ffc2d6;
  top: -100px;
  right: -80px;
}

.ambient-two {
  width: 220px;
  height: 220px;
  background: #ffd8ad;
  bottom: -100px;
  left: -70px;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.screen {
  display: none;
  width: min(100%, 470px);
  animation: fadeSlide .45s cubic-bezier(.2,.75,.25,1);
}

.screen.active {
  display: block;
}

.card {
  width: 100%;
  padding: 28px 22px 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--white);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: visible;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--pink-dark);
  margin-bottom: 16px;
}

.hero-emoji, .section-emoji, .final-heart {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 14px;
  animation: floaty 2.5s ease-in-out infinite;
}

.final-heart {
  font-size: 64px;
}

h1, h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.06;
  letter-spacing: -.03em;
}

h1 {
  font-size: clamp(36px, 10vw, 54px);
}

h2 {
  font-size: clamp(34px, 9vw, 48px);
}

.subtitle {
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
  margin: 16px auto 22px;
  max-width: 33ch;
}

.choice-zone {
  min-height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  border: 0;
  border-radius: 18px;
  min-height: 56px;
  padding: 14px 24px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform .24s cubic-bezier(.2,.8,.2,1),
    box-shadow .24s ease,
    opacity .2s ease;
}

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

.btn-yes, .primary {
  color: white;
  background: linear-gradient(135deg, #ff6a98, #ff3f79);
  box-shadow: 0 14px 32px rgba(255, 63, 121, .28);
}

.btn-yes {
  position: relative;
  z-index: 4;
  transform-origin: center;
}

.btn-no {
  position: relative;
  z-index: 6;
  color: #56414c;
  background: white;
  box-shadow: 0 10px 24px rgba(69, 39, 54, .10);
  transition:
    left .22s cubic-bezier(.2,.9,.25,1.2),
    top .22s cubic-bezier(.2,.9,.25,1.2),
    transform .18s ease;
}

.full {
  width: 100%;
  margin-top: 20px;
}

.btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
}

.decline-link, .other-time {
  border: 0;
  background: transparent;
  color: #9a818f;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.decline-link {
  font-size: 12px;
  margin-top: 4px;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff0f5;
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.option-card {
  border: 1px solid rgba(255,79,131,.12);
  background: rgba(255,255,255,.78);
  border-radius: 20px;
  padding: 18px 8px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all .2s ease;
}

.option-card:hover,
.option-card.selected {
  transform: translateY(-3px);
  border-color: rgba(255,79,131,.48);
  background: #fff;
  box-shadow: 0 12px 26px rgba(255,79,131,.14);
}

.option-card.selected {
  outline: 3px solid rgba(255,79,131,.10);
}

.option-icon {
  font-size: 34px;
}

.field-label {
  display: block;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 8px 2px 8px;
}

.date-input {
  width: 100%;
  min-height: 58px;
  border-radius: 17px;
  border: 1px solid rgba(99, 60, 79, .12);
  background: white;
  padding: 0 16px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

.date-input:focus {
  border-color: rgba(255,79,131,.55);
  box-shadow: 0 0 0 4px rgba(255,79,131,.09);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.time-btn {
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255,79,131,.12);
  background: white;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s ease;
}

.time-btn.selected {
  color: white;
  background: linear-gradient(135deg, #ff6a98, #ff3f79);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(255,63,121,.22);
}

.other-time {
  margin: 15px 0 8px;
  font-weight: 700;
}

.hidden {
  display: none;
}

.summary-box {
  display: grid;
  gap: 10px;
  margin: 24px 0 10px;
}

.summary-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  text-align: left;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.78);
}

.message-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-heart {
  position: absolute;
  bottom: -30px;
  opacity: .15;
  animation: drift linear infinite;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes drift {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-120vh) rotate(20deg); }
}

@media (max-width: 390px) {
  .card {
    padding: 24px 16px 20px;
    border-radius: 26px;
  }

  .choice-zone {
    min-height: 180px;
  }

  .btn {
    padding-left: 18px;
    padding-right: 18px;
  }

  .option-grid {
    gap: 8px;
  }

  .option-card {
    min-height: 104px;
    font-size: 14px;
  }
}

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


.send-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.send-status.success {
  color: #267a52;
  font-weight: 700;
}

.send-status.error {
  color: #a53d59;
  font-weight: 700;
}

.copy-fallback {
  border: 0;
  background: transparent;
  color: var(--pink-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  margin-top: 6px;
}


.secondary {
  color: var(--pink-dark);
  background: #fff;
  border: 1px solid rgba(255,79,131,.18);
  box-shadow: 0 10px 24px rgba(69,39,54,.08);
}
.instagram-return {
  margin-top: 18px;
  padding: 18px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,79,131,.14);
}
.instagram-return p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.return-check {
  width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 999px;
  display: grid; place-items: center; background: #e9fff4; color: #24724f;
  font-weight: 900; font-size: 21px;
}
.copy-status { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.copy-status.success { color: #267a52; font-weight: 700; }
.copy-status.error { color: #a53d59; font-weight: 700; }
.manual-copy { margin-top: 14px; text-align: left; }
.manual-copy p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.manual-copy textarea {
  width: 100%; min-height: 96px; resize: none; border-radius: 16px;
  border: 1px solid rgba(255,79,131,.18); padding: 12px 14px; color: var(--ink);
  background: #fff; outline: none; line-height: 1.5;
}


.instagram-instruction {
  margin: 18px auto 8px;
  max-width: 32ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}


.answer-preview {
  margin: 14px 0 2px;
  text-align: left;
}

.answer-preview-label {
  display: block;
  margin: 0 0 7px 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#answerPreviewText {
  width: 100%;
  min-height: 92px;
  resize: none;
  border-radius: 16px;
  border: 1px solid rgba(255,79,131,.18);
  background: rgba(255,255,255,.95);
  padding: 13px 14px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}


.backup-note {
  margin: 7px auto 0;
  color: #a78d9b;
  font-size: 11px;
  line-height: 1.4;
}


.instagram-final-message {
  margin-top: 20px;
  padding: 20px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,79,131,.14);
}

.instagram-final-message strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.instagram-final-message p {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 30ch;
}

.instagram-icon {
  font-size: 34px;
  line-height: 1;
}

.email-status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 11px;
  color: #a78d9b;
}
