/* ══════════════════════════════════════════════════════════════════════════
   app.css —— 应用壳与组件（左侧导航按创作工作流组织）
   ══════════════════════════════════════════════════════════════════════════ */

.app{display:flex;min-height:100vh;align-items:stretch}

/* ── 左侧导航 ───────────────────────────────────────────────────────────── */
.side{
  width:236px;flex:0 0 236px;background:#fff;border-right:1px solid var(--line);
  position:sticky;top:0;height:100vh;display:flex;flex-direction:column;
}
.brand{padding:20px 18px 16px;border-bottom:1px solid var(--line-2);display:flex;gap:11px;align-items:center}
.brand-logo{flex:0 0 auto;display:block}
.brand-txt{min-width:0}
.brand-name{font-size:15px;font-weight:700;line-height:1.3;letter-spacing:.2px}
.brand-sub{font-size:11.5px;color:var(--text-3);line-height:1.4;margin-top:2px}

.nav{padding:12px 10px;display:flex;flex-direction:column;gap:2px;flex:1;overflow-y:auto}
.nav-cap{font-size:11px;color:#a8b0bf;padding:12px 8px 5px;letter-spacing:.4px}
.nav-item{
  display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:var(--radius);
  font-size:13px;color:var(--text-2);text-decoration:none;background:transparent;border:1px solid transparent;
  cursor:pointer;font-family:inherit;text-align:left;width:100%;line-height:1.5;
}
.nav-item:hover{background:var(--slot)}
.nav-item.on{background:var(--slot-on);color:var(--text);font-weight:600;border-color:#666}
.nav-item .ni{width:15px;height:15px;flex:0 0 15px;opacity:.75}
.nav-item.on .ni{opacity:1}
.nav-badge{margin-left:auto;font-size:11px;color:var(--text-3);font-variant-numeric:tabular-nums}
.side-foot{padding:12px 16px 16px;border-top:1px solid var(--line-2);font-size:11px;line-height:1.6;color:var(--text-3)}
.sf-row{display:flex;align-items:baseline;gap:8px;margin-bottom:6px;min-width:0}
.sf-acct{
  flex:0 1 auto;min-width:0;
  font-size:12px;color:var(--text-2);font-weight:600;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* 大模型状态：账号右边的当前模型名（点它去设置）；没配时用警示色点出来 */
.sf-model{
  flex:1 1 auto;min-width:0;text-align:right;
  font-size:11px;color:var(--text-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  text-decoration:none;cursor:pointer;
}
.sf-model:hover{color:var(--text-2);text-decoration:underline}
.sf-model.off{color:#b42318}
/* 设置页「账号」面板里的模型状态（与侧栏 .sf-model 同族；手机上看不到侧栏那一块，这里补一份） */
.acct-model{font-size:12px;color:var(--text-3);margin-top:4px;line-height:1.6}
.acct-model.off{color:#b42318}

/* ── 主区 ──────────────────────────────────────────────────────────────── */
.main{flex:1;min-width:0;padding:26px 32px 56px;max-width:1240px}
.page-head{margin:0 0 18px}
.page-head h1{margin:0;font-size:19px;font-weight:700;letter-spacing:.2px;line-height:1.4}
.page-head p{margin:5px 0 0;font-size:12.5px;color:var(--text-3);line-height:1.6}
/* 页头尾句（品牌语）——「小小的尝试，大大的惊喜。」
   ⚠ 灰阶里强调**靠字重、不靠颜色**：这句是照「一站式文档处理专家」的做法来的，
   那页的 h1 曾经用颜色点亮后半句，全站换灰黑白后反而读成了"次要信息"（用户发现后改回字重）。
   这里同理：整句走 --text-2（比说明句的 --text-3 稍显），强调只加粗、颜色继承。 */
.page-head .tagline{margin:7px 0 0;font-size:12.5px;color:var(--text-2);letter-spacing:.4px;line-height:1.6}
.page-head .tagline b{font-weight:700;color:inherit}

.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px 20px;margin-bottom:16px}
.panel-head{display:flex;align-items:baseline;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.panel-head h2{margin:0;font-size:14px;font-weight:700;line-height:1.4;white-space:nowrap}
/* ↑ flex-wrap + h2 nowrap：面板小标题**永远单行**；右侧小注太长时由它自己换到下一行
   （2026-09-26 用户手机报障：标题被长副标题挤窄 → 「这台浏览器里的数据」「地图从哪来」折行）。
   别把这两条去掉——它们是一对，缺一个就会退回"标题折行"或"标题被撑破容器"。 */
.panel-head .ph-sub{font-size:12px;color:var(--text-3);margin-left:auto;text-align:right}
.panel-head h2 .step{color:var(--text-3);font-weight:600;margin-right:6px;font-variant-numeric:tabular-nums}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-auto{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}

/* 表单行：同行控件锁同一高度（grid 1fr auto，不用 flex） */
.field-row{display:grid;grid-template-columns:88px 1fr auto;gap:8px;align-items:center;margin-bottom:9px}
.field-row>label{padding-top:0}
.field-row .grow{min-width:0}
.field-hint{font-size:11.5px;color:var(--text-3);margin-top:-3px;margin-bottom:10px;padding-left:96px;line-height:1.55}
.field-row.wide{grid-template-columns:88px 1fr}
.field-row.wide .field-hint{grid-column:2;padding-left:0}
.stack{display:flex;flex-direction:column;gap:6px}
.stack>label{display:block}

/* ── 素材卡 ────────────────────────────────────────────────────────────── */
.story{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;
  display:grid;grid-template-columns:22px 1fr;gap:12px;align-items:start;
}
.story:hover{border-color:#dcdfe5}
.story.pick{border-color:#666;background:#fcfcfc}
.story-body{min-width:0}
.story-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.story-title{font-size:13.5px;font-weight:700;line-height:1.4}
.story-ord{font-size:11px;color:var(--text-3);font-variant-numeric:tabular-nums}
.story-text{
  margin:7px 0 0;font-size:12.5px;line-height:1.75;color:var(--text-2);
  white-space:pre-wrap;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;
}
.story-text.open{-webkit-line-clamp:unset;display:block}
.story-meta{margin-top:9px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:11.5px;color:var(--text-3)}
.story-acts{margin-left:auto;display:flex;gap:2px;align-items:center}
.story-acts a.btn3{text-decoration:none;display:inline-flex;align-items:center}

.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:0 0 8px}
/* 模型连接状态点（2026-09-30 用户要的）：绿=最近一次调用成功 / 橙=没配或最近失败 / 灰=配了但还没跑过。
   ⚠ 全站首次引入绿与橙（原来只有深红做警示）；挂在既有 .dot 上，不另造一套圆点。 */
.dot.ok{background:#12b76a}
.dot.warn{background:#f79009}
.dot.unk{background:var(--text-3)}
.dot.mr{margin-left:6px}
.line-tag{
  display:inline-flex;align-items:center;gap:5px;font-size:11.5px;color:var(--text-2);
  background:var(--slot);border-radius:20px;padding:2px 9px 2px 7px;line-height:1.5;
}
.tagchip{font-size:11px;color:var(--text-3);border:1px solid var(--line);border-radius:20px;padding:1px 8px;line-height:1.5}

/* ── 能力项 ────────────────────────────────────────────────────────────── */
.cap{
  display:grid;grid-template-columns:16px 1fr;gap:9px;align-items:start;
  border:1px solid var(--line);border-radius:9px;padding:9px 11px;cursor:pointer;background:#fff;
}
.cap:hover{background:var(--bg-2)}
.cap.on{border-color:#666;background:#fcfcfc}
.cap-name{font-size:12.5px;font-weight:600;line-height:1.45}
.cap-desc{font-size:11.5px;color:var(--text-3);line-height:1.55;margin-top:2px}
.cap-group{margin-bottom:14px}
.cap-group:last-child{margin-bottom:0}
.cap-group-name{font-size:11.5px;color:var(--text-3);margin:0 0 8px;display:flex;align-items:center;gap:8px}
.cap-group-name::after{content:"";flex:1;height:1px;background:var(--line-2)}

/* ── 模式选择（radio 卡） ──────────────────────────────────────────────── */
.mode{border:1px solid var(--line);border-radius:9px;padding:10px 12px;cursor:pointer;background:#fff}
.mode:hover{background:var(--bg-2)}
.mode.on{border-color:#666;background:#fcfcfc}
.mode-t{font-size:12.5px;font-weight:600;display:block;line-height:1.45}
.mode-d{font-size:11.5px;color:var(--text-3);line-height:1.55;display:block;margin-top:3px}

/* ── 进度与输出 ────────────────────────────────────────────────────────── */
.bar{height:3px;background:var(--line-2);border-radius:3px;overflow:hidden;margin:10px 0 6px}
.bar>i{display:block;height:100%;background:#666;width:0;transition:width .3s ease}
.status{font-size:11.5px;color:var(--text-3);line-height:1.6;min-height:19px}

.chapter{border-top:1px solid var(--line-2);padding:16px 0 2px}
.chapter:first-child{border-top:none;padding-top:2px}
.chapter h3{margin:0 0 8px;font-size:13.5px;font-weight:700;letter-spacing:.2px}
.chapter p{margin:0 0 10px;font-size:13px;line-height:1.95;color:var(--text-2);white-space:pre-wrap}

/* ── 空态 ──────────────────────────────────────────────────────────────── */
.empty{text-align:center;padding:46px 24px;border:1px dashed var(--line);border-radius:12px;background:#fff}
.empty .e-icon{margin:0 auto 12px;display:block;opacity:.5}
.empty h3{margin:0 0 6px;font-size:14px;font-weight:700}
.empty p{margin:0 auto;font-size:12.5px;color:var(--text-3);line-height:1.7;max-width:420px}
.empty .e-acts{margin-top:16px;display:flex;gap:8px;justify-content:center}

/* ── 提示条 ────────────────────────────────────────────────────────────── */
.notice{
  border:1px solid var(--line);border-left:2px solid #9aa3b2;background:var(--bg-2);
  border-radius:8px;padding:9px 12px;font-size:12px;color:var(--text-2);line-height:1.7;margin-bottom:14px;
}
.notice b{font-weight:700}
.notice.warn{border-left-color:#b42318}

/* ── 弹层 ──────────────────────────────────────────────────────────────── */
.mask{position:fixed;inset:0;background:rgba(24,28,36,.34);display:flex;align-items:center;justify-content:center;z-index:80;padding:20px}
.dlg{background:#fff;border-radius:12px;padding:20px 22px;width:100%;max-width:560px;max-height:86vh;overflow:auto;box-shadow:0 18px 48px rgba(16,24,40,.22)}
.dlg-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.dlg-head h3{margin:0;font-size:14px;font-weight:700;flex:1}

.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:8px;margin-bottom:14px}
.kpi{background:var(--bg-2);border:1px solid var(--line-2);border-radius:9px;padding:9px 11px}
.kpi b{display:block;font-size:17px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums}
.kpi span{font-size:11px;color:var(--text-3)}

.legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:12px}
.legend i{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--text-2);font-style:normal}

.toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.sep{width:1px;height:16px;background:var(--line);margin:0 4px}

/* 成组按钮「不拆行」：把一组必须并排的按钮包成**一个整体** —— 整体可以换行（父容器 wrap），
   但组内永不拆开。用于「下载 Markdown + 下载 Word」这类配对操作。
   （手机窄屏实测 2026-09-26：不加这个，第二个按钮会被夹在一行末尾挤下去 —— 用户报障。）
   · max-width:100% + overflow-x:auto = 兜底：极端窄屏下组最多被压到容器宽、组内微滚
     （与窄屏 .tabs 的既有横滚模式同一路数），页面本身绝不横向溢出。 */
.btnrow{display:inline-flex;align-items:center;gap:6px;flex-wrap:nowrap;max-width:100%;overflow-x:auto}
.btnrow>button{white-space:nowrap}

/* ── 窄屏：导航折到顶部 ────────────────────────────────────────────────── */
@media (max-width:920px){
  .app{flex-direction:column}
  .side{width:100%;flex:0 0 auto;height:auto;position:sticky;top:0;z-index:40;border-right:none;border-bottom:1px solid var(--line)}
  .brand{padding:12px 14px}
  .nav{flex-direction:row;overflow-x:auto;padding:8px 10px 10px;gap:6px}
  .nav-cap{display:none}
  .nav-item{width:auto;white-space:nowrap;padding:6px 11px}
  .nav-badge{display:none}
  .side-foot{display:none}
  .main{padding:18px 14px 60px}
  .grid2{grid-template-columns:1fr}
  .field-row{grid-template-columns:1fr;gap:5px}
  .field-row .grow{min-width:0}
  .field-hint{padding-left:0}
  /* 窄屏：作品切换器收成一枚小胶囊，别把吸顶条撑高 */
  .wk{padding:0 14px 10px}
  .wk-btn{width:auto;max-width:100%;display:inline-flex;padding:6px 10px}
  .wk-pop{left:14px;right:14px}
  .wk-cards{grid-template-columns:1fr}
  /* 原在设定集页里的窄屏规则（随组件样式一起提到全站） */
  .sub-row{grid-template-columns:1fr 1fr}
  .tabs{overflow-x:auto}
  .tab{white-space:nowrap;flex:0 0 auto}
  
}

/* ── 当前作品切换器（常驻侧栏；多作品：一眼看到"我现在在哪部作品里"） ───── */
.wk{padding:10px 12px 2px;position:relative}
.wk-btn{
  width:100%;display:flex;align-items:center;gap:7px;padding:8px 10px;
  border:1px solid var(--line);border-radius:var(--radius);background:#fff;
  cursor:pointer;font-family:inherit;text-align:left;line-height:1.4;
}
.wk-btn:hover{background:var(--slot)}
.wk-btn:focus-visible{outline:none;box-shadow:var(--focus-ring)}
.wk-cap{font-size:10.5px;color:var(--text-3);letter-spacing:.3px;flex:0 0 auto}
.wk-name{font-size:12.5px;font-weight:600;color:var(--text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-caret{width:10px;height:6px;flex:0 0 10px;color:var(--text-3)}
.wk-pop{
  position:absolute;left:12px;right:12px;top:100%;z-index:70;background:#fff;
  border:1px solid var(--line);border-radius:10px;padding:8px;
  box-shadow:0 12px 30px rgba(16,24,40,.14);
}
.wk-cap2{font-size:10.5px;color:var(--text-3);padding:2px 6px 6px;letter-spacing:.3px}
.wk-list{max-height:262px;overflow-y:auto}
.wk-it{display:block;padding:6px 8px;border-radius:7px;text-decoration:none;color:var(--text-2)}
.wk-it:hover{background:var(--slot)}
.wk-it.on{background:var(--slot-on)}
.wk-it-n{display:block;font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-it-m{display:block;font-size:11px;color:var(--text-3);margin-top:1px}
.wk-none{font-size:12px;color:var(--text-3);line-height:1.7;padding:4px 8px 8px}
/* （2026-09-30 的过程记录，最终口径见下面那条 ★）
   这里折行过两次，根因都是**按钮内部的文字折行**：原始 flex 没管住 `white-space`；
   我一度改成"各自一行"（grid 单列）能对齐但弹窗变高 ⇒ 用户拍板缩短文案后**回到一行**。 */
/* ★ 2026-09-30 用户拍板：把「管理全部作品」缩成「管理全部」⇒ **两个按钮一行就放得下**
   （实测需要 176px / 可用 211px，余量 35px）⇒ 回到一行；
   并**锁死 `white-space:nowrap`** —— 这才是"不许在按钮内部折行"那条真正的修法
   （历史上这里折过两次，都栽在按钮内部的文字折行上）。 */
.wk-foot{display:flex;justify-content:space-between;gap:6px;border-top:1px solid var(--line-2);margin-top:6px;padding-top:6px}
/* ⚠ 2026-09-30 用户报：「管理全部」比「＋ 新建作品」粗。
   根因：它们一个是 `<a>`、一个是 `<button>` —— 浏览器的 `<button>` **默认用系统 UI 字体**，
   和旁边的链接**不是一个字族** ⇒ 看着就是一粗一细（不是真的加粗）。
   ⇒ .btn3 一律 `font-family:inherit`，并把弹窗底部这一组锁成同一个字重。 */
.btn3{font-family:inherit}
/* 弹窗底部两个动作（「＋ 新建作品」「管理全部 >」）—— 这条口径是几轮改出来的，写清楚免得再退回去：
   · **一个字族**：`.btn3` 一律 `font-family:inherit`（浏览器的 `<button>` 默认用系统 UI 字体，和旁边的 `<a>` 不是一个字族）。
   · **一条基线/中心**：按键本身是**弹性容器 + 垂直居中**，文字与符号都按**中心**对齐（不依赖各自基线）。
   · **同粗**：这一组 `font-weight:400`（2026-10-01 用户反馈之前 500/600「太粗」）。
   · **符号都用字符**：＋ 与 > 都是现成字符（不画 SVG —— 画了就要额外处理字族/基线/宽度，那是成本不是效果）。
   · **去掉链接下划线**：`<a>` 默认带下划线，旁边的 `<button>` 没有 ⇒ 两个不像一套。 */
.wk-foot .btn3{white-space:nowrap;flex:0 0 auto;font-weight:400;display:inline-flex;align-items:center;gap:4px}
.wk-foot .btn3,.wk-foot .btn3:hover{text-decoration:none}
/* 符号口径（2026-10-03 用户定，按他自己产品手册的规范：去别处 ⇒ 大胶囊 + `›` 表下钻）：
   **用字符 ›，不用 > 、也不用中括号**；上次的问题是"太小" ⇒ 放大到 16px。
   ⚠ 纵向位置**不靠猜**：用 canvas 量"墨迹中心 vs 按键内容中心"定出来的 ——桌面 1280 与手机 430 实测**都是偏低 1.3~1.5px** ⇒ 统一上移 1px。
   ⚠ 用**整数** 1px 而不是 1.4px：子像素位移会把 16px 的字渲染糊，留 0.3~0.5px 残差更划算。 */
/* ⚠ 2026-10-01 用户："半角的 + > 看着比中间线低一点" —— canvas 实测确实偏低：
   两个符号的墨迹中心 247.3，而**按钮内容中心 246.1 / 文字中心 246.0** ⇒ **低 1.2~1.3px**。
   原因是字体度量本身：`( ascent − descent ) / 2 − ( 墨迹上 − 墨迹下 ) / 2` 是个**与行高无关的固定偏移**
   （改 line-height 没用）⇒ 只能显式挪。用 **整数 `top:-1px`**（不用小数 transform：子像素会把字形渲染糊）。 */

/* （2026-10-01 过程记录，**已撤**）曾给 `>` 单独上移 1px 去对齐全角 `＋`
   —— 那是"全角＋ / 半角>"混用时代的补丁。用户拍板「都改半角」后，两个符号同族同字身（8.11px），
   墨迹中心本来就一致 ⇒ **补丁不需要了，已删**。（留这段是提醒：混用才需要补，同族就不需要。） */
/* （2026-10-01 用户："＋ 和 新建作品 的距离，与管理全部和 > 的距离，看着有差异" ——
   当时量出视觉间距差 1.23px，用 `#wkNew{gap:2.8px}` 补过一版。
   **当天就撤掉了**：根因是全角 `＋` 的墨迹留白 2.44px 大于半角 `>` 的 0.9px；
   用户拍板「**都改半角**，这样才是从底层的统一」⇒ 两个符号留白同源，**补偿不再需要**，gap 回到统一的 4px。 */

/* ── 非打断式提示条（固定定位，**不进布局**：不会把页面几何顶偏） ─────────
   ⚠ 类名不能叫 .notice —— 全站已有 8 处 `.notice` 是**内联**提示块（浅底、在文档流里）。
     同名会让那些块被覆盖成 fixed 深色条、整页叠在一起。 */
.shell-bar{
  position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:180;
  display:flex;align-items:center;gap:10px;max-width:min(88vw,560px);
  background:#1f2329;color:#fff;font-size:12.5px;padding:8px 12px;border-radius:9px;
  box-shadow:0 10px 30px rgba(16,24,40,.26);
}
.sb-t{line-height:1.5}
.shell-bar .btn3{color:#c8ccd4;background:rgba(255,255,255,.10);flex:0 0 auto}
.shell-bar .btn3:hover{background:rgba(255,255,255,.18);color:#fff}
.sb-x{background:transparent;border:none;color:#8a93a6;cursor:pointer;font-size:12px;padding:2px 4px;font-family:inherit;flex:0 0 auto}
.sb-x:hover{color:#fff}

/* ── 作品管理页 ────────────────────────────────────────────────────────── */
.wk-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(266px,1fr));gap:12px}
.wk-card{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:15px 16px;
  display:flex;flex-direction:column;gap:9px;
}
.wk-card.on{border-color:#666}
.wk-card-h{display:flex;align-items:center;gap:8px;min-width:0}
.wk-card-t{
  font-size:14px;font-weight:700;color:var(--text);flex:1;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.wk-flag{font-size:10.5px;color:var(--text-2);background:var(--slot-on);border-radius:5px;padding:2px 6px;flex:0 0 auto}
.wk-card-m{font-size:11.5px;color:var(--text-3);line-height:1.75;font-variant-numeric:tabular-nums}
.wk-card-a{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:9px;border-top:1px solid var(--line-2)}
.wk-card-a .btn3{padding:4px 8px}
.wk-card-a .danger{color:var(--danger)}
.wk-empty{border-style:dashed;display:flex;flex-direction:column;align-items:center;gap:10px;padding:32px 16px;text-align:center}
.wk-empty h3{margin:0;font-size:14px}
.wk-empty p{margin:0;font-size:12.5px;color:var(--text-3);line-height:1.7;max-width:440px}

/* ── 共用组件（原在设定集页里，已提取到全站样式表）────────────────────
   页签 / 卡片 / 字段网格 / 分段 / 对比栏 —— 这些是共用件（Shell.tabs、Shell.form）
   的配套样式，写在单个页面里会让下一个用到它们的页面只能复制一遍。 */
  .tabs{display:flex;gap:4px;background:var(--slot);padding:4px;border-radius:10px;margin-bottom:16px}
  .tab{flex:1;border:0;background:transparent;padding:8px 14px;border-radius:8px;font-size:13px;color:#6b7280;cursor:pointer;font-family:inherit;line-height:1.4;transition:background .12s,color .12s,box-shadow .12s}
  .tab.on{background:#fff;color:var(--text);font-weight:600;box-shadow:0 1px 2px rgba(16,24,40,.10)}
  .pane{display:none} .pane.on{display:block}
  .card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:14px 16px;margin-bottom:12px}
  .card-h{display:flex;align-items:baseline;gap:9px;margin-bottom:12px;flex-wrap:wrap}
  .card-h b{font-size:13.5px}
  .card-h .sub{font-size:11.5px;color:var(--text-3)}
  .card-h .acts{margin-left:auto;display:flex;gap:2px}
  .kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}
  .fld{display:flex;flex-direction:column;gap:4px;min-width:0}
  .fld.wide{grid-column:1/-1}
  .fld label{font-size:11.5px;color:var(--text-3)}
  .fld input,.fld select,.fld textarea{width:100%;box-sizing:border-box}
  .sub-list{margin-top:10px;border-top:1px solid var(--line-2);padding-top:10px}
  .sub-row{display:grid;grid-template-columns:1fr 1fr 1fr auto auto;gap:8px;align-items:center;margin-bottom:7px}
  .sub-row input{font-size:12px}
  .stylegrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(206px,1fr));gap:10px}
  .scard{border:1px solid var(--line);border-radius:10px;padding:11px 13px;cursor:pointer;background:#fff}
  .scard:hover{background:var(--bg-2)}
  .scard.on{border-color:#666;background:#fcfcfc}
  .scard b{font-size:12.5px;display:block;line-height:1.45}
  .scard span{font-size:11.5px;color:var(--text-3);line-height:1.6;display:block;margin-top:3px}
  .cmp{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:14px}
  .cmp-c{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fff;display:flex;flex-direction:column}
  .cmp-c h4{margin:0 0 8px;font-size:12.5px}
  .cmp-c p{margin:0 0 12px;font-size:12.5px;line-height:1.9;color:var(--text-2);flex:1;white-space:pre-wrap}
  .chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
  .chip{font-size:11.5px;color:var(--text-2);background:var(--slot);border-radius:20px;padding:2px 9px}
  /* 可点的 chip（是"开关"而不是标签）：选中/未选走 .on / .off —— 与 .btn2.on · .scard.on 同一套口径。
     ⚠ 不在 JS 里拼内联 style：`style.border` 这类**简写**赋值后读回来是空串（浏览器只在四个长写都被
       显式设过时才序列化简写）⇒ 判据会假红。2026-10-07 提炼板块开关就是这么栽的，改用类。 */
  .chip.on{border:1px solid #666;background:#fcfcfc;font-weight:600}
  .chip.off{opacity:.55}
  .now{border:1px solid var(--line);border-left:2px solid #666;background:var(--bg-2);border-radius:8px;padding:10px 13px;font-size:12.5px;line-height:1.75;color:var(--text-2);margin-bottom:14px}

/* ── 分段控件（btn2 + .on）：选中的那一个要有明确信号，别只靠底色深浅 ── */
.btn2.on{background:var(--slot-on);color:var(--text);font-weight:600;border-color:#666}

/* ── 多行框：手动拉动的高度必须"整行对齐"（2026-09-26 用户报障）────────────
   用户原话："拉到最小，行的高度比正常的一行高度还低"；"应该以普通行的高度阶梯状增减"。
   ① 下限 = **一行**：1.7em 行高 + 上下内边距 7×2 + 边框 2 = 16px → 拖不出"半行"；
   ② 松手时由 shell.js 的 `snapTextarea()` 吸到**整行倍数**（12.5px × 1.7 = 21.25px/行）。
   单行字段（input/select）与多行字段（textarea）是两类控件，同类现在完全同款。 */
textarea{min-height:calc(1.7em + 16px)}

/* ── "＋ 加一个…" 按钮：必须一眼看出"这是个能点的按钮" ────────────────
   ⚠ 踩坑（用户连续两次报障"按键没有底色的"）：这类按钮原来用 .btn2，
   而 .btn2 的底色是 --slot = rgba(85,85,85,.08) —— 8% 灰，白卡片上几乎与正文同色，
   手机低亮度下等于没有底色；更早的"加一个政区"甚至是 .btn3（**完全透明**）。
   所以"加一个…"这类动作单独给一个浅底 + 细边的样式。
   ⚠ 只加这一个类，**不碰 .btn2**（.btn2 还承担分段控件未选中态的语义）。 */
.btn-add{
  background:#f1f2f4;border:1px solid #e1e3e8;color:#40464e;font-weight:500;
  padding:5px 12px;font-size:12px;border-radius:8px;cursor:pointer;
  font-family:inherit;line-height:1.4;white-space:nowrap;
}
.btn-add:hover{background:#e7e9ee;border-color:#d3d7de}
.btn-add:focus-visible{outline:none;box-shadow:var(--focus-ring)}

/* ── 逐字核对的结果标记（研习室：模型引用原文是幻觉高发区） ────────────── */
.q-ok{font-size:11px;color:var(--text-3);background:var(--slot);border-radius:5px;padding:1px 6px;margin-left:4px;white-space:nowrap}
.q-bad{font-size:11px;color:#b42318;background:rgba(180,35,24,.08);border-radius:5px;padding:1px 6px;margin-left:4px;white-space:nowrap}

/* ── 地图（世界地图页 + 设定集里的缩略图**共用这一处**） ────────────────
   铁律不变：水陆是灰阶，只有"地点类型"是彩色（那是数据）。 */
.mp-wrap{position:relative;background:var(--bg);border:1px solid var(--line-2);border-radius:10px;overflow:hidden}
.mp-svg{display:block;width:100%;height:auto}
.mp-canvas{user-select:none;touch-action:none}
.mp-land-name{paint-order:stroke;stroke:#fff;stroke-width:3.4;fill:#8a93a6;font-size:13px;letter-spacing:1px;pointer-events:none}
.mp-river-name{paint-order:stroke;stroke:#fff;stroke-width:3;fill:#a9b3bf;font-size:11px;pointer-events:none}
.mp-lab{paint-order:stroke;stroke:#fff;stroke-width:3.2;fill:#4b5563;font-size:12.5px;font-weight:500;user-select:none;pointer-events:none}
.mp-lab.on{fill:var(--text);font-weight:600}
/* ★ 编辑模式（勾了「调整形状」）下，地块名 = **这一块的抓手**（2026-10-05 用户拍板"甲"）：
   拖名字 = 移动整块、点名字 = 选中这一块。**只在编辑模式**放开命中 ——
   平时看图时名字仍不可点（点它下面的地照旧是"选中那一块"，一圈都没变）。 */
.mp-canvas.editing .mp-land-name{pointer-events:auto;cursor:move}
.mp-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--text-3);margin-top:9px}
.mp-legend span{display:inline-flex;align-items:center}
.mp-legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px}
.mp-legend i.ln{display:inline-block;width:14px;height:0;border-top:2px dashed var(--mp-road);border-radius:0}
.mp-legend i.lr{display:inline-block;width:14px;height:0;border-top:2.5px solid var(--mp-river);border-radius:0}
.mp-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:9px}
.mp-card{border:1px solid var(--line);border-radius:9px;padding:9px 10px;cursor:pointer;background:var(--bg)}
.mp-card:hover{background:var(--slot)}
.mp-card.on{border-color:#9aa1ad;background:var(--slot-on)}
.mp-card .n{font-size:12.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-card .m{font-size:11px;color:var(--text-3);margin-top:3px;line-height:1.6}
.mp-cmp{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:920px){ .mp-cmp{grid-template-columns:1fr} }

/* ── 地图施工单（P1，2026-09-28）：清单里的每一条 = 一个绘制单元 ──────────────
   三态：待画 / 草稿 / 已锁定（底加深 + 勾）。UI 一律灰黑白（家族铁律：彩色只给数据）。 */
.pp-wrap{border:1px solid var(--line);border-radius:9px;overflow:hidden}
.pp-stage{border-bottom:1px solid var(--line-2)}
.pp-stage:last-child{border-bottom:none}
/* ⚠ 2026-09-30 修（用户报：「施工单每一层的 展开 / 生成这一层 / 出 3 个挑 从上到下都不在一条垂直线上，
   电脑和手机都有」）。根因：原来是 flex + 按钮组 `margin-left:auto`（**靠右**）
   ⇒ 按钮组**右端对齐、左端随"组宽"漂移**；而组宽逐层不同（「生成这一层（3）」带数字、空层不带），
   进度那格也逐层不同长（「0/3 已锁定」vs「清单里没写这一层」）⇒ 每层起点都不一样。
   改法：`grid` **固定三列**（层名 / 进度 / 按钮区）⇒ 按钮组从**同一条竖线**开始；
   组内三个按钮**各自定宽** ⇒ 三个按钮也各自在同一条竖线上（**不为对齐去加数字**）。 */
/* ⚠ 加固（2026-09-30 用户报"S2 那一层的生成这一层仍不在一条竖线上"）：
   怀疑是**浏览器把字号放大了**（最小字号/缩放）⇒ 按钮文字变长 ⇒ 某一层先被挤得换行 ⇒ 就那层偏得厉害。
   ⇒ 两道保险：① 层名/进度两列改成 **可压缩**（minmax(0,…)）⇒ 多出来的宽度由它们让，不让给按钮组；
      ② 按钮组 **不许换行**（flex-wrap:nowrap）⇒ 三个按钮永远在同一行 ⇒ 逐层的 x 必然一致。 */
.pp-head{display:grid;grid-template-columns:minmax(0,118px) minmax(0,104px) minmax(0,1fr);align-items:center;gap:8px;padding:7px 10px;background:var(--bg-2);font-size:12.5px}
.pp-head b{font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-head .sub{color:var(--text-3);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 按钮组从第三列**左端**开始（不再是靠右）——这样每一层的起点都落在同一条竖线上 */
.pp-head .pp-btns{margin-left:0;display:flex;gap:6px;flex-wrap:nowrap;justify-self:start}
/* 组内三个按钮各自定宽 ⇒ 「展开 / 生成这一层 / 出 3 个挑」也逐层对齐 */
/* ⚠ 2026-10-01 用户点破的盲点：我先前只量了**按钮框**的 x（极差 0），
   却没量**按钮里的文字**的 x —— 按钮原来是**居中**的 ⇒ 「生成这一层（3）」和「生成这一层」
   长度不同，**文字的起点就不同** ⇒ 看着"从上到下不齐"（哪一层带数字就更明显）。
   ⇒ 三个按钮里的文字一律**左对齐**（并统一左内边距）⇒ 每列的起点跨行恒定，自然对齐。 */
/* ⚠ 2026-10-01 我合并规则时**把宽度漏掉了** —— 按钮变成随文字自适应 ⇒ 空层的「生成这一层」短一点，
   后面那个「出 3 个挑」就整体前移 28px（实测 S1/S6 空层 = 682，其余 = 710）。
   ⇒ **定宽 + 左对齐 两样都要**：定宽保证三个按钮的**框**位置逐层相同，左对齐保证**文字**起点也相同。 */
.pp-head .pp-fold{width:54px}
.pp-head .pp-go{width:126px}
.pp-head .pp-var{width:150px}
.pp-head .pp-fold,.pp-head .pp-go,.pp-head .pp-var{justify-content:flex-start;text-align:left;padding-left:10px;white-space:nowrap}
/* 窄屏（手机）：改成两行 —— 上行"层名 + 进度"，下行按钮组（**左对齐** ⇒ 手机上也是逐层对齐） */
@media (max-width:700px){
  /* ⚠ 第一版我写成 `1fr auto` —— 实测窄屏下「进度」列横向极差 **38px**（逐层不齐）：
     `auto` 那列会跟着各层内容走。⇒ 改成**定宽 104px**（和宽屏同一口径）⇒ x 恒定 ✅ */
  .pp-head{grid-template-columns:minmax(0,1fr) 104px}
  .pp-head .pp-btns{grid-column:1 / -1;justify-self:start}
  /* 窄屏再收一点宽度 ⇒ 三个按钮**能并在一行**（原来 54+126+150+间隙 ≈ 342，在 430 上被挤成两行）。
     收完 48+112+138+12 = 310，在一行内还留 ~70px 余量 ✅ */
  .pp-head .pp-fold{width:48px}
  .pp-head .pp-go{width:112px}
  .pp-head .pp-var{width:138px}
}
/* 施工单每一层的「收起 / 展开」（2026-09-30）：与层内那两个按钮同族；
   「收起」「展开」都是两个字，但不同字宽仍会抖 —— 给个最小宽度，切换时按钮不跳。 */
.pp-fold{min-width:54px}
.pp-row{display:flex;align-items:center;gap:9px;padding:5px 10px;border-top:1px solid var(--line-2);font-size:12.5px}
.pp-row.on{background:var(--slot-on)}
.pp-ck{display:flex;align-items:center;margin:0}
.pp-ck input[type=checkbox]{width:14px;height:14px;margin:0;accent-color:#666666}
.pp-nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.pp-kd{font-size:11.5px;color:var(--text-3);flex:none}
.pp-st{font-size:11.5px;color:var(--text-3);flex:none;min-width:42px;text-align:right}
.pp-row.on .pp-st{color:var(--text-2);font-weight:600}
/* P2：每层一个「生成这一层」—— 一次点击 = 一次模型调用；没按到的层一个点都不会变 */
.pp-go{flex:none;font-size:11.5px;padding:2px 8px}
.pp-go:disabled{opacity:.45;cursor:default}
/* P2+（2026-09-29 加）：每条右边的「只画这条」—— 和「生成这一层」一样是个硬边界，只是范围更小。
   .pp-nm 是 flex:1，所以它会自然被推到右边；锁定的条目不给点（要重画先点掉勾）。 */
.pp-one{flex:none;font-size:11.5px;padding:2px 8px}
.pp-one:disabled{opacity:.45;cursor:default}
/* 「删掉这条」（2026-09-29）：与「只画这条」同款 —— 一行里两个按钮视觉齐整，
   不加红色（本项目灰黑白纪律；红色只留给删除语义的 × 图标） */
.pp-del{flex:none;font-size:11.5px;padding:2px 8px}
.pp-del:disabled{opacity:.45;cursor:default}

/* 出 3 个挑（v1.29）：三张缩略图**并排** + 一行小字方向名（给家长看）；挑完即收 */
.pp-var{flex:none;font-size:11.5px;padding:2px 8px}
.pp-var:disabled{opacity:.45;cursor:default}
.pp-vars{display:flex;gap:8px;align-items:stretch;padding:8px 10px;border-top:1px dashed var(--line-2);background:var(--bg-2);flex-wrap:wrap}
.pp-vt{font-size:11.5px;color:var(--text-3);flex:none;display:flex;align-items:center}
.pp-vthumb{flex:1;min-width:0;padding:4px;border:1px solid var(--line);border-radius:8px;background:var(--bg);
  cursor:pointer;display:flex;flex-direction:column;gap:4px;font:inherit;text-align:center;overflow:hidden}
.pp-vthumb:hover{border-color:#9aa1ad;background:var(--slot)}
.pp-vthumb .mp-svg{width:100%;height:auto;display:block}
.pp-vcap{font-size:11px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-vthumb.off{opacity:.55;cursor:default;align-items:center;justify-content:center}
.pp-vdead{font-size:11.5px;color:var(--text-3)}
@media (max-width:600px){
  /* 窄屏：小字标签单独占一行 —— 三张缩略图就能占满整个宽度（实测 78px → 108px，形状才看得出） */
  .pp-vt{flex:0 0 100%;padding:0 0 2px}
}

/* 体检指认（2026-09-29 加）：会呼吸的圈 —— 只出现在"该是一片、却画成了点"的地方。
   ⚠ 目标是"**不识字也能看懂**"（幼儿园大班）：靠"动"来指认，不靠写名字（他读不出"乌湖"）。
   ⚠ 双属性一起动（r + opacity）：万一某个浏览器不给 SVG 的 r 做过渡，透明度那一路仍然有效。
   ⚠ 尊重系统的"减少动效"：静态圈一样指认得出来。 */
.mp-misfit{animation:mp-breathe 1.6s ease-in-out infinite}
@keyframes mp-breathe{
  0%,100%{r:22;opacity:.5}
  50%{r:31;opacity:1}
}
@media (prefers-reduced-motion: reduce){.mp-misfit{animation:none;opacity:1}}

/* 体检条（2026-09-29 加）：给"**不识字也能看懂**"的用户 ——
   一行一个**大按钮**（点起来不费劲），左边一个 CSS 画的图示（小实心点 + 虚线大圈 = "它会长开"）。
   ⚠ 故意不用 emoji：整体是极简风格，emoji 会跳出来；用 CSS 画，颜色也跟着令牌走。
   ⚠ 主文案只有一句短话，具体是哪几处放在副标题里（那是给大人看的，小孩看圈就行）。 */
.mp-fixbar{margin-top:10px}
.mp-fixbar .mp-fixbtn{display:flex;align-items:center;gap:13px;width:100%;text-align:left;cursor:pointer;
  padding:14px 18px;border:2px solid var(--mp-misfit);border-radius:12px;background:#fff8ee;color:#7a4205;
  font-size:16px;font-weight:600;line-height:1.35}
.mp-fixbar .mp-fixbtn:hover{background:#ffefd9}
.mp-fixbar .mp-fixbtn:active{transform:translateY(1px)}
.mp-fixic{width:34px;height:34px;flex:none;position:relative}
.mp-fixic::before{content:'';position:absolute;left:13px;top:13px;width:8px;height:8px;border-radius:50%;background:var(--mp-misfit)}
.mp-fixic::after{content:'';position:absolute;left:0;top:0;width:31px;height:31px;border-radius:50%;
  border:2px dashed var(--mp-misfit);opacity:.7}
.mp-fixbar .mp-fixsub{display:block;font-size:12.5px;font-weight:400;color:#a1651a;margin-top:4px}
/* 选中一块陆地后的操作条（2026-09-29）：与体检条同族 —— **大按钮、短词**，不识字也按得动。
   ⚠ 灰黑白纪律：主按钮仍是全站那套实心 #666（.btn），其余 .btn3；不引新色。 */
.mp-landbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;
  padding:11px 14px;border:2px solid #cfd4db;border-radius:12px;background:var(--bg-2)}
.mp-lbname{font-size:13.5px;color:var(--text);flex:none}
.mp-lbname .mp-lbn{font-size:11.5px;color:var(--text-3);font-weight:400;margin-left:8px}
.mp-lbacts{display:flex;gap:7px;flex-wrap:wrap}
.mp-lbacts .btn,.mp-lbacts .btn3{font-size:13px;padding:8px 15px}
.mp-lbhint{flex-basis:100%;font-size:11.5px;color:var(--text-3);margin-top:2px}
/* 「删除地物」打开时的状态（2026-09-29）：实心深灰 —— 一眼看出"现在点图上就会删"。
   灰黑白纪律：只有深浅，不引红色（红色留给删除语义的 × 图标）。 */
#mpDelOn.on{background:#666666;color:#fff;border-color:#666666}
/* ⚠ 2026-09-30：原本这里给「同步方式」加过一个通用的 `.btn3.on`（把按钮当选中态用）——
   当天就撤掉了：产品里**已经有分段胶囊**（`.tabs` / `.tab` / `.tab.on`，见 _layout），
   再留一套"独立按钮当选项"的外观，等于让人以为有两种选择控件。**一个交互只留一种外观。** */
/* ══ P1 冲突裁决（2026-09-30 用户定的方向：不做算法判断，摆出来让用户挑）══
   一条提示 + 一个并排挑的面板。缩略图复用施工单那边已验过的 .pp-vthumb / .pp-vars。
   灰黑白纪律：提示条用中性灰底，主按钮实心深灰；**不用橙色/红色**（那不是"错误"，是要你做个选择）。 */
.mp-cfbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;
  padding:12px 14px;border:2px solid #cfd4db;border-radius:12px;background:var(--bg-2)}
.mp-cfbar b{font-size:14px;color:var(--text)}
.mp-cfhint{font-size:12px;color:var(--text-3);line-height:1.5;flex:1;min-width:180px}
.mp-cfbar .btn{flex:none}
.mp-pickbox{margin-top:10px;padding:12px 14px;border:2px solid #cfd4db;border-radius:12px;background:var(--bg-2)}
.mp-pkhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.mp-pkhead b{font-size:14px}
.mp-pkhead .btn3{margin-left:auto;flex:none}
.mp-pkrow{padding:10px 0;border-top:1px solid var(--line-2)}
.mp-pkrow:first-of-type{border-top:none}
.mp-pkname{font-size:13px;font-weight:600;color:var(--text);margin-bottom:8px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-pkrow .pp-vars{margin-top:0}
@media (max-width:600px){
  /* 窄屏：两版仍然并排（并排才有可比性），只是缩一点 */
  .mp-pkrow .pp-vthumb{min-width:0}
}
/* ══ 编辑锁定（2026-09-30 用户要的）══════════════════════════════════════════
   ① 锁住的地物：**编辑模式下**加虚线描边 —— 一眼看出"这块动不了"（它本来也没有手柄）。
      ⚠ 只在编辑模式加（页面按 editOn 才把锁定名单传给引擎）⇒ 平时看图/出图零痕迹。
   ② 弹出列表：与其它状态条同族（大勾选框、一行一个），灰黑白。 */
.mp-land.mp-lock{stroke-dasharray:7 5;stroke-opacity:.85}
  max-height:46vh;overflow:auto}
.pp-empty{color:var(--text-3)}
.pp-empty .pp-kd{flex:1;white-space:normal}
/* P3：缝隙标记（只在「调整形状」开着时才画）。细虚线 + 一截加宽的透明命中线 ——
   缝本身只有几像素，不加宽根本点不中；hover 时把细线加粗当作反馈。 */
.mp-gap-hit:hover ~ .mp-gap{stroke-width:3.4}

/* ── 打印 / 导出长故事 ─────────────────────────────────────────────────── */
@media print{
  .side,.toolbar,.no-print,.shell-bar{display:none !important}
  .main{padding:0;max-width:none}
  body{background:#fff}
  .panel{border:none;padding:0}
  .chapter{break-inside:avoid}
}
