/* ==========================================================================
   待办清单 · Web/PWA 基座样式（T3.1）
   配色系统：暖纸底 + 墨蓝主色 + 状态色（无紫渐变）
   ========================================================================== */
:root {
  /* 底色层：暖纸 */
  --bg: #f5f0e6;
  --surface: #fffdf8;
  --surface-2: #f8f3e9;
  --line: #e2d9c8;
  --line-soft: #ece4d4;

  /* 墨蓝主色 */
  --ink: #22303f;
  --ink-2: #4a5a6a;
  --primary: #23415c;
  --primary-soft: #38607f;
  --primary-bg: #e7eef4;

  /* 状态色 */
  --ok: #4a7c59;
  --warn: #b07d2e;
  --danger: #b23b2e;
  --overdue: #a33327;
  --info: #3a6d9e;

  /* 优先级 1高/2中/3低/4无 */
  --p1: #b23b2e; --p2: #b07d2e; --p3: #3a6d9e; --p4: #8b8577;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(45, 38, 25, .06), 0 4px 14px rgba(45, 38, 25, .08);
  --shadow-lg: 0 8px 30px rgba(35, 28, 16, .18);
  --font: system-ui, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --sidebar-w: 248px;
  --detail-w: 348px;
}

* { box-sizing: border-box; }
/* 兜底：凡带 display 规则的类都会盖掉 UA 的 [hidden]{display:none}，全局强制还原 */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary-soft); outline-offset: 1px;
}
a { color: var(--primary); }

/* ---------- 布局：≥1024 三栏 ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) 0;
  height: 100dvh;
  overflow: hidden;
}
.layout.detail-open { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--detail-w); }

.sidebar {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  padding: 14px 10px 10px;
  overflow-y: auto;
}
.scrim { position: fixed; inset: 0; background: rgba(32, 26, 14, .38); z-index: 40; }

.main-col { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.main { flex: 1; overflow-y: auto; padding: 14px 18px 26px; }
.detail {
  border-left: 1px solid var(--line);
  background: var(--surface);
  overflow-y: auto;
  min-width: 0;
}

/* ---------- 侧边 ---------- */
.sidebar-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--primary);
  padding: 2px 8px 12px;
}
.brand-ico { width: 22px; height: 22px; }
.nav-block { margin-bottom: 10px; }
.nav-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-2); letter-spacing: .08em;
  padding: 6px 10px 4px; user-select: none;
}
.mini {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  width: 22px; height: 22px; border-radius: 6px; font-size: 14px; line-height: 1;
}
.mini:hover { color: var(--primary); border-color: var(--primary-soft); }
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; margin: 1px 0; border: 0; border-radius: 8px;
  background: none; color: var(--ink); text-align: left; font-size: 14px;
  min-height: 38px;
}
.nav-item svg { width: 17px; height: 17px; flex: none; color: var(--ink-2); }
.nav-item .cnt { margin-left: auto; font-size: 12px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 99px; padding: 0 7px; }
.nav-item:hover { background: var(--surface); }
.nav-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.nav-item.active svg { color: var(--primary); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin: 0 4px; }

