:root {
  --pri: #0f766e; --pri-2: #14b8a6; --pri-soft: #e6f6f4; --warm: #f59e0b; --warm-soft: #fff7e6;
  --bg: #f4f7f6; --card: #ffffff; --line: #e5ecea; --text: #1f2a2a; --sub: #4f5f5d; --mute: #7a8a88;
  --good: #16a34a; --normal: #0ea5e9; --attention: #f59e0b; --alert: #dc2626;
  --r: 1rem; --shadow: 0 2px 0.75rem rgba(15, 118, 110, .08);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font: 1rem/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.app { max-width: 35rem; margin: 0 auto; min-height: 100vh; padding-bottom: 5.25rem; position: relative; }

/* 顶部 */
.top { background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%); color: #fff; padding: 1.125rem 1.125rem 2.875rem; border-radius: 0 0 1.625rem 1.625rem; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; }
.brand { font-size: 0.8125rem; opacity: .85; letter-spacing: 0.0313rem; }
.ver { font-size: 0.6875rem; padding: 0 0.375rem; border-radius: 0.375rem; background: rgba(255,255,255,.22); letter-spacing: 0; }
.elder-name { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.badge { font-size: 0.75rem; font-weight: 500; padding: 2px 0.5rem; border-radius: 6.1875rem; background: rgba(255,255,255,.22); }
.who { display: inline-flex; align-items: center; gap: 0.375rem; background: rgba(255,255,255,.18); padding: 0.375rem 0.75rem; border-radius: 6.1875rem; font-size: 0.875rem; color: #fff; white-space: nowrap; }
.top-date { font-size: 0.8125rem; opacity: .9; margin-top: 2px; }

.wrap { padding: 0 0.875rem; margin-top: -1.875rem; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem; margin-bottom: 0.875rem; }
.card h3 { margin: 0 0 0.625rem; font-size: 1.0625rem; display: flex; align-items: center; gap: 0.5rem; }
.card h3 .sub { font-weight: 400; color: var(--mute); font-size: 0.8125rem; margin-left: auto; }
.muted { color: var(--mute); font-size: 0.8125rem; }
.hello { font-size: 1rem; font-weight: 600; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.75rem; }
.stat { background: var(--bg); border-radius: 0.75rem; padding: 0.5rem 0.375rem; text-align: center; }
.stat b { display: block; font-size: 1.25rem; color: var(--pri); line-height: 1.2; }
.stat span { font-size: 0.75rem; color: var(--sub); }
.remind { margin-top: 0.625rem; padding: 0.5rem 0.75rem; background: var(--warm-soft); color: #92400e; border-radius: 0.625rem; font-size: 0.875rem; }
.remind.alert { background: #fef2f2; color: #991b1b; }

/* 智能识别 */
.smart textarea { width: 100%; min-height: 6.75rem; border: 1.5px solid var(--line); border-radius: 0.75rem; padding: 0.625rem 0.75rem; resize: vertical; background: #fbfdfc; outline: none; font-size: 0.9375rem; }
.smart textarea:focus { border-color: var(--pri-2); background: #fff; }
.smart-actions { display: flex; gap: 0.5rem; margin-top: 0.625rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; padding: 0.625rem 1rem; border-radius: 0.75rem; background: var(--bg); color: var(--text); font-weight: 500; font-size: 0.9375rem; transition: transform .1s; }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--pri); color: #fff; }
.btn.warm { background: var(--warm); color: #fff; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.danger { background: #fef2f2; color: var(--alert); }
.btn.block { width: 100%; padding: 0.8125rem; font-size: 1rem; }
.btn.sm { padding: 0.375rem 0.75rem; font-size: 0.875rem; border-radius: 0.625rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.grow { flex: 1; }
.tag-ai { font-size: 0.6875rem; padding: 1px 0.375rem; border-radius: 0.375rem; background: linear-gradient(90deg, #8b5cf6, #ec4899); color: #fff; font-weight: 600; }

.parsed { margin-top: 0.75rem; }
.pitem { border: 1.5px solid var(--line); border-radius: 0.875rem; padding: 0.75rem; margin-bottom: 0.625rem; background: #fff; }
.pitem-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.pitem-head select, .pitem-head input[type=time] { border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.3125rem 0.5rem; background: #fff; font-size: 0.875rem; }
.pitem-head .del { margin-left: auto; color: var(--mute); font-size: 1.25rem; padding: 0 0.25rem; }
.pitem-raw { font-size: 0.75rem; color: var(--mute); margin-top: 0.375rem; border-top: 1px dashed var(--line); padding-top: 0.375rem; }

/* 快捷记录 */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.625rem; }
.qbtn { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.75rem 2px 0.625rem; border-radius: 0.875rem; background: var(--bg); font-size: 0.8125rem; color: var(--sub); position: relative; }
.qbtn .ic { font-size: 1.625rem; line-height: 1; width: 2.875rem; height: 2.875rem; border-radius: 0.875rem; display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 1px 0.25rem rgba(0,0,0,.05); }
.qbtn .cnt { position: absolute; top: 0.375rem; right: 0.625rem; background: var(--pri); color: #fff; font-size: 0.6875rem; min-width: 1.125rem; height: 1.125rem; border-radius: 0.5625rem; display: flex; align-items: center; justify-content: center; padding: 0 0.3125rem; }
.qbtn:active { background: var(--pri-soft); }

/* 记录列表 */
.rec { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.rec:last-child { border-bottom: 0; }
.rec .ic { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.rec .body { flex: 1; min-width: 0; }
.rec .t1 { display: flex; gap: 0.5rem; align-items: baseline; }
.rec .t1 b { font-size: 0.9375rem; }
.rec .t1 .time { color: var(--mute); font-size: 0.8125rem; margin-left: auto; white-space: nowrap; }
.rec .sum { font-size: 0.875rem; color: var(--sub); word-break: break-all; }
.rec .meta { font-size: 0.75rem; color: var(--mute); margin-top: 2px; }
.thumbs { display: flex; gap: 0.375rem; margin-top: 0.375rem; flex-wrap: wrap; }
.thumbs img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 0.5rem; background: var(--bg); }
.empty { text-align: center; color: var(--mute); padding: 1.625rem 0; font-size: 0.875rem; }
.empty .big { font-size: 2.5rem; display: block; margin-bottom: 0.375rem; }

.datebar { display: flex; align-items: center; gap: 0.5rem; }
.datebar input { flex: 1; border: 1.5px solid var(--line); border-radius: 0.625rem; padding: 0.5rem 0.625rem; text-align: center; background: #fff; }
.datebar .btn { padding: 0.5rem 0.875rem; }

/* 底部导航 */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(0.5rem); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs-in { max-width: 35rem; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tab { padding: 0.5rem 0 0.375rem; display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; color: var(--mute); gap: 2px; }
.tab .ti { font-size: 1.375rem; line-height: 1.1; filter: grayscale(1); opacity: .7; }
.tab.on { color: var(--pri); font-weight: 600; }
.tab.on .ti { filter: none; opacity: 1; }

/* 底部弹层 */
.mask { position: fixed; inset: 0; background: rgba(15, 30, 30, .45); z-index: 40; display: none; }
.mask.show { display: block; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 35rem; margin: 0 auto; background: #fff; border-radius: 1.375rem 1.375rem 0 0; max-height: 92vh; display: none; flex-direction: column; }
.sheet.show { display: flex; animation: up .25s ease-out; }
.sheet-head { display: flex; align-items: center; padding: 0.875rem 1rem 0.5rem; gap: 0.625rem; border-bottom: 1px solid var(--line); }
.sheet-head h4 { margin: 0; font-size: 1.125rem; flex: 1; display: flex; align-items: center; gap: 0.5rem; }
.sheet-head .x { font-size: 1.625rem; color: var(--mute); line-height: 1; padding: 0 0.25rem; }
.sheet-body { overflow-y: auto; padding: 0.75rem 1rem 1rem; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 0.625rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 0.625rem; }
@keyframes up { from { transform: translateY(2.5rem); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 表单 */
.field { margin-bottom: 0.875rem; }
.field > label { display: block; font-size: 0.875rem; color: var(--sub); margin-bottom: 0.375rem; font-weight: 500; }
.field input[type=text], .field input[type=number], .field input[type=time], .field input[type=date], .field input[type=month], .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 0.625rem; padding: 0.625rem 0.75rem; background: #fff; outline: none; font-size: 1rem; }
.field textarea { min-height: 5rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--pri-2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { padding: 0.4375rem 0.875rem; border-radius: 6.1875rem; background: var(--bg); border: 1.5px solid transparent; font-size: 0.875rem; color: var(--sub); }
.chip.on { background: var(--pri-soft); border-color: var(--pri-2); color: var(--pri); font-weight: 600; }
.chip.add { border: 1.5px dashed var(--line); background: #fff; }
.quick { display: flex; gap: 0.375rem; flex-wrap: wrap; margin-top: 0.375rem; }
.quick button { padding: 0.25rem 0.625rem; border-radius: 0.5rem; background: var(--bg); font-size: 0.8125rem; color: var(--sub); }
.foodrow { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; }
.foodrow input { flex: 1; min-width: 0; }
.foodrow input.amt { flex: 0 0 6rem; }
.foodrow .rm { color: var(--mute); font-size: 1.25rem; padding: 0 0.25rem; }
.hint { font-size: 0.75rem; color: var(--mute); margin-top: 0.25rem; }
.ai-sugg { margin-top: 0.5rem; padding: 0.625rem; border-radius: 0.625rem; background: #f5f3ff; font-size: 0.8125rem; color: #5b21b6; }
.photos { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.photos .ph { width: 4.5rem; height: 4.5rem; border-radius: 0.625rem; overflow: hidden; position: relative; background: var(--bg); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph .rm { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.55); color: #fff; width: 1.25rem; height: 1.25rem; border-radius: 0.625rem; font-size: 0.8125rem; line-height: 1.25rem; text-align: center; }
.photos .addph { width: 4.5rem; height: 4.5rem; border-radius: 0.625rem; border: 1.5px dashed var(--line); display: flex; align-items: center; justify-content: center; flex-direction: column; font-size: 0.75rem; color: var(--mute); }
.photos .addph span { font-size: 1.5rem; line-height: 1; }
.more-toggle { color: var(--pri); font-size: 0.875rem; margin: 0.25rem 0 0.625rem; }

/* 鼓励弹窗 */
.cheer { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 1.875rem; background: rgba(15,30,30,.35); }
.cheer.show { display: flex; animation: fade .2s; }
.cheer-card { background: #fff; border-radius: 1.5rem; padding: 1.625rem 1.375rem 1.25rem; text-align: center; max-width: 21.25rem; width: 100%; box-shadow: 0 1.25rem 3.125rem rgba(0,0,0,.18); animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.cheer-emoji { font-size: 3.375rem; line-height: 1; }
.cheer-title { font-size: 0.9375rem; color: var(--pri); font-weight: 700; margin: 0.625rem 0 0.375rem; }
.cheer-msg { font-size: 1.0625rem; font-weight: 600; line-height: 1.6; }
.cheer-extra { font-size: 0.875rem; color: var(--sub); margin-top: 0.5rem; }
.cheer .btn { margin-top: 1rem; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: fixed; top: -1.25rem; font-size: 1.375rem; z-index: 61; pointer-events: none; animation: fall 1.8s linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }

.toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); background: rgba(20,30,30,.88); color: #fff; padding: 0.75rem 1.125rem; border-radius: 0.75rem; z-index: 80; font-size: 0.9375rem; max-width: 80vw; text-align: center; display: none; }
.toast.show { display: block; animation: fade .2s; }
.loading { display: inline-block; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.loading.dark { border-color: rgba(15,118,110,.25); border-top-color: var(--pri); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 日报 */
.rep-hero { background: linear-gradient(135deg, #fff7e6, #e6f6f4); border-radius: var(--r); padding: 1.125rem; margin-bottom: 0.875rem; position: relative; overflow: hidden; }
.rep-hero .stars { font-size: 1.25rem; color: var(--warm); letter-spacing: 2px; }
.rep-hero .hl { font-size: 1.1875rem; font-weight: 700; margin: 0.375rem 0 0.5rem; line-height: 1.5; }
.rep-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.rep-tags span { background: #fff; color: var(--pri); font-size: 0.75rem; padding: 0.1875rem 0.625rem; border-radius: 6.1875rem; font-weight: 600; }
.src { position: absolute; top: 0.875rem; right: 0.875rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.kpi { text-align: center; padding: 0.5rem 2px; background: var(--bg); border-radius: 0.75rem; }
.kpi b { display: block; font-size: 1.125rem; color: var(--text); }
.kpi span { font-size: 0.75rem; color: var(--sub); }
.sec { display: flex; gap: 0.625rem; padding: 0.625rem 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; margin-top: 0.4375rem; flex: none; }
.dot.good { background: var(--good); } .dot.normal { background: var(--normal); } .dot.attention { background: var(--attention); } .dot.alert { background: var(--alert); }
.sec b { font-size: 0.9375rem; }
.sec p { margin: 2px 0 0; font-size: 0.875rem; color: var(--sub); }
.lv { font-size: 0.6875rem; padding: 1px 0.375rem; border-radius: 0.375rem; margin-left: 0.375rem; font-weight: 500; }
.lv.good { background: #dcfce7; color: #166534; } .lv.normal { background: #e0f2fe; color: #075985; } .lv.attention { background: #fef3c7; color: #92400e; } .lv.alert { background: #fee2e2; color: #991b1b; }
.alerts { background: #fef2f2; border-radius: 0.75rem; padding: 0.75rem 0.875rem; color: #991b1b; font-size: 0.875rem; }
.alerts ul, .sugg ul { margin: 0.375rem 0 0; padding-left: 1.25rem; }
.sugg ul { color: var(--sub); font-size: 0.875rem; }
.letter { border-radius: var(--r); padding: 1rem; margin-bottom: 0.875rem; font-size: 0.9375rem; line-height: 1.75; }
.letter.cg { background: linear-gradient(135deg, #fff1f2, #fff7ed); }
.letter.fm { background: linear-gradient(135deg, #eff6ff, #f0fdfa); }
.letter .lt { font-weight: 700; margin-bottom: 0.375rem; display: flex; align-items: center; gap: 0.375rem; }
.disc { font-size: 0.75rem; color: var(--mute); text-align: center; padding: 0.25rem 0.625rem 0.875rem; }
.act-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; margin-bottom: 0.875rem; }

/* 海报 */
.poster-view { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.82); display: none; flex-direction: column; align-items: center; padding: 1.25rem 1rem; overflow-y: auto; }
.poster-view.show { display: flex; }
.poster-view img { width: 100%; max-width: 26.25rem; border-radius: 0.875rem; box-shadow: 0 0.625rem 2.5rem rgba(0,0,0,.4); }
.poster-tip { color: #fff; font-size: 0.9375rem; margin: 0.875rem 0 0.5rem; text-align: center; }
.poster-btns { display: flex; gap: 0.625rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.875rem; }

/* 更多 */
.menu-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.menu-item:last-child { border-bottom: 0; }
.menu-item .mi { font-size: 1.375rem; width: 2.25rem; height: 2.25rem; border-radius: 0.625rem; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.menu-item .mt { flex: 1; }
.menu-item .mt small { display: block; color: var(--mute); font-size: 0.75rem; }
.menu-item .arr { color: var(--mute); }
.linkbox { background: var(--bg); border-radius: 0.625rem; padding: 0.625rem 0.75rem; font-size: 0.8125rem; word-break: break-all; color: var(--sub); margin: 0.5rem 0; }
.qr { display: flex; justify-content: center; margin: 0.625rem 0; }
.qr img { width: 11.25rem; height: 11.25rem; }
.wx-guide { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 90; color: #fff; display: none; padding: 1.25rem; text-align: center; }
.wx-guide.show { display: block; }
.wx-guide .arrow { position: absolute; top: 0.5rem; right: 1.375rem; font-size: 3rem; }
.wx-guide .box { margin-top: 5.625rem; font-size: 1.0625rem; line-height: 1.9; }
.wx-guide .box b { color: #fde68a; }

/* v1.1：其他输入、日期时间、已有记录、阈值、今日照护、趋势、设置页 */
.sub-hello { font-size: 0.9375rem; color: var(--sub); margin-top: 2px; }
.ic-orange { display: inline-block; filter: hue-rotate(170deg) saturate(1.6); }
.other-input { width: 100%; margin-top: 0.5rem; border: 1.5px dashed var(--pri-2); border-radius: 0.625rem; padding: 0.5625rem 0.75rem; font-size: 0.9375rem; outline: none; background: #fbfdfc; }
.dt { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0.5rem; }
.dt input { width: 100%; border: 1.5px solid var(--line); border-radius: 0.625rem; padding: 0.625rem 0.5rem; background: #fff; font-size: 0.9375rem; }
.th-hint { font-size: 0.75rem; color: var(--mute); margin-top: 0.1875rem; }
.th-hint.bad, .field input.bad { color: var(--alert); border-color: var(--alert); }
.warn-hint { color: #92400e; background: var(--warm-soft); border-radius: 0.5rem; padding: 0.375rem 0.625rem; margin-top: 0.375rem; font-size: 0.8125rem; }
.existing { margin-top: 1.125rem; border-top: 1.5px dashed var(--line); padding-top: 0.75rem; }
.existing-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.5rem; }
.ex-item { display: flex; gap: 0.625rem; align-items: center; padding: 0.625rem 0.75rem; background: var(--bg); border-radius: 0.75rem; margin-bottom: 0.5rem; }
.ex-body { flex: 1; min-width: 0; font-size: 0.875rem; color: var(--sub); word-break: break-all; }
.ex-body b { color: var(--text); }
.ex-body .meta { font-size: 0.75rem; color: var(--mute); margin-top: 2px; }
.ex-item .btn { flex: none; white-space: nowrap; }
.smart-photo { display: flex; gap: 0.625rem; align-items: center; margin-top: 0.625rem; padding: 0.5rem; background: var(--bg); border-radius: 0.75rem; font-size: 0.875rem; color: var(--sub); }
.smart-photo img { width: 4rem; height: 4rem; object-fit: cover; border-radius: 0.5rem; }
.focus { margin-top: 0.75rem; padding: 0.75rem 0.875rem; background: var(--pri-soft); border-radius: 0.75rem; }
.focus-title { font-weight: 600; color: var(--pri); }
.focus ul { margin: 0.375rem 0 0; padding-left: 1.25rem; color: var(--sub); font-size: 0.875rem; }
.team-row { display: flex; justify-content: space-between; gap: 0.625rem; padding: 0.3125rem 0; font-size: 0.9375rem; }
.team-row .muted { font-size: 0.875rem; color: var(--sub); text-align: right; }
.team-items { background: var(--bg); border-radius: 0.75rem; padding: 0.375rem 0.75rem; margin-top: 0.5rem; }
.th-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0.5rem 0.625rem; align-items: center; }
.th-grid input { width: 100%; border: 1.5px solid var(--line); border-radius: 0.625rem; padding: 0.5625rem 0.625rem; font-size: 1rem; }
.th-h { font-size: 0.8125rem; color: var(--sub); font-weight: 600; }
.th-n { font-size: 0.9375rem; }
.th-n small { display: block; color: var(--mute); font-size: 0.75rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 0.75rem; padding: 0.25rem; }
.seg button { padding: 0.5rem 0; border-radius: 0.5625rem; font-size: 0.9375rem; color: var(--sub); }
.seg button.on { background: #fff; color: var(--pri); font-weight: 600; box-shadow: 0 1px 0.25rem rgba(0,0,0,.08); }
.range-label { flex: 1; text-align: center; font-weight: 600; }
.trend-hl { font-size: 1.0625rem; font-weight: 700; line-height: 1.55; margin-bottom: 0.5rem; }
.tpoint { display: flex; gap: 0.5rem; padding: 0.5rem 0.625rem; border-radius: 0.625rem; margin-bottom: 0.375rem; font-size: 0.875rem; line-height: 1.6; }
.tpoint.good { background: #f0fdf4; color: #166534; }
.tpoint.progress { background: #eff6ff; color: #1e40af; }
.tpoint.attention { background: #fffbeb; color: #92400e; }
.tsum { font-size: 1rem; }
.tsum b { color: var(--pri); font-size: 1.25rem; }
.tsum b.bf { color: #d97706; }
.legend { display: flex; gap: 0.875rem; flex-wrap: wrap; margin-top: 0.5rem; font-size: 0.8125rem; color: var(--sub); align-items: center; }
.legend .sw { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 0.1875rem; margin-right: 0.25rem; vertical-align: -0.0625rem; }
.sw.same, .bseg.same { background: #14b8a6; }
.sw.bf, .bseg.bf { background: #f59e0b; }
.bars { display: flex; align-items: flex-end; gap: 0.375rem; }
.bars.month { gap: 2px; }
.bcol { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.bstack { width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.btop { font-size: 0.75rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.bars.month .btop { font-size: 0.625rem; }
.bseg { width: 72%; max-width: 2.125rem; color: #fff; font-size: 0.6875rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.bars.month .bseg { width: 100%; }
.bstack .bseg:first-of-type { border-radius: 0.3125rem 0.3125rem 0 0; }
.blv { font-size: 0.6875rem; margin-top: 0.25rem; padding: 1px 0.25rem; border-radius: 0.3125rem; white-space: nowrap; }
.blv.good { background: #dcfce7; color: #166534; } .blv.normal { background: #e0f2fe; color: #075985; }
.blv.attention { background: #fef3c7; color: #92400e; } .blv.alert { background: #fee2e2; color: #991b1b; } .blv.none { color: var(--mute); }
.bdot { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; margin-top: 0.25rem; background: var(--line); }
.bdot.good { background: var(--good); } .bdot.normal { background: var(--normal); } .bdot.attention { background: var(--attention); } .bdot.alert { background: var(--alert); }
.bday { font-size: 0.6875rem; color: var(--sub); margin-top: 2px; height: 1rem; white-space: nowrap; }
.settings .desc, .settings p, .settings .menu-item small, .settings .muted { color: #374151; }
.settings .desc { font-size: 0.875rem; margin-top: 0.5rem; line-height: 1.7; }
.settings p { font-size: 0.9375rem; line-height: 1.75; margin: 0.5rem 0; }
.disc-card { border: 1.5px solid #fecaca; background: #fffafa; }
.disc-card p { font-size: 1rem !important; color: #1f2937 !important; }

/* v1.0.2：字号、切换记录对象、设置入口、BMI、记录指标、自建指标 */
.bday { height: auto; min-height: 1.4em; }
html.fs-3 .grid { grid-template-columns: repeat(3, 1fr); }
html.fs-3 .kpis { grid-template-columns: repeat(3, 1fr); }
/* v1.0.3：超大字号（1.875rem）每行 2 个，保证字放得下 */
html.fs-4 .grid, html.fs-4 .kpis { grid-template-columns: repeat(2, 1fr); }
html.fs-4 .qbtn { font-size: 0.875rem; }
html.fs-3 .fs-steps, html.fs-4 .fs-steps { grid-template-columns: repeat(3, 1fr); }
html.fs-4 .tab { font-size: 0.6875rem; }
html.fs-4 .row2:not(.keep) { grid-template-columns: 1fr; gap: 0; }
html.fs-3 .card h3, html.fs-4 .card h3 { flex-wrap: wrap; }
html.fs-3 .card h3 .sub, html.fs-4 .card h3 .sub { margin-left: 0; width: 100%; }
html.fs-3 .qbtn .ic, html.fs-4 .qbtn .ic { width: 3.375rem; height: 3.375rem; font-size: 1.875rem; }
html.fs-3 .tab .ti, html.fs-4 .tab .ti { font-size: 1.625rem; }
.top-row > div:first-child { min-width: 0; }
.switch-btn { font-size: 0.8125rem; font-weight: 600; padding: 0.1875rem 0.625rem; border-radius: 6.1875rem; background: #fff; color: var(--pri); white-space: nowrap; }
.self-tag { font-size: 0.75rem; font-weight: 600; padding: 1px 0.5rem; border-radius: 6.1875rem; background: #fde68a; color: #92400e; }
.person { display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem; border: 1.5px solid var(--line); border-radius: 0.875rem; margin-bottom: 0.5rem; background: #fff; width: 100%; text-align: left; }
.person.on { border-color: var(--pri-2); background: var(--pri-soft); }
.person .pav { width: 2.625rem; height: 2.625rem; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.375rem; flex: none; }
.person .pinfo { flex: 1; min-width: 0; }
.person .pinfo b { font-size: 1.0625rem; }
.person .pinfo small { display: block; color: var(--sub); font-size: 0.8125rem; }
.person .pcur { color: var(--pri); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.person .prm { color: var(--mute); font-size: 0.8125rem; padding: 0.25rem 0.375rem; white-space: nowrap; }
.add-person { width: 100%; padding: 0.75rem; border: 1.5px dashed var(--pri-2); border-radius: 0.875rem; color: var(--pri); font-weight: 600; background: #fbfdfc; }
.set-group { padding: 0.25rem 1rem; }
.set-group .menu-item { padding: 0.9375rem 0; }
.set-group .menu-item .mt { font-size: 1rem; font-weight: 600; }
.set-title { font-size: 0.8125rem; color: #374151; margin: 0.25rem 0.25rem 0.375rem; font-weight: 600; }
.settings > .set-title:first-child { color: #fff; }
.ver-foot { text-align: center; font-size: 0.8125rem; color: #374151; padding: 0.375rem 0 1.125rem; }
.fs-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.375rem; margin-top: 0.625rem; }
.fs-steps button { padding: 0.625rem 0; border-radius: 0.625rem; background: var(--bg); border: 1.5px solid transparent; color: var(--sub); line-height: 1.2; }
.fs-steps button.on { background: var(--pri-soft); border-color: var(--pri-2); color: var(--pri); font-weight: 700; }
.fs-range { width: 100%; margin-top: 0.875rem; accent-color: var(--pri); height: 1.75rem; }
.fs-preview { margin-top: 0.75rem; padding: 0.875rem; background: var(--bg); border-radius: 0.75rem; line-height: 1.7; }
.bmi-box { margin: -0.25rem 0 0.875rem; padding: 0.75rem; border-radius: 0.75rem; background: var(--bg); font-size: 0.875rem; color: var(--sub); }
.bmi-box b { font-size: 1.25rem; color: var(--text); }
.bmi-bar { display: flex; height: 0.625rem; border-radius: 0.3125rem; overflow: hidden; margin: 0.5rem 0 0.25rem; position: relative; }
.bmi-bar i { display: block; height: 100%; }
.bmi-bar .mk { position: absolute; top: -0.25rem; width: 0.25rem; height: 1.125rem; border-radius: 2px; background: var(--text); transform: translateX(-0.125rem); }
.bmi-scale { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--mute); }
.metric-row { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0; border-bottom: 1px solid var(--line); }
.metric-row:last-child { border-bottom: 0; }
.metric-row .ic { font-size: 1.375rem; width: 2.25rem; text-align: center; }
.metric-row .nm { flex: 1; min-width: 0; }
.metric-row .nm small { display: block; color: var(--mute); font-size: 0.75rem; }
.metric-row .mv { color: var(--sub); font-size: 0.875rem; padding: 0.25rem 0.5rem; border-radius: 0.5rem; background: var(--bg); }
.metric-row .mv[disabled] { opacity: .3; }
.tgl { position: relative; width: 3rem; height: 1.75rem; flex: none; }
.tgl input { opacity: 0; width: 0; height: 0; }
.tgl span { position: absolute; inset: 0; background: #cbd5d3; border-radius: 0.875rem; transition: .2s; }
.tgl span::after { content: ''; position: absolute; left: 0.1875rem; top: 0.1875rem; width: 1.375rem; height: 1.375rem; background: #fff; border-radius: 50%; transition: .2s; }
.tgl input:checked + span { background: var(--pri); }
.tgl input:checked + span::after { transform: translateX(1.25rem); }
.preset { display: block; width: 100%; text-align: left; padding: 0.625rem 0.75rem; border: 1.5px solid var(--line); border-radius: 0.75rem; margin-bottom: 0.5rem; background: #fff; }
.preset b { font-size: 0.9375rem; }
.preset small { display: block; color: var(--sub); font-size: 0.8125rem; }
.qcard { border: 1.5px solid var(--line); border-radius: 0.75rem; padding: 0.75rem; margin-bottom: 0.625rem; background: #fbfdfc; }
.qcard-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-weight: 600; }
.qcard-head .sp { flex: 1; }
.qcard-head button { color: var(--mute); font-size: 0.875rem; padding: 2px 0.375rem; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.icon-pick button { width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; background: var(--bg); font-size: 1.25rem; border: 1.5px solid transparent; }
.icon-pick button.on { border-color: var(--pri-2); background: var(--pri-soft); }
.color-pick { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.color-pick button { width: 1.875rem; height: 1.875rem; border-radius: 50%; border: 0.1875rem solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.color-pick button.on { box-shadow: 0 0 0 0.1563rem var(--text); }
.custom-preview { border: 1.5px dashed var(--pri-2); border-radius: 0.875rem; padding: 0.75rem; margin-top: 0.375rem; background: #fff; }
.chk { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--sub); margin-top: 0.375rem; }

/* v1.0.3：设置页分级、权限、共享人、出生年月、历史记录 */
.set-sub { margin: 0 0 0.375rem 1.125rem; padding-left: 0.75rem; border-left: 0.1875rem solid var(--pri-soft); }
.set-sub .menu-item { padding: 0.75rem 0; }
.set-sub .menu-item .mt { font-size: 0.9375rem; }
.set-sub .menu-item .mi { width: 1.875rem; height: 1.875rem; font-size: 1.0625rem; border-radius: 0.5rem; }
.who-tag { color: var(--pri); font-weight: 600; }
.menu-item.locked .mt, .menu-item.locked .mi { opacity: .5; }
.remind.season { background: #fdf2f8; color: #9d174d; }
.view-only { background: #f0f9ff; color: #075985; border: 1.5px solid #bae6fd; font-size: 0.9375rem; line-height: 1.7; }
.qcard-head button[disabled] { opacity: .3; }
.birth { display: flex; align-items: center; gap: 0.375rem; }
.birth input { flex: 1; min-width: 0; }
.birth input.bm { flex: .6; }
.birth span { color: var(--sub); flex: none; }
.hist-link { display: block; margin: 1.125rem auto 0.25rem; color: var(--mute); font-size: 0.8125rem; padding: 0.375rem 0.625rem; }
.hist-item { border-bottom: 1px solid var(--line); padding: 0.625rem 0; }
.hist-item:last-child { border-bottom: 0; }
.hist-meta { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.875rem; }
.hist-meta span { color: var(--mute); }
.hist-item ul { margin: 0.375rem 0 0; padding-left: 1.25rem; color: #374151; font-size: 0.875rem; line-height: 1.7; }
.inv-card { border: 1.5px solid var(--line); border-radius: 0.875rem; padding: 0.75rem; margin-top: 0.625rem; background: #fff; }
.inv-head { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; }
.inv-ic { font-size: 1.25rem; }
.inv-desc { font-size: 0.8125rem; color: #374151; margin: 2px 0 0.375rem; }
.inv-card .linkbox { margin: 0.375rem 0; font-size: 0.75rem; }
.inv-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inv-card .qr { text-align: center; margin-top: 0.5rem; }
.member-list { padding: 0.25rem 0.75rem; box-shadow: none; border: 1.5px solid var(--line); }
.member-row { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.member-row:last-child { border-bottom: 0; }
.member-row .pav { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; flex: none; }
.member-row .pinfo { flex: 1; min-width: 7.5rem; }
.member-row .pinfo small { display: block; color: var(--sub); font-size: 0.75rem; }
.member-row .prm { color: var(--alert); font-size: 0.8125rem; padding: 0.25rem 0.375rem; }
.perm-sel { border: 1.5px solid var(--line); border-radius: 0.5rem; padding: 0.25rem 0.375rem; background: #fff; font-size: 0.875rem; }
.perm-tag { font-size: 0.75rem; font-weight: 600; padding: 2px 0.5rem; border-radius: 6.1875rem; white-space: nowrap; }
.perm-tag.admin { background: #fef3c7; color: #92400e; }
.perm-tag.editor { background: var(--pri-soft); color: var(--pri); }
.perm-tag.viewer { background: #e0f2fe; color: #075985; }
.join-box { background: var(--pri-soft); border-radius: 0.875rem; padding: 0.875rem; margin-bottom: 0.875rem; line-height: 1.7; }
.join-box b { font-size: 1.125rem; }
.join-box small { display: block; color: var(--sub); font-size: 0.8125rem; }
.join-perm { margin-top: 0.25rem; }
/* workbench.2: prevent long profile names from squeezing the identity action. */
.top-row > div:first-child { flex: 1 1 auto; min-width: 0; }
.top-row > .who { flex: 0 0 auto; max-width: 38%; }
.top-row > .who #whoName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elder-name { min-width: 0; max-width: 100%; }
.elder-name #elderName { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 430px) {
  .top { padding-left: 0.875rem; padding-right: 0.875rem; }
  .top-row { align-items: flex-start; gap: 0.5rem; }
  .elder-name { font-size: 1.25rem; }
  .top-row > .who { max-width: 34%; font-size: 0.8125rem; padding: 0.375rem 0.5rem; }
}
