/* ============================================================
   动态计划 Web · 设计体系 v3.1「商务底 + 风景点缀」（2026-09-23 方向 A）
   - 商务骨架：冷白底 / 石墨字 / 发丝细线 / 6px 锐利圆角 / 等宽数字
   - 风景点缀（克制的四处）：页头山脊单线、侧栏四季色带（当前=秋）、
     秋琥珀警示词汇、卡片顶缘状态色条
   ============================================================ */
:root {
  color-scheme: light;
  /* 商务骨架色 */
  --primary: #1d4a42;
  --primary-hover: #163d36;
  --accent: #3fa98a;
  --accent-soft: #e5f2ec;
  --bg: #fafbfa;
  --panel: #f1f3f2;           /* 暖灰面板：侧栏/看板列/消息区 */
  --surface: #ffffff;
  --ink: #161d1a;             /* 石墨 */
  --ink-soft: #3b4642;
  --muted: #67736d;
  --faint: #8a978f;
  --line: #dfe4e1;            /* 发丝线 */
  --border: var(--line);
  --text: var(--ink);
  /* 语义状态（警示系并入季节词汇：秋琥珀） */
  --ok: #2e6b52; --ok-bg: #e9f2ee;
  --warn: #c98a3e; --warn-bg: #f6ecdd;   /* 秋琥珀 */
  --danger: #bd5f52; --danger-bg: #f9ebe8;
  --info: #7d94a3; --info-bg: #e9eef3;   /* 晨雾蓝 */
  /* 季节词汇（风景点缀专用） */
  --autumn: #c98a3e; --autumn-soft: #f6ecdd;
  --moss: #5a7d5a; --mist: #7d94a3;
  /* 字号阶梯 */
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13.5px; --fs-14: 14px;
  --fs-15: 15px; --fs-16: 16px; --fs-18: 18px; --fs-22: 22px;
  --fs-24: 24px; --fs-28: 28px; --fs-32: 32px;
  /* 圆角：锐利三档 + 胶囊 */
  --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-pill: 999px;
  /* 阴影两档（更轻，商务打印感） */
  --shadow-card: 0 1px 2px rgba(20, 40, 32, .05);
  --shadow-pop: 0 10px 28px rgba(20, 40, 32, .13);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-size: var(--fs-14); line-height: 1.6; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 布局骨架 ---------- */
.app-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.app-beian { padding: 10px 16px 14px; text-align: center; font-size: var(--fs-12); color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
body[data-space="home"] .app-beian { display: none; } /* 开屏页已有 .beian-row，避免重复 */
.app-beian a { color: var(--muted); text-decoration: none; }
.app-beian a + a { margin-left: 12px; }
.app-beian a:hover { text-decoration: underline; }

.sidebar {
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: var(--fs-15); font-weight: 700; flex-shrink: 0;
}
.brand-name { font-size: var(--fs-15); font-weight: 700; line-height: 1.3; }
.brand-caption { font-size: 11px; color: var(--faint); }

.primary-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--muted); font-size: var(--fs-13); text-align: left;
  position: relative; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.nav-item.is-active {
  background: var(--surface); color: var(--primary); font-weight: 600;
  box-shadow: var(--shadow-card);
}
.nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 2px; background: var(--accent);
}
.nav-icon {
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255, 255, 255, .55); font-size: 12px; color: var(--muted);
}
.nav-item:hover .nav-icon { color: var(--ink); }
.nav-item.is-active .nav-icon { background: var(--accent-soft); color: var(--primary); }
.nav-count {
  margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; font-size: var(--fs-12); font-weight: 600;
  text-align: center; flex-shrink: 0;
}
.nav-item.is-active .nav-count { background: var(--danger); }

.tree-toolbar { padding: 18px 20px 6px; }
.eyebrow { font-size: var(--fs-12); color: var(--faint); letter-spacing: .04em; }
.tree-count { font-size: var(--fs-12); color: var(--muted); margin-top: 2px; display: flex;
  align-items: center; gap: 6px; }

.search-box { margin: 10px 20px 6px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; background: var(--surface); }
.search-box:focus-within { border-color: var(--accent); }
.search-box .search-icon { color: var(--faint); font-size: var(--fs-13); }
.search-box input { border: none; outline: none; background: none; width: 100%;
  font-size: var(--fs-13); color: var(--ink); }
.search-box input::placeholder { color: var(--faint); }

