:root{
  --bg:#F1F5F6;
  --card:#FFFFFF;
  --ink:#15333A;
  --ink-2:#31525B;
  --muted:#7A9099;
  --line:#E4ECEE;
  --primary:#0E8C86;
  --primary-dark:#0A6E69;
  --primary-soft:#E5F5F3;
  --accent:#F0A45E;
  --danger:#D9534F;
  --shadow:0 8px 24px rgba(16,58,66,.07);
  --radius:16px;
  --tab-h:60px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  background:#DEE7E9;
  color:var(--ink);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
button{font-family:inherit;color:inherit;border:0;background:none;cursor:pointer}
input,textarea,select{font-family:inherit;font-size:15px;color:var(--ink)}
h1,h2,h3,h4,p{margin:0}
ul{margin:0;padding:0;list-style:none}
svg{display:block}

#root{height:100%;display:flex;align-items:center;justify-content:center}

#shell{
  width:100%;max-width:460px;height:100%;max-height:940px;
  background:var(--bg);
  position:relative;display:flex;flex-direction:column;overflow:hidden;
  box-shadow:0 28px 70px rgba(11,42,49,.22);
  border-radius:22px;
}
@media (max-width:520px),(max-height:900px){
  #shell{border-radius:0;max-height:none;box-shadow:none}
}

/* ---------- top bar ---------- */
.topbar{
  padding:calc(18px + env(safe-area-inset-top)) 18px 10px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
}
.hello{font-size:20px;font-weight:700;letter-spacing:.2px}
.hello small{font-weight:500;color:var(--muted);font-size:13px;display:block;margin-top:3px;letter-spacing:0}
.iconbtn{
  width:38px;height:38px;border-radius:50%;background:#fff;box-shadow:var(--shadow);
  display:grid;place-items:center;color:var(--ink-2);flex:none
}
.iconbtn svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.avatar-btn{
  width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-weight:700;color:#fff;font-size:15px;flex:none
}

/* ---------- layout ---------- */
#view{
  flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;
  padding:0 16px calc(var(--tab-h) + 30px + env(safe-area-inset-bottom));
  scroll-behavior:smooth;
}
#view.no-tab{padding-bottom:30px}
#view.form-mode{padding-bottom:0}

#tabbar{
  position:absolute;left:0;right:0;bottom:0;height:calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  background:rgba(255,255,255,.9);backdrop-filter:blur(14px);
  border-top:1px solid var(--line);display:flex;z-index:30
}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#93A6AC;font-size:11px;font-weight:500}
.tab svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.tab.on{color:var(--primary)}
.tab.on svg{transform:scale(1.06)}

