  :root {
    /* Morandi 水彩晕染 · 多色低饱和 */
    --cream:   #FBF2E9;   /* 暖杏背景 */
    --cream-d: #F3E4D2;
    --card:    #FFFBF6;   /* 卡片洗白 */
    --rose:    #EFB4B0;   /* 雾玫瑰(奶量) */
    --rose-d:  #C9776E;
    --rose-t:  #FBE7E4;
    --sky:     #AACBE0;   /* 雾雨蓝(尿尿) */
    --sky-d:   #5E8DAE;
    --sky-t:   #E8F0F6;
    --peach:   #E4BD8C;   /* 燕麦棕(粑粑) */
    --peach-d: #B4854F;
    --peach-t: #F8EEDF;
    --sage:    #A8C2A6;   /* 鼠尾草绿(喂养次数) */
    --sage-d:  #5F8B60;
    --sage-t:  #EAF2E9;
    --lilac:   #C3B2D6;   /* 雾紫(装饰/睡眠预留) */
    --lilac-d: #8C76A6;
    --lilac-t: #F1ECF6;
    --text:    #5C4B44;
    --sub:     #A0897C;
    --line:    #F0DFC9;
  }
  * { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  body {
    font-family: "Source Han Sans SC", "Noto Sans SC", "Noto Sans CJK SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--cream); color: var(--text);
    max-width: 480px; margin: 0 auto; padding-bottom: 84px;
    min-height: 100vh; overflow-x:hidden;
  }
  h1, h2, .cute-font {
    font-family: "Source Han Sans SC", "Noto Sans SC", "Noto Sans CJK SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight:700;
  }

  /* ---------- 头部 ---------- */
  header {
    position: relative; padding: 22px 18px 34px; overflow:hidden;
    background: linear-gradient(180deg, #FDF6EC 0%, var(--cream) 100%);
  }
  header .deco-star { position:absolute; opacity:.85; }
  header .deco-img { position:absolute; opacity:.95; pointer-events:none; }
  header .hrow { display:flex; align-items:center; justify-content:space-between; position:relative; z-index:2; }
  header h1 {
    font-size:22px; color:var(--rose-d); letter-spacing:1px; display:flex; align-items:center; gap:6px;
    font-weight:700;
  }
  header .sub { font-size:12px; color:var(--sub); margin-top:4px; }
  .mascot-wrap { position:relative; height:120px; margin-top:6px; }
  .mascot { position:absolute; right:-6px; bottom:-10px; width:120px; height:auto; }

  /* 宝宝信息小卡片(月龄+体重身高) */
  .baby-card {
    position:absolute; left:2px; bottom:10px; z-index:3;
    background:rgba(255,251,245,.95); border:1px solid var(--line);
    border-radius:18px; padding:11px 18px; text-align:left;
    box-shadow:0 4px 12px rgba(107,91,78,.08); min-width:150px;
  }
  .baby-card .bc-age { font-size:17px; font-weight:800; color:var(--rose-d); white-space:nowrap; }
  .baby-card .bc-wh { font-size:12.5px; color:var(--sub); margin-top:3px; white-space:nowrap; }
  .scallop {
    height:14px; margin-top:6px;
    background-image: radial-gradient(circle at 7px 0, transparent 7px, var(--cream) 7.5px);
    background-size: 14px 14px; background-position: 0 -7px;
  }

  .card {
    background:var(--card); border-radius:20px; margin:10px 14px;
    padding:16px; box-shadow:0 4px 16px rgba(85,67,60,.07), 0 1px 0 rgba(255,255,255,.6) inset;
    border:1px solid rgba(255,255,255,.5);
  }
  .card h2 { font-size:15px; margin-bottom:12px; display:flex; align-items:center; gap:6px; font-weight:700; color:var(--rose-d); }

  /* 提醒横幅 */
  #banner, #bannerRecord {
    margin:12px 14px 4px; padding:12px 16px; border-radius:16px;
    font-size:13px; font-weight:700; text-align:center;
    box-shadow:0 2px 8px rgba(85,67,60,.05);
  }
  #banner.ok, #bannerRecord.ok { background:var(--sage-t); color:var(--sage-d); }
  #banner.due, #bannerRecord.due { background:var(--rose-t); color:var(--rose-d); animation:pulse 2s infinite; }
  @keyframes pulse { 50% { opacity:.7; } }

  /* ---------- 首页:四宫格统计 ---------- */
  .stat-card {
    border-radius:18px; padding:13px 14px; display:flex; flex-direction:column; gap:6px;
  }
  .stat-card .si { width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
  .stat-card .sl { font-size:12px; color:var(--sub); font-weight:600; }
  .stat-card .sv { font-size:20px; font-weight:800; }
  .stat-card .sv small { font-size:12px; font-weight:600; margin-left:1px; }
  .s-rose  { background:var(--rose-t); } .s-rose .si { background:var(--rose); color:#fff; } .s-rose .sv { color:var(--rose-d); }
  .s-sage  { background:var(--sage-t); } .s-sage .si { background:var(--sage); color:#fff; } .s-sage .sv { color:var(--sage-d); }
  .s-sky   { background:var(--sky-t); }  .s-sky .si  { background:var(--sky);  color:#fff; } .s-sky .sv  { color:var(--sky-d); }
  .s-peach { background:var(--peach-t);} .s-peach .si{ background:var(--peach);color:#fff; } .s-peach .sv{ color:var(--peach-d); }

  /* ---------- 日历 ---------- */
  .cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
  .cal-head .cal-title { font-size:15px; font-weight:700; display:flex; align-items:center; gap:5px; }
  .cal-nav { background:var(--cream-d); border:none; width:26px; height:26px; border-radius:50%; color:var(--rose-d); font-size:14px; font-weight:700; }
  .cal-today-btn { border:none; background:var(--rose); color:#fff; font-size:11px; font-weight:700; padding:6px 12px; border-radius:99px; font-family:inherit; }
  .cal-weekdays { display:grid; grid-template-columns:repeat(7,1fr); text-align:center; font-size:11px; color:var(--sub); margin-bottom:4px; }
  .cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
  .cal-cell {
    aspect-ratio:1/0.92; border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:2px; border:none; background:transparent; font-family:inherit; padding:2px 0;
  }
  .cal-cell .d { font-size:12.5px; font-weight:700; color:var(--text); }
  .cal-cell.muted .d { color:#D8CAB6; }
  .cal-cell .m { font-size:9px; color:var(--rose-d); font-weight:700; display:flex; align-items:center; gap:1px; }
  .cal-cell.today .d { color:#fff; background:var(--rose); width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
  .cal-cell.sel:not(.today) { background:var(--rose-t); }
  .cal-cell.sel:not(.today) .d { color:var(--rose-d); }

  /* ---------- 当日详情 ---------- */
  .day-title { font-size:13px; color:var(--sub); margin-bottom:10px; }
  .grid4 { display:flex; gap:8px; text-align:center; margin-bottom:4px; }
  .grid4 > div { flex:1; }
  .grid4 .n { font-size:19px; font-weight:800; }
  .grid4 .l { font-size:10.5px; color:var(--sub); margin-top:2px; }
  .c-rose { color:var(--rose-d); } .c-sage { color:var(--sage-d); }
  .c-sky { color:var(--sky-d); } .c-peach { color:var(--peach-d); }

  /* 时间线 */
  .row {
    display:flex; align-items:center; gap:10px; padding:9px 2px;
    border-bottom:1px solid var(--line); font-size:14px;
  }
  .row:last-child { border-bottom:none; }
  .row .t { color:var(--sub); font-variant-numeric:tabular-nums; width:42px; flex-shrink:0; }
  .row .ricon { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .row .v { font-weight:700; flex:1; }
  .row .x { border:none; background:none; color:#D9CBB7; font-size:17px; padding:2px 6px; }
  .row .edit-btn { border:none; background:none; color:var(--sub); padding:4px 6px; display:flex; align-items:center; }
  .row .edit-btn svg { width:16px; height:16px; }
  .row .edit-btn:active { color:var(--rose-d); }
  .latest-tag {
    font-size:10px; font-weight:800; color:var(--rose-d); background:var(--rose-t);
    border-radius:99px; padding:2px 8px; margin-left:6px; flex-shrink:0;
  }
  .empty { color:var(--sub); font-size:13px; text-align:center; padding:14px 0; }

  /* 按钮 */
  .btn {
    border:none; border-radius:15px; padding:14px 0; width:100%;
    font-size:16px; font-weight:700; color:#fff; font-family:inherit;
  }
  .btn-rose { background:var(--rose); } .btn-sage { background:var(--sage); }
  .btn-half { display:flex; gap:10px; }
  .btn-half .btn { font-size:14px; padding:12px 0; }
  .btn-sky { background:var(--sky); } .btn-peach { background:var(--peach); } .btn-lilac { background:var(--lilac); }

  /* 可爱水彩风尿尿/粑粑按钮 */
  .diaper-btn {
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
    border:none; border-radius:18px; padding:14px 0 12px; width:100%; font-family:inherit;
    font-size:13px; font-weight:800;
  }
  .diaper-btn.pee { background:var(--sky-t); color:var(--sky-d); }
  .diaper-btn.poo { background:var(--peach-t); color:var(--peach-d); }
  .diaper-btn .ico-cute { width:34px; height:34px; }
  .diaper-btn.selectable { opacity:.5; transition:opacity .15s, box-shadow .15s; }
  .diaper-btn.selectable.sel { opacity:1; box-shadow:0 0 0 2px var(--rose-d) inset; }

  .note { font-size:12px; color:var(--sub); line-height:1.7; margin-top:10px; }

  /* 底部导航 */
  nav {
    position:fixed; bottom:0; left:50%; transform:translateX(-50%);
    width:100%; max-width:480px; display:flex;
    background:var(--card); border-top:1px solid var(--line);
    padding:6px 0 calc(env(safe-area-inset-bottom) + 4px);
  }
  nav button {
    flex:1; border:none; background:none; padding:6px 0 4px;
    font-size:11px; color:var(--sub); font-family:inherit; font-weight:600;
  }
  nav button .nb { width:34px; height:26px; margin:0 auto 2px; display:flex; align-items:center; justify-content:center; border-radius:12px; }
  nav button.on { color:var(--rose-d); }
  nav button.on .nb { background:var(--rose-t); }

  /* 弹窗 */
  #overlay, #diaperOverlay {
    display:none; position:fixed; inset:0; background:rgba(107,91,78,.4);
    z-index:20; align-items:flex-end; justify-content:center;
  }
  #overlay.show, #diaperOverlay.show { display:flex; }
  .sheet {
    background:var(--cream); width:100%; max-width:480px;
    border-radius:24px 24px 0 0; padding:22px 18px 34px;
  }
  .sheet h3 { text-align:center; font-size:16px; margin-bottom:16px; font-weight:700; color:var(--rose-d); }
  .amounts { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; margin-bottom:6px; }
  .amounts button {
    border:2px solid var(--line); background:var(--card); border-radius:14px;
    padding:14px 0; font-size:17px; font-weight:700; color:var(--text); font-family:inherit;
  }
  .amounts button.sel { border-color:var(--rose-d); background:var(--rose-t); color:var(--rose-d); }
  .hint { font-size:11px; color:var(--sub); text-align:center; margin-bottom:12px; }
  .custom { display:flex; gap:8px; align-items:center; margin-bottom:16px; }
  .custom input {
    flex:1; border:2px solid var(--line); border-radius:14px; background:var(--card);
    padding:13px; font-size:16px; text-align:center; font-family:inherit; color:var(--text);
  }
  .sheet .btns { display:flex; gap:10px; }
  .btn-gray { background:#E4DACA; color:#8A7E6C; }

  /* 报告页 */
  .seg { display:flex; background:var(--cream-d); border-radius:13px; padding:3px; margin:14px 14px 4px; }
  .seg button {
    flex:1; border:none; border-radius:11px; padding:9px 0; font-size:13px;
    background:none; color:var(--sub); font-weight:700; font-family:inherit;
  }
  .seg button.on { background:var(--card); color:var(--rose-d); box-shadow:0 1px 3px rgba(0,0,0,.08); }
  canvas { width:100%; height:auto; }
  #reportText { white-space:pre-wrap; font-size:13px; line-height:1.9; color:var(--sub); }
  textarea {
    width:100%; border:2px solid var(--line); border-radius:14px; background:var(--card);
    padding:10px; font-size:12px; font-family:inherit; color:var(--text); min-height:70px;
  }
  .page { display:none; } .page.on { display:block; }

  .ico { width:19px; height:19px; vertical-align:-4px; flex-shrink:0; }
  .card h2 .ico { color:var(--rose-d); }
  .dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:4px; }
