* { box-sizing: border-box; margin: 0; }
:root { --brand: #2563eb; --bg: #f6f7f9; --card: #fff; --line: #e5e7eb; --text: #111827; --muted: #6b7280; --danger: #dc2626; }
body { font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 560px; margin: 0 auto; padding: 12px 12px 48px; }
.topnav { display: flex; gap: 8px; align-items: center; max-width: 560px; margin: 0 auto; padding: 10px 12px; }
.topnav a { flex: 1; text-align: center; padding: 10px 2px; min-height: 44px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.topnav a.active { background: var(--brand); color: #fff; }
.topnav form { flex-shrink: 0; }
.linklike { background: none; border: none; color: var(--muted); padding: 10px 4px; min-height: 44px; font-size: 15px; }
.login-title { text-align: center; margin: 48px 0 24px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input { padding: 14px; font-size: 18px; border: 1px solid var(--line); border-radius: 10px; }
.btn-primary { background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 14px; font-size: 18px; font-weight: 700; min-height: 48px; }
.error { color: var(--danger); font-weight: 600; }
.datebar { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.datenav { color: var(--brand); text-decoration: none; padding: 10px 6px; min-height: 44px; display: flex; align-items: center; }
.datemid { text-align: center; }
/* 原来是 13px 裸文字,实际可点高度约 18px,手机上按不中 */
.backtoday { display: inline-flex; align-items: center; justify-content: center; margin-top: 4px; padding: 0 12px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--brand); border: 1px solid var(--brand); border-radius: 999px; text-decoration: none; }
/* 补录历史日期的唯一入口:点一下调起手机系统日期轮盘 */
.datepick { display: block; margin: 6px auto 0; min-height: 44px; font-size: 16px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
.banner { background: #fef2f2; padding: 10px; border-radius: 10px; margin-bottom: 8px; }
.adjust-banner { background: #eff6ff; border: 1px solid #bfdbfe; color: var(--text); font-weight: 600; }
.remind-banner { display: block; background: #fefce8; border: 1px solid #fde68a; color: var(--text); font-weight: 700; text-decoration: none; }
.btn-block { display: block; text-align: center; text-decoration: none; }
.reviewcta p { display: flex; align-items: center; gap: 8px; }
.weeklist { list-style: none; }
.weeklist li { border-top: 1px solid var(--line); }
.reviewflag { flex-shrink: 0; font-size: 13px; color: #16a34a; }
.mingli { background: linear-gradient(135deg, #fdf6ec, #fff); border-color: #f0e0c8; }
.mingli-shishen { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.mingli-tendency { font-weight: 700; margin-bottom: 6px; }
.mingli-hint { line-height: 1.6; margin-bottom: 8px; }
.mingli-notes-title { font-size: 15px; margin: 12px 0 8px; padding-top: 10px; border-top: 1px dashed #f0e0c8; }
.diary-date a { color: var(--text); text-decoration: none; }
.diary-date a::after { content: " ›"; color: var(--muted); font-weight: 400; }
/* 今天页命理精简入口条 */
.mingli-entry { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-decoration: none; color: var(--text); background: linear-gradient(135deg, #fdf6ec, #fff); border-color: #f0e0c8; }
.mingli-entry .me-line { font-weight: 600; }
.mingli-entry .me-more { flex-shrink: 0; color: var(--brand); font-weight: 600; font-size: 14px; }
/* 命理页 */
.mingli-year { background: linear-gradient(135deg, #eef2ff, #fff); border-color: #dbe3ff; }
.monthlist { list-style: none; }
.monthlist li { padding: 10px 8px; border-top: 1px solid var(--line); border-radius: 8px; }
.monthlist li.cur { background: #fff7ed; border: 1px solid #fdba74; }
.monthlist li.warn .mtend { color: var(--danger); font-weight: 700; }
.monthlist li.top .mtend { color: #b45309; font-weight: 700; }
.monthlist .mlabel { font-weight: 700; margin-right: 8px; }
.monthlist .mtend { font-size: 13px; }
.monthlist .mhint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.nodelist { list-style: none; }
.nodelist li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.nodelist .nkey { flex-shrink: 0; color: var(--muted); font-size: 13px; width: 130px; }
.nodelist .nval { font-weight: 600; }
.mingli-disclaimer { padding: 0 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.card h2 { font-size: 16px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; padding: 0 16px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
/* 只在修改模式出现:记错日子时把这一笔搬到别的天 */
.editdate { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; }
.editdate input { flex: 1; padding: 10px; font-size: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 48px; }
/* 归类口径:直接摊开显示。做成可展开的用户嫌多点一下,不如就放在那儿 */
.cathelp { margin: 0 0 12px 18px; padding: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.cathelp strong { color: var(--text); }
.rangerow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.rangerow label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.rangerow input[type="time"] { flex: 1; min-width: 120px; padding: 10px; font-size: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 48px; }
.range-calc { width: 100%; color: var(--brand); font-weight: 700; }
.range-calc.bad { color: var(--danger); }
textarea { width: 100%; padding: 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
textarea { margin-bottom: 8px; resize: none; overflow: hidden; line-height: 1.5; }
.note-input { margin-bottom: 10px; }
.btn-sm { min-height: 44px; font-size: 16px; }
.totals { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; color: var(--muted); font-weight: 600; }
.entries, .diary { list-style: none; }
.entries li, .diary li { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
/* 条目行必须能换行:带客户名标签后,6 字客户名就能把"改/删"挤出 375px 屏幕外,
   而横向滑动在 iOS 上常被当成返回手势 —— 那条记录就等于改不了也删不掉 */
.entries li { flex-wrap: wrap; }
.entries .time, .diary .time { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.entries .cat { font-weight: 700; flex-shrink: 0; }
.entries .note, .diary .content { flex: 1; overflow-wrap: anywhere; }
/* 备注独占一行,否则会被客户名标签压成一个字宽的竖条 */
.entries .note { flex: 1 1 100%; }
.entries .hours { flex-shrink: 0; }
.del { background: none; border: none; color: var(--danger); padding: 8px; min-height: 40px; }
.edit { color: var(--brand); text-decoration: none; padding: 8px 4px; min-height: 40px; flex-shrink: 0; }
.cancel-edit { display: inline-block; margin-left: 12px; padding: 12px 4px; color: var(--muted); }
.muted { color: var(--muted); }
.northstar { text-align: center; }
.ns-total { color: var(--muted); font-weight: 600; }
.ns-pct { font-size: 34px; margin: 4px 0; }
.ns-pct strong { color: var(--brand); }
.footnote { font-size: 12px; }
.barrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.barlabel { width: 56px; flex-shrink: 0; font-weight: 600; font-size: 14px; }
.bartrack { flex: 1; height: 14px; background: var(--bg); border-radius: 7px; overflow: hidden; }
.barfill { height: 100%; background: var(--brand); border-radius: 7px; }
.barval { flex-shrink: 0; font-size: 13px; color: var(--muted); min-width: 76px; text-align: right; }
.daylist { list-style: none; }
.daylist li { border-top: 1px solid var(--line); }
.daylink { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; min-height: 44px; text-decoration: none; color: var(--text); }
.dayname { font-weight: 700; flex-shrink: 0; }
.daytotal { flex-shrink: 0; color: var(--brand); font-weight: 700; }
.dayparts { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 13px; }

/* T-018 项目/客户 */
.projrow { margin-bottom: 8px; }
.proj-input { width: 100%; padding: 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 48px; }
.projpicks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.projpick { padding: 0 12px; min-height: 36px; font-size: 14px; border: 1px dashed var(--line); border-radius: 999px; background: #fff; color: var(--muted); }
.projpick.on { border-style: solid; border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 700; }
/* 三者缺一不可:只让行换行而不给标签宽度上限,30 字客户名自己就比卡片还宽 */
.proj-tag { flex-shrink: 1; min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.barlabel-wide { width: 92px; overflow-wrap: anywhere; }

/* M-007 四象限要事 */
.focusbar.focus-now { border-left: 4px solid var(--danger); }
.focusbar.focus-plan { border-left: 4px solid #d97706; }
.axis { color: var(--muted); font-size: 12px; margin-left: 4px; }
.focustally { margin-top: 6px; font-size: 14px; }
.focustally a { color: var(--brand); text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
.focuslist { list-style: none; }
.focuslist li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.focuslist li:first-child { border-top: none; }
.focusdone { flex-shrink: 0; }
.focuscheck { width: 32px; height: 32px; min-height: 32px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 16px; line-height: 1; }
.focuscheck.on { border-color: var(--brand); color: var(--brand); }
.focustitle { flex: 1 1 60%; overflow-wrap: anywhere; }
.focusops { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-left: auto; }
.focusops form { display: inline; }
.focuslist.done .focustitle { color: var(--muted); text-decoration: line-through; }
.quadn { font-size: 13px; font-weight: 400; }
.quad-now { border-left: 4px solid var(--danger); }
.quad-plan { border-left: 4px solid #d97706; }
.quad-give { border-left: 4px solid var(--brand); }
.quad-drop { border-left: 4px solid var(--line); }

/* T-017 板块管理 */
/* 入口必须长在"用户产生需求的那一刻正看着的地方"——板块选择行的末尾 */
/* 虚线=不是板块选项;品牌色=和旁边未选中的灰框 chip 彻底区分开,否则会被当成"一个没选中的板块"跳过 */
.chip-manage { display: inline-flex; align-items: center; padding: 0 14px; min-height: 44px; border: 1px dashed var(--brand); border-radius: 999px; background: #fff; color: var(--brand); font-weight: 600; text-decoration: none; font-size: 15px; }
.btn-outline { display: block; text-align: center; margin-top: 10px; padding: 12px; min-height: 44px; border: 1px solid var(--brand); border-radius: 10px; color: var(--brand); font-weight: 600; text-decoration: none; }
.catnew { display: flex; gap: 8px; }
.catnew input { flex: 1; padding: 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; min-height: 48px; }
.catlist { list-style: none; }
.catlist li { padding: 10px 0; border-top: 1px solid var(--line); }
.catlist li.retired { opacity: .55; }
.catrename { display: flex; gap: 8px; align-items: center; }
.catrename input { flex: 1; padding: 10px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; }
.catmeta { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 2px; }
.nsflag { color: var(--brand); font-weight: 700; }
.pjflag { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.catops { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.catops form { display: inline; }
