/* ════════════════════════════════════════════════════════════
   朝乾夕惕 · 全局样式（原生 CSS 变量，无框架）
   版本：v1.1（2026-09-01）
   ════════════════════════════════════════════════════════════ */

:root {
  /* 主题（沿用 v1.0 母品牌 navy） */
  --navy: #1a2540;
  --navy-2: #243158;
  --accent: #2f6df6;
  --accent-soft: #e8effe;

  /* 文字 */
  --text: #1a1f2e;
  --text-2: #5a6478;
  --text-3: #98a1b3;

  /* 表面与边框 */
  --bg: #f5f6f9;
  --card: #ffffff;
  --border: #e4e7ee;

  /* 状态色（清单优先级映射：🔴P0 🟡P1 ⚪P2） */
  --p0: #d93026;
  --p1: #e8a33d;
  --p2: #98a1b3;
  --done: #2e9e5b;
  --danger: #d93026;

  /* 日课情绪/体力 */
  --energy-hi: #2e9e5b;
  --energy-mid: #e8a33d;
  --energy-lo: #d93026;

  /* 日历类别色标 */
  --cat-work: #2f6df6;
  --cat-family: #e8739a;
  --cat-personal: #6c5ce7;
  --cat-health: #2e9e5b;
  --cat-client: #e8913d;

  /* 布局 */
  --radius: 10px;
  --radius-sm: 6px;
  --topbar-h: 52px;
  --tabbar-h: 58px;
  --gap: 12px;
  --max-w: 640px;

  --shadow: 0 1px 3px rgba(20, 26, 44, 0.08);
  --shadow-lg: 0 6px 24px rgba(20, 26, 44, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── 通用控件 ─────────────────────────────── */
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--text-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; line-height: 1.2;
  transition: background 0.15s, opacity 0.15s; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:active { background: rgba(0,0,0,0.05); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #f0d0cd; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }

/* ── 提示条 ─────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px);
  transform: translateX(-50%); z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 18px;
  border-radius: 20px; font-size: 14px; max-width: 90vw;
  box-shadow: var(--shadow-lg); animation: toast-in 0.2s ease;
}
.toast.toast-error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── 登录页 ─────────────────────────────── */
.login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.login-card {
  width: 100%; max-width: 360px; background: var(--card);
  border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow-lg);
}
.login-logo { font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: 2px; text-align: center; }
.login-sub { text-align: center; color: var(--text-2); font-size: 13px; margin: 6px 0 24px; }
.login-hint { margin-top: 16px; text-align: center; font-size: 12px; color: var(--text-3); }
.error-text { color: var(--danger); font-size: 13px; margin-bottom: 10px; }

/* ── 应用壳 ─────────────────────────────── */
.app-view { max-width: var(--max-w); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--navy); color: #fff;
}
.topbar-brand { font-size: 16px; font-weight: 600; }
.topbar-actions .btn-ghost { color: rgba(255,255,255,0.85); font-size: 13px; padding: 6px 10px; }

.main { flex: 1; padding: var(--gap); padding-bottom: calc(var(--tabbar-h) + 20px); }

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: var(--max-w);
  height: var(--tabbar-h); display: flex; background: #fff;
  border-top: 1px solid var(--border); z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--text-2);
}
.tab-btn::before {
  content: ""; width: 22px; height: 22px; border-radius: 7px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0.75;
}
.tab-btn[data-tab="#/"]::before      { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 12h4l2-7 4 14 2-7h6'/%3E%3C/svg%3E"); }
.tab-btn[data-tab="#/dreams"]::before  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 17a10 10 0 0 1 20 0' stroke='%23d93026'/%3E%3Cpath d='M5 17a7 7 0 0 1 14 0' stroke='%23e8a33d'/%3E%3Cpath d='M8 17a4 4 0 0 1 8 0' stroke='%232e9e5b'/%3E%3C/svg%3E"); }
.tab-btn[data-tab="#/lists"]::before   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.tab-btn[data-tab="#/rinke"]::before   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M17 7l1.4-1.4M5.6 18.4L7 17'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"); }
.tab-btn[data-tab="#/calendar"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 9h18'/%3E%3C/svg%3E"); }
.tab-btn[data-tab="#/persona"]::before  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-3.5 4.5-5 8-5s6.5 1.5 8 5'/%3E%3C/svg%3E"); }

.tab-btn.active { color: var(--accent); font-weight: 600; }
.tab-btn.active::before { opacity: 1; stroke: var(--accent); }

/* ── 卡片与通用区块 ─────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 14px; box-shadow: var(--shadow); margin-bottom: var(--gap);
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.section-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 16px 0 8px; }

.empty-hint { color: var(--text-3); font-size: 13px; padding: 12px 0; text-align: center; }

/* ── 今日看板 ─────────────────────────────── */
.board-grid { display: flex; flex-direction: column; gap: var(--gap); }
.board-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.board-section-head h3 { font-size: 14px; font-weight: 600; color: var(--text-2); }
.board-section-head .link { font-size: 12px; color: var(--accent); }

.today-list { list-style: none; }
.today-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
.today-list li:last-child { border-bottom: none; }

.priority-badge {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff;
}
.priority-badge.p0 { background: var(--p0); }
.priority-badge.p1 { background: var(--p1); }
.priority-badge.p2 { background: var(--p2); }

.today-task-title { flex: 1; font-size: 14px; }
.today-task-title.done-text { text-decoration: line-through; color: var(--text-3); }

.checkbox {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff; position: relative;
  transition: all 0.15s;
}
.checkbox.checked { background: var(--done); border-color: var(--done); }
.checkbox.checked::after {
  content: ""; position: absolute; left: 6px; top: 2.5px;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.event-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.event-item:last-child { border-bottom: none; }
.event-time { flex: none; font-size: 13px; font-weight: 600; color: var(--text-2); width: 52px; }
.event-title { flex: 1; font-size: 14px; }
.event-cat { flex: none; font-size: 11px; color: #fff; border-radius: 10px; padding: 2px 8px; }
.event-cat.work { background: var(--cat-work); }
.event-cat.family { background: var(--cat-family); }
.event-cat.personal { background: var(--cat-personal); }
.event-cat.health { background: var(--cat-health); }
.event-cat.client { background: var(--cat-client); }

.entry-status-card { display: flex; gap: 10px; }
.entry-status {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; background: #fff; text-align: left;
}
.entry-status .es-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.entry-status .es-state { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.entry-status.done { border-color: var(--done); background: #f2faf5; }
.entry-status.done .es-state { color: var(--done); }

.quick-actions { display: flex; gap: 8px; }
.quick-actions .btn { flex: 1; }

/* ── 清单（四级树） ─────────────────────── */
/* Wave 3F：删除 .domain-tabs / .domain-tab —— ABCD 域 tab 早在 v1.5 就被季度目标导航 .q-tab 取代，
 * 全仓（js/index.html/css）已无任何引用，留着就是死规则。 */

/* ── 清单页 v1.5 · 季度目标导航（澳洲财年当季 tab，替代 ABCD 域 tab） ── */
.q-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.q-tab {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 6px 12px; border-radius: 16px; font-size: 13px;
  background: #fff; border: 1px solid var(--border); color: var(--text-2); cursor: pointer;
}
.q-tab .q-ic { flex: none; font-size: 13px; line-height: 1; }
.q-tab .q-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.q-tab .q-q {
  flex: none; font-size: 10px; font-weight: 700; line-height: 1.6;
  background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 0 6px;
}
.q-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.q-tab.active .q-q { background: rgba(255,255,255,.22); color: #fff; }
.g-strat-free { background: #eef0f4 !important; color: var(--text-2) !important; border-color: var(--border) !important; }

.tree-goal { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; margin-bottom: var(--gap); overflow: hidden; }
.tree-goal-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  background: var(--navy); color: #fff; cursor: pointer;
}
/* Wave 3F：删除 .g-domain（目标卡域字母徽标已移除，改用 🗂 战略归属标签），全仓无引用 */
.tree-goal-head .g-title { flex: 1; font-weight: 600; font-size: 15px; }
.tree-goal-head .g-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,0.18); }
.tree-goal-body { padding: 8px 12px; }

.tree-project { margin: 6px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tree-project-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--accent-soft); cursor: pointer; border-radius: var(--radius-sm);
}
.tree-project-head .p-title { flex: 1; font-weight: 600; font-size: 14px; }
.tree-project-head .p-deadline { font-size: 12px; color: var(--text-2); }
.tree-project-body { padding: 6px 10px; }

.tree-list { margin: 6px 0; }
.tree-list-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer;
  border-radius: var(--radius-sm);
}
.tree-list-head:hover { background: var(--bg); }
.tree-list-head .l-title { flex: 1; font-weight: 500; font-size: 14px; }
.tree-list-body { padding: 2px 6px 6px; }

.tree-task {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border-radius: var(--radius-sm);
}
.tree-task:hover { background: var(--bg); }
.tree-task .t-title { flex: 1; font-size: 14px; }
.tree-task .t-title.done-text { text-decoration: line-through; color: var(--text-3); }
.tree-task .t-deadline { font-size: 12px; color: var(--text-3); flex: none; }
/* Wave 3F：任务行不再显示 ABCD 域记号；看板「今日待办」行改显示「所属清单」，用 .t-belong 呈现 */
.t-belong { flex: none; font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 8px; padding: 0 6px; }

.row-actions { display: flex; gap: 4px; flex: none; }
.row-actions .btn { padding: 3px 7px; font-size: 12px; }

/* 折叠（v1.6）：head 收起态隐藏相邻 body —— 逐层独立（目标→项目→清单）
 * 旧规则 .collapsed .tree-project-body 是祖先包裹语义，而 collapsed 加在 head（body 兄弟）上，永远匹配不到 → 点击折叠从未生效；现改为相邻兄弟选择器（同梦想版 .d-*-head.d-collapsed + .d-*-body 写法） */
.tree-goal-head.collapsed + .tree-goal-body,
.tree-project-head.collapsed + .tree-project-body,
.tree-list-head.collapsed + .tree-list-body { display: none; }
/* 开合指示 caret：展开 ▾ / 收起 ▸（rotate -90deg） */
.tc {
  flex: none; width: 14px; text-align: center; font-size: 11px;
  color: inherit; opacity: .85; display: inline-block;
  transition: transform .15s ease;
}
.tree-goal-head.collapsed .tc,
.tree-project-head.collapsed .tc,
.tree-list-head.collapsed .tc { transform: rotate(-90deg); }
/* 清单工具栏（v1.6：新增目标 + 全开/收起） */
.list-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.list-toolbar .lt-spacer { flex: 1; }

/* ── 日课 ─────────────────────────────── */
.rinke-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.rinke-tab {
  flex: 1; padding: 9px 0; text-align: center; font-size: 14px; font-weight: 500;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-2);
}
.rinke-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.rinke-form .field textarea { min-height: 96px; resize: vertical; }
.scale-row { display: flex; gap: 16px; margin-bottom: 14px; }
.scale { flex: 1; }
.scale > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.scale input[type="range"] { width: 100%; accent-color: var(--accent); }
.scale-val { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.rinke-history { list-style: none; }
.rinke-history li { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.rinke-history li:last-child { border-bottom: none; }
.rinke-history .rh-date { font-size: 14px; font-weight: 500; }
.rinke-history .rh-type { font-size: 12px; color: var(--text-3); }
.rinke-history .rh-preview { font-size: 12px; color: var(--text-2); flex: 1; text-align: right; margin: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 日历 ─────────────────────────────── */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav .cal-week-label { font-size: 15px; font-weight: 600; }
.cal-nav .cal-nav-btns { display: flex; gap: 6px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 10px; }
.cal-day-head { text-align: center; font-size: 11px; color: var(--text-2); padding: 4px 0; }
.cal-day {
  min-height: 56px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px; position: relative; cursor: pointer;
}
.cal-day.today { border-color: var(--accent); background: var(--accent-soft); }
.cal-day .cal-day-num { font-size: 12px; font-weight: 600; color: var(--text-2); }
.cal-day .cal-day-count { position: absolute; top: 3px; right: 5px; font-size: 10px; color: var(--text-3); }
.cal-day .cal-day-dots { position: absolute; bottom: 3px; left: 3px; display: flex; gap: 2px; }
.cal-day .cal-day-dots .dot { width: 5px; height: 5px; border-radius: 50%; }

.cal-day-detail { margin-top: 8px; }
.cal-event {
  display: flex; align-items: center; gap: 8px; padding: 8px 4px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.cal-event:last-child { border-bottom: none; }
.cal-event .ce-color { flex: none; width: 4px; align-self: stretch; border-radius: 2px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 26, 44, 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal {
  width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow-y: auto;
}
.modal h3 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }

/* ── 分身 ─────────────────────────────── */
.persona-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 16px; margin-bottom: var(--gap); box-shadow: var(--shadow); }
.persona-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.persona-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--navy); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 700;
}
.persona-name { font-size: 16px; font-weight: 600; }
.persona-type {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); margin-top: 2px;
}
.persona-role { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.persona-cap-title, .persona-profile-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 10px 0 6px; }
.persona-caps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.persona-caps li { font-size: 12px; background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 12px; color: var(--text-2); }
.persona-profile { font-size: 13px; color: var(--text); white-space: pre-wrap; background: var(--bg); border-radius: var(--radius-sm); padding: 10px; }
.ai-params-note { font-size: 12px; color: var(--text-3); margin-top: 10px; }

/* ── 分身 · Wave 2.5 AI 面板 ─────────────────────── */
.persona-card { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.persona-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.persona-check { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.ai-panel { margin-top: var(--gap); }
.ai-panel-head { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.ai-offline-note { font-size: 12px; color: #b54708; background: #fff7e6; border: 1px solid #ffd591; border-radius: var(--radius-sm); padding: 8px 10px; margin: 8px 0; }
.cap-block { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.cap-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.cap-desc { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.cap-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cap-inline input[type="date"], .cap-inline select { font-size: 13px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--text); }
.cap-inline textarea { width: 100%; font-size: 13px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); resize: vertical; }
.ai-offline-tag { font-size: 12px; color: var(--text-3); }
.ai-busy { font-size: 12px; color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.ai-result { margin-top: 14px; }
.ai-result-title { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.ai-text { font-size: 13px; line-height: 1.7; background: var(--bg); border-radius: var(--radius-sm); padding: 10px; white-space: normal; }
.ai-error { font-size: 13px; color: #d93026; background: #fdecea; border: 1px solid #f5b5ae; border-radius: var(--radius-sm); padding: 10px; }
.ai-sub { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.ai-task-list { list-style: none; }
.ai-task-list li { font-size: 13px; padding: 5px 0; display: flex; align-items: center; gap: 8px; }
.ai-deadline { font-size: 12px; color: var(--text-3); }
.ai-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ai-stats span { font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 3px 10px; border-radius: 12px; }

/* ── 分身 · Wave 3F 能力框架 v2（问分身 / 快捷能力 chips / 邮件草稿） ── */
.persona-ask { margin-top: var(--gap); }
.ask-thread { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; max-height: 320px; overflow-y: auto; }
.ask-empty { font-size: 12px; color: var(--text-3); padding: 6px 0; }
.ask-msg { font-size: 13px; line-height: 1.6; border-radius: var(--radius-sm); padding: 8px 10px; max-width: 88%; white-space: pre-wrap; word-break: break-word; }
.ask-user { align-self: flex-end; background: var(--navy); color: #fff; }
.ask-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.ask-err { align-self: flex-start; background: #fdecea; border: 1px solid #f5b5ae; color: #d93026; }
.ask-input-row { align-items: flex-end; }
.ask-input-row textarea { flex: 1; min-width: 0; }

.cap-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.cap-chip {
  font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--accent-soft); color: var(--accent); border: 1px solid transparent;
}
.cap-chip:hover { border-color: var(--accent); }
.cap-forms:empty { display: none; }
.cap-form { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.cap-form .field { margin-bottom: 8px; }
.cap-form textarea { width: 100%; font-size: 13px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); resize: vertical; }
.ai-loading { font-size: 13px; color: var(--text-3); padding: 8px 0; }

.email-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.email-subject { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; word-break: break-word; }
.email-body { font-family: inherit; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; margin: 0; color: var(--text); }

/* ── 响应式：桌面 ─────────────────────────────── */
@media (min-width: 768px) {
  .topbar { border-radius: 0 0 10px 10px; }
  .tabbar { border-radius: 12px 12px 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.04); }
  .cal-day { min-height: 72px; }
}

/* ── 游离区 + 拖拽归位（v1.2） ─────────────────── */
.tree-goal.tree-orphan { border-style: dashed; background: #fbfcfe; }
.tree-goal.tree-orphan .tree-goal-head { background: var(--text-2); }
.tree-goal.tree-orphan .tree-goal-head .g-title { font-weight: 600; }
.tree-project-head[draggable="true"], .tree-task[draggable="true"] { cursor: grab; }
.tree-project-head[draggable="true"]:active, .tree-task[draggable="true"]:active { cursor: grabbing; }
.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft) !important; }

/* ── 梦想版战略层（v1.3） ─────────────────── */
.dream-sub { font-size: 12px; color: var(--text-2); margin: 2px 0 10px; }
.dir-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.dir-chips::-webkit-scrollbar { display: none; }
.dir-chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer; }
.dir-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.d-dir { margin-bottom: 14px; }
.d-dir-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--navy, #1a2540); border-radius: var(--radius) var(--radius) 0 0; color: #fff; }
.d-dir-icon { font-size: 18px; }
.d-dir-name { font-size: 15px; font-weight: 700; flex: 1; }
.d-dir-body { background: var(--card); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 8px; }
.d-card { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 8px 0; background: #fff; }
.d-card.d-dormant { opacity: .58; filter: saturate(.45); }
.d-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--accent-soft); border-radius: var(--radius-sm) var(--radius-sm) 0 0; flex-wrap: wrap; }
.d-card.d-dormant .d-card-head { background: #eef0f3; }
.d-title { font-weight: 600; font-size: 14px; flex: 1; min-width: 120px; }
.d-card.d-dormant .d-title { color: var(--text-2); }
.d-badge { flex: none; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.d-badge.ms { background: #e8a13a; }
.d-badge.ms.ok { background: #2e9e5b; }
.d-badge-dim { background: #8a94a6; }
.d-note { font-size: 12.5px; color: var(--text-2); padding: 6px 10px 2px; white-space: normal; }
.d-note.dim { color: #a5adba; }
.d-card-body { padding: 4px 10px 10px; }
.d-sub-label { font-size: 11px; font-weight: 600; color: var(--text-2); margin: 8px 0 4px; letter-spacing: .5px; }
.d-addrow { margin-top: 6px; }
.form-hint { font-size: 12px; color: var(--text-2); margin-top: 6px; }
/* 里程碑行 */
.d-ms { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 6px 0; background: #fafbfd; }
.d-ms-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; flex-wrap: wrap; }
.d-ms-title { font-weight: 500; font-size: 13.5px; flex: 1; min-width: 120px; }
.d-ms-body { padding: 2px 10px 8px; border-top: 1px dashed var(--border); }
/* 折叠：head.d-collapsed 隐藏相邻 body */
.d-ms-head.d-collapsed + .d-ms-body, .d-ag-head.d-collapsed + .d-ag-body, .d-card-head.d-collapsed + .d-card-body { display: none; }
/* 年度目标 */
.d-year { margin: 6px 0; }
.d-year-label { font-size: 11px; font-weight: 700; color: var(--text-2); margin: 4px 0 2px; }
.d-ag { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 4px 0; background: #fff; }
.d-ag-head { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; flex-wrap: wrap; }
.d-ag-title { font-size: 13px; flex: 1; min-width: 110px; }
.d-ag-meta { font-size: 11px; color: #2e9e5b; flex: none; }
.d-ag-body { padding: 2px 8px 8px; border-top: 1px dashed var(--border); }
/* 季度槽 */
.d-q { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 4px 0; flex-wrap: wrap; }
.d-q.d-q-done { background: #f0faf3; border-color: #bfe3cc; }
.d-q-tag { flex: none; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; }
.d-q-text { flex: 1; font-size: 13px; min-width: 100px; }
.d-q-text i { color: #a5adba; font-style: normal; }
.d-q-goals { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.d-goal-chip { font-size: 11.5px; background: #f0f1f5; border: 1px solid var(--border); border-radius: 999px; padding: 2px 6px 2px 9px; color: var(--text-1); display: inline-flex; align-items: center; gap: 4px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-goal-x { border: none; background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; padding: 0 2px; line-height: 1; }
.d-goal-x:hover { color: #d93026; }
/* 清单目标卡：战略归属标签 */
.g-strat { flex: none; font-size: 11px; color: #7a5b1f; background: #fdf3d7; border: 1px solid #f0dfae; border-radius: 6px; padding: 2px 6px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 梦想版 v1.4 · 两段式视图（汇总 + 分支） ── */
/* 汇总页：方向卡（整块可点）+ 统计摘要 */
.dream-summary { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.d-dir-summary { display: flex; align-items: center; gap: 14px; padding: 14px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; user-select: none; -webkit-tap-highlight-color: rgba(47,109,246,.12); }
.d-dir-summary:hover { border-color: var(--accent); }
.d-dir-summary:active { transform: scale(.98); background: var(--bg); }
.d-dir-summary:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.d-dir-summary .icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.d-dir-summary .meta { flex: 1; min-width: 0; }
.d-dir-summary .name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.d-dir-summary .stats { display: flex; flex-wrap: wrap; gap: 6px; }
.d-dir-summary .stat { font-size: 11px; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.d-dir-summary .stat strong { color: var(--text); font-weight: 700; margin-right: 3px; }
.d-dir-summary .stat.dim { opacity: .75; }
.d-dir-summary .d-arrow { flex: none; font-size: 24px; color: var(--text-3); padding: 0 4px; }
.dream-foot { font-size: 12px; color: var(--text-3); margin-top: 14px; text-align: center; }

/* 分支页：面包屑 + 返回 + 顶部 + 新增梦想 */
.d-detail-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 14px; flex-wrap: wrap; }
.d-back { background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--text-2); cursor: pointer; transition: background .12s; }
.d-back:hover { background: var(--bg); color: var(--text); }
.d-back:active { background: var(--accent-soft); color: var(--accent); }
.d-crumb { font-size: 13px; color: var(--text-2); }
.d-crumb .crumb-dir { font-size: 16px; font-weight: 700; color: var(--text); margin-left: 4px; }
.d-spacer { flex: 1; min-width: 8px; }
.d-add-dream-top { background: var(--accent); color: #fff; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); transition: background .12s, transform .12s; }
.d-add-dream-top:hover { background: var(--navy-2); }
.d-add-dream-top:active { transform: scale(.97); }
.d-detail-body { margin-top: 4px; }

/* 梦想卡：彩虹角标（与方向 emoji 风格统一；放弃态同步灰化） */
.d-dream-icon { flex: none; font-size: 16px; line-height: 1; margin-right: 2px; opacity: .9; }
.d-card.d-dormant .d-dream-icon { opacity: .45; filter: grayscale(.4); }

/* ════════════════════════════════════════════════════════════
   优化 P0（2026-09-09）：看板逾期分组 / 快速加任务 / 头部计数
   ════════════════════════════════════════════════════════════ */

/* ── P0-1 逾期未完成分组（红系卡片，置于今日待办上方） ── */
.card-overdue { border-color: #f1c7c0; background: #fffafa; }
.card-overdue .board-section-head h3 { color: var(--p0); }
.ov-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--p0); margin-right: 6px; vertical-align: 1px;
}
.today-list li.board-row-overdue {
  background: #fdf1f0; border-radius: 6px; margin: 4px 0; padding: 9px 10px;
  border-bottom: 1px solid #f6dfdc;
}
.today-list li.board-row-overdue:last-child { border-bottom: none; }
.board-row-overdue .today-task-title { color: #a03028; font-weight: 500; }
.overdue-date { flex: none; font-size: 11px; font-weight: 600; color: var(--p0); white-space: nowrap; }
.overdue-pill { flex: none; font-size: 11px; color: #fff; background: var(--p0); border-radius: 10px; padding: 1px 8px; line-height: 1.6; white-space: nowrap; }

/* ── P0-1 今日待办头部计数「今日 N · 逾期 M」 ── */
.board-count { flex: none; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.board-count .cnt { font-weight: 600; color: var(--text); }
.board-count .cnt.over { color: var(--p0); }

/* ── P0-3 快速加任务按钮 + 头部换行（窄屏自动折行，标题一行、操作区一行） ── */
.board-section-head { flex-wrap: wrap; row-gap: 6px; }
.board-head-spacer { flex: 1; }
.board-section-head .btn.btn-primary.btn-sm { padding: 5px 12px; }

/* ── 窄屏：任务标题允许收缩折行（避免被日期/逾期徽标挤出屏幕） ── */
.today-list li .today-task-title { min-width: 0; overflow-wrap: anywhere; }

/* ════════════════════════════════════════════════════════════
   优化 P1（2026-09-09）：今日三件事卡 + 统一确认弹窗
   ════════════════════════════════════════════════════════════ */

/* P1-2 统一确认弹窗正文（保留换行） */
.confirm-body { white-space: pre-line; line-height: 1.6; font-size: 14px; color: var(--text); }

/* P1-1 今日三件事（AI 调度）卡 */
.ai-daily-brief .brief-list { list-style: none; margin: 2px 0 4px; }
.ai-daily-brief .brief-item { padding: 9px 4px; border-bottom: 1px solid var(--border); }
.ai-daily-brief .brief-item:last-child { border-bottom: none; }
.brief-item-head { display: flex; align-items: baseline; gap: 8px; }
.brief-idx {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brief-title { flex: 1; font-size: 14px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.brief-time { flex: none; font-size: 12px; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.brief-reason { margin: 4px 0 0 28px; font-size: 12.5px; color: var(--text-2); }
.brief-reason summary { cursor: pointer; color: var(--text-3); font-size: 12px; user-select: none; }
.brief-note { margin: 6px 4px 2px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.ai-brief-muted { color: var(--text-3); }

/* ════════════════════════════════════════════════════════════
   优化 P2（2026-09-09）：日历月视图 + 日课历史搜索分页
   ════════════════════════════════════════════════════════════ */

/* P2-1 日历：视图切换 + 月历网格 */
.cal-nav-right { display: flex; align-items: center; gap: 6px; }
.cal-view-toggle { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; background: #fff; }
.cal-view-toggle .btn { border: none; background: transparent; }
.cal-view-toggle .btn.active { background: var(--accent); color: #fff; }
.cal-grid-month .cal-day { min-height: 64px; align-items: flex-start; justify-content: flex-start; }
.cal-day.cal-day-m.out { opacity: .38; background: #fafbfc; }

/* P2-2 日课历史：搜索框 + 分页脚 */
.rinke-history-search { margin-bottom: 8px; }
.rinke-search-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; font-size: 14px; outline: none; }
.rinke-search-input:focus { border-color: var(--accent); }
.rinke-history-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.rh-total { font-size: 12px; color: var(--text-3); }

/* ════════════════════════════════════════════════════════════
   优化 Wave 3A（2026-09-09）：全局当前分身 + AI 场景嵌入样式
   ════════════════════════════════════════════════════════════ */

/* rinke 页 AI 摘要结果卡 / todo 页拆解提示共用 */
.ai-summary-card { margin-bottom: var(--gap); }
.ai-summary-card .ai-busy { font-size: 13px; color: var(--text-3); }

/* 分身卡「当前分身」徽标（复用 persona-check 变体） */
.persona-card .persona-check.current { color: var(--done); }

/* ════════════════════════════════════════════════════════════
   优化 Wave 3B（2026-09-10）：数据体检器 + 一键归位
   入口：顶栏「🩺 体检」→ #/health
   ════════════════════════════════════════════════════════════ */

/* 头部：总览计数 + 操作 */
.health-head { margin-bottom: var(--gap); }
.health-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.health-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hc { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); }
.hc-block { border-color: #f0c7c1; background: #fff6f5; color: var(--p0); }
.hc-warn { border-color: #ecd9a8; background: #fffbf0; color: #a5761a; }
.hc-ok { border-color: #bfe0c8; background: #f4fbf6; color: #2c7a44; }
.hc-total { background: #fff; color: var(--text); }
.health-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.health-note { font-size: 12.5px; color: var(--text-3); line-height: 1.65; }

/* 分组 */
.health-group { margin-bottom: var(--gap); }
.hg-head { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 2px 8px; }
.hg-block .hg-head { color: var(--p0); }

/* 规则卡 */
.health-rule { margin-bottom: 10px; }
.health-rule.block { border-left: 3px solid var(--p0); }
.health-rule.warn { border-left: 3px solid #e0b23c; }
.health-rule.ok { border-left: 3px solid #4aa96c; padding: 10px 14px; }
.hr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-id { font-size: 11px; font-weight: 700; color: var(--text-3); background: var(--bg); border-radius: 4px; padding: 1px 5px; }
.hr-title { font-size: 14px; font-weight: 600; }
.hr-count { font-size: 12px; border-radius: 999px; padding: 1px 8px; background: var(--bg); color: var(--text-2); }
.hr-count.block { background: #fdecea; color: var(--p0); }
.hr-count.warn { background: #fff7e3; color: #a5761a; }
.hr-count.ok { background: #eef8f1; color: #2c7a44; }
.hr-goto { margin-left: auto; }
.hr-desc { font-size: 12.5px; color: var(--text-3); margin: 6px 0 0; line-height: 1.6; }
.hr-items { margin-top: 8px; }

/* 单条 */
.health-item { border-top: 1px solid var(--border); padding: 9px 0; }
.health-item:first-child { border-top: none; }
.hi-main { min-width: 0; }
.hi-label { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.hi-detail { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; line-height: 1.55; }
.hi-fix { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.hi-select, .hi-input {
  flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); outline: none;
}
.hi-select:focus, .hi-input:focus { border-color: var(--accent); }
.hi-hint { flex: none; font-size: 11.5px; color: var(--text-3); }

/* 顶栏体检按钮与登出并排时的间距 */
.topbar-actions { display: flex; align-items: center; gap: 2px; }

/* ════════════════════════════════════════════════════════════
   优化 Wave 3C（2026-09-10）：动态调度内核
   能量 40 + 目标 40 + 紧急 15 + 情境 5 —— 四维得分可复核
   ════════════════════════════════════════════════════════════ */

/* 三件事卡：能量档 / 情境 / 候选数 / 权重 元信息条 */
.brief-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.brief-meta span { font-size: 11.5px; border-radius: 999px; padding: 2px 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); }
.brief-energy { border-color: #cfe3d6; background: #f4fbf6; color: #2c7a44; }
.brief-energy.warn { border-color: #ecd9a8; background: #fffbf0; color: #a5761a; }
.brief-ctx { border-color: var(--accent-soft); color: var(--accent); }
.brief-weights { color: var(--text-3); }

/* 四维得分小标签（每条三件事都有，可展开复核理由） */
.brief-scores { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0 0 28px; }
.score-chip { font-size: 11px; border-radius: 4px; padding: 1px 6px; background: var(--bg); border: 1px solid var(--border); color: var(--text-2); }
.score-chip.sc-energy { border-color: #cfe3d6; color: #2c7a44; }
.score-chip.sc-goal { border-color: var(--accent-soft); color: var(--accent); }
.score-chip.sc-urgency { border-color: #f0c7c1; color: var(--p0); }
.score-chip.sc-context { border-color: #d9d2ee; color: #5c4b9a; }
.score-total { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 7px; background: var(--accent); color: #fff; }

/* 理由展开区：逐维理由 + 合计 */
.brief-reason .brief-reason-body { margin-top: 4px; }
.br-line { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.br-line b { color: var(--text); font-weight: 600; }
.br-total { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* 清单页：委托 AI 分区 + 任务行徽标 */
.delegate-zone { border-color: var(--accent-soft); }
.delegate-zone .tree-goal-head { background: #f4f6fd; }
.delegate-task { padding-left: 2px; }
.delegate-pill { flex: none; font-size: 11px; border-radius: 4px; padding: 1px 6px; background: var(--accent-soft); color: var(--accent); }
.delegate-pill.human { background: #efe9fb; color: #5c4b9a; }
.tag-energy { flex: none; font-size: 11px; border-radius: 4px; padding: 1px 5px; background: #f2f8f4; border: 1px solid #cfe3d6; color: #2c7a44; }
.tag-context { flex: none; font-size: 11px; border-radius: 4px; padding: 1px 5px; background: #f6f4fc; border: 1px solid #d9d2ee; color: #5c4b9a; }
.t-path { flex: none; font-size: 11px; color: var(--text-3); }

/* 看板：委托 AI 分组卡 */
.card-delegated { border-color: var(--accent-soft); background: #fbfcff; }
.card-delegated .board-section-head h3 { color: var(--accent); }
.board-row-delegated { display: flex; align-items: center; gap: 8px; }
.board-row-delegated .today-task-title { flex: 1; min-width: 0; }


/* ═══════════ Wave 3D：同步状态条 + 同步面板 ═══════════ */
/* 顶栏下一条窄条：在线/离线 · 最近同步 · 待同步/冲突（点击展开面板） */
.sync-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; font-size: 12px;
  background: #f0f3f9; color: var(--text-2);
  border-bottom: 1px solid var(--border);
  min-height: 30px; flex-wrap: nowrap; overflow: hidden;
}
.sync-bar.offline { background: #fdf6e7; color: #8a6320; border-bottom-color: #f0dfb8; }
.sync-dot {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 0; padding: 0;
  font: inherit; color: inherit; cursor: pointer; white-space: nowrap;
}
.sync-dot .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--done); flex: none;
}
.sync-bar.offline .sync-dot .dot { background: var(--energy-mid); }
.sync-sep { color: var(--text-3); flex: none; }
.sync-last { color: var(--text-3); white-space: nowrap; }
.sync-spacer { flex: 1; min-width: 4px; }
.sync-chip {
  flex: none; border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: 1px 9px; font: inherit; font-size: 11.5px;
  color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.sync-chip.ok { color: var(--done); border-color: #cfe3d6; background: #f2f8f4; cursor: default; }
.sync-chip.warn { color: #8a6320; border-color: #f0dfb8; background: #fdf6e7; }
.sync-chip.danger { color: var(--danger); border-color: #f0c7c1; background: #fdf1ef; }

/* 同步面板（复用 .modal-backdrop 的遮罩） */
.sync-modal { max-width: 480px; }
.sync-modal-body { max-height: 60vh; overflow-y: auto; }
.sync-modal-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.sync-warn { font-size: 12px; font-weight: 400; color: #8a6320; }
.sync-modal-note { font-size: 12px; color: var(--text-2); line-height: 1.6; background: var(--bg); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 8px; }
.sync-modal-foot { display: flex; gap: 8px; margin-top: 12px; }
.sync-list { list-style: none; margin: 0; padding: 0; }
.sync-list li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sync-list li:last-child { border-bottom: 0; }
.sync-li-main { flex: 1; min-width: 0; font-size: 13px; }
.sync-li-main b { font-weight: 600; }
.sync-li-meta { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.sync-li-err { font-size: 11.5px; color: var(--danger); margin-top: 3px; word-break: break-word; }
.sync-li-alt { font-size: 11.5px; color: var(--text-3); margin-top: 2px; word-break: break-word; }
.sync-li-acts { display: flex; flex-direction: column; gap: 5px; flex: none; }
.sync-kv { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.sync-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.sync-kv li span { color: var(--text-2); }
.sync-kv li b { font-weight: 600; }

/* 离线空态：无缓存时明确说明，不白屏 */
.offline-empty { text-align: center; padding: 28px 16px; color: var(--text-2); font-size: 13px; line-height: 1.7; }
.offline-empty .oe-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.offline-empty .oe-hint { color: var(--text-3); font-size: 12px; margin-top: 6px; }
