:root {
  --cream: #fff9ee;
  --paper: #fffefb;
  --ink: #27243d;
  --muted: #77738a;
  --line: #eee6db;
  --blue: #5967e8;
  --blue-deep: #444fc1;
  --indigo: #8b68dc;
  --teal: #35b7ae;
  --green: #35b979;
  --green-soft: #e8f9ef;
  --yellow: #ffc64b;
  --orange: #ff9466;
  --red: #ed6d7e;
  --pink: #ef86bd;
  --sky: #6fc7ed;
  --shadow-sm: 0 7px 0 rgba(78, 68, 110, 0.035), 0 8px 22px rgba(78, 68, 110, 0.08);
  --shadow-md: 0 18px 48px rgba(78, 68, 110, 0.15);
  --shadow-phone: 0 28px 90px rgba(28, 34, 65, 0.2), 0 8px 28px rgba(28, 34, 65, 0.12);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Nunito", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--cream); color: var(--ink); font-family: var(--font-body); }
button, input, select { font: inherit; }
button { color: inherit; }

.prototype-shell { min-height: 100vh; }
.brand-panel { min-height: 100vh; padding: 48px clamp(42px, 7vw, 110px); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.brand-panel::after { content: "+"; position: absolute; font: 800 32rem/1 var(--font-display); color: rgba(49, 85, 217, .035); left: 37%; bottom: -10rem; z-index: -1; }
.brand-lockup { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; font: 800 24px/1 var(--font-display); letter-spacing: -1px; }
.brand-plus { color: var(--blue); }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--blue); display: inline-grid; place-items: center; transform: rotate(8deg); box-shadow: 0 8px 20px rgba(49,85,217,.25); position: relative; }
.brand-mark i { width: 17px; height: 4px; border-radius: 9px; background: white; position: absolute; }
.brand-mark i:last-child { transform: rotate(90deg); }
.brand-story { margin: auto 0; max-width: 620px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.8px; font-size: 11px; font-weight: 700; color: var(--blue); display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(32,169,112,.12); }
.brand-story h1 { margin: 24px 0 26px; font: 800 clamp(62px, 7.2vw, 108px)/.94 var(--font-display); letter-spacing: -7px; }
.brand-story h1 span { color: var(--blue); }
.brand-story > p { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); max-width: 560px; }
.brand-proof { margin-top: 44px; display: flex; align-items: center; gap: 18px; }
.brand-proof strong, .brand-proof span { display: block; }
.brand-proof strong { font: 800 20px var(--font-display); color: var(--green); }
.brand-proof span { font-size: 13px; color: var(--muted); margin-top: 3px; }
.proof-orbit { width: 58px; height: 58px; position: relative; display: grid; place-items: center; }
.mini-plus { width: 36px; height: 36px; border-radius: 12px; background: var(--green); color: white; display: grid; place-items: center; font-size: 28px; font-weight: 600; box-shadow: 0 8px 20px rgba(32,169,112,.24); z-index: 2; }
.orbit { position: absolute; inset: 2px; border: 1px solid rgba(32,169,112,.25); border-radius: 50%; }
.orbit-two { inset: -7px; opacity: .5; }
.desktop-hint { font-size: 12px; color: var(--muted); }
.desktop-hint span { font-weight: 700; color: var(--ink); }
.desktop-hint p { margin: 4px 0 0; }

