#familyPage{position:relative;z-index:2;border:0;background:#fafbf7;color:#24483e;padding:0;width:100%;min-height:100dvh;font-family:inherit;outline:none}
#familyPage[hidden],#app[hidden]{display:none!important}
body.family-page{height:auto;min-height:100dvh;overflow-y:auto}
body.family-page #fx{display:none}
#familyPage:not(.parent-home)>.family-shell{max-width:680px;margin:auto;box-sizing:border-box;min-height:100dvh;padding-top:max(28px,env(safe-area-inset-top))}
.family-brand{display:flex;align-items:center;gap:10px;font-size:13px;letter-spacing:1px;font-weight:700}.family-brand img{display:block}
.family-shell{padding:24px 26px max(24px,env(safe-area-inset-bottom));font-size:16px;line-height:1.6}
.family-shell header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.family-shell h1{font-size:28px;line-height:1.3;margin:18px 0 12px}
.family-shell h2{font-size:21px;margin:0}
.family-shell .block{margin:12px 0;min-height:50px}
.family-shell .btn{min-height:46px;white-space:normal}
.family-shell form>label,.family-shell fieldset>label{display:block;margin:14px 0;font-weight:500}
.family-shell input.txt,.family-shell select{display:block;width:100%;margin-top:6px;min-height:48px;font:inherit;box-sizing:border-box}
.family-shell fieldset{border:1px solid #d9e3d9;border-radius:18px;margin:20px 0;padding:14px}
.family-shell legend{font-weight:700;padding:0 8px}
.family-options{display:flex;flex-wrap:wrap;gap:8px}
.family-options label{display:flex;align-items:center;gap:9px;background:white;border:1px solid #d4dfd2;border-radius:14px;min-height:46px;padding:8px 12px}
.family-options label:has(:checked){background:#e0eedb;border-color:#40835f}
.family-options input{width:20px;height:20px;accent-color:#28764d}
.family-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.family-children .card{padding:18px;margin:14px 0}
.family-code{display:block;text-align:center;direction:ltr;unicode-bidi:isolate;font-size:clamp(19px,5vw,29px);font-weight:700;letter-spacing:2px;margin:24px 0;background:#e4efdf;padding:16px;border-radius:14px}
#familyStatus{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.family-shell .muted{font-size:14px;color:#637a71}
#familyHomeAccount{margin-bottom:12px}.personal-plan{padding:18px;margin-bottom:14px}
@media(max-width:480px){.family-shell{padding:18px 16px}.family-shell h1{font-size:25px}.family-actions .btn{flex:1 1 42%}.family-shell fieldset{padding:12px 10px}}
#childSetup [hidden]{display:none!important}.wizard-progress{background:#e7f0df;border-radius:14px;padding:12px;font-weight:500}.wizard-nav{position:sticky;bottom:-18px;padding:12px 0;background:#fafbf7}.wizard-nav button{flex:1}.family-intro{background:#edf3e6;border-radius:18px;padding:16px;margin:18px 0}.family-intro ul{padding-inline-start:22px}.family-intro li{margin:10px 0}
.entry-wizard h1{font-size:clamp(26px,6vw,38px);line-height:1.2}.entry-choices{display:grid;gap:12px;margin:24px 0}.entry-choice{display:grid;grid-template-columns:44px 1fr;gap:5px 12px;text-align:start;align-items:center;background:#fff;border:1px solid #d9e3d5;border-radius:20px;padding:18px;color:var(--ink);cursor:pointer;min-height:96px}.entry-choice svg{grid-row:span 2;color:var(--green)}.entry-choice strong{font-size:21px}.entry-choice span{font-size:14px;color:#637568}.entry-choice:hover,.entry-choice:focus-visible{outline:3px solid #badc84;background:#f4f9ed}
#familyPage.parent-home{width:100%;max-width:none;min-height:100dvh;margin:0;border-radius:0;background:#f2f4ed;box-sizing:border-box}
.parent-home .family-shell{max-width:1240px;margin:auto;padding:24px 32px max(32px,env(safe-area-inset-bottom));box-sizing:border-box}
.parent-home .family-shell>header{display:none}.parent-dashboard{color:#24483e}.pd-nav,.pd-section-head,.pd-child-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.pd-nav>b{display:flex;align-items:center;gap:10px;font-size:20px}.pd-nav .family-actions{margin:0}.pd-hero{display:flex;justify-content:space-between;align-items:center;gap:30px;padding:36px 40px;margin:24px 0;border-radius:28px;color:#fff;background:radial-gradient(ellipse at 10% 100%,#467860 0%,transparent 60%),#173e34;overflow:hidden}.pd-hero h1{font-size:clamp(30px,4vw,48px);margin:10px 0;letter-spacing:-1px}.pd-hero p{max-width:640px;color:#dce8df;margin:12px 0}.pd-hero small{display:block;color:#bfd2c8;overflow-wrap:anywhere}.pd-hero .eyebrow{color:#d9ed9d}.pd-hero-mark{border:1px solid #ffffff35;border-radius:50%;min-width:140px;height:140px;display:grid;place-items:center;color:#d9ed9d}.pd-filters{display:flex;align-items:end;gap:16px;margin:24px 0}.pd-filters label{flex:1;max-width:300px;font-size:14px}.pd-filters .txt{background:white}.pd-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0}.pd-metric{background:white;border:1px solid #e0e6dc;padding:22px;border-radius:20px;display:flex;flex-direction:column;gap:6px}.pd-metric strong{font-size:38px;line-height:1.2;font-variant-numeric:tabular-nums}.pd-metric small{color:#657a6f;font-size:12px}.pd-metric:first-child{background:#e3edcd;border-color:#d3dfb8}.pd-columns,.pd-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.pd-card{border:1px solid #dfe5da;border-radius:24px;padding:24px;background:white;margin-bottom:20px;min-width:0}.pd-section-head{margin-bottom:16px}.pd-section-head>span{font-size:13px;color:#687d70}.pd-chart{height:182px;display:flex;align-items:end;justify-content:space-around;gap:8px;direction:ltr;border-bottom:1px solid #e0e8dc;padding-bottom:8px}.pd-bar{display:flex;align-items:center;flex-direction:column;gap:7px;min-width:0;flex:1}.pd-bar i{display:block;background:#457c63;border-radius:7px 7px 3px 3px;width:65%;max-width:38px}.pd-bar:last-child i{background:#b7d77b}.pd-bar b{font-size:13px}.pd-bar span{font-size:12px;color:#667b70}.pd-insight{border-bottom:1px solid #e5eadd;padding:14px 0}.pd-insight p{margin:5px 0;line-height:1.5}.pd-subject{display:grid;grid-template-columns:70px 1fr 85px;align-items:center;gap:12px;margin:22px 0}.pd-subject progress{width:100%;height:10px;accent-color:#487b62}.pd-subject span{font-size:13px;text-align:end;direction:ltr}.pd-habits{display:flex;gap:24px;margin:20px 0}.pd-habits>div{flex:1}.pd-habits strong{display:block;font-size:30px}.pd-habits span{font-size:13px;color:#667c70}.pd-child-head{justify-content:start}.pd-initial{border-radius:18px;background:#edf1e4;width:54px;height:54px;display:grid;place-items:center;font-size:28px}.pd-child-head small{color:#647b70}.pd-child-stats{display:flex;flex-wrap:wrap;gap:16px;margin:20px 0;padding:12px 0;border-block:1px solid #e5eadf;font-size:14px}.pd-children .family-actions .btn{flex:1 1 40%;font-size:14px}.parent-home .btn{gap:8px}.parent-home #familyStatus{position:sticky;bottom:0;background:#f2f4ed;max-width:100%;margin:0}
@media(max-width:700px){.parent-home .family-shell{padding:18px 16px max(24px,env(safe-area-inset-bottom))}.pd-nav{align-items:start;gap:8px}.pd-nav>b{font-size:17px;margin-top:10px}.pd-nav .family-actions{gap:5px;flex-wrap:nowrap}.pd-nav .btn{font-size:13px;padding:10px}.pd-hero{padding:26px 22px;margin:20px 0}.pd-hero-mark{display:none}.pd-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pd-metric{padding:16px}.pd-metric>span{font-size:14px}.pd-metric strong{font-size:32px}.pd-columns,.pd-children{grid-template-columns:1fr;gap:0}.pd-card{padding:20px}.pd-filters{flex-wrap:wrap;gap:10px}.pd-filters label{max-width:none;min-width:40%}.pd-filters>.btn{width:100%}.pd-section-head{flex-wrap:wrap}.pd-subject{grid-template-columns:60px 1fr 78px;gap:8px}}
#familyPage.parent-home{background:radial-gradient(ellipse at 85% 0,#e7ddff,transparent 40%),#f2f4fb}
.parent-dashboard{color:#28314f}.parent-dashboard .pd-hero{background:radial-gradient(ellipse at 0 100%,#6653bf,transparent 65%),#252347;box-shadow:0 16px 36px #3d326d20}.parent-dashboard .pd-hero p{color:#efebff}.parent-dashboard .pd-hero small{color:#cdc6ec}.parent-dashboard .pd-metric{border:0;box-shadow:0 5px 18px #2f33510a;background:#e4f4f3;color:#116269}.parent-dashboard .pd-metric:first-child{background:#6250cf;color:#fff}.parent-dashboard .pd-metric:nth-child(3){background:#e4ecff;color:#2d50a0}.parent-dashboard .pd-metric:nth-child(4){background:#fff0d7;color:#805013}.parent-dashboard .pd-metric small{color:inherit;opacity:.85}.parent-dashboard .pd-card{border-color:#e2e4f1;box-shadow:0 6px 24px #292b5107}.parent-dashboard .muted{color:#626983;line-height:1.6}.pd-discover{display:grid;grid-template-columns:1.15fr 1fr;gap:20px}.pd-kicker{font-size:12px;font-weight:700;color:#6553b5;letter-spacing:.06em}.pd-donut-wrap{display:flex;align-items:center;gap:22px;margin:24px 0}.pd-donut{width:170px;flex-shrink:0}.pd-ring-number{font-size:23px;font-weight:800;fill:#302657}.pd-ring-label{font-size:8px;fill:#626983}.pd-legend{list-style:none;padding:0;margin:0;flex:1;font-size:14px}.pd-legend li{display:flex;align-items:center;gap:8px;margin:16px 0}.pd-legend b{margin-inline-start:auto}.pd-legend i{width:10px;height:10px;border-radius:50%;background:#6354d8;flex-shrink:0}.pd-legend li:nth-child(2) i{background:#159ca4}.pd-legend li:nth-child(3) i{background:#e5e9f2}.parent-dashboard .pd-next{background:#283957;color:#fff;border-color:#283957}.pd-next .pd-kicker{color:#9de8dc}.pd-next p{line-height:1.7}.pd-action-note{border-inline-start:3px solid #a3ebd9;padding-inline-start:14px;margin:20px 0;color:#f1f5ff}.pd-next .btn{background:#b9efce;color:#173e3a}.pd-positive{font-size:13px;color:#c6d4ec}.pd-spark{display:block;width:100%;height:170px;direction:ltr}.pd-chart-range{display:flex;justify-content:space-between;direction:ltr;font-size:12px;color:#626983;padding:0 7%}.pd-chart-empty{height:170px;display:grid;place-items:center;background:repeating-linear-gradient(0deg,#f5f4fc 0 40px,#e9e7f4 40px 41px);border-radius:14px;text-align:center;padding:12px;box-sizing:border-box;color:#626983}.pd-heat{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;direction:ltr;margin:20px 0}.pd-heat>div{border-radius:10px;background:#f0f1f7;text-align:center;padding:8px 2px;color:#697086}.pd-heat b{display:block;font-size:17px}.pd-heat span{font-size:10px}.pd-heat .has-practice{background:#d4f1e9;color:#166458}.parent-dashboard progress{accent-color:#6553d7}.pd-skill-detail{display:grid;grid-template-columns:1fr 1fr 48px;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid #e7e9f2}.pd-skill-detail small{display:block;color:#626983;margin-top:5px}.pd-skill-detail progress{width:100%;height:12px}.parent-dashboard .pd-initial{background:#eae4ff;color:#604bbb}.parent-dashboard .pd-bar i{background:#6553d7}.parent-dashboard .pd-bar:last-child i{background:#159ca4}
@media(max-width:700px){.pd-discover{grid-template-columns:1fr;gap:0}.pd-donut-wrap{gap:14px}.pd-donut{width:130px}.pd-legend{font-size:12px}.pd-skill-detail{grid-template-columns:1fr 65px 40px;gap:8px}.pd-skill-detail small{font-size:11px}.pd-nav{flex-wrap:wrap}.pd-heat{gap:5px}}
/* One question per page, with a calm reading area and reachable navigation. */
#familyPage.setup-page{background:radial-gradient(ellipse at 0 0,#e3f1e9,transparent 58%),#f8faf6}
#familyPage.setup-page>.family-shell{max-width:820px;display:flex;flex-direction:column;min-height:100dvh;padding-bottom:max(16px,env(safe-area-inset-bottom))}
#childSetup{flex:1;display:flex;flex-direction:column;min-width:0}
.setup-progress{margin:22px 0 12px}.setup-progress .wizard-progress{background:none;padding:0;margin:0 0 10px;font-size:14px;color:#527565}.setup-progress progress{width:100%;height:7px;accent-color:#28725c;display:block;border:0;border-radius:8px;overflow:hidden}.setup-progress progress::-webkit-progress-bar{background:#dee9de}.setup-progress progress::-webkit-progress-value{background:#28725c;border-radius:8px}
.family-shell #childSetup .setup-question{border:0;border-radius:0;margin:0;padding:clamp(24px,6vh,64px) 0 24px;min-width:0;flex:1;width:100%;box-sizing:border-box}
.setup-question legend{float:inline-start;width:100%;padding:0;font-size:clamp(27px,5vw,42px);line-height:1.25;font-weight:700;letter-spacing:-.025em;outline:none}.setup-question legend:focus-visible{outline:2px solid #7ba891;outline-offset:6px}
.setup-hint{clear:both;padding-top:18px;margin:0 0 28px;max-width:560px;color:#62756b;line-height:1.7}
.setup-control{max-width:620px}.setup-control .txt{border:2px solid #d1ded3;background:white;border-radius:18px;min-height:64px;font-size:22px;padding:14px 18px}.setup-control .txt:focus{outline:3px solid #bce1cd;border-color:#2b7c60}
.setup-control .family-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.setup-control .family-options label{padding:16px;min-height:62px;font-size:18px;cursor:pointer;box-sizing:border-box}.setup-control .family-options label:has(:checked){background:#e4f2e9;border:2px solid #368168;padding:15px}.setup-control .family-options input{flex-shrink:0}
#childSetup .wizard-nav{position:sticky;bottom:0;background:#f8faf6eF;backdrop-filter:blur(12px);padding:14px 0 4px;margin-top:auto;flex-wrap:nowrap;gap:12px}#childSetup .wizard-nav .btn{min-height:58px;font-size:19px}#childSetup .wizard-nav #wizardBack{flex:0 0 30%}#childSetup .wizard-nav #wizardBack:disabled{opacity:.4;cursor:default}#setupError:empty{display:none}#setupError{color:#a5363b;font-weight:500;margin:8px 0}
.setup-badge{display:inline-flex;align-items:center;gap:8px;background:#dff0df;color:#286049;padding:8px 13px;border-radius:20px;margin-top:24px;font-weight:600}.setup-plan{padding:16px 20px;border-radius:18px;background:#edf2e8}.setup-next-steps{list-style:none;margin:26px 0;padding:0;display:grid;gap:18px}.setup-next-steps li{display:flex;align-items:flex-start;gap:16px;background:white;border:1px solid #e1e8dc;border-radius:22px;padding:22px}.setup-step-number{flex:0 0 34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#294f43;color:white;font-weight:700}.setup-next-steps h2{display:flex;align-items:center;gap:8px;font-size:19px}.setup-next-steps p{margin:10px 0 0;color:#52675e;line-height:1.7}
@media(max-width:480px){#familyPage.setup-page>.family-shell{padding:16px 20px max(12px,env(safe-area-inset-bottom))}.setup-progress{margin-top:20px}.family-shell #childSetup .setup-question{padding-top:26px}.setup-control .family-options{gap:9px}.setup-control .family-options label{font-size:16px;padding:12px;min-height:58px}.setup-control .family-options label:has(:checked){padding:11px}.setup-next-steps li{padding:18px 14px;gap:12px}}
@media(prefers-reduced-motion:no-preference){.setup-question:not([hidden]) .setup-control{animation:setup-arrive .22s ease-out}@keyframes setup-arrive{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}

/* Keep questionnaire navigation beside Next instead of moving it into the header. */
.setup-account{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;font-size:13px;color:#53665c}.setup-account .btn{font-size:13px;padding:8px 12px}
.setup-guide{display:flex;align-items:center;gap:16px;background:#edf2e8;border:1px solid #dce7d5;border-radius:22px;padding:18px;margin-top:18px}.setup-guide img{flex-shrink:0;object-fit:contain}.setup-guide strong{font-size:18px;color:#164e45}.setup-guide p{font-size:14px;line-height:1.6;margin:6px 0 0;color:#53665c}
#childSetup .wizard-nav #wizardBack{flex:1;min-width:0;font-size:16px}#childSetup .wizard-nav{z-index:2;padding-bottom:max(12px,env(safe-area-inset-bottom))}.setup-control .family-options label{transition:background .2s,border-color .2s,box-shadow .2s}.setup-control .family-options label:has(:checked){box-shadow:0 3px 12px #28725c18}
@media(prefers-reduced-motion:no-preference){.setup-guide img{animation:setup-fox-hello 1.1s ease-in-out 2}.setup-question:not([hidden]){animation:setup-question-in .35s ease-out}.setup-progress progress::-webkit-progress-value{transition:width .35s ease}.setup-control .family-options label:active{transform:scale(.98)}@keyframes setup-fox-hello{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-7px) rotate(-5deg)}}@keyframes setup-question-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}}
@media(max-width:480px){.setup-guide{padding:12px;gap:12px}.setup-guide img{width:58px;height:58px}.setup-guide strong{font-size:16px}.setup-account{margin-top:8px}.family-shell #childSetup .setup-question{padding-top:18px}.setup-hint{margin-bottom:18px}}
