/* ============ 外壳布局 ============ */
.app-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 0 4px; cursor: pointer; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #8e7bf0 55%, var(--accent));
  color: #fff; font-size: 15px;
  box-shadow: 0 3px 10px var(--primary-ring);
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.brand-sub { font-size: 10px; color: var(--text-3); letter-spacing: .16em; margin-top: -3px; }

.topbar-book { display: flex; align-items: center; gap: 8px; min-width: 0; }
.book-switch {
  display: flex; align-items: center; gap: 8px;
  max-width: 260px; height: 34px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer;
  transition: all var(--t-fast);
}
.book-switch:hover { border-color: var(--primary); background: var(--primary-soft); }
.book-switch .t { font-size: 13px; font-weight: 600; }
.save-state { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; min-width: 62px; }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: none; }
.save-dot.saving { background: var(--warn); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.app-body { flex: 1; display: flex; min-height: 0; }

/* ============ 侧边栏 ============ */
.sidebar {
  width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: margin-left var(--t-mid);
  z-index: 20;
}
.sidebar.collapsed { margin-left: calc(-1 * var(--sidebar-w)); }
.side-nav { padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 11px;
  border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all var(--t-fast);
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-item .count { margin-left: auto; font-size: 11px; color: var(--text-3); }

.side-section { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.side-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--text-3);
  text-transform: uppercase;
}
.side-head .grow { font-weight: 600; }
.side-search { padding: 0 12px 8px; }
.side-search .input { height: 30px; padding: 0 10px; font-size: 12.5px; }

.chapter-tree { flex: 1; overflow-y: auto; padding: 0 8px 14px; }
.vol-group { margin-bottom: 3px; }
.vol-head {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 8px; border-radius: var(--r-xs);
  font-size: 12.5px; font-weight: 650; color: var(--text-2);
  cursor: pointer; user-select: none;
}
.vol-head:hover { background: var(--surface-3); }
.vol-caret { transition: transform var(--t-fast); font-size: 9px; color: var(--text-3); }
.vol-head.closed .vol-caret { transform: rotate(-90deg); }
.vol-head .vol-actions { margin-left: auto; display: flex; gap: 2px; opacity: 0; }
.vol-head:hover .vol-actions { opacity: 1; }
.vol-head .words { font-size: 11px; color: var(--text-3); font-weight: 500; margin-left: auto; }
.vol-head:hover .words { display: none; }
.vol-head:hover .vol-actions { display: flex; }

.ch-item {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 8px 0 8px; border-radius: var(--r-xs);
  font-size: 13px; color: var(--text-2); cursor: pointer;
  position: relative;
  transition: background var(--t-fast), color var(--t-fast);
}
.drag-handle {
  opacity: 0; flex: none; cursor: grab; font-size: 10px; line-height: 1;
  letter-spacing: -1px; color: var(--text-3); width: 8px; user-select: none;
}
.ch-item:hover .drag-handle { opacity: .8; }
.ch-item.dragging { opacity: .35; }
.ch-item:hover { background: var(--surface-3); color: var(--text); }
.ch-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.ch-item .idx {
  font-size: 10.5px; font-family: var(--font-mono); color: var(--text-3);
  min-width: 22px; flex: none;
}
.ch-item.active .idx { color: var(--primary); }
.ch-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-item .st { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--border-strong); }
.ch-item .st.draft { background: var(--warn); }
.ch-item .st.done { background: var(--success); }
.ch-item .menu { opacity: 0; flex: none; }
.ch-item:hover .menu { opacity: 1; }
.ch-menu { opacity: 0; flex: none; border: none; background: transparent; color: var(--text-3); cursor: pointer; width: 26px; height: 26px; border-radius: var(--r-xs); font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.ch-item:hover .ch-menu { opacity: 1; }
.ch-menu:active { background: var(--surface-3); }
.chapter-tree .empty { padding: 30px 12px; }
.chapter-tree .empty-icon { font-size: 28px; }

.side-foot { border-top: 1px solid var(--border); padding: 8px; display: flex; gap: 6px; align-items: center; }

/* ============ 主区 ============ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.view-scroll { overflow-y: auto; }
.page { padding: 22px 26px 40px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: .01em; }
.page-desc { font-size: 13px; color: var(--text-3); margin-top: 3px; }

/* ============ 作品库 ============ */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 18px; }
.book-card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow-sm);
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-ring); }
.book-card-top { display: flex; gap: 14px; align-items: flex-start; }
/* 封面按 3:4 竖版放大：书架的辨识度几乎全靠这几块颜色，
   52×70 在卡片里只占很小一角，扫视时抓不住 */
