/* ============================================================================
   ext.css - 扩展模块样式（九大模块 + 全局 AI 助手 + 榜单导入 + PWA）
   ----------------------------------------------------------------------------
   为什么单独一个文件：
     style.css 已经 5500+ 行，继续往里堆新模块样式会让「改 A 影响 B」的风险变大。
     这里只放 .ext-* / .ai-* / .imp-* / .pwa-* / .dash-* 这些**带前缀**的类，
     与既有模块完全隔离；沿用同一套变量（--ink / --bg / --card / --accent …），
     视觉上仍然是同一个 Neo-Brutalism 语言。

   两条必须遵守的写法（都是本项目踩过的坑）：
     · 网格列一律写 minmax(0, 1fr)：直接写 1fr 时最小尺寸取 min-content，
       会被内部宽内容撑破，而 overflow:hidden 又不产生滚动条 → 溢出检测抓不到。
     · 响应式折叠规则只能写在媒体查询里，否则桌面端会整块消失。
   ========================================================================= */

/* ================= 侧栏分组 ================= */
.nav-group {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text2); opacity: .75;
  padding: 14px 14px 4px; margin-top: 4px;
  border-top: 2px dashed #e3ddcd;
}

/* ================= 通用：扩展页面骨架 ================= */
.ext-page { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ext-tabs { margin-bottom: 0; }
.ext-head-extra { display: flex; flex-direction: column; gap: 10px; }
.ext-filter-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ext-note { font-size: 12.5px; color: var(--text2); line-height: 1.7; }
.ext-note.warn { color: var(--red); font-weight: 600; }
.ext-dim { color: var(--text2); font-weight: 500; font-style: normal; font-size: 12px; }
.ext-req { color: var(--red); }
.ext-group-title { font-size: 12px; font-weight: 800; color: var(--text2); margin: 12px 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.ext-row-acts-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ================= 筛选条 ================= */
.ext-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ext-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 180px; }
.ext-search > i { position: absolute; left: 10px; font-size: 12px; color: var(--text2); pointer-events: none; }
.ext-search .input { padding-left: 30px; min-height: 38px; font-size: 13px; }
/* 注意优先级：style.css 里有 `select.input { width:100% }`（0,1,1），
   单写 .ext-select（0,1,0）压不住它 → 工具栏的每个下拉会各占一整行。
   这里用 `.ext-toolbar .ext-select`（0,2,0）明确覆盖，让下拉按内容宽度排。 */
.ext-toolbar .ext-select { width: auto; flex: 0 0 auto; max-width: 220px; min-width: 118px; min-height: 38px; font-size: 13px; padding: 2px 10px; }
.ext-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ext-chips .chip b { margin-left: 5px; font-size: 11px; opacity: .8; }

/* ================= 空状态 ================= */
.ext-empty {
  border: 2px dashed var(--ink); border-radius: 12px; background: var(--card);
  padding: 34px 18px; text-align: center;
}
.ext-empty i { font-size: 30px; color: var(--text2); display: block; margin-bottom: 10px; }
.ext-empty h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.ext-empty p { font-size: 12.5px; color: var(--text2); line-height: 1.8; max-width: 430px; margin: 0 auto 14px; }

/* ================= 指标卡 / 进度条 / 徽标 ================= */
.ext-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.ext-stat-grid.compact { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.ext-stat {
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.ext-stat b { font-size: 19px; font-weight: 800; line-height: 1.2; word-break: break-all; }
.ext-stat span { font-size: 12px; color: var(--text2); }
.ext-stat em { font-size: 11px; color: var(--text2); font-style: normal; }

.ext-bar {
  display: block; flex: 1; min-width: 40px; height: 12px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden;
}
.ext-bar > i { display: block; height: 100%; background: var(--primary); transition: width .3s; }
.ext-bar.zero > i { background: #d8d2c2; }
.ext-bar.mid > i { background: var(--yellow); }
.ext-bar.good > i { background: var(--primary); }
.ext-bar.done > i { background: var(--green); }
.ext-bar.warn > i { background: var(--orange); }
.ext-bar.over > i { background: var(--red); }

.ext-badge {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 800;
  padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card);
  white-space: nowrap; flex: 0 0 auto;
}
.ext-badge.ext-sm { font-size: 10px; padding: 1px 6px; border-width: 1.5px; }
.ext-badge.t-wish { background: #dce9ff; }
.ext-badge.t-doing { background: var(--green); }
.ext-badge.t-wait { background: var(--yellow); }
.ext-badge.t-done { background: #b8f2dd; }
.ext-badge.t-drop { background: #ffd7d7; }

.ext-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--card);
}
.ext-tag.soft { background: var(--bg); font-weight: 600; }
.ext-tag.warn { background: #ffe3e3; }

.ext-date { font-size: 11.5px; color: var(--text2); font-weight: 600; }
.ext-date.overdue { color: var(--red); font-weight: 800; }
.ext-date.today { color: var(--orange); font-weight: 800; }
.ext-money { font-weight: 800; }
.ext-pri { font-size: 11px; font-weight: 800; }
.ext-pri.p1 { color: var(--red); }
.ext-pri.p2 { color: var(--orange); }
.ext-pri.p3 { color: var(--text2); }
.ext-stars { font-size: 13px; letter-spacing: 1px; color: var(--orange); }

/* ================= 卡片网格 ================= */
.ext-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.ext-card {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  padding: 13px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
  transition: transform .12s, box-shadow .12s;
}
.ext-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.ext-card.locked { background: #f7f4ea; }
.ext-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ext-card-title { font-size: 14px; font-weight: 800; word-break: break-word; line-height: 1.45; }
.ext-card-desc { font-size: 12.5px; color: var(--text2); line-height: 1.65; word-break: break-word; }
.ext-card-desc.dim { opacity: .8; }
.ext-card-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.ext-card-bar { display: flex; align-items: center; gap: 8px; }
.ext-card-bar b { font-size: 12px; flex: 0 0 auto; }
.ext-card-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

.ext-mini {
  border: 2px solid var(--ink); border-radius: 6px; background: var(--card);
  min-height: 28px; padding: 0 9px; font-size: 11.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; color: var(--text);
  transition: background .12s, transform .12s;
}
.ext-mini:hover { background: var(--yellow); }
.ext-mini.accent { background: var(--accent); color: #fff; }
.ext-mini.accent:hover { background: #ff6b85; }
.ext-mini.danger:hover { background: #ffd7d7; }
.ext-mini:disabled { opacity: .45; cursor: not-allowed; }
a.ext-mini { text-decoration: none; }

/* ================= 列表行 ================= */
.ext-list { display: flex; flex-direction: column; gap: 8px; }
.ext-list.compact { gap: 4px; }
.ext-list.dim { opacity: .62; }
.ext-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card); min-width: 0;
}
.ext-row.dim { opacity: .6; }
.ext-list.compact .ext-row { padding: 7px 10px; border-width: 1.5px; }
.ext-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ext-row-title { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-word; }
.ext-row-sub { font-size: 12px; color: var(--text2); line-height: 1.6; word-break: break-word; }
.ext-row-sub.solved { color: var(--green-text); }
.ext-row-sub a { color: var(--primary); word-break: break-all; }
.ext-row-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--text2); }
.ext-row-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 0 0 auto; }
.ext-kind {
  font-size: 10.5px; font-weight: 800; padding: 2px 6px; border: 2px solid var(--ink); border-radius: 5px;
}
.ext-kind.bug { background: #ffd7d7; }
.ext-kind.feat { background: #dce9ff; }
.ext-ver { font-size: 12px; font-weight: 800; padding: 1px 7px; border: 2px solid var(--ink); border-radius: 6px; background: var(--yellow); }
.ext-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--yellow); font-size: 12px; font-weight: 800; flex: 0 0 auto;
}

/* ================= 详情 / 键值 / 代码块 ================= */
.ext-detail { display: flex; flex-direction: column; gap: 12px; }
.ext-detail-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ext-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 2px dashed #e3ddcd; }
.ext-kv { display: flex; flex-direction: column; }
.ext-kv-row {
  display: flex; gap: 12px; padding: 7px 0; border-bottom: 1.5px dashed #e3ddcd; font-size: 13px;
}
.ext-kv-row:last-child { border-bottom: 0; }
.ext-kv-row > span { flex: 0 0 96px; color: var(--text2); }
.ext-kv-row > b { flex: 1; min-width: 0; font-weight: 600; word-break: break-word; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ext-block { border: 2px solid var(--ink); border-radius: 12px; background: var(--card); padding: 13px; min-width: 0; }
.ext-block-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ext-block-head h4 { font-size: 13px; font-weight: 800; }
.ext-block-head .ext-bar { max-width: 200px; }
.ext-block h4 { font-size: 12.5px; font-weight: 800; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; color: var(--text2); }
.ext-pre {
  font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
  background: var(--bg); border: 2px solid #e3ddcd; border-radius: 8px; padding: 9px 10px;
  font-family: inherit; max-height: 420px; overflow: auto;
}
.ext-pre.small { font-size: 12px; max-height: 120px; }
.ext-pre.md { max-height: 60vh; }
.ext-static { font-size: 13.5px; padding: 8px 0; color: var(--text2); }
.ext-disclaimer { font-size: 11.5px; color: var(--text2); line-height: 1.7; margin-top: 8px; }

/* ================= 时间轴 ================= */
.ext-timeline { display: flex; flex-direction: column; }
.ext-tl { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.ext-tl::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: #d8d2c2; }
.ext-tl:last-child::before { display: none; }
.ext-tl-dot { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); margin-top: 3px; z-index: 1; }
.ext-tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ext-tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.ext-tl-acts { display: flex; gap: 5px; align-items: center; margin-left: auto; }

/* ================= 表单 ================= */
.ext-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ext-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ext-field.wide { grid-column: 1 / -1; }
.ext-field .form-label { margin-bottom: 0; }
.ext-textarea { resize: vertical; line-height: 1.7; font-family: inherit; }
.ext-hint { font-size: 11.5px; color: var(--text2); line-height: 1.6; }
.ext-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 0; cursor: pointer; }
.ext-check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.ext-color { padding: 3px; height: 38px; width: 100%; }

/* ================= 驾驶舱 ================= */
.ext-period-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ext-period-label { font-size: 15px; font-weight: 800; }
.ext-seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.ext-seg-btn {
  border: 0; background: var(--card); padding: 6px 12px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; color: var(--text);
}
.ext-seg-btn + .ext-seg-btn { border-left: 2px solid var(--ink); }
.ext-seg-btn.active { background: var(--yellow); }
.ext-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.dash-dim { position: relative; overflow: hidden; }
.dash-dim::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; }
.dash-dim.t-orange::before { background: var(--orange); }
.dash-dim.t-pink::before { background: var(--accent); }
.dash-dim.t-green::before { background: var(--green); }
.dash-dim.t-cyan::before { background: var(--cyan); }
.dash-dim.t-purple::before { background: var(--purple); }
.dash-dim.t-blue::before { background: var(--primary); }
.ext-dash-head { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
.ext-dash-head b, .ext-dash-head { font-size: 17px; font-weight: 800; }
.ext-dash-head em { font-size: 10.5px; color: var(--text2); font-style: normal; font-weight: 600; }
.ext-dash-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ext-dash-metric {
  display: flex; flex-direction: column; gap: 2px; padding: 7px 9px;
  border: 2px solid #e3ddcd; border-radius: 8px; background: var(--bg); min-width: 0;
}
.ext-dash-label { font-size: 11.5px; color: var(--text2); }
.ext-dash-metric b { font-size: 14.5px; font-weight: 800; word-break: break-all; }
.ext-dash-metric b i { font-size: 10.5px; font-style: normal; color: var(--text2); margin-left: 3px; }
.ext-delta { font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; }
.ext-delta.up { color: var(--green-text); }
.ext-delta.down { color: var(--red); }
.ext-delta.flat { color: var(--text2); }
.ext-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.ext-chart-box { position: relative; height: 220px; border: 2px solid #e3ddcd; border-radius: 8px; padding: 6px; background: #fff; }
.ext-chart-box.tall { height: 260px; }
.ext-layout-list { display: flex; flex-direction: column; gap: 6px; }
.ext-layout-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2px solid #e3ddcd; border-radius: 8px; padding: 7px 10px; background: var(--bg);
}
.ext-layout-row label { font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.ext-layout-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
.ext-layout-acts { display: flex; gap: 4px; }

/* ================= 日历（内容排期） ================= */
.ext-cal-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ext-cal-title { font-size: 14px; font-weight: 800; min-width: 96px; text-align: center; }
.ext-cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.ext-cal-head span { font-size: 11.5px; font-weight: 800; color: var(--text2); text-align: center; }
.ext-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ext-cal-cell {
  border: 2px solid #d8d2c2; border-radius: 8px; background: var(--card);
  min-height: 84px; padding: 4px; display: flex; flex-direction: column; gap: 3px;
  min-width: 0; overflow: hidden; cursor: pointer;
}
.ext-cal-cell.empty { background: transparent; border-style: dashed; opacity: .35; cursor: default; }
.ext-cal-cell:hover:not(.empty) { background: var(--hover); }
.ext-cal-cell.today { border: 2px solid var(--accent); background: #fff5f7; }
.ext-cal-day { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; color: var(--text2); }
.ext-cal-item {
  border: 2px solid var(--ink); border-radius: 5px; background: var(--bg);
  padding: 3px 5px; font-size: 10.5px; text-align: left; cursor: pointer; color: var(--text);
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.ext-cal-item b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-cal-item i { font-style: normal; color: var(--text2); font-size: 9.5px; }
.ext-cal-item.t-done { background: #d7f7ec; }
.ext-cal-item.t-doing { background: #dce9ff; }
.ext-cal-item.t-wait { background: #fff2c9; }
.ext-cal-item.t-drop { background: #ececec; opacity: .7; }
.ext-cal-item.overdue { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }

/* 跨平台数据表 */
.ext-pf-table { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.ext-pf-row { display: grid; grid-template-columns: 74px repeat(4, minmax(0, 1fr)); gap: 5px; align-items: center; }
.ext-pf-row.head { font-size: 11px; font-weight: 800; color: var(--text2); }
.ext-pf-row span { font-size: 12px; font-weight: 700; }
.ext-pf-row .input { min-height: 34px; font-size: 12.5px; padding: 2px 8px; }

/* ================= 技能树 ================= */
.ext-overall { border: 2px solid var(--ink); border-radius: 12px; background: var(--card); padding: 12px 14px; }
.ext-overall-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ext-overall-top b { font-size: 15px; font-weight: 800; }
.ext-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ext-skill {
  border: 2px solid var(--ink); border-radius: 9px; background: var(--card);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.ext-skill.done { background: #e8fbf3; }
.ext-skill-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.ext-skill-check input { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }
.ext-skill.done .ext-skill-check span { text-decoration: line-through; color: var(--text2); }
.ext-skill-desc { font-size: 11.5px; color: var(--text2); line-height: 1.6; }
.ext-skill-acts { display: flex; gap: 5px; justify-content: flex-end; }

/* ================= 知识库两栏 ================= */
.ext-split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.ext-split-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ext-side {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card); padding: 10px;
  display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px; min-width: 0;
}
.ext-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ext-folder-list { display: flex; flex-direction: column; gap: 2px; max-height: 52vh; overflow-y: auto; }
.ext-folder {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 7px;
  cursor: pointer; font-size: 13px; min-width: 0;
}
.ext-folder:hover { background: var(--hover); }
.ext-folder.sel { background: var(--yellow); font-weight: 700; }
.ext-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-folder-acts { display: none; gap: 3px; }
.ext-folder:hover .ext-folder-acts { display: flex; }

/* ================= 时间胶囊 / 人生时间线 ================= */
.ext-locked {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px; border: 1.5px dashed var(--ink); border-radius: 9px; background: var(--bg);
}
.ext-locked i { font-size: 20px; color: var(--text2); }
.ext-locked p { font-size: 12.5px; color: var(--text2); }
.ext-locked b { font-size: 15px; color: var(--ink); }
.ext-year { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 12px; margin-bottom: 8px; }
.ext-year-label {
  font-size: 15px; font-weight: 800; padding-top: 10px;
  border-right: 3px solid var(--ink); text-align: right; padding-right: 10px;
}
.ext-year-items { display: flex; flex-direction: column; gap: 8px; }
.ext-year-item { border: 2px solid var(--ink); border-radius: 10px; background: var(--card); padding: 10px 12px; }
.ext-year-item.capsule { background: #fff8dc; }
.ext-year-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.ext-year-desc { font-size: 12px; color: var(--text2); line-height: 1.6; margin: 4px 0; }

/* ================= 提醒条 ================= */
.ext-alert {
  display: flex; gap: 10px; align-items: flex-start;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--yellow);
  padding: 10px 12px; font-size: 12.5px; line-height: 1.7;
}
.ext-alert i { font-size: 15px; padding-top: 2px; }

/* ================= 全局 AI 助手 ================= */
.ai-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.ai-fab:hover, .ai-fab.active { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.ai-mask {
  position: fixed; inset: 0; z-index: 91; background: rgba(17, 17, 17, .34);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.ai-mask.show { opacity: 1; pointer-events: auto; }
.ai-panel {
  position: fixed; z-index: 92; top: 0; right: 0; bottom: 0;
  width: 430px; max-width: 100vw;
  background: var(--card); border-left: 3px solid var(--ink);
  display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform .24s ease;
}
.ai-panel.open { transform: none; }
.ai-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 12px;
  border-bottom: 3px solid var(--ink); background: var(--yellow);
}
.ai-title { font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.ai-mod { font-size: 11.5px; font-weight: 700; color: var(--text2); margin-right: auto; }
.ai-hbtn {
  width: 32px; height: 32px; flex: 0 0 32px; border: 2px solid var(--ink); border-radius: 7px;
  background: var(--card); cursor: pointer; font-size: 12px;
}
.ai-hbtn:hover { background: #fff; }
.ai-chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-bottom: 2px dashed #e3ddcd; }
.ai-chip {
  border: 2px solid var(--ink); border-radius: 999px; background: var(--card);
  padding: 4px 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.ai-chip:hover { background: var(--yellow); }
.ai-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-row { display: flex; }
.ai-row.me { justify-content: flex-end; }
.ai-bub {
  max-width: 88%; border: 2px solid var(--ink); border-radius: 10px; background: var(--bg);
  padding: 9px 11px; font-size: 13px; line-height: 1.75; word-break: break-word; min-width: 0;
}
.ai-bub.me { background: #dce9ff; }
.ai-h { display: block; margin: 6px 0 2px; font-weight: 800; }
.ai-code {
  background: #1b1b1b; color: #f3f3f3; border-radius: 8px; padding: 8px 10px; margin: 6px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.ai-cap { font-size: 10.5px; font-weight: 800; color: var(--text2); margin-top: 6px; }
.ai-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.ai-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text2); animation: ai-bounce 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; }
.ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.ai-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; border-top: 1.5px dashed #d8d2c2; padding-top: 7px; }
.ai-act {
  border: 2px solid var(--ink); border-radius: 6px; background: var(--card);
  min-height: 26px; padding: 0 8px; font-size: 11px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.ai-act:hover { background: var(--yellow); }
.ai-act-retry { background: var(--accent); color: #fff; }
.ai-empty { text-align: center; padding: 24px 14px; }
.ai-empty i { font-size: 26px; color: var(--text2); display: block; margin-bottom: 10px; }
.ai-empty h4 { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.ai-empty p { font-size: 12.5px; color: var(--text2); line-height: 1.8; margin-bottom: 12px; }
.ai-input { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 3px solid var(--ink); }
.ai-input textarea {
  flex: 1; min-height: 44px; max-height: 140px; resize: vertical;
  border: 2px solid var(--ink); border-radius: 9px; padding: 9px 10px; font-size: 13px;
  font-family: inherit; line-height: 1.6; background: var(--card); color: var(--ink);
}
.ai-input .btn { flex: 0 0 52px; }

/* ================= 榜单批量导入 ================= */
.imp-wrap { display: flex; flex-direction: column; gap: 12px; }
.imp-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.imp-step { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text2); }
.imp-step b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-size: 11px;
}
.imp-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.imp-cat {
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card); padding: 10px;
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; text-align: left; color: var(--text);
}
.imp-cat i { font-size: 17px; }
.imp-cat b { font-size: 13px; font-weight: 800; }
.imp-cat span { font-size: 11px; color: var(--text2); }
.imp-cat.sel { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
/* 「导入会自动匹配分类」的说明条：紧跟在品类选择下方，需要一点上间距把它与卡片分开 */
.imp-auto-note { margin: -2px 0 0; }
.imp-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.imp-drop {
  border: 2px dashed var(--ink); border-radius: 12px; background: var(--bg);
  padding: 22px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.imp-drop.over { background: var(--yellow); }
.imp-drop i { font-size: 24px; color: var(--text2); }
.imp-drop b { font-size: 13.5px; }
.imp-drop span { font-size: 12px; color: var(--text2); }
.imp-preview { display: flex; flex-direction: column; gap: 8px; }
.imp-preview-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.imp-table { border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.imp-trow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.imp-trow + .imp-trow { border-top: 1.5px dashed #d8d2c2; }
.imp-trow.head { background: var(--yellow); font-weight: 800; }
.imp-trow span { padding: 6px 8px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-progress { display: flex; align-items: center; gap: 10px; }
.imp-progress-bar { flex: 1; height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.imp-progress-bar > i { display: block; height: 100%; background: var(--primary); transition: width .25s; }
.imp-progress span { font-size: 12px; font-weight: 700; white-space: nowrap; }
.imp-done { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.imp-done-item {
  border: 2px solid var(--ink); border-radius: 10px; padding: 10px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.imp-done-item b { font-size: 20px; font-weight: 800; }
.imp-done-item span { font-size: 11.5px; color: var(--text2); }
.imp-done-item.ok { background: #d7f7ec; }
.imp-done-item.dup { background: #fff2c9; }
.imp-done-item.fail { background: #ffd7d7; }
.imp-fails { border: 2px solid #d8d2c2; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.imp-fails ul { margin: 6px 0 0 16px; line-height: 1.8; }

/* ================= 全量高分库导入面板 ================= */
/* 两个分区（内置库 / 自定义 CSV）用粗黑顶边分隔，延续 Neo-Brutalism 的"块状"语感 */
.imp-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 2px solid var(--ink); }
.imp-sec-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.imp-sec-head b { font-size: 13.5px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.imp-pad { padding: 6px 2px; }

.imp-libs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.imp-lib {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  padding: 12px; display: flex; align-items: center; gap: 12px; justify-content: space-between;
}
.imp-lib.off { opacity: .55; }
.imp-lib-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.imp-lib-main b { font-size: 14px; font-weight: 800; }
.imp-lib-main span { font-size: 11.5px; color: var(--text2); }
.imp-lib-main em { font-style: normal; font-size: 11.5px; font-weight: 700; }
.imp-lib .btn { flex-shrink: 0; }

.imp-job:empty { display: none; }
.imp-running, .imp-resume, .imp-done-wrap {
  border: 3px solid var(--ink); border-radius: 12px; background: var(--bg);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.imp-resume { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff8dc; }
.imp-resume > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.imp-resume b { font-size: 13.5px; font-weight: 800; }
.imp-resume span { font-size: 12px; color: var(--text2); }
.imp-resume-acts, .imp-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.imp-running-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.imp-running-head b { font-size: 13.5px; font-weight: 800; }
.imp-running-head span { font-size: 12px; font-weight: 700; color: var(--text2); }
/* 进度条加粗 + 高饱和填充（提示词要求"粗线条高饱和色"） */
.imp-progress-lg { height: 22px; }
.imp-progress-bar.imp-progress-lg > i { background: var(--accent); }

.imp-tally { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.imp-tally > span {
  border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; background: var(--card);
}
.imp-tally .ok { background: #d7f7ec; }
.imp-tally .dup { background: #fff2c9; }
.imp-tally .rep { background: #e6f0ff; }
.imp-tally .fail { background: #ffd7d7; }

.imp-done-wrap .imp-done { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.imp-done-item.rep { background: #e6f0ff; }
.imp-done-head b { font-size: 13.5px; font-weight: 800; }

/* ================= PWA 状态 ================= */
.pwa-status { display: flex; gap: 6px; flex-wrap: wrap; }
.pwa-pill {
  font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--bg);
}
.pwa-pill.ok { background: #d7f7ec; }
.pwa-pill.bad { background: #ffd7d7; }

/* ================= 响应式 ================= */
@media (max-width: 1023px) {
  .ext-split { grid-template-columns: minmax(0, 1fr); }
  .ext-side { position: static; }
  .ext-folder-list { max-height: 210px; }
  .ext-card:hover, .ext-folder:hover { transform: none; box-shadow: none; }
}
@media (max-width: 767px) {
  .ext-form { grid-template-columns: minmax(0, 1fr); }
  .ext-dash-grid { grid-template-columns: minmax(0, 1fr); }
  .ext-cards { grid-template-columns: minmax(0, 1fr); }
  .ext-cal-cell { min-height: 64px; padding: 3px; }
  .ext-cal-item { font-size: 9.5px; padding: 2px 4px; }
  .ext-cal-item i { display: none; }
  .ext-pf-row { grid-template-columns: 58px repeat(4, minmax(0, 1fr)); gap: 3px; }
  .ext-pf-row .input { min-height: 30px; font-size: 11.5px; padding: 1px 4px; }
  .ext-dash-metrics { grid-template-columns: minmax(0, 1fr); }
  .ext-year { grid-template-columns: 46px minmax(0, 1fr); gap: 8px; }
  .ext-year-label { font-size: 13px; }
  .ext-kv-row > span { flex: 0 0 76px; }
  .ai-panel { width: 100vw; border-left: 0; }
  .ai-fab { right: 12px; bottom: 12px; min-height: 44px; padding: 0 14px; }
  .ext-row { flex-direction: column; }
  .ext-row-acts { width: 100%; justify-content: flex-end; }
  .imp-trow span { padding: 5px 6px; font-size: 10.5px; }
  /* 手机上：库卡片与统计块改成单列，按钮占满宽度便于点按 */
  .imp-libs { grid-template-columns: minmax(0, 1fr); }
  .imp-lib { flex-direction: column; align-items: stretch; gap: 8px; }
  .imp-lib .btn { width: 100%; justify-content: center; min-height: 40px; }
  .imp-done-wrap .imp-done { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .imp-done { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .imp-btns .btn { flex: 1; justify-content: center; min-height: 40px; }
  .imp-resume { flex-direction: column; align-items: stretch; }
  .imp-resume-acts .btn { flex: 1; justify-content: center; min-height: 40px; }
  .ext-mini { min-height: 30px; }         /* 手机上给足点按面积 */
}
@media (max-width: 420px) {
  .ext-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ext-chips .chip { font-size: 11.5px; padding: 3px 8px; }
}

/* ================= 选题引擎（从作品库生成选题） =================
 * 沿用 Neo-Brutalism：粗黑边框 + 直角 + 选中态硬阴影。
 * 类名统一 ig- 前缀（idea generator），与既有模块隔离。
 */
.ig-lib { border: 2px solid var(--ink); background: var(--bg); padding: 8px 10px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.ig-lib b { font-weight: 900; }
.ig-warn { color: var(--accent); font-weight: 800; }

.ig-recipes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ig-recipe {
  display: grid; gap: 3px; text-align: left; padding: 8px 10px;
  border: 2px solid var(--ink); background: #fff; cursor: pointer;
}
.ig-recipe i { font-size: 15px; }
.ig-recipe b { font-size: 13px; font-weight: 900; }
.ig-recipe span { font-size: 11.5px; font-weight: 600; color: var(--text2); line-height: 1.5; }
.ig-recipe em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--text2); opacity: .85; }
.ig-recipe:hover { background: var(--yellow); }
.ig-recipe.sel { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }

.ig-filters { display: grid; gap: 6px; margin-bottom: 12px; }
.ig-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.ig-key { flex: 0 0 62px; font-size: 12px; font-weight: 800; padding-top: 5px; }
.ig-chips { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; flex: 1; }
.ig-chips .chip { font-size: 11.5px; padding: 3px 8px; }
.ig-mini { width: auto; min-width: 92px; padding: 5px 8px; font-size: 12px; }

.ig-cands { display: grid; gap: 10px; }
.ig-cand { border: 2px solid var(--ink); background: #fff; padding: 10px 12px; }
.ig-cand.dup { background: #f7f5ee; border-style: dashed; }
.ig-cand-head { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.ig-cand-head input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); }
.ig-cand-head b { font-size: 14px; font-weight: 900; line-height: 1.45; }
.ig-badge { align-self: center; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border: 2px solid var(--ink); background: var(--accent); color: #fff; }
.ig-cand-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 7px 0 0; }
.ig-refs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.ig-outline { margin-top: 7px; }
.ig-outline summary { font-size: 12px; font-weight: 800; cursor: pointer; }
.ig-outline pre {
  margin-top: 5px; padding: 8px 10px; background: var(--bg); border: 2px solid var(--ink);
  font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-sans, inherit); max-height: 260px; overflow: auto;
}
.ig-note { border: 2px solid var(--ink); background: #fff5d6; padding: 8px 10px; font-size: 12.5px; font-weight: 700; margin-bottom: 10px; }

.ig-foot {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--ink);
}
.ig-foot-acts { display: flex; gap: 8px; }

/* 选题卡片上的「关联作品」（封面小图 + 作品名） */
.ct-refs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ct-ref {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  border: 2px solid var(--ink); background: var(--bg); padding: 2px 6px 2px 3px;
}
.ct-ref img { width: 22px; height: 30px; object-fit: cover; border: 1px solid var(--ink); background: #ddd; }
.ct-ref b { font-size: 11.5px; font-weight: 800; }
.ct-ref.more { padding: 2px 7px; }

@media (max-width: 640px) {
  .ig-key { flex-basis: 100%; padding-top: 0; }
  .ig-recipe { min-height: 44px; }
  .ig-foot { flex-direction: column; align-items: stretch; }
  .ig-foot-acts { justify-content: flex-end; }
}

.ig-other { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }
.ig-num { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ig-num-input { width: 62px !important; min-width: 0; padding: 5px 6px; font-size: 12px; text-align: center; }

/* AI 面板：数据读取开关 + 「本次读取了什么」 */
.ai-hbtn.on { background: var(--green); color: var(--ink); border-color: var(--ink); }
.ai-ctx {
  margin-top: 8px; padding-top: 6px; border-top: 1px dashed rgba(17,17,17,.25);
  font-size: 11px; font-weight: 700; color: var(--text2); display: flex; gap: 5px; align-items: center;
}
.ai-ctx i { font-size: 10px; opacity: .8; }

/* AI 动作确认卡（对话式写入：记账 / 待办 / 笔记 / 选题） */
.ai-ac {
  margin-top: 8px; padding: 8px 10px; background: var(--bg);
  border: 2px solid var(--ink); border-radius: 10px;
}
.ai-ac-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 800; }
.ai-ac-head i { color: var(--primary); }
.ai-ac-sum { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text2); }
.ai-ac-rows { margin-top: 7px; display: flex; flex-direction: column; gap: 3px; }
.ai-ac-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; line-height: 1.5; }
.ai-ac-row span { flex: 0 0 auto; font-weight: 700; color: var(--text2); }
.ai-ac-row b { font-weight: 800; text-align: right; word-break: break-word; }
.ai-ac-btns { display: flex; gap: 6px; margin-top: 9px; }
.ai-ac-btns .ai-act { margin: 0; }
.ai-ac .ai-act.primary { background: var(--green); font-weight: 800; }
.ai-ac .ai-act.primary:hover { background: var(--yellow); }
.ai-ac.done { background: #e8f9f2; border-color: var(--green); }
.ai-ac.done .ai-ac-head i { color: var(--green); }
.ai-ac.bad { background: #fff0f3; border-color: var(--accent); }
.ai-ac.bad .ai-ac-head i { color: var(--accent); }
.ai-ac.muted { opacity: .62; }
.ai-ac.muted .ai-ac-head { font-weight: 700; font-size: 11.5px; }
.ai-ac-why { margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--text2); }
@media (max-width: 480px) {
  .ai-ac-sum { margin-left: 0; width: 100%; }
  .ai-ac-row { font-size: 11px; }
}

/* ==========================================================================
   内容创作矩阵扩展：参考视频库 / 双语文案 / 年月归档树
   全部沿用既有令牌（--ink / --yellow / --card / --bg），2px 黑边 + 12px 圆角
   ========================================================================== */

.ext-badge.t-mute { background: #e3e3e3; color: #666; }
.ext-tag.ct-ch { background: var(--primary); color: #fff; border-color: var(--ink); }
.ct-stale {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; color: var(--accent);
  border: 2px solid var(--accent); border-radius: 999px; padding: 0 7px;
}
.ct-stale-t { color: var(--accent); }

/* ---- 归档树 + 列表 两栏 ---- */
.ct-split { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 14px; align-items: start; }
.ct-split.tree-hidden { grid-template-columns: minmax(0, 1fr); }
.ct-tree-wrap {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  padding: 6px; max-height: calc(100vh - 210px); overflow: auto;
}
.ct-tree-wrap.collapsed { display: none; }
.ct-tree-head {
  display: none; align-items: center; justify-content: space-between;
  padding: 2px 4px 8px; font-size: 12.5px;
}
.ct-tree-mini {
  border: 2px solid var(--ink); background: var(--bg); border-radius: 8px;
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 11px;
}
.ct-tree-all {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 8px 9px; border: 2px solid transparent; border-radius: 9px;
  background: none; font-size: 13px; font-weight: 800; cursor: pointer; text-align: left;
}
.ct-tree-all span { margin-left: auto; font-size: 11px; opacity: .65; }
.ct-tree-all:hover { background: #efece2; }
.ct-tree-all.active { background: var(--yellow); border-color: var(--ink); }
.ct-tree-row {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 7px 9px; border: 2px solid transparent; border-radius: 9px;
  background: none; font-size: 12.5px; font-weight: 700; cursor: pointer; text-align: left;
  color: var(--ink); line-height: 1.35;
}
.ct-tree-row:hover { background: #efece2; }
.ct-tree-row span { margin-left: auto; font-size: 11px; opacity: .6; font-weight: 800; }
.ct-tree-row.lv1 { font-size: 13px; font-weight: 800; }
.ct-tree-row.lv2 { padding-left: 16px; }
.ct-tree-row.lv3 { padding-left: 34px; font-size: 12px; font-weight: 600; }
.ct-tree-row.active { background: var(--yellow); border-color: var(--ink); padding-top: 5px; padding-bottom: 5px; }
.ct-caret { font-size: 10px; opacity: .65; width: 10px; }
.ct-tree-kids.hidden { display: none; }
.ct-tree-empty { font-size: 12px; color: var(--text2); padding: 10px 8px; line-height: 1.6; }

.ct-filter-tip {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  border: 2px solid var(--ink); border-radius: 10px; background: #fff8dc;
  padding: 6px 10px; font-size: 12px; font-weight: 700;
}
.ct-tip-x {
  margin-left: auto; border: 2px solid var(--ink); background: var(--card);
  border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 800; cursor: pointer;
}

/* ---- 双语文案编辑器（左右分栏，中间可拖拽） ---- */
body.ct-dragging { user-select: none; cursor: col-resize; }
.ct-script {
  display: grid;
  grid-template-columns: var(--zh-w, calc(50% - 8px)) 16px var(--ug-w, calc(50% - 8px));
  align-items: stretch; min-height: 46vh;
}
.ct-script-pane {
  display: flex; flex-direction: column; min-width: 0;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card); overflow: hidden;
}
.ct-script-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 10px; border-bottom: 2px solid var(--ink); background: var(--bg);
  font-size: 12.5px;
}
.ct-script-head b { font-weight: 800; }
.ct-script-count, .ct-script-hint { font-size: 11px; font-weight: 700; color: var(--text2); }
.ct-script-count { margin-left: auto; }
.ct-script-mini {
  border: 2px solid var(--ink); background: var(--card); border-radius: 8px;
  padding: 2px 8px; font-size: 11.5px; font-weight: 800; cursor: pointer;
}
.ct-script-mini:hover { background: var(--yellow); }
.ct-script-mini:disabled { opacity: .6; cursor: wait; }
/* 同样要压过 style.css 的 `select.input{width:100%}`，否则下拉会独占一行把按钮挤下去 */
.ct-script-head .ct-script-sel { width: auto; flex: 0 0 auto; min-width: 92px; padding: 3px 6px; font-size: 11.5px; height: 28px; }
.ct-script-ta {
  flex: 1; width: 100%; min-height: 40vh; border: none; outline: none; resize: vertical;
  padding: 10px 12px; font-size: 14px; line-height: 1.75; background: transparent;
  font-family: inherit; color: var(--ink);
}
.ct-script-grip {
  display: flex; align-items: center; justify-content: center;
  cursor: col-resize; color: var(--ink); opacity: .3; border-radius: 6px;
}
.ct-script-grip:hover { opacity: 1; background: var(--yellow); }
.ct-script-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.ct-script-notes { flex: 1 1 240px; min-width: 0; }
.ct-script-foot .btn { flex: 0 0 auto; }

/* ---- 参考视频库 ---- */
.ct-ref-stat {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
  font-size: 12px; font-weight: 700; color: var(--text2);
}
.ct-ref-stat b { color: var(--ink); }
.ct-batch {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--yellow);
  padding: 8px 12px; font-size: 12.5px; font-weight: 700;
}
.ct-ref-group {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  margin-bottom: 12px; overflow: hidden;
}
.ct-ref-ghead {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--bg); cursor: pointer; font-size: 13px;
}
.ct-ref-ghead:hover { background: #efece2; }
.ct-ref-ghead b { font-weight: 800; }
.ct-ref-ghead em { font-style: normal; font-size: 11.5px; color: var(--text2); font-weight: 700; }
.ct-ref-gcount {
  font-size: 11px; font-weight: 800; background: var(--yellow);
  border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px;
}
.ct-ref-gedit {
  margin-left: auto; font-size: 11.5px; font-weight: 800;
  border: 2px solid var(--ink); border-radius: 999px; padding: 1px 9px; background: var(--card);
}
.ct-ref-gedit:hover { background: var(--yellow); }
.ct-ref-body.hidden { display: none; }
.ct-ref-emptytip { font-size: 12px; color: var(--text2); padding: 10px 12px; }
.ct-ref-headrow, .ct-ref-row {
  display: grid;
  grid-template-columns: 26px minmax(150px, 2.2fr) 84px 52px 96px minmax(90px, 1.4fr) 150px;
  gap: 8px; align-items: center; padding: 8px 12px;
}
.ct-ref-headrow {
  font-size: 10.5px; font-weight: 800; color: var(--text2);
  border-bottom: 2px solid var(--ink); background: rgba(0, 0, 0, .035);
}
.ct-ref-row { border-bottom: 1px dashed rgba(17, 17, 17, .16); font-size: 12.5px; }
.ct-ref-row:last-child { border-bottom: none; }
.ct-ref-row:hover { background: #fbf8ef; }
.ct-ref-row.picked { background: #fff5cc; }
.ct-ref-row.muted { opacity: .6; }
.ct-ref-check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.ct-ref-title { min-width: 0; }
.ct-ref-title a {
  font-weight: 700; color: var(--ink); text-decoration: none;
  display: inline; word-break: break-word;
}
.ct-ref-title a:hover { text-decoration: underline; }
.ct-ref-link { color: var(--green); font-size: 10px; margin-left: 4px; }
.ct-ref-date { font-size: 11.5px; color: var(--text2); font-weight: 700; }
.ct-ref-score b { font-weight: 800; }
.ct-ref-score em { font-style: normal; font-size: 10px; color: var(--text2); }
.ct-ref-note { font-size: 11.5px; color: var(--text2); min-width: 0; word-break: break-word; }
.ct-ref-acts { display: flex; gap: 5px; justify-content: flex-end; }

/* ---- 窄屏：分栏改竖排、表格改卡片 ---- */
@media (max-width: 1024px) {
  .ct-split { grid-template-columns: 208px minmax(0, 1fr); }
  .ct-ref-headrow, .ct-ref-row {
    grid-template-columns: 24px minmax(120px, 2fr) 70px 44px 88px minmax(70px, 1fr) 132px;
    font-size: 12px;
  }
}
@media (max-width: 900px) {
  .ct-split, .ct-split.tree-hidden { grid-template-columns: minmax(0, 1fr); }
  .ct-tree-wrap { max-height: 42vh; }
  .ct-tree-head { display: flex; }
  .ct-script { grid-template-columns: minmax(0, 1fr); }
  .ct-script-grip { display: none; }
  .ct-script-ta { min-height: 30vh; }
  .ct-script { min-height: 0; gap: 10px; }
}
@media (max-width: 760px) {
  .ct-ref-headrow { display: none; }
  .ct-ref-row {
    display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px;
  }
  .ct-ref-check { flex: 0 0 20px; }
  .ct-ref-title { flex: 1 1 calc(100% - 34px); }
  .ct-ref-date, .ct-ref-score, .ct-ref-status { flex: 0 0 auto; }
  .ct-ref-note { flex: 1 1 100%; }
  .ct-ref-acts { flex: 1 1 100%; justify-content: flex-start; }
  .ct-ref-ghead { padding: 9px 10px; }
  .ct-ref-group { margin-bottom: 10px; }
  .ct-script-foot .ct-script-hint { display: none; }
  .ct-script-foot .btn { flex: 1 1 auto; }
}

/* 5 个 Tab 在窄屏会挤成两行字 —— 改成横向滑动条，一次滑到位 */
@media (max-width: 760px) {
  .tab-bar.ext-tabs {
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -ms-overflow-style: none;
    padding: 4px;
  }
  .tab-bar.ext-tabs::-webkit-scrollbar { display: none; }
  .tab-bar.ext-tabs .tab-item {
    flex: 0 0 auto; white-space: nowrap; padding: 0 11px; font-size: 13px;
  }
  /* 顶栏标题被两个按钮挤到换行，这里压住 */
  #topbar-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #topbar-action .btn { padding: 6px 9px; font-size: 12px; }
}

/* ==========================================================================
   HUMAN 3.0 · 首页聚焦（今晚 90 分钟钩子 / 事实指标 / 一行复盘）
   全站视觉权重最高的一块：亮黄底 + 2px 黑边 + 硬阴影
   ========================================================================== */

.h3-top { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

/* ---- 今晚更新（追番日历）----
   刻意比钩子卡轻一档：白底 + 2px 黑边，别和「今晚 90 分钟」抢视觉权重。
   今天没有番更新时容器是空的（JS 不填内容），所以这里不能用固定 padding。 */
.ov-airing:empty { display: none; }
.ov-airing { margin-bottom: 16px; }
.ov-airing-card {
  border: 2px solid var(--ink); border-radius: 12px;
  background: var(--card); box-shadow: 3px 3px 0 var(--ink);
  overflow: hidden;
}
.ov-airing-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; font-size: 13px; font-weight: 800;
  border-bottom: 2px solid var(--ink); background: var(--hover);
}
.ov-airing-more { font-size: 12px; font-weight: 700; color: var(--ink); text-decoration: none; }
.ov-airing-more:hover { text-decoration: underline; }
.ov-airing-list { list-style: none; margin: 0; padding: 4px 0; }
.ov-airing-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; font-size: 13px; line-height: 1.4;
}
.ov-airing-list li + li { border-top: 1px dashed rgba(17, 17, 17, .15); }
.ov-airing-time {
  flex: 0 0 auto; min-width: 46px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--primary);
}
.ov-airing-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-airing-ep {
  flex: 0 0 auto; font-size: 11px; font-weight: 800;
  padding: 1px 7px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--yellow);
}
.ov-airing-rest {
  padding: 6px 12px 8px; font-size: 12px; font-weight: 700;
  color: #666; border-top: 1px dashed rgba(17, 17, 17, .15);
}

/* ---- 核心钩子卡 ---- */
.h3-hook {
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.h3-hook.is-running { background: #ffe98a; }
.h3-hook.is-held { background: #b8f2dd; }
.h3-hook-empty { background: var(--card); }

.h3-hook-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.h3-badge {
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
  background: var(--ink); color: var(--yellow);
  border-radius: 999px; padding: 3px 10px;
}
.h3-project {
  font-size: 15px; font-weight: 800; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.h3-mini {
  margin-left: auto; border: 2px solid var(--ink); background: var(--card);
  border-radius: 8px; padding: 2px 10px; font-size: 11.5px; font-weight: 800; cursor: pointer;
}
.h3-mini:hover { background: var(--ink); color: var(--yellow); }
.h3-link {
  border: none; background: none; padding: 0 2px; cursor: pointer;
  font-size: 12px; font-weight: 800; color: var(--primary); text-decoration: underline;
}
.h3-hook-line { font-size: 13px; font-weight: 700; line-height: 1.6; margin: -4px 0 0; }
.h3-hook-line.h3-warn { color: #8a5a00; }
.h3-empty-line { font-size: 13.5px; font-weight: 700; margin: 0; }

.h3-plan { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 800; }
.h3-plan > span { flex: 0 0 auto; }
.h3-plan-input {
  flex: 1 1 200px; min-width: 0; font-size: 16px !important;
  border-width: 2px; background: #fffdf3; font-weight: 700;
}

/* 两个摩擦力开关：打开后是实心黑，没打开是虚线框 */
.h3-switches { display: flex; gap: 8px; flex-wrap: wrap; }
.h3-switch {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px dashed var(--ink); border-radius: 10px; background: transparent;
  padding: 8px 12px; font-size: 12.5px; font-weight: 800; cursor: pointer; color: var(--ink);
  min-height: 44px;
}
.h3-switch i { font-size: 13px; opacity: .55; }
.h3-switch:hover { background: rgba(255, 255, 255, .5); }
.h3-switch.on { border-style: solid; background: var(--ink); color: var(--yellow); }
.h3-switch.on i { opacity: 1; }

.h3-timer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.h3-clock {
  font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums;
  letter-spacing: 1px; line-height: 1;
}
.h3-clock.is-done { color: #0b6b4f; }
.h3-held { font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.h3-hint { font-size: 11.5px; font-weight: 600; color: #6b5b1e; margin: 0; line-height: 1.5; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---- 3 个事实指标 ---- */
.h3-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.h3-metric {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.h3-metric-label { font-size: 11px; font-weight: 800; color: var(--text2); }
.h3-metric-value { font-size: 16px; font-weight: 900; }
.h3-metric-sub { font-size: 11px; font-weight: 600; color: var(--text2); }
.h3-metric.ok { background: #f0fbf6; border-color: var(--ink); }

/* ---- 今天 3 件事 ---- */
.h3-three {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card); overflow: hidden;
}
.h3-three-head {
  font-size: 11.5px; font-weight: 800; padding: 7px 12px;
  background: var(--bg); border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.h3-three-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; border-bottom: 1px dashed rgba(17, 17, 17, .18);
  background: none; padding: 11px 12px; cursor: pointer; font-size: 13.5px; font-weight: 700;
  min-height: 44px;
}
.h3-three-item:last-child { border-bottom: none; }
.h3-three-item:hover { background: #fbf8ef; }
.h3-three-item.done { opacity: .45; text-decoration: line-through; }
.h3-three-box {
  flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 5px;
  background: var(--card);
}
.h3-three-item.done .h3-three-box { background: var(--green); }
.h3-three-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h3-three-late {
  flex: 0 0 auto; font-style: normal; font-size: 10.5px; font-weight: 800;
  color: #8a5a00; border: 2px solid #b98a2e; border-radius: 999px; padding: 0 7px;
}

/* ---- 一行复盘 ---- */
.h3-review {
  display: flex; align-items: center; gap: 8px;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card); padding: 8px 10px;
}
.h3-review-input { flex: 1 1 auto; min-width: 0; font-size: 16px !important; border: none !important; background: transparent !important; }
.h3-review-input:focus { box-shadow: none !important; }
.h3-review-count { font-size: 11px; font-weight: 700; color: var(--text2); flex: 0 0 auto; }

/* ---- 折叠区（原来的十几个面板全收在这里） ---- */
.ov-more { border: 2px solid var(--ink); border-radius: 12px; background: var(--card); margin-top: 4px; }
.ov-more-sum {
  cursor: pointer; list-style: none; padding: 12px 14px;
  font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-height: 44px;
}
.ov-more-sum::-webkit-details-marker { display: none; }
.ov-more-sum span { font-size: 11.5px; font-weight: 600; color: var(--text2); }
.ov-more[open] .ov-more-sum { border-bottom: 2px solid var(--ink); }
.ov-more-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }

/* ---- 全屏计时（痴迷通道的轻量版） ---- */
body.h3-focus-open { overflow: hidden; }
.h3-focus {
  position: fixed; inset: 0; z-index: 300;
  background: #12100c; color: #f7f3e6;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.h3-focus-inner { text-align: center; max-width: 520px; width: 100%; }
.h3-focus-label { font-size: 13px; font-weight: 800; color: #ffd643; margin: 0 0 6px; letter-spacing: .5px; }
.h3-focus-plan { font-size: 15px; font-weight: 700; margin: 0 0 28px; line-height: 1.6; opacity: .85; }
.h3-focus-clock {
  font-size: clamp(64px, 16vw, 128px); font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 2px; color: #fff;
}
.h3-focus-track {
  height: 10px; border: 2px solid #f7f3e6; border-radius: 999px;
  margin: 22px auto 0; max-width: 360px; overflow: hidden;
}
.h3-focus-track i { display: block; height: 100%; background: #ffd643; transition: width 1s linear; }
.h3-focus-tip { font-size: 12px; font-weight: 600; opacity: .55; margin: 16px 0 26px; }
.h3-focus-stop { min-height: 48px; padding: 0 28px; font-size: 15px; }

/* ---- 换项目列表 ---- */
.h3-pick { display: flex; flex-direction: column; gap: 8px; }
.h3-pick-item {
  text-align: left; border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
}
.h3-pick-item:hover { background: var(--yellow); }
.h3-pick-item b { font-size: 13.5px; font-weight: 800; }
.h3-pick-item span { font-size: 11.5px; color: var(--text2); font-weight: 600; }
.h3-pick-risk { font-style: normal; font-size: 10.5px; font-weight: 800; color: #8a5a00; }

/* ---- 窄屏 ---- */
@media (max-width: 768px) {
  .h3-hook { padding: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .h3-clock { font-size: 30px; }
  .h3-metrics { grid-template-columns: 1fr; }
  .h3-metric { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .h3-metric-label { flex: 0 0 auto; }
  .h3-metric-value { font-size: 15px; }
  .h3-metric-sub { margin-left: auto; }
  .h3-switch { flex: 1 1 100%; justify-content: center; }
  .h3-plan { flex-direction: column; align-items: stretch; }
  /* 竖排时 flex-basis 会变成高度，输入框会被拉成 200px 高的巨框 —— 必须钉死高度 */
  .h3-plan-input { flex: 0 0 auto; height: 46px; min-height: 46px; }
  .h3-review { flex-wrap: wrap; }
  .h3-review-input { flex: 1 1 100%; }
  .h3-review-count { order: 2; }
}

/* ==========================================================================
   HUMAN 3.0 · 今日产能条（内容创作页顶部）
   ========================================================================== */
.ct-prod {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  padding: 10px 12px; margin-bottom: 10px;
}
.ct-prod-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.ct-prod-head b { font-weight: 800; }
.ct-prod-total { font-weight: 900; font-variant-numeric: tabular-nums; }
.ct-prod-track {
  flex: 1 1 120px; height: 10px; min-width: 80px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); overflow: hidden;
}
.ct-prod-track i { display: block; height: 100%; background: var(--green); transition: width .3s; }
.ct-prod-extra { font-size: 11px; font-weight: 700; color: var(--text2); }
.ct-prod-set {
  margin-left: auto; border: 2px solid var(--ink); background: var(--bg);
  border-radius: 8px; padding: 3px 10px; font-size: 11.5px; font-weight: 800; cursor: pointer;
}
.ct-prod-set:hover { background: var(--yellow); }
/* 手机上原 47×27，高度不够点（体检实测） */
@media (max-width: 767px) {
  .ct-prod-set { min-height: 40px; padding: 3px 12px; }
}

.ct-prod-accounts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ct-prod-acc {
  flex: 1 1 138px; min-width: 0;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--bg);
  padding: 7px 9px; display: flex; flex-direction: column; gap: 4px;
}
.ct-prod-acc.is-full { background: #e8f9f2; }
.ct-prod-name {
  font-size: 11.5px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ct-prod-num { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ct-prod-mini { height: 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; }
.ct-prod-mini i { display: block; height: 100%; background: var(--primary); }
.ct-prod-acc.is-full .ct-prod-mini i { background: var(--green); }
.ct-prod-acc em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--text2); }

@media (max-width: 600px) {
  .ct-prod-acc { flex: 1 1 calc(50% - 4px); }
  .ct-prod-set { margin-left: 0; }
}

/* 目标体系项目表单里的「设为主推进项目」勾选 */
.gl-checkbox {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer;
  font-size: 12.5px; font-weight: 700; line-height: 1.6;
}
.gl-checkbox input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--primary); flex: 0 0 auto; }
.gl-checkbox span { min-width: 0; }

/* ==========================================================================
   HUMAN 3.0 · P1 开发工具箱：单项目条 / 痴迷通道 / 日志类型 / 教程清理
   ========================================================================== */

/* ---- 顶部主项目条（整页的锚，切 Tab 也不消失） ---- */
.dv-mainbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--yellow);
  padding: 10px 14px; margin-bottom: 10px;
  box-shadow: 4px 4px 0 var(--ink);
}
.dv-mainbar.is-empty { background: var(--card); box-shadow: none; }
.dv-mainbar.is-risk { background: #ffe9b0; }
.dv-main-left { min-width: 0; flex: 1 1 240px; }
.dv-main-name {
  font-size: 14px; font-weight: 900; display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dv-main-deliver { font-size: 12.5px; font-weight: 600; color: #4a3c00; margin-top: 2px; line-height: 1.5; }
.dv-main-deliver b { font-weight: 900; }
.dv-mainbar.is-empty .dv-main-deliver,
.dv-mainbar.is-empty .dv-main-name { color: var(--text2); }
.dv-main-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dv-risk {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: #8a5a00;
  border: 2px solid #b98a2e; border-radius: 999px; padding: 2px 9px;
}

/* ---- 正在通道里的轻量计时条 ---- */
.dv-chbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 2px solid var(--ink); border-radius: 12px; background: #12100c;
  color: #ffd643; padding: 8px 14px; margin-bottom: 10px;
}
.dv-ch-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #ff4d6d; flex: 0 0 auto;
  animation: dv-pulse 1.6s ease-in-out infinite;
}
@keyframes dv-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.dv-ch-clock { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.dv-ch-txt { font-size: 12px; font-weight: 700; opacity: .8; }
.dv-chbar .btn { margin-left: auto; }
.dv-chbar .btn + .btn { margin-left: 0; }
.dv-chbar .btn-ghost { background: transparent; color: #f7f3e6; border-color: #f7f3e6; }

/* ---- 学习 / 产出比例条 ---- */
.dv-ratio {
  display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
  font-size: 11.5px; font-weight: 700; color: var(--text2);
}
.dv-ratio-num { font-weight: 900; color: var(--ink); font-size: 12.5px; }
.dv-ratio-track {
  width: 88px; height: 8px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--bg); overflow: hidden;
}
.dv-ratio-track i { display: block; height: 100%; background: var(--green); }
.dv-ratio-txt { white-space: nowrap; }

/* ---- 日志时间线：产出 vs 学习 ---- */
.dv-tl-deliver .ext-tl-dot { background: var(--green); }
.dv-tl-learn .ext-tl-dot { background: #d9d4c5; }
.dv-asset {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--primary);
  word-break: break-all;
}
.dv-asset a { color: var(--primary); }

/* ---- 教程清理 ---- */
.dv-clean {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border: 2px solid var(--ink); border-radius: 12px; background: #fff8dc;
  padding: 9px 12px; margin-bottom: 10px; font-size: 12.5px; font-weight: 700;
}
.dv-clean em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--text2); }
.dv-res-stale { opacity: .72; }
.dv-res-stale .ext-row-title { color: var(--text2); }
.dv-practice { border-color: var(--green); }
.dv-practice:hover { background: var(--green); }

@media (max-width: 760px) {
  .dv-mainbar { padding: 9px 11px; box-shadow: 3px 3px 0 var(--ink); }
  .dv-main-name { font-size: 13.5px; }
  .dv-main-right { width: 100%; }
  .dv-main-right .btn { flex: 1 1 auto; justify-content: center; }
  .dv-risk { width: 100%; justify-content: center; }
  .dv-ratio { margin-left: 0; width: 100%; }
  .dv-ratio-track { flex: 1 1 auto; }
  .dv-chbar .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   HUMAN 3.0 · P1 精神补位：空虚感接收器 / 关系锚点卡片
   ========================================================================== */

/* ---- 空虚感：一个输入框 + 三个按钮，别再加字段 ---- */
.vd-page { display: flex; flex-direction: column; gap: 14px; }
.vd-hero {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  box-shadow: 5px 5px 0 var(--ink); padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.vd-q { font-size: 16px; font-weight: 900; letter-spacing: .3px; }
.vd-input {
  width: 100%; border: 2px solid var(--ink); border-radius: 10px;
  padding: 14px 14px; font-size: 16px; font-weight: 700;
  background: #fffdf3; color: var(--ink); outline: none;
}
.vd-input:focus { box-shadow: 3px 3px 0 var(--ink); }
.vd-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.vd-act {
  flex: 1 1 150px; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--bg);
  font-size: 13px; font-weight: 800; color: var(--ink); cursor: pointer;
  padding: 8px 12px; text-align: center;
}
.vd-act:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.vd-act:active { transform: none; box-shadow: none; }
.vd-act i { font-size: 15px; }
.vd-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vd-tip { font-size: 11.5px; font-weight: 600; color: var(--text2); }
.vd-walk {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 2px solid var(--ink); border-radius: 10px; background: #e8f9f2;
  padding: 9px 12px; font-size: 13px; font-weight: 800;
}
.vd-walk b { font-size: 20px; font-variant-numeric: tabular-nums; }
.vd-walk .btn { margin-left: auto; }

.vd-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; font-weight: 700; color: var(--text2);
}
.vd-stats b { color: var(--ink); font-weight: 900; }
.vd-monthbar:empty { display: none; }

.vd-list { display: flex; flex-direction: column; gap: 8px; }
.vd-item {
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: 10px 12px;
}
.vd-item.has-action { border-left-width: 6px; border-left-color: var(--green); }
.vd-item-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.vd-item-head b { font-size: 12.5px; font-weight: 900; }
.vd-item-head .ext-mini { margin-left: auto; }
.vd-item-reason { font-size: 13.5px; font-weight: 700; margin-top: 5px; line-height: 1.6; word-break: break-word; }

.vd-empty {
  border: 2px dashed rgba(17, 17, 17, .3); border-radius: 12px;
  padding: 28px 18px; text-align: center; color: var(--text2);
}
.vd-empty i { font-size: 22px; opacity: .5; }
.vd-empty p { font-size: 13.5px; font-weight: 800; margin: 8px 0 4px; color: var(--ink); }
.vd-empty span { font-size: 12px; line-height: 1.7; }

/* ---- 关系锚点 ---- */
.ra-block {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--bg);
  padding: 12px 14px; margin-bottom: 12px;
}
.ra-block.is-empty { background: var(--card); }
.ra-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 900; margin-bottom: 10px;
}
.ra-head i { color: var(--accent); }
.ra-head span { font-size: 11.5px; font-weight: 600; color: var(--text2); }
.ra-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.ra-card {
  flex: 1 1 220px; min-width: 0;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
}
/* 「超过 7 天没深聊」只用淡色，不用红色、不抖动 —— 无负罪感设计 */
.ra-card.is-warm { background: #faf6ea; border-style: dashed; }
.ra-name { font-size: 14px; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.ra-name em {
  font-style: normal; font-size: 10.5px; font-weight: 800;
  border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px; background: var(--yellow);
}
.ra-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; color: var(--text2); }
.ra-meta b { color: var(--ink); font-weight: 900; }
.ra-anniv { color: #8a5a00; }
.ra-warm { font-size: 11.5px; font-weight: 600; color: #8a7a52; line-height: 1.5; }
.ra-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.ra-add-card {
  flex: 0 0 96px; min-height: 84px;
  border: 2px dashed rgba(17, 17, 17, .35); border-radius: 10px; background: none;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11.5px; font-weight: 800; color: var(--text2); cursor: pointer;
}
.ra-add-card:hover { border-style: solid; background: var(--yellow); color: var(--ink); }
.ra-talk-list { display: flex; flex-direction: column; gap: 12px; }
.ra-talk { border-left: 3px solid var(--ink); padding-left: 10px; }
.ra-talk-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ra-talk-acts { display: flex; gap: 6px; margin-top: 6px; }

@media (max-width: 760px) {
  .vd-hero { padding: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .vd-q { font-size: 15px; }
  .vd-act { flex: 1 1 100%; min-height: 48px; justify-content: flex-start; padding-left: 16px; }
  .ra-card { flex: 1 1 100%; }
  .ra-add-card { flex: 1 1 100%; min-height: 52px; flex-direction: row; }
}

/* 筛选行是 flex-wrap：#dv-body 没有 flex-basis 时会跟 chips 挤在一行，
   列表被压成一条细柱（资源收藏页踩过）。让它单独占一行。 */
.ext-filter-line > #dv-body { flex: 1 1 100%; min-width: 0; }
/* 下拉本来跟 chips 并排，被 .input 的 width:100% 拉满整行 */
.ext-filter-line .ext-select { width: auto; max-width: 320px; min-width: 140px; }

/* ---- 成果墙（只放真做出来的东西） ---- */
.dv-wall-top {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
  font-size: 12px; font-weight: 700; color: var(--text2);
}
.dv-wall-top b { color: var(--ink); font-weight: 900; }
.dv-wall-month { margin-bottom: 16px; }
.dv-wall-m {
  font-size: 11.5px; font-weight: 900; color: var(--text2);
  letter-spacing: .5px; margin-bottom: 6px;
}
.dv-wall-items { display: flex; flex-direction: column; gap: 6px; }
.dv-wall-item {
  display: flex; align-items: flex-start; gap: 10px;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: 9px 12px;
}
.dv-wall-item > i { font-size: 14px; margin-top: 2px; color: var(--primary); }
.dv-wall-main { flex: 1; min-width: 0; }
.dv-wall-title { font-size: 13.5px; font-weight: 800; word-break: break-word; }
.dv-wall-sub {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  font-size: 11.5px; margin-top: 3px; word-break: break-all;
}
.dv-wall-date { font-size: 11px; font-weight: 800; color: var(--text2); flex: 0 0 auto; }

/* ==========================================================================
   HUMAN 3.0 · P2 技能真实度（AI 依赖度）
   红色只用于「数据超过安全线」，不用于评价人；没记录的周是空心柱，不是 0 分
   ========================================================================== */
.da-block { display: flex; flex-direction: column; gap: 12px; }
.da-state {
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px;
  border: 2px solid var(--ink); background: var(--card);
}
.da-state.t-ok { background: #e8f9f2; }
.da-state.t-near { background: #fff8dc; }
.da-state.t-over { background: #ffe3e8; color: #9b1c33; border-color: #9b1c33; }
.da-state.t-none { background: var(--bg); color: var(--text2); border-style: dashed; }

.da-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.da-score {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--yellow);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.da-score-num { font-size: 40px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.da-score-num em { font-size: 13px; font-style: normal; font-weight: 800; opacity: .65; margin-left: 2px; }
.da-score-label { font-size: 11.5px; font-weight: 800; color: #4a3c00; }
.da-dep { margin-top: 8px; }
.da-dep-track {
  height: 8px; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; overflow: hidden; margin-bottom: 4px;
}
.da-dep-track i { display: block; height: 100%; background: var(--green); }
.da-dep-track i.t-near { background: #ffd643; }
.da-dep-track i.t-over { background: var(--accent); }
.da-dep-track i.t-none { background: transparent; }
.da-dep span { font-size: 10.5px; font-weight: 700; color: #4a3c00; }

.da-month, .da-trend {
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.da-month-head, .da-trend-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12px; font-weight: 900;
}
.da-month-metrics { display: flex; gap: 16px; flex-wrap: wrap; }
.da-month-metrics > div { display: flex; flex-direction: column; }
.da-month-metrics b { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.da-month-metrics span { font-size: 10.5px; font-weight: 700; color: var(--text2); }
.da-month-foot { font-size: 11px; }

.da-bars { display: flex; align-items: flex-end; gap: 8px; height: 68px; }
.da-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.da-bar i {
  display: block; width: 100%; border: 2px solid var(--ink); border-radius: 5px 5px 0 0;
  background: var(--primary); min-height: 3px; transition: height .25s;
}
.da-bar.is-empty i { background: transparent; border-style: dashed; border-color: rgba(17,17,17,.35); height: 100% !important; }
.da-bar span { font-size: 9.5px; font-weight: 700; color: var(--text2); text-align: center; margin-top: 3px; }

.da-hint {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  color: #6b5b1e; background: #fffdf0; border: 1.5px dashed #b98a2e;
  border-radius: 10px; padding: 8px 12px; line-height: 1.6;
}
.da-form {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  border-top: 1.5px dashed rgba(17, 17, 17, .2); padding-top: 10px;
  font-size: 12px; font-weight: 700;
}
.da-num { width: 62px; min-height: 34px; padding: 2px 8px; font-size: 13px; text-align: center; }
.da-recent { display: flex; gap: 6px; flex-wrap: wrap; }
.da-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; color: var(--text2);
  border: 2px solid rgba(17, 17, 17, .25); border-radius: 999px; padding: 1px 4px 1px 8px;
}
.da-chip-x {
  border: none; background: none; cursor: pointer; font-size: 13px;
  line-height: 1; color: var(--text2); padding: 0 4px;
}
.da-chip-x:hover { color: var(--accent); }

@media (max-width: 900px) {
  .da-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .da-score { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .da-grid { grid-template-columns: minmax(0, 1fr); }
  .da-score-num { font-size: 34px; }
  .da-form { gap: 6px; }
  .da-num { width: 54px; min-height: 40px; }
  .da-form .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   阶段一：一句话录入（快捷入口 + 面板）/ 空白日回收 / 逾期收敛
   ========================================================================== */

/* ---- 快捷入口：叠在 AI 助手上面，不抢它的位置 ---- */
.qc-fab {
  position: fixed; right: 18px; z-index: 90;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--yellow); color: var(--ink);
  font-size: 14px; font-weight: 900; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.qc-fab:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.qc-fab:active { transform: none; box-shadow: none; }

body.qc-open { overflow: hidden; }

/* ---- 面板：桌面右下角浮层，手机贴底 ---- */
.qc-mask {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(17, 17, 17, .32);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0; animation: qc-fade .14s ease-out;
}
@keyframes qc-fade { from { opacity: 0; } to { opacity: 1; } }
.qc-panel {
  width: 100%; max-width: 560px;
  background: var(--card); border: 2px solid var(--ink);
  border-radius: 14px 14px 0 0; box-shadow: 0 -4px 0 var(--ink);
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px;
  animation: qc-up .16s ease-out;
}
@keyframes qc-up { from { transform: translateY(14px); } to { transform: none; } }
.qc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.qc-head b { font-weight: 900; }
.qc-hint { font-size: 11px; font-weight: 600; color: var(--text2); }
.qc-x {
  margin-left: auto; border: 2px solid var(--ink); background: var(--card);
  border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 13px;
}
.qc-x:hover { background: var(--yellow); }
.qc-input { font-size: 17px !important; min-height: 50px; font-weight: 700; }

.qc-kinds { display: flex; gap: 6px; }
.qc-kind {
  border: 2px solid var(--ink); border-radius: 999px; background: var(--bg);
  padding: 3px 12px; font-size: 12px; font-weight: 800; cursor: pointer; color: var(--ink);
  min-height: 32px;
}
.qc-kind.active { background: var(--ink); color: var(--yellow); }

.qc-preview {
  border: 2px dashed rgba(17, 17, 17, .28); border-radius: 10px;
  padding: 8px 10px; min-height: 54px; font-size: 12.5px;
  display: flex; flex-direction: column; gap: 3px;
}
.qc-empty { color: var(--text2); font-weight: 600; }
.qc-err { color: #9b1c33; font-weight: 700; }
.qc-pv-head { font-size: 11.5px; font-weight: 900; }
.qc-pv-head em {
  font-style: normal; font-size: 10px; font-weight: 800; margin-left: 6px;
  border: 2px solid var(--ink); border-radius: 999px; padding: 0 6px; background: var(--bg);
}
.qc-pv-row { display: flex; gap: 8px; align-items: baseline; }
.qc-pv-row span { flex: 0 0 40px; color: var(--text2); font-size: 11px; font-weight: 700; }
.qc-pv-row b { font-weight: 800; word-break: break-word; }

.qc-foot { display: flex; align-items: center; gap: 10px; }
.qc-tip { font-size: 11px; font-weight: 600; color: var(--text2); }
.qc-foot .btn { margin-left: auto; min-height: 44px; }

@media (min-width: 761px) {
  .qc-mask { align-items: flex-end; justify-content: flex-end; padding: 0 18px 96px 18px; }
  .qc-panel { border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); }
}
@media (max-width: 760px) {
  .qc-fab { right: 12px; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); padding: 0 14px; }
  .qc-fab span { display: none; }              /* 手机上只留一个 ＋，别挡内容 */
  .qc-fab { width: 48px; justify-content: center; }
}

/* ---- 空白天数回收条 ---- */
.h3-gap {
  display: flex; flex-direction: column; gap: 8px;
  border: 2px solid var(--ink); border-radius: 12px; background: #eef7f1;
  padding: 10px 12px; margin-bottom: 12px;
}
.h3-gap-text { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.h3-gap-text i { color: var(--green); }
.h3-gap-text b { font-weight: 900; }
.h3-gap-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h3-gap-row .input { flex: 1 1 200px; min-width: 0; font-size: 15px !important; }
.h3-gap-row .btn { flex: 0 0 auto; min-height: 42px; }

/* ---- 逾期待办收敛条 ---- */
.h3-od {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--card);
  padding: 9px 12px; margin-top: 12px;
}
.h3-od-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 240px; }
.h3-od-num {
  font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums;
  min-width: 26px; text-align: center;
}
.h3-od-txt { font-size: 12px; font-weight: 600; color: var(--text2); line-height: 1.5; }
.h3-od-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.h3-od-acts .btn { min-height: 38px; }

/* 逾期条：文字被「逐条看」挤成两行（截图里 '逐条/看' 断开了），把动作区钉住不参与伸缩 */
.h3-od-main { flex: 1 1 auto; }
.h3-od-acts { flex: 0 0 auto; }
.h3-od-acts .btn { white-space: nowrap; }
.h3-od-txt { min-width: 0; }

/* ==========================================================================
   今日概览：分段计时（按项目 / 待办）
   ========================================================================== */

/* ---------- 首页主卡「我在做什么」：一块独立的计时面板 ----------
   原来是 border-top: 2px dashed —— 「在做什么」提到主卡第一位后，这条虚线就挂在
   卡片最顶上，看着像多出来的一道黑线，所以直接去掉；分隔交给面板自身的边框。 */
.h3-seg {
  display: flex; flex-direction: column; gap: 10px;
  background: #fffdf7;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 11px 13px 12px;
  box-shadow: 3px 3px 0 rgba(17, 17, 17, .16);
}
.h3-seg.is-live { background: #fff8f1; }

/* 第一行：标题 + 状态胶囊 …… 右边是大时钟（视觉重心） */
.h3-seg-top { display: flex; align-items: center; gap: 10px; }
.h3-seg-label {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 1 1 auto; min-width: 0;
  font-size: 12px; font-weight: 900; letter-spacing: .3px; color: var(--text2);
}
.h3-seg-label i { color: var(--orange); font-size: 12px; }
.h3-seg-flag {
  flex: 0 0 auto; font-style: normal;
  font-size: 10.5px; font-weight: 800; letter-spacing: .2px;
  padding: 1px 7px; border-radius: 999px;
  border: 2px solid rgba(17, 17, 17, .28); background: #fff; color: var(--text2);
}
.h3-seg-flag.is-live { background: var(--orange); border-color: var(--ink); color: #fff; }
.h3-seg-clock {
  flex: 0 0 auto;
  font-size: 26px; line-height: 1; font-weight: 900;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums; letter-spacing: .5px;
  color: #c3bcab;                 /* 没在计时时是灰的：不跟内容抢注意力 */
}
.h3-seg-clock.is-on { color: var(--focus-deep, #e2700a); }

/* 第二行：选择器 + 主按钮 */
.h3-seg-row { display: flex; align-items: stretch; gap: 8px; }
.h3-seg-sel {
  flex: 1 1 auto; min-width: 0; width: auto;
  font-size: 13.5px; font-weight: 800; min-height: 40px; padding: 2px 10px;
  background: #fff;
}
.h3-seg-go {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 16px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 900; letter-spacing: .2px;
  color: #fff; background: var(--accent);
  border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, background .12s, color .12s;
}
.h3-seg-go i { font-size: 12px; }
.h3-seg-go:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.h3-seg-go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
/* 计时中：主按钮退成白底（结束是收尾动作，不该比开始更抢眼） */
.h3-seg-go.is-stop { background: #fff; color: var(--ink); }
.h3-seg-go.is-stop:hover { background: var(--ink); color: #fff; }

/* 第三行：今天各段时长 */
.h3-seg-list { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.h3-seg-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 2px solid rgba(17, 17, 17, .45); border-radius: 999px;
  background: #fff; padding: 2px 9px 2px 10px;
  font-size: 11.5px; font-weight: 700;
}
.h3-seg-chip b { font-weight: 900; font-variant-numeric: tabular-nums; }
.h3-seg-chip em { font-style: normal; font-size: 10px; opacity: .55; }
.h3-seg-chip.is-on { background: var(--orange); border: 2px solid var(--ink); color: #fff; }
.h3-seg-total { font-size: 11.5px; font-weight: 700; color: var(--text2); }
.h3-seg-total b { font-size: 13px; color: var(--ink); }
.h3-seg-empty {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--text2); line-height: 1.65;
}
.h3-seg-empty i { color: var(--orange); font-size: 12px; margin-top: 3px; }

/* 3 件事：完成方框 + 计时按钮 */
.h3-three { position: relative; }
.h3-three-tip { font-size: 10.5px; font-weight: 600; color: var(--text2); margin-left: auto; }
.h3-three-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; border-bottom: 1px dashed rgba(17, 17, 17, .18); background: none;
  padding: 9px 12px; font-size: 13.5px; font-weight: 700; }
.h3-three-item:last-child { border-bottom: none; }
.h3-three-done { border: none; background: none; padding: 4px; cursor: pointer; flex: 0 0 auto; }
.h3-three-spent { font-style: normal; font-size: 10.5px; font-weight: 800; color: #0b6b4f; flex: 0 0 auto; }
.h3-three-time {
  flex: 0 0 auto; border: 2px solid var(--ink); border-radius: 8px; background: var(--card);
  height: 34px; min-width: 34px; padding: 0 9px; cursor: pointer; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 5px; font-family: inherit;
}
.h3-three-time:hover { background: var(--yellow); }
.h3-three-time.is-on { background: var(--green); }

@media (max-width: 760px) {
  .h3-seg { padding: 10px 11px; gap: 9px; }
  .h3-seg-clock { font-size: 22px; }
  .h3-seg-row { flex-wrap: wrap; }
  .h3-seg-sel { flex: 1 1 100%; }
  .h3-seg-go { flex: 1 1 100%; }   /* 手机上主按钮独占一行，手指好点 */
  .h3-three-tip { display: none; }
}

/* 3 件事：完成方框放进 <button> 后变成普通 inline，宽高失效会缩成一条竖线
   —— 必须给按钮 flex，里面的 span 才会按 18×18 撑开 */
.h3-three-done {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
}
.h3-three-done .h3-three-box { flex: 0 0 auto; }
.h3-three-time {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--ink);
}
.h3-three-time.is-on { background: var(--green); color: var(--ink); }

/* ---------- 首页主卡：计时为体，90 分钟收进折叠 ---------- */
.h3-deep {
  margin-top: 12px; padding-top: 10px;
  border-top: 2px dashed rgba(17, 17, 17, .28);
}
.h3-deep > summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: 12.5px; font-weight: 800; margin-bottom: 4px;
}
.h3-deep > summary::-webkit-details-marker { display: none; }
.h3-deep > summary::before { content: '▸ '; }
.h3-deep[open] > summary::before { content: '▾ '; }
.h3-deep[open] > summary { margin-bottom: 10px; }
.h3-seg-foot { margin: 2px 0 0; color: var(--text2); }
.h3-seg-foot a { color: var(--primary); font-weight: 800; }
/* 空态卡片不再需要「劝人立钩子」那套大留白 */
.h3-hook-empty { padding-bottom: 14px; }

/* ==========================================================================
   底部导航加入后，两个悬浮球要整体上移（2026-10-26）
   注意：ext.css 在 style.css **之后**加载，所以这里的同权重规则才生效 ——
   上一条写在 style.css 里的 bottom 覆盖被这份文件盖掉了（实测 AI 球压在导航条上）。
   ========================================================================== */
@media (max-width: 640px) {
  .ai-fab { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .qc-fab { bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
  /* AI 面板与侧边抽屉要压过底部导航（tabbar z-index 60） */
  .ai-panel { z-index: 92; }
}

/* ==========================================================================
   账单导入（微信 / 抖音 / 支付宝 PDF · CSV）
   挂在记账 Tab 内的独立视图，类名前缀 bi-
   沿用全站令牌：2px 黑边 + 硬阴影 + --r-* 圆角，不引入新配色
   ========================================================================== */

.bi-head {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.bi-head-title {
  font-size: var(--fs-lg); font-weight: 900; letter-spacing: -.02em;
  flex: 1 1 auto;
}
.bi-head-links { display: flex; align-items: center; gap: var(--sp-1); }
.bi-link {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px; padding: 0 10px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 800; cursor: pointer;
}
.bi-link:hover { background: var(--yellow); }

/* ---------- 步骤条 ---------- */
.bi-steps {
  display: flex; align-items: center; gap: 0;
  list-style: none; margin: 0 0 var(--sp-3); padding: 0;
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
  background: var(--card); overflow: hidden;
}
.bi-step {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 6px; font-size: var(--fs-xs); font-weight: 800; color: var(--text2);
  border-right: var(--bw) solid var(--ink);
}
.bi-step:last-child { border-right: 0; }
.bi-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: 0 0 auto;
  border: var(--bw) solid var(--ink); border-radius: var(--r-pill);
  background: var(--bg); font-size: 11px; font-weight: 900;
}
.bi-step.active { background: var(--yellow); color: var(--ink); }
.bi-step.active .bi-step-n { background: var(--ink); color: var(--yellow); }
.bi-step.done { color: var(--ink); }
.bi-step.done .bi-step-n { background: var(--green); }
.bi-step-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 上传区 ---------- */
.bi-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 34px 16px; text-align: center;
  background: var(--card);
  border: 3px dashed var(--ink); border-radius: var(--r-lg);
  cursor: pointer; transition: background .12s, transform .12s, box-shadow .12s;
}
.bi-drop:hover, .bi-drop.over {
  background: var(--yellow);
  transform: translate(-2px, -2px); box-shadow: var(--sh-2);
}
.bi-drop:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.bi-drop i { font-size: 30px; }
.bi-drop b { font-size: var(--fs-md); font-weight: 900; }
.bi-drop span { font-size: var(--fs-xs); color: var(--text2); }
.bi-drop { min-height: 168px; }
/* 支持的平台标识：让首屏不只是一个大空框，也顺手说明能导哪些账单 */
.bi-plats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.bi-plats em {
  font-style: normal; font-size: 10.5px; font-weight: 900;
  padding: 2px 9px; border-radius: var(--r-pill);
  border: 2px solid var(--ink);
  background: var(--c, var(--card)); color: #fff;
}

/* ---------- 文件列表 ---------- */
.bi-files { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.bi-file {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 8px 10px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.bi-file > i { font-size: 18px; flex: 0 0 auto; color: var(--accent); }
.bi-file-main { flex: 1 1 auto; min-width: 0; }
.bi-file-name {
  font-size: var(--fs-sm); font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bi-file-meta { font-size: var(--fs-2xs); color: var(--text2); }
.bi-pwd {
  width: 130px; flex: 0 0 auto;
  min-height: 36px; padding: 0 8px;
  font-size: 16px;                 /* iOS 上 <16px 会触发自动放大 */
  background: var(--bg); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-xs);
}
.bi-file-del {
  flex: 0 0 auto; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-xs);
  cursor: pointer;
}
.bi-file-del:hover { background: var(--accent); color: #fff; }

/* ---------- 账户 / 开关 ---------- */
.bi-row2 {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.bi-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); font-weight: 800; }
.bi-field > span { color: var(--text2); }
.bi-field select {
  min-height: 42px; padding: 0 10px; min-width: 160px;
  font-size: 16px; font-weight: 700;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.bi-field-check { flex-direction: row; align-items: center; gap: 8px; align-self: flex-end; }
.bi-field-check input { width: 20px; height: 20px; accent-color: var(--ink); }
.bi-field-check > span { color: var(--ink); font-weight: 700; font-size: var(--fs-xs); }

.bi-err {
  margin-top: var(--sp-3); padding: 9px 12px;
  background: #ffe3e8; color: #8d0d24;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 700;
}
.bi-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.bi-actions .btn { min-height: 44px; }

.bi-tips {
  margin-top: var(--sp-4); padding: 10px 12px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
  font-size: var(--fs-xs);
}
.bi-tips summary { cursor: pointer; font-weight: 900; list-style: none; }
.bi-tips summary::-webkit-details-marker { display: none; }
.bi-tips ul { margin: 8px 0 6px; padding-left: 18px; line-height: 1.75; color: var(--text2); }
.bi-tips-note { margin: 6px 0 0; color: var(--text2); }

.bi-loading { padding: 32px 0; text-align: center; font-size: var(--fs-sm); font-weight: 800; color: var(--text2); }
.bi-loading.sm { padding: 14px 0; }
.bi-empty {
  padding: 32px 16px; text-align: center;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
}
.bi-empty i { font-size: 26px; opacity: .45; display: block; margin-bottom: 6px; }
.bi-empty p { margin: 0 0 4px; font-weight: 900; font-size: var(--fs-sm); }
.bi-empty span { font-size: var(--fs-xs); color: var(--text2); }
.bi-empty.sm { border: 0; padding: 18px 8px; background: transparent; }
.bi-empty-sm { padding: 12px; font-size: var(--fs-xs); color: var(--text2); }

/* ---------- 预览：汇总 ---------- */
.bi-sum {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.bi-sum-item {
  padding: 8px 6px; text-align: center;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.bi-sum-item b { display: block; font-size: var(--fs-xl); font-weight: 900; line-height: 1.15; }
.bi-sum-item span { font-size: var(--fs-2xs); color: var(--text2); font-weight: 700; }
.bi-sum-item.warn b { color: var(--accent); }

.bi-note {
  display: flex; align-items: flex-start; gap: 6px;
  margin-bottom: var(--sp-2); padding: 8px 10px;
  background: #fff8dc;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.5;
}

.bi-tools { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.bi-tools .btn { min-height: 36px; }

/* ---------- 预览：表格（桌面 grid / 窄屏卡片） ---------- */
.bi-table {
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
  overflow: hidden;
}
.bi-tr {
  display: grid;
  grid-template-columns: 34px 104px 62px 92px minmax(100px, 1.1fr) minmax(140px, 1.2fr) minmax(80px, 1fr) 96px;
  grid-template-areas: "chk time dir amt cp cat note st";
  align-items: center; gap: 4px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(17, 17, 17, .12);
  font-size: var(--fs-xs);
}
.bi-tr:last-child { border-bottom: 0; }
.bi-th {
  background: var(--bg);
  font-weight: 900; font-size: var(--fs-2xs); color: var(--text2);
  border-bottom: var(--bw) solid var(--ink);
}
/* 数据行的金额是右对齐的，表头若也顶到列右边界，就会和右边「交易对方」粘在一起 */
.bi-th .bi-c-amt { padding-right: 10px; }
.bi-th .bi-c-cp { padding-left: 2px; }
.bi-tr.on { background: var(--hover); }
.bi-tr.dup { opacity: .58; background: #f2f0ea; }
.bi-tr.dup .bi-c-amt { text-decoration: line-through; }

.bi-c-check { grid-area: chk; display: flex; align-items: center; justify-content: center; }
.bi-c-check input { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }
.bi-c-time { grid-area: time; color: var(--text2); font-variant-numeric: tabular-nums; }
.bi-c-dir { grid-area: dir; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.bi-dot { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--ink); }
.bi-dot.out { background: var(--accent); }
.bi-dot.in { background: var(--green); }
.bi-c-amt { grid-area: amt; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.bi-c-cp {
  grid-area: cp; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bi-c-cat { grid-area: cat; min-width: 0; }
.bi-cat {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 3px 6px 3px 3px;
  background: var(--bg); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-size: var(--fs-2xs); font-weight: 800; cursor: pointer;
}
.bi-cat:hover { background: var(--yellow); }
.bi-cat > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-cat .fa-pen { font-size: 9px; opacity: .5; }
.bi-cat-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex: 0 0 auto;
  border-radius: var(--r-xs);
  font-size: 11px; font-style: normal;
}
.bi-c-note {
  grid-area: note; color: var(--text2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bi-c-st { grid-area: st; display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; }
.bi-badge {
  font-style: normal; font-size: 10px; font-weight: 900;
  padding: 1px 6px; border-radius: var(--r-pill);
  border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  white-space: nowrap;
}
.bi-badge.ok { background: var(--green); }
.bi-badge.dup { background: #d9d6cc; }
.bi-badge.int { background: var(--cyan); }
.bi-badge.ref { background: var(--orange); }
.bi-badge.fb { background: var(--yellow); }

.bi-more { margin-top: var(--sp-3); text-align: center; }

/* ---------- 预览：底部操作栏 ---------- */
.bi-foot {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  margin-top: var(--sp-3); padding: 10px 12px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
  box-shadow: var(--sh-2);
}
.bi-foot-sum { flex: 1 1 auto; font-size: var(--fs-xs); font-weight: 800; display: flex; gap: 10px; flex-wrap: wrap; }
.bi-foot .btn { min-height: 44px; padding: 0 20px; }

/* ---------- 分类弹层 ---------- */
.bi-pop-mask {
  position: fixed; inset: 0; z-index: 96;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(17, 17, 17, .45);
}
.bi-pop {
  width: min(520px, 100%); max-height: 80vh; display: flex; flex-direction: column;
  background: var(--bg);
  border: var(--bw-thick) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
}
.bi-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: var(--bw) solid var(--ink);
  font-size: var(--fs-md); font-weight: 900;
}
.bi-pop-body { padding: 12px 14px; overflow-y: auto; }
.bi-cat-group { margin-bottom: var(--sp-3); }
.bi-cat-p { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 900; margin-bottom: 6px; }
.bi-cat-p .btn { margin-left: auto; min-height: 30px; }
.bi-cat-subs { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 24px; }
.bi-sub {
  min-height: 34px; padding: 0 12px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 800; cursor: pointer;
}
.bi-sub:hover { background: var(--yellow); }

/* ---------- 结果 ---------- */
.bi-result {
  padding: 22px 16px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  text-align: center;
}
.bi-result-ico i { font-size: 40px; color: var(--green-text); }
.bi-result h3 { margin: 6px 0 14px; font-size: var(--fs-xl); font-weight: 900; }
.bi-result-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2);
  max-width: 460px; margin: 0 auto;
}
.bi-result-cell {
  padding: 12px 6px;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  background: var(--bg);
}
.bi-result-cell b { display: block; font-size: var(--fs-2xl); font-weight: 900; line-height: 1.1; }
.bi-result-cell span { font-size: var(--fs-2xs); font-weight: 800; color: var(--text2); }
.bi-result-cell.ok { background: #d8f8ee; }
.bi-result-cell.skip { background: #f0eee7; }
.bi-result-cell.fail { background: #ffe3e8; }
.bi-result-cell.zero b { color: var(--text2); }
.bi-result-detail {
  margin: 14px auto 0; max-width: 560px; text-align: left;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  padding: 8px 10px; background: var(--bg);
  font-size: var(--fs-xs);
}
.bi-result-detail summary { cursor: pointer; font-weight: 900; }
.bi-result-detail ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; color: var(--text2); }
.bi-result .bi-actions { justify-content: center; }

/* ---------- 导入历史 ---------- */
.bi-hist { display: flex; flex-direction: column; gap: var(--sp-2); }
.bi-hist-row {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 10px 12px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  cursor: pointer;
}
.bi-hist-row:hover { background: var(--hover); }
.bi-hist-main { flex: 1 1 auto; min-width: 0; }
.bi-hist-title {
  font-size: var(--fs-sm); font-weight: 900;
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bi-hist-meta { font-size: var(--fs-2xs); color: var(--text2); }
.bi-hist-nums { display: flex; gap: 8px; font-size: var(--fs-2xs); font-weight: 800; flex-wrap: wrap; }
.bi-hist-nums .ok { color: var(--green-text); }
.bi-hist-nums .skip { color: var(--text2); }
.bi-hist-nums .fail { color: var(--red); }
.bi-hist-arrow { transition: transform .15s; font-size: 11px; opacity: .5; }
.bi-hist-detail:empty { display: none; }
.bi-hd {
  margin: 0 0 var(--sp-2); padding: 8px 10px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-top: 0;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-size: var(--fs-2xs);
}
.bi-hd-line { color: var(--text2); margin-bottom: 6px; font-weight: 700; }
.bi-hd-item {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0; border-top: 1px dashed rgba(17, 17, 17, .12);
}
.bi-hd-item .grow { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-hd-item em { font-style: normal; font-size: 10px; color: var(--text2); flex: 0 0 auto; }
.bi-hd-item > span:nth-child(3) { min-width: 76px; text-align: right; }
.bi-hd-item.skipped { opacity: .6; }
.bi-hd-item.failed { color: var(--red); }

/* ---------- 分类规则 ---------- */
.bi-rules-note {
  padding: 10px 12px; margin-bottom: var(--sp-3);
  background: #fff8dc;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs); line-height: 1.6;
}
.bi-rule-form {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  margin-bottom: var(--sp-3);
}
.bi-input {
  min-height: 42px; padding: 0 10px;
  font-size: 16px; font-weight: 700;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.bi-rule-form .bi-input:first-child { flex: 1 1 160px; min-width: 120px; }
.bi-rule {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: var(--sp-2);
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs);
}
.bi-rule-kw { font-weight: 900; }
.bi-rule-cat { color: var(--text2); font-weight: 700; }
.bi-rule .bi-badge { margin-left: auto; }
.bi-rule-del {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-xs);
  cursor: pointer;
}
.bi-rule-del:hover { background: var(--accent); color: #fff; }

/* ---------- 窄屏：表格转卡片 ---------- */
@media (max-width: 820px) {
  .bi-tr {
    grid-template-columns: 26px 1fr auto;
    /* 三行卡片：时间+金额 / 交易对方 / 分类+状态。
       注意 areas 必须覆盖所有还显示的单元格 —— 漏掉一个（比如 dir）它会被自动放到
       网格末尾，看起来就像「支出」二字莫名掉到卡片右下角。 */
    grid-template-areas:
      "chk time amt"
      "chk cp   cp"
      "chk cat  st";
    row-gap: 3px; padding: 9px 10px;
  }
  .bi-th { display: none; }
  /* 收支方向由金额正负与颜色表达，窄屏省掉这一列 */
  .bi-c-dir { display: none; }
  .bi-c-amt { text-align: right; font-size: var(--fs-sm); }
  .bi-c-cp { font-size: var(--fs-xs); }
  .bi-c-note { display: none; }
  .bi-c-st { justify-content: flex-end; }
  .bi-c-check { align-items: flex-start; padding-top: 2px; }
  /* 分类胶囊是行内唯一的独立按钮，窄屏要单独放大到能点准 */
  .bi-cat { min-height: 34px; padding: 4px 10px 4px 4px; font-size: var(--fs-xs); }
  .bi-cat-ico { width: 22px; height: 22px; font-size: 13px; }
  .bi-sum { grid-template-columns: repeat(2, 1fr); }
  .bi-foot { position: sticky; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); padding: 8px 10px; }
  .bi-foot-sum { font-size: var(--fs-2xs); }
  .bi-foot .btn { flex: 1 1 100%; }
  .bi-step-t { display: none; }
  .bi-step { padding: 9px 4px; }
  .bi-step.active .bi-step-t { display: inline; }
  .bi-drop { padding: 26px 12px; }
  .bi-cat-pop, .bi-pop { width: 100%; }
  .bi-hist-nums { flex-direction: column; gap: 1px; align-items: flex-end; }
}

@media (max-width: 420px) {
  .bi-result-grid { grid-template-columns: 1fr; }
}

/* 导入流程进行中时隐藏两个悬浮球：
   它们固定在右下角，正好压住预览页底部的「确认导入」按钮（实测挡住一半）。
   导入页自身有返回 / 历史 / 规则三个入口，且顶栏还有 AI 按钮，隐藏不会丢功能。 */
body.bi-mode .qc-fab,
body.bi-mode .ai-fab { display: none !important; }

/* 账单声明核对条：解析结果与文件自带汇总是否一致（绿=一致，黄=有差异） */
.bi-check {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 10px; padding: 9px 12px;
  background: #d8f8ee;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs); line-height: 1.5;
}
.bi-check > i { margin-top: 2px; flex: 0 0 auto; color: var(--green-text); font-size: 14px; }
.bi-check b { font-weight: 900; }
.bi-check-sub { margin-top: 2px; color: var(--text2); }
.bi-check.warn { background: #fff3cd; }
.bi-check.warn > i { color: #b8860b; }

/* ==========================================================================
   内容工作流看板（content-board.js）
   类名前缀 cb-，沿用全站令牌：2px 黑边 + 硬阴影 + --r-* 圆角
   ========================================================================== */

.cb-root { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ---------- 顶部：视图切换 + 筛选 ---------- */
.cb-head {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
}
.cb-switch {
  display: inline-flex; flex: 0 0 auto;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  overflow: hidden; background: var(--card);
}
.cb-sw-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  background: var(--card); color: var(--ink);
  border: 0; border-right: var(--bw) solid var(--ink);
  font-size: var(--fs-xs); font-weight: 900; cursor: pointer;
  white-space: nowrap;
}
.cb-sw-btn:last-child { border-right: 0; }
.cb-sw-btn:hover { background: var(--hover); }
.cb-sw-btn.on { background: var(--ink); color: var(--yellow); }

.cb-filters {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  flex: 1 1 auto;
}
.cb-sel {
  min-height: 36px; padding: 0 8px; max-width: 160px;
  font-size: 16px; font-weight: 700;              /* iOS 上 <16px 会触发自动放大 */
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-xs);
}
.cb-picked { font-size: var(--fs-xs); font-weight: 900; color: var(--primary); }
.cb-batch-btn { background: var(--primary); color: #fff; border-color: var(--ink); }
.cb-sum { margin-left: auto; font-size: var(--fs-xs); color: var(--text2); font-weight: 700; }
.cb-warn { color: var(--accent); }

.cb-loading { padding: 40px 0; text-align: center; color: var(--text2); font-weight: 800; }

/* ---------- 看板一：横向列 ---------- */
.cb-board {
  display: flex; gap: var(--sp-2);
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 8px;
  /* 横向滚动在触屏上要顺滑，否则像卡住 */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.cb-board::-webkit-scrollbar { height: 8px; }
.cb-board::-webkit-scrollbar-thumb { background: rgba(17,17,17,.25); border-radius: 4px; }

.cb-col {
  flex: 0 0 252px; width: 252px;
  /* 撑满可视高度：卡片少时列也不该缩成一条，否则拖拽落点太小、页面下半截全空 */
  height: clamp(420px, calc(100vh - 300px), 760px);
  display: flex; flex-direction: column;
  background: var(--card);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow .12s, transform .12s;
}
.cb-col.drop-on {
  box-shadow: var(--sh-2);
  transform: translate(-2px, -2px);
  background: #fffdf3;
}
.cb-col.over .cb-col-head { background: #ffe3e8; }

.cb-col-head {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 8px;
  background: var(--bg);
  border-bottom: var(--bw) solid var(--ink);
  font-size: var(--fs-2xs); font-weight: 900;
}
.cb-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex: 0 0 auto;
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-size: 10px;
}
.cb-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-period { font-size: 9.5px; color: var(--text2); font-weight: 700; }
.cb-count {
  flex: 0 0 auto; min-width: 20px; text-align: center;
  padding: 1px 5px;
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  background: var(--card); font-size: 10px;
}
.cb-count.hot { background: var(--accent); color: #fff; }

.cb-cards {
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px;
  max-height: none; overflow-y: auto;
}
.cb-empty {
  padding: 18px 6px; text-align: center;
  font-size: 10.5px; color: var(--text2);
  border: 1.5px dashed rgba(17,17,17,.2); border-radius: var(--r-sm);
}
.cb-empty.sm { padding: 10px 4px; border-style: dashed; }

/* ---------- 卡片 ---------- */
.cb-card {
  position: relative;
  padding: 7px 8px 6px 9px;
  background: var(--card);
  border: var(--bw) solid var(--ink);
  border-left: 5px solid var(--acc, #c9c9c9);
  border-radius: var(--r-sm);
  cursor: grab;
  transition: transform .1s, box-shadow .1s;
}
.cb-card:hover { transform: translate(-1px, -1px); box-shadow: var(--sh-1); }
.cb-card.dragging { opacity: .45; cursor: grabbing; }
.cb-card.on { background: #e8f0ff; }
/* 停留超 24h：描边高亮（不是整块变红，避免一屏全是红色） */
.cb-card.stale { box-shadow: 0 0 0 2px var(--accent); }

.cb-card-top { display: flex; align-items: flex-start; gap: 4px; }
.cb-title {
  flex: 1 1 auto; font-size: var(--fs-xs); font-weight: 900; line-height: 1.35;
  word-break: break-word;
}
.cb-flag {
  flex: 0 0 auto; font-style: normal; font-size: 10px; font-weight: 900;
  width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: var(--r-pill); border: 2px solid var(--ink);
}
.cb-flag.star { background: var(--yellow); }
.cb-flag.urgent { background: var(--accent); color: #fff; }

.cb-meta {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-top: 4px; font-size: 10px; color: var(--text2); font-weight: 700;
}
.cb-acc-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink); flex: 0 0 auto; }
.cb-acc { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-date { font-variant-numeric: tabular-nums; }
.cb-pri {
  padding: 0 5px; border-radius: var(--r-pill);
  border: 1px solid var(--ink); font-size: 9px;
}
.cb-pri.p1 { background: #ffe3e8; }
.cb-pri.p2 { background: var(--bg); }
.cb-pri.p3 { background: #eef1f4; }

.cb-batch {
  display: inline-block; margin-top: 4px;
  padding: 0 6px; font-size: 9px; font-weight: 800;
  border: 1px solid rgba(17,17,17,.35); border-radius: var(--r-pill);
  color: var(--text2);
}

/* 「什么时候推进到这一列」时间签。
   单独占一行：挤进 .cb-meta 那行的话，账号名 + 计划日 + 优先级已经占满，
   时间会被折到第二行且贴着左边，读起来像另一个字段。 */
.cb-when { margin-top: 4px; }
.cb-at {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; font-size: 10px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(17,17,17,.35); border-radius: var(--r-pill);
  background: var(--bg); color: var(--text2);
}
.cb-at i { font-size: 9px; }
/* 停留超 24 小时：和卡片描边同一套信号。
   只换字色 + 描边，不铺底色 —— 一列里 7 张同时超时的时候，
   整片粉色反而看不出哪张最该处理（和卡片不做整块变红同一个理由）。 */
.cb-at.late { background: #fff; color: var(--accent); border-color: var(--accent); }

/* 推进记录弹窗 */
.cb-hist-sum { font-size: 13px; line-height: 1.75; margin-bottom: 10px; }
.cb-hist-total { font-size: 12px; color: var(--text2); }
.cb-hist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cb-hist-list li {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--r-sm);
}
.cb-hist-list li.cur { background: var(--yellow); }
.cb-hist-n {
  flex: 0 0 22px; width: 22px; height: 22px; line-height: 18px; text-align: center;
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-size: 11px; font-weight: 900; background: var(--card);
}
.cb-hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cb-hist-main b { font-size: 13px; }
.cb-hist-time { font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; }
.cb-hist-dur { flex: 0 0 auto; font-size: 11px; font-weight: 800; white-space: nowrap; }
.cb-hist-empty { font-size: 13px; color: var(--text2); line-height: 1.7; margin: 0; }

.cb-card-ops {
  display: flex; gap: 3px;
  margin-top: 6px; padding-top: 5px;
  border-top: 1px dashed rgba(17,17,17,.15);
}
.cb-op {
  flex: 0 0 auto; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-xs);
  font-size: 9px; cursor: pointer;
}
.cb-op:hover:not(:disabled) { background: var(--yellow); }
.cb-op:disabled { opacity: .3; cursor: not-allowed; }
.cb-op.danger:hover { background: var(--accent); color: #fff; }

.cb-tip {
  margin: 0; font-size: 10.5px; color: var(--text2); line-height: 1.6;
}

/* ---------- 看板二：双泳道 ---------- */
.cb-lanes { display: flex; flex-direction: column; gap: var(--sp-4); }

.cb-lane {
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
  background: var(--bg); overflow: hidden;
}
.cb-lane.empty { padding: 14px; }
.cb-lane-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px;
  background: var(--card);
  border-bottom: var(--bw) solid var(--ink);
  font-size: var(--fs-xs);
}
.cb-lane-head b { font-weight: 900; }
.cb-lane-acc { color: var(--text2); font-weight: 700; }
.cb-day {
  padding: 1px 7px; font-weight: 900;
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  background: var(--yellow);
}
.cb-day.over { background: var(--accent); color: #fff; }
.cb-remain { color: var(--text2); font-weight: 700; font-size: 10.5px; }
.cb-prog { font-weight: 900; font-variant-numeric: tabular-nums; }
.cb-lane-bar {
  flex: 0 1 120px; height: 8px; min-width: 60px;
  background: var(--bg);
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  overflow: hidden;
}
.cb-lane-bar i { display: block; height: 100%; background: var(--green); }
.cb-lane-ops { margin-left: auto; display: flex; gap: 3px; }
.cb-lane-empty { padding: 16px; text-align: center; color: var(--text2); font-size: var(--fs-xs); }
.cb-lane .cb-board { padding: 8px; }

/* ---------- 养号任务 ---------- */
.cb-task {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 6px 7px;
  background: var(--card);
  border: 2px solid rgba(17,17,17,.35);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: background .1s;
}
.cb-task:hover { background: var(--hover); }
.cb-task input { width: 16px; height: 16px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--ink); cursor: pointer; }
.cb-task-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cb-task-main b { font-size: 10.5px; font-weight: 900; line-height: 1.35; word-break: break-word; }
.cb-task-main em { font-style: normal; font-size: 9.5px; color: var(--text2); line-height: 1.4; }
.cb-task-day { font-size: 9px; color: var(--text2); opacity: .8; }
.cb-task.today { border-color: var(--ink); background: #fffbe8; }
.cb-task.done { opacity: .5; }
.cb-task.done b { text-decoration: line-through; }

/* ---------- 红线提示 ---------- */
.cb-redlines {
  padding: 12px 14px;
  background: #fff3f5;
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
  font-size: var(--fs-xs); line-height: 1.75;
}
.cb-redlines b { display: block; margin-bottom: 4px; font-weight: 900; color: var(--accent); }
.cb-redlines ol { margin: 0; padding-left: 18px; color: var(--text2); }

/* ---------- 弹窗表单 ---------- */
.cb-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.cb-form-row { display: flex; gap: var(--sp-3); }
.cb-form-row .cb-field { flex: 1 1 0; min-width: 0; }
.cb-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); font-weight: 800; }
.cb-field > span { color: var(--text2); }
.cb-field input, .cb-field select {
  min-height: 42px; padding: 0 10px; width: 100%;
  font-size: 16px; font-weight: 700;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.cb-form-check { display: flex; gap: var(--sp-4); font-size: var(--fs-xs); font-weight: 700; }
.cb-form-check label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cb-form-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.cb-form-tip {
  margin: 0; padding: 8px 10px;
  background: var(--bg); border: 2px solid rgba(17,17,17,.2);
  border-radius: var(--r-sm); font-size: 10.5px; line-height: 1.6; color: var(--text2);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 820px) {
  .cb-head { gap: var(--sp-2); }
  .cb-switch { width: 100%; }
  .cb-sw-btn { flex: 1 1 0; justify-content: center; }
  .cb-filters { width: 100%; }
  .cb-sel { flex: 1 1 0; min-width: 0; max-width: none; }
  .cb-sum { width: 100%; margin-left: 0; }
  .cb-col { flex: 0 0 200px; width: 200px; height: 52vh; min-height: 320px; }
  .cb-form-row { flex-direction: column; gap: var(--sp-2); }
  .cb-lane-head { gap: 6px; }
  .cb-lane-bar { flex: 1 1 100%; }
  .cb-card-ops { gap: 4px; }
  .cb-op { width: 30px; height: 30px; }   /* 手指点得准 */
  /* 176px 的列放不下 5 个 30px 按钮，最后一个会被裁掉；
     批量选择在手机上用得极少，窄屏直接隐掉，保留流转/编辑/删除 */
  .cb-op[data-pick] { display: none; }
  .cb-task input { width: 18px; height: 18px; }
  /* 右下角悬浮球（记一句 / AI）会盖住提示末尾，留出让位 */
  .cb-tip { padding-right: 92px; }
}

@media (max-width: 420px) {
  .cb-col { flex: 0 0 176px; width: 176px; }
}

/* 养号任务按天分组的分隔条 */
.cb-day-sep {
  display: flex; align-items: center; gap: 6px;
  margin: 7px 0 3px;
  font-size: 9.5px; font-weight: 900; color: var(--text2);
}
.cb-day-sep:first-child { margin-top: 0; }
.cb-day-sep > span { font-weight: 800; opacity: .75; }
.cb-day-sep::after {
  content: ''; flex: 1 1 auto; height: 1px;
  background: rgba(17, 17, 17, .16);
}

/* ==========================================================================
   娱乐实时追踪看板（ent-track.js）
   类名前缀 et-，沿用全站令牌：2px 黑边 + 硬阴影 + --r-* 圆角
   ========================================================================== */

.et-root { display: flex; flex-direction: column; gap: var(--sp-3); }
.et-loading { padding: 36px 0; text-align: center; color: var(--text2); font-weight: 800; font-size: var(--fs-sm); }

/* ---------- 顶部三段切换 ---------- */
.et-sections {
  display: inline-flex; align-self: flex-start;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  overflow: hidden; background: var(--card);
}
.et-sec {
  min-height: 36px; padding: 0 14px;
  background: var(--card); color: var(--ink);
  border: 0; border-right: var(--bw) solid var(--ink);
  font-size: var(--fs-xs); font-weight: 900; cursor: pointer; white-space: nowrap;
}
.et-sec:last-child { border-right: 0; }
.et-sec:hover { background: var(--hover); }
.et-sec.on { background: var(--ink); color: var(--yellow); }

/* ---------- 当前进行中 ---------- */
.et-now {
  display: flex; align-items: stretch; gap: var(--sp-3);
  padding: 12px;
  background: var(--card);
  border: var(--bw) solid var(--ink);
  border-left: 6px solid var(--c, var(--accent));
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
}
.et-now.idle { flex-direction: column; border-left-color: var(--ink); box-shadow: none; }
.et-now-cover {
  flex: 0 0 84px; width: 84px; min-height: 84px;
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  background-size: cover; background-position: center; background-color: var(--bg);
}
.et-now-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.et-now-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.et-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; font-size: 10px; font-weight: 900;
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  background: var(--c, var(--bg));
  /* 亮色系（黄/绿）上用深字，深色系（蓝/紫）上用白字 */
  color: var(--ink);
}
.et-src {
  font-size: 10px; font-weight: 800; color: var(--text2);
  padding: 1px 6px; border-radius: var(--r-pill);
  border: 1px dashed rgba(17, 17, 17, .35);
}
.et-src.proc { color: var(--primary); border-color: var(--primary); }
.et-paused {
  font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: var(--r-pill);
  background: #f0eee7; border: 2px solid var(--ink);
}
.et-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--ink);
  animation: et-pulse 1.4s ease-in-out infinite;
}
@keyframes et-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

.et-now-title {
  font-size: var(--fs-lg); font-weight: 900; letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.et-timer-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.et-timer {
  font-size: 30px; font-weight: 900; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.et-since { font-size: var(--fs-2xs); color: var(--text2); font-weight: 700; }

.et-now-ops { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.et-now-empty { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 4px; text-align: center; }
.et-now-empty i { font-size: 22px; opacity: .35; }
.et-now-empty b { font-size: var(--fs-md); font-weight: 900; }
.et-now-empty span { font-size: var(--fs-xs); color: var(--text2); }

.et-quick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 6px 0 2px; }
.et-quick-chip {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%; min-height: 34px; padding: 0 12px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-left-width: 5px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 800; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.et-quick-chip:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: var(--sh-1); }
.et-quick-emo { flex: 0 0 auto; }

/* ---------- 通用区块 ---------- */
.et-block {
  padding: 11px 12px;
  background: var(--card);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
}
.et-block-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 9px;
}
.et-block-head > b { font-size: var(--fs-sm); font-weight: 900; }
.et-range-label { margin-left: auto; font-size: var(--fs-2xs); color: var(--text2); font-weight: 700; }
.et-tip { margin: 0 0 8px; font-size: var(--fs-2xs); color: var(--text2); line-height: 1.65; }
.et-empty {
  padding: 22px 12px; text-align: center;
  font-size: var(--fs-xs); color: var(--text2);
  border: 1.5px dashed rgba(17, 17, 17, .2); border-radius: var(--r-sm);
}
.et-empty.sm { padding: 12px 8px; }

/* ---------- 最近 7 天横向条 ---------- */
.et-strip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.et-strip::-webkit-scrollbar { height: 7px; }
.et-strip::-webkit-scrollbar-thumb { background: rgba(17, 17, 17, .22); border-radius: 4px; }
.et-rec {
  flex: 0 0 132px; width: 132px;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 8px 9px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-top: 5px solid var(--c, var(--ink));
  border-radius: var(--r-sm);
  font-size: var(--fs-xs); text-align: left; cursor: pointer;
}
.et-rec:hover { transform: translate(-1px, -1px); box-shadow: var(--sh-1); }
.et-rec.live { background: #fffbe8; box-shadow: 0 0 0 2px var(--accent); }
.et-rec-emo { font-size: 15px; }
.et-rec-title {
  width: 100%; font-weight: 900; font-size: var(--fs-xs);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.et-rec-sec { font-weight: 800; font-variant-numeric: tabular-nums; }
.et-rec-at { font-size: 9.5px; color: var(--text2); }

/* ---------- 双库 ---------- */
.et-kind { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r-pill); overflow: hidden; }
.et-kind-btn {
  min-height: 30px; padding: 0 11px;
  background: var(--card); color: var(--ink); border: 0;
  border-right: 2px solid var(--ink);
  font-size: var(--fs-2xs); font-weight: 900; cursor: pointer;
}
.et-kind-btn:last-child { border-right: 0; }
.et-kind-btn.on { background: var(--ink); color: var(--yellow); }
.et-kind-btn em { font-style: normal; opacity: .65; margin-left: 2px; }
.et-link {
  margin-left: auto; background: none; border: 0; padding: 0;
  font-size: var(--fs-2xs); font-weight: 800; color: var(--primary); cursor: pointer;
}

.et-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 8px; }
.et-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px;
  background: var(--card);
  border: var(--bw) solid var(--ink);
  border-left: 5px solid var(--c, var(--ink));
  border-radius: var(--r-sm);
}
.et-item-cover {
  flex: 0 0 42px; width: 42px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink); border-radius: var(--r-xs);
  background-color: var(--bg); background-size: cover; background-position: center;
  font-size: 18px;
}
.et-item-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.et-item-title {
  font-size: var(--fs-xs); font-weight: 900;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.et-item-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 9.5px; color: var(--text2); }
.et-st {
  padding: 0 6px; font-weight: 900; border-radius: var(--r-pill);
  border: 1px solid var(--ink); background: var(--bg); color: var(--ink);
}
.et-st.doing { background: var(--green); }
.et-st.done { background: #d8f8ee; }
.et-st.paused { background: #f0eee7; }
.et-st.dropped { background: #e6e3da; opacity: .8; }
.et-st.wish { background: var(--yellow); }
.et-plat { font-weight: 700; }
.et-tracked { font-weight: 800; color: var(--ink); }

.et-prog { display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.et-prog::before { content: ''; }
.et-prog i {
  display: block; height: 6px; border-radius: 3px;
  background: var(--c, var(--primary)); border: 1px solid var(--ink);
  min-width: 2px; max-width: 100%;
}
.et-prog em { font-style: normal; font-size: 9px; color: var(--text2); font-weight: 800; white-space: nowrap; }

.et-item-ops { flex: 0 0 auto; display: flex; flex-direction: column; gap: 3px; }
.et-mini {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-xs);
  font-size: 10px; cursor: pointer;
}
.et-mini:hover { background: var(--yellow); }
.et-mini.primary { background: var(--ink); color: var(--yellow); }
.et-mini.danger:hover { background: var(--accent); color: #fff; }

/* ---------- 按钮 ---------- */
.et-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 12px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 900; cursor: pointer; white-space: nowrap;
}
.et-btn:hover { background: var(--hover); transform: translate(-1px, -1px); box-shadow: var(--sh-1); }
.et-btn.primary { background: var(--ink); color: var(--yellow); }
.et-btn.danger { background: var(--accent); color: #fff; }
.et-btn.danger:hover { background: #e03e5c; }

/* ---------- 统计 ---------- */
.et-stat-row { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.et-ring {
  flex: 0 0 108px; width: 108px; height: 108px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: var(--bw) solid var(--ink);
}
.et-ring.empty { background: var(--bg); }
.et-ring-hole {
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--card); border: var(--bw) solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.1;
}
.et-ring-hole b { font-size: var(--fs-md); font-weight: 900; }
.et-ring-hole span { font-size: 9px; color: var(--text2); font-weight: 700; }
.et-stat-nums { flex: 1 1 200px; display: flex; flex-direction: column; gap: 5px; }
.et-stat { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-xs); }
.et-stat > span { flex: 0 0 66px; color: var(--text2); font-weight: 700; }
.et-stat > b { font-weight: 900; font-size: var(--fs-sm); }
.et-stat > em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--text2); font-weight: 800; }

.et-vs { margin-top: 10px; }
.et-vs-bar {
  height: 14px; border: var(--bw) solid var(--ink); border-radius: var(--r-pill);
  background: var(--primary); overflow: hidden;
}
.et-vs-bar i.rest { display: block; height: 100%; background: var(--accent); }
.et-vs-label { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 9.5px; color: var(--text2); font-weight: 700; }

.et-rank { display: flex; flex-direction: column; gap: 4px; }
.et-rank-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px;
  background: var(--bg); border: 2px solid rgba(17, 17, 17, .25);
  border-radius: var(--r-xs); font-size: var(--fs-xs);
}
.et-rank-n {
  flex: 0 0 18px; text-align: center; font-weight: 900; font-size: 10px;
  border: 1px solid var(--ink); border-radius: var(--r-pill); background: var(--card);
}
.et-rank-emo { flex: 0 0 auto; }
.et-rank-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.et-rank-sec { font-weight: 900; font-variant-numeric: tabular-nums; }

.et-daily {
  display: flex; align-items: flex-end; gap: 4px;
  height: 84px; padding-top: 6px;
}
.et-day { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.et-day i {
  display: block; width: 100%; max-width: 26px;
  background: var(--primary); border: 2px solid var(--ink); border-radius: 3px 3px 0 0;
}
.et-day span { font-size: 8.5px; color: var(--text2); font-weight: 700; white-space: nowrap; }

/* ---------- 设置页 ---------- */
.et-rule {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 6px 9px; margin-bottom: 5px;
  background: var(--bg); border: 2px solid rgba(17, 17, 17, .25);
  border-radius: var(--r-xs); font-size: var(--fs-xs);
}
.et-rule code {
  font-family: ui-monospace, monospace; font-weight: 700;
  background: var(--card); padding: 0 5px; border: 1px solid var(--ink); border-radius: 3px;
}
.et-rule b { font-weight: 900; }
.et-arrow { color: var(--text2); }
.et-kw { font-size: 9.5px; color: var(--text2); }
.et-rule .et-mini { margin-left: auto; }
.et-rule .et-mini + .et-mini { margin-left: 0; }
.et-sync-row { display: flex; gap: 8px; flex-wrap: wrap; }
.et-token {
  padding: 10px; margin-top: 6px;
  font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all;
  background: var(--bg); border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  user-select: all;
}

/* ---------- 弹窗表单 ---------- */
.et-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.et-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); font-weight: 800; }
.et-field > span { color: var(--text2); }
.et-field input, .et-field select {
  min-height: 42px; padding: 0 10px; width: 100%;
  font-size: 16px; font-weight: 700;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 820px) {
  .et-sections { width: 100%; }
  .et-sec { flex: 1 1 0; justify-content: center; padding: 0 6px; }
  .et-now { flex-wrap: wrap; }
  .et-now-cover { flex: 0 0 56px; width: 56px; min-height: 72px; }
  .et-now-ops { flex-direction: row; width: 100%; }
  .et-now-ops .et-btn { flex: 1 1 0; }
  .et-timer { font-size: 26px; }
  .et-grid { grid-template-columns: 1fr; }
  .et-item-ops { flex-direction: row; }
  .et-mini { width: 32px; height: 32px; font-size: 11px; }  /* 手指点得准 */
  .et-stat-row { gap: var(--sp-3); }
  .et-ring { flex: 0 0 88px; width: 88px; height: 88px; }
  .et-ring-hole { width: 54px; height: 54px; }
  .et-block { padding: 10px; }
  .et-vs-label { flex-direction: column; gap: 1px; }
  .et-daily { height: 70px; }
}

/* 日分布：只有 1~3 天时把柱子放宽，否则一根细线悬在空框里很难看 */
.et-daily.few .et-day i { max-width: 64px; }

/* 窄屏：区块右上角的文字链接会钻到右下角悬浮球底下 —— 换行独占一行 */
@media (max-width: 820px) {
  /* 左对齐：右下角常驻两个悬浮球（记一句 / AI），右对齐的链接一定会被压住 */
  .et-link { flex: 1 1 100%; margin-left: 0; text-align: left; min-height: 28px; }
  .et-root { padding-bottom: 92px; }   /* 末尾内容别被两个悬浮球压住 */
  .et-block-head { row-gap: 4px; }
}

/* ==========================================================================
   外接大脑 / 内容中枢（kb.js + content-hub.js + 首页生产仪表盘）
   前缀：kb- 知识库 / hub- 选题池与复盘 / cb-menu 卡片菜单 / ov-prod 首页
   ========================================================================== */

/* ---------- 知识库 ---------- */
.kb-loading, .hub-loading { padding: 36px 0; text-align: center; color: var(--text2); font-weight: 800; font-size: var(--fs-sm); }
.kb-wrap, .hub-wrap { display: flex; flex-direction: column; gap: var(--sp-3); }

.kb-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-kind {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px; padding: 0 11px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-pill);
  font-size: var(--fs-2xs); font-weight: 900; cursor: pointer;
}
.kb-kind:hover { background: var(--hover); }
.kb-kind.on { background: var(--ink); color: var(--yellow); }
.kb-kind em { font-style: normal; opacity: .7; }

.kb-bar { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.kb-search { display: flex; align-items: center; gap: 6px; flex: 1 1 220px;
  padding: 0 10px; min-height: 40px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-sm); }
.kb-search i { color: var(--text2); font-size: 12px; }
.kb-search input { flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none;
  font-size: 16px; font-weight: 700; color: var(--ink); }
.kb-cats { display: flex; gap: 5px; flex-wrap: wrap; }
.kb-chip {
  min-height: 30px; padding: 0 10px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-size: var(--fs-2xs); font-weight: 800; cursor: pointer;
}
.kb-chip.on { background: var(--yellow); }
.kb-actions { display: flex; gap: 6px; margin-left: auto; }
.kb-btn, .hub-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 900; cursor: pointer;
}
.kb-btn:hover, .hub-btn:hover { background: var(--hover); transform: translate(-1px, -1px); box-shadow: var(--sh-1); }
.kb-btn.primary, .hub-btn.primary { background: var(--ink); color: var(--yellow); }
.kb-btn:disabled, .hub-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.kb-hint { font-size: var(--fs-2xs); color: var(--text2); }

.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
}
.kb-item-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kb-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kb-item-head b { font-size: var(--fs-sm); font-weight: 900; }
.kb-tag {
  font-size: 9.5px; font-weight: 900; padding: 0 6px;
  border: 1px solid var(--ink); border-radius: var(--r-pill); background: var(--bg);
}
.kb-ref { font-size: 9.5px; font-weight: 800; color: var(--primary); }
.kb-item-sum { font-size: var(--fs-xs); color: var(--text2); font-weight: 700; }
.kb-item-fields { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-2xs); }
.kb-item-fields em { font-style: normal; color: var(--text2); margin-right: 4px; }
.kb-body summary { cursor: pointer; font-size: var(--fs-2xs); font-weight: 800; color: var(--primary); }
.kb-body pre {
  margin: 6px 0 0; padding: 8px 10px; white-space: pre-wrap; word-break: break-word;
  background: var(--bg); border: 2px solid rgba(17,17,17,.2); border-radius: var(--r-xs);
  font-size: var(--fs-2xs); line-height: 1.7; font-family: inherit;
}
.kb-tags { display: flex; gap: 5px; flex-wrap: wrap; font-size: 9.5px; color: var(--text2); }
.kb-item-ops { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; }
.kb-mini, .hub-mini {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-xs);
  font-size: 10px; cursor: pointer;
}
.kb-mini:hover, .hub-mini:hover { background: var(--yellow); }
.kb-mini.danger:hover, .hub-mini.danger:hover { background: var(--accent); color: #fff; }
.hub-mini.primary { background: var(--ink); color: var(--yellow); }

.kb-empty, .hub-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 30px 16px; text-align: center;
  border: 1.5px dashed rgba(17,17,17,.22); border-radius: var(--r-md);
  font-size: var(--fs-xs); color: var(--text2);
}
.kb-empty i { font-size: 26px; opacity: .3; }
.kb-empty b, .hub-empty b { font-size: var(--fs-md); font-weight: 900; color: var(--ink); }
.kb-empty p, .hub-empty p { margin: 0; max-width: 420px; line-height: 1.7; }
.kb-empty.sm, .hub-empty.sm { padding: 14px 10px; }

.kb-field, .hub-field { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-xs); font-weight: 800; }
.kb-field > span, .hub-field > span { color: var(--text2); }
.kb-field input, .kb-field select, .kb-field textarea,
.hub-field input, .hub-field select, .hub-field textarea {
  padding: 8px 10px; width: 100%;
  font-size: 16px; font-weight: 700; font-family: inherit;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.kb-field textarea, .hub-field textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.kb-form, .hub-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.kb-tip, .hub-tip { margin: 0; font-size: var(--fs-2xs); color: var(--text2); line-height: 1.7; }
.kb-draft {
  max-height: 260px; overflow: auto; margin: 0; padding: 10px;
  white-space: pre-wrap; background: var(--bg);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: 11px; line-height: 1.7; font-family: ui-monospace, monospace;
}

/* ---------- 选题池 ---------- */
.hub-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hub-sum-item {
  padding: 8px; text-align: center;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.hub-sum-item b { display: block; font-size: var(--fs-xl); font-weight: 900; line-height: 1.1; }
.hub-sum-item span { font-size: var(--fs-2xs); color: var(--text2); font-weight: 700; }

.hub-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hub-list { display: flex; flex-direction: column; gap: 5px; }
.hub-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-size: var(--fs-xs);
}
.hub-row.sm { border-width: 1.5px; padding: 6px 9px; }
.hub-check { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--ink); cursor: pointer; }
.hub-row-title { flex: 1 1 160px; min-width: 0; font-weight: 900;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-row-title.dim { opacity: .5; text-decoration: line-through; }
.hub-row-angle { font-size: var(--fs-2xs); color: var(--text2); }
.hub-row-meta { font-size: var(--fs-2xs); color: var(--text2); font-weight: 700; }
.hub-pri {
  font-size: 9.5px; font-weight: 900; padding: 0 6px;
  border: 1px solid var(--ink); border-radius: var(--r-pill);
}
.hub-pri.p1 { background: #ffe3e8; }
.hub-pri.p2 { background: var(--bg); }
.hub-pri.p3 { background: #eef1f4; }
.hub-tag {
  font-size: 9.5px; padding: 0 6px; border-radius: var(--r-pill);
  border: 1px solid rgba(17,17,17,.3); color: var(--text2);
}
.hub-acc {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 900; padding: 0 7px 0 5px;
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  background: var(--bg);
}
.hub-acc::before { content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c, #8d99ae); border: 1px solid var(--ink); }
.hub-used { margin-top: 6px; }
.hub-used summary { cursor: pointer; font-size: var(--fs-2xs); font-weight: 800; color: var(--text2); }
.hub-used .hub-row { margin-top: 5px; }

/* ---------- 复盘 ---------- */
.hub-switch { display: inline-flex; border: var(--bw) solid var(--ink); border-radius: var(--r-sm); overflow: hidden; }
.hub-sw-btn {
  min-height: 34px; padding: 0 12px;
  background: var(--card); color: var(--ink); border: 0;
  border-right: var(--bw) solid var(--ink);
  font-size: var(--fs-xs); font-weight: 900; cursor: pointer;
}
.hub-sw-btn:last-child { border-right: 0; }
.hub-sw-btn.on { background: var(--ink); color: var(--yellow); }

.hub-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hub-kpi-item {
  padding: 9px; text-align: center;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
}
.hub-kpi-item.hl { background: var(--yellow); }
.hub-kpi-item span { display: block; font-size: var(--fs-2xs); color: var(--text2); font-weight: 800; }
.hub-kpi-item b { font-size: var(--fs-lg); font-weight: 900; }

.hub-block {
  padding: 10px 12px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-md);
}
.hub-block.warn { background: #fff8dc; }
.hub-block-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hub-block-head > b { font-size: var(--fs-sm); font-weight: 900; }

.hub-top { display: flex; flex-direction: column; gap: 6px; }
.hub-top-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px;
  background: var(--bg); border: 2px solid rgba(17,17,17,.25); border-radius: var(--r-sm);
}
.hub-top-n {
  flex: 0 0 20px; text-align: center; font-weight: 900; font-size: 10px;
  border: 2px solid var(--ink); border-radius: var(--r-pill); background: var(--card);
}
.hub-top-main { flex: 1 1 auto; min-width: 0; }
.hub-top-title { font-size: var(--fs-xs); font-weight: 900;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-top-meta { font-size: 9.5px; color: var(--text2); font-weight: 700;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.hub-top-ops { flex: 0 0 auto; display: flex; gap: 4px; }

.hub-accs { display: flex; flex-direction: column; gap: 4px; }
.hub-acc-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; font-size: var(--fs-xs);
  background: var(--bg); border-radius: var(--r-xs);
}
.hub-acc-dot { width: 9px; height: 9px; border-radius: 50%;
  background: var(--c, #8d99ae); border: 1px solid var(--ink); }
.hub-acc-name { flex: 1 1 auto; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-acc-num { font-size: var(--fs-2xs); color: var(--text2); }
.hub-acc-avg { font-size: var(--fs-2xs); font-weight: 900; }
.hub-low { display: flex; flex-direction: column; gap: 4px; }

/* ---------- 阶段校验弹窗 ---------- */
.hub-checks { display: flex; flex-direction: column; gap: 6px; }
.hub-check-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--bg); border: 2px solid rgba(17,17,17,.22); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 700; cursor: pointer;
}
.hub-check-row:hover { background: var(--hover); }
.hub-check-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.hub-check-row em { font-style: normal; color: var(--accent); font-weight: 900; }
.hub-check-sum {
  padding: 8px 10px; font-size: var(--fs-2xs); font-weight: 800;
  background: #fff8dc; border: 2px solid var(--ink); border-radius: var(--r-sm);
}

/* ---------- 看板卡片菜单 ---------- */
.cb-menu { display: flex; flex-direction: column; gap: 4px; }
.cb-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; text-align: left;
  background: var(--card); color: var(--ink);
  border: 2px solid rgba(17,17,17,.25); border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 800; cursor: pointer;
}
.cb-menu-item:hover { background: var(--yellow); border-color: var(--ink); }
.cb-menu-item > i { width: 18px; text-align: center; flex: 0 0 auto; }
.cb-menu-item > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cb-menu-item em { font-style: normal; font-size: 9.5px; color: var(--text2); font-weight: 600; }
.cb-menu-item.danger:hover { background: var(--accent); color: #fff; }
.cb-menu-item.danger:hover em { color: rgba(255,255,255,.8); }
.cb-op.on { background: var(--primary); color: #fff; }

/* ---------- 首页生产仪表盘 ---------- */
.ov-prod {
  display: flex; flex-direction: column; gap: 7px;
  padding: 10px 12px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
}
.ov-prod:empty { display: none; }
.ov-prod-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ov-prod-head > b { font-size: var(--fs-sm); font-weight: 900; }
.ov-prod-head > span { font-size: var(--fs-2xs); color: var(--text2); font-weight: 700; }
.ov-prod-more {
  margin-left: auto; background: none; border: 0; padding: 0;
  font-size: var(--fs-2xs); font-weight: 900; color: var(--primary); cursor: pointer;
}
.ov-prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.ov-prod-tile {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
  padding: 8px 9px; text-align: left;
  background: var(--bg); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-sm);
  cursor: pointer;
}
.ov-prod-tile:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: var(--sh-1); }
.ov-prod-tile > span { font-size: 9.5px; font-weight: 800; color: var(--text2); }
.ov-prod-tile > b { font-size: var(--fs-lg); font-weight: 900; line-height: 1.15; }
.ov-prod-tile > em {
  font-style: normal; font-size: 9px; color: var(--text2); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.ov-prod-tile.hl { background: #fff3f5; }
.ov-prod-tile.ok { background: #ecfdf6; }

.ov-prod-accs { display: flex; gap: 10px; flex-wrap: wrap; }
.ov-prod-acc { display: flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 700; cursor: pointer; }
.ov-prod-acc .dot { width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, #8d99ae); border: 1px solid var(--ink); }
.ov-prod-acc .nm { color: var(--text2); }
.ov-prod-acc .bar {
  width: 54px; height: 7px; border: 1px solid var(--ink); border-radius: var(--r-pill);
  background: var(--bg); overflow: hidden;
}
.ov-prod-acc .bar i { display: block; height: 100%; background: var(--green); }
.ov-prod-acc em { font-style: normal; font-weight: 900; }

.ov-prod-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 9.5px; }
.ov-prod-top .lab { font-weight: 900; color: var(--text2); }
.ov-prod-top .item {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 190px; padding: 1px 7px;
  background: var(--bg); border: 1px solid var(--ink); border-radius: var(--r-pill);
  font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-prod-top .item em { font-style: normal; font-weight: 900; color: var(--accent); }

.ov-prod-risk { display: flex; gap: 10px; flex-wrap: wrap; font-size: 9.5px; color: var(--text2); font-weight: 700; }
.ov-prod-risk .warn { color: var(--accent); font-weight: 900; }

/* ---------- 窄屏 ---------- */
@media (max-width: 820px) {
  .kb-actions { margin-left: 0; width: 100%; }
  .kb-actions .kb-btn { flex: 1 1 0; justify-content: center; }
  .kb-item { flex-direction: column; }
  .kb-item-ops { flex-direction: row; }
  .kb-mini, .hub-mini { width: 32px; height: 32px; }
  .hub-sum, .hub-kpi { grid-template-columns: repeat(2, 1fr); }
  .hub-row-title { flex: 1 1 100%; }
  .hub-row { row-gap: 5px; }
  .ov-prod-grid { grid-template-columns: repeat(2, 1fr); }
  .ov-prod-tile > b { font-size: var(--fs-md); }
  .hub-top-ops { flex-direction: column; }
}

/* ==========================================================================
   UI 精修 · 2026-11-03：右下角两个悬浮入口改为「横向并排」
   --------------------------------------------------------------------------
   原来「记一句」叠在 AI 上方，两个 48px 高的胶囊竖着占掉约 126px 高度，
   在小屏和中号笔记本上会压住正文最后两行。改成同一基线并排：
   黄色的记录入口在左、粉色的 AI 在右（主入口贴角），整块面积降为 48px 高。
   手机上仍然保持上下错开 —— 底部导航已占掉最下面 56px。
   ========================================================================== */
@media (min-width: 761px) {
  .qc-fab { right: calc(18px + 100px + 10px); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}

/* ==========================================================================
   UI 精修 · 2026-11-03：层级规则「黑框只给页面级卡片，内层用底色分层」
   --------------------------------------------------------------------------
   驾驶舱一张维度卡里嵌 4 个指标格，每个都描 2px 黑边 → 一屏 24 个黑框，
   全部同样重，人眼分不清哪层是重点（截图里像一堆并排的格子）。
   改法：外层卡保留 2px 黑框（表示"这是一块内容"），内层格子去掉边框、
   用浅底区分 —— 层级靠颜色深浅，不靠再加一条黑线。
   这条规则同样适用于图表容器与月度/周度小卡。
   ========================================================================== */
.ext-dash-metric,
.ext-metric {
  border: 0;
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.ext-chart-box { border: 0; background: var(--bg); }

/* 技能真实度：6 周全空时的一句话空态（替代 6 个虚线空框） */
.da-trend-empty {
  margin: 0; font-size: 11.5px; font-weight: 600; line-height: 1.7;
  color: var(--text2);
}

/* ==========================================================================
   UI 精修 · 2026-11-03：手机端「今天 3 件事」让出标题宽度
   --------------------------------------------------------------------------
   390px 宽下，一行里塞了 勾选框 + 标题 + 已过期 + 「⏱ 计时」，
   标题只剩约 150px，长的待办被截成「周一~周四20:30-22:3…」。
   两处调整：计时按钮只留图标（图标本身已够表意）、标题放宽到两行。
   ========================================================================== */
@media (max-width: 640px) {
  .h3-three-time { padding: 0 8px; }
  .h3-three-time span { display: none; }
  .h3-three-item { gap: 8px; padding: 10px; }
  .h3-three-text {
    white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.45;
  }
  .h3-three-late { font-size: 10px; padding: 0 5px; }
}

/* ==========================================================================
   体检优化 · 2026-11-06：驾驶舱「专注时间分析」加一条模式拆分
   --------------------------------------------------------------------------
   原来四格指标只给总数，看不出「深度 1 小时 + 在岗 10 小时」这种结构。
   ========================================================================== */
.db-focus-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 2px; }
.db-fmode {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 9px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--card);
}
.db-fmode em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--text2); }
.db-fmode b { font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums; }
.db-fmode i { font-style: normal; font-size: 10px; color: var(--text3, var(--text2)); }
.db-fmode.deep { border-color: var(--ink); }
.db-fmode.deep b { color: var(--ink); }
.db-fmode.unknown { opacity: .62; border-style: dashed; }
.db-fmode-note { flex: 1 1 100%; margin: 2px 0 0; font-size: 10.5px; line-height: 1.55; }

/* ---------- 内容看板：卡片内「+线」与已登记线索（§3③） ----------
   线索是唯一能换算成钱的数字，必须出现在卡片正面；
   但它是次要动作，所以只给一个描边小按钮，不用强调色。 */
.cb-op-lead {
  width: auto; padding: 0 6px; font-weight: 900; letter-spacing: .02em;
  border-style: dashed;
}
.cb-op-lead:hover:not(:disabled) { background: var(--green); border-style: solid; }
.cb-lead-line {
  display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
  margin-top: 5px; padding: 3px 6px;
  border-left: 3px solid var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--card));
  font-size: 10.5px; font-weight: 700; color: var(--text2);
}
.cb-lead-line b { font-size: 11.5px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.cb-lead-line b.ok { color: var(--green-text, #0a7a5a); }
.cb-lead-line em { font-style: normal; font-size: 9.5px; color: var(--text3, var(--text2)); }

/* ---------- 养号「今天该做的 3 件」（§3④） ----------
   默认视图只有一列三行，不再是 5 阶段 × 14 天的全景。
   全景没删，放在「查看全部」里；想复盘进度时再点。 */
.cb-wswitch { display: flex; gap: 6px; margin: 0 0 10px; }
.cb-ws-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font-size: 11.5px; font-weight: 800; font-family: inherit; cursor: pointer;
}
.cb-ws-btn.active { background: var(--ink); color: var(--bg); }
.cb-ws-btn:hover:not(.active) { background: var(--yellow); }

.cb-today {
  border: 2px solid var(--ink); border-radius: var(--r);
  background: var(--card); padding: 12px 14px 14px;
}
.cb-today-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.cb-today-head b { font-size: 14px; font-weight: 900; }
.cb-today-head span { font-size: 10.5px; color: var(--text2); font-weight: 600; }
.cb-today-item { padding: 9px 0; border-top: 1px dashed rgba(17,17,17,.16); }
.cb-today-item:first-of-type { border-top: 0; }
.cb-today-item .late { color: var(--accent); text-decoration: none; font-weight: 800; }
.cb-wmore { margin-top: 10px; }

/* =====================================================
   养号看板 · 两组 × 三阶段（2026-11-10）
   结构：组 → 阶段列 → 账号块 → 任务行。
   全部用既有令牌，暗色主题与沉浸氛围自动跟随。
   ===================================================== */

/* ---------- 顶部筛选条 ---------- */
.cb-wbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 10px 12px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-md);
}
.cb-wbar-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* style.css 里是 `select.input { width:100% }`（权重 0,1,1），
   单写 .cb-wsel（0,1,0）压不住，每个下拉都被撑成一行 —— 这里用两级选择器提权 */
.cb-wbar-l .cb-wsel { width: 178px; max-width: 178px; height: 34px; font-size: 12.5px; padding: 0 8px; flex: 0 0 auto; }
.cb-wck {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--text2); cursor: pointer; white-space: nowrap;
}
.cb-wck input { width: 15px; height: 15px; accent-color: var(--ink); cursor: pointer; }
.cb-wbar-r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.cb-wkpi {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 3px 9px; border: 2px solid var(--ink); border-radius: var(--r-pill);
  background: var(--hover); font-size: 11px; font-weight: 700;
}
.cb-wkpi[data-plan="cold"] { background: #ffe3e3; }
.cb-wkpi[data-plan="ops"]  { background: #e3fbf1; }
.cb-wkpi em { font-style: normal; color: var(--text2); }
.cb-wkpi b { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cb-wkpi u { text-decoration: none; color: var(--text2); font-variant-numeric: tabular-nums; }

/* ---------- 泳道组 ---------- */
.cb-wps { display: flex; flex-direction: column; gap: 16px; }
.cb-wp {
  background: var(--card); border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg); overflow: hidden;
}
.cb-wp-h {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: var(--bw) solid var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, var(--card));
}
.cb-wp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cb-wp-t b { font-size: 14.5px; font-weight: 900; }
.cb-wp-t span { font-size: 11.5px; color: var(--text2); }
.cb-wp-r { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
.cb-wp-r b {
  font-size: 22px; font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.cb-wp-r em { font-style: normal; font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; }

/* ---------- 三列 ---------- */
.cb-wp-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.cb-wcol { min-width: 0; border-right: var(--bw) dashed var(--line-soft, #ddd); }
.cb-wcol:last-child { border-right: none; }
.cb-wcol-h {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 2px dashed var(--line-soft, #ddd);
  background: color-mix(in srgb, var(--ink) 3%, var(--card));
}
.cb-wcol-h b { font-size: 12.5px; font-weight: 900; }
.cb-wcol-h em { font-style: normal; font-size: 11px; color: var(--text2); }
.cb-wcol-h .cb-wreset {
  text-decoration: none; font-size: 10px; font-weight: 800;
  padding: 0 5px; border: 1.5px solid var(--ink); border-radius: var(--r-pill);
  color: var(--text2);
}
.cb-wcol-h span {
  margin-left: auto; font-size: 11px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--text2);
}
.cb-wcol-b { padding: 10px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- 账号块 ---------- */
.cb-wacc {
  border: 2px solid var(--ink); border-radius: var(--r-sm);
  background: var(--card); overflow: hidden;
  border-left: 5px solid var(--c, var(--ink));   /* 账号专属色：一眼区分谁是谁 */
}
.cb-wacc-h {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-bottom: 1.5px solid var(--line-soft, #ddd);
  background: color-mix(in srgb, var(--c, var(--ink)) 10%, var(--card));
}
.cb-wdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink)); flex: 0 0 auto; }
.cb-wacc-h b { font-size: 12px; font-weight: 800; }
.cb-wacc-h em { font-style: normal; font-size: 10px; color: var(--text2); }
.cb-wacc-r {
  margin-left: auto; font-size: 10.5px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--text2);
}
.cb-wacc-r.full { color: var(--green-text, #00875c); }

/* ---------- 任务行 ---------- */
.cb-wtask {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 5px 8px; cursor: pointer;
  font-size: 11.5px; line-height: 1.45; color: var(--text);
  border-bottom: 1px dashed color-mix(in srgb, var(--ink) 10%, transparent);
}
.cb-wtask:last-child { border-bottom: none; }
.cb-wtask:hover { background: var(--hover); }
.cb-wtask input {
  width: 14px; height: 14px; margin-top: 1px; flex: 0 0 auto;
  accent-color: var(--ink); cursor: pointer;
}
.cb-wtask.done > span { color: var(--text2); text-decoration: line-through; }

/* ---------- 底部常驻 ---------- */
.cb-wfoot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.cb-wfbox {
  padding: 12px 14px; background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
}
.cb-wfbox > b { display: block; font-size: 12.5px; font-weight: 900; margin-bottom: 6px; }
.cb-wfbox[data-plan="cold"] > b { color: #b02a2a; }
.cb-wfbox[data-plan="ops"] > b { color: #0b7a55; }
.cb-wfbox ol, .cb-wfbox ul { margin: 0; padding-left: 18px; }
.cb-wfbox li { font-size: 11.5px; line-height: 1.6; color: var(--text2); }
.cb-wfverify { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line-soft, #ddd); }
.cb-wfverify b { display: block; font-size: 11.5px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }

/* ---------- 空态 ---------- */
.cb-wp-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 34px 20px; text-align: center;
  background: var(--card); border: var(--bw) dashed var(--ink); border-radius: var(--r-lg);
}
.cb-wp-empty b { font-size: 15px; font-weight: 900; }
.cb-wp-empty p { font-size: 12.5px; color: var(--text2); max-width: 420px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .cb-wp-cols { grid-template-columns: 1fr; }
  .cb-wcol { border-right: none; border-bottom: 2px dashed var(--line-soft, #ddd); }
  .cb-wcol:last-child { border-bottom: none; }
  .cb-wfoot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cb-wbar { gap: 8px; padding: 8px 10px; }
  .cb-wbar-r { margin-left: 0; width: 100%; }
  .cb-wsel { max-width: none; flex: 1; min-width: 120px; }
  .cb-wp-t span { font-size: 11px; }
  .cb-wp-r b { font-size: 18px; }
  .cb-wtask { font-size: 11.5px; padding: 7px 8px; }   /* 手机上加大点击区 */
  .cb-wtask input { width: 17px; height: 17px; }
}

/* ==========================================================================
   内容创作 · 线索速记条（2026-11-11）
   选题库顶部常驻一行「输入信息 → 回车入库」。视觉上比工具栏更轻：
   无外框、只一条发丝线分隔，避免又多一个盒子。
   ========================================================================== */
.ct-lead {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: var(--card);
  border: var(--bw) dashed var(--ds-hair, rgba(17,17,17,.18));
  border-radius: var(--r-md);
  transition: border-color .15s ease, background .15s ease;
}
.ct-lead:focus-within { border-style: solid; border-color: var(--ink); }
.ct-lead-ic { color: var(--accent); font-size: 13px; flex: 0 0 auto; }
/* 注意选择器要压过基础样式里的 `select.input { width: 100% }`：
   只写 .ct-lead-sel 是 0,1,0，而 select.input 是 0,1,1 —— 会被后者顶成满宽。 */
.ct-lead .ct-lead-in {
  flex: 1 1 auto; width: auto; min-width: 0;
  border: 0 !important; box-shadow: none !important;
  background: transparent; padding: 4px 2px; min-height: 34px;
  font-size: 14px; font-weight: 600;
}
.ct-lead .ct-lead-in:focus { box-shadow: none !important; }
.ct-lead select.ct-lead-sel {
  flex: 0 0 auto; width: auto; min-height: 34px; padding: 0 26px 0 10px;
  font-size: 12px; font-weight: 800;
}
.ct-lead-save { flex: 0 0 auto; }

@media (max-width: 760px) {
  .ct-lead { flex-wrap: wrap; }
  .ct-lead-in { flex: 1 1 calc(100% - 30px); }
  .ct-lead-sel { flex: 1 1 auto; }
}

/* ==========================================================================
   LibreTV 影视站 · 快捷入口 / 内嵌面板 / 影视统计（2026-11-11）
   --------------------------------------------------------------------------
   视觉对齐既有娱乐看板：2px 墨边 + 12px 圆角 + hover 硬偏移，
   配色只用既有令牌（--card/--ink/--accent/--primary/--text2/--text3）。
   观看中状态用 accent 描边 + 呼吸点，不整块变色 —— 整块变色会和「选中」混淆。
   ========================================================================== */

/* ---------- 1. 快捷入口区 ---------- */
.ent-launch { margin: 0 0 14px; }
.el-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px 2px; }.el-head-k {
  font-size: var(--ds-fs-1, 10px); font-weight: 900;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text3);
}
.el-head-s { font-size: var(--ds-fs-2, 11px); font-weight: 700; color: var(--text3); opacity: .8; }

/* ---------- 快捷入口折叠（2026-11-12） ----------
   手机上这块（LibreTV 卡 + 常看站 + 计时设置）占约 250px，
   把片单挤到首屏 y≈720 的位置 —— 进娱乐页是想看片，不是看入口。
   手机默认收起，只留一行「快捷入口 · 本周已看 2 小时 · 展开」；
   桌面一直展开（空间够，且折叠反而多点一步）。 */
.el-fold-hint {
  display: none; margin-left: auto; align-items: center; gap: 4px;
  font-size: var(--ds-fs-2, 11px); font-weight: 800; color: var(--text2);
}
@media (max-width: 767px) {
  .el-fold-hint { display: inline-flex; }
  /* 折叠条整行都是可点区域，必须撑到能点中（体检实测只有 17px 高） */
  .el-head[data-ltv="fold"] {
    cursor: pointer; margin-bottom: 8px;
    min-height: 40px; padding: 0 2px;
    align-items: center;
  }
  .ent-launch.is-folded .el-head { margin-bottom: 0; }
  .ent-launch.is-folded .el-row,
  .ent-launch.is-folded .el-recent { display: none; }
  /* 正在观看的进度条不隐藏：折叠归折叠，正在计时这件事不能看不见 */
  .ent-launch.is-folded .el-now { display: flex; }
}

.el-row { display: flex; gap: 10px; align-items: stretch; }

.el-card {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  font-family: inherit; text-align: left; cursor: pointer;
  transition: transform .14s var(--ds-ease, ease), box-shadow .14s var(--ds-ease, ease), background .14s;
}
.el-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.el-card:active { transform: translate(1px, 1px); box-shadow: none; }
.el-card.is-empty { background: var(--hover); }

/* 图标块：黑边方块 + 强调色底，是全站「功能入口」的既有写法 */
.el-ic {
  flex: 0 0 auto; width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--yellow); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-md);
  font-size: 18px;
}
.el-card.is-running .el-ic { background: var(--accent); color: #fff; }

.el-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.el-name { font-size: 16px; font-weight: 900; letter-spacing: .2px; }
.el-sub { font-size: var(--ds-fs-3, 12px); font-weight: 600; color: var(--text2); }
.el-state {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--ds-fs-2, 11px); font-weight: 800; color: var(--text3);
  margin-top: 2px; font-variant-numeric: tabular-nums;
}
.el-card.is-running .el-state { color: var(--accent); }
.el-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: el-pulse 1.6s ease-in-out infinite;
}
@keyframes el-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

.el-go {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--ds-fs-3, 12px); font-weight: 900; color: var(--ink);
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--card); border: var(--bw) solid var(--ink);
}
.el-card.is-running .el-go { background: var(--accent); color: #fff; }

.el-side { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.el-mini {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 82px; padding: 0 12px;
  background: var(--card); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-sm);
  font-family: inherit; font-size: var(--ds-fs-3, 12px); font-weight: 800;
  cursor: pointer; transition: background .12s, transform .12s, box-shadow .12s;
}
.el-mini:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.el-mini:active { transform: translate(1px, 1px); box-shadow: none; }
.el-mini i { font-size: 12px; opacity: .8; }

/* 观看中条：实时秒数 + 就地命名 */
.el-now {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  border: var(--bw) solid var(--accent); border-radius: var(--r-md);
}
.el-now > i { color: var(--accent); font-size: 13px; }
.el-now-title {
  flex: 1 1 auto; min-width: 0;
  background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 14px; font-weight: 800; color: var(--ink);
  padding: 2px 0;
}
.el-now-title::placeholder { color: var(--text3); font-weight: 600; }
.el-now-time {
  flex: 0 0 auto; font-size: 16px; font-weight: 900;
  font-variant-numeric: tabular-nums; color: var(--accent);
}

/* 最近观看 */
.el-recent { margin-top: 8px; }
.el-more summary {
  cursor: pointer; font-size: var(--ds-fs-2, 11px); font-weight: 800;
  color: var(--text3); padding: 4px 2px; list-style: none;
}
.el-more summary::-webkit-details-marker { display: none; }
.el-more summary::before { content: '▸ '; }
.el-more[open] summary::before { content: '▾ '; }
.el-list { list-style: none; margin: 4px 0 0; padding: 0; }
.el-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 2px; border-top: 1px solid var(--ds-hair, rgba(17,17,17,.1));
  font-size: var(--ds-fs-3, 12px);
}
.el-item-t { flex: 1 1 auto; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-item-k { flex: 0 0 auto; color: var(--text3); font-weight: 700; }
.el-item-d { flex: 0 0 auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.el-item-x { flex: 0 0 auto; color: var(--text3); font-variant-numeric: tabular-nums; }
.el-sync {
  flex: 0 0 auto; padding: 2px 8px; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-xs);
  font-family: inherit; font-size: 11px; font-weight: 800;
}
.el-sync:hover { background: var(--yellow); }
.el-sync:disabled { opacity: .5; cursor: default; }

/* ---------- 2. 内嵌播放面板 ---------- */
body.ltv-open { overflow: hidden; }
.ltv-mask {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(17, 17, 17, .92);
  display: flex; padding: 14px;
}
.ltv-shell {
  flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  overflow: hidden;
}
.ltv-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; min-height: 46px;
  border-bottom: var(--bw) solid var(--ink);
  background: var(--card);
}
.ltv-bar > i { color: var(--accent); }
.ltv-name { font-size: 14px; font-weight: 900; }
.ltv-clock {
  font-size: 15px; font-weight: 900; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.ltv-acts { margin-left: auto; display: flex; gap: 6px; }
.ltv-tip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--hover); color: var(--text2);
  font-size: 12px; font-weight: 600;
  border-bottom: 1px solid var(--ds-hair, rgba(17,17,17,.1));
}
.ltv-tip i { color: var(--primary); }
.ltv-bar { flex: 0 0 auto; width: 100%; }
.ltv-tip { flex: 0 0 auto; }
/* min-height:0 是关键：flex 列里的 iframe 默认有 intrinsic 高度，
   不给它归零会把 shell 撑破、并让上面的工具栏被压成一坨 */
.ltv-frame { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #000; }

/* ---------- 3. 配置弹窗里的表单 ---------- */
.ltv-cfg-lead { font-size: 13px; color: var(--text2); margin-bottom: 12px; line-height: 1.65; }
.ltv-cfg-tip { font-size: 11px; color: var(--text3); line-height: 1.6; margin-top: 6px; }
.ltv-radio { display: flex; gap: 16px; flex-wrap: wrap; }
.ltv-radio label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ltv-check {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ---------- 4. 统计块 ---------- */
.ltv-stats {
  margin-top: 18px; padding: 16px;
  background: var(--card);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
}
.ltv-stats-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ltv-stats-head b { font-size: 15px; font-weight: 900; }
.ltv-stats-head b i { color: var(--accent); margin-right: 4px; }
.ltv-stats-head span { font-size: 11px; color: var(--text3); font-weight: 700; }

.ltv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ltv-kpi {
  padding: 10px 12px;
  border: 2px solid var(--ds-hair, rgba(17,17,17,.14)); border-radius: var(--r-md);
}
.ltv-kpi span { display: block; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); }
.ltv-kpi b { display: block; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ltv-kpi em { display: block; font-style: normal; font-size: 11px; color: var(--text3); }

.ltv-chart { position: relative; margin-top: 14px; }
.ltv-bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.ltv-bar {
  flex: 1 1 0; min-width: 0; display: block;
  background: var(--primary); border-radius: 3px 3px 0 0;
  opacity: .85; transition: opacity .12s;
}
.ltv-bar:hover { opacity: 1; }
.ltv-chart-k { display: block; margin-top: 4px; font-size: 10px; color: var(--text3); font-weight: 800; }

.ltv-kinds { margin-top: 14px; display: grid; gap: 6px; }
.ltv-kind { display: grid; grid-template-columns: 54px minmax(0, 1fr) 78px; gap: 10px; align-items: center; }
.ltv-kind-k { font-size: 11px; font-weight: 800; color: var(--text2); }
.ltv-kind-bar { height: 8px; background: var(--ds-hair, rgba(17,17,17,.1)); border-radius: 3px; overflow: hidden; }
.ltv-kind-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ltv-kind-v { font-size: 11px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

.ltv-top { list-style: none; margin: 16px 0 0; padding: 0; }
.ltv-top li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--ds-hair, rgba(17,17,17,.1));
  font-size: 13px;
}
.ltv-top em {
  flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center;
  background: var(--ink); color: var(--card); border-radius: var(--r-xs);
  font-style: normal; font-size: 11px; font-weight: 900;
}
.ltv-top-t { flex: 1 1 auto; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltv-top-k { flex: 0 0 auto; font-size: 11px; color: var(--text3); font-weight: 700; }
.ltv-top-v { flex: 0 0 auto; font-weight: 900; font-variant-numeric: tabular-nums; }
.ltv-empty { margin-top: 14px; padding: 16px; text-align: center; font-size: 12px; color: var(--text2); border: 2px dashed var(--ds-hair, rgba(17,17,17,.16)); border-radius: var(--r-md); }

/* ---------- 5. 窄屏 ---------- */
@media (max-width: 760px) {
  .el-row { flex-direction: column; }
  .el-side { flex-direction: row; }
  .el-mini { flex: 1 1 0; min-height: 38px; }
  .el-card { padding: 12px; gap: 12px; }
  .el-go { padding: 5px 10px; }
  .ltv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ltv-mask { padding: 0; }
  .ltv-shell { border-radius: 0; border: 0; }
  .ltv-bar { flex-wrap: wrap; min-height: auto; padding: 8px; }
  .ltv-acts { width: 100%; margin-left: 0; }
  .ltv-acts .btn { flex: 1 1 0; }
}

@media (prefers-reduced-motion: reduce) {
  .el-dot { animation: none; }
}

/* ---------- 6. 配置弹窗：地址行 / 探测结果 / 怎么找（2026-11-11 补） ---------- */
.ltv-url-row { display: flex; gap: 8px; align-items: stretch; }
.ltv-url-row .input { flex: 1 1 auto; min-width: 0; }
.ltv-url-row .btn { flex: 0 0 auto; }

.ltv-probe {
  margin-top: 8px; padding: 0;
  font-size: 12px; line-height: 1.65; font-weight: 600;
  color: var(--text2);
}
.ltv-probe:empty { display: none; }
.ltv-probe.is-busy { color: var(--text3); }
.ltv-probe.is-ok,
.ltv-probe.is-warn,
.ltv-probe.is-bad {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 2px solid var(--ink);
}
.ltv-probe.is-ok { background: color-mix(in srgb, var(--green) 14%, var(--card)); }
.ltv-probe.is-warn { background: color-mix(in srgb, var(--yellow) 26%, var(--card)); }
.ltv-probe.is-bad { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.ltv-probe-hint { display: block; margin-top: 4px; color: var(--text3); font-weight: 600; }

.ltv-help {
  margin-top: 10px;
  border: 2px dashed var(--ds-hair, rgba(17,17,17,.18));
  border-radius: var(--r-md);
  padding: 8px 12px;
  background: var(--hover);
}
.ltv-help summary {
  cursor: pointer; font-size: 12px; font-weight: 900; color: var(--ink);
  list-style: none;
}
.ltv-help summary::-webkit-details-marker { display: none; }
.ltv-help summary::before { content: '？ '; color: var(--accent); }
.ltv-help ol { margin: 8px 0 0; padding-left: 18px; }
.ltv-help li { font-size: 12px; line-height: 1.85; color: var(--text2); }
.ltv-help p { font-size: 11px; line-height: 1.7; color: var(--text3); margin-top: 8px; }
.ltv-help code {
  padding: 1px 5px; border-radius: 4px;
  background: var(--card); border: 1px solid var(--ds-hair, rgba(17,17,17,.16));
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px; font-weight: 700;
}

/* ---------- 7. 额外常看站（2026-11-11） ---------- */
/* 和 LibreTV 卡同规格、但更矮：它只是入口，不承载状态 */
.el-card-sm { flex: 0 1 220px; min-width: 0; padding: 10px 14px; gap: 10px; }
.el-card-sm .el-ic { width: 36px; height: 36px; font-size: 14px; background: var(--primary); color: #fff; }
.el-card-sm .el-name { font-size: 14px; }
.el-card-sm .el-sub { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-card-sm .el-go { padding: 5px 9px; }
.el-card-sm .el-go i { font-size: 11px; }

.el-card-add { flex: 0 1 220px; background: transparent; border-style: dashed; }
.el-card-add:hover { background: var(--hover); }
.el-ic-mute { background: transparent !important; border-style: dashed; color: var(--text3); }
.el-card-add .el-name { font-size: 13px; font-weight: 800; color: var(--text2); }
.el-card-add .el-sub { font-size: 11px; }

.el-mini-add { min-width: 40px; padding: 0 10px; }

@media (max-width: 1180px) {
  .el-row { flex-wrap: wrap; }
  .el-card-sm, .el-card-add { flex: 1 1 200px; }
}
@media (max-width: 760px) {
  .el-row { flex-wrap: wrap; }
  .el-card-sm, .el-card-add { flex: 1 1 100%; }
  .el-mini-add { display: none; }
}

/* ==========================================================================
   绩效闭环卡片（2026-11-11）
   挂在内容创作页顶部。视觉上比「生产仪表盘」更轻：
   只有外框一条线，内部靠竖分隔和留白分层，不套一层套一层的黑框。
   ========================================================================== */
.perf {
  margin: 0 0 14px; padding: 12px 16px;
  background: var(--card);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg);
}
.perf:empty { display: none; }
.perf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.perf-head b { font-size: 14px; font-weight: 900; }
.perf-head b i { color: var(--accent); margin-right: 4px; }
.perf-sub { font-size: 11px; font-weight: 700; color: var(--text3); }
.perf-cfg {
  margin-left: auto; width: 26px; height: 26px; padding: 0;
  display: grid; place-items: center;
  background: transparent; border: 2px solid var(--ds-hair, rgba(17,17,17,.16));
  border-radius: var(--r-xs); color: var(--text3); cursor: pointer;
}
/* 手机上 26×26 点不中（2026-11-12 体检实测）→ 撑到 40。
   试过用 ::before 扩点击区，视觉不变但 getBoundingClientRect 仍是 26，
   量不出来也说不清楚，不如直接把按钮做大，所见即可点。 */
@media (max-width: 767px) {
  .perf-cfg { width: 40px; height: 40px; }
}
.perf-cfg:hover { background: var(--hover); color: var(--ink); }

/* 四段链：产出 → 线索 → 提成 → 工资 */
.perf-chain { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.perf-node {
  flex: 1 1 0; min-width: 0;
  padding: 2px 14px;
  display: flex; flex-direction: column; gap: 1px;
  border-left: 1px solid var(--ds-hair, rgba(17,17,17,.12));
}
.perf-node:first-child { border-left: 0; padding-left: 0; }
.perf-k { font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); }
.perf-v { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -.02em; }
.perf-v.accent { color: var(--accent); }
.perf-v.green { color: var(--green-text, var(--green)); }
.perf-x { font-size: 11px; color: var(--text3); font-weight: 700; }
.perf-arrow { align-self: center; font-size: 10px; color: var(--ds-hair, rgba(17,17,17,.2)); padding: 0 2px; }
.perf-node.big .perf-v { font-size: 26px; }

/* 线索速记 */
.perf-quick {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--ds-hair, rgba(17,17,17,.16));
}
.perf-q-k { font-size: 12px; font-weight: 800; color: var(--text2); }
.perf-q-k i { color: var(--accent); margin-right: 3px; }
.perf-field {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; color: var(--text2);
}
.perf-field input {
  width: 62px; height: 32px; padding: 0 8px;
  border: 2px solid var(--ink); border-radius: var(--r-xs);
  background: var(--bg); color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums; text-align: center;
}
.perf-field input:focus { outline: none; background: var(--card); box-shadow: 2px 2px 0 var(--ink); }
.perf-tip { font-size: 11px; color: var(--text3); }

/* 近 14 天迷你柱 */
.perf-trend {
  position: relative; display: flex; align-items: flex-end; gap: 3px;
  height: 40px; margin-top: 12px; padding-bottom: 14px;
  /* 一条底线，让「全 0」的日子读成"这几天没有数据"，而不是断掉的虚线 */
  border-bottom: 1px solid var(--ds-hair, rgba(17,17,17,.14));
}
.perf-day { flex: 1 1 0; display: flex; align-items: flex-end; gap: 1px; height: 100%; }
.perf-day i { flex: 1 1 0; display: block; border-radius: 2px 2px 0 0; }
.perf-bar-p { background: var(--ds-hair, rgba(17,17,17,.22)); }
.perf-bar-l { background: var(--accent); }
.perf-trend-k {
  position: absolute; left: 0; bottom: 0;
  font-size: 10px; font-style: normal; font-weight: 800; color: var(--text3);
}

/* 按账号 */
.perf-acc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.perf-acc-i {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--hover); font-size: 11px; font-weight: 700;
}
.perf-acc-i em { font-style: normal; color: var(--text2); }
.perf-acc-i b { font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }

.perf-cfg-form { display: block; }
.perf-cfg-tip { font-size: 11px; color: var(--text3); line-height: 1.6; margin-top: 10px; }

@media (max-width: 760px) {
  .perf-chain { gap: 10px 0; }
  .perf-node { flex: 1 1 46%; border-left: 0; padding: 0; }
  .perf-node:nth-child(odd) { padding-right: 8px; }
  .perf-arrow { display: none; }
  .perf-v { font-size: 20px; }
  .perf-node.big .perf-v { font-size: 22px; }
  .perf-field input { width: 56px; }
}

/* ---------- 8. 备份状态卡（2026-11-11） ---------- */
.bk-card { border-left-width: 6px; }
.bk-ok { border-left-color: var(--green); }
.bk-bad { border-left-color: var(--accent); }
.bk-warn { border-left-color: var(--ds-hair, rgba(17,17,17,.2)); }
.bk-list { display: grid; gap: 4px; }
.bk-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; border-top: 1px solid var(--ds-hair, rgba(17,17,17,.1));
  font-size: 11px; font-variant-numeric: tabular-nums;
}
.bk-name { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-size { flex: 0 0 auto; color: var(--text3); font-weight: 700; }
.bk-time { flex: 0 0 62px; text-align: right; color: var(--text3); }

/* ==========================================================================
   悬浮球合并（2026-11-11）
   评估文档 P1-4：右下角「+ 记一句」「AI」两个球同时浮着，压住正文。
   现在收成一个「+」，点开才展开两个；滚动时降到 45% 透明度，停下恢复。
   被收进来的按钮仍是原来那两个元素（id / class / onclick 都没变），
   这里只把它们的 fixed 定位归零，改成栈内流式排布。
   ========================================================================== */
.fab-stack {
  position: fixed; right: 18px; z-index: 90;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  transition: opacity .18s ease;
}
.fab-stack.is-scrolling { opacity: .45; }

/* 展开后的两个按钮 */
.fab-items {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  transform-origin: bottom right;
  opacity: 0; transform: translateY(8px) scale(.92);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.fab-stack.is-open .fab-items { opacity: 1; transform: none; pointer-events: auto; }

/* 被收进来的原按钮：取消各自的 fixed 定位 */
.fab-items .qc-fab,
.fab-items .ai-fab {
  position: static; right: auto; bottom: auto;
  margin: 0;
}

/* 主按钮：圆形，展开时「+」转成「×」 */
.fab-main {
  width: 52px; height: 52px; padding: 0;
  display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%;
  background: var(--card); color: var(--ink);
  font-size: 18px; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.fab-main:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.fab-main:active { transform: none; box-shadow: none; }
.fab-main i { transition: transform .18s ease; }
.fab-main.is-open { background: var(--hover); }
.fab-main.is-open i { transform: rotate(45deg); }

/* 手机：让开底部导航条 */
@media (max-width: 760px) {
  .fab-stack { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); right: 14px; }
  .fab-main { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .fab-items, .fab-main, .fab-main i { transition: none; }
}

/* ==========================================================================
   封面骨架 + 失败重试（2026-11-11，评估文档 P0-3 / 美化建议 §2）
   --------------------------------------------------------------------------
   原来的行为是：图加载失败 → 只剩 emoji → 永远那样，也没有重试入口。
   现在三态：
     加载中  → 骨架脉冲（比空白块更明确"在等"）
     已加载  → 正常图
     失败    → 保留 emoji 底 + 「点击重试」角标，点一下换 cache-busting 参数重来
   ========================================================================== */
/* 骨架与重试角标都靠绝对定位，容器必须有定位上下文 */
.ent-cover { position: relative; }
.ent-cover.is-loading::after,
.ent-card-cover.is-loading::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--card) 86%, var(--ink)) 20%,
    color-mix(in srgb, var(--card) 94%, var(--ink)) 40%,
    color-mix(in srgb, var(--card) 86%, var(--ink)) 60%);
  background-size: 220% 100%;
  animation: ent-skel 1.25s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ent-skel {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

/* 失败态：emoji 底露出来，图标下方挂一个重试角标。
   原来角标在 right:6 / bottom:6，正好和右下角的「院线真人」等小标签重叠，
   结果被压在下面看不见 —— 封面挂掉时用户只看到一块空白，不知道能点。
   现在改成图标正下方居中，谁都不挡。 */
.ent-cover-retry { display: none; }
.ent-cover.is-failed,
.ent-card-cover.is-failed { cursor: pointer; }
.ent-cover.is-failed .ent-cover-retry,
.ent-card-cover.is-failed .ent-cover-retry {
  display: inline-flex; align-items: center; gap: 4px;
  position: absolute; left: 50%; top: calc(50% + 34px);
  transform: translateX(-50%); z-index: 2;
  padding: 3px 8px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--ink);
  font-size: 10px; font-weight: 900; color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.ent-cover.is-failed .ent-cover-retry i,
.ent-card-cover.is-failed .ent-cover-retry i { font-size: 9px; }
.ent-cover.is-failed:hover .ent-cover-retry,
.ent-card-cover.is-failed:hover .ent-cover-retry { background: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
  .ent-cover.is-loading::after,
  .ent-card-cover.is-loading::after { animation: none; }
}

/* ---------- 9. 空模块降权（2026-11-11） ----------
   评估文档 P0-2：一半功能建了没用起来，入口却和常用模块平起平坐。
   处理方式不是删除，而是「沉底 + 淡显」，鼠标停上去恢复 ——
   位置仍然固定在同一组内，找得到；但不再和真在用的模块抢注意力。 */
.nav-item.is-idle { opacity: .5; }
.nav-item.is-idle:hover,
.nav-item.is-idle:focus-visible { opacity: 1; }
.nav-item.is-idle i { opacity: .8; }

/* ---------- 10. 封面预热卡（2026-11-11） ----------
   和「自动备份」并列在设置页。视觉语言刻意和首页 KPI 区分：
   这里不做环形图、不做彩色卡片，只有一个数字 + 一条发丝进度条 ——
   它是「偶尔来点一下」的维护动作，不该长得像每日仪表盘。 */
.cw-stat { margin: 2px 0 0; }
.cw-num {
  display: flex; align-items: baseline; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.cw-num b {
  font-size: 26px; font-weight: 900; letter-spacing: -.02em;
  line-height: 1.1;
}
.cw-num span { font-size: 12px; font-weight: 700; color: var(--text2); }
.cw-num em { font-style: normal; color: var(--text3); }

.cw-bar {
  position: relative; height: 6px; margin: 10px 0 8px;
  background: var(--ds-hair, rgba(17,17,17,.12));
  border-radius: 3px; overflow: hidden;
}
.cw-bar i {
  display: block; height: 100%; width: 0;
  background: var(--primary); border-radius: 3px;
  transition: width .35s ease;
}
/* 跑动中的斜纹：明确「在动」，而不是卡在某个百分比 */
.cw-bar.is-running i {
  background-image: linear-gradient(115deg,
    rgba(255,255,255,.28) 25%, transparent 25%,
    transparent 50%, rgba(255,255,255,.28) 50%,
    rgba(255,255,255,.28) 75%, transparent 75%);
  background-size: 14px 14px;
  animation: cw-stripe .8s linear infinite;
}
@keyframes cw-stripe { from { background-position: 0 0; } to { background-position: 14px 0; } }

.cw-meta { font-size: 11px; font-weight: 700; color: var(--text3); font-variant-numeric: tabular-nums; }
.cw-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cw-note { font-size: 11px; line-height: 1.7; color: var(--text3); margin-top: 8px; }
.cw-note:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cw-bar i { transition: none; }
  .cw-bar.is-running i { animation: none; }
}

/* ==========================================================================
   记账 · 常记条（2026-11-11）
   --------------------------------------------------------------------------
   评估文档第二梯队 4：「牛肉面 15 元」这类重复消费给一个「再记一次」。
   摆位：流水工具栏下方、筛选条上方 —— 先给动作，再给筛选。
   形态：一行横向滚动的 chip，不套外框（再来一个盒子会把这一屏挤成三截）。
   ========================================================================== */
.fin-freq {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  min-height: 32px;
}
.fin-freq-k {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--ds-fs-1, 10px); font-weight: 900;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text3);
}
.fin-freq-k i { color: var(--accent); font-size: 10px; }

.fin-freq-list {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; overflow-y: hidden;
  padding: 2px 2px 4px;             /* 给 hover 的硬阴影留出位置，不然会被裁掉 */
  scrollbar-width: none;
}
.fin-freq-list::-webkit-scrollbar { display: none; }

.fin-freq-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 11px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-family: inherit; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.fin-freq-chip b {
  font-size: 13px; font-weight: 800;
  max-width: 126px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fin-freq-chip em {
  font-style: normal; font-size: 12px; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
/* 支出红 / 收入绿沿用记账既有语义色（见 amtClass） */
.fin-freq-chip .money-expense { color: var(--accent); }
.fin-freq-chip .money-income { color: var(--green-text, var(--green)); }

.fin-freq-chip:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); background: var(--yellow); }
.fin-freq-chip:active { transform: translate(1px, 1px); box-shadow: none; }
.fin-freq-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fin-freq-chip:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

@media (max-width: 760px) {
  .fin-freq { margin-bottom: 8px; }
  .fin-freq-chip { padding: 5px 10px; }
  .fin-freq-chip b { max-width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .fin-freq-chip { transition: none; }
}

/* ==========================================================================
   服务端推送（2026-11-11）
   --------------------------------------------------------------------------
   放在「离线与通知」卡内部，用一个上方发丝线把它和 PWA 按钮分开 ——
   它不是第五个 PWA 按钮，而是另一件事（服务器主动投递）。
   状态用左侧竖条表达：已开启绿 / 未开启灰 / 权限被拒红。
   ========================================================================== */
.push-box {
  margin-top: 16px; padding: 12px 14px 12px 16px;
  border-top: 1px dashed var(--ds-hair, rgba(17,17,17,.16));
  border-left: 5px solid var(--ds-hair, rgba(17,17,17,.18));
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--hover);
}
.push-box.push-ok { border-left-color: var(--green); }
.push-box.push-bad { border-left-color: var(--accent); }
.push-box.push-warn { border-left-color: var(--yellow); }

.push-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.push-head b { font-size: 13px; font-weight: 900; }
.push-head b i { color: var(--accent); margin-right: 4px; }
.push-state { font-size: 11px; font-weight: 800; color: var(--text3); }
.push-box.push-ok .push-state { color: var(--green-text, var(--green)); }
.push-box.push-bad .push-state { color: var(--accent); }

.push-note {
  font-size: 11px; line-height: 1.75; color: var(--text2);
  margin: 6px 0 10px;
}
.push-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 11. 备份卡：异地副本（2026-11-11） ----------
   用户没有对象存储，改用他自己的电脑当异地机房。
   这块的存在感要比"上次备份"低一档：它是补充信息，不是主状态。 */
.bk-off {
  margin-top: 12px; padding: 10px 12px;
  border-radius: var(--r-md);
  border: 2px solid var(--ds-hair, rgba(17,17,17,.14));
  background: var(--card);
}
.bk-off-ok { border-color: color-mix(in srgb, var(--green) 55%, var(--ink)); }
.bk-off-warn { border-color: color-mix(in srgb, var(--yellow) 70%, var(--ink)); }
.bk-off-bad { border-color: color-mix(in srgb, var(--accent) 45%, var(--ink)); }

.bk-off-line { font-size: 12px; font-weight: 800; line-height: 1.6; margin: 0; }
.bk-off-line i { color: var(--text3); margin-right: 4px; }
.bk-off-ok .bk-off-line i { color: var(--green); }
.bk-off-bad .bk-off-line i { color: var(--accent); }

.bk-help { margin-top: 8px; }
.bk-help summary {
  cursor: pointer; list-style: none;
  font-size: 11px; font-weight: 800; color: var(--text3);
}
.bk-help summary::-webkit-details-marker { display: none; }
.bk-help summary::before { content: '▸ '; }
.bk-help[open] summary::before { content: '▾ '; }
.bk-help ol { margin: 8px 0 10px; padding-left: 18px; }
.bk-help li { font-size: 11px; line-height: 1.85; color: var(--text2); }
.bk-help code {
  padding: 1px 5px; border-radius: 4px; font-size: 10.5px; font-weight: 700;
  background: var(--hover); border: 1px solid var(--ds-hair, rgba(17,17,17,.14));
}

.bk-token-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bk-token {
  flex: 1 1 180px; min-width: 0; height: 32px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
}
.bk-tip { font-size: 10.5px; line-height: 1.7; color: var(--text3); margin: 8px 0; }

/* ==========================================================================
   线数登记卡（2026-11-11）
   --------------------------------------------------------------------------
   位置：内容创作页 Tab 下方第一块，绩效卡之上 —— 打开这页第一眼就能填。
   只有三个控件：日期 / 账号 / 线数 + 一个「记录」按钮。
   刻意不加 ± 按钮、不分「有效/总线」两栏：用户原话是「我就填写就行」。
   颜色全走令牌，深色皮肤自动跟着变。
   ========================================================================== */

.ct-lines {
  margin: 0 0 12px;
  padding: 10px 12px 11px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.ct-lines-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.ct-lines-t { font-size: 13px; font-weight: 900; letter-spacing: .2px; }
.ct-lines-t i { color: var(--accent); margin-right: 4px; }
.ct-lines-month { font-size: 12px; font-weight: 700; color: var(--text2); }
.ct-lines-month b { font-size: 15px; color: var(--ink); }

.ct-lines-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.ct-lf { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.ct-lf > span { font-size: 11px; font-weight: 800; color: var(--text2); padding-left: 2px; }
/* 选择器要压过基础样式里的 `select.input, input.input { width: 100% }` */
.ct-lf input.input,
.ct-lf select.input {
  width: auto; min-width: 132px; height: 34px; min-height: 34px;
  font-size: 13px; font-weight: 700; padding: 0 8px;
}
.ct-lf select.input { padding-right: 26px; }
/* 线数框最显眼：这才是每天唯一要动的地方 */
.ct-lf-n input.input {
  width: 96px; min-width: 96px; text-align: center;
  font-size: 16px; font-weight: 900; padding: 0 6px;
}
.ct-l-save { height: 34px; flex: 0 0 auto; }

.ct-lines-day {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 9px; font-size: 12px;
}
.ct-lines-k { font-size: 11px; font-weight: 800; color: var(--text3); }
.ct-lines-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 3px 2px 8px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--yellow); color: var(--ink);
  font-size: 12px; font-weight: 800; line-height: 1.5;
}
.ct-lines-chip b { font-size: 13px; font-weight: 900; }
.ct-lines-x {
  border: 0; background: transparent; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 3px;
  color: var(--ink); opacity: .5;
}
.ct-lines-x:hover { opacity: 1; color: var(--accent); }
.ct-lines-none { font-size: 12px; color: var(--text3); }

/* 站点访问卡（设置页）：注册日期这一列是 11-11 这样的短日期，
   原来写 2026-11-11 会在窄列里折成两行 —— 统一不换行。 */
#auth-card .bk-name,
#auth-card .bk-size,
#auth-card .bk-time { white-space: nowrap; }
#auth-card .bk-name { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
  .ct-lines-form { align-items: stretch; }
  .ct-lf { flex: 1 1 calc(50% - 4px); }
  .ct-lf input.input,
  .ct-lf select.input,
  .ct-lf-n input.input { width: 100%; min-width: 0; }
  .ct-l-save { flex: 1 1 100%; }
}

/* ==========================================================================
   参考视频 · 口播稿（2026-11-11）
   --------------------------------------------------------------------------
   参考视频库原来只有链接和标题 —— 等于把别人的爆款存在别人服务器上。
   现在每条可以带一份转写稿：列表里只显示「有稿 1280字 / 无稿」，
   全文点开才取，转选题时直接当文案初稿。
   ========================================================================== */

.ct-ref-tr-dot {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  border: 1.5px solid var(--ds-hair, rgba(17, 17, 17, .18));
  border-radius: 4px; vertical-align: 1px;
  font-family: inherit; font-size: 10.5px; font-weight: 800;
  color: var(--text3); background: transparent; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.ct-ref-tr-dot:hover { border-color: var(--ink); color: var(--ink); }
.ct-ref-tr-dot.has {
  border-color: var(--green-text, #0a8f6e);
  color: var(--green-text, #0a8f6e);
  background: rgba(6, 214, 160, .10);
}

/* 进度数字兼做筛选按钮：不额外占一行控件 */
.ct-ref-tr {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  border: 2px solid transparent; background: transparent;
  font-size: 11.5px; font-weight: 800; color: var(--text2); cursor: pointer;
}
.ct-ref-tr b { color: var(--ink); }
.ct-ref-tr:hover { border-color: var(--ds-hair, rgba(17, 17, 17, .2)); }
.ct-ref-tr.on { border-color: var(--ink); background: var(--yellow); color: var(--ink); }

.ct-tr { display: flex; flex-direction: column; gap: 8px; }
.ct-tr-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ct-tr-open { font-size: 12px; font-weight: 800; color: var(--primary); text-decoration: none; }
.ct-tr-open:hover { text-decoration: underline; }
.ct-tr-count { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--text3); }
.ct-tr .ct-tr-txt {
  width: 100%; min-height: 300px; resize: vertical;
  padding: 10px 12px; font-size: 13px; line-height: 1.85;
  font-family: inherit;
}
.ct-tr-tip { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--text3); }

/* 导出字幕的三选一 */
.ct-sub { display: flex; flex-direction: column; gap: 8px; }
.ct-sub-tip { margin: 0 0 2px; font-size: 12px; line-height: 1.75; color: var(--text2); }
.ct-sub .btn { justify-content: flex-start; }

@media (max-width: 760px) {
  .ct-tr .ct-tr-txt { min-height: 220px; }
}

/* ================= 手机端触控目标（2026-11-12 全站扫描后补） =================
   mobile-audit.js 扫了 22 个页面，横向溢出全为 0，问题只剩一类：
   按钮太小。.ext-mini 是 28px（量到 30），.ext-seg-btn 31px，
   手指点上去要试第二次。这两个是全站通用类，改一处，8 个模块一起好。
   阈值取 40：Apple 建议 44、本项目历来用 40（笔记返回键、绩效齿轮都是 40）。 */
@media (max-width: 767px) {
  .ext-mini { min-height: 40px; }
  .ext-seg-btn { min-height: 40px; padding: 6px 14px; }
  /* 卡片标题栏右侧的「全部 →」：有边框 = 是个按钮，28px 点不中 */
  .ov-link { min-height: 40px; padding: 3px 10px; }
  /* 首页月份左右切换箭头 28×28：图标按钮同样要够大 */
  .ov-icon-btn { width: 40px; height: 40px; font-size: 12px; }
}

/* 有数据场景才暴露的一批小控件（2026-11-12 seed 数据后扫出来）
   空态扫描永远看不到它们，因为勾选框、计时按钮、行内操作都要有数据才渲染。 */
@media (max-width: 767px) {
  /* 勾选框：待办完成的核心操作，22px 手指点不中 */
  .ov-check, .checkbox { width: 32px; height: 32px; font-size: 13px; }
  /* 行内「计时」按钮：高度到 40 了，但宽度只有 31（"计时"两个字太窄）→ 给个下限 */
  .fbtn { min-height: 40px; min-width: 48px; padding: 3px 12px; justify-content: center; }
  /* 计数习惯的 +/− 按钮 */
  .ov-count-btn { width: 32px; height: 32px; }
  /* 笔记卡片右上角操作按钮（悬浮才出现的那组） */
  .nb-note .nb-act { width: 34px; height: 34px; }
}

/* 账号平台小徽标（2026-11-13）：7 个号跨抖音/快手，光看名字分不出来 */
.ct-prod-pf {
  display: inline-block; margin-left: 4px; padding: 0 4px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  font-size: 9.5px; font-weight: 800; font-style: normal;
  color: var(--ink); background: var(--card); vertical-align: 1px;
}
.ct-prod-pf.is-ks { background: var(--yellow); }

/* 预算节奏提示（2026-11-14）：把「还剩 320」翻译成「每天能花 24」
   参考 Actual 的信封预算 —— 数字要能指导明天的动作才有用。 */
.fin-budget-pace {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 2px; padding: 7px 10px;
  border: 2px solid var(--ink); border-radius: 8px;
  background: color-mix(in srgb, var(--green) 14%, var(--card));
  font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.fin-budget-pace b { font-weight: 900; }
.fin-budget-pace em {
  font-style: normal; font-size: 11.5px; font-weight: 800;
  padding: 1px 6px; border-radius: 4px;
  background: var(--card); border: 1.5px solid var(--ink);
}
/* 花得比时间快：换成警示色，但不喊「超支」——还没超，只是节奏偏了 */
.fin-budget-pace.is-ahead {
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
}
.fin-budget-pace i { opacity: .75; }

/* ================= 比上月（2026-11-14） =================
   一行三列：分类名 / 上月→本月 / 涨跌徽标。差值放最右。
   国内习惯：支出涨=红，支出跌=绿（收入反过来，由 JS 传 invert 控制）。 */
.fin-cmp-total {
  display: grid; gap: 6px; padding: 4px 0 10px;
  border-bottom: 2px dashed var(--ds-hair, rgba(17,17,17,.12));
  margin-bottom: 8px;
}
.fin-cmp-sub {
  font-size: 11px; font-weight: 800; color: var(--text2);
  letter-spacing: .3px; margin: 2px 0 6px;
}
.fin-cmp-list { display: grid; gap: 4px; }
.fin-cmp-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 2px; font-size: 12.5px;
}
.fin-cmp-name {
  flex: 0 0 84px; font-weight: 800; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fin-cmp-num { flex: 1 1 auto; color: var(--text2); font-weight: 600; min-width: 0; }
.fin-cmp-num i { font-style: normal; opacity: .5; margin: 0 3px; }
.fin-cmp-num b { color: var(--ink); font-weight: 800; }
.fin-cmp-badge {
  flex: 0 0 auto; font-style: normal; font-weight: 800; font-size: 11px;
  padding: 1px 6px; border-radius: 4px; border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; gap: 3px;
}
.fin-cmp-badge.is-bad  { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.fin-cmp-badge.is-good { background: color-mix(in srgb, var(--green) 26%, var(--card)); }
.fin-cmp-badge.is-flat,
.fin-cmp-badge.is-new  { background: var(--card); color: var(--text2); }
.fin-cmp-diff {
  flex: 0 0 76px; text-align: right; font-weight: 800; font-size: 12px;
  color: var(--text2);
}
.fin-cmp-diff.is-up { color: var(--accent); }
.fin-cmp-diff.is-down { color: var(--green-text, #0a8f6c); }
.fin-cmp-empty {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 4px; font-size: 12.5px; color: var(--text2); font-weight: 600;
}
.fin-cmp-empty i { opacity: .55; }

@media (max-width: 767px) {
  .fin-cmp-name { flex-basis: 66px; }
  .fin-cmp-num { font-size: 12px; }
  .fin-cmp-diff { flex-basis: 64px; font-size: 11.5px; }
}

/* 对账弹窗（2026-11-14）：三个数字一行一个，差额实时变色 */
.fin-rec { display: grid; gap: 10px; }
.fin-rec-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px;
}
.fin-rec-row > span { color: var(--text2); font-weight: 700; flex: 0 0 auto; }
.fin-rec-row > b { font-size: 15px; font-weight: 900; }
.fin-rec-row > input { flex: 1 1 auto; max-width: 220px; text-align: right; }
.fin-rec-diff { color: var(--text2); }
.fin-rec-diff.is-up { color: var(--accent); }
.fin-rec-diff.is-down { color: var(--green-text, #0a8f6c); }

/* 分类级「每天可花」（2026-11-14）：跟在 剩余/超支 后面，别抢主信息的视线 */
.fin-budget-daily {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 6px; padding: 1px 6px;
  border: 1.5px solid var(--ds-hair, rgba(17,17,17,.16));
  border-radius: 4px; font-size: 10.5px; font-weight: 800;
  color: var(--text2); background: var(--card);
}
.fin-budget-daily i { font-size: 9px; opacity: .7; }

/* 待办「项目 / 领域」筛选折叠（2026-11-14）
   占一整行却用得最少，收起来给列表腾首屏空间。
   用原生 <details>：不写 JS，键盘和读屏也天然可用。 */
.todo-more-filter {
  margin-bottom: 10px; border: 2px solid var(--ds-hair, rgba(17,17,17,.14));
  border-radius: 8px; background: var(--card);
}
.todo-more-filter > summary {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; cursor: pointer; list-style: none;
  font-size: 12px; font-weight: 800; color: var(--text2);
  min-height: 36px;
}
.todo-more-filter > summary::-webkit-details-marker { display: none; }
.todo-more-filter > summary::after {
  content: '▾'; margin-left: auto; font-size: 10px; opacity: .6;
  transition: transform .15s;
}
.todo-more-filter[open] > summary::after { transform: rotate(180deg); }
.todo-more-filter > div { padding: 0 10px 10px; }
.todo-more-on {
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: var(--yellow); color: var(--ink); font-weight: 900;
}

/* 待办添加栏：手机上第一行必须只有「输入 + 分类 + 添加」一条线
   原因见 todos.js 里 2026-11-14 的注释：日期挤进去后整栏 430px，首屏看不到待办。 */
@media (max-width: 767px) {
  /* 注意：style.css 的手机断点把 .todo-add-row 设成了 column（控件各占一行）。
     这里必须把方向改回 row，只写 flex-wrap 是没用的 —— 第一版就漏了这句。 */
  .todo-add-row { flex-direction: row; flex-wrap: nowrap; gap: 6px; align-items: center; }
  .todo-add-row #todo-input { min-width: 0; }
  .todo-add-row .todo-cat-sel { flex: 0 0 72px; width: 72px; max-width: 72px; }
  .todo-add-row #todo-add { flex: 0 0 auto; padding: 0 12px; }
  /* 「更多选项」展开后改回纵向：优先级/项目/日期三个控件横排放不下 */
  .todo-add-row.todo-add-extra { flex-direction: column; flex-wrap: wrap; align-items: stretch; }
}

/* 「更多选项」按钮做轻：它现在只在手机上单独占一行，做成无边框小字，不抢视线 */
@media (max-width: 767px) {
  .todo-add-more { display: flex; justify-content: flex-end; margin-top: 2px; }
  .todo-add-more .chip {
    min-height: 32px; padding: 0 8px; font-size: 11px;
    border-color: transparent; background: transparent; color: var(--text2);
  }
  .todo-add-more .chip:hover { border-color: var(--ink); background: var(--yellow); }
}

/* ================= 笔记正文：向飞书文档的阅读版式看齐（2026-11-14） =================
   对照截图发现的差距：飞书是 720px 窄栏居中、行距 1.6-1.7、列表缩进明显；
   工作台是铺满整宽、行高 1.8，长句一行拉太远，眼睛回扫累。
   用 padding 把内容挤到中间而不是给 .ql-editor 设 max-width ——
   后者会让滚动条贴在 820px 处，而不是窗口右边。 */
.nb-quill-body .ql-editor {
  line-height: 1.62;
  /* 780 → 740：飞书正文约 720，两边留白比"铺满"好读；编辑区不够宽时退回 24 内边距 */
  padding-left: max(24px, calc((100% - 740px) / 2));
  padding-right: max(24px, calc((100% - 740px) / 2));
}
.nb-quill-body .ql-editor p { margin: 0 0 5px; }
/* 列表：飞书的序号/圆点离正文有 26px，比 Quill 默认的 16px 松 */
.nb-quill-body .ql-editor ol,
.nb-quill-body .ql-editor ul { padding-left: 24px; margin: 2px 0 6px; }
.nb-quill-body .ql-editor li { margin: 1px 0; }
/* 分隔线：飞书是淡灰细线，这里的 2px 纯黑太重，把整篇切得七零八落 */
.nb-quill-body .ql-editor hr {
  border-top: 1px solid var(--ds-hair, rgba(17,17,17,.18));
  margin: 18px 0;
}

/* ---------- 折叠（飞书的 P0/P1 可收起，这里补上） ----------
   Quill 的 contenteditable 里不能直接插按钮（保存取的是 root.innerHTML，
   按钮会被写进笔记内容）。所以用一层独立的覆盖层，只放按钮不碰正文。 */
.nb-quill-body .ql-container { position: relative; }
.nb-fold-layer {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 5; overflow: hidden;
}
.nb-fold-btn {
  position: absolute; left: 1px; width: 20px; height: 20px;
  display: grid; place-items: center;
  border: 0; border-radius: 5px; padding: 0;
  background: transparent; color: var(--text2);
  font-size: 11px; line-height: 1; cursor: pointer;
  pointer-events: auto; opacity: .45; transition: opacity .12s, background .12s;
}
/* 常显淡一点而不是 hover 才出现：藏在 hover 里等于没有这个功能 */
.nb-quill-body:hover .nb-fold-btn,
.nb-fold-btn:focus-visible { opacity: .8; }
.nb-fold-btn:hover { opacity: 1; background: var(--yellow); color: var(--ink); }
/* 收起态要一眼看得出来：实心黄底 + 黑边，光靠箭头颜色太弱 */
.nb-fold-btn.is-collapsed {
  opacity: 1; background: var(--yellow); color: var(--ink);
  border: 1.5px solid var(--ink);
}
/* 被折叠的块：只影响当前视图，不写回内容。
   用 data 属性而不是 class —— 保存走的是 root.innerHTML，class 会被一起存进去，
   下次打开那几块就永久消失了。属性在保存前用正则剥掉，代价最小。 */
.nb-quill-body .ql-editor [data-nbfold="1"] { display: none !important; }
/* 条数不放 ::after：绝对定位的标签不知道该让多宽，必然压到标题上。
   收起态的提示交给按钮本体（黄底黑边）+ title（悬停显示「已收起 N 块」）。 */

/* 引用块：原来写死 background:#fffbe8，深色主题下是一块亮斑（同类问题修过一次）。
   同时去掉斜体 —— 中文斜体只是把字压歪，可读性反而下降。 */
.nb-quill-body .ql-editor blockquote {
  border-left: 3px solid var(--ink);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--yellow) 20%, var(--card));
  font-style: normal;
}

/* 手机上折叠按钮放大到 26：20px 手指点不中（体检阈值 32，这里让按钮 + 左侧留白一起算） */
@media (max-width: 767px) {
  .nb-fold-btn { width: 26px; height: 26px; font-size: 12px; left: -2px; }
}

/* ================= 左栏树里的「笔记」行（2026-11-14） =================
   飞书的目录同时列文件夹和笔记，笔记就在所属文件夹下面。
   工作台原来只有文件夹，选中后还得去中栏找；中栏一收起就完全看不到笔记在哪。 */
.nb-tree-note { cursor: pointer; }
.nb-tree-note .nb-tree-icon { opacity: .6; font-size: 11px; }
.nb-tree-note .nb-tree-name { font-weight: 600; }
.nb-tree-note.active .nb-tree-name { font-weight: 800; }
.nb-tree-note:hover { background: color-mix(in srgb, var(--yellow) 26%, transparent); }
/* 月份行里的箭头要和文件夹行一样窄，否则「11 月」会比「日记」右移一截 */
.nb-time-row .nb-tree-arrow { flex: 0 0 14px; }

/* ================= 文件夹页面（2026-11-14） =================
   对齐飞书 wiki：「页面即容器」——点一个节点，右边打开它自己的正文，
   它下面才是子页。这里复用笔记编辑器，只是把"笔记专属"的操作藏起来。 */
.nb-folder-page-icon {
  font-size: 18px; line-height: 1; flex: 0 0 auto;
  margin-right: 2px;
}
/* 收藏 / 置顶 / 移动到文件夹 / 更多菜单（历史版本、模板、图谱、加密…）
   都是"笔记"独有的，文件夹页面上藏掉，避免点了报错或语义混乱 */
.nb-editor.is-folder-page .nb-folder-select,
.nb-editor.is-folder-page #nb-pin,
.nb-editor.is-folder-page #nb-fav,
.nb-editor.is-folder-page #nb-mode-btn,
.nb-editor.is-folder-page .nb-more { display: none !important; }
/* 文件夹页面的标题比笔记标题短（最多 30 字），字号给得大一点 */
.nb-editor.is-folder-page .nb-doc-title { font-size: 24px; }

/* 左栏的 emoji 图标：和原来的文件夹图标同宽，缩进才对得齐 */
.nb-tree-emoji {
  flex: 0 0 14px; width: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}

/* ================= 文档头：标题在正文里，不在工具栏上（2026-11-14） =================
   飞书那种"页面感"主要来自这里：打开一篇文档，最上面是 26px 的标题 + 一行小字，
   然后是正文；而不是"一行工具栏 + 一个藏在按钮中间的小输入框"。 */
.nb-doc-head {
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px 24px 4px;
}
.nb-doc-title {
  width: 100%; border: 0; outline: 0; padding: 0;
  background: transparent; color: var(--ink);
  font-family: inherit; font-size: 26px; font-weight: 800; line-height: 1.32;
}
.nb-doc-title::placeholder { color: #a8a896; opacity: .8; }
.nb-doc-meta {
  font-size: 11.5px; font-weight: 600; color: var(--text2);
  letter-spacing: .2px; min-height: 15px;
}
/* 标题搬走后工具栏只剩按钮，让它贴右；返回键仍靠左 */
.nb-editor-topbar { justify-content: flex-end; }
.nb-editor-topbar .nb-back { margin-right: auto; }
.nb-editor-topbar .nb-folder-select { margin-right: auto; }

@media (max-width: 767px) {
  .nb-doc-head { padding: 12px 14px 2px; }
  .nb-doc-title { font-size: 21px; }
}

/* ================= 收入目标的统计口径（2026-11-14） =================
   工资一入账目标就超额完成，目标就失去意义了。
   所以卡片上必须写清"这个数是按哪些收入算的"，否则用户会以为算错了。 */
.fin-goal-scope {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 8px 0 2px; padding: 7px 10px;
  border: 2px solid var(--ink); border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.fin-goal-scope > i { opacity: .6; font-size: 11px; }
.fin-goal-scope em {
  font-style: normal; font-size: 11px; font-weight: 700;
  color: var(--text2); margin-left: auto;
}
.fin-link-btn {
  border: 0; background: transparent; padding: 0 2px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 800;
  color: var(--primary); text-decoration: underline; text-underline-offset: 2px;
}
.fin-link-btn:hover { color: var(--ink); }

.fin-scope-list { display: grid; gap: 6px; }
.fin-scope-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; cursor: pointer;
  border: 2px solid var(--ds-hair, rgba(17,17,17,.14)); border-radius: 8px;
  font-size: 13px; font-weight: 700;
}
.fin-scope-item:hover { border-color: var(--ink); background: color-mix(in srgb, var(--yellow) 18%, transparent); }
.fin-scope-item input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ================= 量化版 KR（2026-11-14） =================
   OKR 里 KR 是"怎么算到了"，只给勾选框等于没量化。
   量化后目标进度 = 各 KR 达成率平均，比"项目进度平均"可信。 */
.gl-kr-hint {
  font-style: normal; font-size: 10.5px; font-weight: 600;
  color: var(--text2); margin-left: 6px;
}
.gl-kr-num { display: block !important; cursor: default; }
.gl-kr-num .gl-kr-text { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.gl-kr-line { display: flex; align-items: center; gap: 8px; }
.gl-kr-bar {
  flex: 1 1 auto; min-width: 40px; height: 6px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  background: var(--card); overflow: hidden;
}
.gl-kr-bar > i { display: block; height: 100%; background: var(--green); transition: width .18s; }
.gl-kr-val {
  flex: 0 0 auto; padding: 1px 6px; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 5px;
  background: var(--card); color: var(--ink);
  font: inherit; font-size: 11.5px; font-weight: 800; white-space: nowrap;
}
.gl-kr-val:hover { background: var(--yellow); }
.gl-kr-pct { flex: 0 0 36px; text-align: right; font-size: 11.5px; font-weight: 800; color: var(--text2); }

/* 停滞提示（2026-11-14）：目标定完没人管，不吭声就一直躺着。
   左栏一个小蜘蛛图标（细），详情页一个徽标（粗）。 */
.gl-stale-dot {
  flex: 0 0 auto; font-size: 10px; color: var(--text2);
  opacity: .55; margin: 0 2px;
}
.gl-stale-dot:hover { opacity: 1; color: var(--accent); }
.gl-badge-stale {
  background: color-mix(in srgb, var(--accent) 18%, var(--card)) !important;
  border-color: var(--accent) !important;
  color: var(--ink) !important;
}
