@font-face{font-family:"Atkinson";src:url(fonts/AtkinsonHyperlegible-Regular.ttf) format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Atkinson";src:url(fonts/AtkinsonHyperlegible-Bold.ttf) format("truetype");font-weight:700;font-display:swap}
:root{
  --navy:#1E2A38;--navy2:#24364A;--teal:#0F7C80;--teal2:#14A3A0;--tealbg:#E4F3F2;
  --copper:#B4632F;--copperbg:#FBF0E7;--cream:#FAF7F2;--card:#FFFFFF;--line:#DCD6CC;
  --text:#1E2A38;--muted:#4A5868;
  --green:#1E7A3C;--greenbg:#E5F4E9;--yellow:#8A5A00;--yellowbg:#FFF4D6;--red:#B3261E;--redbg:#FDE8E6;
  --fs:22px;--r:18px;
}
html.ts-large{--fs:25px} html.ts-xl{--fs:29px}
*{box-sizing:border-box;margin:0;padding:0}
html{font-size:var(--fs);-webkit-text-size-adjust:100%}
body{font-family:"Atkinson",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--cream);color:var(--text);line-height:1.4;min-height:100vh}
#app{max-width:560px;margin:0 auto;min-height:100vh;background:var(--cream);position:relative}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;-webkit-tap-highlight-color:transparent}
:focus-visible{outline:4px solid var(--copper);outline-offset:3px}
[hidden]{display:none!important}