.book-cover {
  width: 64px; height: 86px; flex: none; border-radius: 8px;
  display: grid; place-items: center; font-size: 30px; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  position: relative; overflow: hidden;
}
.book-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,.28), transparent 55%);
}
.book-title { font-size: 15px; font-weight: 680; line-height: 1.35; }
.book-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.book-syn { margin-top: 11px; font-size: 12.5px; color: var(--text-3); line-height: 1.65; height: 41px; }
.book-stats { display: flex; gap: 14px; margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--border); }
.book-stat { display: flex; flex-direction: column; gap: 1px; }
.book-stat .v { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.book-stat .k { font-size: 10.5px; color: var(--text-3); }
.book-card .actions {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 3px;
  background: var(--surface); border-radius: var(--r-sm); padding: 3px;
  border: 1px solid var(--border);
  opacity: .6; transition: all var(--t-fast);
  z-index: 2;
}
.book-card:hover .actions { opacity: 1; box-shadow: var(--shadow-sm); }
.book-card [data-act="del"] { color: var(--danger); }
.book-card [data-act="del"]:hover { background: var(--danger-soft); }
.book-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 210px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg);
  color: var(--text-3); cursor: pointer; background: transparent;
  transition: all var(--t-mid);
}
.book-new:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.book-new .plus { font-size: 26px; line-height: 1; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  /* 纵向排布：让"今日码字"那格的进度条能贴到底边，四格看起来齐平 */
  display: flex; flex-direction: column;
}
.stat-box .k { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.stat-box .v { font-size: 22px; font-weight: 720; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -.01em; }
.stat-box .s { font-size: 11px; color: var(--text-3); margin-top: 2px; }
/* 今日目标进度条 —— 数字之外给一个一眼可见的完成度 */
.stat-bar {
  margin-top: 10px;
  height: 4px; border-radius: var(--r-full);
  background: var(--surface-3); overflow: hidden;
}
.stat-bar i {
  display: block; height: 100%; border-radius: var(--r-full);
  background: var(--primary); transition: width var(--t-mid);
}

/* 书架状态筛选 */
.lib-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.lib-filter .chip { padding-left: 8px; }
.lib-filter .chip b {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  background: var(--surface-3); border-radius: var(--r-full);
  padding: 0 6px; min-width: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.lib-filter .chip.active b { background: rgba(255,255,255,.22); color: #fff; }
/* 某一档为空时的兜底，避免"点了筛选结果一片空白"像是坏了 */
.lib-none {
  padding: 28px 0; text-align: center; font-size: 13px; color: var(--text-3);
}
.lib-none a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ============ 素材库 ============ */
.mat-tabs { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.mat-tab {
  padding: 8px 14px; font-size: 13.5px; font-weight: 550; color: var(--text-3);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
  transition: all var(--t-fast); margin-bottom: -1px;
}
.mat-tab:hover { color: var(--text); }
.mat-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.mat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px; box-shadow: var(--shadow-sm); position: relative;
  transition: box-shadow var(--t-mid), border-color var(--t-mid), transform var(--t-mid);
}
.mat-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-2px); }
.mat-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mat-card-head .avatar-emoji { width: 34px; height: 34px; font-size: 17px; background: var(--surface-3); }
.mat-card-title { font-size: 14px; font-weight: 670; }
.mat-card-sub { font-size: 11.5px; color: var(--text-3); }
.mat-rows { display: flex; flex-direction: column; gap: 6px; }
.mat-row { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.6; }
.mat-row .k { color: var(--text-3); flex: none; width: 46px; font-size: 11.5px; padding-top: 1px; }
.mat-row .v { color: var(--text-2); flex: 1; min-width: 0; }
.mat-card .actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 2px; opacity: 0; transition: opacity var(--t-fast); }
.mat-card:hover .actions { opacity: 1; }
.mat-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }

/* ============ 统计 ============ */
.heat-wrap { overflow-x: auto; padding: 4px 0 8px; }
.heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); gap: 3px; min-width: min-content; }
.heat-cell { width: 14px; height: 14px; border-radius: 3px; background: var(--surface-3); }
.heat-cell[data-l="1"] { background: #cfe3d4; }
.heat-cell[data-l="2"] { background: #8fcfa4; }
.heat-cell[data-l="3"] { background: #4fae72; }
.heat-cell[data-l="4"] { background: #1f8752; }
[data-theme="dark"] .heat-cell[data-l="1"] { background: #1e3a2a; }
[data-theme="dark"] .heat-cell[data-l="2"] { background: #276b45; }
[data-theme="dark"] .heat-cell[data-l="3"] { background: #33a06a; }
[data-theme="dark"] .heat-cell[data-l="4"] { background: #4fd08c; }
.heat-legend { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); }
.heat-months { display: flex; gap: 3px; font-size: 10.5px; color: var(--text-3); margin-bottom: 4px; }

.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding: 8px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-fill {
  width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--primary), #8e7bf0);
  min-height: 3px; transition: height var(--t-slow);
  position: relative;
}
.bar-fill:hover::after {
  content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 3px 7px; border-radius: 4px;
  font-size: 11px; white-space: nowrap; margin-bottom: 4px;
}
.bar-label { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }

/* ============ 设置 ============ */
.set-group { margin-bottom: 24px; }
.set-group-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.set-group-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); margin-bottom: 8px;
}
.set-row .k { font-size: 13px; font-weight: 550; }
.set-row .d { font-size: 11.5px; color: var(--text-3); margin-top: 2px; max-width: 460px; }
.set-row .c { flex: none; display: flex; align-items: center; gap: 8px; }
.set-row input[type="range"] { width: 140px; accent-color: var(--primary); }
.preset-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
  font-size: 12px; cursor: pointer; transition: all var(--t-fast);
}
.preset-item:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

/* 成就徽章 */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.badge-card {
  text-align: center; padding: 14px 10px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  background: var(--surface-2); opacity: .5;
  transition: all var(--t-mid);
}
.badge-card.on {
  opacity: 1; border-style: solid; border-color: var(--primary);
  background: var(--primary-soft); box-shadow: var(--shadow-sm);
}
.badge-card .ic { font-size: 22px; line-height: 1; margin-bottom: 6px; }
.badge-card .nm { font-size: 12.5px; font-weight: 680; }
.badge-card .dd { font-size: 10.5px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.badge-card .vv { font-size: 10.5px; margin-top: 6px; color: var(--text-3); font-weight: 600; }
.badge-card.on .vv { color: var(--primary); }

/* 索引视图 */
.ix-row:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ============ 生成器大全 ============ */
.gen-cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.gen-cats .chip { cursor: pointer; }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.gen-card {
  position: relative; text-align: left; padding: 13px 13px 30px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
  cursor: pointer; transition: all var(--t-fast);
}
.gen-card:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gen-card .gc-ic { font-size: 21px; line-height: 1; margin-bottom: 7px; }
.gen-card .gc-n { font-size: 13px; font-weight: 680; margin-bottom: 4px; }
.gen-card .gc-d { font-size: 11.5px; color: var(--text-3); line-height: 1.55; }
.gen-card .gc-tag {
  position: absolute; left: 13px; bottom: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 1px 7px; border-radius: 20px;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border);
}
.gen-card .gc-tag.ai { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-ring); }

.gen-desc { font-size: 12.5px; color: var(--text-3); margin-bottom: 12px; }
.gen-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.gen-bar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 10px 0; margin: 12px 0 10px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.gen-out {
  min-height: 90px; max-height: 46vh; overflow: auto;
  font-size: 13.5px; line-height: 1.85; font-family: var(--font-serif);
}
.gen-out .name-result { margin-top: 0; }
.gen-note {
  font-size: 11.5px; color: var(--text-3); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; margin-bottom: 10px;
}
.gen-ai { white-space: pre-wrap; }
.gen-block { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.gen-block:last-child { border-bottom: none; }
.gen-block-h {
  font-size: 11px; font-weight: 700; color: var(--primary);
  letter-spacing: .04em; margin-bottom: 6px;
}
.gen-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
.gen-swatch {
  border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden;
  background: var(--surface); cursor: pointer; transition: all var(--t-fast);
}
.gen-swatch:hover { border-color: var(--primary); transform: translateY(-2px); }
.gen-swatch .sw { height: 46px; }
.gen-swatch .nm { font-size: 12.5px; font-weight: 650; padding: 7px 8px 1px; }
.gen-swatch .hx { font-size: 10.5px; color: var(--text-3); padding: 0 8px 7px; font-family: var(--font-mono, monospace); }

/* 配色主题选择 */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 12px; }
.theme-card {
  display: flex; flex-direction: column; gap: 7px; align-items: flex-start;
  padding: 9px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; transition: all var(--t-fast);
}
.theme-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.theme-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-ring); }
.theme-card .sw {
  width: 100%; height: 40px; border-radius: 8px; display: flex; overflow: hidden; position: relative;
  border: 1px solid rgba(0, 0, 0, .06);
}
.theme-card .sw i { flex: 1; }
.theme-card .sw i:first-child { flex: 1.4; }
.theme-card .nm { font-size: 12px; font-weight: 600; color: var(--text); }
.theme-card.active .nm { color: var(--primary); }