/* 完成热力图（T9.10，侧栏）：7 行（周一..周日）× 按周列排布 */
.heatmap { padding: 2px 6px 0; min-width: 0; }
.hm-sum { font-size: 11px; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .02em; }
.hm-grid {
  display: grid;
  grid-template-rows: repeat(7, 13px);
  grid-auto-flow: column;
  grid-auto-columns: 13px;
  gap: 2px;
  max-width: 100%;
}
.hm-c { border-radius: 3px; background: #f3ece0; box-shadow: inset 0 0 0 1px rgba(32, 26, 14, .06); }
.hm-c.l1 { background: #d7e6d2; }
.hm-c.l2 { background: #a9cdb0; }
.hm-c.l3 { background: #6ba377; }
.hm-c.l4 { background: #3f7350; }
.hm-c.today { box-shadow: inset 0 0 0 1.5px var(--primary); }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 3px 10px; font-size: 12px; color: var(--ink-2);
}
.chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.sidebar-foot {
  margin-top: auto; padding: 10px 8px 2px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; font-size: 13px;
}
.sidebar-foot .who { color: var(--ink-2); padding: 2px 6px; word-break: break-all; }
.link-btn { border: 0; background: none; color: var(--primary); padding: 5px 6px; text-align: left; border-radius: 6px; font-size: 13px; }
.link-btn:hover { background: var(--primary-bg); }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.view-title { font-size: 17px; margin: 0; font-weight: 700; color: var(--primary); white-space: nowrap; }
.icon-btn {
  border: 1px solid transparent; background: none; border-radius: 8px;
  width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink-2); flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--primary); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.on { color: var(--primary); background: var(--primary-bg); }
#btn-menu { display: none; }
.searchbox {
  flex: 1; max-width: 420px; margin-left: auto; display: flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px;
}
.searchbox svg { width: 15px; height: 15px; color: var(--ink-2); flex: none; }
.searchbox input { border: 0; background: none; width: 100%; padding: 4px 0; }
.searchbox input:focus { outline: none; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.filter-bar select, .filter-bar input { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--surface); }
.ghost { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 4px 10px; color: var(--ink-2); }
.ghost:hover { color: var(--primary); border-color: var(--primary-soft); }

/* ---------- 快速添加 ---------- */
.quickadd { display: flex; gap: 8px; margin: 2px 0 14px; }
.quickadd input {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; background: var(--surface); min-height: 42px;
}
.quickadd input::placeholder { color: #a49a86; }
.btn-primary {
  border: 0; border-radius: var(--radius); background: var(--primary); color: #fdfbf6;
  padding: 0 18px; font-weight: 600; min-height: 42px;
}
.btn-primary:hover { background: var(--primary-soft); }
.hint { font-size: 12px; color: var(--ink-2); margin: -8px 0 12px; }

/* ---------- 待办行 ---------- */
.group-title {
  font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .1em;
  margin: 14px 2px 6px; display: flex; align-items: center; gap: 8px;
}
.group-title .n { font-weight: 400; }
.group-title.overdue { color: var(--overdue); }
.todo-list { display: flex; flex-direction: column; gap: 6px; }
.todo {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer;
}
.todo:hover { border-color: var(--line); }
.todo.sel { border-color: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-bg), var(--shadow); }
.todo.done-row .t-title { color: var(--ink-2); text-decoration: line-through; }
.pri-bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--p4); flex: none; }
.todo.p1 .pri-bar { background: var(--p1); }
.todo.p2 .pri-bar { background: var(--p2); }
.todo.p3 .pri-bar { background: var(--p3); }
.chk {
  flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--ink-2); background: var(--surface); display: grid; place-items: center;
  color: transparent; font-size: 12px; padding: 0;
}
.chk:hover { border-color: var(--ok); color: var(--ok); }
.chk.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.t-body { flex: 1; min-width: 0; }
.t-title { font-size: 14px; line-height: 1.45; word-break: break-word; margin: 0; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 5px; font-size: 12px; color: var(--ink-2); align-items: center; }
.t-meta .tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 1px 8px; border: 1px solid var(--line-soft); background: var(--surface-2); }
.t-meta .tdot { width: 7px; height: 7px; border-radius: 50%; }
.t-meta .due.over { color: var(--overdue); font-weight: 600; }
.t-meta .sub { display: inline-flex; align-items: center; gap: 4px; }
.t-meta .rep { display: inline-flex; align-items: center; }
.t-meta svg { width: 13px; height: 13px; }
.t-edit {
  width: 100%; border: 1px solid var(--primary-soft); border-radius: 6px;
  padding: 6px 8px; background: var(--surface); font-size: 14px;
}
.todo .edit-btn { opacity: 0; width: 30px; height: 30px; align-self: center; flex: none; }
.todo:hover .edit-btn, .todo:focus-within .edit-btn { opacity: 1; }
@media (max-width: 767px) { .todo .edit-btn { opacity: .7; } }
.empty { color: var(--ink-2); text-align: center; padding: 40px 12px; font-size: 13px; }
.list-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }

