:root {
  --bg: #fff6ee;
  --paper: #ffffff;
  --ink: #3f3a37;
  --muted: #8c8178;
  --line: #f3e2d4;
  --sage: #7e9484;
  --sage-soft: #e7f0ea;
  --rose: #c4a39a;
  --beige: #fff1e6;
  --alert: #b86b66;
  --alert-bg: #f8e8e6;
  --field: #ffffff;
  --accent: #f4a261;
  --num: #e8892a;
  --age: #2f6fdb;
  --age-bg: #e7f2ff;
  --ok: #2e9b62;
  --nav-current: var(--accent);
  color-scheme: light;
  font-family: "PingFang SC", "HarmonyOS Sans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

[data-theme="sage"] { --bg: #e4efe6; --paper: #f7fbf8; --beige: #dce8df; --line: #d3e2d6; }
[data-theme="rose"] { --bg: #f6ebe8; --paper: #fffaf8; --beige: #f3e4e0; --line: #ead6d1; }
[data-theme="mist"] { --bg: #e8eef2; --paper: #f8fbfc; --beige: #e3eaef; --line: #d5e0e6; --sage: #6e8b92; --sage-soft: #e3eef0; }
[data-theme="oat"] { --bg: #f3ead8; --paper: #fffdf8; --beige: #efe4d2; --line: #e6d8c4; }
[data-theme="dusk"] {
  --bg: #2c2826; --paper: #3f3a37; --ink: #f6f1ec; --muted: #c4b8ae; --line: #5c534e;
  --sage: #8fa894; --sage-soft: #3d4a42; --rose: #d7b2aa; --beige: #4a433f;
  --alert: #f0b2ad; --alert-bg: #5a3a38; --field: #4a433f; color-scheme: dark;
}
[data-theme="sage"],
[data-theme="rose"],
[data-theme="mist"],
[data-theme="oat"],
[data-theme="dusk"] {
  --accent: var(--sage);
  --num: var(--ink);
  --age: var(--ink);
  --age-bg: var(--beige);
  --ok: var(--sage);
  --nav-current: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
#app { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--bg); padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
header { padding: calc(16px + env(safe-area-inset-top)) 16px 8px; }
.person { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 0; text-align: left; min-height: 56px; }
.id-text { min-width: 0; }
.title { display: block; font-size: 22px; margin: 0; }
#who-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; white-space: pre-line; }
#who[hidden], #plain-title[hidden], .summary[hidden] { display: none; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--beige); color: var(--ink); display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar[data-size="s"] { width: 48px; height: 48px; }
.avatar[data-size="l"] { width: 88px; height: 88px; }
.avatar b { font-size: 24px; font-weight: 600; }
.avatar[data-size="s"] b { font-size: 18px; }
.avatar[data-size="l"] b { font-size: 32px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-setup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-pick { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: 12px; }
.file-pick input { display: none; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 16px 12px; }
.summary div { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 10px; min-height: 64px; }
.summary span { display: block; color: var(--muted); font-size: 12px; }
.summary strong { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--num); white-space: nowrap; }
.summary small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.summary .warn { background: var(--alert-bg); border-color: #efd0cd; }
main { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.card, .row, .sheet { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 1px 2px rgba(63, 58, 55, .05); }
.card { padding: 14px; }
button.card { display: block; width: 100%; text-align: left; border: 0; }
.card h2 { margin: 0 0 8px; font-size: 16px; }
.muted { color: var(--muted); margin: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.primary, .ghost, .danger, .row { min-height: 48px; border-radius: 20px; }
.primary, .ghost, .danger { border-radius: 999px; }
.primary { border: 0; background: var(--accent); color: white; }
.ghost { border: 1px solid var(--line); background: var(--beige); }
.row { width: 100%; text-align: left; padding: 10px 12px; }
.row small { display: block; color: var(--muted); }
.badge { color: var(--rose); font-size: 12px; }
.alert { background: var(--alert-bg); color: var(--alert); border-radius: 12px; padding: 12px; }
nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(480px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav button { min-height: 52px; border: 0; background: transparent; color: var(--muted); }
nav button[aria-current="page"] { color: var(--nav-current); font-weight: 700; }
.confirm { position: fixed; inset: 0; z-index: 6; background: rgba(63, 58, 55, .35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.confirm:empty { display: none; }
.confirm-card { width: min(400px, 100%); background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.confirm-card h2 { margin: 0 0 8px; font-size: 18px; }
.confirm-card p { margin: 0; }
.confirm-card .choices { margin-top: 16px; }
.check-code { margin: 12px 0 4px; font-size: 28px; letter-spacing: .28em; font-weight: 700; text-align: center; }
.confirm-card .remember { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.seal-bar { height: 8px; margin-top: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.seal-bar > span { display: block; height: 100%; background: var(--accent); }
.danger { border: 0; background: var(--alert); color: #fff; }
.drawer { position: fixed; inset: 0; background: rgba(63, 58, 55, .35); display: flex; align-items: flex-end; justify-content: center; z-index: 5; }
.drawer[hidden] { display: none; }
.sheet { width: min(480px, 100%); height: min(640px, 78vh); border-radius: 20px 20px 0 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px; flex: none; }
.sheet-head h2 { flex: 1; margin: 0; padding: 0; }
.icon-tool { width: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; }
.care-row { display: flex; align-items: center; gap: 8px; text-align: left; }
.care-row .mark { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--beige); }
.care-row .row-text { flex: 1; min-width: 0; }
.row-time { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.3; font-weight: 400; }
.law-sheet { background: #fff5f7; }
.law-sheet .sheet-body { background: #fff5f7; }
.chart-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 10px; }
.chart-tabs button { border: 0; background: transparent; min-height: 36px; padding: 0 8px; color: var(--muted); border-bottom: 2px solid transparent; border-radius: 0; white-space: nowrap; }
.chart-tabs button[aria-pressed="true"] { color: #f07aa0; border-bottom-color: #f07aa0; font-weight: 700; }
.chart-tabs button[data-tab="sleep"][aria-pressed="true"] { color: #9b8ec4; border-bottom-color: #9b8ec4; }
.chart-tabs button[data-tab="diaper"][aria-pressed="true"] { color: #f4a261; border-bottom-color: #f4a261; }
.chart-tabs button[data-tab="solid"][aria-pressed="true"] { color: #e9a15b; border-bottom-color: #e9a15b; }
.law { border: 1px solid #f6d5de; border-radius: 16px; padding: 10px; margin: 0 0 12px; background: #fff; }
.law-tag { display: inline-block; background: #f07aa0; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.law-tag.sleep { background: #9b8ec4; }
.law-tag.diaper, .law-tag.solid { background: #f4a261; }
.law-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.law-card-head span, .law-sub { color: var(--muted); font-size: 12px; }
.law-sub { margin: 8px 0 2px; }
.law-avg { margin: 10px auto 0; width: fit-content; padding: 4px 12px; border-radius: 999px; background: #fff0f4; color: #f07aa0; font-size: 13px; }
.law-plot { width: 100%; height: auto; display: block; }
.law-legend, .law-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.law-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.law-legend svg { vertical-align: -3px; margin-right: 2px; }
.law-filter button { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.law-filter button[aria-pressed="false"] { opacity: .4; }
.law-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 11px; color: var(--muted); }
.law-days b { display: block; color: var(--ink); font-weight: 600; }
.law-days.head { margin: 8px 0 4px; }
.ref-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ref-table th, .ref-table td { border-bottom: 1px solid var(--line); padding: 8px 4px; text-align: left; vertical-align: top; }
.ref-table tr.now { background: var(--beige); }
.sheet-body { flex: 1; overflow: auto; padding: 0 16px 8px; }
.sheet-actions { flex: none; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
label { display: block; margin: 10px 0; }
label.remember { display: flex; align-items: center; gap: 8px; min-height: 44px; }
label.remember input { width: 18px; height: 18px; }
label span, .label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], input[type="datetime-local"], input[type="time"], select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--field); }
textarea { min-height: 88px; resize: vertical; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.themes label { margin: 0; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 6px; padding: 8px 6px; background: var(--paper); white-space: nowrap; }
.themes i { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: block; }
.themes input { width: 14px; height: 14px; flex: none; margin: 0; accent-color: var(--sage); }
.choices { display: flex; gap: 12px; }
.error { color: var(--alert); min-height: 1.2em; }
#lock-form button:disabled { opacity: 0.55; }
.about a { color: var(--sage); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos figure { margin: 0; width: 64px; }
.photos img, main img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--beige); }
main img { margin-top: 6px; }
.sizes { display: flex; gap: 8px; margin: 8px 0; }
.sizes button { min-width: 64px; }
.sizes button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--sage); }
.chart { width: 100%; height: auto; background: var(--paper); border-radius: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; user-select: none; }
.cal b, .cal button, .cal i { display: grid; place-items: center; min-height: 36px; font-style: normal; font-weight: 500; border-radius: 8px; }
.cal b { color: var(--muted); font-size: 12px; }
.cal button { border: 1px solid transparent; background: transparent; }
.cal .out { color: var(--muted); }
.cal .recorded { background: #f8d7d2; color: #9c3d45; font-weight: 700; }
.cal .predicted:not(.recorded) { box-shadow: inset 0 0 0 1.5px var(--rose); }
.cal .today, .cal .selected { background: #e7f2ff; color: #2f6fdb; box-shadow: inset 0 0 0 2px #2f6fdb; }
.cal .recorded.today, .cal .recorded.selected { background: #f8d7d2; color: #9c3d45; font-weight: 700; box-shadow: inset 0 0 0 2px #2f6fdb; }
.legend { display: flex; gap: 12px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
.legend .recorded { background: #f8d7d2; }
.legend .selected { background: #e7f2ff; box-shadow: inset 0 0 0 2px #2f6fdb; }
.legend .predicted { box-shadow: inset 0 0 0 1.5px var(--rose); }
#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #3f3a37; color: #fffdfb; padding: 10px 14px; border-radius: 999px; max-width: 90%; z-index: 8; }
#toast[hidden] { display: none; }
.month { display: flex; justify-content: space-between; align-items: center; }
.entries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.entries button { min-height: 64px; border: 1px solid var(--line); background: var(--paper); border-radius: 20px; padding: 8px; }
.tabs { display: flex; gap: 4px; overflow: auto; }
.tabs button { flex: 1 0 auto; min-height: 40px; border: 0; background: transparent; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--sage); }
.growth-home-head { display: flex; align-items: flex-start; gap: 8px; }
.growth-home .tap { flex: 1; border: 0; background: transparent; padding: 0; text-align: left; min-height: 44px; }
.float-cam { position: fixed; z-index: 4; right: calc(max(0px, (100% - 480px) / 2) + 14px); top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: #F4A261; color: #fff; display: grid; place-items: center; padding: 0; box-shadow: 0 6px 16px rgba(244, 162, 97, .35); }
.growth-photos { display: flex; gap: 8px; margin-top: 8px; }
.growth-photos img { flex: 1 1 0; width: 0; min-width: 0; height: 160px; object-fit: cover; border-radius: 12px; }
.moment { text-align: left; }
.moment .tap { display: block; width: 100%; border: 0; background: transparent; padding: 0; text-align: left; }
.moment-text { white-space: pre-wrap; margin: 6px 0 0; }
.moment-feed { display: flex; flex-direction: column; gap: 10px; }
.moment-media { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.moment-media img, .moment-media video { width: auto; height: auto; max-width: 100%; object-fit: contain; border-radius: 12px; background: var(--beige); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; text-align: center; }
.metrics b { display: block; font-size: 18px; }
.metrics small { display: block; color: var(--muted); font-size: 12px; }
.metrics .ok { color: var(--ok); }
.metrics .bad { color: var(--alert); }
.chips { display: flex; gap: 6px; overflow: auto; padding-bottom: 2px; }
.chips button { flex: none; }
.bar, .vax-head, .vax-date { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tap { width: 100%; text-align: left; }
.tap small { display: block; color: var(--muted); }
.timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline h3 { margin: 8px 0 0; font-size: 15px; }
.tag { font-size: 12px; border: 1px solid var(--sage); color: var(--sage); border-radius: 999px; padding: 0 6px; }
.tag.paid { border-color: var(--rose); color: var(--rose); }
.check { display: flex; align-items: center; gap: 8px; }
.food { position: relative; }
.food b { float: right; }
.food.ok b { color: var(--sage); }
.food.caution b { color: #9a7040; }
.food.no b { color: var(--alert); }
.food.early b { color: var(--muted); }
.food p { clear: both; margin: 6px 0 0; }
input[type="search"] { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--field); }
.face { display: inline-flex; align-items: center; justify-content: center; font-style: normal; vertical-align: middle; }
.record-icon { display: inline-block; flex: none; vertical-align: middle; }
.emoji-row .record-icon { width: 30px; height: 30px; }
.row-text .record-icon { margin-right: 4px; vertical-align: -5px; }
.info-cell.assess .record-icon { margin-right: 4px; vertical-align: -4px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-head h2 { margin: 0; }
.baby-id { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.baby-name { color: var(--age); font-size: 18px; font-weight: 700; }
.baby-date { margin: 4px 0; color: var(--num); font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
button.baby-id { width: 100%; border: 0; background: transparent; padding: 0; text-align: left; min-height: 44px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.pager span { color: var(--muted); font-size: 13px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-cell { border-radius: 16px; padding: 10px; background: var(--bg); min-height: 72px; }
.info-cell.age { background: var(--age-bg); }
.info-cell span { display: block; color: var(--muted); font-size: 12px; }
.info-cell b { display: block; margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--num); }
.info-cell small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.info-cell.age b { color: var(--age); }
.info-cell.assess.ok b { color: var(--ok); }
.info-cell.assess.bad { background: var(--alert-bg); }
.info-cell.assess.bad b { color: var(--alert); font-size: 14px; font-weight: 600; }
.diaper-hero, .form-hero { display: flex; justify-content: center; min-height: 76px; margin: 4px 0 8px; }
.diaper-empty { width: 72px; height: 72px; border: 2px dashed var(--line); border-radius: 50%; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 64px; min-height: 72px; padding: 6px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.pick .mark { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 16px; }
.pick { position: relative; }
.pick[aria-pressed="true"] { color: var(--ink); }
.pick-check { position: absolute; right: 4px; bottom: 18px; width: 14px; height: 14px; border-radius: 50%; background: #F4A261; }
.pick-check::before { content: ""; position: absolute; left: 4px; top: 2px; width: 3px; height: 6px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pick.rash { min-width: 72px; min-height: 44px; border-radius: 16px; background: transparent; }
.pick.rash[aria-pressed="true"] { background: #F4A261; color: #fff; }
.feed-actions { display: flex; gap: 2px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 4px; }
.care-tile { flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 88px; padding: 4px 2px; border: 0; border-radius: 16px; background: transparent; font-size: 12px; line-height: 1.2; color: var(--ink); }
.care-tile .mark { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--beige); }
.side-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--beige); border-radius: 16px; padding: 10px 12px; margin: 8px 0; }
.tick { display: block; font-variant-numeric: tabular-nums; font-size: 32px; font-weight: 700; color: var(--num); letter-spacing: .02em; }
.pair { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pair input { flex: 1; min-width: 0; }
.color-dot { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(63, 58, 55, .12); }
.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-row button { min-width: 44px; min-height: 44px; padding: 0; font-size: 22px; }
.emoji-row button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.font-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.font-picks button { min-width: 0; padding: 8px; text-align: center; }
.font-picks button[aria-pressed="true"] { border-color: var(--accent); background: var(--beige); color: var(--accent); }
body[data-font="round"] { font-family: "Yuanti SC", "YouYuan", "PingFang SC", "Microsoft YaHei", sans-serif; }
body[data-font="kai"] { font-family: "KaiTi", "STKaiti", "Kaiti SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
body[data-font="xing"] { font-family: "STXingkai", "Xingkai SC", "KaiTi", "PingFang SC", "Microsoft YaHei", sans-serif; }
.login-tabs { margin: 8px 0 12px; overflow: visible; }
.login-tabs button { min-height: 44px; cursor: pointer; }
.access-banner { margin-bottom: 12px; }
.access-banner p { margin: 4px 0 0; }
.account-card p { margin: 8px 0; }
.button-link { display: block; min-height: 44px; padding: 12px; text-align: center; text-decoration: none; cursor: pointer; }
.button-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* 美柚参考风格：柔和粉薄荷、圆润卡片和轻量 SVG 图标。 */
:root {
  --cute-pink: #d93d78;
  --cute-pink-dark: #b92d63;
  --cute-pink-soft: #fff0f6;
  --cute-mint: #e4f7f1;
  --cute-yellow: #fff4d9;
  --cute-shadow: 0 8px 24px rgba(133, 75, 101, .08);
  --cute-shadow-hover: 0 10px 26px rgba(133, 75, 101, .13);
}
body:not([data-theme]), body[data-theme="default"] {
  --bg: #fff4f8;
  --paper: #fffdfd;
  --ink: #493a43;
  --muted: #75616b;
  --line: #f2dce5;
  --sage: #4f8d7a;
  --sage-soft: #e4f7f1;
  --rose: #b94b70;
  --beige: #fff0f6;
  --field: #fffafd;
  --accent: var(--cute-pink);
  --num: #bd3269;
  --age: #347768;
  --age-bg: var(--cute-mint);
  --ok: #247a59;
  --nav-current: var(--cute-pink-dark);
}
body {
  min-height: 100dvh;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
body:not([data-theme]), body[data-theme="default"] {
  background-image:
    radial-gradient(circle at 8% 4%, rgba(255, 255, 255, .9) 0 58px, transparent 59px),
    radial-gradient(circle at 96% 12%, rgba(228, 247, 241, .9) 0 96px, transparent 97px),
    linear-gradient(180deg, #ffe6f0 0, #fff5f9 310px, #faf7fb 100%);
  background-attachment: fixed;
}
body[data-theme]:not([data-theme="default"]):not([data-theme="dusk"]) {
  background-image: linear-gradient(180deg, var(--beige), var(--bg) 320px);
}
#app {
  position: relative;
  min-height: 100dvh;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
  background: transparent;
}
header { padding: calc(18px + env(safe-area-inset-top)) 16px 10px; }
.person {
  min-height: 88px;
  padding: 12px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  box-shadow: var(--cute-shadow);
}
.title { font-size: 23px; line-height: 1.35; font-weight: 800; letter-spacing: .01em; }
#who-sub { color: var(--muted); font-size: 13px; line-height: 1.5; }
#plain-title { padding: 8px 4px; font-size: 28px; color: var(--ink); }
.avatar {
  width: 62px;
  height: 62px;
  border: 3px solid var(--paper);
  background: var(--cute-pink-soft);
  box-shadow: 0 0 0 2px #f3bfd2, 0 5px 12px rgba(164, 80, 114, .12);
}
.avatar b { color: var(--cute-pink-dark); font-weight: 800; }
.summary { gap: 9px; padding: 10px 16px 14px; }
.summary div {
  min-height: 76px;
  padding: 11px 10px;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 5px 16px rgba(104, 74, 87, .06);
}
body:not([data-theme]) .summary div:nth-child(1), body[data-theme="default"] .summary div:nth-child(1) { background: var(--cute-pink-soft); }
body:not([data-theme]) .summary div:nth-child(2), body[data-theme="default"] .summary div:nth-child(2) { background: var(--cute-mint); }
body:not([data-theme]) .summary div:nth-child(3), body[data-theme="default"] .summary div:nth-child(3) { background: var(--cute-yellow); }
.summary span, .summary small { color: var(--muted); line-height: 1.35; }
.summary strong { margin-top: 6px; font-size: 16px; line-height: 1.3; }
main { gap: 14px; padding: 0 16px 20px; }
.card, .sheet, .confirm-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--cute-shadow);
}
.card { padding: 16px; }
button.card { border: 1px solid var(--line); }
.card h2 { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 18px; line-height: 1.4; }
.card h2 > svg { flex: none; }
button, .button-link, input, select, textarea { outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, var(--paper));
  outline-offset: 3px;
}
.primary, .ghost, .danger, .entries button, .row, button.card, .care-tile, .pick {
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}
.primary:active, .ghost:active, .danger:active, .entries button:active, .row:active, button.card:active, .care-tile:active, .pick:active { transform: scale(.98); }
.primary, .ghost, .danger { min-height: 46px; padding: 9px 16px; font-weight: 700; }
.primary { background: var(--accent); color: #fffafd; box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 24%, transparent); }
.primary:hover { opacity: .92; }
.ghost { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.ghost:hover { background: var(--beige); }
main > .primary, .sheet-actions .primary, #lock-form .primary { width: 100%; }
.entries {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 12px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--cute-shadow);
}
.entries button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 88px;
  padding: 2px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}
.entries button:hover { background: var(--beige); }
.entry-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 19px; }
.entry-mark.feed { background: #e9f5fb; }
.entry-mark.growth { background: #e5f6ef; }
.entry-mark.food { background: #fff0f2; }
.entry-mark.vaccine { background: #fff3dc; }
.row {
  min-height: 52px;
  padding: 11px 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
}
.row:hover { background: var(--beige); }
.card .row + .row { border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.care-row { gap: 10px; }
.care-row .mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--beige);
}
.row small, .row-time { color: var(--muted); line-height: 1.45; }
.muted { line-height: 1.6; }
nav {
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(456px, calc(100% - 24px));
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  box-shadow: 0 10px 30px rgba(102, 62, 82, .15);
  backdrop-filter: blur(14px);
}
nav:has(button[data-panel="mom"][hidden]) { grid-template-columns: repeat(3, 1fr); }
nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 58px;
  padding: 4px 2px;
  border-radius: 18px;
  color: var(--muted);
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}
nav button[hidden] { display: none; }
nav button[aria-current="page"] { color: var(--nav-current); background: var(--beige); font-weight: 800; }
nav button:active { transform: scale(.96); }
.nav-icon { display: grid; place-items: center; width: 26px; height: 26px; }
.nav-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { font-size: 11px; line-height: 1.35; }
#toast { bottom: calc(100px + env(safe-area-inset-bottom)); background: var(--ink); box-shadow: 0 8px 20px rgba(50, 35, 43, .18); }
.login-hero { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; }
.login-mark { display: grid; place-items: center; flex: none; width: 68px; height: 68px; border-radius: 24px; background: var(--cute-mint); transform: rotate(-3deg); }
.login-hero strong { display: block; font-size: 19px; line-height: 1.4; }
.login-hero p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
body:has(#lock-form) header,
body:has(#lock-form) nav { display: none; }
#app:has(#lock-form) { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
#lock-form { margin-top: 4vh; padding: 22px; border-radius: 28px; }
#lock-form h2 { font-size: 23px; }
#lock-form .remember { padding: 4px 0; }
label span, .label { color: var(--muted); line-height: 1.5; }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], input[type="datetime-local"], input[type="time"], input[type="search"], select, textarea {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}
input:not([type]) {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.chips { gap: 7px; padding: 3px 2px 7px; scrollbar-width: thin; }
.chips button {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  white-space: nowrap;
}
.chips button[aria-pressed="true"] { border-color: transparent; background: var(--beige); color: var(--accent); font-weight: 700; }
.drawer { background: rgba(73, 58, 67, .32); backdrop-filter: blur(3px); }
.sheet { position: relative; height: min(720px, 84dvh); border-radius: 28px 28px 0 0; border-bottom: 0; }
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 44px; height: 4px; border-radius: 99px; background: var(--line); transform: translateX(-50%); }
.sheet-head { padding-top: 22px; }
.sheet-head h2 { font-size: 20px; }
.sheet-body { padding-top: 4px; }
.sheet-actions { border-top: 1px solid var(--line); background: var(--paper); }
.tabs { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.tabs button { min-height: 44px; padding: 4px 9px; border: 0; border-radius: 14px; }
.tabs button[aria-current="page"] { color: var(--accent); background: var(--beige); border: 0; }
.info-cell { border-radius: 18px; background: var(--bg); }
.info-cell.age { background: var(--age-bg); }
.info-cell b { line-height: 1.35; }
.float-cam { background: var(--accent); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.float-cam:active { transform: translateY(-50%) scale(.96); }
.moment { overflow: hidden; }
.moment::before { content: ""; display: block; width: 44px; height: 4px; margin-bottom: 8px; border-radius: 99px; background: var(--line); }
.tag { padding: 2px 8px; border: 0; background: var(--sage-soft); }
.tag.paid { background: var(--cute-pink-soft); }
.themes label { border-radius: 16px; }
.confirm { background: rgba(73, 58, 67, .38); backdrop-filter: blur(3px); }
.confirm-card { padding: 20px; border-radius: 26px; }

/* 「我的」只保留入口，账号与外观详情统一收进设置。 */
.mine-menu { display: flex; flex-direction: column; gap: 12px; }
.mine-item {
  width: 100%; min-height: 82px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center; gap: 12px; padding: 14px; text-align: left; border: 1px solid var(--line);
  border-radius: 24px; background: var(--paper); box-shadow: var(--cute-shadow);
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}
.mine-item:hover { transform: translateY(-1px); box-shadow: var(--cute-shadow-hover); }
.mine-item:active { transform: scale(.98); }
.mine-item:focus-visible, .settings-link:focus-visible, .password-settings summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mine-item-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: var(--cute-pink-soft); color: var(--accent); }
.mine-item-icon.mint { background: var(--cute-mint); color: var(--sage); }
.mine-item-icon svg, .mine-chevron { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mine-item-icon svg { width: 26px; height: 26px; }
.mine-item-copy { min-width: 0; }
.mine-item-copy strong, .mine-item-copy small { display: block; }
.mine-item-copy strong { font-size: 17px; }
.mine-item-copy small { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.mine-chevron { width: 20px; height: 20px; color: var(--muted); }
.settings-group { padding: 10px 0 16px; border-bottom: 1px solid var(--line); }
.settings-group + .settings-group { margin-top: 14px; }
.settings-group h3 { margin: 0 0 12px; font-size: 16px; }
.settings-group .label { margin-top: 14px; }
.settings-account-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-account-line strong { min-width: 0; overflow-wrap: anywhere; font-size: 18px; }
.settings-account-line > span { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--ink); font-size: 12px; }
.settings-access { margin: 12px 0 0; }
.settings-access > div { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; }
.settings-access dt { flex: none; color: var(--muted); font-size: 13px; }
.settings-access dd { margin: 0; text-align: right; font-size: 13px; }
.settings-link { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: var(--beige); color: var(--ink); text-decoration: none; font-weight: 700; }
.settings-link:hover { color: var(--accent); }
.settings-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.password-settings { margin-top: 4px; }
.password-settings summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; border-radius: 12px; color: var(--muted); cursor: pointer; list-style: none; }
.password-settings summary::-webkit-details-marker { display: none; }
.password-settings summary::after { content: "+"; color: var(--accent); font-size: 22px; }
.password-settings[open] summary::after { content: "−"; }
.password-fields { padding: 0 0 4px; }
.password-fields button { width: 100%; }
.settings-signout { width: 100%; margin-top: 16px; }
.settings-about { padding: 10px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.settings-about > span { display: block; }
.settings-about a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: var(--muted); }
@media (max-width: 380px) {
  header, main { padding-left: 12px; padding-right: 12px; }
  .summary { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .summary div { padding: 9px 7px; }
  .summary strong { font-size: 14px; }
  .entries { padding-left: 4px; padding-right: 4px; }
  .entry-mark { width: 50px; height: 50px; }
  .person { padding: 10px; }
  .title { font-size: 21px; }
}
@media (min-width: 768px) {
  #app { border-left: 1px solid rgba(255, 255, 255, .55); border-right: 1px solid rgba(255, 255, 255, .55); }
  .person:hover, button.card:hover { box-shadow: var(--cute-shadow-hover); }
}
.dev-preview { width: min(448px, calc(100% - 32px)); margin: 8px auto 0; padding: 8px 12px; border: 1px solid #b8d8cc; border-radius: 14px; background: #edf7f2; color: #315f4c; font-size: 13px; line-height: 1.5; text-align: center; }
.dev-preview[hidden] { display: none; }
body.is-booting header,
body.is-booting nav,
body.is-booting #summary { display: none; }
body.is-booting #app { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.boot-card { margin-top: min(18vh, 120px); padding: 30px 24px; text-align: center; }
.boot-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 24px; background: var(--cute-pink-soft); animation: boot-breathe 1.8s ease-in-out infinite; }
.boot-mark svg { width: 38px; height: 38px; fill: var(--accent); }
.boot-card h2 { justify-content: center; margin: 0 0 18px; font-size: 20px; }
.boot-track { height: 10px; overflow: hidden; border-radius: 999px; background: var(--beige); }
.boot-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f6b2ca, var(--accent)); transition: width 240ms ease-out; }
#boot-step { margin-top: 14px; font-size: 13px; }
@keyframes boot-breathe { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  .primary, .ghost, .danger, .entries button, .row, button.card, .care-tile, .pick, nav button, .boot-track > span { transition: none; }
  .boot-mark { animation: none; }
}