/* ============ 账户 / 会员 ============ */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.acct-tabs { display: flex; gap: 7px; }
.acct-tabs .chip { cursor: pointer; }
.acct-list { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); }
.acct-list b { color: var(--text); font-weight: 600; margin-right: 6px; }
.acct-note { font-size: 12px; line-height: 1.75; color: var(--text-3); }
.acct-msg { margin-top: 12px; font-size: 12.5px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); }
.acct-msg.err { background: var(--danger-soft); color: var(--danger); }
.acct-msg.ok { background: var(--success-soft); color: var(--success); }
.acct-env {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--warn-soft); border: 1px solid var(--warn);
}
.acct-env-ic {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: var(--warn); color: var(--surface);
  font-size: 13px; font-weight: 600; line-height: 20px; text-align: center;
}
.acct-env-t { font-size: 13px; font-weight: 600; color: var(--warn); margin-bottom: 4px; }
.acct-env-d { font-size: 12px; line-height: 1.7; color: var(--text-2); }
/* 中性提示：不是"出错"，只是指路（云登录走官方入口） */
.acct-env.info { background: var(--primary-soft); border-color: var(--primary); }
.acct-env.info .acct-env-ic { background: var(--primary); color: var(--surface); }
.acct-env.info .acct-env-t { color: var(--primary); }
.acct-env-link { color: var(--primary); text-decoration: underline; word-break: break-all; }
.acct-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.acct-plan {
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-3);
}
.acct-plan.on { background: var(--primary); color: #fff; }
.acct-sub { font-size: 11.5px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; margin-bottom: 8px; }
.acct-rows { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.acct-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-2);
}
.acct-row:hover { border-color: var(--primary); background: var(--primary-soft); }
#t-acct.acct-on { color: var(--primary); border-color: var(--primary-ring); background: var(--primary-soft); }

/* ============ AI 面板 ============ */
.aipanel {
  width: var(--aipanel-w); flex: none;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transition: margin-right var(--t-mid);
  z-index: 20;
}
.aipanel.collapsed { margin-right: calc(-1 * var(--aipanel-w)); }

.ai-head {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 12px; flex: none;
  border-bottom: 1px solid var(--border);
}
.ai-logo {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 12px;
}
.ai-head .t { font-size: 13.5px; font-weight: 650; }
.ai-status { font-size: 10.5px; padding: 2px 7px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-3); }
.ai-status.on { background: var(--success-soft); color: var(--success); }

.ai-quick { padding: 10px 12px; border-bottom: 1px solid var(--border); flex: none; }
.ai-quick-label { font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: .06em; margin-bottom: 7px; }

