:root{
  --bg:#F3F7FA; --surface:#FFFFFF; --ink:#1B2836; --muted:#5E6E7E; --line:#DCE5EC;
  --milk:#FFFDF6; --accent:#2D7A8A; --accent-ink:#FFFFFF; --warm:#E9965A; --ok:#3C8D5A; --danger:#B4473A;
  --pee:#D9B230; --poo:#8A5A3B; --pee-bg:#FBF3D3; --poo-bg:#F1E4DA; --vit:#4E8F5E; --vit-bg:#E3F1E6;
  --display:"Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body:"Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root{
  --bg:#111A22; --surface:#18232E; --ink:#E7EEF4; --muted:#93A4B4; --line:#2A3846;
  --milk:#F3EEDC; --accent:#5BB3C3; --accent-ink:#0D1A20; --warm:#F0A86F; --ok:#6BC28A; --danger:#E5786A;
  --pee:#E8C64E; --poo:#C08B66; --pee-bg:#3A341A; --poo-bg:#3A2B21; --vit:#7CC48C; --vit-bg:#1F3326; color-scheme:dark}}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.45;
  padding-inline:16px;padding-block:calc(18px + env(safe-area-inset-top,0px)) calc(48px + env(safe-area-inset-bottom,0px))}
[hidden]{display:none!important}
img{max-width:100%}
.wrap{max-width:560px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
h1,h2,h3{font-family:var(--display);margin:0;text-wrap:balance;letter-spacing:-.01em}
h1{font-size:1.65rem;font-weight:800}
h2{font-size:1.15rem;font-weight:600}
h3{font-size:1rem;font-weight:600}
p{margin:0}
.eyebrow{font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);font-weight:700}
.num{font-variant-numeric:tabular-nums}
.top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:14px}
.hero{display:grid;grid-template-columns:120px 1fr;gap:18px;align-items:center}
.hero svg{width:120px;height:auto;display:block}
.big{font-family:var(--display);font-weight:800;font-size:3rem;line-height:1}
.big small{font-size:1.1rem;font-weight:600;color:var(--muted);margin-left:4px}
.stats{display:flex;flex-direction:column;gap:6px;min-width:0}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;font-weight:700;padding:4px 10px;border-radius:999px;background:var(--bg);border:1px solid var(--line)}
.pill.due{background:var(--warm);color:#2A1607;border-color:transparent}
.pill.okay{color:var(--ok)}
.dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none}
.dot.feed{background:var(--accent)} .dot.pee{background:var(--pee)} .dot.poo{background:var(--poo)}
.dot.both{background:linear-gradient(90deg,var(--pee) 50%,var(--poo) 50%)}
label{font-size:.85rem;font-weight:700;color:var(--muted);display:flex;flex-direction:column;gap:6px}
input,select{font:inherit;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:10px 12px;width:100%;min-width:0;min-height:46px}
input[type="datetime-local"]{-webkit-appearance:none;appearance:none}
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px}
.row>*,.stack>*{min-width:0}
.stack{display:flex;flex-direction:column;gap:16px}
.stepper{display:grid;grid-template-columns:56px 1fr 56px;gap:8px;align-items:center}
.stepper output{text-align:center;font-family:var(--display);font-weight:800;font-size:2.2rem}
.stepper output span{font-size:1rem;color:var(--muted);font-weight:600}
button,.btn{font:inherit;font-weight:700;border-radius:12px;border:1px solid var(--line);background:var(--bg);color:var(--ink);padding:10px 14px;cursor:pointer;text-decoration:none;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}
button:hover,.btn:hover{border-color:var(--accent)}
button:disabled{opacity:.55;cursor:default}
.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-size:1.05rem;padding:14px}
.link{border:0;background:transparent;color:var(--accent);padding:4px;min-height:0;font-weight:700}
.round{font-size:1.6rem;height:56px;border-radius:50%}
.quick button{padding:6px 14px;border-radius:999px;font-size:.9rem;min-height:38px}
.quick button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.kids{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.kids button{border-radius:999px;white-space:nowrap;flex:none}
.kids button[aria-pressed="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.diaper{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.diaper button{flex-direction:column;padding:14px 6px;font-size:1rem;gap:8px}
.diaper .dot{width:18px;height:18px}
.diaper .pee-b{background:var(--pee-bg)} .diaper .poo-b{background:var(--poo-bg)}
.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.list li{display:grid;grid-template-columns:84px 1fr auto;gap:10px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.list li:first-child{border-top:0}
.list .t{font-weight:700}
.list .meta{color:var(--muted);font-size:.85rem;min-width:0;overflow-wrap:anywhere}
.list .what{font-family:var(--display);font-weight:800;font-size:1.15rem;display:flex;align-items:center;gap:8px}
.del{border:0;background:transparent;color:var(--muted);padding:6px 8px;font-size:.85rem;min-height:0}
.del.confirm{color:var(--danger)}
.daynav{display:grid;grid-template-columns:44px 1fr 44px;gap:8px;align-items:center}
.daynav button{padding:8px 0}
.daynav .lbl{text-align:center;font-weight:700}
.daypick{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.daypick input{text-align:center;min-height:40px;padding:6px 8px;font-weight:700;max-width:200px}
.daypick .lbl{font-size:.8rem;color:var(--muted);font-weight:700;text-align:center}
.vits{display:flex;flex-direction:column;gap:14px}
.vit{display:flex;flex-direction:column;gap:8px}
.vit-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.vit-head b{font-family:var(--display);font-size:1.05rem}
.doses{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.dose{flex-direction:column;align-items:flex-start;text-align:left;gap:2px}
.dose small{font-weight:600;color:var(--muted);font-size:.78rem}
.dose[aria-pressed="true"]{background:var(--vit-bg);border-color:var(--vit)}
.dose.confirm{border-color:var(--danger)}
.dot.vit{background:var(--vit)}
.sepline{border-top:1px solid var(--line);padding-top:14px}
.list li.sup{grid-template-columns:1fr auto}
.empty{color:var(--muted);text-align:center;padding:14px 4px}
.chart{overflow-x:auto}
.chart svg{width:100%;height:auto;display:block;min-width:300px}
.weeknums{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.weeknums div{display:flex;flex-direction:column;gap:2px}
.weeknums b{font-family:var(--display);font-size:1.35rem}
.tablewrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:.9rem;font-variant-numeric:tabular-nums}
th,td{padding:8px 6px;text-align:right;border-top:1px solid var(--line);white-space:nowrap}
th{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);border-top:0}
th:first-child,td:first-child{text-align:left}
tr.today td{font-weight:800}
.actions{display:grid;grid-template-columns:1fr;gap:10px}
.note{font-size:.85rem;color:var(--muted)}
.error{font-size:.88rem;color:var(--danger);font-weight:700}
.code{font-family:var(--display);font-weight:800;font-size:1.8rem;letter-spacing:.12em;text-align:center;padding:10px;border:2px dashed var(--line);border-radius:14px}
.divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.85rem}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}
.center{min-height:70vh;display:flex;flex-direction:column;justify-content:center;gap:18px}
.brandmark{display:flex;align-items:center;gap:12px}
.brandmark img{width:56px;height:56px;border-radius:14px}
details summary{cursor:pointer;font-family:var(--display);font-weight:600;font-size:1.15rem}
details[open] summary{margin-bottom:14px}
footer{text-align:center;color:var(--muted);font-size:.8rem;display:flex;flex-direction:column;align-items:center;gap:6px}
footer a{color:inherit}
footer img{max-height:36px;width:auto}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(20px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:999px;font-weight:700;font-size:.9rem;opacity:0;transition:opacity .2s;pointer-events:none;max-width:calc(100% - 32px);text-align:center}
.toast.show{opacity:1}
.install{position:sticky;top:env(safe-area-inset-top,0px);z-index:5}
@media (max-width:420px){.hero{grid-template-columns:92px 1fr}.hero svg{width:92px}.big{font-size:2.5rem}.row{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
