/* Family Hub — two styles from the chosen mockups:
   parents: Option B layout on Option A light colors (mockups/src/optionD-parent.html)
   kids:    Option C playful (mockups/src/optionC-kid.html + c.css) */
@font-face{font-family:Inter;src:url(fonts/Inter.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:Fredoka;src:url(fonts/Fredoka.woff2) format("woff2");font-weight:300 700;font-display:swap}
@font-face{font-family:Nunito;src:url(fonts/Nunito.woff2) format("woff2");font-weight:200 1000;font-display:swap}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
[hidden]{display:none!important}
.app{max-width:520px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 100px);position:relative}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.toast{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom) + 96px);transform:translateX(-50%);background:#241b35;color:#fff;padding:10px 16px;border-radius:14px;font-size:14px;font-weight:600;z-index:60;max-width:90vw;text-align:center;box-shadow:0 6px 20px rgba(0,0,0,.2)}
.toast.err{background:#b4233a}

/* ================= Parent (light) ================= */
body.p{font-family:Inter,system-ui,sans-serif;background:#f7f4fc;color:#241b35}
.p .hd{display:flex;justify-content:space-between;align-items:flex-end;margin:6px 0 12px}
.p .hd small{font-size:12px;color:#8a7ca3;font-weight:500}
.p .hd h1{font-size:27px;font-weight:700;letter-spacing:-.5px;line-height:1.1}
.p .hd h1 em{font-style:normal;color:#7c4dcc}
.p .av{width:38px;height:38px;border-radius:50%;background:#e7dcf7;color:#6b3fb8;display:grid;place-items:center;font-weight:700;font-size:14px;flex:none}
.p .grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.p .t{background:#fff;border-radius:18px;padding:12px 13px;box-shadow:0 1px 3px rgba(60,30,110,.06),0 0 0 1px #efe8f8;display:block;text-align:left;width:100%;min-width:0}
.p .t.w{grid-column:span 2}
.p .lbl{font-size:10.5px;letter-spacing:1px;text-transform:uppercase;color:#6b5a86;font-weight:600;margin-bottom:6px;display:flex;justify-content:space-between;align-items:center}
.p .lbl a,.p .lbl button{letter-spacing:0;text-transform:none;color:#7c4dcc;font-size:12px;text-decoration:none;font-weight:600}
.p .huge{font-size:36px;font-weight:700;line-height:1;letter-spacing:-1px}
.p .huge.sm{font-size:24px;letter-spacing:-.5px}
.p .warn{color:#d5821c}.p .lbl.warn{color:#c27515}
.p .bad{color:#c2410c}
.p .mut{color:#9a8fb0;font-size:11.5px}
.p .ev{display:flex;align-items:center;gap:10px;padding:4px 0;font-size:14px;font-weight:500}
.p .ev .tm{width:66px;font-size:12px;color:#8a7ca3;font-weight:500;flex:none}
.p .ev .d{width:8px;height:8px;border-radius:50%;flex:none}
.p .ev span{display:block;font-size:11px;color:#9a8fb0;font-weight:400}
.p .ap{display:flex;align-items:center;gap:8px;padding:7px 0;border-top:1px solid #f3eefa;font-size:13.5px;font-weight:500}
.p .ap:first-of-type{border-top:0}
.p .ap .m{flex:1;min-width:0}.p .ap .m span{display:block;font-size:11px;color:#9a8fb0;font-weight:400}
.p .chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.p .chip{font-size:11px;font-weight:600;padding:3px 8px;border-radius:9px;background:#f1ebfa;color:#6b5a86;border:1px solid transparent;min-height:26px}
.p .chip.on{background:#7c4dcc;color:#fff}
.p .chip.ok{background:#dcf5e6;color:#166534}.p .chip.no{background:#fde4e4;color:#9f1239}.p .chip.wait{background:#fff1cc;color:#8a5a00}
.p .b{white-space:nowrap;font-size:13px;font-weight:600;padding:0 13px;min-height:36px;border-radius:11px;background:#7c4dcc;color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.p .b.x{background:#f1ebfa;color:#6b5a86}
.p .b.big{min-height:46px;width:100%;font-size:15px;border-radius:14px}
.p .b.ghost{background:transparent;color:#7c4dcc;border:1.5px solid #e2d6f5}
.p .b.danger{background:#fde4e4;color:#9f1239}
.p .b:disabled{opacity:.45}
.p .kid{display:flex;align-items:center;gap:10px}
.p .kid .v{font-size:20px;font-weight:700}
.p .ban{grid-column:span 2;border-radius:18px;padding:12px 15px;background:#7c4dcc;color:#fff;display:flex;justify-content:space-between;align-items:center;text-align:left;width:100%}
.p .ban b{font-size:15px}.p .ban span{display:block;font-size:11.5px;opacity:.85}
.p .ban .dd{font-size:24px;font-weight:800;text-align:right;line-height:1}.p .ban .dd small{display:block;font-size:9.5px;letter-spacing:1.2px;opacity:.85;font-weight:600}
.p .tab{position:fixed;bottom:0;left:0;right:0;padding:9px 0 calc(env(safe-area-inset-bottom) + 8px);background:rgba(255,255,255,.96);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid #eee6f7;display:flex;justify-content:space-around;font-size:10.5px;color:#a194b8;font-weight:500;z-index:20}
.p .tab a{text-align:center;color:inherit;text-decoration:none;min-width:56px;min-height:44px}
.p .tab svg{display:block;width:24px;height:24px;margin:0 auto 3px}
.p .tab .on{color:#7c4dcc}
.p h2{font-size:22px;font-weight:700;letter-spacing:-.4px;margin:8px 0 12px}
.p h3{font-size:15px;font-weight:700;margin:16px 2px 8px}
.p .stack>*+*{margin-top:9px}
.p .row{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid #f3eefa}
.p .row:first-child{border-top:0}
.p .row .e{font-size:22px;width:30px;text-align:center;flex:none}
.p .row .m{flex:1;min-width:0;font-size:14px;font-weight:600}
.p .row .m span{display:block;font-size:12px;color:#8a7ca3;font-weight:400;margin-top:1px}
.p .pill{font-size:11px;font-weight:700;padding:3px 8px;border-radius:9px;white-space:nowrap;flex:none}
.pill.overdue{background:#fde8d7;color:#b45309}.pill.today{background:#fde4e4;color:#b4233a}.pill.soon{background:#fff1cc;color:#8a5a00}
.pill.ok{background:#e4f6ea;color:#166534}.pill.unscheduled{background:#f1ebfa;color:#6b5a86}.pill.inactive{background:#eee;color:#888}
.p .seg{display:flex;background:#ece5f7;border-radius:12px;padding:3px;margin-bottom:12px}
.p .seg button{flex:1;min-height:36px;border-radius:9px;font-size:13px;font-weight:600;color:#6b5a86}
.p .seg button.on{background:#fff;color:#241b35;box-shadow:0 1px 3px rgba(60,30,110,.12)}
.p .filters{display:flex;gap:6px;overflow-x:auto;margin-bottom:10px;padding-bottom:2px}
.p .filters button{white-space:nowrap;font-size:13px;font-weight:600;padding:0 13px;min-height:34px;border-radius:17px;background:#fff;color:#6b5a86;box-shadow:0 0 0 1px #e9e0f6}
.p .filters button.on{background:#7c4dcc;color:#fff;box-shadow:none}
.p .field{display:block;margin-bottom:12px}
.p .field>span{display:block;font-size:12px;font-weight:600;color:#6b5a86;margin-bottom:5px}
.p input,.p select,.p textarea{width:100%;min-height:44px;border-radius:12px;border:1.5px solid #e6ddf4;background:#fff;padding:9px 12px;font-size:16px}
.p textarea{min-height:80px;resize:vertical}
.p input:focus,.p select:focus,.p textarea:focus{outline:none;border-color:#7c4dcc}
.p .days{display:flex;gap:5px}
.p .days button{flex:1;min-height:40px;border-radius:10px;background:#f1ebfa;color:#6b5a86;font-weight:700;font-size:13px}
.p .days button.on{background:#7c4dcc;color:#fff}
.p .two{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.p .note{font-size:12.5px;color:#6b5a86;background:#f5f0fc;border-radius:12px;padding:9px 11px;line-height:1.4}
.p .alert{background:#fff4e6;color:#8a4b00;border-radius:14px;padding:10px 12px;font-size:13px;line-height:1.4}
.p .day-h{font-size:12px;font-weight:700;color:#8a7ca3;text-transform:uppercase;letter-spacing:.8px;margin:12px 2px 2px}
.p .post{padding:10px 0;border-top:1px solid #f3eefa}.p .post:first-child{border-top:0}
.p .post .who{font-size:12px;color:#8a7ca3;font-weight:500;display:flex;gap:6px;align-items:center}
.p .post p{font-size:15px;margin-top:3px;white-space:pre-wrap;word-wrap:break-word}
.p .post .acts{display:flex;gap:6px;margin-top:6px}
.p .post .acts button{font-size:12px;color:#7c4dcc;font-weight:600;min-height:30px}
.p .link{display:flex;align-items:center;gap:12px;padding:12px 2px;border-top:1px solid #f3eefa;font-size:15px;font-weight:600;color:inherit;text-decoration:none;width:100%;text-align:left}
.p .link:first-child{border-top:0}.p .link .e{font-size:20px;width:28px;text-align:center}.p .link::after{content:"›";margin-left:auto;color:#b3a7c8;font-size:20px}
.p .banner-n{background:linear-gradient(135deg,#7c4dcc,#9b6ee0);color:#fff;border-radius:18px;padding:12px 14px;display:flex;gap:12px;align-items:center;margin-bottom:9px}
.p .banner-n b{display:block;font-size:14px}.p .banner-n span{font-size:12px;opacity:.9}
.p .banner-n .b{background:#fff;color:#7c4dcc;margin-left:auto;flex:none}
.p .empty{color:#9a8fb0;font-size:13px;padding:6px 0}

/* sheet (parents + kids) */
.sheet-bg{position:fixed;inset:0;background:rgba(36,27,53,.38);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:520px;max-height:92vh;overflow:auto;background:#fff;border-radius:22px 22px 0 0;padding:16px 16px calc(env(safe-area-inset-bottom) + 18px);animation:up .18s ease-out}
.sheet .grab{width:40px;height:5px;border-radius:3px;background:#e2d9ef;margin:0 auto 12px}
.sheet h2{margin-top:0}
@keyframes up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}

/* ================= Kids (playful) ================= */
body.k{font-family:Nunito,system-ui,sans-serif;background:#fff7e8;color:#3b1d6e;overflow-x:hidden}
body.k:before{content:"";position:fixed;width:260px;height:260px;border-radius:50%;background:#e9d7ff;top:-120px;right:-90px;z-index:-1}
body.k:after{content:"";position:fixed;width:180px;height:180px;border-radius:50%;background:#ffe1ef;bottom:60px;left:-80px;z-index:-1}
.k h1{font-family:Fredoka,sans-serif;font-weight:600;font-size:28px;line-height:1.1}
.k h2{font-family:Fredoka,sans-serif;font-weight:600;font-size:24px;margin:6px 4px 10px}
.k .sub{font-weight:700;color:#8b6bb8;font-size:13px}
.k .blob{border-radius:26px;padding:12px 14px;margin-bottom:12px;border:3px solid #3b1d6e;box-shadow:0 4px 0 #3b1d6e;background:#fff}
.k .ttl{font-family:Fredoka,sans-serif;font-weight:600;font-size:17px;margin:4px 4px 8px;display:flex;justify-content:space-between;align-items:center}
.k .ttl small{font-family:Nunito;font-size:12px;font-weight:800;color:#7c3aed}
.k .hd{display:flex;align-items:center;gap:10px;margin:4px 0 12px}
.k .face{width:52px;height:52px;border-radius:50%;background:#ff9ed2;border:3px solid #3b1d6e;display:grid;place-items:center;font-size:28px;flex:none}
.k .goal{background:#7c3aed;color:#fff}
.k .goal .big{font-family:Fredoka;font-weight:600;font-size:34px;line-height:1}.k .goal .big small{font-size:16px;opacity:.8}
.k .track{position:relative;height:26px;border-radius:14px;background:#fff;border:3px solid #3b1d6e;margin:10px 14px 4px 0}
.k .track i{position:absolute;left:0;top:0;bottom:0;border-radius:10px;background:repeating-linear-gradient(45deg,#ffd23f 0 10px,#ffc107 10px 20px);transition:width .4s}
.k .track .st{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:26px;transition:left .4s}
.k .track .fl{position:absolute;right:-16px;top:50%;transform:translateY(-50%);font-size:22px}
.k .goal .m{display:flex;justify-content:space-between;font-size:12px;font-weight:800;opacity:.95;gap:8px}
.k .c{display:flex;align-items:center;gap:10px;background:#fff;border:3px solid #3b1d6e;border-radius:22px;padding:10px 12px;margin-bottom:10px;box-shadow:0 3px 0 #3b1d6e;font-weight:800;font-size:15px;width:100%;text-align:left}
.k .c .e{flex:none;font-size:24px;width:30px;text-align:center}
.k .c .n{flex:1;min-width:0}.k .c .n span{display:block;font-size:11.5px;color:#8b6bb8;font-weight:700}
.k .c .a{flex:none;font-family:Fredoka;font-weight:600;font-size:15px;background:#fff3c4;border:2px solid #3b1d6e;border-radius:14px;padding:2px 9px}
.k .c .tick{flex:none;width:44px;height:44px;border-radius:50%;border:3px solid #3b1d6e;display:grid;place-items:center;font-size:18px;background:#fff}
.k .c.done{background:#c9f7dc}.k .c.done .tick{background:#22c55e;color:#fff}
.k .c.wait{background:#fff0c2}.k .c.wait .tick{background:#ffd23f}
.k .c.no{background:#ffe1ef}.k .c.no .tick{background:#ff9ed2}
.k .c.locked{opacity:.75}
.k .mini{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.k .mini button{font-size:12.5px;font-weight:800;padding:0 11px;min-height:34px;border-radius:13px;border:2px solid #3b1d6e;background:#fff;white-space:nowrap;color:#3b1d6e}
.k .mini button.y{background:#22c55e;color:#fff}.k .mini button.w{background:#ffd23f}.k .mini button.r{background:#ff9ed2}
.k .pay{background:#ffd23f;display:flex;align-items:center;gap:10px}
.k .pay .e{font-size:34px}.k .pay b{font-family:Fredoka;font-weight:600;font-size:18px}.k .pay span{display:block;font-size:12px;font-weight:700}
.k .mint{background:#c9f7dc}.k .pink{background:#ffe1ef}.k .yellow{background:#fff0c2}
.k .tab{position:fixed;bottom:calc(env(safe-area-inset-bottom) + 10px);left:50%;transform:translateX(-50%);width:calc(100% - 28px);max-width:492px;height:66px;background:#7c3aed;border-radius:33px;display:flex;justify-content:space-around;align-items:center;color:#e9d7ff;font-weight:800;font-size:10.5px;border:3px solid #3b1d6e;box-shadow:0 4px 0 #3b1d6e;z-index:20}
.k .tab a{text-align:center;color:inherit;text-decoration:none;min-width:60px;padding:4px 10px;border-radius:22px}
.k .tab a b{display:block;font-size:20px;line-height:1.1}
.k .tab .on{background:#fff;color:#7c3aed}
.k .btn{font-family:Fredoka;font-weight:600;font-size:17px;min-height:50px;border-radius:20px;border:3px solid #3b1d6e;box-shadow:0 3px 0 #3b1d6e;background:#7c3aed;color:#fff;padding:0 18px;width:100%}
.k .btn.y{background:#ffd23f;color:#3b1d6e}.k .btn.w{background:#fff;color:#3b1d6e}
.k .btn:active,.k .c:active{transform:translateY(2px);box-shadow:0 1px 0 #3b1d6e}
.k input,.k textarea{width:100%;min-height:48px;border-radius:16px;border:3px solid #3b1d6e;background:#fff;padding:10px 12px;font-size:16px;font-weight:700;font-family:Nunito}
.k textarea{min-height:80px}
.k .wk{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:2px dashed #e7d7f7;font-weight:800}
.k .wk:first-child{border-top:0}.k .wk .m{flex:1}.k .wk .m span{display:block;font-size:12px;color:#8b6bb8;font-weight:700}
.k .wk .amt{font-family:Fredoka;font-weight:600;font-size:17px}
.k .post{padding:10px 0;border-top:2px dashed #e7d7f7}.k .post:first-child{border-top:0}
.k .post .who{font-size:12px;font-weight:800;color:#8b6bb8}
.k .post p{font-size:16px;font-weight:700;margin-top:2px;white-space:pre-wrap;word-wrap:break-word}
.k .post button{font-size:12px;font-weight:800;color:#7c3aed;min-height:30px}
.k .empty{font-weight:700;color:#8b6bb8;padding:6px 0}
.k .sheet{background:#fff7e8;border:3px solid #3b1d6e;border-bottom:0}
.k .note{font-size:13px;font-weight:700;line-height:1.4}

/* ================= Sign in ================= */
body.login{font-family:Inter,system-ui,sans-serif;background:#f7f4fc;color:#241b35}
.login .logo{display:flex;flex-direction:column;align-items:center;margin:40px 0 26px}
.login .logo img{width:84px;height:84px;border-radius:22px;box-shadow:0 8px 24px rgba(124,77,204,.3)}
.login .logo h1{font-size:28px;font-weight:700;margin-top:14px;letter-spacing:-.5px}
.login .logo p{color:#8a7ca3;font-size:14px;margin-top:4px}
.login .people{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.login .person{background:#fff;border-radius:20px;padding:18px 10px;box-shadow:0 1px 3px rgba(60,30,110,.06),0 0 0 1px #efe8f8;display:flex;flex-direction:column;align-items:center;gap:8px;font-weight:700;font-size:16px;min-height:120px}
.login .person .av{width:56px;height:56px;border-radius:50%;background:#e7dcf7;color:#6b3fb8;display:grid;place-items:center;font-weight:700;font-size:20px}
.login .person .av.kid{background:#fff0c2;font-size:30px}
.login .dots{display:flex;gap:14px;justify-content:center;margin:20px 0}
.login .dots i{width:16px;height:16px;border-radius:50%;border:2px solid #7c4dcc}
.login .dots i.f{background:#7c4dcc}
.login .pad{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:300px;margin:0 auto}
.login .pad button{height:68px;border-radius:50%;background:#fff;font-size:26px;font-weight:600;box-shadow:0 0 0 1px #e9e0f6;width:68px;justify-self:center}
.login .pad button.txt{font-size:14px;color:#7c4dcc;background:transparent;box-shadow:none}
.login .back{color:#7c4dcc;font-weight:600;font-size:15px;min-height:44px}
.login .who{text-align:center;font-size:20px;font-weight:700;margin-top:8px}
.login .err{color:#b4233a;text-align:center;font-weight:600;min-height:22px;font-size:14px}
.login input{width:100%;min-height:48px;border-radius:12px;border:1.5px solid #e6ddf4;background:#fff;padding:10px 12px;font-size:18px;margin-bottom:10px;letter-spacing:2px}
.login .b{background:#7c4dcc;color:#fff;font-weight:600;min-height:48px;border-radius:14px;width:100%;font-size:16px}
.p .row .m .chips{display:flex;margin-top:5px}
.p .row .m .chip{display:inline-flex;align-items:center;font-size:11px;margin:0}
.p .chart{width:100%;height:auto;display:block}
.p .t.alert{background:#fff4e6;color:#8a4b00;box-shadow:0 0 0 1px #f6dfc0}
.p details summary::-webkit-details-marker{color:#7c4dcc}
.p ol{padding-left:18px;margin:4px 0}
.k .c .tick{cursor:pointer}