/* ---------- 详情面板 ---------- */
.detail-inner { padding: 14px 16px 30px; display: flex; flex-direction: column; gap: 14px; }
.detail-head { display: flex; align-items: center; justify-content: space-between; }
.detail-head h2 { font-size: 15px; margin: 0; color: var(--primary); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--ink-2); font-weight: 600; letter-spacing: .05em; }
.field input[type=text], .field input[type=datetime-local], .field input[type=number],
.field select, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 8px 10px; width: 100%; min-width: 0;
}
.field textarea { min-height: 76px; resize: vertical; }
/* 1fr 默认 min-width:auto，datetime-local 固有宽度会撑爆 348px 详情栏出横向滚动条 */
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.row-stack { display: flex; flex-direction: column; gap: 14px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger { border: 1px solid var(--danger); color: var(--danger); background: var(--surface); border-radius: 8px; padding: 7px 12px; }
.btn-danger:hover { background: #fbeae7; }
.btn-soft { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 12px; color: var(--ink); }
.btn-soft:hover { border-color: var(--primary-soft); color: var(--primary); }
.sub-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); }
.sub-row .chk { width: 17px; height: 17px; margin: 0; }
.sub-row .st { flex: 1; min-width: 0; font-size: 13px; word-break: break-word; }
.sub-row.done .st { color: var(--ink-2); text-decoration: line-through; }
.sub-row .x { border: 0; background: none; color: var(--ink-2); font-size: 15px; padding: 2px 6px; }
.sub-row .x:hover { color: var(--danger); }
.sub-add { display: flex; gap: 6px; margin-top: 8px; }
.sub-add input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface); }
.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-edit .chip { cursor: pointer; }
.rep-custom { display: flex; gap: 6px; align-items: center; }
.rep-custom input { width: 64px; }
.rep-custom input[type=text] { width: 140px; } /* 每月多日/L 列表与占位文案更宽 */
.rep-hint { font-size: 12px; color: var(--ink-2); padding: 4px 0; }
.dirty-note, .save-note { font-size: 12px; color: var(--ok); }
.save-err { font-size: 12px; color: var(--danger); }

/* ---------- 底部 tabbar（<768） ---------- */
.tabbar { display: none; }

/* ---------- 通知气泡 ---------- */
.notify {
  position: fixed; top: 12px; right: 12px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 24px));
}
.note-card {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 10px 12px;
  animation: slidein .18s ease-out;
}
.note-card.err { border-left-color: var(--danger); }
.note-card.info { border-left-color: var(--info); }
.note-card .nt { font-weight: 600; margin-bottom: 3px; word-break: break-word; }
.note-card .nb { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.note-card .btns { display: flex; gap: 8px; justify-content: flex-end; }
@keyframes slidein { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 撤销条 ---------- */
.undo-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 70;
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #f3efe6; border-radius: 99px; padding: 9px 16px;
  box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); font-size: 13px;
}
.undo-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#undo-btn { border: 0; background: #d8c9a3; color: var(--ink); border-radius: 99px; padding: 4px 14px; font-weight: 600; }
#undo-close { border: 0; background: none; color: #cfd6dd; font-size: 15px; }
body.tab-mode .undo-bar { bottom: 70px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(32, 26, 14, .42); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: min(460px, 100%); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  max-height: 86dvh; overflow-y: auto;
}
.modal h3 { margin: 0; font-size: 16px; color: var(--primary); }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; }
.token-plain {
  font-family: ui-monospace, Consolas, monospace; font-size: 13px; word-break: break-all;
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: 8px; padding: 10px;
}

/* ---------- 账号 / 令牌页 ---------- */
/* ---------- 登录 / 注册：信笺活字风（左品牌页 + 右表单页） ---------- */
/* 未登录收起应用框架，auth 全屏定稿（body.auth-mode 由 app.js renderMain 挂/摘） */
body.auth-mode .sidebar, body.auth-mode .topbar, body.auth-mode .tabbar,
body.auth-mode #filter-bar, body.auth-mode #undo-bar, body.auth-mode #detail { display: none; }
body.auth-mode .layout { grid-template-columns: minmax(0, 1fr); }
body.auth-mode .main { padding: 0; display: flex; }

