:root {
  --bg:#f8f8f2;
  --paper:#fff;
  --text:#253329;
  --muted:#657168;
  --line:#e6e9df;
  --forest:#244b36;
  --forest-dark:#183c2a;
  --sage:#e8eddf;
  --peach:#faecdf;
  --lavender:#eeebf6;
  --radius:20px;
  --shadow:0 10px 30px #263b2510;
  font-family:"Inter","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  font-size:16px;
  color:var(--text);
  background:var(--bg);
  font-synthesis:none;
}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-width:320px}
button,input,select,textarea{font:inherit}
button{cursor:pointer;color:inherit}
button:disabled{cursor:not-allowed;opacity:.55}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #557749;outline-offset:3px}
button:focus:not(:focus-visible){outline:none}
a{color:inherit}
img{max-width:100%;display:block}
h1,h2,h3,h4,p{margin:0}
h1{font-size:clamp(1.7rem,3vw,2.25rem);line-height:1.25;letter-spacing:-.04em;font-weight:800}
h2{font-size:1.22rem;line-height:1.3;letter-spacing:-.025em}
h3{font-size:1rem;line-height:1.4}
svg{flex-shrink:0;vertical-align:middle}
.muted{color:var(--muted)}
.small,small{font-size:.8rem}
.sidebar{position:fixed;inset:0 auto 0 0;z-index:12;width:224px;background:#fcfcf8;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:30px 17px 17px}
.brand{display:flex;align-items:center;gap:11px;padding:0 9px;margin-bottom:42px;font-weight:800;font-size:1.22rem;letter-spacing:-.05em}
.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:13px;background:var(--forest);color:#f1f7e9}
.nav-label{font-size:.74rem;font-weight:700;color:#718071;padding:0 12px;margin:0 0 8px}
.side-nav{display:grid;gap:4px}
.nav-item,.family-link{width:100%;border:0;background:transparent;text-align:left;display:flex;align-items:center;gap:12px;border-radius:12px;padding:11px 12px;color:#536156;font-size:.91rem;font-weight:650;min-height:44px}
.nav-item:hover,.family-link:hover{background:#f0f2e9}
.nav-item.active{color:var(--forest-dark);background:#e7eddf;font-weight:780}
.nav-item.active svg{stroke-width:2.2}
.side-footer{margin-top:auto;padding-top:22px}
.workspace-note{display:flex;gap:7px;align-items:center;color:var(--muted);padding:11px 12px 0;border-top:1px solid var(--line);font-size:.72rem;margin-top:9px}
.workspace-note::before{content:"";width:7px;height:7px;border-radius:50%;background:#9dad89}
.main{margin-left:224px}
.topbar{height:74px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 34px;background:#fafaf5}
.crumb{font-weight:700;color:#526154;font-size:.88rem;display:flex;align-items:center;gap:9px}
.mobile-brand,.text-button.all-mobile{display:none}
.top-actions{display:flex;align-items:center;gap:11px}
.profile-button{border:1px solid var(--line);border-radius:12px;background:white;padding:5px 10px 5px 5px;display:inline-flex;align-items:center;gap:8px;font-weight:750;font-size:.86rem;min-height:40px}
.profile-button .avatar{width:29px;height:29px;border-radius:8px}
.avatar{display:inline-grid;place-items:center;background:#e4ebd8;color:var(--forest);font-weight:800;flex:none;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.icon-btn{width:42px;height:42px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:12px;background:white;position:relative;color:var(--forest)}
.icon-btn:hover,.profile-button:hover{background:#f0f3e9}
.notification-dot{width:8px;height:8px;border:1px solid white;background:#d98554;border-radius:50%;position:absolute;right:9px;top:9px}
.content{max-width:1324px;padding:29px 34px 42px;margin:0 auto;min-height:calc(100vh - 74px)}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px}
.page-head p{margin-top:7px;color:var(--muted);line-height:1.55;font-size:.93rem}
.button{border:0;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;min-height:42px;gap:7px;white-space:nowrap;padding:9px 15px;font-weight:740;font-size:.88rem;text-decoration:none}
.button.primary{background:var(--forest);color:#fff}
.button.primary:hover{background:#183e2a}
.button.secondary{background:#fff;border:1px solid #dde3d7;color:var(--forest)}
.button.secondary:hover{background:#f0f3e9}
.button.ghost,.text-button{background:transparent;color:var(--forest);border:0;padding:6px 5px;font-size:.86rem;font-weight:750;display:inline-flex;align-items:center;gap:6px}
.button.danger,.danger{color:#9e392e}
.primary.danger{background:#9e392e;color:#fff}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:19px}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.section-title p{margin-top:5px;color:var(--muted);font-size:.85rem}
.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}
.stat-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:17px}
.segmented{display:inline-flex;gap:4px;flex-wrap:wrap;align-items:center;background:#edf0e7;padding:4px;border-radius:12px}
.segmented button{border:0;background:transparent;padding:7px 12px;border-radius:9px;color:#5f6c5e;font-size:.86rem;font-weight:700}
.segmented button:is(.active,[aria-selected="true"],[aria-pressed="true"]){background:#fff;color:var(--forest);box-shadow:0 1px 4px #28362d12}
.chip{display:inline-flex;gap:5px;align-items:center;white-space:nowrap;min-height:27px;padding:4px 9px;border-radius:7px;background:#edf2e7;color:#3e5a41;font-size:.78rem;font-weight:730}
.row-list{display:grid;gap:8px}
.list-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;background:white;border:1px solid var(--line);border-radius:13px;padding:12px 13px;text-align:left}
button.list-row:hover{background:#f6f8f1}
.empty{text-align:center;display:grid;justify-items:center;gap:8px;padding:36px 18px;border:1px dashed #dce2d4;border-radius:16px;color:var(--muted);line-height:1.5}
.empty svg{color:#77916e;margin-bottom:4px}
.empty strong{color:var(--text)}
.field{min-width:0;display:flex;flex-direction:column;gap:6px;font-size:.86rem;font-weight:700}
.field input:not([type=checkbox]),.field select,.field textarea,dialog input:not([type=checkbox]):not([type=radio]),dialog select,dialog textarea{width:100%;min-height:41px;border:1px solid #dbe2d5;background:#fcfdf9;border-radius:10px;color:var(--text);padding:9px 11px}
.field textarea,dialog textarea{resize:vertical;min-height:82px}
.field small{font-weight:500;color:var(--muted)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.form-grid .full,.form-grid .wide,.form-grid .span-two{grid-column:1/-1}
.form-stack{display:grid;gap:13px}
.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.dialog-top .icon-btn{border:0;background:#f1f3ed;width:34px;height:34px}
dialog{width:min(540px,calc(100% - 28px));max-height:calc(100dvh - 32px);color:var(--text);border:0;box-shadow:0 24px 90px #102e2550;background:white;border-radius:21px;padding:22px}
dialog.wide{width:min(760px,calc(100% - 28px))}
dialog::backdrop{background:#203d305c;backdrop-filter:blur(2px)}
.dialog-body{display:grid;gap:12px;line-height:1.5}
.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:19px}
#toast{pointer-events:none;display:none;position:fixed;z-index:50;bottom:23px;left:50%;transform:translateX(-50%);padding:12px 19px;border-radius:13px;background:#1f432e;color:#fff;box-shadow:var(--shadow);white-space:normal;text-align:center;width:max-content;max-width:90vw;font-size:.9rem}
#toast.visible{display:block}
.mobile-nav{display:none}
.hero-grid{display:grid;grid-template-columns:minmax(0,1.95fr) minmax(0,1fr);gap:15px;margin-bottom:19px}
.hero-grid.viewer-hero{grid-template-columns:1fr}
.child-hero{min-height:211px;position:relative;isolation:isolate;overflow:hidden;border-radius:21px;display:flex;align-items:center;background:#e9eedc}
.hero-image{position:absolute;inset:0 0 0 43%;width:57%;height:100%;object-fit:cover;object-position:center 50%;z-index:-2}
.child-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#e9eedc 37%,#e9eedcf0 46%,#e9eedc2b 73%,transparent 100%);z-index:-1}
.hero-copy{padding:24px 27px}
.hero-kicker{display:flex;align-items:center;gap:6px;color:#486543;font-size:.81rem;font-weight:760;margin-bottom:9px}
.hero-copy h2{font-size:2rem;letter-spacing:-.045em;color:#203f2d}
.hero-age{font-size:1.01rem;font-weight:700;margin:7px 0 17px;color:#486544}
.hero-copy .button{min-height:35px;padding:7px 10px;background:#ffffffb9;font-size:.79rem}
.reminder{position:relative;overflow:hidden;background:#fbf0e3;border:1px solid #f1e5d7;min-height:211px;padding:19px 20px;border-radius:21px;display:flex;flex-direction:column;align-items:flex-start}
.reminder-icon{display:grid;place-items:center;width:37px;height:37px;background:#f4dfca;color:#8c4e2f;border-radius:11px;margin-bottom:10px}
.reminder h2{font-size:1.12rem;color:#523d31}
.reminder p{color:#755b4c;font-size:.84rem;margin-top:6px;line-height:1.5}
.reminder .button{margin-top:auto;background:#fff9f2;border-color:#ebd9c8;color:#674631;min-height:34px;padding:6px 11px;font-size:.8rem}
.reminder-illustration{position:absolute;right:8px;bottom:2px;opacity:.19;color:#b77d52;transform:rotate(-12deg);pointer-events:none}
.quick-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:24px}
.quick-button{min-width:0;display:flex;align-items:center;gap:10px;padding:10px 11px;background:#fff;border:1px solid var(--line);border-radius:13px;text-align:left;font-size:.84rem;font-weight:740;white-space:nowrap}
.quick-button:hover{background:#f0f5eb;border-color:#d8e2d0}
.tone-icon{width:37px;height:37px;display:grid;place-items:center;border-radius:11px;background:#e8efdf;color:#43694b;flex:none}
.tone-vaccine{background:#f8e9db;color:#995a38}.tone-photo{background:#f7edd4;color:#876327}.tone-learning{background:#eee9f5;color:#695681}.tone-cost{background:#e3efec;color:#426c62}.tone-note{background:#eaecec;color:#596963}
.dashboard-lower{display:grid;grid-template-columns:minmax(0,1.95fr) minmax(0,1fr);gap:15px;align-items:start}
.timeline,.dashboard-side{min-width:0}
.dashboard-side{display:grid;gap:14px}
.dashboard-side .panel{padding:16px}
.filter-bar{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.filter{background:white;border:1px solid #e3e8dd;border-radius:9px;padding:6px 11px;font-size:.81rem;font-weight:650;color:#626d61;min-height:32px}
.filter.active{background:#e8eedf;border-color:#e8eedf;color:#30553b;font-weight:790}
.timeline-day{position:relative;display:grid;grid-template-columns:68px minmax(0,1fr);gap:12px;margin:0 0 12px}
.timeline-day::before{content:"";position:absolute;left:67px;top:20px;bottom:-13px;width:1px;background:#e1e7d9}
.timeline-day:last-child::before{bottom:10px}
.timeline-date{color:#536556;font-size:.81rem;font-weight:730;padding-top:12px;position:relative}
.timeline-date::after{content:"";width:8px;height:8px;border-radius:50%;position:absolute;right:-4px;top:19px;background:#91a983;border:2px solid var(--bg)}
.day-records{display:grid;gap:8px}
.timeline-card{width:100%;border:1px solid var(--line);background:white;text-align:left;border-radius:15px;padding:12px;display:grid;gap:9px;color:inherit}
.timeline-card:hover{border-color:#bccdb5}
.timeline-top{display:flex;gap:9px;align-items:center;min-width:0}
.timeline-title{display:grid;gap:2px;min-width:0;flex:1}
.timeline-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem}
.timeline-title span,.timeline-note{color:var(--muted);font-size:.8rem;line-height:1.5}
.timeline-card img,.timeline-card video,.timeline-media{display:block;width:100%;height:clamp(112px,12vw,170px);object-fit:cover;object-position:center 48%;border-radius:10px;background:#ecefdd;overflow:hidden}
.timeline-media img,.timeline-media video{height:100%}
.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.summary-tile{border:0;text-align:left;border-radius:11px;background:#f2f5eb;padding:10px 11px;display:grid;gap:5px;min-width:0}
.summary-tile:nth-child(2){background:#fbf0e4}.summary-tile:nth-child(3){background:#f2edf7}.summary-tile:nth-child(4){background:#e9f2ef}
.summary-tile:hover{filter:brightness(.97)}
.summary-tile span{font-size:.78rem;color:#56665a}
.summary-tile strong{font-size:1.07rem;font-weight:820;white-space:nowrap}
.side-photos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.side-photos button{padding:0;border:0;background:#f0f2e8;border-radius:9px;overflow:hidden;aspect-ratio:1}
.side-photos img,.side-photos video,.side-photos .mini-media{width:100%;height:100%;object-fit:cover}
.quick-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body.big-text{font-size:1.13rem}
body.big-text .small,body.big-text small{font-size:.94rem}
body.big-text :is(.nav-item,.button,.muted,.chip,.timeline-title span,.timeline-note,.filter,.summary-tile span,.field){font-size:1rem}
.auth-layout{width:min(960px,calc(100% - 32px));min-height:min(560px,calc(100dvh - 56px));margin:max(24px,calc((100dvh - 560px)/2)) auto 24px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);overflow:hidden;border-radius:24px;border:1px solid var(--line);background:#fff;box-shadow:var(--shadow)}
.auth-art{min-height:100%;display:flex;flex-direction:column;justify-content:space-between;gap:45px;padding:28px;color:white;background:linear-gradient(180deg,#172f26a8 0%,#213b2f09 50%,#172f26e8 100%),#244b36 url('assets/ginkgo.jpg') center 43%/cover}
.auth-art h2{margin-bottom:10px;color:white;font-size:clamp(1.72rem,3.5vw,2.38rem)}
.auth-art p{color:#edf3e8;line-height:1.6;max-width:19em;font-size:.9rem}
.auth-brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.03em}
.auth-brand>.brand-mark{background:#fbfbed;color:var(--forest)}
.auth-panel{min-width:0;align-self:center;padding:34px clamp(20px,5vw,52px);display:grid;gap:12px}
.auth-panel h1{font-size:clamp(1.45rem,4.2vw,1.95rem)}
.auth-panel .form-stack{margin-top:8px}
.auth-panel .field input{font-size:1rem}
.auth-panel .auth-divider{padding-top:15px;border-top:1px solid var(--line)}
.auth-panel .button.primary{min-height:44px}
.auth-panel p{line-height:1.55}
.auth-check{display:flex;gap:7px;align-items:start;font-size:.86rem;color:var(--muted);line-height:1.5}
.auth-check input{margin-top:4px}
.auth-error{color:#832c24;background:#faebe3;border:1px solid #f2dbd1;border-radius:9px;padding:9px 10px;font-size:.86rem}
.auth-switch,.auth-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:.88rem}
.auth-switch>span{color:var(--muted)}
.sync-status:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 14px;margin:10px clamp(14px,3vw,34px) 0;border-radius:10px;background:#eaf0e2;color:#344f34;font-size:.88rem;line-height:1.45}
.sync-status:is(.offline,.error,.conflict){background:#fbecdf;color:#6e402c}
.sync-status>button{flex:none}
@media(max-width:1140px){
  .sidebar{width:190px;padding-left:13px;padding-right:13px}
  .main{margin-left:190px}
  .topbar{padding:0 24px}
  .content{padding:25px 24px 37px}
  .quick-button{gap:6px;padding:8px 7px}
  .quick-button .tone-icon{width:31px;height:31px}
}
@media(max-width:920px){
  .sidebar{width:158px;padding-left:9px;padding-right:9px}
  .main{margin-left:158px}
  .brand{font-size:1.04rem;gap:7px}
  .brand-mark{width:31px;height:31px}
  .quick-button{flex-direction:column;text-align:center}
  .dashboard-lower{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
}
@media(max-width:720px){
  .sidebar{display:none}
  .main{margin-left:0}
  .topbar{height:60px;padding:0 15px}
  .topbar .crumb{font-size:.98rem;color:var(--forest)}
  .desktop-crumb{display:none}
  .mobile-brand,.text-button.all-mobile{display:inline-flex}
  .top-actions{gap:7px}
  .icon-btn{width:37px;height:37px}
  .profile-button{min-height:37px}
  .profile-button .avatar{width:25px;height:25px}
  .content{padding:19px 14px 92px;min-height:calc(100dvh - 60px)}
  .page-head{margin-bottom:15px}
  .page-head p{font-size:.86rem}
  .mobile-nav{display:grid;grid-template-columns:1fr 1fr 1.08fr 1fr 1fr;align-items:center;position:fixed;z-index:12;bottom:0;left:0;right:0;padding:6px 8px calc(6px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fffffff7;backdrop-filter:blur(12px)}
  .mobile-nav button{display:grid;justify-items:center;gap:4px;padding:4px 0;border:0;background:transparent;color:#657468;font-size:.72rem;font-weight:700;min-height:47px}
  .mobile-nav button.active{color:#234d35}
  .mobile-nav .fab-icon{width:41px;height:41px;display:grid;place-items:center;border-radius:14px;background:var(--forest);color:white;margin-top:-12px;box-shadow:0 5px 15px #244b3633}
  .hero-grid{gap:10px;grid-template-columns:1fr;margin-bottom:12px}
  .child-hero{min-height:172px}
  .hero-copy{padding:17px 18px}
  .hero-copy h2{font-size:1.65rem}
  .hero-age{margin:5px 0 12px}
  .reminder{min-height:82px;padding:12px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:0 10px}
  .reminder-icon{margin:0;grid-row:1/3;width:35px;height:35px}
  .reminder h2{font-size:.91rem;grid-column:2;grid-row:1}
  .reminder p{font-size:.75rem;margin:0;grid-column:2;grid-row:2}
  .reminder .button{margin:0;grid-column:3;grid-row:1/3;position:relative}
  .reminder-illustration{display:none}
  .quick-actions{gap:5px;margin-bottom:19px}
  .quick-button{font-size:.71rem;gap:5px;padding:6px 2px;border-radius:11px}
  .quick-button .tone-icon{width:34px;height:32px;border-radius:9px}
  .dashboard-lower{grid-template-columns:1fr}
  .dashboard-side{grid-template-columns:1fr}
  .timeline-day{grid-template-columns:59px minmax(0,1fr);gap:9px}
  .timeline-day::before{left:58px}
  .timeline-card img,.timeline-card video,.timeline-media{height:135px}
  #toast{bottom:74px}
  .panel{padding:14px}
  .stats-grid{gap:7px}
  .stat-card{padding:10px}
  dialog{padding:16px;max-height:calc(100dvh - 20px)}
  .auth-layout{width:min(480px,calc(100% - 24px));margin:14px auto;grid-template-columns:1fr}
  .auth-art{min-height:157px;gap:18px;padding:15px;background-position:center 47%}
  .auth-art h2{font-size:1.28rem;margin-bottom:3px}
  .auth-art h2 br{display:none}
  .auth-art p{font-size:.8rem}
  .auth-panel{padding:22px 16px}
  .install-button{display:none}
}
@media(max-width:380px){
  .top-actions>.icon-btn:first-child{display:none}
  .page-head .button{padding-inline:10px}
  .quick-menu{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
}