.sidebar-foot {
  margin-top: auto; padding: 14px 20px; border-top: 1px solid var(--line);
  font-size: var(--fs-13); color: var(--muted);
}
.sidebar-foot .foot-line { display: flex; align-items: center; gap: 8px; }
.sidebar-foot small { color: var(--faint); display: block; margin-top: 2px; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.status-dot.is-demo { background: var(--warn); }

/* 风景点缀 1：侧栏四季色带（当前季节亮起，JS 按月切换 data-season） */
.season-band { margin-top: 10px; }
.season-band > small { font-size: 10px; letter-spacing: .14em; color: var(--faint); display: block; margin-bottom: 5px; }
.season-band > small b { color: #96622a; font-weight: 600; }
.sband { display: flex; height: 5px; border-radius: 3px; overflow: hidden; }
.sband i { flex: 1; opacity: .3; }
.sband i.on { opacity: 1; }
.sband i[data-season="spring"] { background: #7d94a3; }
.sband i[data-season="summer"] { background: #5a9c6e; }
.sband i[data-season="autumn"] { background: var(--autumn); }
.sband i[data-season="winter"] { background: #9aa5a1; }
.sband-lab { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); margin-top: 4px; }
.sband-lab b { color: #96622a; }

/* 风景点缀 2：顶栏山脊单线 */
.topbar-title { min-width: 0; }
.ridge-line { display: block; margin-top: 7px; max-width: 460px; }

/* ---------- 主区 ---------- */
.main-content { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px clamp(32px, 5vw, 72px) 0;
}
.topbar h1 { font-size: var(--fs-22); font-weight: 700; letter-spacing: -.01em; }
.date-line { font-size: var(--fs-13); color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.conn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: var(--fs-13); font-weight: 500;
  background: var(--ok-bg); color: var(--ok);
}
.conn-pill.is-demo { background: var(--warn-bg); color: var(--warn); }
.conn-pill.is-error { background: var(--danger-bg); color: var(--danger); }

.btn-conn {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  padding: 7px 16px; border-radius: var(--r-sm); font-size: var(--fs-13);
  transition: border-color .15s, color .15s;
}
.btn-conn:hover { border-color: var(--accent); color: var(--primary); }

.content { padding: 20px clamp(32px, 5vw, 72px) 48px; }

.view-panel { display: none; animation: panel-in .18s ease; }
.view-panel.is-visible { display: block; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
}
.card-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.card-head h3 { font-size: var(--fs-16); font-weight: 600; }
.card-head .meta { font-size: var(--fs-13); color: var(--muted); }
.card-body { padding: 12px 20px 20px; }

.btn-primary {
  background: var(--primary); color: #fff; padding: 8px 18px;
  border-radius: var(--r-sm); font-size: var(--fs-14); font-weight: 500;
  transition: background .15s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  padding: 7px 16px; border-radius: var(--r-sm); font-size: var(--fs-14);
  transition: border-color .15s, color .15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--primary); }
.text-button { color: var(--primary); font-size: var(--fs-13); padding: 4px 0; }
.text-button:hover { text-decoration: underline; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: var(--fs-12); font-weight: 500; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.muted { background: var(--bg); color: var(--muted); }

.field {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 7px 10px; font-size: var(--fs-13); background: var(--surface);
  color: var(--ink); width: 100%;
}
.field:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field::placeholder { color: var(--faint); }

.empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: var(--fs-13); }
.empty::before { content: "○"; display: block; font-size: 28px; color: var(--line); margin-bottom: 8px; }
.empty .empty-hint { display: block; margin-top: 6px; font-size: var(--fs-12); color: var(--faint); }

/* ---------- 今日视图 ---------- */
.today-summary {
  display: flex; align-items: center; gap: 20px; margin-bottom: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--primary), #2a5f55); color: #fff;
  border-radius: var(--r-md); padding: 18px 24px;
}
.today-summary .ts-item .label { font-size: var(--fs-16); opacity: .88; }
.today-summary .ts-item .big { font-size: var(--fs-32); font-weight: 700; line-height: 1.2; }
.today-summary .ts-item .big small { font-size: var(--fs-16); font-weight: 500; opacity: .88; }
.today-summary .sep { width: 1px; height: 36px; background: rgba(255, 255, 255, .25); }
.today-summary .hint { margin-left: auto; font-size: var(--fs-14); opacity: .88; }

.today-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }

/* 工作计划工作区 */
.work-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 22px 24px; margin-bottom: 16px; border-radius: var(--r-md);
  color: #fff; background: linear-gradient(120deg, #1d4a42, #2c6a5d);
}
.work-hero h2 { margin: 3px 0 6px; font-size: var(--fs-24); }
.work-hero p { opacity: .82; }
.work-hero .eyebrow { color: #bfe3d6; opacity: 1; }
.work-privacy-note {
  max-width: 300px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px; background: rgba(255,255,255,.08); font-size: var(--fs-12);
}
.work-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.work-metric { padding: 16px 18px; }
.work-metric span { display: block; color: var(--muted); font-size: var(--fs-13); }
.work-metric strong { display: block; margin: 4px 0 2px; font-size: var(--fs-28); }
.work-metric small { color: var(--faint); }
.work-metric.is-capacity.has-overload { border-color: #e5a46c; background: #fff9f2; }
.work-metric.is-capacity.has-overload strong { color: #a85222; }
.work-tabs {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 18px;
  padding: 7px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-card);
}
.wtab {
  white-space: nowrap; padding: 10px 20px; border-radius: 9px;
  font-size: var(--fs-16); color: var(--muted); transition: background .15s, color .15s;
}
.wtab:hover { background: var(--bg); color: var(--ink); }
.wtab.on { background: var(--primary); color: #fff; font-weight: 600; }
.work-tab-panel { display: flex; flex-direction: column; gap: 16px; }
.work-tab-panel[hidden] { display: none; }
.work-editor-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 16px; margin-bottom: 16px; }
.work-editor-card .card-body { padding-top: 16px; }
.work-editor-card.compact .card-body { padding-bottom: 16px; }
.work-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.work-form.single { grid-template-columns: 1fr; }
.work-form label { display: block; margin-bottom: 4px; color: var(--muted); font-size: var(--fs-12); }
.work-form .span-2 { grid-column: 1 / -1; }
.work-form textarea.field { resize: vertical; line-height: 1.5; }
.work-form-more { border: 1px dashed var(--border); border-radius: 10px; padding: 8px 12px; background: rgba(255, 255, 255, 0.35); }
.work-form-more > summary { cursor: pointer; color: var(--muted); font-size: var(--fs-13); user-select: none; }
.work-form-more[open] > summary { margin-bottom: 10px; color: var(--text); }

/* ---- 今日执行卡片（9.2 愿景2①） ---- */
.exec-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 0 20px 14px; }
.exec-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 14px; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 40, 35, 0.05);
}
.exec-card.st-COMPLETED { opacity: 0.72; background: var(--bg); }
.exec-card.st-BLOCKED { border-color: #e0a800; }
.exec-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.exec-title { font-size: var(--fs-15); line-height: 1.45; overflow-wrap: anywhere; }
.exec-status { flex: none; font-size: var(--fs-12); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.exec-status-select {
  flex: none; font-size: var(--fs-12); color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 8px) 55%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
  padding-right: 20px;
}
.exec-status-select:disabled { opacity: 0.6; cursor: wait; }
.exec-status-select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.exec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.exec-tip {
  font-size: var(--fs-13); line-height: 1.55; color: #6b5320;
  background: #fdf6e3; border: 1px solid #f0e0b0; border-radius: 10px; padding: 8px 10px;
}
.exec-meta { font-size: var(--fs-12); color: var(--muted); line-height: 1.5; }
.exec-done { font-size: var(--fs-12); color: var(--primary); font-weight: 600; }
.exec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.exec-blocker { font-size: var(--fs-13); line-height: 1.55; color: #8a4b00; background: #fdf0e3; border: 1px solid #f0d4b0; border-radius: 10px; padding: 8px 10px; }
.work-files-section { margin: 6px 0 8px; font-size: var(--fs-13); color: var(--muted); font-weight: 600; }

/* ---- 今日执行：流瀑式长卡（2026-09-15 改版，mockup v7 确认稿） ---- */
.today-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 2px 2px 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.today-head h2 { margin: 0; font-size: 21px; letter-spacing: .02em; }
.today-head .meta { color: var(--muted); font-size: 13px; }
.today-head-spacer { flex: 1; }
.today-head-btn { flex: none; }
.today-flow-wrap { position: relative; }
.today-flow {
  display: flex; gap: 14px; align-items: flex-start;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px 2px 16px; scrollbar-width: thin;
}
.today-flow::-webkit-scrollbar { height: 8px; }
.today-flow::-webkit-scrollbar-thumb { background: #c8d4dc; border-radius: 4px; }
.today-flow .empty { flex: 1; }
.flow-arrow {
  position: absolute; top: 42%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; z-index: 10;
  border: 1px solid #c8d4dc; background: rgba(255, 255, 255, .94);
  color: var(--primary); font-size: 15px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(28, 38, 34, .14);
}
.flow-arrow.prev { left: -10px; }
.flow-arrow.next { right: -10px; }
.tf-card {
  flex: 0 0 400px; scroll-snap-align: start;
  border-radius: var(--r-md); border: 1px solid var(--line); border-top-width: 2px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-card); background: var(--surface);
  font-variant-numeric: tabular-nums;
}
/* 顶缘状态色条（方向 A：替代整块渐变——商务打印感） */
.tf-card.st-IN_PROGRESS { border-top-color: var(--primary); }
.tf-card.st-BACKLOG, .tf-card.st-READY { border-top-color: var(--mist); }
.tf-card.st-BLOCKED { border-top-color: var(--autumn); }
.tf-card.st-COMPLETED { border-top-color: #9aa5a1; }
.tf-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.tf-head .exec-status-select { background: rgba(255, 255, 255, .88); border-color: rgba(255, 255, 255, .75); font-size: 13.5px; }
.tf-score {
  margin-left: auto; background: rgba(255, 255, 255, .92); color: var(--primary);
  font-weight: 600; border-radius: 999px; padding: 2px 10px; font-size: 13.5px;
}
.tf-title { margin: 0 14px 5px; font-size: 18px; font-weight: 600; color: #16232e; line-height: 1.45; overflow-wrap: anywhere; }
.tf-project { margin: 0 14px 14px; font-size: 14px; color: #47565f; }
.tf-project .sub { color: var(--muted); }
.tf-body { padding: 0 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.tf-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tf-chips .taxonomy-tag { font-size: 12.5px; }
.tf-side { display: flex; gap: 8px; align-items: center; }
.tf-side dl { flex: 1; margin: 0; min-width: 168px; }
.tf-side dt { color: var(--muted); white-space: nowrap; margin: 0; }
.tf-side dd { margin: 0; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.tf-radar { display: flex; justify-content: center; margin: -2px 0 -4px; }
.tf-radar svg { flex: 0 0 132px; display: block; }
.tf-side .tf-radar { flex: 0 1 132px; margin: 0; min-width: 104px; }
.tf-side .tf-radar svg { flex-basis: 132px; max-width: 100%; height: auto; }
.tf-desc {
  border-left: 3px solid var(--accent); padding: 2px 0 2px 9px;
  font-size: 14px; color: #37474f; line-height: 1.7;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* 长文本两行截断 + 展开入口（2026-09-23 密度优化） */
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-expand {
  display: inline-block; border: 0; background: none; padding: 3px 0 0; margin-top: 2px;
  color: var(--info); font-size: var(--fs-12); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.text-expand:hover { color: var(--primary); }
.tf-agent {
  border: 1px dashed #9dbcd4; border-radius: 10px; background: #f7fbfd;
  padding: 8px 10px; font-size: 14px; color: #2c465b;
}
.tf-agent .tag { color: var(--primary); font-weight: 600; }
.tf-agent .when { color: var(--muted); font-size: 12px; }
.tf-agent ul { margin: 4px 0 2px; padding-left: 16px; }
.tf-agent li { margin: 3px 0; line-height: 1.65; }
.tf-agent-btn {
  width: 100%; border: 1px dashed #9dbcd4; background: transparent; color: var(--primary);
  border-radius: 10px; padding: 6px; font-size: 13.5px; cursor: pointer;
}
.tf-agent-btn:hover { background: #f7fbfd; }
.tf-agent-btn:disabled { opacity: .6; cursor: wait; }
/* 子任务区（飞书子数据行投影）：勾选 + 执行方向 + 描述 + 方向注意事项 + 计划完成 */
.tf-subtasks {
  border: 1px solid #cddcd6; border-radius: 10px; background: rgba(255, 255, 255, .9);
  padding: 9px 10px 10px;
}
.tf-sub-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.tf-sub-head .tag {
  font-size: 11px; letter-spacing: .06em; color: var(--primary); font-weight: 700;
  background: var(--accent-soft); border-radius: 3px; padding: 1px 7px;
}
.tf-sub-progress { flex: 1; height: 3px; border-radius: 0; background: var(--panel); overflow: hidden; }
.tf-sub-progress i { display: block; height: 100%; background: #4d9a83; border-radius: 2px; }
.tf-sub-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tf-subtasks.all-done .tf-sub-head .tag { background: #4d9a83; color: #fff; }
.tf-subtasks.all-done .tf-sub-count { color: var(--primary); font-weight: 600; }
/* 呆滞卡：子任务头转警示语义（v3 语义色驱动） */
.tf-card.st-BLOCKED .tf-sub-head .tag { background: var(--warn-bg); color: var(--warn); }
.tf-card.st-BLOCKED .tf-sub-progress i { background: var(--warn); }
.tf-subtasks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tf-subtasks li { display: flex; align-items: flex-start; gap: 8px; }
.sub-toggle {
  flex: 0 0 auto; border: 0; background: none; padding: 0; cursor: pointer;
  font-size: 16px; line-height: 1.35; color: #8fa39c; -webkit-appearance: none; margin-top: 1px;
}
.sub-toggle:hover { color: #4d9a83; }
.sub-toggle:disabled { opacity: .5; cursor: wait; }
li.done .sub-toggle { color: #4d9a83; }
.sub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sub-line { display: flex; align-items: baseline; gap: 6px; }
.sub-dir {
  flex: 0 0 auto; font-size: 12px; border-radius: 999px; padding: 1px 7px;
  background: #e8eef5; color: #33526b; white-space: nowrap;
}
li.done .sub-dir { opacity: .6; }
.sub-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); line-height: 1.7; overflow-wrap: anywhere; }
li.done .sub-text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(107, 124, 120, .55); }
.sub-tip { font-size: 12.5px; color: #7a8a83; line-height: 1.65; padding-left: 2px; }
.sub-tip::before { content: "💡 "; font-size: 11px; }
li.done .sub-tip { color: #a4b0ab; }
.sub-due { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: 2px; }
.sub-due::before { content: "计划完成 "; font-size: 11.5px; }
li.done .sub-due { color: #9aa8a3; }
.tf-mine {
  border: 1px solid #cfe0d4; border-radius: 10px; background: #f4faf5;
  padding: 8px 10px; font-size: 14px; color: #2b4231;
}
.tf-mine .tag { color: #3a6b47; font-weight: 600; }
.tf-mine .edit { float: right; border: none; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.tf-mine-edit {
  width: 100%; border: 1px solid #cfe0d4; border-radius: 10px; background: #fff;
  padding: 7px 9px; font-size: var(--fs-12); color: var(--ink); resize: vertical; min-height: 54px;
  font-family: inherit;
}
.tf-mine-edit-actions { display: flex; gap: 7px; margin-top: 6px; }
.tf-mine-edit-actions .btn-secondary { flex: 1; }
.tf-done-row { font-size: 13.5px; color: var(--muted); }
.tf-actions { display: flex; gap: 7px; margin-top: 2px; }
.tf-actions .btn-secondary { flex: 1; padding: 5px 4px; font-size: var(--fs-12); text-align: center; }
/* 系数块合并思维导图入口（有导图时整块可悬停/点击） */
.tf-score.has-mindmap { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: background .12s, box-shadow .12s, color .12s; }
.tf-score.has-mindmap:hover { background: #fff; box-shadow: 0 3px 10px rgba(28, 38, 34, .18); }
.tf-score.has-mindmap.pinned { background: var(--primary); color: #fff; }
.tf-score .mm-flag { font-size: 13px; line-height: 1; }
/* 导图浮层（body 级，突破卡片边界） */
.mm-popover {
  position: fixed; z-index: 130; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 64px rgba(9, 24, 20, .28);
  padding: 14px 16px 12px; max-width: calc(100vw - 24px);
}
.mm-popover h4 { margin: 0 0 8px; font-size: var(--fs-13); color: var(--primary); }
.mm-popover h4 .mm-state { font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 8px; }
.mm-popover .pinned-badge {
  position: absolute; top: -10px; right: 14px; background: var(--primary); color: #fff;
  font-size: 10.5px; border-radius: 999px; padding: 1px 9px;
}
.mm-popover .mm-body { overflow: auto; max-width: calc(100vw - 60px); }
/* 助手气泡内的导图提案（v3 回归品牌绿体系） */
.mm-propose {
  margin-top: 8px; border: 1px dashed var(--accent); border-radius: 10px;
  background: var(--accent-soft); padding: 8px 10px; font-size: var(--fs-12); color: #2b4a42; line-height: 1.7;
}
.mm-propose .mm-confirm { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.mm-propose .mm-confirm .btn-secondary { font-size: var(--fs-12); padding: 3px 10px; }
.mm-propose .mm-hint { font-size: 11px; color: var(--muted); }
@media (max-width: 640px) {
  .tf-card { flex-basis: min(400px, 90vw); }
  .today-head-btn { padding: 5px 10px; }
}

/* ---- 顶栏快捷入口菜单（9.1 多端入口） ---- */
.topbar-links { position: relative; }
.links-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 220px; padding: 6px; border-radius: 12px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(16, 40, 35, 0.14);
  display: flex; flex-direction: column;
}
.links-menu a {
  padding: 9px 12px; border-radius: 8px; font-size: var(--fs-13);
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.links-menu a:hover { background: rgba(29, 74, 66, 0.08); color: var(--primary); }

/* ---- 学习今日页增强（2026-09-24 v19）：逾期桶 / 每日例行 / 热力图 ---- */
.overdue-box {
  border: 1px solid var(--warn-bg); border-left: 3px solid var(--warn);
  border-radius: var(--r-sm); background: var(--surface);
  padding: 10px 14px 6px; margin-bottom: 14px;
}
.ob-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); font-weight: 700; color: #96622a; }
.ob-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--warn); }
.ob-head b { font-variant-numeric: tabular-nums; }
.ob-note { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--faint); }
.ob-row { display: flex; gap: 10px; align-items: baseline; padding: 7px 0 6px; border-top: 1px solid var(--warn-bg); margin-top: 6px; }
.ob-row:first-of-type { border-top: 0; }
.ob-row b { font-size: var(--fs-13); flex: 1; color: var(--ink); }
.ob-row span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ob-row.more { color: var(--faint); font-size: 12px; display: block; }
.routine-list { padding: 4px 0; }
.routine-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.routine-row:first-child { border-top: 0; }
.routine-row.done { border-left: 2px solid var(--ok); }
.routine-toggle { flex: 0 0 auto; border: 0; background: none; padding: 0; cursor: pointer; font-size: 16px; color: #9aa5a1; }
.routine-toggle:hover { color: var(--primary); }
.routine-row.done .routine-toggle { color: var(--ok); }
.routine-main { flex: 1; min-width: 0; }
.routine-main b { font-size: var(--fs-13); }
.routine-main small { display: block; font-size: 11px; color: var(--faint); margin-top: 1px; }
.routine-debt { color: #96622a; font-weight: 600; }
.done-tag { font-size: 11px; font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 3px; padding: 1px 8px; flex: none; }
.routine-add { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.routine-add .field { flex: 1; min-width: 0; }
.heat-wrap { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.streak-chip { flex: none; font-size: 12px; font-weight: 700; color: var(--warn); background: var(--warn-bg);
  border-radius: 4px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.heat-map { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 10px); grid-auto-columns: 10px; gap: 2px; overflow-x: auto; }
.heat-map i { width: 10px; height: 10px; border-radius: 2px; }
.heat-map i.l0 { background: var(--panel); }
.heat-map i.l1 { background: #bcd8c9; }
.heat-map i.l2 { background: #7fb89a; }
.heat-map i.l3 { background: var(--primary); }

/* ---- 看板（9.2 愿景2②；2026-09-23 起默认收起为状态统计条，点开看详情） ---- */
.kb-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 14px; margin-bottom: 12px; box-shadow: var(--shadow-card);
}
.kb-sum-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-13); color: var(--muted); padding: 2px 6px;
}
.kb-sum-item b { font-size: var(--fs-15); color: var(--ink); font-variant-numeric: tabular-nums; }
.kb-toggle { margin-left: auto; padding: 5px 14px; font-size: var(--fs-12); }
.kanban-scopes { flex: none; }
.kanban-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.kanban-col { display: flex; flex-direction: column; min-height: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; font-size: var(--fs-14); border-bottom: 1px solid var(--line); }
.kanban-col-head b { margin-left: auto; font-size: var(--fs-12); color: var(--muted); font-weight: 500; }
.k-dot { width: 8px; height: 8px; border-radius: 2px; }
/* 列状态点统一语义色（v3）：待排期=雾蓝、进行中=品牌色、呆滞=秋琥珀、完成=绿 */
.k-todo { background: var(--mist); } .k-doing { background: var(--primary); } .k-blocked { background: var(--autumn); } .k-done { background: var(--ok); }
.kanban-col-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; transition: background 0.15s ease; }
.kanban-col-body.is-over { background: rgba(29, 74, 66, .06); outline: 2px dashed var(--primary); outline-offset: -4px; }
/* 方向 A：看板卡左缘状态色条（扫一列时状态连成线） */
.kanban-card {
  background: var(--surface); border: 1px solid var(--line); border-left-width: 2px;
  border-left-color: var(--mist); border-radius: 5px; padding: 10px 12px;
  cursor: grab; box-shadow: var(--shadow-card); font-variant-numeric: tabular-nums;
}
.kanban-card.is-doing, .kanban-card[data-status="IN_PROGRESS"] { border-left-color: var(--primary); }
.kanban-card[data-status="BLOCKED"] { border-left-color: var(--autumn); }
.kanban-card[data-status="COMPLETED"], .kanban-card.is-done { border-left-color: var(--ok); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.is-dragging { opacity: 0.55; }
.kanban-card.is-done { opacity: 0.7; }
.kc-head { display: flex; align-items: flex-start; gap: 6px; }
.kc-head b { font-size: var(--fs-13); line-height: 1.4; flex: 1; overflow-wrap: anywhere; }
.kc-cancel { flex: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-12); padding: 0 2px; }
.kc-cancel:hover { color: #c0392b; }
.kc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kc-tags span { font-size: var(--fs-11); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.kc-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: var(--fs-11); color: var(--muted); }
.kanban-hint { margin: 0 0 16px; }
.kanban-connect-hint { grid-column: 1 / -1; }
.kanban-radars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kanban-radar-card .card-head { align-items: baseline; }
.radar-holder { display: flex; flex-direction: column; align-items: center; padding: 6px 14px 14px; }
.radar-holder svg { width: 100%; max-width: 280px; height: auto; }
.radar-ring { fill: none; stroke: #d8e2de; stroke-width: 1; }
.radar-axis { stroke: #e4ebe8; stroke-width: 1; }
.radar-shape { fill: rgba(29, 74, 66, 0.22); stroke: var(--primary); stroke-width: 1.6; }
.radar-dot { fill: var(--primary); }
.radar-label { font-size: 11px; fill: var(--muted); }
.radar-fallback { width: 100%; max-width: 320px; margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--fs-13); }
.radar-fallback li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 2px; border-bottom: 1px dashed var(--border); }
.radar-fallback li:last-child { border-bottom: 0; }
@media (max-width: 1100px) {
  .kanban-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban-radars { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .kanban-board { grid-template-columns: 1fr; }
}
.work-check { align-self: end; padding: 9px 0; color: var(--text) !important; }
.work-check input { margin-right: 6px; accent-color: var(--primary); }
.form-actions { display: flex; align-items: center; gap: 10px; }
.form-hint { color: var(--muted); font-size: var(--fs-12); }
.work-list-card { margin-bottom: 16px; }
.work-list-card .card-head > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.work-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.work-filters .chip.on { color: #fff; border-color: var(--primary); background: var(--primary); }
.work-item-list, .work-plan-list { padding: 0 20px 10px; }
.work-item-row {
  display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center;
  gap: 14px; min-height: 76px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.work-item-row:last-child { border-bottom: 0; }
.work-item-row.is-completed { opacity: .66; }
.work-item-row.is-completed .wi-title { text-decoration: line-through; }
.wi-date { color: var(--muted); font-size: var(--fs-12); text-align: center; }
.wi-date b { display: block; color: var(--primary); font-size: var(--fs-16); }
.wi-main { min-width: 0; }
.wi-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-14); }
.wi-meta { margin-top: 5px; color: var(--muted); font-size: var(--fs-12); }
.wi-latest-log {
  display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 7px;
  color: var(--muted); font-size: var(--fs-12); line-height: 1.55;
}
.wi-latest-log span { min-width: 0; }
.wi-latest-log b { color: var(--ink-soft); font-weight: 650; }
.wi-latest-log .has-blocker, .wi-latest-log .has-blocker b { color: var(--danger); }
.wi-progress { width: min(300px, 100%); height: 5px; margin-top: 7px; overflow: hidden; border-radius: 8px; background: #e5ece9; }
.wi-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.wi-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.domain-tag, .priority-tag, .fixed-tag, .privacy-tag {
  display: inline-flex; align-items: center; min-height: 21px; padding: 2px 7px;
  border-radius: 20px; font-size: 11px; font-weight: 500;
}
.domain-tag.work { color: #fff; background: #2b665a; }
.domain-tag.learn { color: #2b665a; background: #e2f0eb; }
.priority-tag { color: #8c4c1c; background: #fff0df; }
.fixed-tag { color: #6d4d91; background: #f2eafa; }
.privacy-tag { color: #64716d; background: #eef1f0; }
.wi-taxonomy { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.taxonomy-tag {
  display: inline-flex; align-items: center; min-height: 20px; padding: 1px 8px;
  border-radius: 4px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface);
}
/* 方向 A：分类标签=描边式（信息归中性，颜色只留给状态） */
.taxonomy-tag.category { color: #44637b; border-color: #cfdae3; background: transparent; }
.taxonomy-tag.direction { color: var(--moss); border-color: #ccd8c7; background: transparent; }
.taxonomy-tag.urgency { color: var(--danger); border-color: #e8cfc9; background: transparent; }
.taxonomy-tag.importance { color: #96622a; border-color: #e5d5b8; background: transparent; }
.taxonomy-tag.difficulty { color: #4a6274; border-color: #cfdae3; background: transparent; }
.score-tag {
  display: inline-flex; align-items: center; min-height: 21px; padding: 2px 8px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  color: #fff; background: #2b665a;
}
.work-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.work-plan-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.work-plan-row:last-child { border-bottom: 0; }
.work-plan-row b { font-size: var(--fs-14); }
.work-plan-row p { margin-top: 4px; color: var(--muted); font-size: var(--fs-12); }
.work-plan-row small { display: block; margin-top: 6px; color: var(--faint); }
.work-today-row { grid-template-columns: 54px minmax(0, 1fr) auto; min-height: 68px; }
.work-today-row .wi-date { text-align: left; }

.work-log-backdrop {
  display: none; position: fixed; inset: 0; z-index: 119; background: rgba(9, 24, 20, .38);
}
.work-log-backdrop.is-open { display: block; }
.work-log-dialog {
  display: none; position: fixed; z-index: 120; top: 8vh; left: 50%; width: min(680px, calc(100vw - 32px));
  transform: translateX(-50%); max-height: 84vh; overflow: auto;
}
.work-log-dialog.is-open { display: block; animation: panel-in .16s ease; }
.work-log-dialog .card { box-shadow: 0 18px 60px rgba(10, 31, 25, .2); }
#work-log-progress { padding: 8px 0; accent-color: var(--primary); }
#work-log-progress-value { float: right; margin-top: -25px; color: var(--primary); font-weight: 600; }

.work-files-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.work-files-upload input[type="file"] { flex: 1; min-width: 220px; }
.work-files-hint { margin: 8px 0 12px; font-size: var(--fs-12); color: var(--faint); }
.work-files-list { display: flex; flex-direction: column; }
.work-file-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-top: 1px solid var(--line); }
.work-file-row:first-child { border-top: none; }
.wf-icon { font-size: 18px; }
.wf-main { flex: 1; min-width: 0; }
.wf-main b { display: block; font-size: var(--fs-14); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-main small { color: var(--muted); font-size: var(--fs-12); }
.wf-actions { display: flex; gap: 6px; flex-shrink: 0; }

.stack { display: flex; flex-direction: column; gap: 16px; }

.checkin-list { padding: 4px 0 0; }
.checkin-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  border-top: 1px solid var(--line); flex-wrap: wrap; }
.checkin-row:first-child { border-top: none; }
.checkin-row.is-done { background: linear-gradient(90deg, var(--ok-bg), transparent 60%); }
.ci-time { font-size: var(--fs-13); color: var(--muted); width: 92px; flex-shrink: 0;
  font-variant-numeric: tabular-nums; }
.ci-main { flex: 1; min-width: 180px; }
.ci-main b { display: block; font-size: var(--fs-14); font-weight: 600; }
.ci-main span { font-size: var(--fs-13); color: var(--muted); }
.ci-main small { display: block; font-size: var(--fs-12); color: var(--faint); margin-top: 2px; }
.ci-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.ci-actions .field { width: 96px; }
.ci-actions select.field { width: 110px; }
.done-note { font-size: var(--fs-13); color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }

.ext-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.ext-row:first-child { border-top: none; }
.ext-icon { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--accent-soft);
  color: var(--primary); display: grid; place-items: center; font-size: var(--fs-13);
  font-weight: 600; flex-shrink: 0; }
.ext-main { flex: 1; min-width: 0; }
.ext-main b { font-size: var(--fs-14); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.ext-main b em { font-style: normal; color: var(--muted); font-weight: 500; font-size: var(--fs-13); }
.ext-bar { height: 6px; background: var(--accent-soft); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.ext-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ext-note { font-size: var(--fs-12); color: var(--faint); margin-top: 4px; }

.feedback-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feedback-form .full { grid-column: 1 / -1; }
.feedback-form label { font-size: var(--fs-13); color: var(--muted); display: block; margin-bottom: 4px; }
.feedback-form .api-config-actions { grid-column: 1 / -1; }

.proposal-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  border-top: 1px solid var(--line); flex-wrap: wrap; }
.proposal-row:first-child { border-top: none; }

/* ---------- 概览视图 ---------- */
.overview-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.trio-card { padding: 18px 20px; }
.trio-card .t-label { font-size: var(--fs-13); color: var(--muted);
  display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.trio-card .value { font-size: var(--fs-28); font-weight: 700; margin-top: 4px; }
.trio-card .value small { font-size: var(--fs-14); color: var(--muted); font-weight: 500; }
.trio-card .foot { font-size: var(--fs-12); color: var(--faint); margin-top: 6px; }
.trio-flex { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ring { width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--accent) var(--pct, 0%), var(--accent-soft) 0);
  display: grid; place-items: center; }
.ring i { width: 42px; height: 42px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-style: normal;
  font-size: var(--fs-12); font-weight: 600; color: var(--primary); }

.chart-card + .chart-card { margin-top: 16px; }
.chart-legend { display: flex; gap: 16px; font-size: var(--fs-12); color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-right: 5px; vertical-align: -1px; }

.trend-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.trend-bars .b { flex: 1; border-radius: 3px 3px 0 0; background: var(--accent);
  opacity: .85; min-height: 2px; }
.trend-bars .b.zero { background: var(--line); opacity: 1; }
.trend-bars .b.today { background: var(--primary); opacity: 1; }
.bar-axis { display: flex; justify-content: space-between; font-size: var(--fs-12);
  color: var(--faint); padding-top: 6px; }
.chart-empty { flex: 1; align-self: center; margin: 0; text-align: center;
  font-size: var(--fs-13); color: var(--faint); }

.pressure-bars { display: flex; align-items: flex-end; gap: 6px; height: 96px; padding-top: 8px; }
.pressure-bars .b { flex: 1; border-radius: 3px 3px 0 0; min-height: 3px;
  background: linear-gradient(180deg, var(--warn), var(--accent)); }
.pressure-axis { display: flex; gap: 6px; }
.pressure-axis span { flex: 1; text-align: center; font-size: var(--fs-12); color: var(--faint); }

/* ---------- 计划视图 v3：顶部大方向页签 + 总览 ---------- */
.dtabs {
  display: flex; justify-content: center; overflow-x: auto; width: fit-content;
  margin: 0 auto 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: var(--shadow-card);
}
.dtab {
  white-space: nowrap; padding: 8px 16px; border-radius: 0;
  font-size: var(--fs-13); color: var(--muted); transition: background .15s, color .15s;
  border-right: 1px solid var(--line);
}
.dtab:last-child { border-right: 0; }
.dtab:hover { color: var(--ink); background: var(--panel); }
.dtab.on { background: var(--primary); color: #fff; font-weight: 600; }
.dtab .cnt { font-size: var(--fs-12); opacity: .7; margin-left: 6px; font-variant-numeric: tabular-nums; }

.ring.lg { width: 58px; height: 58px; }
.ring.lg i { width: 46px; height: 46px; }
.ring.xl { width: 96px; height: 96px; }
.ring.xl i { width: 74px; height: 74px; font-size: var(--fs-14); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.pcard { padding: 18px; }
.pcard-top { display: flex; gap: 14px; align-items: center; }
.pcard-top h3 { font-size: var(--fs-14); font-weight: 600; line-height: 1.5; }
.pcard-top .pmeta { font-size: var(--fs-12); color: var(--muted); margin-top: 3px; }
.pbar { height: 6px; border-radius: 3px; background: var(--accent-soft); margin: 12px 0 6px; overflow: hidden; }
.pbar b { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.pcard-foot { display: flex; justify-content: space-between; gap: 8px;
  font-size: var(--fs-12); color: var(--muted); }
.pnext { margin-top: 10px; font-size: var(--fs-13); background: var(--ok-bg);
  color: #1e5c44; border-radius: var(--r-sm); padding: 8px 12px; }

.paused-strip { margin-top: 18px; }
.paused-strip .plabel { font-size: var(--fs-13); color: var(--muted); }
.paused-strip .chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.paused-strip .chip { background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--r-sm); padding: 10px 16px; font-size: var(--fs-13); color: var(--muted);
  cursor: pointer; transition: border-color .15s, color .15s; }
.paused-strip .chip:hover { border-color: var(--accent); color: var(--primary); }

/* 单方向页 */
.phead {
  display: grid; grid-template-columns: 1fr auto; gap: 20px;
  background: linear-gradient(135deg, var(--primary), #2a5f55); color: #fff;
  border-radius: var(--r-lg); padding: 22px 26px; margin-bottom: 16px;
}
.phead h2 { font-size: var(--fs-22); font-weight: 700; }
.phead .goal { font-size: var(--fs-13); opacity: .85; margin-top: 8px; line-height: 1.7; }
.ptags { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.ptag { font-size: var(--fs-12); background: rgba(255, 255, 255, .16);
  border-radius: 999px; padding: 3px 12px; }
.phead .ring-wrap { text-align: center; }
.phead .ring-wrap .rlabel { font-size: var(--fs-12); opacity: .8; margin-top: 6px; }
.phead .badge { vertical-align: 3px; }

.steps {
  display: flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-card); overflow-x: auto;
}
.step { flex: 1; min-width: 120px; text-align: center; position: relative; }
.step::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%;
  height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step .pt { width: 18px; height: 18px; border-radius: 50%; margin: 0 auto 8px;
  background: var(--surface); border: 2px solid var(--line); }
.step.done .pt { background: var(--accent); border-color: var(--accent); }
.step.done::before { background: var(--accent); }
.step.now .pt { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(63, 169, 138, .2); }
.step .nm { font-size: var(--fs-13); font-weight: 600; }
.step .dt { font-size: var(--fs-12); color: var(--faint); margin-top: 2px; }
.step.now .nm { color: var(--ok); }

.plan-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.tcard { padding: 14px 16px; }
.tcard + .tcard { margin-top: 12px; }
.tcard .thead { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  flex-wrap: wrap; }
.tcard h4 { font-size: var(--fs-14); font-weight: 600; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-top: 1px dashed var(--line); font-size: var(--fs-13); color: var(--muted); }
.task-row:first-of-type { margin-top: 8px; }
.task-row .tr-main { flex: 1; min-width: 0; }
.task-row .tr-main b { display: block; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row .tr-main .ns { display: block; font-size: var(--fs-12); color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.task-row .tp { font-variant-numeric: tabular-nums; color: var(--faint); flex-shrink: 0; }
.ms-next { font-size: var(--fs-12); color: #1e5c44; background: var(--ok-bg);
  border-radius: var(--r-sm); padding: 6px 10px; margin-top: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-13);
  color: var(--muted); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: none; }
.kv b { color: var(--ink); font-weight: 500; text-align: right; }
.side-card h3 { font-size: var(--fs-14); margin-bottom: 8px; }
.side-card h3 + .kv { border-top: 1px dashed var(--line); }

/* ---------- 通知中心（统一收件箱） ---------- */
.notif-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 7px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-card);
}
.ntab {
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap; padding: 9px 16px; border-radius: 9px;
  font-size: var(--fs-14); color: var(--muted); transition: background .15s, color .15s;
}
.ntab:hover { background: var(--bg); color: var(--ink); }
.ntab.on { background: var(--primary); color: #fff; font-weight: 600; }
.ntab .cnt { font-size: var(--fs-12); opacity: .75; font-variant-numeric: tabular-nums; }

.notif-row { display: flex; gap: 16px; padding: 16px 20px; align-items: flex-start; flex-wrap: wrap; }
.notif-row.sev-critical { border-left: 3px solid var(--danger); }
.notif-row.sev-warning { border-left: 3px solid var(--warn); }
.notif-row.sev-info { border-left: 3px solid var(--info); }
.notif-row .nr-main { flex: 1; min-width: 260px; }
.notif-row .nr-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-row .nr-title b { font-size: var(--fs-14); font-weight: 600; }
.notif-row .nr-body { font-size: var(--fs-13); color: var(--muted); margin-top: 6px; line-height: 1.6; }
.notif-row .nr-meta {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px;
  font-size: var(--fs-12); color: var(--faint);
}
.notif-row .nr-related { color: var(--info); }
.notif-row .nr-actions {
  display: flex; gap: 8px; flex-shrink: 0; align-items: center; flex-wrap: wrap;
}
.notif-row .nr-actions .btn-primary,
.notif-row .nr-actions .btn-secondary { padding: 6px 14px; font-size: var(--fs-13); }

/* ---------- AI 助手（抽屉 + 完整对话页） ---------- */
.assistant-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw);
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-pop); z-index: 80;
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .2s ease;
}
.assistant-drawer.is-open { transform: none; }

.ad-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.ad-avatar {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
}
.ad-headtxt { flex: 1; min-width: 0; }
.ad-title-row { display: flex; align-items: center; gap: 7px; }
.ad-title { font-size: 15px; font-weight: 700; color: var(--primary); }
.ad-space-chip {
  font-size: 10.5px; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--primary); font-weight: 600; white-space: nowrap;
}
.ad-ctx-label { font-size: 11.5px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-head-actions { display: flex; gap: 6px; }
.ad-head-actions .btn-secondary { padding: 5px 10px; font-size: var(--fs-12); }

.assistant-messages {
  flex: 1; overflow-y: auto; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 11px; background: var(--panel);
}
/* 教学式空态（2026-09-23） */
.chat-empty { margin: auto; text-align: center; color: var(--muted); padding: 20px 12px; }
.chat-empty .ce-glyph {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 22px; color: var(--primary);
}
.chat-empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--primary); }
.chat-empty p { margin: 0 auto; max-width: 280px; font-size: var(--fs-12); line-height: 1.8; }
.quick-questions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; align-items: center; }
.quick-questions .qq { max-width: 320px; width: 100%; text-align: left;
  padding: 10px 14px; font-size: var(--fs-13); border-radius: 10px; }
.quick-questions .qq:hover { border-color: var(--accent); background: var(--accent-soft); }
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg .bubble {
  max-width: 84%; padding: 9px 13px; font-size: var(--fs-13); line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
/* 方向圆角：用户右下尖（贴边），AI 左下尖 + 白卡浮起（第二中性层上） */
.chat-msg.user .bubble { background: var(--primary); color: #fff; border-radius: 11px 11px 3px 11px; }
.chat-msg.assistant .bubble {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px 11px 11px 3px; box-shadow: var(--shadow-card);
}
.chat-msg .bubble.busy { color: var(--faint); font-style: italic; box-shadow: none; }

.ad-input {
  display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line);
  background: var(--surface);
}
.ad-input .field { flex: 1; min-width: 0; background: var(--bg); }
.ad-input .field:focus { background: var(--surface); }
/* 模型徽章 + 操作提示收进输入区底部元信息行 */
.ad-meta {
  display: flex; align-items: center; gap: 8px; padding: 0 12px 9px;
  font-size: 11px; color: var(--faint); background: var(--surface);
}
.assistant-model-badge {
  margin: 0; padding: 1px 9px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--primary); font-weight: 600;
  font-size: 10.5px; letter-spacing: .02em; white-space: nowrap;
}
/* share-work 一行化：短 label + ⓘ 悬浮详情 */
.assistant-work-options {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 9px 14px 0; background: var(--surface); border-top: 1px solid var(--line);
}
.assistant-work-options label { display: flex; gap: 6px; align-items: center; font-size: var(--fs-12); color: var(--primary); cursor: pointer; }
.assistant-work-options label input { accent-color: var(--accent); width: 14px; height: 14px; }
.awo-info {
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-grid; place-items: center; font-size: 10px; color: var(--faint);
  cursor: help; flex-shrink: 0;
}
.assistant-attach-preview { display: flex; gap: 8px; flex-wrap: wrap;
  padding: 9px 14px 0; background: var(--surface); }
.assistant-attach-preview[hidden] { display: none; }
.attach-thumb { position: relative; width: 52px; height: 52px; }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); }
.attach-remove { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  border-radius: 50%; border: 2px solid var(--surface); background: var(--danger); color: #fff;
  font-size: 10px; line-height: 1; cursor: pointer; }
.msg-image-tag { display: inline-block; margin-bottom: 4px; padding: 1px 8px;
  border-radius: var(--r-pill); background: var(--accent-soft); color: var(--primary); font-size: var(--fs-12); }

.chat-shell {
  display: flex; flex-direction: column;
  height: calc(100vh - 210px); min-height: 420px; overflow: hidden;
}
.chat-shell .assistant-messages { flex: 1; }

/* ---------- 分析视图 ---------- */
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.metric { padding: 16px 20px; }
.metric .k { font-size: var(--fs-13); color: var(--muted); }
.metric .v { font-size: var(--fs-22); font-weight: 700; margin-top: 2px; }
.metric .t { font-size: var(--fs-12); margin-top: 4px; color: var(--muted); }
.metric .t.up { color: var(--ok); }
.metric .t.down { color: var(--warn); }

.analysis-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.weekly-bars { display: flex; align-items: flex-end; gap: 14px; height: 140px; }
.weekly-bars .bar-day { flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 6px; height: 100%; justify-content: flex-end; }
.weekly-bars .pair { display: flex; gap: 4px; align-items: flex-end; flex: 1;
  min-height: 0; width: 100%; justify-content: center; }
.weekly-bars .bar { width: 16px; border-radius: 4px 4px 0 0; }
.weekly-bars .bar.plan { background: var(--line); }
.weekly-bars .bar.actual { background: var(--accent); }
.weekly-bars .d { font-size: var(--fs-12); color: var(--faint); }

.distribution-list { padding-top: 8px; }
.dist-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dist-row:first-child { border-top: none; }
.dist-row .name { width: 96px; font-size: var(--fs-13); flex-shrink: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.dist-row .track { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.dist-row .track span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.dist-row .pct { width: 40px; text-align: right; font-size: var(--fs-13); color: var(--muted);
  font-variant-numeric: tabular-nums; }

/* ---------- 连接弹层 ---------- */
.conn-backdrop { position: fixed; inset: 0; background: rgba(20, 40, 32, .32);
  display: none; z-index: 90; }
.conn-backdrop.is-open { display: block; }
.conn-dialog { position: fixed; top: 12vh; left: 50%; transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px)); z-index: 100; display: none;
  box-shadow: var(--shadow-pop); }
.conn-dialog.is-open { display: block; animation: panel-in .16s ease; }
.conn-dialog .card-body { padding: 20px; }
.api-config-form { display: flex; flex-direction: column; gap: 4px; }
.api-config-form label { font-size: var(--fs-13); color: var(--muted);
  display: block; margin: 8px 0 4px; }
.api-config-actions { display: flex; gap: 12px; margin-top: 16px; }
.api-config-note { font-size: var(--fs-12); color: var(--faint); margin-top: 12px; }
.link-btn { border: none; background: none; color: var(--primary); cursor: pointer;
  padding: 0; font-size: var(--fs-12); text-decoration: underline; }
.conn-devices { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.conn-devices h4, .recovery-panel h4 { margin-bottom: 8px; font-size: var(--fs-13); }
.trusted-devices-list { display: flex; flex-direction: column; gap: 8px; }
.device-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.device-main { flex: 1; min-width: 200px; }
.device-main .field { padding: 6px 10px; font-size: var(--fs-13); }
.device-main small { display: block; margin-top: 4px; color: var(--faint); font-size: var(--fs-12); }
.device-actions { display: flex; gap: 6px; }
.device-revoke-form { display: flex; gap: 6px; align-items: center; width: 100%; flex-wrap: wrap; }
.device-revoke-form .field { flex: 1; min-width: 180px; padding: 6px 10px; }
.recovery-panel { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px;
  display: flex; flex-direction: column; gap: 8px; }
.recovery-panel select, .recovery-panel input { width: 100%; }
#recovery-step-2 { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
#recovery-step-2[hidden] { display: none; }
.connection-state { font-size: var(--fs-12); font-weight: 500; padding: 2px 10px;
  border-radius: 999px; background: var(--bg); color: var(--muted); }
.connection-state.is-connected { background: var(--ok-bg); color: var(--ok); }
.connection-state.is-demo { background: var(--warn-bg); color: var(--warn); }
.connection-state.is-error { background: var(--danger-bg); color: var(--danger); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 200;
  background: var(--primary); color: #fff; font-size: var(--fs-13);
  padding: 10px 18px; border-radius: var(--r-sm); box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: min(420px, calc(100vw - 48px));
}
.toast.is-visible { opacity: 1; transform: none; }

/* ---------- 加载态 ---------- */
.loading-dots { display: inline-flex; gap: 4px; align-items: center; }
.loading-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: dot-pulse .8s ease-in-out infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot-pulse { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* ---------- 超宽屏内容限制 ---------- */
.content { max-width: 1600px; }

/* ---------- 记忆卡（翻卡复习 + 生成表单 + 卡片列表） ---------- */
.cards-columns { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px; margin-bottom: 16px; align-items: start; }
.cards-review-card { position: sticky; top: 16px; }
.flip-card { perspective: 1200px; margin: 4px 0 14px; }
.flip-inner { position: relative; min-height: 220px; transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1); }
.flip-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); }
.flip-back { transform: rotateY(180deg); background: var(--accent-soft);
  border-color: transparent; }
.flip-label { font-size: var(--fs-12); color: var(--faint); letter-spacing: .04em; }
.flip-text { font-size: var(--fs-18); line-height: 1.7; overflow-wrap: anywhere; }
.flip-source { font-size: var(--fs-12); color: var(--faint); }
.cards-grade-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cards-grade { min-height: 46px; border-radius: var(--r-md); font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); transition: transform .12s; }
.cards-grade:hover { transform: translateY(-1px); }
.cards-grade-forgot { color: var(--danger); background: var(--danger-bg); border-color: transparent; }
.cards-grade-hard { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.cards-grade-good { color: var(--primary); background: var(--accent-soft); border-color: transparent; }
.cards-grade-easy { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.cards-reveal { width: 100%; min-height: 46px; }
.cards-form { display: flex; flex-direction: column; gap: 8px; }
.cards-form .btn-primary { min-height: 42px; }
.cards-form .field { width: 100%; }
.cards-form textarea.field { resize: vertical; line-height: 1.6; }
.cards-manual { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cards-list { display: flex; flex-direction: column; gap: 10px; }
.cards-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
  align-items: start; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface); }
.cards-row-front { font-weight: 600; overflow-wrap: anywhere; }
.cards-row-back { color: var(--muted); font-size: var(--fs-13); margin-top: 2px;
  overflow-wrap: anywhere; }
.cards-row-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 6px; font-size: var(--fs-12); color: var(--faint); }
.cards-row-delete { min-height: 34px; padding: 4px 12px; font-size: var(--fs-13); }
.cards-overdue { color: var(--danger); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .today-grid, .plan-cols, .analysis-grid, .work-editor-grid { grid-template-columns: 1fr; }
  .work-metrics { grid-template-columns: repeat(2, 1fr); }
  .cards-columns { grid-template-columns: 1fr; }
  .cards-review-card { position: static; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; }
  .sidebar { position: sticky; top: 0; z-index: 50; height: auto; flex-direction: column;
    padding: 0; gap: 0; overflow: visible; border-bottom: 1px solid var(--line);
    background: var(--surface); box-shadow: var(--shadow-card); width: 100%; min-width: 0; }
  .brand { padding: 12px 16px 8px; }
  .primary-nav { flex-direction: row; padding: 0 8px 8px; gap: 0; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; min-width: 0; max-width: 100vw; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-item { padding: 10px 14px; min-height: 44px; font-size: var(--fs-14);
    border-radius: var(--r-sm); white-space: nowrap; flex-shrink: 0; }
  .nav-count { margin-left: 4px; }
  .tree-toolbar, .search-box, .sidebar-foot { display: none; }
  .tree-scroll { max-height: 320px; }
  .topbar { padding: 12px 16px 0; flex-wrap: wrap; gap: 8px; }
  .topbar-right { flex-wrap: wrap; gap: 8px; }
  .content { padding: 14px 16px 32px; }
  .main-content, .view-panel { min-width: 0; width: 100%; }
  .assistant-drawer { width: 100vw; }
}
@media (max-width: 640px) {
  .overview-trio, .metric-row, .work-metrics, .work-plan-grid { grid-template-columns: 1fr; }
  .feedback-form { grid-template-columns: 1fr; }
  .today-summary .sep { display: none; }
  .today-summary .hint { margin-left: 0; width: 100%; }
  .phead { grid-template-columns: 1fr; }
  .phead .ring-wrap { justify-self: center; }
  .work-hero { align-items: flex-start; flex-direction: column; }
  .work-form { grid-template-columns: 1fr; }
  .work-form .span-2 { grid-column: 1; }
  .work-item-row { grid-template-columns: 54px minmax(0, 1fr); }
  .wi-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 68px; }
  .work-list-card .card-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ci-time { width: 100%; }
  .btn-primary, .btn-secondary, .btn-conn { min-height: 44px; padding: 10px 18px; }
  .field { min-height: 44px; }
  .dtab { min-height: 44px; }
  .ntab { min-height: 44px; }
  .cards-grade-row { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important;
    animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 学习汇总 · 多端口启动器（v2.9 新增，不改动既有选择器） ---------- */
.hub-head { margin: 0 0 16px; color: var(--muted); font-size: var(--fs-13); }
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.hub-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); border-color: var(--accent); }
.hub-card.is-off { opacity: .45; }
.hub-card-top { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-12); color: var(--faint); }
.hub-card h3 { font-size: var(--fs-16); font-weight: 600; line-height: 1.35; }
.hub-summary { font-size: var(--fs-13); color: var(--muted); }
.hub-go { margin-top: auto; padding-top: 8px; font-size: var(--fs-12); color: var(--primary); font-weight: 600; }
.hub-demo-note { grid-column: 1 / -1; }
.hub-form { display: grid; grid-template-columns: 1fr 1.5fr 1fr auto; gap: 10px; align-items: end; }
.hub-form .hub-form-actions { display: flex; gap: 8px; align-items: center; }
.hub-manage-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.hub-manage-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: var(--fs-13);
}
.hub-manage-row .hub-mr-name { font-weight: 600; }
.hub-manage-row .hub-mr-meta {
  flex: 1; min-width: 160px; color: var(--faint); font-size: var(--fs-12);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-manage-row .btn-secondary { padding: 4px 10px; min-height: 30px; }
.hub-manage-row .hub-danger { color: var(--danger); }
.hub-manage-card .meta { display: block; margin-top: 10px; }
@media (max-width: 900px) {
  .hub-form { grid-template-columns: 1fr 1fr; }
  .hub-form .hub-form-actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hub-form { grid-template-columns: 1fr; }
  .hub-manage-row .hub-mr-meta { flex-basis: 100%; white-space: normal; }
}