.auth-wrap {
  flex: 1; min-height: 100dvh; display: grid; place-items: center; padding: 26px 18px;
  background: radial-gradient(1100px 480px at 84% -12%, #ece1cb 0%, transparent 62%), var(--bg);
}
.auth-card {
  width: min(940px, 100%); display: grid; grid-template-columns: 1.05fr .95fr;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg);
}
/* 左：墨蓝品牌页 */
.auth-hero {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  padding: 44px 38px 34px; color: #eef3f7; overflow: hidden;
  background: linear-gradient(168deg, #1b334b 0%, var(--primary) 56%, #2d5273 100%);
}
.auth-hero::before { /* 细斜纹纸理 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 7px);
}
.auth-hero .hero-mark {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--danger); box-shadow: 0 5px 16px rgba(178, 59, 46, .5);
}
.auth-hero .hero-mark svg { width: 27px; height: 27px; color: #fff; }
.auth-hero h2 {
  font-family: Georgia, "Songti SC", "Noto Serif SC", "SimSun", serif;
  font-size: 29px; line-height: 1.42; font-weight: 700; letter-spacing: .01em;
  margin: 8px 0 0; white-space: pre-line;
}
.auth-hero .hero-sub { color: #b9c9d8; font-size: 13.5px; line-height: 1.95; margin: 0; }
.auth-hero .hero-feats { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 13px; color: #d7e1ea; line-height: 1.7; }
.auth-hero .hero-feats li { display: flex; gap: 10px; align-items: baseline; }
.auth-hero .hero-feats li::before { content: "✓"; color: #d98f83; font-weight: 700; }
.auth-hero .hero-feats b { color: #fff; font-weight: 600; }
.auth-seal { /* 朱砂压角印 */
  position: absolute; right: 18px; bottom: 16px; width: 92px; height: 92px; border-radius: 50%;
  border: 3px solid rgba(178, 59, 46, .75); display: grid; place-items: center;
  color: rgba(217, 143, 131, .95); font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 15px; letter-spacing: .3em; text-indent: .3em; transform: rotate(-14deg);
  pointer-events: none;
}
/* 右：表单页 */
.auth-pane { padding: 40px 42px 30px; display: flex; flex-direction: column; gap: 15px; }
.auth-kicker { font-size: 11px; letter-spacing: .32em; color: var(--warn); font-weight: 700; }
.auth-title {
  font-family: Georgia, "Songti SC", "Noto Serif SC", "SimSun", serif;
  font-size: 25px; color: var(--primary); margin: -8px 0 0;
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 3px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 11px; }
.auth-tabs button { border: 0; background: none; padding: 9px 0; border-radius: 8px; color: var(--ink-2); font-weight: 600; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.auth-tabs button.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(35, 65, 92, .35); }
.auth-err { display: none; font-size: 13px; color: var(--danger); background: #fbeae7; border: 1px solid #eccfca; border-radius: 9px; padding: 9px 12px; line-height: 1.6; }
.auth-err.on { display: block; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .field { display: flex; flex-direction: column; gap: 4px; }
.auth-form .field > label { font-size: 12px; color: var(--ink-2); font-weight: 600; letter-spacing: .05em; }
.auth-form input {
  border: 0; border-bottom: 1.5px solid var(--line); border-radius: 6px 6px 0 0;
  background: transparent; padding: 9px 5px; font-size: 15px; width: 100%; min-width: 0;
  transition: border-color .15s ease, background .15s ease;
}
.auth-form input:hover { background: var(--surface-2); }
.auth-form input:focus { outline: none; border-bottom-color: var(--primary); background: var(--primary-bg); }
.btn-auth {
  margin-top: 5px; border: 0; border-radius: 11px; padding: 13px; color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: .14em;
  background: linear-gradient(180deg, var(--primary-soft), var(--primary));
  box-shadow: 0 6px 16px rgba(35, 65, 92, .28);
  transition: transform .14s ease, box-shadow .14s ease;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(35, 65, 92, .34); }
.btn-auth:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(35, 65, 92, .3); }
.btn-auth[disabled] { opacity: .55; transform: none; }
.auth-note { font-size: 12px; color: var(--ink-2); line-height: 1.9; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto; }
.auth-note code { background: var(--primary-bg); border-radius: 4px; padding: 1px 6px; color: var(--primary); font-size: 12px; }
@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-hero { padding: 26px 26px 22px; }
  .auth-hero h2 { font-size: 21px; }
  .auth-hero .hero-feats, .auth-seal { display: none; }
  .auth-pane { padding: 26px 26px 24px; }
}
.tok-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tok-table th, .tok-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.tok-table th { color: var(--ink-2); font-size: 12px; }
.tok-form { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; margin-bottom: 14px; }
.tok-form .field { min-width: 150px; }
.scopes { display: flex; gap: 10px; }
.mono { font-family: ui-monospace, Consolas, monospace; }

/* ---------- 响应式：768–1024 抽屉侧栏 ---------- */
@media (max-width: 1023px) {
  .layout, .layout.detail-open { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 50;
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open .scrim { display: block; }
  #btn-menu { display: grid; }
  .detail {
    position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 92vw); z-index: 60;
    box-shadow: var(--shadow-lg); border-left: 1px solid var(--line);
  }
}
/* ---------- 响应式：<768 底部 tabbar ---------- */
@media (max-width: 767px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar button {
    flex: 1; border: 0; background: none; display: flex; flex-direction: column; gap: 2px;
    align-items: center; padding: 6px 2px; color: var(--ink-2); font-size: 11px; border-radius: 8px;
  }
  .tabbar button svg { width: 20px; height: 20px; }
  .tabbar button.active { color: var(--primary); font-weight: 600; }
  .main { padding: 10px 10px 84px; }
  .detail { width: 100%; }
  .view-title { font-size: 15px; }
  .searchbox { max-width: none; }
  .todo { padding: 12px; } /* 触摸友好 */
  .chk { width: 24px; height: 24px; }
  .nav-item { min-height: 42px; }
}

/* ---------- 日历视图（views/calendar.js，月/周网格 + 日面板） ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cal-seg button { padding: 5px 18px; background: var(--surface); border: 0; cursor: pointer; color: var(--ink-2); font: inherit; }
.cal-seg button.on { background: var(--primary); color: #f7f3ea; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-label { font-weight: 600; color: var(--ink); margin-left: 4px; }
.cal-acts { margin-left: auto; display: flex; gap: 8px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--ink-2); padding: 4px 0; }
.cal-cell {
  min-height: 76px; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 2px;
  align-items: stretch; cursor: pointer; overflow: hidden; text-align: left; font: inherit;
}
.cal-cell:hover { border-color: var(--primary-soft); }
.cal-cell.out { opacity: 0.45; background: var(--surface-2); }
.cal-cell.sel { outline: 2px solid var(--primary); outline-offset: -1px; }
.cal-cell .dnum { align-self: flex-start; font-size: 12px; line-height: 18px; min-width: 20px; text-align: center; border-radius: 999px; color: var(--ink); }
.cal-cell.today .dnum { background: var(--danger); color: #fff; }
.cal-cell .cal-lab {
  align-self: flex-start; font-size: 10px; line-height: 14px; max-width: 100%;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-2);
  padding: 0 4px; border-radius: 4px;
}
.cal-cell .cal-lab.cal-rest { color: #fff; background: var(--danger); }
.cal-cell .cal-lab.cal-work { color: #fff; background: var(--ink-2); }
.cal-ev {
  display: block; font-size: 11px; line-height: 1.45; padding: 1px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid var(--primary-soft); background: var(--primary-bg); border-radius: 0 4px 4px 0; cursor: pointer;
}
.cal-ev.done { opacity: 0.55; text-decoration: line-through; }
.cal-ev.rem { border-left-color: var(--ok); background: #eaf2ea; }
.cal-ev.allday { font-style: italic; }
.cmor { font-size: 11px; color: var(--ink-2); padding-left: 4px; }
.cnone { font-size: 12px; color: var(--line); padding-left: 4px; }
.cal-grid.week .cal-cell { min-height: 230px; }
.cal-warn { color: var(--danger); }

.cal-remote-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.cal-remote-row .rdot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.cal-remote-row .rt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cal-remote-row .rm { font-size: 12px; color: var(--ink-2); white-space: nowrap; }

.sub-item { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sub-item .sn { font-weight: 600; color: var(--ink); }
.sub-item .su { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-form .field input { width: 100%; }
.sub-list { max-height: 180px; overflow: auto; margin-bottom: 10px; }
.ghost.danger { color: var(--danger); }
.link-row { display: flex; gap: 8px; margin: 4px 0 12px; }
.link-row input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

@media (max-width: 767px) {
  .cal-acts { margin-left: 0; width: 100%; }
  .cal-cell { min-height: 56px; border-radius: 6px; }
  .cal-ev { font-size: 10px; }
}

/* ---------- 回收站（T9.6） ---------- */
.trash-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 30px; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; margin-bottom: 6px; }
.trash-row .tr-main { flex: 1; min-width: 0; }
.trash-row .tr-title { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-row .tr-meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.trash-row .tr-acts { flex: none; display: flex; gap: 8px; }
@media (max-width: 720px) {
  .trash-row { flex-direction: column; align-items: stretch; }
  .trash-row .tr-acts { justify-content: flex-end; }
}

/* ---------- 快速添加底部抽屉（views/quickadd-sheet.js，T9.7） ---------- */
.qa-mask {
  position: fixed; inset: 0; z-index: 80; background: rgba(34, 48, 63, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.qa-sheet {
  width: min(560px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg);
  padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 12px;
}
.qa-head { display: flex; align-items: center; justify-content: space-between; }
.qa-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.qa-close { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--ink-2); padding: 4px 10px; }
.qa-close:hover { color: var(--danger); }
.qa-row { display: flex; flex-direction: column; gap: 6px; }
.qa-label { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .05em; }
.qa-sheet input[type=text], .qa-sheet input[type=number], .qa-sheet input[type=datetime-local],
.qa-sheet select, .qa-sheet textarea {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 9px 12px; width: 100%; min-width: 0; color: var(--ink);
}
.qa-sheet textarea { min-height: 72px; resize: vertical; }
.qa-sheet input:disabled, .qa-sheet select:disabled { opacity: .5; background: var(--surface-2); }

/* 清单 chips：横滚不换行 */
.qa-chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.qa-chip {
  flex: none; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  padding: 7px 14px; font-size: 13px; color: var(--ink); white-space: nowrap;
}
.qa-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); font-weight: 600; }