/* Home */
.brandbar{display:flex;align-items:center;justify-content:space-between;padding:18px 18px 10px;background:var(--navy);color:#fff}
.brand{display:flex;align-items:center;gap:12px}
.logo{width:52px;height:52px;border-radius:14px}
.brand .name{font-size:1.45rem;font-weight:700;letter-spacing:.01em;line-height:1.05}
.brand .sub{font-size:0.92rem;color:#BFE7E5}
.iconbtn{width:56px;height:56px;border-radius:50%;border:2px solid rgba(255,255,255,.35);background:transparent;display:grid;place-items:center}
.iconbtn svg{width:30px;height:30px;fill:#fff}
.hero{background:linear-gradient(180deg,var(--navy) 0%,var(--navy2) 100%);color:#fff;padding:6px 20px 26px;border-radius:0 0 28px 28px;position:relative}
.hero::after{content:"";position:absolute;left:20px;right:20px;bottom:0;height:4px;border-radius:2px;background:linear-gradient(90deg,var(--teal2) 0 55%,#E39A6C 55% 100%)}
.greet{font-size:1.6rem;font-weight:700;line-height:1.15}
.today{color:#D3DCE6;margin-top:2px}
.badge{display:inline-block;margin-top:14px;background:rgba(20,163,160,.22);border:2px solid var(--teal2);color:#fff;border-radius:999px;padding:6px 14px;font-size:0.92rem;font-weight:700}
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:20px 16px 8px}
.tile{background:var(--card);border:2px solid var(--line);border-radius:22px;padding:18px 12px 16px;min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;box-shadow:0 3px 0 rgba(30,42,56,.08)}
.tile:active{transform:translateY(2px);box-shadow:none}
.ti{width:68px;height:68px;border-radius:50%;display:grid;place-items:center}
.ti svg{width:38px;height:38px;fill:#fff}
.tl{font-weight:700;font-size:1.02rem;line-height:1.15}
.ts{font-size:0.92rem;color:var(--muted)}
.t-check .ti{background:var(--teal)} .t-check{border-color:#9FD3D1;background:#F2FAF9}
.t-rem .ti{background:var(--navy)}
.t-fam .ti{background:var(--copper)} .t-fam{border-color:#E8C3A6;background:#FFF8F2}
.t-tips .ti{background:#3D6E8F}
.linkbtn{display:block;margin:10px auto 26px;background:none;border:none;color:var(--teal);font-weight:700;text-decoration:underline;padding:12px 16px;min-height:52px}

/* Screens */
.topbar{position:sticky;top:0;z-index:5;background:var(--navy);color:#fff;padding:12px 14px 14px;display:flex;flex-direction:column;gap:6px}
.topbar h1{font-size:1.35rem;line-height:1.15;padding-left:4px}
.back{align-self:flex-start;background:rgba(255,255,255,.12);border:2px solid rgba(255,255,255,.35);color:#fff;border-radius:999px;padding:6px 18px 6px 12px;font-weight:700;min-height:48px}
.pad{padding:18px 16px 40px}
.lbl{display:block;font-weight:700;margin:6px 0 8px}
textarea,input:not([type=checkbox]){width:100%;border:2px solid #9AA6B2;border-radius:14px;background:#fff;padding:14px;font-size:1rem;min-height:56px}
textarea{resize:vertical;line-height:1.35}
textarea:focus,input:focus{border-color:var(--teal);outline:3px solid rgba(15,124,128,.25)}
.row2{display:flex;gap:10px;margin-top:12px;align-items:stretch}
.row2 .big{flex:1}
.btn{border:2px solid transparent;border-radius:16px;padding:12px 18px;font-weight:700;min-height:56px;font-size:1rem;background:#fff}
.btn.big{min-height:64px;font-size:1.05rem;width:100%}
.btn.primary{background:var(--teal);color:#fff}
.btn.copper{background:var(--copper);color:#fff}
.btn.ghost{background:#fff;border-color:var(--navy);color:var(--navy)}
.btn.danger{background:#fff;border-color:var(--red);color:var(--red)}
.btn:active{filter:brightness(.92)}
h2.small{font-size:1rem;margin:22px 0 10px;color:var(--navy)}
.examples{display:grid;grid-template-columns:1fr;gap:10px}
.btn.ex{text-align:left;background:#fff;border-color:var(--line);font-weight:700;font-size:.95rem}
.fine{font-size:0.92rem;color:var(--muted);margin-top:14px}
.lead{font-size:1.02rem;margin-bottom:14px}
.empty{color:var(--muted);margin:6px 0 10px}
.card{background:#fff;border:2px solid var(--line);border-radius:var(--r);padding:16px;margin-top:16px}

/* Result */
.result{margin-top:18px;border-radius:22px;padding:16px;border:3px solid}
.result.green{background:var(--greenbg);border-color:var(--green)}
.result.yellow{background:var(--yellowbg);border-color:#C98A00}
.result.red{background:var(--redbg);border-color:var(--red)}
.verdict{display:flex;align-items:center;gap:12px;font-size:1.45rem;font-weight:700;line-height:1.15}
.green .verdict{color:var(--green)} .yellow .verdict{color:var(--yellow)} .red .verdict{color:var(--red)}
.vicon{font-size:2.1rem;line-height:1}
.result h2.small{margin-top:12px}
.reasons{list-style:none;display:grid;gap:8px}
.reasons li{background:rgba(255,255,255,.75);border-radius:12px;padding:10px 12px 10px 40px;position:relative;font-size:.95rem}
.reasons li::before{content:"!";position:absolute;left:10px;top:10px;width:22px;height:22px;border-radius:50%;background:currentColor;color:#fff;font-weight:700;font-size:0.92rem;display:grid;place-items:center}
.red .reasons li::before{background:var(--red);content:"!"} .yellow .reasons li::before{background:#C98A00}
.green .reasons li::before{background:var(--green);content:"✓"}
.reasons li::before{color:#fff}
.next{margin:14px 0;background:var(--navy);color:#fff;border-radius:14px;padding:14px;font-weight:700;font-size:1.02rem}
.next small{display:block;font-weight:400;color:#D3DCE6;font-size:0.92rem;margin-top:4px}

/* Reminders */
.remlist{list-style:none;display:grid;gap:12px}
.rem{display:flex;align-items:center;gap:14px;background:#fff;border:2px solid var(--line);border-radius:18px;padding:12px}
.rem.done{background:var(--greenbg);border-color:#9CCFAB}
.rem.done .rname{text-decoration:line-through;text-decoration-thickness:2px;color:var(--muted)}
.tick{flex:0 0 auto;width:66px;height:66px;border-radius:50%;border:4px solid var(--teal);background:#fff;display:grid;place-items:center}
.tick svg{width:38px;height:38px;fill:none;stroke:transparent;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.rem.done .tick{background:var(--green);border-color:var(--green)}
.rem.done .tick svg{stroke:#fff}
.rinfo{flex:1;min-width:0}
.rname{font-weight:700;font-size:1.05rem;overflow-wrap:anywhere}
.rmeta{color:var(--muted);font-size:0.92rem}
.rdel{background:none;border:none;color:var(--muted);font-size:0.92rem;text-decoration:underline;min-height:48px;padding:0 6px}
.addcard{padding:0;border:none;background:none}
.addcard summary{list-style:none;display:flex;align-items:center;justify-content:center}
.addcard summary::-webkit-details-marker{display:none}
.addcard[open] summary{border-radius:16px 16px 0 0}
.form{background:#fff;border:2px solid var(--line);border-top:none;border-radius:0 0 18px 18px;padding:12px 16px 18px;display:grid;gap:4px}
.form .btn{margin-top:12px}
.seg{display:flex;gap:8px;flex-wrap:wrap}
.segb{flex:1;min-height:56px;border-radius:14px;border:2px solid var(--line);background:#fff;font-weight:700;padding:8px}
.segb.on{border-color:var(--teal);background:var(--tealbg);color:var(--teal)}
.check{display:flex;align-items:center;gap:12px;font-weight:700;margin:12px 0 0;min-height:48px}
.check input{width:30px;height:30px;accent-color:var(--teal)}
.notif p:first-child{font-weight:700;margin-bottom:10px}

/* Family */
.fam{display:flex;flex-direction:column;gap:12px;background:#fff;border:2px solid var(--line);border-radius:20px;padding:14px;margin-bottom:12px}
.avatar{flex:0 0 auto;width:56px;height:56px;border-radius:50%;background:var(--copperbg);color:var(--copper);display:grid;place-items:center;font-weight:700;font-size:1.3rem;border:2px solid #E8C3A6}
.finfo{flex:1;min-width:0}
.fname{font-weight:700;font-size:1.05rem;overflow-wrap:anywhere}
.fphone{color:var(--muted);font-size:0.92rem}
.fedit{background:none;border:none;color:var(--teal);text-decoration:underline;font-size:0.92rem;padding:4px 0;min-height:40px}
.callbtn{flex:0 0 auto;display:flex;align-items:center;gap:8px;background:var(--green);color:#fff;text-decoration:none;font-weight:700;border-radius:16px;padding:0 18px;min-height:64px;font-size:1.05rem}
.callbtn svg{width:26px;height:26px;fill:#fff}

/* Tips */
.tips{list-style:none;counter-reset:t;display:grid;gap:12px}
.tips li{counter-increment:t;background:#fff;border:2px solid var(--line);border-left:8px solid var(--teal);border-radius:16px;padding:14px 14px 14px 16px}
.tips li:nth-child(even){border-left-color:var(--copper)}
.tips b{display:block;font-size:1.05rem;margin-bottom:2px}
.tips span{font-size:.92rem;color:#2D3B4A}

/* Settings */
.privacy{background:var(--tealbg);border-color:#9FD3D1}
.pbig{font-weight:700;font-size:1.1rem;margin-bottom:8px;color:var(--navy)}
#textSize .segb{display:flex;flex-direction:column;align-items:center;line-height:1.1;padding:8px 4px}#textSize small{font-size:.92rem;font-weight:400;margin-top:4px}.tsn{font-size:22px}.tsl{font-size:28px}.tsxl{font-size:34px}
.about{margin-top:26px;color:var(--muted);font-size:0.92rem;text-align:center}

/* Modal + toast */
.modal{position:fixed;inset:0;background:rgba(15,22,30,.55);display:flex;align-items:flex-end;justify-content:center;z-index:50}
.sheet{background:#fff;width:100%;max-width:560px;border-radius:24px 24px 0 0;padding:22px 18px 28px;max-height:90vh;overflow:auto}
.sheet h2{font-size:1.2rem;margin-bottom:10px}
.preview{background:var(--cream);border:2px dashed var(--line);border-radius:14px;padding:12px;font-size:0.92rem;white-space:pre-wrap;margin-bottom:6px}
.mactions{display:grid;gap:10px;margin-top:14px}
.mactions a.btn{display:flex;align-items:center;justify-content:center;text-decoration:none}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--navy);color:#fff;padding:14px 22px;border-radius:999px;font-weight:700;z-index:60;max-width:90%;text-align:center}

.sheet .fine.top{margin:0 0 8px}
.ftop{display:flex;align-items:center;gap:14px}
.fphone{white-space:nowrap}
.callbtn{justify-content:center;width:100%;font-size:1.15rem}
.flinks{display:flex;justify-content:space-between}
.rdel{padding:0;min-height:44px;display:block}
