:root {
  --ink: #292545;
  --muted: #6f6a82;
  --cream: #fffaf2;
  --paper: #ffffff;
  --purple: #6751b5;
  --purple-dark: #49348e;
  --lavender: #eee9ff;
  --coral: #ff7f73;
  --coral-soft: #fff0ed;
  --teal: #42a99f;
  --teal-soft: #e8f8f5;
  --gold: #f4bd4a;
  --shadow: 0 14px 35px rgba(69, 55, 115, 0.13);
  --radius-lg: 28px;
  --radius-md: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f6f1ff 0%, #fffaf2 48%, #f7fbfa 100%);
  color: var(--ink);
  font-family: "Nunito", sans-serif;
}

button { font: inherit; }

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255,255,255,.58);
  position: relative;
  padding-bottom: 88px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(103,81,181,.08);
}

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup strong { display: block; font: 700 20px/1 "Baloo 2", sans-serif; }
.brand-lockup small { color: var(--muted); font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--purple); color: white; font: 700 24px/1 "Baloo 2"; box-shadow: 0 8px 18px rgba(103,81,181,.25);
}
.icon-button { border: 0; background: #f4f1fb; color: var(--purple-dark); width: 42px; height: 42px; border-radius: 14px; cursor: pointer; font-size: 22px; }

.screen { padding: 24px 18px 32px; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }

h1, h2, h3 { font-family: "Baloo 2", sans-serif; margin-top: 0; }
h1 { font-size: clamp(34px, 8vw, 44px); line-height: 1.03; margin-bottom: 12px; }
h2 { font-size: 25px; line-height: 1.15; margin-bottom: 8px; }
p { line-height: 1.55; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 12px; color: var(--purple); }
.lead { color: var(--muted); font-size: 17px; }

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #6f58be, #4e3b95);
  color: white;
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.hero-card:after { content:""; position:absolute; width:170px; height:170px; border-radius:50%; background:rgba(255,255,255,.09); right:-50px; bottom:-70px; }
.hero-card .eyebrow { color: #e9e2ff; }
.hero-card p:last-child { margin-bottom: 0; color: #f5f1ff; }
.sparkle { position:absolute; color:#ffd878; font-size:25px; }
.sparkle-one { right:30px; top:24px; }
.sparkle-two { right:68px; top:58px; font-size:14px; }

.feeling-grid { display: grid; gap: 14px; }
.feeling-card {
  border: 0; text-align: left; display: grid; grid-template-columns: 86px 1fr; grid-template-rows: auto auto;
  align-items: center; column-gap: 16px; min-height: 124px; padding: 14px 18px;
  border-radius: 24px; cursor: pointer; box-shadow: 0 8px 22px rgba(50,45,79,.08); transition: .2s ease;
}
.feeling-card:hover { transform: translateY(-2px); }
.feeling-card strong { font: 700 29px/1 "Baloo 2"; align-self:end; }
.feeling-card small { color: var(--muted); font-weight: 700; align-self:start; }
.feeling-card.purple { background: var(--lavender); }
.feeling-card.coral { background: var(--coral-soft); }
.feeling-card.teal { background: var(--teal-soft); }

.character { grid-row: 1 / span 2; width: 78px; height: 78px; border-radius: 38% 38% 42% 42%; position:relative; display:block; }
.character:before, .character:after { content:""; position:absolute; background:inherit; }
.character:before { width:20px; height:32px; border-radius:50%; top:-14px; left:12px; transform:rotate(-12deg); }
.character:after { width:20px; height:32px; border-radius:50%; top:-14px; right:12px; transform:rotate(12deg); }
.character i:before, .character i:after { content:""; position:absolute; width:8px; height:10px; border-radius:50%; background:#332d50; top:30px; }
.character i:before { left:22px; } .character i:after { right:22px; }
.character i { position:absolute; inset:0; }
.character i::marker { display:none; }
.character.bunny { background:#bcaaf9; }
.character.bear { background:#f7a197; }
.character.fox { background:#72c7bd; }
.character span { display:none; }

.primary-button, .soft-button, .choice-button {
  border: 0; border-radius: 18px; padding: 15px 18px; font-weight: 800; cursor: pointer; transition: .2s ease;
}
.primary-button { background: var(--purple); color: white; box-shadow: 0 9px 20px rgba(103,81,181,.25); }
.primary-button:hover { background: var(--purple-dark); }
.soft-button { background: #f0ecf8; color: var(--purple-dark); }
.full { width: 100%; margin-top: 18px; }

.progress-wrap { margin-bottom: 22px; color: var(--muted); font-size:14px; font-weight:700; }
.progress-track { height: 10px; background:#e9e5f1; border-radius:10px; overflow:hidden; margin-top:8px; }
.progress-fill { height:100%; background:linear-gradient(90deg,var(--purple),#947ce0); width:20%; border-radius:10px; transition: width .35s ease; }

.journey-card { background: white; border-radius: var(--radius-lg); padding: 26px 22px; box-shadow: var(--shadow); text-align:center; }
.journey-card .big-character { margin: 6px auto 22px; transform: scale(1.35); }
.journey-card p { color: var(--muted); font-size:17px; }
.choice-list { display:grid; gap:10px; margin-top:20px; }
.choice-button { background:#f7f4fb; color:var(--ink); text-align:left; }
.choice-button:hover, .choice-button.selected { background:var(--lavender); outline:2px solid #c4b6f0; }

.breath-circle { width:170px; height:170px; margin:24px auto; border-radius:50%; background:radial-gradient(circle,#fff 0%,#dcd2ff 68%,#b9a7f5 100%); display:grid; place-items:center; font-weight:800; color:var(--purple-dark); animation:breathe 8s ease-in-out infinite; box-shadow:0 0 0 12px rgba(103,81,181,.08); }
@keyframes breathe { 0%,100%{transform:scale(.78)} 45%{transform:scale(1)} 55%{transform:scale(1)} }

.reveal-wrap { perspective:900px; }
.truth-card { min-height:310px; transform-style:preserve-3d; transition:transform .7s ease; position:relative; cursor:pointer; }
.truth-card.flipped { transform:rotateY(180deg); }
.truth-face { position:absolute; inset:0; backface-visibility:hidden; border-radius:var(--radius-lg); padding:28px 22px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.truth-front { background:#f3efff; }
.truth-back { background:linear-gradient(145deg,#fff6d9,#ffedac); transform:rotateY(180deg); }
.truth-back blockquote { font:700 26px/1.25 "Baloo 2"; margin:12px 0; }
.truth-back cite { font-style:normal; font-weight:800; color:#7d5a0a; }

.action-grid { display:grid; gap:10px; margin-top:18px; }
.action-card { border:2px solid transparent; background:#f8f6fb; border-radius:18px; padding:14px; cursor:pointer; font-weight:800; }
.action-card.selected { border-color:var(--teal); background:var(--teal-soft); }

.reward-badge { width:160px; height:160px; border-radius:30px; margin:10px auto 24px; display:grid; place-items:center; background:linear-gradient(145deg,#ffeaa1,#f4bd4a); box-shadow:0 15px 28px rgba(199,141,26,.25); font-size:60px; transform:rotate(-2deg); }

.blanket-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:24px 0; }
.blanket-square { aspect-ratio:1; border-radius:16px; padding:10px; display:flex; flex-direction:column; justify-content:space-between; font-weight:800; font-size:12px; box-shadow:inset 0 0 0 2px rgba(255,255,255,.65); }
.blanket-square.locked { background:#eeeaf3; color:#aaa3b1; align-items:center; justify-content:center; font-size:24px; }
.blanket-square.weak { background:#ded4ff; }
.blanket-square.angry { background:#ffd3cf; }
.blanket-square.jealous { background:#ccefe9; }
.blanket-square span { font-size:24px; }
.stats-card { display:grid; grid-template-columns:repeat(3,1fr); background:white; border-radius:22px; padding:18px 10px; box-shadow:var(--shadow); text-align:center; }
.stats-card strong { display:block; font:700 28px/1 "Baloo 2"; }
.stats-card span { color:var(--muted); font-size:12px; font-weight:700; }

.parent-hero { background:linear-gradient(145deg,#e8f8f5,#f7fffd); border-radius:var(--radius-lg); padding:24px; margin-bottom:18px; }
.parent-card { display:flex; gap:14px; background:white; padding:18px; border-radius:20px; margin-bottom:12px; box-shadow:0 8px 22px rgba(50,45,79,.07); }
.parent-card h2 { font-size:21px; margin-bottom:4px; }
.parent-card p { color:var(--muted); margin:0; }
.card-icon { width:46px; height:46px; flex:0 0 46px; display:grid; place-items:center; border-radius:14px; background:#f2eef9; font-size:22px; }
.privacy-note { margin-top:20px; padding:18px; border-radius:18px; background:#fff8e8; color:#6e5a2e; }
.privacy-note p { margin-bottom:0; }

.bottom-nav {
  position:fixed; z-index:30; bottom:0; left:50%; transform:translateX(-50%); width:min(100%,520px); height:76px;
  display:grid; grid-template-columns:repeat(3,1fr); background:rgba(255,255,255,.95); backdrop-filter:blur(20px); border-top:1px solid rgba(50,45,79,.08); padding:8px 10px 10px;
}
.nav-item { border:0; background:transparent; color:#8b8498; font-size:11px; font-weight:800; border-radius:16px; cursor:pointer; }
.nav-item span { display:block; font-size:22px; margin-bottom:2px; }
.nav-item.active { background:#f1edfb; color:var(--purple); }

@media (min-width:700px) {
  body { padding:24px 0; }
  .app-shell { min-height:calc(100vh - 48px); border-radius:34px; overflow:hidden; box-shadow:0 25px 70px rgba(64,51,108,.18); }
  .bottom-nav { bottom:24px; border-radius:0 0 34px 34px; }
}
