:root {
  /* Pastel palette */
  --peach:        #FFE3D3;
  --peach-deep:   #FBC4A3;
  --lavender:     #E8D8FF;
  --lavender-deep:#CDB4F0;
  --mint:         #D6F1E0;
  --mint-deep:    #A6DDB8;
  --cream:        #FFF7EE;
  --milk:         #FFFBF6;
  --rose:         #F2C2C7;
  --rose-deep:    #DE9DA4;
  --gold:         #E8C39E;

  /* Ink (soft, never pure black) */
  --ink:          #4A3F55;
  --ink-soft:     #7A6E85;
  --ink-faint:    #B5ADBD;

  /* Misc */
  --shadow-soft:  0 10px 30px rgba(193, 162, 184, 0.22);
  --shadow-card:  0 4px 14px rgba(74, 63, 85, 0.08);
  --shadow-deep:  0 18px 50px rgba(112, 80, 130, 0.18);
  --r-soft: 22px;
  --r-card: 16px;
  --r-pill: 999px;

  --font-display: 'Caveat', 'Comic Sans MS', cursive;
  --font-hand:    'Shadows Into Light Two', 'Caveat', cursive;
  --font-body:    'Caveat', 'Comic Sans MS', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  font-size: 22px;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%,  rgba(232,216,255,0.85) 0%, transparent 60%),
    radial-gradient(ellipse 90% 70% at 85% 90%,  rgba(214,241,224,0.85) 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 60%, rgba(255,227,211,0.65) 0%, transparent 65%),
    var(--cream);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  overscroll-behavior: none;
}

#app {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  z-index: 1;
}

/* ---------- Stage container ---------- */
.stage {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}
.stage.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  position: relative;
}
.stage[hidden] { display: none !important; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-hand);
  font-size: 24px;
  color: var(--rose-deep);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  font-weight: 400;
}
.title {
  font-family: var(--font-display);
  font-size: clamp(40px, 12vw, 60px);
  line-height: 1;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
.subtitle {
  font-family: var(--font-hand);
  font-size: clamp(22px, 6vw, 28px);
  color: var(--ink-soft);
  text-align: center;
  text-wrap: pretty;
  line-height: 1.25;
  font-weight: 400;
}
.body {
  font-size: 22px;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.01em;
  padding: 14px 44px;
  min-width: 220px;
  border: none;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(193,162,184,0.32); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost {
  background: white;
  color: var(--rose-deep);
  border: 1.5px solid var(--rose);
  box-shadow: var(--shadow-card);
}
.btn--lavender { background: linear-gradient(135deg, var(--lavender) 0%, var(--lavender-deep) 100%); }
.btn--mint     { background: linear-gradient(135deg, var(--mint) 0%, var(--mint-deep) 100%); color: var(--ink); }

/* ---------- Background floaty pastel orbs ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(var(--dx, 30px), var(--dy, -40px)) scale(1.05); }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 63, 85, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 22px;
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  background: var(--milk);
  border-radius: var(--r-soft);
  padding: 30px 24px 26px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-deep);
  text-align: center;
  animation: modal-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255,255,255,0.6);
}
@keyframes modal-pop {
  0%   { transform: scale(0.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1)    translateY(0);     opacity: 1; }
}

/* ---------- Progress dots ---------- */
.progress {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 50;
  background: rgba(255, 251, 246, 0.65);
  padding: 7px 12px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-card);
}
.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.5;
  transition: all 0.3s ease;
}
.progress-dot.is-done   { background: var(--rose); opacity: 1; }
.progress-dot.is-active { background: var(--rose-deep); opacity: 1; transform: scale(1.5); }

/* ---------- Mobile compaction ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; line-height: 1.3; }
  .stage { padding: 50px 16px 16px; }
  .eyebrow { font-size: 17px; margin-bottom: 4px; }
  .title { font-size: clamp(26px, 7.8vw, 36px) !important; line-height: 1.05; }
  .subtitle { font-size: clamp(15px, 4.2vw, 18px); line-height: 1.2; }
  .body { font-size: 15px; }
  .btn { font-size: 16px; padding: 14px 38px; min-width: 200px; justify-content: center; }
  .progress { top: 10px; padding: 5px 10px; }
  .s2-wrap { gap: 10px !important; }
  .memory-stack { width: min(60vw, 200px) !important; }
  .mem-polaroid { padding: 10px 10px 12px !important; }
  .mem-polaroid .mem-caption { font-size: 16px !important; margin-top: 6px !important; }
  .mem-hint { font-size: 14px !important; margin-top: 6px !important; }
  .s2-text { font-size: 15px !important; line-height: 1.25 !important; }
  .s2-emph { font-size: 16px !important; line-height: 1.2 !important; }
}
@media (max-width: 400px) {
  body { font-size: 15.5px; }
  .stage { padding: 46px 12px 12px; }
  .title { font-size: clamp(22px, 7vw, 30px) !important; }
  .eyebrow { font-size: 15px; }
  .memory-stack { width: min(56vw, 180px) !important; }
  .s2-text { font-size: 14px !important; }
  .s2-emph { font-size: 15px !important; }
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: fixed;
  bottom: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 60;
  color: var(--rose-deep);
  background: rgba(255, 251, 246, 0.92);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(222,157,164,0.25);
  transition: opacity 0.3s ease;
}
.scroll-hint.is-hidden { opacity: 0; }
.scroll-chevron {
  font-size: 28px;
  line-height: 0.6;
  margin-top: -6px;
  animation: scrollHintBounce 1.2s ease-in-out infinite;
}
@keyframes scrollHintBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
