:root {
  --cream: #fdf7f0;
  --ink: #2c2321;
  --muted: #857873;
  --accent: #c8553d; /* warm terracotta */
  --accent-soft: #f4c9bd;
  --gold: #d9a441;
  --rose: #e8a598;
  --card: #ffffff;
  --line: #efe3d8;
  --ok: #3f8f6b;
  --shadow: 0 18px 50px -20px rgba(120, 60, 40, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
}

/* soft floating background blobs */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}
.b1 {
  width: 340px;
  height: 340px;
  background: var(--accent-soft);
  top: -80px;
  left: -60px;
}
.b2 {
  width: 300px;
  height: 300px;
  background: #fbe6b8;
  bottom: -100px;
  right: -40px;
  animation-delay: -6s;
}
.b3 {
  width: 260px;
  height: 260px;
  background: var(--rose);
  top: 40%;
  right: 10%;
  animation-delay: -11s;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(20px);
  }
}

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 22px 40px;
  text-align: center;
  animation: rise 0.7s ease both;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}
.hero-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 8vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 18px;
  font-weight: 700;
}
.accent {
  color: var(--accent);
  font-style: italic;
}
.cap {
  display: inline-block;
  animation: wiggle 2.5s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 92%, 100% { transform: rotate(0); }
  94% { transform: rotate(-12deg); }
  97% { transform: rotate(12deg); }
}
.hero-sub {
  font-size: 1.08rem;
  color: var(--ink);
  margin: 0 auto 30px;
  max-width: 540px;
}

.event-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  text-align: left;
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}
.event-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.ico {
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 2px;
}
.event-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.event-value {
  font-size: 1.02rem;
  font-weight: 500;
}

.limited-note {
  background: #fff7e8;
  border: 1px dashed var(--gold);
  color: #8a6516;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 28px;
}

.cta {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(200, 85, 61, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(200, 85, 61, 0.8);
}
.cta:active {
  transform: translateY(0);
}
.tiny {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 14px;
}

/* ---------------- FLOW ---------------- */
.flow {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 22px 20px;
  min-height: 70vh;
}
.progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 26px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  transition: all 0.3s ease;
}
.dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
.dot.done {
  background: var(--accent-soft);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 26px;
  min-height: 240px;
}
.step-anim {
  animation: rise 0.4s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.q-emoji {
  font-size: 2rem;
  margin-bottom: 6px;
}
.q-title {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  margin: 0 0 6px;
  line-height: 1.2;
}
.q-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 22px;
}

/* text/number/date inputs */
.field {
  width: 100%;
  min-width: 0; /* let inputs shrink inside grid/flex (fixes iOS date overflow) */
  max-width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--ink);
  background: #fffdfb;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* iOS renders date inputs with an intrinsic width; force them to fit the cell */
.field[type="date"] {
  min-height: 52px;
}
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field::placeholder {
  color: #c3b6ad;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.two-cols > div {
  min-width: 0; /* grid children default to min-width:auto and would overflow */
}
.field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* choice buttons */
.choices {
  display: grid;
  gap: 12px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 2px solid var(--line);
  background: #fffdfb;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.choice:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
}
.choice.selected {
  border-color: var(--accent);
  background: #fff3ee;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.choice .c-emoji {
  font-size: 1.4rem;
}
.choice .c-hint {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 700;
}

.err {
  color: var(--accent);
  font-size: 0.88rem;
  margin-top: 12px;
  min-height: 1.2em;
  font-weight: 600;
}

/* nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  gap: 12px;
}
.ghost {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  padding: 10px 6px;
}
.ghost:hover {
  color: var(--ink);
}
.ghost[hidden] {
  visibility: hidden;
}
.next {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.next:hover {
  transform: translateY(-2px);
}
.next:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* final screens */
.final {
  text-align: center;
  padding: 20px 6px;
}
.final .big-emoji {
  font-size: 3.4rem;
  animation: rise 0.6s ease both;
}
.final h2 {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  margin: 14px 0 10px;
}
.final p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 400px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 30px 20px 40px;
}

/* confetti */
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}
.confetti span {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  opacity: 0.9;
  animation: fall linear forwards;
}
@keyframes fall {
  to {
    transform: translateY(105vh) rotate(720deg);
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 44px;
  }
  .card {
    padding: 28px 20px;
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
}
