:root {
  --bg: #fdf6f8;
  --bg-deep: #f8e8ee;
  --card: rgba(255, 252, 253, 0.92);
  --ink: #4a2f3a;
  --ink-soft: #7a5a68;
  --rose: #c96b8a;
  --rose-light: #e8a8bc;
  --blush: #fce8ef;
  --gold: #d4a574;
  --shadow: 0 20px 50px rgba(120, 60, 80, 0.12);
  --radius: 20px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  min-height: 100svh;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: radial-gradient(ellipse 120% 80% at 50% -10%, var(--blush), var(--bg) 55%);
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  z-index: 1;
}

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

.spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose-light);
  opacity: 0.5;
  animation: drift 8s ease-in-out infinite;
}

.s1 {
  top: 12%;
  left: 18%;
  animation-delay: 0s;
}
.s2 {
  top: 28%;
  right: 14%;
  width: 4px;
  height: 4px;
  animation-delay: -2s;
}
.s3 {
  bottom: 30%;
  left: 10%;
  animation-delay: -4s;
}
.s4 {
  bottom: 18%;
  right: 22%;
  animation-delay: -1s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translate(12px, -18px) scale(1.2);
    opacity: 0.7;
  }
}

.app {
  position: relative;
  z-index: 2;
  max-width: 440px;
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 1rem calc(7.5rem + env(safe-area-inset-bottom));
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.step-viewport {
  flex: 1;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  color: var(--rose);
  box-shadow: 0 4px 16px rgba(201, 107, 138, 0.15);
}

.brand-text {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.step {
  flex: 1;
  animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.step[hidden] {
  display: none !important;
}

.step.is-active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-art,
.success-art {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.illustration {
  width: min(280px, 88vw);
  height: auto;
}

.heart-float.h1 {
  animation: pulseHeart 2.4s ease-in-out infinite;
}
.heart-float.h2 {
  animation: pulseHeart 2.4s ease-in-out infinite 0.6s;
}

.dot {
  animation: twinkle 3s ease-in-out infinite;
}
.d2 {
  animation-delay: 0.8s;
}
.d3 {
  animation-delay: 1.4s;
}

@keyframes pulseHeart {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 7vw, 2.65rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.title-sm {
  font-size: clamp(1.75rem, 5.5vw, 2.1rem);
}

.lead {
  margin: 0 0 1.75rem;
  font-size: clamp(1rem, 4.2vw, 1.05rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 38ch;
}

.lead strong {
  color: var(--rose);
  font-weight: 500;
}

.lead-sm {
  font-size: 0.98rem;
  margin-bottom: 1.35rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
}

.choice-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  border: none;
  border-radius: 999px;
  padding: 1rem 1.5rem;
  min-height: 52px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--rose) 0%, #b85a78 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(201, 107, 138, 0.35);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 28px rgba(201, 107, 138, 0.42);
  transform: translateY(-1px);
}

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

.btn-soft {
  background: var(--card);
  color: var(--ink-soft);
  border: 1.5px solid rgba(201, 107, 138, 0.2);
}

.btn-soft:hover {
  border-color: var(--rose-light);
  color: var(--rose);
}

.btn-wide {
  width: 100%;
  margin-top: 0.5rem;
}

.hint {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  min-height: 1.25em;
  font-style: italic;
}

.hint-hidden {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hint-visible {
  opacity: 1;
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.field-or {
  margin-top: 1rem;
}

.input,
.input-touch {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 0.95rem 1rem;
  min-height: 52px;
  border-radius: 14px;
  border: 1.5px solid rgba(201, 107, 138, 0.25);
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.textarea.input-touch {
  min-height: 100px;
}

.input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(201, 107, 138, 0.15);
}

.textarea {
  resize: vertical;
  min-height: 88px;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.chip {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid rgba(201, 107, 138, 0.22);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--rose-light);
}

.chip.is-selected {
  background: var(--blush);
  border-color: var(--rose);
  color: var(--rose);
  font-weight: 500;
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.time-slot {
  font-family: var(--font-body);
  text-align: left;
  padding: 1rem;
  min-height: 64px;
  border-radius: 14px;
  border: 1.5px solid rgba(201, 107, 138, 0.2);
  background: var(--card);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: all 0.2s ease;
}

.time-slot strong {
  display: block;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
}

.time-slot span {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.time-slot:hover {
  border-color: var(--rose-light);
}

.time-slot.is-selected {
  border-color: var(--rose);
  background: var(--blush);
  box-shadow: var(--shadow);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  margin-bottom: 1.25rem;
}

.summary p {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.summary p:last-child {
  margin-bottom: 0;
}

.summary strong {
  color: var(--rose);
  font-weight: 500;
}

.pledge-badge {
  margin-top: 0.75rem !important;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(201, 107, 138, 0.25);
  color: var(--rose) !important;
}

.card-highlight {
  border: 1.5px solid rgba(201, 107, 138, 0.28);
  background: linear-gradient(145deg, #fff9fb 0%, var(--blush) 100%);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(252, 232, 239, 0.7);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.callout-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--rose);
}

.step-actions {
  margin-top: 0.5rem;
  padding-bottom: 0.25rem;
}

.step-actions-pledge {
  position: relative;
  z-index: 2;
}

.step-pledge {
  position: relative;
  overflow: hidden;
}

.heart-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-heart {
  position: absolute;
  bottom: -10%;
  color: var(--rose-light);
  opacity: 0.45;
  animation: riseHeart 5s ease-in infinite;
}

@keyframes riseHeart {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-115vh) rotate(18deg);
    opacity: 0;
  }
}

.promise-list {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  position: relative;
  z-index: 1;
}

.promise-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.promise-list li span {
  color: var(--rose);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.pledge-schedule {
  position: relative;
  z-index: 1;
  margin-bottom: 1.25rem;
  text-align: center;
}

.pledge-schedule-label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pledge-schedule-when {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.btn-promise {
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.btn-pulse {
  animation: gentlePulse 1.2s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%,
  100% {
    box-shadow: 0 8px 24px rgba(201, 107, 138, 0.35);
  }
  50% {
    box-shadow: 0 12px 32px rgba(201, 107, 138, 0.55);
    transform: scale(1.02);
  }
}

.card-reminder {
  background: linear-gradient(160deg, #fff5f8, #fce8ef);
  border: 1.5px dashed rgba(201, 107, 138, 0.35);
}

.reminder-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
}

.reminder-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.reminder-body strong {
  color: var(--ink);
}

.title em {
  font-style: italic;
  color: var(--rose);
}

.action-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 82%, transparent);
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.progress-track {
  height: 3px;
  background: rgba(201, 107, 138, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--rose-light), var(--rose));
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-dots {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.15rem;
  max-width: 440px;
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.progress-dots li span {
  display: block;
  text-align: center;
}

.progress-dots li {
  opacity: 0.45;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.progress-dots li.is-done,
.progress-dots li.is-current {
  opacity: 1;
  color: var(--rose);
  font-weight: 500;
}

@media (max-width: 380px) {
  .time-grid {
    grid-template-columns: 1fr;
  }

  .progress-dots {
    font-size: 0.52rem;
  }

  .title {
    font-size: 1.95rem;
  }
}

@media (min-width: 480px) {
  .app {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .choice-row {
    flex-direction: row;
  }
  .choice-row .btn-primary {
    flex: 1.2;
  }
  .action-row {
    flex-direction: row;
  }
  .action-row .btn-primary {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step,
  .spark,
  .heart-float,
  .dot,
  .progress-fill,
  .floating-heart,
  .btn-pulse {
    animation: none !important;
    transition: none !important;
  }
}