.ai-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; gap: 5px; animation: fadeIn var(--t-mid); }
.msg-role { font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.msg-body {
  padding: 10px 12px; border-radius: var(--r-md); font-size: 13px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
}
.msg.user .msg-body { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant .msg-body { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.system .msg-body { background: var(--warn-soft); color: var(--warn); font-size: 12px; border-radius: var(--r-sm); }
.msg-actions { display: flex; gap: 6px; margin-top: 2px; }
.msg-actions .btn { height: 25px; font-size: 11.5px; padding: 0 9px; }

.ai-composer { flex: none; border-top: 1px solid var(--border); padding: 10px 12px; background: var(--surface-2); }
.ai-input {
  width: 100%; min-height: 62px; max-height: 160px; resize: none;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); font-size: 13px; line-height: 1.6;
}
.ai-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.ai-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ai-ctx { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 4px; overflow: hidden; }

.ai-greeting { text-align: center; padding: 26px 18px; color: var(--text-3); }
.ai-greeting .big { font-size: 30px; margin-bottom: 8px; }
.ai-greeting .tt { font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.ai-greeting .dd { font-size: 12.5px; line-height: 1.7; }

/* 生成中光标 */
.stream-cursor { display: inline-block; width: 2px; height: 1em; background: var(--primary); vertical-align: text-bottom; animation: blink 1s steps(2) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .aipanel { position: absolute; right: 0; top: 0; bottom: 0; box-shadow: var(--shadow-lg); }
  .aipanel.collapsed { margin-right: calc(-1 * var(--aipanel-w)); }
}
@media (max-width: 860px) {
  .sidebar { position: absolute; left: 0; top: 0; bottom: 0; box-shadow: var(--shadow-lg); z-index: 40; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .page { padding: 16px 14px 40px; }
  .topbar { padding: 0 8px; gap: 6px; }
  .brand-sub { display: none; }
  .ad-wrap { grid-template-columns: 1fr !important; }
  .ad-cols { grid-template-columns: 1fr !important; }
}

/* ---------------- 资料库 ---------------- */
.ref-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.ref-bar .input { flex: 1; }
.ref-cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.ref-cats .chip { cursor: pointer; }
.ref-count { margin-bottom: 12px; min-height: 16px; }
.ref-card { cursor: pointer; }
.ref-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.ref-detail { font-size: 13px; line-height: 1.8; }
.ref-detail-cat { font-size: 11.5px; color: var(--text-3); font-weight: 600; margin-bottom: 8px; }
.ref-detail-d { color: var(--text); margin-bottom: 12px; }
.ref-detail-t { background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: var(--r-sm); padding: 9px 12px; color: var(--text-2); font-size: 12.5px; }
.ref-detail-t b { display: block; color: var(--primary); font-size: 11.5px; margin-bottom: 3px; }

.ref-tool { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ref-tool-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.ref-tool-h { font-size: 12.5px; font-weight: 700; margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.ref-tool-h::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--primary); }
.ref-tool-out { margin-top: 9px; font-size: 13px; font-weight: 600; color: var(--primary); min-height: 20px; }
.ref-table { margin-top: 10px; max-height: 176px; overflow-y: auto; }
.ref-tr { display: grid; grid-template-columns: 74px 118px 1fr; gap: 6px; font-size: 11.5px; padding: 3px 0; border-bottom: 1px dashed var(--border); align-items: baseline; }
.ref-tr:last-child { border-bottom: none; }
.ref-tr .a { font-weight: 650; color: var(--text); }
.ref-tr .b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.ref-tr .c { color: var(--text-3); }
.ref-tr.head { border-bottom: 1px solid var(--border); }
.ref-tr.head .b { color: var(--text-3); font-weight: 600; }

/* ---------------- 改编工坊 ---------------- */
.ad-wrap { display: grid; grid-template-columns: 286px minmax(0, 1fr); gap: 16px; align-items: start; }
.ad-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.ad-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ad-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 13px 14px; }
.ad-h { font-size: 12.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ad-h-r { margin-left: auto; display: flex; gap: 4px; }
.ad-h2 { font-size: 12px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ad-tip { font-size: 11.5px; line-height: 1.7; color: var(--text-3); }

.ad-fmts { display: flex; flex-direction: column; gap: 7px; }
.ad-fmt { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; transition: all var(--t-fast); position: relative; }
.ad-fmt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ad-fmt.on { border-color: var(--primary); background: var(--primary-soft); }
.ad-fmt .f-ic { font-size: 17px; line-height: 1.2; flex: none; }
.ad-fmt .f-b { min-width: 0; }
.ad-fmt .f-n { font-size: 13px; font-weight: 680; }
.ad-fmt .f-d { font-size: 11px; color: var(--text-3); line-height: 1.5; margin-top: 2px; }
.ad-fmt .f-tag { position: absolute; top: 8px; right: 9px; font-size: 10px; color: var(--text-3); }
.ad-fmt.on .f-tag { color: var(--primary); }

.ad-chs { max-height: 210px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.ad-vol { font-size: 11px; color: var(--text-3); font-weight: 600; padding: 6px 2px 3px; }
.ad-ch { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: var(--r-xs); cursor: pointer; font-size: 12.5px; }
.ad-ch:hover { background: var(--surface-2); }
.ad-ch.on { color: var(--text); }
.ad-ch:not(.on) { color: var(--text-3); }
.ad-ch input { accent-color: var(--primary); flex: none; }
.ad-ch .t { flex: 1; min-width: 0; }
.ad-ch .w { font-size: 10.5px; color: var(--text-3); flex: none; }
#ad-opts { display: grid; gap: 10px; }
#ad-opts .field { margin: 0; }

.ad-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ad-st { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 12px; }
.ad-st .v { font-size: 20px; font-weight: 720; font-variant-numeric: tabular-nums; }
.ad-st .k { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.ad-warn { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); flex-wrap: wrap; }
.ad-warn.soft { background: var(--surface-2); color: var(--text-2); }
.ad-warn svg { flex: none; }

.ad-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ad-tabs .chip { cursor: pointer; }

.ad-cols { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 12px; align-items: start; }
.ad-scenes { max-height: 620px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ad-sc { padding: 7px 9px; border-radius: var(--r-xs); cursor: pointer; border: 1px solid transparent; }
.ad-sc:hover { background: var(--surface-2); border-color: var(--border); }
.ad-sc .sc-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.ad-sc .sc-h .n { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; }
.ad-sc .sc-h .p { flex: 1; min-width: 0; font-weight: 600; }
.ad-sc .sc-h .d { font-size: 10.5px; color: var(--text-3); flex: none; }
.ad-sc .sc-h .d::after { content: " 句"; }
.ad-sc .sc-b { font-size: 11.5px; color: var(--text-3); margin-left: 27px; margin-top: 3px; line-height: 1.55; }

.ad-pre { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; max-height: 620px; overflow: auto; font-family: var(--font-mono, monospace); font-size: 12px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; color: var(--text); }


/* ================= 写作台补充 ================= */
.ch-pos { font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--text-2); padding: 0 8px; }
.ch-pos:hover { color: var(--primary); background: var(--primary-soft); }

.draft-hint { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: var(--text-3); }
.draft-hint svg { flex: none; }
.draft-hint .input { height: 30px; font-size: 12px; background: var(--surface-2); border-color: transparent; }
.draft-hint .input:focus { background: var(--surface); border-color: var(--primary); }

/* ================= 智能校对 ================= */
.pf-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pf-stats { display: flex; gap: 7px; flex-wrap: wrap; }
.pf-stat { font-size: 11.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-full); padding: 3px 10px; display: inline-flex; align-items: center; gap: 5px; }
.pf-stat i { font-style: normal; font-size: 8px; line-height: 1; }
.pf-stat b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.pf-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.pf-tabs .chip { cursor: pointer; font-size: 11.5px; }

.pf-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.pf-item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; background: var(--surface); transition: border-color var(--t-fast); }
.pf-item:hover { border-color: var(--border-strong); }
.pf-item.soft { background: var(--surface-2); }

.pf-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.pf-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-2); flex: none; }
.pf-tag.t-错字 { background: var(--danger-soft); color: var(--danger); }
.pf-tag.t-病句 { background: var(--warn-soft); color: var(--warn); }
.pf-tag.t-逻辑 { background: var(--warn-soft); color: var(--warn); }
.pf-tag.t-标点 { background: var(--primary-soft); color: var(--primary); }
.pf-tag.t-重复 { background: var(--warn-soft); color: var(--warn); }
.pf-tag.t-空格 { background: var(--surface-3); color: var(--text-3); }
.pf-tag.t-词表 { background: var(--accent-soft); color: var(--accent); }
.pf-tag.t-提示 { background: var(--surface-3); color: var(--text-3); }
.pf-why { font-size: 11.5px; color: var(--text-3); min-width: 0; }
.pf-src { font-size: 10px; color: var(--text-3); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 1px 6px; flex: none; }

.pf-body { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; line-height: 1.6; }
.pf-body svg { flex: none; color: var(--text-3); }
.pf-from { background: var(--danger-soft); color: var(--danger); padding: 1px 7px; border-radius: var(--r-xs); text-decoration: line-through; text-decoration-color: var(--danger); word-break: break-all; }
.pf-to { background: var(--success-soft); color: var(--success); padding: 1px 7px; border-radius: var(--r-xs); word-break: break-all; }

.pf-ctx { margin-top: 7px; font-size: 11.5px; color: var(--text-3); line-height: 1.7; background: var(--surface-inset); border-radius: var(--r-xs); padding: 6px 9px; word-break: break-all; }

.pf-acts { display: flex; gap: 6px; margin-top: 9px; }
.pf-acts .btn { height: 26px; font-size: 11.5px; padding: 0 10px; }

@media (max-width: 720px) {
  .pf-list { max-height: 46vh; }
  .pf-stat { font-size: 11px; padding: 2px 8px; }
}


/* ================= 小说封面生成器 ================= */
.cv-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.cv-left { position: sticky; top: 0; }
.cv-view { width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow-lg); display: block; background: var(--surface-2); }
.cv-tip { font-size: 11px; color: var(--text-3); text-align: center; margin-top: 8px; }
.cv-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cv-grp { display: flex; flex-direction: column; gap: 5px; }
.cv-lab { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.cv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cv-chips .chip { cursor: pointer; font-size: 11px; }
.cover-gen:hover { filter: brightness(1.05); }

.book-cover.has-img { overflow: hidden; padding: 0; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 760px) {
  .cv-wrap { grid-template-columns: 1fr; }
  .cv-left { position: static; max-width: 240px; margin: 0 auto; }
}


/* ================= AI 封面：三步向导 ================= */
.cai-grid { display: grid; grid-template-columns: 1fr 1fr 1.18fr; gap: 18px; align-items: start; }
.cai-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cai-step { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; }
.cai-step i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-ring); padding: 2px 8px; border-radius: 999px; flex: none; }
.cai-mode { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; background: var(--surface-2); }
.cai-mode .on { font-size: 12.5px; font-weight: 650; color: var(--primary); }
.cai-mode .d { font-size: 11.5px; color: var(--text-3); line-height: 1.7; margin-top: 4px; }
.cai-stage { position: relative; border: 1.5px dashed var(--border); border-radius: var(--r-md); min-height: 300px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); overflow: hidden; }
.cai-stage canvas { display: none; width: 100%; height: auto; border-radius: var(--r-md); }
.cai-stage.has { border-style: solid; }
.cai-stage.has canvas { display: block; }
.cai-stage.has .cai-empty { display: none; }
.cai-stage .spinner { width: 22px; height: 22px; }
.cai-empty { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; color: var(--text-3); font-size: 12.5px; line-height: 1.8; padding: 24px; }
.cai-empty b { font-size: 15px; color: var(--text-2); }
.cai-gal-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.cai-gal { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; }
.cai-gal:empty::after { content: '还没有生成记录'; font-size: 11.5px; color: var(--text-3); }
.cai-gal img { width: 50px; height: 70px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; transition: transform var(--t-fast); }
.cai-gal img:hover { transform: translateY(-2px); border-color: var(--primary); }
@media (max-width: 900px) { .cai-grid { grid-template-columns: 1fr; } }


