:root {
  --cream:   #FFF4EC;
  --rose:    #FFE1EA;
  --ink:     #5B3A4B;
  --muted:   #B7899C;
  --coral:   #FF5C7C;
  --coral-deep: #EF3E67;
  --peri:    #7C86FF;
  --card:    #FFFFFF;
  --line:    #F4DBE4;
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
          "Baloo 2", "Quicksand", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow-card: 0 22px 48px -18px rgba(180, 70, 110, .40);
  --shadow-press: 0 6px 0 0 var(--coral-deep);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 15% 0%, var(--cream) 0%, var(--rose) 68%, #FFD3E0 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- layout ---------- */

body.centered {
  display: grid;
  place-items: center;
  padding: 24px;
}

.stage {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: center;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  gap: 18px;
}

/* ---------- card ---------- */

.card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: 30px;
  padding: 40px 30px 34px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.card--narrow { max-width: 380px; }

.step { grid-row: 2; grid-column: 1; align-self: center; }
.stage .step { justify-self: center; }

/* only the active step shows; hidden attribute handles the rest */
.step[hidden] { display: none; }

.reveal, .step.is-active { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* ---------- type ---------- */

.display {
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: .1em 0 .35em;
}
.display--sm { font-size: clamp(1.4rem, 5vw, 1.8rem); }

.lead { color: var(--muted); font-size: 1.02rem; line-height: 1.5; margin: 0 0 1.4em; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--coral);
  margin: 0 0 .2em;
}
.whisper { color: var(--muted); font-size: .9rem; margin: 1.2em 0 0; }

.wax {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: .1em;
  filter: drop-shadow(0 8px 10px rgba(180, 70, 110, .25));
}
.wax--big { font-size: 4.2rem; animation: beat 1.1s ease-in-out infinite; }

/* ---------- buttons ---------- */

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  border-radius: 999px;
  padding: 15px 28px;
  cursor: pointer;
  color: #fff;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:focus-visible { outline: 3px solid var(--peri); outline-offset: 3px; }

.btn--primary { background: var(--coral); box-shadow: var(--shadow-press); }
.btn--primary:hover { background: var(--coral-deep); }
.btn--primary:active { transform: translateY(4px); box-shadow: 0 2px 0 0 var(--coral-deep); }
.btn--primary:disabled {
  background: #F0C7D3; box-shadow: none; cursor: default; color: #fff; opacity: .8;
}

.btn--block { display: block; width: 100%; margin-top: 6px; }

.btn--ghost {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn--ghost:hover { color: var(--ink); }

.ask-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.btn--yes { animation: beat 1.4s ease-in-out infinite; }

.btn--no.is-loose {
  position: relative;
  z-index: 30;
  background: var(--peri);
  color: #fff;
  box-shadow: 0 12px 26px -6px rgba(90, 76, 160, .55);
  /* animate transform (not left/top) so the FIRST move glides too, and use a
     non-overshoot ease so it never slides past the clamped target off-screen */
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), background .2s ease;
}
.btn--no.is-loose:hover { background: #6470ff; }

@keyframes beat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.08); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.05); }
}

/* ---------- login form ---------- */

.form { text-align: left; display: grid; gap: 14px; margin-top: 8px; }
.field { display: grid; gap: 6px; }
.field span { font-size: .82rem; font-weight: 700; color: var(--muted); padding-left: 4px; }
.field input {
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: #FFF7FA;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 13px 16px;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--coral);
  background: #fff;
}
.form-error { color: var(--coral-deep); font-size: .9rem; margin: -4px 0 0; text-align: center; }

/* ---------- choices (activity / location) ---------- */

.choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.choices--two { grid-template-columns: repeat(2, 1fr); }

.choice {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  background: #FFF7FA;
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 20px 12px 16px;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
  display: grid;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.choice .emoji { font-size: 1.9rem; line-height: 1; }
.choice:hover { transform: translateY(-2px); border-color: #F3B7C8; }
.choice.is-selected {
  border-color: var(--peri);
  background: #F1F2FF;
  box-shadow: 0 0 0 4px rgba(124, 134, 255, .18);
}
.choice:focus-visible { outline: 3px solid var(--peri); outline-offset: 2px; }

/* ---------- calendar ---------- */

.calendar { display: grid; gap: 18px; margin-bottom: 16px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.month-title { font-weight: 700; font-size: 1.05rem; margin: 0 0 8px; }
.dow {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  font-size: .68rem; font-weight: 700; color: var(--muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .04em;
}
.grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.day {
  aspect-ratio: 1 / 1;
  border: none;
  background: #FFF7FA;
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .1s ease, background .12s ease, color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.day:hover:not(:disabled) { background: #FFE3EC; transform: translateY(-1px); }
.day.is-picked { background: var(--coral); color: #fff; }
.day.is-picked:hover { background: var(--coral-deep); }
.day.is-empty { background: transparent; cursor: default; }
.day:disabled { color: #D9C4CE; background: transparent; cursor: default; }
.day:focus-visible { outline: 3px solid var(--peri); outline-offset: 2px; }

.picked { color: var(--muted); font-size: .9rem; margin: 0 0 12px; font-weight: 700; }

/* ---------- progress ---------- */

.progress { grid-row: 1; display: flex; gap: 9px; padding-top: 6px; }
.pip { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,92,124,.28); transition: all .3s ease; }
.pip.is-done { background: var(--coral); transform: scale(1.15); }

/* ---------- success + errors ---------- */

.step--done .lead { color: var(--ink); font-weight: 600; }
#recap b { color: var(--coral-deep); }

.error-banner {
  grid-row: 2;
  align-self: end;
  background: #FFE0E6;
  color: var(--coral-deep);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: .9rem;
  font-weight: 700;
}

/* ---------- ambient hearts ---------- */

.hearts {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.heart {
  position: absolute; bottom: -40px; font-size: 20px; opacity: 0;
  animation: floatUp linear forwards;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  12%  { opacity: .55; }
  90%  { opacity: .45; }
  100% { opacity: 0; transform: translateY(-112vh) rotate(40deg); }
}

/* burst on YES / success */
.burst {
  position: fixed; z-index: 30; pointer-events: none; font-size: 22px;
  animation: burst .9s ease-out forwards;
}
@keyframes burst {
  0%   { opacity: 1; transform: translate(0,0) scale(.6); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}

.card, .stage, .hearts { position: relative; z-index: 1; }
.hearts { z-index: 0; }

/* ---------- motion off ---------- */

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

/* ---------- small screens ---------- */

@media (max-width: 380px) {
  .card { padding: 32px 22px 28px; border-radius: 26px; }
  .btn { font-size: 1rem; }
}
