* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f0f2;
  --card: rgba(255, 255, 255, 0.75);
  --text: #251d21;
  --muted: #7b6e74;
  --line: rgba(37, 29, 33, 0.10);
  --accent: #d85c83;
  --accent-dark: #bb476b;
  --soft-pink: #f7dce5;
  --soft-green: #e5efe7;
  --soft-yellow: #f5ead0;
  --soft-blue: #dfeaf1;
  --shadow: 0 30px 80px rgba(68, 42, 52, 0.12);
}

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

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 14%, #fbe4ec 0, transparent 31%),
    radial-gradient(circle at 88% 84%, #e7efe4 0, transparent 30%),
    var(--bg);
}

button,
textarea {
  font: inherit;
}

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

.app {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .45;
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}

.ambient--one {
  width: 280px;
  height: 280px;
  top: -100px;
  right: -90px;
  background: #f1bdce;
}

.ambient--two {
  width: 320px;
  height: 320px;
  left: -135px;
  bottom: -100px;
  background: #d7e5d6;
  animation-delay: -4s;
}

.ambient--three {
  width: 180px;
  height: 180px;
  left: 62%;
  top: 42%;
  background: #efe5c9;
  opacity: .23;
  animation-delay: -7s;
}

.sparkles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sparkles span {
  position: absolute;
  color: rgba(216, 92, 131, .27);
  font-size: 18px;
  animation: twinkle 4s ease-in-out infinite;
}

.sparkles span:nth-child(1) { left: 9%; top: 22%; }
.sparkles span:nth-child(2) { left: 88%; top: 18%; animation-delay: -1s; }
.sparkles span:nth-child(3) { left: 79%; top: 72%; animation-delay: -2s; }
.sparkles span:nth-child(4) { left: 19%; top: 81%; animation-delay: -3s; }
.sparkles span:nth-child(5) { left: 55%; top: 10%; animation-delay: -1.5s; }

.screen {
  position: relative;
  z-index: 1;
  display: none;
  min-height: 100dvh;
  padding: 24px;
  align-items: center;
  justify-content: center;
}

.screen--active {
  display: flex;
  animation: screenIn .45s ease both;
}

.card {
  position: relative;
  width: min(100%, 760px);
  padding: 52px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 34px;
  background: var(--card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.choice-card--wide {
  width: min(100%, 940px);
}

.welcome-card,
.form-card,
.done-card,
.secret-card {
  max-width: 620px;
  text-align: center;
}

.tiny-label {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.welcome-icon {
  margin: 4px 0 18px;
  font-size: 28px;
  animation: pulse 2.8s ease-in-out infinite;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.02;
}

h1 {
  font-size: clamp(42px, 7vw, 74px);
}

h2 {
  font-size: clamp(38px, 6vw, 64px);
}

h1 em {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  color: var(--accent);
}

.lead {
  max-width: 540px;
  margin: 28px auto 0;
  color: #50454a;
  font-size: 17px;
  line-height: 1.65;
}

.sublead,
.section-copy {
  max-width: 540px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.primary-btn {
  width: 100%;
  margin-top: 30px;
  padding: 18px 22px;
  border: 0;
  border-radius: 18px;
  background: var(--text);
  color: white;
  cursor: pointer;
  font-weight: 700;
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 29, 33, .14);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: .55;
  cursor: wait;
}

.primary-btn span {
  float: right;
}

.secret-link {
  margin-top: 18px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #9e9096;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.footnote,
.privacy-note {
  margin: 14px 0 0;
  color: #9a8e93;
  font-size: 11px;
  line-height: 1.5;
}

.back-link {
  position: absolute;
  top: 25px;
  left: 28px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.choice-card,
.branch-card {
  text-align: center;
}

.choice-card .tiny-label,
.branch-card .tiny-label {
  margin-top: 12px;
}

.gift-grid {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.gift-grid--four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gift-option {
  position: relative;
  min-height: 285px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.62);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.gift-option::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -55px;
  right: -55px;
  border-radius: 50%;
  opacity: .67;
  transition: transform .35s ease;
}

.gift-option--flowers::before { background: var(--soft-pink); }
.gift-option--money::before { background: var(--soft-green); }
.gift-option--surprise::before { background: var(--soft-yellow); }
.gift-option--tasty::before { background: var(--soft-blue); }

.gift-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(50, 31, 39, 0.10);
}

.gift-option:hover::before {
  transform: scale(1.16);
}

.gift-art {
  position: relative;
  display: block;
  margin-bottom: 38px;
  font-size: 58px;
  transform-origin: center;
  transition: transform .3s ease;
}

.gift-option:hover .gift-art {
  transform: rotate(-4deg) scale(1.06);
}

.gift-title {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.gift-desc {
  display: block;
  max-width: 280px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.gift-arrow {
  position: absolute;
  left: 28px;
  bottom: 23px;
  font-size: 12px;
  font-weight: 700;
}

.big-emoji {
  margin: 6px 0 18px;
  font-size: 66px;
  animation: softPop .5s ease both;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.mini-option {
  min-height: 155px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.65);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.mini-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(50, 31, 39, .08);
  border-color: rgba(216, 92, 131, .24);
}

.mini-option span {
  display: block;
  margin-bottom: 18px;
  font-size: 30px;
}

.mini-option b {
  display: block;
  font-size: 16px;
}

.mini-option small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

form {
  margin-top: 28px;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 118px;
  padding: 16px;
  outline: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: var(--text);
  line-height: 1.5;
  transition: border-color .2s ease, box-shadow .2s ease;
}

textarea:focus {
  border-color: rgba(216, 92, 131, .45);
  box-shadow: 0 0 0 4px rgba(216, 92, 131, .08);
}

.done-visual {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: white;
  font-size: 30px;
  animation: donePop .45s ease both;
}

.signature {
  margin-top: 30px;
  color: var(--accent);
  font-size: 28px;
}

.secret-stars {
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 26px;
  letter-spacing: 8px;
  animation: pulse 2.4s ease-in-out infinite;
}

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 30px);
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--text);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(14px,-18px,0); }
}

@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.9); }
  50% { opacity: .7; transform: scale(1.12); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .78; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes softPop {
  from { transform: scale(.82); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes donePop {
  0% { transform: scale(.6) rotate(-8deg); opacity: 0; }
  70% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

@media (max-width: 760px) {
  .screen {
    padding: 14px;
  }

  .card {
    padding: 42px 22px 28px;
    border-radius: 26px;
  }

  .gift-grid--four,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .gift-option {
    min-height: 215px;
    padding: 22px;
  }

  .gift-art {
    margin-bottom: 24px;
    font-size: 52px;
  }

  .gift-arrow {
    left: 22px;
    bottom: 20px;
  }

  .back-link {
    top: 16px;
    left: 20px;
  }

  .mini-option {
    min-height: 125px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  h2 {
    font-size: clamp(36px, 11vw, 50px);
  }
}