/* ================= 本地文件夹同步 ================= */
.disk-box { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); }
.disk-line { display: flex; align-items: flex-start; gap: 10px; }
.disk-line .tt { font-size: 13.5px; font-weight: 600; }
.disk-line .dd { font-size: 12px; color: var(--text-3); line-height: 1.7; margin-top: 3px; }
.disk-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
.disk-dot.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.disk-dot.off { background: var(--text-3); }
.disk-box code { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface-2); padding: 1px 5px; border-radius: var(--r-xs); }


/* ================= 会员中心 ================= */
.mb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mb-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; background: var(--surface); display: flex; flex-direction: column; }
.mb-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.mb-card.mb-hi { background: var(--surface-2); }
.mb-cn { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.mb-badge { font-size: 10.5px; font-weight: 600; background: var(--primary-soft); color: var(--primary); padding: 1px 7px; border-radius: var(--r-full); }
.mb-ct { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.mb-price { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 5px; }
.mb-price b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mb-price span { font-size: 12px; color: var(--text-3); }
.mb-save { font-size: 11.5px; color: var(--success); margin-bottom: 6px; }
.mb-lines { margin: 12px 0 14px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-2); line-height: 1.6; }
.mb-lines div { padding-left: 12px; position: relative; }
.mb-lines div::before { content: ''; position: absolute; left: 2px; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.mb-act { margin-top: auto; }
.mb-act .btn { width: 100%; }

.mb-status { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.mb-status.warn { background: var(--warn-soft); border-color: var(--warn); }
.mb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mb-dot.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.mb-dot.off { background: var(--text-3); }
.mb-st { font-size: 13.5px; font-weight: 600; }
.mb-sd { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.mb-usage { display: flex; flex-direction: column; gap: 12px; }
.mb-uh { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.mb-ub { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.mb-ub > div { height: 100%; border-radius: var(--r-full); background: var(--primary); transition: width var(--t-mid); }

.mb-table { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.mb-tr { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 8px; padding: 9px 12px; font-size: 12px; border-bottom: 1px solid var(--border); align-items: center; }
.mb-tr:last-child { border-bottom: none; }
.mb-th { background: var(--surface-2); font-weight: 600; font-size: 11.5px; color: var(--text-2); }
.mb-always { background: var(--success-soft); }
.mb-tr > span b { display: block; font-weight: 600; }
.mb-tr > span i { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.mb-cur { color: var(--primary); font-weight: 600; }
.mb-soon {
  display: inline-block; margin-left: 6px; padding: 1px 6px; vertical-align: 1px;
  font-size: 10px; font-style: normal; font-weight: 500; border-radius: var(--r-full);
  background: var(--warn-soft); color: var(--warn);
}

/* ---------- 全书诊断报告 / 写作年报 ---------- */
.rp-score, .rp-year {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface-2); border-radius: var(--r-md); margin-bottom: 16px;
}
.rp-snum, .rp-ybig { font-size: 32px; font-weight: 600; font-family: var(--font-serif); color: var(--primary); flex: none; }
.rp-ybig { color: var(--text-1); }
.rp-snum i, .rp-ybig i { font-size: 13px; font-style: normal; color: var(--text-3); margin-left: 3px; }
.rp-stitle { font-size: 14px; font-weight: 600; }
.rp-sdesc { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.rp-cell { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.rp-cell b { display: block; font-size: 15px; font-weight: 600; }
.rp-cell span { font-size: 11px; color: var(--text-3); }
.rp-sec { font-size: 13px; font-weight: 600; margin: 18px 0 10px; }
.rp-find {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 8px; cursor: pointer;
}
.rp-find:hover { border-color: var(--primary); }
.rp-tag { flex: none; font-size: 10.5px; color: var(--surface); padding: 2px 7px; border-radius: var(--r-full); margin-top: 2px; }
.rp-ft { font-size: 13px; font-weight: 600; }
.rp-fd { font-size: 12px; color: var(--text-2); line-height: 1.65; margin-top: 3px; }
.rp-go { flex: none; font-size: 11.5px; color: var(--primary); margin-top: 3px; }
.rp-bars { display: flex; align-items: flex-end; gap: 3px; height: 100px; }
.rp-bar { flex: 1; min-width: 3px; background: var(--primary); border-radius: 2px 2px 0 0; opacity: .72; cursor: pointer; }
.rp-bar:hover { opacity: 1; }
.rp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chip { padding: 5px 10px; border-radius: var(--r-full); background: var(--surface-2); font-size: 13px; }
.rp-chip.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.rp-chip i { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: 5px; }
.rp-rank { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.rp-rank b { width: 18px; flex: none; font-size: 12px; color: var(--text-3); }
.rp-rank span { font-size: 13px; }
.rp-rank i { font-style: normal; font-size: 12px; color: var(--text-3); }

@media (max-width: 720px) {
  .mb-grid { grid-template-columns: 1fr; }
  .mb-tr { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); font-size: 11.5px; padding: 8px; }
}

/* ============ 拆书仿写 ============ */
.az-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.az-left, .az-right { padding: 16px; }
.az-modes { display: flex; flex-wrap: wrap; gap: 7px; }
.az-mode-desc { font-size: 12px; color: var(--text-3); margin: 8px 0 10px; }
.az-in { min-height: 260px; font-size: 13px; line-height: 1.8; }
.az-in-bar { margin-top: 8px; }

/* 文本体检（离线） */
.az-check { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.az-check-empty { font-size: 12px; color: var(--text-3); }
.az-check-h { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.az-check-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.az-ck { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 6px; text-align: center; }
.az-ck b { display: block; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.az-ck span { font-size: 10.5px; color: var(--text-3); }
.az-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.az-top .chip { cursor: default; padding: 2px 9px; font-size: 11.5px; }
.az-check-tip { margin-top: 10px; font-size: 12px; line-height: 1.8; color: var(--text-2); background: var(--primary-soft); border-radius: var(--r-sm); padding: 8px 10px; }

/* 结果区 */
.az-out { min-height: 320px; }
.az-run { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; word-break: break-all; line-height: 1.7; }
.az-err { font-size: 12.5px; color: var(--danger); line-height: 1.8; }
.az-res-h { font-size: 15px; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.az-sum { font-size: 13px; line-height: 1.85; color: var(--text); background: var(--primary-soft); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 12px; }
.az-sec { margin-bottom: 14px; }
.az-sec-h { font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--text-3); margin-bottom: 6px; }
.az-kv { display: grid; grid-template-columns: 88px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.az-kv:last-child { border-bottom: none; }
.az-kv .k { color: var(--primary); font-weight: 600; }
.az-kv .v { color: var(--text-2); line-height: 1.75; }
.az-li { font-size: 12.5px; line-height: 1.8; color: var(--text-2); padding: 4px 0 4px 14px; position: relative; }
.az-li::before { content: "·"; position: absolute; left: 2px; color: var(--primary); font-weight: 700; }
.az-ch { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: var(--bg-2); }
.az-ch-h { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
/* 拆榜：上榜作品卡 */
.az-bk { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin: 8px 0; }
.az-bk-t { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.az-bk-t .chip { font-size: 11px; padding: 1px 8px; }
.az-li.muted { color: var(--text-3); }
/* 灵感页：AI 脑洞工坊 */
.hd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.hd-card { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.hd-card.hd-saved { border-style: dashed; }
.hd-top { display: flex; align-items: center; gap: 8px; }
.hd-top .chip { font-size: 11px; padding: 1px 8px; }
.hd-line { font-size: 13px; line-height: 1.7; color: var(--text-1); }
.hd-sub { font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.hd-sub b { color: var(--primary); font-weight: 600; margin-right: 6px; }
.hd-saved-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
@media (max-width: 900px) { .hd-list { grid-template-columns: 1fr; } }
.az-fp { margin-top: 12px; border: 1px solid var(--primary-ring); background: var(--primary-soft); border-radius: var(--r-md); padding: 12px; }
.az-fp-h { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.az-fp, .az-fp ~ * { font-size: 12.5px; line-height: 1.8; }
.az-raw { font-size: 12.5px; line-height: 1.85; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.az-res-bar { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* 文风指纹列表 */
.az-styles { margin-top: 16px; padding: 14px 16px; }
.az-st-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.az-st-h b { font-size: 13.5px; }
.az-st-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.az-st { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface); }
.az-st.on { border-color: var(--primary); background: var(--primary-soft); }
.az-st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.az-st-main b { font-size: 13px; }
.az-st-main .tiny { color: var(--text-3); line-height: 1.6; }

@media (max-width: 900px) {
  .az-grid { grid-template-columns: 1fr; }
  .az-check-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============ 书名实验室 ============ */
.tl-list { display: flex; flex-direction: column; gap: 10px; }
.tl-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px; background: var(--surface);
}
.tl-rank { width: 22px; text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); flex: none; }
.tl-row:first-child .tl-rank { color: var(--gold); font-weight: 700; }
.tl-cov { width: 44px; height: 60px; border-radius: 6px; flex: none; object-fit: cover; box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.tl-cov-ph { display: grid; place-items: center; font-size: 20px; background: var(--surface-3); }
.tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tl-main b { font-size: 14px; font-weight: 650; }
.tl-main .tiny { color: var(--text-3); }
.tl-bar { height: 4px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; max-width: 260px; }
.tl-bar i { display: block; height: 100%; background: var(--primary); border-radius: var(--r-full); }
.tl-score { font-size: 19px; font-weight: 720; font-variant-numeric: tabular-nums; color: var(--primary); flex: none; width: 34px; text-align: right; }

/* ============ 自建 AI 搭档 ============ */
.mp-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px; margin-bottom: 8px; background: var(--surface);
}
.mp-ic { font-size: 20px; flex: none; }
.mp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mp-main b { font-size: 13px; }
.mp-main .tiny { color: var(--text-3); line-height: 1.6; }

/* ============ 灵感 → 正文 流水线 ============ */
.pipe-head { margin-bottom: 14px; }
.pipe-steps { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pipe-st {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-3);
  padding: 3px 11px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface-2);
}
.pipe-st.on { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 600; }
.pipe-st.done { color: var(--primary); border-color: var(--primary-ring); background: var(--primary-soft); }
.pipe-arr { color: var(--text-3); font-style: normal; font-size: 11px; }
.pipe-grp { margin-bottom: 14px; }
.pipe-grp-h { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 7px; display: flex; align-items: center; }
.pipe-grp .chip { cursor: pointer; }
.pipe-idea {
  border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  padding: 10px 12px; background: var(--surface-2); line-height: 1.8;
}
.pipe-ta { font-size: 13px; line-height: 1.85; }
.pipe-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}

/* ---------- 跨章一致性检查 ---------- */
.cs-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cs-ai { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.cs-sum {
  font-size: 12.5px; line-height: 1.85; color: var(--text-2);
  background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px;
}
.cs-card {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 11px 13px; margin-bottom: 9px; background: var(--surface-2);
}
.cs-ct { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cs-row { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; margin-bottom: 3px; }
.cs-k { flex: none; width: 46px; color: var(--text-3); }
.cs-v { flex: 1; color: var(--text-2); word-break: break-word; }
.cs-ev {
  font-size: 11.5px; line-height: 1.7; color: var(--text-3);
  background: var(--surface-3); border-radius: 6px;
  padding: 4px 8px; margin-top: 4px; word-break: break-all;
}
.cs-run {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-3); padding: 14px 0; word-break: break-all;
}

/* ---------- 时光机 / 版本对比 ---------- */
.sn-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sn-ab {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2);
}
.sn-slot {
  font-size: 12px; color: var(--text-3); padding: 3px 10px; border-radius: var(--r-full);
  border: 1px dashed var(--border-strong);
}
.sn-slot.on { color: var(--primary); border-style: solid; border-color: var(--primary); background: var(--primary-soft); }
.sn-grid { display: grid; grid-template-columns: 210px 1fr; gap: 12px; }
.sn-item {
  padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 5px;
  border: 1px solid var(--border);
}
.sn-item:hover { border-color: var(--primary-ring); }
.sn-item.on { border-color: var(--primary); background: var(--primary-soft); }
.sn-top { display: flex; align-items: center; gap: 6px; }
.sn-pick { margin-left: auto; display: flex; gap: 3px; flex: none; }
.sn-side {
  width: 20px; height: 20px; line-height: 1; font-size: 11px; font-weight: 700;
  border-radius: 5px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-3); cursor: pointer; padding: 0;
}
.sn-side:hover { color: var(--primary); border-color: var(--primary); }
#list { max-height: 48vh; overflow: auto; border-right: 1px solid var(--border); padding-right: 8px; }
#view { max-height: 48vh; overflow: auto; }
.sn-pre {
  white-space: pre-wrap; font-family: var(--font-serif); font-size: 14px; line-height: 1.9;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; max-height: 38vh; overflow: auto;
}
.df-head { margin-bottom: 10px; }
.df-stat { font-size: 13px; color: var(--text-2); margin-bottom: 3px; }
.df-stat b { font-weight: 700; }
.df-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.df-col { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.df-h {
  padding: 7px 10px; background: var(--surface-2); font-size: 12px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.df-body { max-height: 52vh; overflow: auto; }
.df-line {
  padding: 4px 10px; font-size: 12.5px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; border-left: 3px solid transparent;
}
.df-same { color: var(--text-3); }
.df-del { background: rgba(220, 60, 60, .10); border-left-color: rgba(220, 60, 60, .65); }
.df-add { background: rgba(40, 160, 90, .12); border-left-color: rgba(40, 160, 90, .65); }
.df-line del { background: rgba(220, 60, 60, .22); text-decoration: line-through; border-radius: 3px; }
.df-line ins { background: rgba(40, 160, 90, .24); text-decoration: none; border-radius: 3px; }
@media (max-width: 900px) {
  .sn-grid { grid-template-columns: 1fr; }
  #list { max-height: 30vh; border-right: none; }
  .df-wrap { grid-template-columns: 1fr; }
}

/* ---------- 发书前体检 ---------- */
.ck-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.ck-tab {
  border: none; background: none; cursor: pointer; padding: 7px 12px;
  font-size: 13px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ck-tab.on { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.ck-sum { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.ck-sum b { font-weight: 700; }
.ck-hit {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 7px;
}
.ck-hit:hover { border-color: var(--primary-ring); }
.ck-tag {
  flex: none; font-size: 10.5px; color: var(--surface);
  padding: 2px 7px; border-radius: var(--r-full); margin-top: 2px;
}
.ck-w { font-size: 13px; font-weight: 600; }
.ck-w i { font-style: normal; font-size: 11.5px; color: var(--text-3); margin-left: 5px; font-weight: 400; }
.ck-cat {
  font-size: 11px; color: var(--text-3); margin-left: 8px; font-weight: 400;
  border: 1px solid var(--border); border-radius: var(--r-full); padding: 1px 8px;
}
.ck-why { font-size: 12px; color: var(--text-3); line-height: 1.6; margin-top: 3px; }
.ck-plats { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.ck-plats i { font-style: normal; font-size: 10.5px; color: var(--primary); border: 1px solid var(--primary-ring); border-radius: var(--r-full); padding: 1px 7px; }
.cs-plats { margin-bottom: 10px; line-height: 2.1; }
.ck-pchip {
  display: inline-block; font-size: 11.5px; padding: 3px 10px; border-radius: var(--r-full);
  border: 1px solid var(--border); color: var(--text-3); cursor: pointer; user-select: none;
  margin: 2px 5px 0 0; transition: all .12s;
}
.ck-pchip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.ck-read {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px; background: var(--surface-2);
}
.ck-read-h { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ck-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- 关系图谱 ---------- */
.gp-wrap { overflow: hidden; }
.gp-svg { display: block; user-select: none; }
.gp-n circle { transition: fill-opacity .15s; }
.gp-n:hover circle { fill-opacity: 1; }
.gp-side {
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-2); min-height: 60px;
}
.gp-info-h { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.gp-kind {
  font-size: 11px; font-weight: 400; color: var(--text-3); margin-left: 8px;
  border: 1px solid var(--border); border-radius: var(--r-full); padding: 1px 8px;
}
.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--border);
}
.gp-row:last-child { border-bottom: none; }
.gp-pair { flex: none; width: 148px; font-size: 12.5px; font-weight: 600; }
.gp-pair i { font-style: normal; color: var(--text-3); margin: 0 4px; }
.gp-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.gp-bar i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
.gp-chs { flex: none; width: 120px; text-align: right; }
@media (max-width: 900px) {
  .gp-chs { display: none; }
  .gp-pair { width: 110px; }
}

/* ---------- 素材侧栏（写作台） ---------- */
.ws-mat { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: var(--surface); }
.ws-mat-t { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; }
.ws-mat-d { margin: 2px 0 6px; line-height: 1.5; }
.ws-mat-h { font-size: 11.5px; font-weight: 700; color: var(--text-3); margin: 10px 0 6px; }
.ws-mat .ws-ins { width: 100%; }

/* ---------- 大纲 → 章节骨架 ---------- */
.sk-cfg { margin-bottom: 12px; }
.sk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sk-list { max-height: 52vh; overflow: auto; }
.sk-row { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px; }
.sk-t { display: flex; gap: 8px; margin-bottom: 6px; }
.sk-t input { flex: 1; }

/* ---------- 三岔口（续写方案） ---------- */
.fk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fk-card {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px 13px; display: flex; flex-direction: column; background: var(--surface-2);
}
.fk-head { font-size: 13px; margin-bottom: 4px; }
.fk-why { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.fk-body {
  flex: 1; font-size: 12.5px; line-height: 1.85; color: var(--text-2);
  white-space: pre-wrap; word-break: break-word;
  max-height: 46vh; overflow: auto; margin-bottom: 8px;
}
@media (max-width: 900px) { .fk-grid { grid-template-columns: 1fr; } }

/* ============ 触摸设备适配（无 hover：手机 / 平板） ============
 * 触摸屏没有悬停，靠 :hover 才显形的操作按钮在手机上等于隐身。
 * 用 (hover:none) and (pointer:coarse) 精准命中纯触摸设备，
 * 再叠 max-width:760px 兜底老浏览器 / 极窄的桌面窗口。 */
@media (hover: none) and (pointer: coarse), (max-width: 760px) {
  /* 1) 让「靠悬停才出现」的操作按钮常显 */
  .book-card .actions,
  .mat-card .actions,
  .vol-head .vol-actions { opacity: 1; }

  /* 卷操作常显时，把字数让位给按钮，避免窄屏挤爆 */
  .vol-head .words { display: none; }

  /* 2) 操作区小图标按钮撑到 ≥40px 触摸热区（卷按钮带内联 20px，必须 !important） */
  .book-card .actions .btn-icon,
  .mat-card .actions .btn-icon {
    width: 40px; min-width: 40px; height: 40px; min-height: 40px; font-size: 16px;
  }
  .vol-actions .btn-icon {
    width: 40px !important; height: 40px !important;
    min-width: 40px; min-height: 40px; font-size: 16px;
  }

  /* 章节行整体加高，便于手指点选（整行可点进写作台） */
  .ch-item { height: 40px; }
  .ch-item .ch-menu { opacity: 1; width: 36px; height: 36px; }

  /* 3) iOS Safari 对 <16px 的输入框聚焦会整页缩放：触摸端统一 16px */
  .input, .textarea, .select, .ch-title-input { font-size: 16px; }
}
