/* ============ tinybabywfh ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* the hidden attribute must always win, even over display:flex rules below */
[hidden] { display: none !important; }

:root {
  --ink: #2d2440;
  --ink-soft: #5d5375;
  --paper: #fff8f0;
  --pink: #ff6fa5;
  --purple: #8b5cf6;
  --teal: #2dd4bf;
  --yellow: #fbbf24;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(45, 36, 64, 0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

/* ============ NAV ============ */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 6vw;
}
.nav-logo { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.5px; }
.nav-links a {
  margin-left: 22px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
}
.nav-links a:hover { color: var(--pink); }

/* ============ HERO ============ */
.hero {
  text-align: center;
  padding: 56px 6vw 70px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 111, 165, 0.15), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(45, 212, 191, 0.12), transparent 45%);
}
.hero-badge {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--yellow);
  border-radius: 999px;
  padding: 6px 18px;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 22px;
}
.rainbow {
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--teal), var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.btn-big {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: inherit;
  padding: 18px 42px;
  border: none;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-big:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 36px rgba(139, 92, 246, 0.5); }
.btn-big:active { transform: scale(0.97); }
.hero-note { margin-top: 16px; color: var(--ink-soft); font-size: 0.95rem; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 5vw, 64px);
  margin-top: 52px;
  flex-wrap: wrap;
}
.stat-num { font-size: 2rem; font-weight: 900; color: var(--purple); }
.stat-label { color: var(--ink-soft); font-size: 0.9rem; max-width: 160px; }

/* ============ SECTIONS ============ */
.section { padding: 72px 6vw; text-align: center; }
.section-alt { background: #f5efff; }
.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 40px;
  line-height: 1.25;
}
.section-sub { color: var(--ink-soft); max-width: 560px; margin: 0 auto 28px; line-height: 1.6; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-4px); }
.card-emoji { font-size: 2.2rem; margin-bottom: 12px; }
.card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
  max-width: 900px;
  margin: 0 auto;
}
.step { padding: 10px; }
.step-num {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: #fff;
  font-weight: 900;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); line-height: 1.55; }

.parent-methods {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.method {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  max-width: 260px;
}
.method-emoji { font-size: 2rem; margin-bottom: 10px; }
.method-or { font-weight: 800; color: var(--ink-soft); }
.method code {
  background: #f5efff;
  padding: 2px 10px;
  border-radius: 8px;
  color: var(--purple);
  font-weight: 700;
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 44px 6vw 56px;
  background: var(--ink);
  color: #cfc7e2;
}
.footer-logo { font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: 12px; }
.footer p { line-height: 1.7; }
.footer-fine { font-size: 0.8rem; opacity: 0.6; margin-top: 10px; }

/* ============ STAGE ============ */
#stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background: linear-gradient(160deg, #fdf3e7, #ffe7f0 55%, #e8e0ff);
  transition: background 0.6s ease;
}
#stage.theme-space  { background: linear-gradient(160deg, #0d1033, #23155c 55%, #3a1a6e); }
#stage.theme-ocean  { background: linear-gradient(160deg, #073b5c, #0a5e83 55%, #14a3a8); }
#stage.theme-garden { background: linear-gradient(160deg, #d8f5d0, #fdf6c9 55%, #ffe0ef); }

#hotspot {
  position: absolute;
  top: 0; left: 0;
  width: 130px; height: 130px;
  z-index: 130;
}
#holdRing {
  position: absolute;
  top: 26px; left: 26px;
  width: 78px; height: 78px;
  border-radius: 50%;
  z-index: 129;
  background: conic-gradient(var(--purple) 0deg, rgba(255,255,255,0.25) 0deg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
#counterBadge {
  position: absolute;
  bottom: 18px; right: 20px;
  z-index: 120;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 800;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
}
#stage.theme-space #counterBadge,
#stage.theme-ocean #counterBadge { background: rgba(255,255,255,0.85); }

/* --- pop glyphs --- */
.glyph {
  position: absolute;
  z-index: 110;
  font-weight: 900;
  pointer-events: none;
  will-change: transform, opacity;
  animation: pop 1.3s cubic-bezier(0.18, 1.4, 0.4, 1) forwards;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
@keyframes pop {
  0%   { transform: scale(0) rotate(var(--rot)); opacity: 0; }
  18%  { transform: scale(1.25) rotate(var(--rot)); opacity: 1; }
  30%  { transform: scale(1) rotate(var(--rot)); opacity: 1; }
  75%  { transform: scale(1) rotate(var(--rot)) translateY(-14px); opacity: 1; }
  100% { transform: scale(0.85) rotate(var(--rot)) translateY(-46px); opacity: 0; }
}
#stage.calm .glyph { animation: fadepop 1.4s ease forwards; }
@keyframes fadepop {
  0% { opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; }
}

/* --- floaters (idle drift) --- */
.floater {
  position: absolute;
  z-index: 105;
  pointer-events: none;
  animation: floatUp linear forwards;
  opacity: 0.75;
}
@keyframes floatUp {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-115vh) rotate(35deg); }
}

/* --- sparkles --- */
.sparkle {
  position: absolute;
  z-index: 108;
  pointer-events: none;
  font-size: 14px;
  animation: sparkleFade 0.7s ease-out forwards;
}
@keyframes sparkleFade {
  from { opacity: 0.9; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.3) translateY(10px); }
}

/* --- confetti --- */
.confetti {
  position: absolute;
  z-index: 112;
  width: 10px; height: 14px;
  border-radius: 3px;
  pointer-events: none;
  animation: confettiFall 1.1s ease-in forwards;
}
@keyframes confettiFall {
  from { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)) rotate(var(--spin)); opacity: 0; }
}

/* ============ OVERLAYS ============ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 22, 50, 0.55);
  backdrop-filter: blur(5px);
  padding: 20px;
}
.panel-card {
  background: #fff;
  border-radius: 26px;
  padding: 34px 34px 28px;
  width: min(480px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.panel-card h2 { margin-bottom: 20px; text-align: center; }
.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #f0ebf7;
  font-weight: 600;
}
.panel-row select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 7px 10px;
  border-radius: 10px;
  border: 2px solid #e4dcf5;
  background: #faf7ff;
  font-weight: 600;
  color: var(--ink);
}
.panel-row input[type="checkbox"] {
  width: 22px; height: 22px;
  accent-color: var(--purple);
  cursor: pointer;
}
.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.btn-mid {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 18px;
  border-radius: 14px;
  border: 2px solid #e4dcf5;
  background: #faf7ff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.btn-mid:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; border: none; }
.btn-danger { background: #fff1f1; border-color: #ffd2d2; color: #c0392b; }
.panel-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.panel-hint code {
  background: #f5efff;
  border: 1px solid #e4dcf5;
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 700;
  color: var(--purple);
}

/* ============ REPORT ============ */
.report-card { text-align: center; }
.report-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 20px;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.report-item {
  background: #faf7ff;
  border-radius: 16px;
  padding: 16px 8px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.report-num { font-size: 1.6rem; font-weight: 900; color: var(--ink); }
.report-line { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 10px; }
.report-verdict { font-weight: 800; font-size: 1.1rem; }

@media (max-width: 560px) {
  .nav-links { display: none; }
  .hero { padding-top: 30px; }
}