.device-stage { min-height: 100vh; background: #ebe9e5; position: relative; display: flex; align-items: center; justify-content: center; padding: 80px 48px 48px; overflow: hidden; }
.prototype-controls { position: absolute; top: 25px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 5px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.8); backdrop-filter: blur(14px); border-radius: 15px; box-shadow: var(--shadow-sm); }
.mode-switch { display: flex; gap: 2px; padding: 2px; background: rgba(23,32,57,.06); border-radius: 10px; }
.mode-button, .control-button { border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.mode-button.active { background: white; color: var(--blue); box-shadow: 0 2px 8px rgba(23,32,57,.1); }
.control-button:hover, .mode-button:hover { background: rgba(255,255,255,.75); }
.control-button { color: var(--muted); }
.control-button span { color: var(--orange); }
.icon-only { font-size: 17px; padding: 6px 9px; }

.phone { width: 390px; height: min(824px, calc(100vh - 120px)); min-height: 650px; border: 8px solid #252338; border-radius: 48px; background: #252338; box-shadow: var(--shadow-phone); position: relative; z-index: 2; overflow: hidden; }
.phone-speaker { position: absolute; z-index: 20; top: 11px; left: 50%; transform: translateX(-50%); width: 92px; height: 27px; background: #252338; border-radius: 0 0 18px 18px; }
.phone-screen { width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: var(--cream); position: relative; }
.status-bar { position: absolute; inset: 0 0 auto; height: 42px; padding: 11px 23px 0; display: flex; justify-content: space-between; align-items: flex-start; font-size: 11px; font-weight: 700; z-index: 10; color: var(--ink); pointer-events: none; }
.status-bar div { display: flex; align-items: center; gap: 6px; }
.signal { letter-spacing: -2px; font-size: 8px; }
.battery { border: 1px solid currentColor; border-radius: 3px; font-size: 7px; padding: 1px 3px; }
#app { height: 100%; }
.app-view { height: 100%; overflow-y: auto; overflow-x: hidden; padding: 54px 20px 98px; scrollbar-width: none; background: var(--cream); }
.app-view::-webkit-scrollbar { display: none; }
.app-view.no-nav { padding-bottom: 24px; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.greeting { color: var(--muted); font-size: 12px; font-weight: 600; margin: 0 0 2px; }
.topbar h2, .section-heading h2 { margin: 0; font: 900 22px/1.2 var(--font-display); letter-spacing: -.55px; }
.avatar { width: 42px; height: 42px; border-radius: 16px; background: #e2e5ff; color: var(--blue); display: grid; place-items: center; font-weight: 900; border: 3px solid white; box-shadow: var(--shadow-sm); position: relative; transition: transform .2s cubic-bezier(.2,.8,.2,1.3); }
.avatar:hover { transform: rotate(5deg) scale(1.06); }
.avatar.parent { background: #efe3d3; color: #8e5d32; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 13px; background: var(--paper); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 17px; }

.balance-card { border-radius: 30px; background: linear-gradient(145deg, #6472ef 0%, #5360dd 100%); color: white; padding: 22px; position: relative; overflow: hidden; box-shadow: 0 10px 0 #414cb5, 0 22px 38px rgba(89,103,232,.25); animation: cardHello .65s cubic-bezier(.2,.85,.2,1.2) both; }
.balance-card::before { content: "+"; position: absolute; right: -7px; top: -39px; font: 800 170px/1 var(--font-display); color: rgba(255,255,255,.07); }
.balance-card::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; left: -45px; bottom: -78px; background: rgba(129,235,196,.13); }
.plus-pal { position: absolute; z-index: 2; right: 16px; top: 12px; width: 42px; height: 42px; color: var(--ink); animation: palFloat 2.5s ease-in-out infinite; filter: drop-shadow(0 5px 5px rgba(35,40,69,.12)); }
.plus-pal::before, .plus-pal::after { content: ""; position: absolute; border-radius: 8px; background: var(--yellow); box-shadow: inset 0 -4px 0 rgba(226,151,19,.15); }
.plus-pal::before { width: 42px; height: 17px; left: 0; top: 13px; }
.plus-pal::after { width: 17px; height: 42px; left: 13px; top: 0; }
.pal-eyes, .pal-smile { position: absolute; z-index: 2; left: 13px; white-space: nowrap; font-weight: 900; line-height: 1; }
.pal-eyes { top: 13px; letter-spacing: 4px; font-size: 7px; }
.pal-smile { top: 18px; left: 17px; font-size: 10px; }
.card-sparkle { position: absolute; color: #d6ffe9; opacity: .85; animation: twinkle 1.8s ease-in-out infinite; }
.sparkle-one { right: 68px; top: 22px; font-size: 10px; }
.sparkle-two { right: 22px; top: 62px; font-size: 7px; animation-delay: -.8s; }
.balance-label { text-transform: uppercase; letter-spacing: 1.4px; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.72); }
.balance-main { display: flex; align-items: center; gap: 18px; margin: 14px 0 16px; }
.balance-ring { --progress: 62; width: 120px; height: 120px; flex: 0 0 120px; border-radius: 50%; background: conic-gradient(#8af0bf calc(var(--progress) * 1%), rgba(255,255,255,.17) 0); display: grid; place-items: center; position: relative; animation: ringHello .8s .15s cubic-bezier(.2,.9,.2,1.25) both; box-shadow: 0 7px 0 rgba(39,36,61,.12); }
.balance-ring::before { content: ""; width: 98px; height: 98px; background: var(--blue); border-radius: 50%; position: absolute; }
.balance-ring > span { position: relative; display: flex; flex-direction: column; align-items: center; }
.balance-ring strong { font: 800 37px/1 var(--font-display); letter-spacing: -2px; }
.balance-ring small { font-size: 10px; color: rgba(255,255,255,.72); margin-top: 4px; }
.balance-copy strong { font: 700 17px/1.3 var(--font-display); display: block; }
.balance-copy span { font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.68); display: block; margin-top: 7px; }
.earn-link { border: 0; color: var(--ink); background: var(--yellow); border-radius: 15px; width: 100%; text-align: left; padding: 12px 14px; font-weight: 900; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; box-shadow: 0 5px 0 #d89d27; transition: transform .16s ease, box-shadow .16s ease; }
.earn-link:hover { background: rgba(255,255,255,.21); }
.earn-link:hover { background: #ffd36e; transform: translateY(-2px); box-shadow: 0 7px 0 #d89d27; }
.earn-link:active { transform: translateY(3px); box-shadow: 0 2px 0 #d89d27; }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 27px 2px 14px; }
.section-heading h2 { font-size: 18px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 700; font-size: 11px; cursor: pointer; padding: 5px; }
.card-stack { display: grid; gap: 10px; }
.task-card, .surface-card { background: var(--paper); border: 1.5px solid rgba(225,219,205,.75); border-radius: 22px; padding: 14px; box-shadow: var(--shadow-sm); }
.task-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; cursor: pointer; transition: transform .2s cubic-bezier(.2,.8,.2,1.2), box-shadow .2s ease; position: relative; overflow: hidden; }
.task-card::after { content: ""; position: absolute; width: 38px; height: 38px; border-radius: 50%; right: -23px; bottom: -22px; background: currentColor; opacity: .04; transition: transform .25s ease; }
.task-card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 10px 0 rgba(78,68,110,.035), 0 14px 28px rgba(78,68,110,.12); }
.task-card:hover::after { transform: scale(2.2); }
.task-card:active { transform: translateY(2px) scale(.985); }
.task-icon { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 20px; font-weight: 900; background: #e8edff; box-shadow: inset 0 -3px 0 rgba(56,66,151,.08); transition: transform .25s cubic-bezier(.2,.8,.2,1.5); }
.task-card:hover .task-icon { transform: rotate(-7deg) scale(1.1); }
.task-icon.purple { background: #eee9ff; }
.task-icon.teal { background: #def5f2; }
.task-icon.yellow { background: #fff1d6; }
.task-icon.green { background: #e2f4e9; }
.task-icon.red { background: #ffe7e9; }
.task-copy strong { display: block; font: 700 13px var(--font-display); }
.task-copy span { color: var(--muted); font-size: 10px; display: block; margin-top: 3px; }
.task-progress { height: 5px; background: #ece9e2; border-radius: 8px; overflow: hidden; margin-top: 7px; }
.task-progress i { display: block; height: 100%; background: var(--blue); border-radius: 8px; }
.task-reward { color: #208a59; font: 900 13px var(--font-display); padding: 6px 9px; background: var(--green-soft); border-radius: 11px; white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(32,138,89,.08); }
.task-card.locked { opacity: .55; cursor: default; }

.bottom-nav { position: absolute; z-index: 8; inset: auto 10px 9px; height: 72px; padding: 9px 6px; background: rgba(255,254,251,.94); border: 1.5px solid rgba(223,216,202,.8); backdrop-filter: blur(16px); box-shadow: 0 -5px 24px rgba(35,40,69,.07); border-radius: 25px 25px 31px 31px; display: grid; grid-template-columns: repeat(4, 1fr); }
.nav-button { border: 0; background: transparent; color: #9a9daa; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 9px; font-weight: 700; }
.nav-button .nav-icon { font-size: 18px; line-height: 1; }
.nav-button.active { color: var(--blue); background: #eff0ff; }
.nav-button.active .nav-icon { animation: navBoop .42s cubic-bezier(.2,.8,.2,1.45); }

.page-title { margin: 0 0 7px; font: 800 25px/1.12 var(--font-display); letter-spacing: -.9px; }
.page-subtitle { margin: 0 0 21px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.tab-row { display: flex; gap: 7px; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.pill { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 8px 13px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.pill.active { background: var(--ink); color: white; border-color: var(--ink); }
.category-label { color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; font-size: 9px; font-weight: 700; margin: 20px 3px 9px; }

.activity-group h3 { font-size: 9px; letter-spacing: 1.3px; color: var(--muted); margin: 20px 2px 9px; }
.activity-list { background: var(--paper); border-radius: var(--r-md); padding: 2px 14px; box-shadow: var(--shadow-sm); border: 1px solid rgba(225,219,205,.7); }
.activity-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-badge { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #eff1f6; }
.activity-item strong { display: block; font-size: 12px; }
.activity-item small { color: var(--muted); font-size: 9px; }
.credit { color: var(--green); font-weight: 800; font-size: 12px; }
.debit { color: var(--ink); font-weight: 700; font-size: 12px; }

.profile-hero { text-align: center; padding: 10px 0 18px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 28px; background: #d9e1ff; display: grid; place-items: center; color: var(--blue); font: 800 25px var(--font-display); margin: auto; box-shadow: inset 0 0 0 5px white, var(--shadow-sm); }
.profile-hero h1 { font: 800 24px var(--font-display); margin: 12px 0 2px; }
.profile-hero p { color: var(--muted); font-size: 11px; margin: 0; }
.mini-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stat { text-align: center; background: var(--paper); padding: 14px 7px; border-radius: 15px; box-shadow: var(--shadow-sm); }
.mini-stat strong { display: block; font: 800 17px var(--font-display); }
.mini-stat span { color: var(--muted); font-size: 9px; }

.blocked-view { height: 100%; background: #172039; color: white; padding: 66px 25px 26px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.blocked-view::before { content: "+"; position: absolute; font: 800 360px/1 var(--font-display); color: rgba(255,255,255,.025); left: -30px; top: 140px; }
.shield-brand { display: flex; align-items: center; gap: 9px; font: 800 15px var(--font-display); }
.shield-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; background: var(--blue); color: white; font-size: 19px; }
.blocked-content { margin: auto 0; position: relative; }
.blocked-symbol { width: 76px; height: 76px; border-radius: 28px; display: grid; place-items: center; color: var(--yellow); background: rgba(255,255,255,.08); font-size: 34px; margin-bottom: 25px; border: 1px solid rgba(255,255,255,.08); }
.blocked-content h1 { font: 800 32px/1.1 var(--font-display); letter-spacing: -1.5px; margin: 0 0 12px; }
.blocked-content > p { color: rgba(255,255,255,.64); font-size: 13px; line-height: 1.5; margin: 0 0 24px; }
.blocked-challenge { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.blocked-challenge .task-icon { color: var(--ink); }
.blocked-challenge strong { display: block; font-size: 13px; }
.blocked-challenge span { display: block; color: rgba(255,255,255,.6); font-size: 10px; margin-top: 3px; }
.blocked-challenge b { margin-left: auto; color: #85e5bb; font-size: 13px; white-space: nowrap; }
.button-stack { display: grid; gap: 10px; position: relative; }
.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 15px; min-height: 49px; font-weight: 800; font-size: 13px; cursor: pointer; transition: transform .15s ease; }
.primary-button:active, .secondary-button:active { transform: scale(.98); }
.primary-button { background: var(--blue); color: white; box-shadow: 0 10px 20px rgba(49,85,217,.22); }
.primary-button.green { background: var(--green); box-shadow: 0 10px 20px rgba(32,169,112,.22); }
.blocked-view .primary-button { background: white; color: var(--ink); }
.secondary-button { background: transparent; color: var(--blue); border: 1px solid #dadde7; }
.blocked-view .secondary-button { color: white; border-color: rgba(255,255,255,.2); }
.danger-button { color: var(--red); background: #fff0f1; }

.challenge-view { min-height: 100%; padding: 58px 21px 28px; background: var(--cream); }
.challenge-head { display: flex; align-items: center; gap: 13px; }
.back-button { border: 0; width: 37px; height: 37px; border-radius: 13px; background: white; box-shadow: var(--shadow-sm); cursor: pointer; }
.challenge-progress { flex: 1; height: 7px; background: #e5e2da; border-radius: 10px; overflow: hidden; }
.challenge-progress i { display: block; height: 100%; background: var(--green); transition: width .35s ease; }
.challenge-count { font-size: 11px; color: var(--muted); font-weight: 700; }
.question-card { margin-top: 34px; }
.question-kicker { text-transform: uppercase; font-size: 10px; letter-spacing: 1.5px; color: var(--blue); font-weight: 800; }
.question-card h1 { font: 800 38px/1.2 var(--font-display); letter-spacing: -1.8px; margin: 15px 0 8px; }
.question-card > p { color: var(--muted); font-size: 12px; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 27px; }
.answer { min-height: 71px; border-radius: 20px; border: 2px solid #e0dcd2; background: var(--paper); font: 900 18px var(--font-display); cursor: pointer; box-shadow: 0 5px 0 #e4ded4, var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease; }
.answer:hover { border-color: var(--blue); color: var(--blue); }
.answer:hover { transform: translateY(-2px); }
.answer.correct { background: var(--green-soft); border-color: var(--green); color: var(--green); box-shadow: 0 5px 0 #9ad9b8; animation: correctBoop .55s cubic-bezier(.2,.85,.2,1.4); }
.answer.wrong { background: #fff0f1; border-color: var(--red); color: var(--red); box-shadow: 0 5px 0 #edbcc3; animation: tinyShake .35s ease; }
.feedback { min-height: 100px; margin-top: 18px; padding: 15px; border-radius: 20px; background: var(--paper); border: 1.5px solid var(--line); }
.feedback:empty { visibility: hidden; }
.feedback:not(:empty) { animation: feedbackPop .35s cubic-bezier(.2,.8,.2,1.2); }
.feedback strong { display: block; font: 800 14px var(--font-display); }
.feedback p { color: var(--muted); font-size: 11px; line-height: 1.45; margin: 5px 0 12px; }
.feedback.correct-feedback strong { color: var(--green); }
.feedback.wrong-feedback strong { color: var(--red); }
.inline-button { color: var(--blue); border: 0; background: #eef1ff; padding: 8px 12px; border-radius: 10px; font-size: 10px; font-weight: 800; cursor: pointer; }
.progress-reward { display: flex; justify-content: space-between; align-items: center; margin-top: 19px; padding: 13px 15px; background: var(--ink); color: white; border-radius: 16px; }
.progress-reward span { font-size: 10px; color: rgba(255,255,255,.62); }
.progress-reward strong { color: #85e5bb; font: 800 18px var(--font-display); }

.reward-view { min-height: 100%; padding: 74px 24px 30px; display: flex; flex-direction: column; text-align: center; background: #effbf4; position: relative; overflow: hidden; }
.reward-view::before, .reward-view::after { content: "+"; position: absolute; color: rgba(32,169,112,.08); font: 800 120px var(--font-display); animation: float 3s ease-in-out infinite; }
.reward-view::before { left: -15px; top: 70px; transform: rotate(-15deg); }
.reward-view::after { right: -5px; bottom: 100px; animation-delay: -1.4s; }
.reward-burst { margin: auto auto 24px; width: 210px; height: 210px; border-radius: 42% 58% 55% 45% / 47% 44% 56% 53%; background: var(--green); color: white; display: grid; place-items: center; box-shadow: 0 0 0 18px rgba(53,185,121,.09), 0 0 0 36px rgba(53,185,121,.05), 0 22px 50px rgba(53,185,121,.25), inset 0 -10px 0 rgba(24,132,81,.12); animation: rewardPop .7s cubic-bezier(.2,.9,.2,1.2), happyBlob 4s 1s ease-in-out infinite; }
.reward-burst strong { display: block; font: 800 42px/.95 var(--font-display); letter-spacing: -2px; }
.reward-burst span { display: block; font-size: 13px; font-weight: 700; margin-top: 6px; }
.reward-face { font-size: 20px !important; letter-spacing: 3px; margin-bottom: 10px !important; animation: faceBlink 3s ease-in-out infinite; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 37%; color: var(--yellow); font-style: normal; font-weight: 900; animation: confettiBurst 1.15s calc(var(--i) * 25ms) cubic-bezier(.12,.7,.2,1) both, confettiFloat 3s 1.2s ease-in-out infinite; }
.confetti i:nth-child(3n+1) { color: var(--pink); }
.confetti i:nth-child(3n+2) { color: var(--sky); }
.reward-view h1 { font: 800 25px var(--font-display); margin: 0 0 7px; }
.reward-view p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 0 24px; }
.new-balance { color: var(--ink); font-weight: 800; }
@keyframes rewardPop { 0% { transform: scale(.25) rotate(-18deg); opacity: 0; } 70% { transform: scale(1.06) rotate(2deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes float { 50% { transform: translateY(-9px) rotate(7deg); } }
@keyframes cardHello { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ringHello { from { opacity: 0; transform: scale(.65) rotate(-45deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes palFloat { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
@keyframes twinkle { 0%,100% { opacity: .25; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.25) rotate(45deg); } }
@keyframes navBoop { 0% { transform: scale(.7); } 60% { transform: translateY(-3px) scale(1.22) rotate(-6deg); } 100% { transform: scale(1); } }
@keyframes correctBoop { 0% { transform: scale(.9); } 55% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1); } }
@keyframes tinyShake { 25% { transform: translateX(-4px) rotate(-1deg); } 50% { transform: translateX(4px) rotate(1deg); } 75% { transform: translateX(-2px); } }
@keyframes feedbackPop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes happyBlob { 0%,100% { border-radius: 42% 58% 55% 45% / 47% 44% 56% 53%; } 50% { border-radius: 55% 45% 43% 57% / 42% 58% 42% 58%; transform: translateY(-5px) rotate(2deg); } }
@keyframes faceBlink { 0%,45%,55%,100% { transform: scaleY(1); } 50% { transform: scaleY(.15); } }
@keyframes confettiBurst { from { opacity: 0; transform: translate(-50%,-50%) rotate(0) scale(.2); } to { opacity: 1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(240deg) scale(1); } }
@keyframes confettiFloat { 50% { margin-top: -6px; rotate: 12deg; } }

.app-view > * { animation: contentRise .42s cubic-bezier(.2,.8,.2,1) both; }
.app-view > *:nth-child(2) { animation-delay: 45ms; }
.app-view > *:nth-child(3) { animation-delay: 90ms; }
.app-view > *:nth-child(4) { animation-delay: 135ms; }
.app-view > *:nth-child(n+5) { animation-delay: 170ms; }
.card-stack .task-card { animation: taskIn .45s cubic-bezier(.2,.8,.2,1.15) both; }
.card-stack .task-card:nth-child(2) { animation-delay: 70ms; }
.card-stack .task-card:nth-child(3) { animation-delay: 140ms; }
.card-stack .task-card:nth-child(4) { animation-delay: 210ms; }
.card-stack .task-card:nth-child(n+5) { animation-delay: 260ms; }
@keyframes contentRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes taskIn { from { opacity: 0; transform: translateX(14px) scale(.98); } to { opacity: 1; transform: translateX(0) scale(1); } }

.pending-banner { display: flex; gap: 12px; align-items: center; padding: 14px; background: #fff5de; border: 1px solid #f7dfac; border-radius: 16px; margin-bottom: 14px; }
.pending-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(247,187,61,.15); }
.pending-banner strong { display: block; font-size: 12px; }
.pending-banner span { color: var(--muted); font-size: 10px; }

.parent-balance { padding: 20px; background: var(--ink); color: white; border-radius: var(--r-lg); position: relative; overflow: hidden; }
.parent-balance::after { content: "+"; position: absolute; right: -14px; top: -45px; color: rgba(255,255,255,.05); font: 800 180px var(--font-display); }
.parent-balance-top { display: flex; justify-content: space-between; }
.parent-balance .avatar { border: 0; }
.parent-balance h2 { font: 800 21px var(--font-display); margin: 1px 0; }
.parent-balance .remaining { font: 800 34px var(--font-display); letter-spacing: -1.7px; margin: 20px 0 2px; }
.parent-balance .remaining span { font: 500 12px var(--font-body); color: rgba(255,255,255,.6); letter-spacing: 0; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.metric { background: rgba(255,255,255,.08); padding: 11px; border-radius: 13px; }
.metric strong { display: block; font: 800 15px var(--font-display); }
.metric span { font-size: 9px; color: rgba(255,255,255,.55); }
.approval-card { background: #eff8f4; border: 1px solid #cfe9dc; padding: 15px; border-radius: var(--r-md); }
.approval-card-top { display: flex; justify-content: space-between; align-items: start; }
.approval-card .eyebrow { font-size: 8px; letter-spacing: 1.2px; color: var(--green); }
.approval-card h3 { font: 800 17px var(--font-display); margin: 7px 0 2px; }
.approval-card p { color: var(--muted); font-size: 10px; margin: 0; }
.approval-reward { color: var(--green); font: 800 16px var(--font-display); }
.approval-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; margin-top: 14px; }
.approval-actions button { min-height: 38px; border-radius: 11px; font-size: 10px; }
.chart-card { background: var(--paper); border-radius: var(--r-md); padding: 15px; box-shadow: var(--shadow-sm); }
.chart-head { display: flex; justify-content: space-between; align-items: start; }
.chart-head strong { font: 800 13px var(--font-display); }
.chart-head span { color: var(--green); font-size: 10px; font-weight: 700; }
.bar-chart { height: 92px; margin-top: 14px; display: flex; align-items: end; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; text-align: center; }
.bar-col i { display: block; margin: auto; width: 16px; height: var(--h); border-radius: 6px 6px 2px 2px; background: #cbd4f8; }
.bar-col.today i { background: var(--blue); }
.bar-col span { display: block; color: var(--muted); font-size: 8px; margin: 6px 0 -16px; }
.learning-list { display: grid; gap: 8px; }
.learning-row { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 10px; }
.learning-row .task-icon { width: 35px; height: 35px; border-radius: 11px; font-size: 15px; }
.learning-row strong { display: block; font-size: 11px; }
.learning-row span { display: block; color: var(--muted); font-size: 9px; }
.learning-row b { color: var(--blue); font-size: 10px; }

.kid-switcher { display: flex; gap: 9px; margin: 0 0 18px; }
.kid-chip { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); padding: 6px 10px 6px 6px; border-radius: 99px; background: var(--paper); font-size: 10px; font-weight: 700; }
.kid-chip.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(49,85,217,.08); }
.kid-chip .avatar { width: 25px; height: 25px; border-radius: 9px; font-size: 9px; border: 0; }
.report-hero { padding: 20px; border-radius: var(--r-lg); background: var(--blue); color: white; overflow: hidden; position: relative; }
.report-hero::after { content: "+"; position: absolute; right: -17px; bottom: -80px; font: 800 220px var(--font-display); color: rgba(255,255,255,.06); }
.report-hero .eyebrow { color: #aef0cf; }
.report-hero h1 { font: 800 27px var(--font-display); margin: 11px 0 21px; }
.report-hero strong { font: 800 35px var(--font-display); display: block; }
.report-hero p { color: rgba(255,255,255,.65); margin: 2px 0 0; font-size: 11px; }
.earned-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.earned-item { background: var(--paper); padding: 13px; border-radius: 15px; box-shadow: var(--shadow-sm); }
.earned-item span { font-size: 18px; }
.earned-item strong { display: block; font-size: 12px; margin-top: 5px; }
.earned-item small { color: var(--muted); font-size: 9px; }
.accuracy-card { background: var(--paper); padding: 16px; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.accuracy-score { display: flex; justify-content: space-between; align-items: baseline; }
.accuracy-score strong { font: 800 24px var(--font-display); }
.accuracy-score span { color: var(--green); font-size: 11px; font-weight: 800; }
.accuracy-track { height: 8px; background: #eeeae1; border-radius: 10px; overflow: hidden; margin-top: 12px; }
.accuracy-track i { display: block; width: 84%; height: 100%; background: var(--green); border-radius: 10px; }
.usage-list { display: grid; gap: 11px; }
.usage-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 9px; align-items: center; font-size: 10px; }
.usage-bar { height: 6px; background: #eeeae1; border-radius: 8px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--indigo); border-radius: 8px; }

.settings-group { background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: 4px 15px; margin-bottom: 13px; }
.setting-row { min-height: 53px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 12px; }
.setting-row:last-child { border-bottom: 0; }
.setting-copy strong { display: block; font-size: 11px; }
.setting-copy span { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.setting-value { font-size: 11px; font-weight: 700; color: var(--blue); text-align: right; }
.toggle { width: 39px; height: 23px; border: 0; border-radius: 20px; background: #d9dbe2; padding: 3px; cursor: pointer; transition: .2s; }
.toggle::after { content: ""; display: block; width: 17px; height: 17px; background: white; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: .2s; }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(16px); }
.number-input { width: 52px; border: 1px solid var(--line); border-radius: 10px; padding: 7px; text-align: center; font-weight: 700; color: var(--blue); background: white; }
.formula-card { padding: 16px; border-radius: var(--r-md); background: #eef1ff; text-align: center; margin: 10px 0 14px; }
.formula-card strong { font: 800 16px var(--font-display); color: var(--blue); }
.formula-card span { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.topic-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.topic-tag { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; font-size: 9px; font-weight: 700; background: white; }
.topic-tag.active { background: var(--green-soft); color: var(--green); border-color: #c5e6d4; }
.experimental { opacity: .75; }

.household-card { background: var(--paper); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.household-card .avatar { width: 39px; height: 39px; border-radius: 13px; border: 0; }
.household-card strong { display: block; font-size: 12px; }
.household-card span { color: var(--muted); font-size: 9px; }
.household-card b { margin-left: auto; color: var(--muted); font-size: 9px; }

.empty-state { text-align: center; padding: 25px 15px; color: var(--muted); font-size: 11px; }
.empty-icon { font-size: 30px; margin-bottom: 8px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; transform: translate(-50%, 25px); background: var(--ink); color: white; border-radius: 13px; padding: 11px 16px; font-size: 11px; font-weight: 700; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  body { background: var(--cream); }
  .prototype-controls, .phone-speaker { display: none; }
  .prototype-shell { display: block; min-height: 100svh; }
  .device-stage { min-height: 100svh; padding: 0; display: block; background: var(--cream); }
  .device-stage::before, .device-stage::after { display: none; }
  .phone { width: 100%; height: 100svh; min-height: 620px; border: 0; border-radius: 0; box-shadow: none; }
  .phone-screen { border-radius: 0; }
  .bottom-nav { position: fixed; left: 10px; right: 10px; max-width: 570px; margin: auto; }
  .app-view { max-width: 590px; margin: auto; }
}

@media (max-height: 750px) and (min-width: 901px) {
  .phone { height: calc(100vh - 100px); min-height: 600px; }
  .device-stage { padding-top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