/* ---------- chips ---------- */
.chip{
  padding:9px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);
  color:var(--ink-2);font-size:13px;white-space:nowrap;flex:none;transition:.16s;
}
.chip:active{transform:scale(.96)}
.chip.on{background:var(--primary);border-color:var(--primary);color:#fff;font-weight:600;box-shadow:0 4px 12px rgba(14,140,134,.25)}
.chip.mini{padding:7px 11px;font-size:12.5px}
.chip-row{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:none}
.chip-row::-webkit-scrollbar{display:none}
.chip-row.bad-row .chip{border-color:#E7B4B2}
.chip-add{border-style:dashed;color:var(--muted)}
.tag{display:inline-block;padding:2px 8px;border-radius:7px;background:var(--primary-soft);color:var(--primary-dark);font-size:11.5px;font-weight:500}
.badge{display:inline-block;padding:3px 9px;border-radius:8px;font-size:11.5px;font-weight:600;color:#fff}

/* ---------- cards ---------- */
.card{background:var(--card);border-radius:var(--radius);padding:15px;box-shadow:var(--shadow);margin-bottom:13px}
.sec-head{display:flex;align-items:center;justify-content:space-between;margin:18px 2px 9px}
.sec-head h2{font-size:15px;font-weight:700;letter-spacing:.2px}
.sec-head .more{font-size:12.5px;color:var(--muted)}
.page-title{padding:calc(18px + env(safe-area-inset-top)) 2px 4px;font-size:20px;font-weight:700}
.page-sub{color:var(--muted);font-size:12.5px;padding:0 2px 10px}

/* ---------- stat ---------- */
.stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:4px}
.stat{background:#fff;border-radius:14px;padding:12px 10px;box-shadow:var(--shadow);text-align:center}
.stat .num{font-size:21px;font-weight:800;color:var(--primary);line-height:1.2;font-variant-numeric:tabular-nums}
.stat .num.warm{color:var(--accent)}
.stat .lbl{font-size:11.5px;color:var(--muted);margin-top:2px}

/* ---------- record card ---------- */
.rec-card{background:#fff;border-radius:var(--radius);padding:13px 14px;box-shadow:var(--shadow);margin-bottom:11px;position:relative;transition:transform .15s}
.rec-card:active{transform:scale(.985)}
.rc-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.rc-date{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.rc-title{font-size:15.5px;font-weight:650;margin:7px 0 3px;line-height:1.35}
.rc-sub{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.rc-foot{display:flex;align-items:center;justify-content:space-between;margin-top:9px;gap:8px}
.rc-tags{display:flex;gap:5px;flex-wrap:wrap;overflow:hidden}
.ring{
  width:40px;height:40px;border-radius:50%;flex:none;position:relative;
  background:conic-gradient(var(--primary) calc(var(--p) * 1%), #E6EEEF 0);
  display:grid;place-items:center;
}
.ring::after{content:'';position:absolute;inset:5px;border-radius:50%;background:#fff}
.ring b{position:relative;z-index:1;font-size:10.5px;font-weight:700;color:var(--primary-dark);font-variant-numeric:tabular-nums}
.ring.warm{background:conic-gradient(var(--accent) calc(var(--p) * 1%), #EFE8DF 0)}
.ring.warm b{color:#B77426}

/* ---------- fab ---------- */
.fab{
  position:absolute;right:16px;bottom:calc(var(--tab-h) + 18px + env(safe-area-inset-bottom));
  width:56px;height:56px;border-radius:50%;background:linear-gradient(160deg,#15A39C,#0B7D77);
  color:#fff;box-shadow:0 12px 26px rgba(11,125,119,.36);display:grid;place-items:center;z-index:31;
  transition:transform .15s
}
.fab:active{transform:scale(.93)}
.fab svg{width:24px;height:24px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round}

/* ---------- buttons ---------- */
.btn{padding:10px 16px;border-radius:12px;font-size:14px;font-weight:600;background:#fff;color:var(--ink-2);border:1px solid var(--line)}
.btn.primary{background:var(--primary);color:#fff;border-color:transparent;box-shadow:0 6px 16px rgba(14,140,134,.22)}
.btn.danger{background:#FBECEC;color:var(--danger);border-color:#F3D9D9}
.btn.ghost{background:transparent;border-color:transparent;color:var(--primary)}
.btn.block{display:block;width:100%;text-align:center;padding:13px}
.btn[disabled]{opacity:.45}
.btn-row{display:flex;gap:9px}
.btn-row .btn{flex:1}

/* ---------- list rows ---------- */
.list{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.list-row{display:flex;align-items:center;gap:12px;padding:14px 15px;border-bottom:1px solid var(--line);width:100%;text-align:left}
.list-row:last-child{border-bottom:0}
.lr-ic{width:34px;height:34px;border-radius:10px;background:var(--primary-soft);display:grid;place-items:center;color:var(--primary);flex:none}
.lr-ic svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.lr-main{flex:1;min-width:0}
.lr-title{font-size:14.5px;font-weight:600}
.lr-sub{font-size:12px;color:var(--muted);margin-top:2px}
.lr-arrow{color:#B9C7CB;font-size:16px}

/* ---------- forms ---------- */
.field{margin-bottom:14px}
.field > label,.field-label{display:block;font-size:12.5px;font-weight:600;color:var(--ink-2);margin-bottom:6px}
.field .hint{font-size:11.5px;color:var(--muted);margin-top:5px}
.inp,textarea.inp,select.inp{
  width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:11px 12px;
  outline:none;transition:.16s;font-size:16px;scroll-margin-top:90px;
}
.inp:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(14,140,134,.1)}
textarea.inp{resize:vertical;min-height:76px;line-height:1.55}
#formBox textarea.inp{resize:none;overflow-y:auto}
.inp.bad{border-color:var(--danger);background:#FFF8F8}
.inp.bad:focus{border-color:var(--danger);box-shadow:0 0 0 3px rgba(217,83,79,.1)}
.err-msg{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--danger);margin-top:5px;line-height:1.4}
.err-msg::before{content:'!';flex:none;width:14px;height:14px;border-radius:50%;background:var(--danger);color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center}
.mini-lbl{display:block;font-size:11.5px;color:var(--muted);margin:0 0 4px 2px}
.date-cell{display:flex;flex-direction:column}
.date-cell .date-inp{flex:1}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.date-inp{appearance:none;-webkit-appearance:none;min-height:44px}
.tag-input-wrap{display:flex;gap:8px}
.tag-input-wrap .inp{flex:1}
.tag-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.tag-item{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:8px;background:#F1F6F7;font-size:12px;color:var(--ink-2)}
.tag-item b{font-weight:600;color:var(--muted);font-size:13px;cursor:pointer}

/* ---------- page bar ---------- */
.pagebar{
  position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:10px;
  padding:calc(14px + env(safe-area-inset-top)) 14px 10px;margin:0 -16px 12px;
  background:rgba(241,245,246,.94);backdrop-filter:blur(12px);
}
.pagebar h1{font-size:16px;font-weight:700;flex:1;text-align:center;margin-right:38px}
.pagebar .back{width:38px;height:38px;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:var(--shadow);flex:none}
.pagebar .back svg{width:18px;height:18px;stroke:var(--ink-2);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pagebar .side{width:38px;height:38px;display:grid;place-items:center;flex:none}
.pagebar .savetxt{font-size:14px;font-weight:600;color:var(--primary)}

/* ---------- stepper ---------- */
.stepper{background:#fff;border-radius:14px;padding:12px 14px;box-shadow:var(--shadow);margin-bottom:14px}
.step-top{display:flex;justify-content:space-between;align-items:center;font-size:12.5px;color:var(--muted);margin-bottom:9px}
.step-top b{color:var(--ink);font-size:13px}
.step-track{height:6px;border-radius:99px;background:#EDF2F3;overflow:hidden}
.step-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#16A79F,#0B7D77);transition:width .3s}
.step-dots{position:relative;display:flex;gap:6px;margin-top:10px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.step-dots::-webkit-scrollbar{display:none}
.step-dot{flex:none;font-size:11.5px;padding:7px 10px;border-radius:8px;background:#F2F6F7;color:var(--muted);white-space:nowrap}
.step-dot.on{background:var(--primary-soft);color:var(--primary-dark);font-weight:600}

/* ---------- dynamic rows ---------- */
.dyn-box{border:1px dashed #D9E4E6;border-radius:12px;padding:11px;margin-bottom:10px;background:#FBFDFD}
.dyn-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.dyn-head b{font-size:12.5px;color:var(--ink-2)}
.dyn-del{color:var(--danger);font-size:12px}
.add-line{display:flex;align-items:center;justify-content:center;gap:6px;padding:11px;border:1px dashed #CBDCDE;border-radius:12px;color:var(--primary);font-size:13px;font-weight:600;width:100%}
.med-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.med-grid .full{grid-column:1/-1}

/* ---------- photos ---------- */
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:4px}
.photo-cell{position:relative;border-radius:11px;overflow:hidden;background:#EEF3F4;aspect-ratio:1/1}
.photo-cell img{width:100%;height:100%;object-fit:cover;display:block}
.photo-cell .pc-kind{position:absolute;left:5px;bottom:5px;background:rgba(0,0,0,.55);color:#fff;font-size:10px;padding:2px 6px;border-radius:5px;backdrop-filter:blur(4px)}
.photo-cell .pc-del{position:absolute;right:4px;top:4px;width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-size:13px;display:grid;place-items:center;line-height:1}
.photo-add{aspect-ratio:1/1;border-radius:11px;border:1px dashed #C9D9DB;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:var(--muted);font-size:11.5px;background:#FBFDFD}
.photo-add svg{width:22px;height:22px;stroke:var(--primary);fill:none;stroke-width:1.8}

/* ---------- auth ---------- */
.auth{
  width:100%;max-width:460px;height:100%;max-height:940px;background:var(--bg);
  padding:calc(40px + env(safe-area-inset-top)) 26px 30px;overflow-y:auto;
  display:flex;flex-direction:column;border-radius:22px;box-shadow:0 28px 70px rgba(11,42,49,.22)
}
@media (max-width:520px),(max-height:900px){.auth{border-radius:0;max-height:none;box-shadow:none}}
.auth-logo{width:64px;height:64px;border-radius:20px;background:linear-gradient(150deg,#17A79F,#0B7D77);display:grid;place-items:center;color:#fff;box-shadow:0 12px 28px rgba(11,125,119,.3);margin-bottom:18px}
.auth-logo svg{width:32px;height:32px;stroke:#fff;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.auth h1{font-size:23px;font-weight:800;letter-spacing:.5px}
.auth .tagline{color:var(--muted);font-size:13px;margin-top:5px;margin-bottom:26px}
.auth-tabs{display:flex;background:#E7EFF0;border-radius:12px;padding:4px;margin-bottom:20px}
.auth-tabs button{flex:1;padding:9px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted)}
.auth-tabs button.on{background:#fff;color:var(--primary);box-shadow:0 2px 8px rgba(16,58,66,.08)}
.auth-form .field{margin-bottom:13px}
.auth-foot{margin-top:auto;padding-top:22px;text-align:center;font-size:11.5px;color:var(--muted);line-height:1.7}
.auth-error{background:#FBECEC;color:var(--danger);font-size:12.5px;padding:9px 12px;border-radius:10px;margin-bottom:12px}

/* lock */
.lock{padding:calc(56px + env(safe-area-inset-top)) 26px 30px;display:flex;flex-direction:column;height:100%;width:100%;max-width:460px}
.lock .lip{width:52px;height:52px;border-radius:16px;background:var(--primary-soft);display:grid;place-items:center;margin:0 auto 16px}
.lock .lip svg{width:26px;height:26px;stroke:var(--primary);fill:none;stroke-width:1.8}
.lock h2{text-align:center;font-size:18px;font-weight:700}
.lock p{text-align:center;color:var(--muted);font-size:12.5px;margin-top:6px;margin-bottom:22px}
.pin-dots{display:flex;justify-content:center;gap:12px;margin-bottom:26px}
.pin-dot{width:12px;height:12px;border-radius:50%;background:#D3E0E1}
.pin-dot.on{background:var(--primary);transform:scale(1.1)}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:auto}
.key{height:58px;border-radius:16px;background:#fff;font-size:21px;font-weight:600;display:grid;place-items:center;box-shadow:0 4px 14px rgba(16,58,66,.06)}
.key:active{background:#EDF4F5}
.key.fn{font-size:13px;color:var(--muted);font-weight:500}
.key.bio svg{width:24px;height:24px;stroke:var(--primary);fill:none;stroke-width:1.8}

/* ---------- modal ---------- */
#modalRoot{position:fixed;inset:0;z-index:60;display:none}
#modalRoot.show{display:block}
.modal-mask{position:absolute;inset:0;background:rgba(15,40,46,.42);backdrop-filter:blur(3px);display:flex;align-items:flex-end;justify-content:center;animation:fade .18s}
.modal{
  width:100%;max-width:460px;background:#fff;border-radius:20px 20px 0 0;padding:20px 18px calc(20px + env(safe-area-inset-bottom));
  animation:up .24s cubic-bezier(.2,.8,.2,1);max-height:88vh;overflow-y:auto
}
.modal h3{font-size:16.5px;font-weight:700;margin-bottom:4px}
.modal .m-sub{font-size:12.5px;color:var(--muted);margin-bottom:16px}
.m-actions{display:flex;gap:9px;margin-top:18px}
.m-actions .btn{flex:1}
@keyframes up{from{transform:translateY(60px);opacity:.6}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}

/* ---------- toast ---------- */
#toastRoot{position:fixed;left:0;right:0;bottom:calc(90px + env(safe-area-inset-bottom));z-index:80;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.toast{background:rgba(21,51,58,.93);color:#fff;font-size:13px;padding:10px 16px;border-radius:11px;box-shadow:0 10px 24px rgba(0,0,0,.18);animation:toastIn .22s;max-width:82%;text-align:center}
.toast.ok{background:rgba(14,140,134,.95)}
.toast.err{background:rgba(198,66,62,.95)}
@keyframes toastIn{from{transform:translateY(10px);opacity:0}to{transform:none;opacity:1}}

/* ---------- timeline ---------- */
.tl{position:relative;padding-left:26px}
.tl::before{content:'';position:absolute;left:7px;top:6px;bottom:6px;width:2px;background:#DDE8E9;border-radius:2px}
.tl-year{font-size:13px;font-weight:700;color:var(--ink-2);margin:0 0 6px;position:relative;left:-26px;padding-left:0}
.tl-item{position:relative;margin-bottom:12px}
.tl-item::before{content:'';position:absolute;left:-23px;top:16px;width:9px;height:9px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 3px #E5F5F3}
.tl-item .tl-date{font-size:11.5px;color:var(--muted);margin-bottom:5px;font-variant-numeric:tabular-nums}

/* ---------- charts ---------- */
.chart-card{background:#fff;border-radius:var(--radius);padding:15px 15px 12px;box-shadow:var(--shadow);margin-bottom:13px}
.chart-card h3{font-size:14px;font-weight:700;margin-bottom:2px}
.chart-card .cs{font-size:11.5px;color:var(--muted);margin-bottom:12px}
.bars{display:flex;align-items:flex-end;gap:8px;height:130px;padding-top:8px}
.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:5px}
.bar-val{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.bar{width:100%;max-width:34px;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,#17A79F,#0C807A);min-height:4px;transition:height .4s}
.bar.zero{background:#E6EEEF}
.bar-lbl{font-size:11px;color:var(--muted);margin-top:2px;white-space:nowrap}
.donut-wrap{display:flex;align-items:center;gap:16px}
.donut{width:112px;height:112px;border-radius:50%;position:relative;flex:none;display:grid;place-items:center}
.donut::after{content:'';position:absolute;inset:23px;background:#fff;border-radius:50%}
.donut .dnum{position:relative;z-index:1;text-align:center;line-height:1.15}
.donut .dnum b{font-size:19px;font-weight:800;color:var(--ink);display:block}
.donut .dnum span{font-size:10.5px;color:var(--muted)}
.legend{flex:1;display:flex;flex-direction:column;gap:7px;min-width:0}
.legend-row{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--ink-2)}
.legend-dot{width:9px;height:9px;border-radius:3px;flex:none}
.legend-row .lv{margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}
.spark{width:100%;height:auto;display:block}
.range-chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;margin-bottom:10px}
.range-chips .chip{padding:5px 11px;font-size:12px}

/* ---------- detail ---------- */
.detail-hero{background:#fff;border-radius:var(--radius);padding:16px;box-shadow:var(--shadow);margin-bottom:13px}
.dh-top{display:flex;align-items:center;gap:9px;margin-bottom:9px;flex-wrap:wrap}
.dh-title{font-size:19px;font-weight:750;line-height:1.35;margin-bottom:8px}
.dh-meta{font-size:12.5px;color:var(--muted);display:flex;gap:12px;flex-wrap:wrap}
.detail-sec{background:#fff;border-radius:var(--radius);padding:15px;box-shadow:var(--shadow);margin-bottom:13px}
.ds-head{display:flex;align-items:center;gap:7px;margin-bottom:10px}
.ds-head h3{font-size:14px;font-weight:700}
.ds-head .dsi{width:22px;height:22px;border-radius:7px;background:var(--primary-soft);display:grid;place-items:center;color:var(--primary)}
.ds-head .dsi svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2}
.ds-text{font-size:13.5px;color:var(--ink-2);line-height:1.68;white-space:pre-wrap;word-break:break-word}
.kv{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px dashed #EAF0F1;font-size:13px}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--muted);flex:none}
.kv .v{text-align:right;font-weight:600;word-break:break-word}
.med-item{padding:9px 0;border-bottom:1px dashed #EAF0F1}
.med-item:last-child{border-bottom:0}
.med-nm{font-size:14px;font-weight:650;display:flex;align-items:center;gap:6px}
.med-sub{font-size:12px;color:var(--muted);margin-top:3px}
.med-pill{font-size:10.5px;padding:2px 7px;border-radius:6px;font-weight:600}
.med-pill.active{background:#E7F6F0;color:#1B8F5E}
.med-pill.done{background:#F1F3F4;color:#8A9BA1}
.empty{text-align:center;padding:42px 15px;color:var(--muted);font-size:13px}
.empty .eic{width:64px;height:64px;border-radius:20px;background:var(--primary-soft);display:grid;place-items:center;margin:0 auto 14px}
.empty .eic svg{width:30px;height:30px;stroke:var(--primary);fill:none;stroke-width:1.5}
.empty b{display:block;color:var(--ink);font-size:15px;margin-bottom:5px}

/* reminders */
.rem-item{display:flex;gap:11px;align-items:flex-start;padding:13px 14px;border-bottom:1px solid var(--line);background:#fff}
.rem-item:last-child{border-bottom:0}
.rem-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none;font-size:15px}
.rem-ic.med{background:#E7F6F0;color:#1B8F5E}
.rem-ic.rev{background:#FFF1E4;color:#C67C2B}
.rem-main{flex:1;min-width:0}
.rem-title{font-size:14px;font-weight:600}
.rem-sub{font-size:12px;color:var(--muted);margin-top:2px}
.rem-right{font-size:11.5px;color:var(--muted);text-align:right;flex:none}
.rem-right.alert{color:var(--danger);font-weight:600}

/* note */
.note-card{background:#fff;border-radius:14px;padding:12px 14px;box-shadow:var(--shadow);margin-bottom:10px}
.note-card .nt{font-size:13.5px;color:var(--ink-2);line-height:1.65;white-space:pre-wrap}
.note-card .nm{font-size:11.5px;color:var(--muted);margin-top:7px;display:flex;justify-content:space-between}

/* profile avatar */
.p-av{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:#fff;font-weight:700;font-size:15px;flex:none}
.small-note{font-size:11.5px;color:var(--muted);line-height:1.65;padding:2px 4px}
.divider{height:1px;background:var(--line);margin:16px 0}
.hidden{display:none!important}

/* ---------- 补充：认证层 / 搜索 / 分段 / 表单导航 ---------- */
#root{position:relative}
#authLayer{position:absolute;inset:0;z-index:50;display:none;align-items:center;justify-content:center}
#authLayer.show{display:flex}
.lock{background:var(--bg);overflow-y:auto}
.lock .keypad{margin-top:auto}
.lock .btn.block{padding:16px;font-size:15px}

.searchbox{display:flex;align-items:center;gap:9px;background:#fff;border-radius:12px;padding:10px 12px;box-shadow:var(--shadow);margin-bottom:11px}
.searchbox svg{width:17px;height:17px;stroke:#9FB3B8;fill:none;stroke-width:2;stroke-linecap:round;flex:none}
.searchbox input{flex:1;border:0;outline:none;background:transparent;font-size:14px}
.searchbox input::placeholder{color:#A8BABF}

.segmented{display:flex;background:#E6EEEF;border-radius:11px;padding:3px;margin-bottom:11px}
.segmented button{flex:1;padding:7px;border-radius:8px;font-size:12.5px;font-weight:600;color:var(--muted);transition:.16s}
.segmented button.on{background:#fff;color:var(--primary);box-shadow:0 2px 6px rgba(16,58,66,.08)}

/* ---------- 表单底部操作栏（吸附在视口底部） ---------- */
.form-nav{
  position:sticky;bottom:0;z-index:24;display:flex;gap:10px;
  margin:0 -16px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  background:rgba(241,245,246,.94);backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
}
.form-nav .btn{flex:1;padding:13px 12px;min-height:46px;font-size:14.5px}
.avatar-btn{font-weight:700}