/* 日期 pills + 自定义时刻 */
.qa-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qa-pills input[type=datetime-local] { flex: 1 1 170px; width: auto; min-width: 150px; }
.qa-pill {
  flex: none; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  padding: 7px 14px; font-size: 13px; color: var(--ink); white-space: nowrap;
}
.qa-pill.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); font-weight: 600; }

/* 提醒开关行 */
.qa-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.qa-switch input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }

/* 重复：select + 自定义间隔（值+单位） */
.qa-rep { display: flex; flex-direction: column; gap: 8px; }
.qa-rep-custom { display: flex; gap: 8px; align-items: center; }
.qa-rep-custom input[type=number] { flex: none; width: 96px; }
.qa-rep-custom select { flex: none; width: 96px; }

.qa-foot { display: flex; justify-content: flex-end; padding-top: 2px; }

/* 窄屏：抽屉占满宽、触控友好 */
@media (max-width: 720px) {
  .qa-sheet {
    width: 100%; max-height: 90vh;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  }
  .qa-chip, .qa-pill { min-height: 42px; padding: 10px 16px; }
  .qa-sheet input, .qa-sheet select, .qa-sheet textarea { min-height: 44px; }
  .qa-foot .btn-primary { width: 100%; min-height: 46px; }
}

/* ---------- 工作量角标（T9.8） ---------- */
.t-meta .eff { font-size: 11px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 0 7px; line-height: 17px; }
.t-meta .eff.e2 { color: #9a6b00; background: #fdf3d7; border-color: #f0dfa8; }
.t-meta .eff.e3 { color: var(--danger); background: #fbeae7; border-color: #ecc9c2; }

/* ---------- 数据复盘（views/review.js，T9.11 / M10-2） ---------- */
.review { min-width: 0; }
.rv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rv-pills { display: flex; gap: 6px; }
.rv-pill {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--ink-2);
}
.rv-pill.on { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.rv-nav { display: flex; align-items: center; gap: 6px; }
.rv-nav .icon-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; }
.rv-period { font-size: 12px; color: var(--ink-2); min-width: 108px; text-align: center; }
.rv-range { font-size: 12px; color: var(--ink-2); margin: 2px 0 10px; }
.rv-load { font-size: 12px; color: var(--ink-2); padding: 18px 2px; }
.rv-h { font-size: 13px; color: var(--ink); margin: 16px 0 8px; letter-spacing: .04em; }
.rv-sub { font-size: 12px; color: var(--ink-2); margin: 0 0 6px; font-weight: 600; }
.rv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.rv-card {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; min-width: 0;
}
.rv-k { font-size: 12px; color: var(--ink-2); }
.rv-v { font-size: 22px; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.rv-d { font-size: 11px; font-variant-numeric: tabular-nums; }
.rv-good { color: var(--ok); }
.rv-bad { color: var(--danger); }
.rv-flat { color: var(--ink-2); }
.rv-hint { font-size: 11px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.rv-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 6px; }
.rv-chart svg { display: block; width: 100%; height: 96px; }
.rv-c1 { stroke: var(--info); }
.rv-c2 { stroke: var(--ok); }
.rv-d2 { fill: var(--ok); }
.rv-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); padding-top: 2px; }
.rv-legend { color: var(--ink-2); }
.rv-dist { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rv-bars { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.rv-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 30px; align-items: center; gap: 8px; margin: 5px 0; }
.rv-lab { font-size: 12px; color: var(--ink-2); }
.rv-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rv-track i { display: block; height: 100%; background: var(--primary-soft); border-radius: 999px; }
.rv-num { font-size: 12px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.rv-note { font-size: 11px; color: var(--ink-2); margin: 14px 2px 0; line-height: 1.6; }
/* 番茄专注子块（views/review.js，M11-3）：窗口内无会话时整块保持 hidden（全局 [hidden] 兜底），不占位 */
.rv-pomo { margin-top: 10px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.rv-cards-pomo + .rv-hint { margin-top: 8px; }
@media (max-width: 767px) {
  .rv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-v { font-size: 19px; }
}

/* ---------- 番茄专注（views/focus.js，T9.12 / M11-2） ---------- */
.focus { max-width: 460px; margin: 0 auto; }
.f-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 16px; }
.f-ring { position: relative; width: 196px; height: 196px; margin: 2px auto 14px; }
.f-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.f-track { fill: none; stroke: var(--line-soft); stroke-width: 8; }
.f-bar { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.f-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.f-time { font-size: 40px; font-weight: 600; letter-spacing: 1px; color: var(--ink); font-variant-numeric: tabular-nums; }
.f-state { font-size: 12px; color: var(--ink-2); letter-spacing: .5px; }
.f-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.f-lab { flex: 0 0 46px; font-size: 12px; color: var(--ink-2); }
.f-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.f-pill { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.f-pill:hover { border-color: var(--primary-soft); color: var(--primary); }
.f-pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.f-sel { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 6px 8px; font-size: 13px; }
.f-btns { display: flex; gap: 10px; margin-top: 16px; }
.f-start { flex: 1; }
.f-btns .btn-soft { flex: 0 0 auto; }
.f-sum { margin: 12px 2px 0; font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.f-note { font-size: 11px; color: var(--ink-2); margin: 12px 2px 0; line-height: 1.7; }
/* 计时中：标题后跟一枚呼吸红点，切到别的视图也能一眼看出「还在专注」 */
#view-title.f-ticking::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--danger); animation: f-pulse 1.6s ease-in-out infinite; }
@keyframes f-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #view-title.f-ticking::after { animation: none; opacity: .8; } }
/* 专注记录（views/focus.js，T9.12 / M11-3）：摘要一行 + 最近若干条，可删误建会话 */
.f-rec { margin-top: 16px; }
.f-h { font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--ink); margin: 0 2px 8px; }
.f-sum2 { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin: 0 2px 10px; }
.f-hint { font-size: 12px; color: var(--ink-2); margin: 0 2px; }
.f-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 7px 9px; font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.f-when { flex: 0 0 auto; white-space: nowrap; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.f-tag { flex: 0 0 auto; padding: 1px 7px; font-size: 11px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.f-tag.f-ok { color: var(--ok); border-color: var(--ok); background: #eef4ee; }
.f-tag.f-bad { color: var(--warn); border-color: var(--warn); background: #f8f1e4; }
.f-tag.f-run { color: var(--danger); border-color: var(--danger); background: #f9eae7; }
.f-dur { flex: 0 0 auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.f-title { flex: 1; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-del { flex: 0 0 22px; height: 22px; font-size: 14px; line-height: 1; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.f-del:hover { color: var(--danger); border-color: var(--danger); }
@media (max-width: 767px) {
  .f-ring { width: 168px; height: 168px; }
  .f-time { font-size: 34px; }
  .f-btns { flex-direction: column-reverse; }
  .f-btns .btn-soft { width: 100%; }
  .f-del { flex-basis: 28px; width: 28px; height: 28px; } /* 窄屏触摸命中区 */
}

/* ---------- 帮助中心（views/help.js，M12-1 / T9.13）：纯静态 FAQ ---------- */
.help { max-width: 820px; min-width: 0; }
.h-head { margin: 2px 0 12px; }
.h-title { font-size: 16px; margin: 0 0 4px; color: var(--primary); }
.h-sub { font-size: 12px; color: var(--ink-2); margin: 0; line-height: 1.6; }
.h-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.h-search { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); padding: 8px 14px; font-size: 13px; }
.h-search:focus { border-color: var(--primary-soft); outline: none; }
.h-count { flex: 0 0 auto; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.h-groups { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.h-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.h-ghead { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: var(--surface-2); padding: 11px 14px; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink); }
.h-ghead:hover { background: var(--primary-bg); }
.h-chev { display: inline-block; font-size: 11px; color: var(--ink-2); transition: transform .18s ease; }
.h-chev.open { transform: rotate(180deg); }
.h-gtitle { flex: 1; min-width: 0; }
.h-gcnt { font-size: 11px; font-weight: 400; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 99px; padding: 0 8px; line-height: 18px; }
.h-gbody { padding: 4px 14px 12px; min-width: 0; }
.h-item { padding: 10px 0 12px; border-top: 1px dashed var(--line-soft); min-width: 0; scroll-margin-top: 12px; }
.h-item:first-child { border-top: 0; }
.h-q { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.h-q-text { min-width: 0; overflow-wrap: anywhere; }
.h-anchor { flex: 0 0 auto; font-size: 12px; color: var(--ink-2); text-decoration: none; opacity: 0; transition: opacity .15s; }
.h-item:hover .h-anchor, .h-anchor:focus-visible { opacity: 1; }
.h-a { min-width: 0; }
.h-p, .h-note { font-size: 12.5px; color: var(--ink); line-height: 1.75; margin: 6px 0; overflow-wrap: anywhere; }
.h-note { background: #f8f1e4; border-left: 3px solid var(--warn); border-radius: 6px; padding: 8px 10px; color: var(--ink-2); }
.h-ul { margin: 6px 0; padding-left: 20px; min-width: 0; }
.h-ul li { font-size: 12.5px; line-height: 1.75; color: var(--ink); margin: 3px 0; overflow-wrap: anywhere; }
/* 代码块：横向滚动包一层，pre 自身 min-width:0 防窄屏撑破布局 */
.h-codebox { position: relative; margin: 8px 0; min-width: 0; }
.h-codelab { font-size: 11px; color: var(--ink-2); margin-bottom: 4px; }
.h-pre { margin: 0; background: #22303f; color: #e9eef4; border-radius: 8px; padding: 10px 12px; font: 12px/1.7 ui-monospace, Consolas, monospace; overflow-x: auto; min-width: 0; max-width: 100%; }
.h-pre code { white-space: pre; }
.h-copy { position: absolute; top: 8px; right: 8px; border: 1px solid rgba(233, 238, 244, .35); background: rgba(34, 48, 63, .72); color: #e9eef4; border-radius: 6px; padding: 2px 9px; font-size: 11px; }
.h-copy:hover { background: rgba(56, 96, 127, .9); }
/* 有示例标签时，复制按钮下移到代码块本体顶部（不依赖 :has，老浏览器安全） */
.h-codelab ~ .h-copy { top: 26px; }
/* 端点速查表：外层横向滚动，430px 不产生整页横向溢出 */
.h-tablewrap { overflow-x: auto; max-width: 100%; min-width: 0; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; }
.h-table { border-collapse: collapse; font-size: 12px; min-width: 560px; }
.h-table th { text-align: left; background: var(--surface-2); color: var(--ink-2); font-weight: 600; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.h-table td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); color: var(--ink); line-height: 1.6; vertical-align: top; }
.h-table tr:last-child td { border-bottom: 0; }
.h-table td:first-child { white-space: nowrap; color: var(--primary); font-weight: 600; }
.h-limits { margin-top: 18px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.h-ltitle { font-size: 14px; margin: 0 0 4px; color: var(--ink); }
/* 深链定位闪烁（#/help/<锚点>） */
.h-flash { animation: h-flash-kf 1.4s ease; border-radius: 8px; }
@keyframes h-flash-kf { 0%, 60% { background: var(--primary-bg); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .h-flash { animation: none; background: var(--primary-bg); } .h-chev { transition: none; } }
@media (max-width: 767px) {
  .h-ghead { padding: 12px; }
  .h-gbody { padding: 2px 12px 10px; }
  .h-pre { font-size: 11px; }
}
