/* =========================================================
   AI 创意工作室 — 奶油海报主题（克隆 T8-penguin-canvas 视觉）
   奶油纸底 + 深棕描边 + 黄色标题栏 + 药丸控件 + 青色运行条
   ========================================================= */
:root {
  --paper: #f1e5c4;
  --paper-deep: #e9d8a8;
  --panel: #faf3dd;
  --panel-2: #fdf8ea;
  --ink: #3a2a14;
  --ink-soft: #7a6544;
  --ink-faint: #a08a62;
  --line: #3a2a14;
  --yellow: #eec95f;
  --yellow-deep: #e2b23e;
  --teal: #2ba7a8;
  --teal-deep: #1f8485;
  --red: #d4552f;
  --green: #4e9b5f;
  --radius: 16px;
  --radius-sm: 12px;
  --hard: 4px 5px 0 rgba(58, 42, 20, .28);
  --hard-strong: 4px 5px 0 rgba(58, 42, 20, .55);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 500px at 75% -8%, rgba(255, 244, 214, .9) 0%, rgba(255, 244, 214, 0) 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--teal-deep); text-decoration: none; }
::selection { background: rgba(43, 167, 168, .3); }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px;
  border-bottom: 2px solid var(--line);
  background: var(--panel);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; }
.brand:visited { color: var(--ink); }
.brand .logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--yellow); border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 18px;
  box-shadow: 2px 3px 0 rgba(58, 42, 20, .5);
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-soft); }
.topbar .spacer { flex: 1; }
.topbar .btn-ghost {
  background: var(--panel-2); border: 2px solid var(--line);
  color: var(--ink); padding: 6px 14px; border-radius: 999px;
  cursor: pointer; font-size: 13px; font-weight: 700;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .35);
}
.topbar .btn-ghost:hover { background: var(--yellow); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 22px; border-bottom: 2px solid var(--line);
  background: var(--paper-deep); position: sticky; top: 62px; z-index: 40;
}
.tab-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; width: 100%; }
.tab {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); color: var(--ink);
  background: var(--panel-2); font-size: 13px; font-weight: 600;
  white-space: nowrap; transition: .15s; user-select: none;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .3);
  position: relative;
}
.tab .ico { font-size: 15px; }
.tab:hover { background: var(--yellow); }
.tab.active { background: var(--ink); color: #fdf3d7; }
.tab .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); opacity: 0; }
.tab .external-mark { font-size: 12px; font-weight: 900; color: var(--teal-deep); }
.tab.active .dot { opacity: 1; }

/* ---------- Layout ---------- */
main { padding: 20px 22px 30px; max-width: 1340px; margin: 0 auto; }
.module { display: none; animation: fade .25s ease; }
.module.active { display: block; }
/* MJ 码图对照模块：iframe 嵌入自包含页面 */
/* 高度留够 topbar(62) + sticky 导航(113) + footer，避免整页出现滚动条：
   页面一旦滚动，iframe 顶部会钻到 sticky 导航底下，弹层顶部就被盖住点不到。 */
.mj-iframe { width: 100%; height: calc(100vh - 250px); min-height: 520px; border: 0; border-radius: 12px; background: var(--paper); display: block; }
@keyframes fade {from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; }}

/* ---------- 提示词分类 hub ---------- */
.pc { display: block; }
.pc-content { flex: 1; min-width: 0; }
.pc-pane { animation: fade .2s ease; }

/* ---------- 提示词分类二级菜单（hover 弹出 · 文字小于一级 tab · 居中） ---------- */
.subnav {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: max-content;
  min-width: 460px;
  max-width: 90vw;
  padding: 12px 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--hard);
  z-index: 60;
}
/* 透明桥接：盖住 tab 与面板之间的 8px 空隙，防止鼠标移动时 :hover 断链导致面板消失 */
.subnav::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -12px;
  height: 12px;
}
.tab[data-module="prompts"]:hover .subnav { display: flex; }
.subtab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel-2);
  color: var(--ink); font-size: 11.5px; font-weight: 600;
  white-space: nowrap; transition: .15s; user-select: none;
  box-shadow: 1px 1px 0 rgba(58, 42, 20, .25);
}
.subtab .ico { font-size: 13px; }
.subtab:hover { background: var(--yellow); }
.subtab.active { background: var(--ink); color: #fdf3d7; box-shadow: 2px 2px 0 rgba(58, 42, 20, .4); }
@media (max-width: 760px) {.pc { flex-direction: column; }}

/* ---------- 模块黄色标题栏 ---------- */
.mod-banner {
  display: flex; align-items: center; gap: 13px;
  background: var(--yellow);
  border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--hard-strong);
  padding: 12px 16px; margin-bottom: 16px;
}
.mod-banner .mod-ico {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: var(--panel-2); border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .35);
}
.mod-banner-txt { flex: 1; min-width: 0; }
.mod-banner-txt h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.mod-banner-txt p { margin: 1px 0 0; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.mod-reset {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--panel-2); border: 2px solid var(--line);
  font-size: 17px; cursor: pointer; color: var(--ink); font-weight: 700;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .35);
}
.mod-reset:hover { background: var(--paper-deep); }
.mod-reset:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(58,42,20,.35); }

/* 旧的 module-head（肖像大师）兼容成同款横幅 */
.module-head {
  background: var(--yellow);
  border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--hard-strong);
  padding: 12px 16px; margin-bottom: 16px;
}
.module-head h1 { font-size: 17px; margin: 0 0 2px; font-weight: 800; }
.module-head p { margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 600; max-width: 900px; }

.grid { display: grid; gap: 16px; }
.grid[class~="2"] { grid-template-columns: 1.15fr .85fr; }
.grid[class~="3"] { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {.grid[class~="2"], .grid[class~="3"] { grid-template-columns: 1fr; }}

/* ---------- 面板 ---------- */
.panel, .tb-panel, .tb-output, .fe-panel, .mv-panel, .pose-panel,
.fe-tabbody, .mv-stage {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--hard);
  padding: 16px;
}
.panel h3 { margin: 0 0 12px; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.panel h3 .tag { font-size: 10px; color: var(--ink-soft); font-weight: 600; }
.muted { color: var(--ink-soft); }
.hint { color: var(--ink-faint); font-size: 12px; font-weight: 500; }

/* ---------- 控件 ---------- */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; font-weight: 600; }
.tb-row > label, .tb-block, .mv-row > label, .mv-panel label, .fe-panel label:not(.fe-check),
.pose-panel label { color: var(--ink-soft); font-weight: 600; }
select, input[type=text], textarea, input[type=number] {
  width: 100%; background: var(--panel-2); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 13px; font-weight: 600; font-family: inherit;
}
textarea { resize: vertical; min-height: 70px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(212, 85, 47, .14); }
input[type=range] { width: 100%; accent-color: var(--teal); height: 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: var(--panel-2); color: var(--ink); border: 2px solid var(--line);
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 700;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .35); transition: .12s;
}
.btn:hover { background: var(--yellow); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(58, 42, 20, .35); }
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal-deep); }
.btn.primary:hover { background: var(--teal-deep); }
.btn.secondary { background: var(--yellow); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* 模块内的中/EN 提示词语言切换 */
.lang-mini {
  display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700;
  line-height: 1; background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px; cursor: pointer; color: #9b968a; user-select: none;
}
.lang-mini b { padding: 0 3px; border-radius: 999px; color: #9b968a; font-weight: 700; }
.lang-mini b.active { background: var(--teal-deep); color: #fff; }
.lang-mini i { font-style: normal; opacity: .5; }

/* 青色全宽运行条 */
.run-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 16px; padding: 13px 18px;
  background: var(--teal); color: #fff;
  border: 2px solid var(--teal-deep); border-radius: 999px;
  font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit;
  box-shadow: 3px 4px 0 rgba(58, 42, 20, .45); transition: .12s;
}
.run-bar:hover { background: var(--teal-deep); }
.run-bar:active { transform: translate(1px, 2px); box-shadow: 1px 2px 0 rgba(58, 42, 20, .45); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); border: 2px solid var(--line); color: var(--ink);
  font-size: 12.5px; font-weight: 600; transition: .12s;
  box-shadow: 1.5px 2px 0 rgba(58, 42, 20, .3);
}
.chip:hover { background: var(--yellow); }
.chip.on, .chip.active { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.chip .x { opacity: .5; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }

.cat-block { margin-bottom: 14px; }
.cat-block > .cat-title { font-size: 12px; color: var(--teal-deep); font-weight: 800; margin-bottom: 7px; letter-spacing: .3px; }
.group-row { margin-bottom: 9px; }
.group-row > .group-name { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 5px; font-weight: 700; }

/* 下拉网格（肖像 / 电影感 / 运镜 / 姿势） */
.sel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
@media (max-width: 760px) {.sel-grid { grid-template-columns: 1fr; }}
.sel-row { display: grid; gap: 4px; min-width: 0; }
.sel-row > span { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.3; }
.sel-row select { min-width: 0; }
.cat-block .sel-grid { margin-top: 8px; }

/* ---------- 提示词输出 ---------- */
.prompt-box, .tb-prompt, .mv-prompt {
  background: #fffbee; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; font-family: var(--mono); font-size: 12.5px; color: #4c3a1e;
  white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto;
}
.tb-prompt, .mv-prompt { max-height: 70vh; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 12.5px; }
.kv .k { color: var(--ink-faint); }
.kv .v { color: var(--ink); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fdf3d7; border: 2px solid var(--line);
  padding: 10px 20px; border-radius: 999px; font-size: 13px; font-weight: 700; opacity: 0;
  transition: .25s; z-index: 200; pointer-events: none; box-shadow: var(--hard-strong);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 3D canvas ---------- */
.canvas-host { width: 100%; height: 100%; min-height: 420px; border-radius: var(--radius-sm); overflow: hidden; background: #dfe3e6; position: relative; }
.canvas-host canvas { display: block; }
.canvas-host .loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; }
.slider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.slider-grid .s { display: grid; grid-template-columns: 96px 1fr 38px; gap: 8px; align-items: center; font-size: 11.5px; }
.slider-grid .s .val { color: var(--teal-deep); text-align: right; font-family: var(--mono); }

/* ---------- 姿势骨架 ---------- */
.pose-svg { width: 100%; background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm); }

/* ---------- misc ---------- */
.divider { height: 2px; background: rgba(58, 42, 20, .18); margin: 14px 0; border-radius: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.scroll-y { max-height: 460px; overflow: auto; padding-right: 4px; }
.scroll-y::-webkit-scrollbar, .pose-chips::-webkit-scrollbar, .tb-prompt::-webkit-scrollbar,
.mv-prompt::-webkit-scrollbar, .prompt-box::-webkit-scrollbar { width: 9px; }
.scroll-y::-webkit-scrollbar-thumb, .pose-chips::-webkit-scrollbar-thumb,
.tb-prompt::-webkit-scrollbar-thumb, .mv-prompt::-webkit-scrollbar-thumb,
.prompt-box::-webkit-scrollbar-thumb {
  background: rgba(58, 42, 20, .35); border-radius: 8px;
}
.count-badge, .tag { background: var(--paper-deep); color: var(--ink-soft); border: 1.5px solid rgba(58,42,20,.4); border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 700; }

.footer { text-align: center; color: var(--ink-faint); font-size: 12px; padding: 26px 22px 46px; }
.footer code { font-family: var(--mono); color: var(--ink-soft); }
/* 在线人数：加载出来前由 hidden 属性隐藏，避免出现空白占位跳动 */
.footer-stat { margin-left: 6px; color: var(--ink-faint); }
.note { background: #fff3cd; border: 2px solid var(--yellow-deep); color: var(--ink); padding: 9px 12px; border-radius: var(--radius-sm); font-size: 12px; margin-bottom: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; font-weight: 600; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.btn.xs { padding: 3px 8px; font-size: 11px; border-radius: 8px; }
.btn.w-full { width: 100%; justify-content: center; }

/* =========================================================
   各模块布局
   ========================================================= */
.tb-layout, .fe-layout, .mv-layout, .pv-layout, .pose-layout {
  display: grid; gap: 16px;
  grid-template-columns: minmax(300px, 400px) 1fr;
}
.tb-layout { grid-template-columns: 1fr minmax(320px, 430px); }
/* 关键：第二列必须写 minmax(0, 1fr)。裸的 1fr 等价于 minmax(auto, 1fr)，
   其隐式最小值是 min-content —— 结果区里的超长 URL 会顺着这条链把整列（乃至整页）顶宽，
   产生横向滚动条。minmax(0, …) 切断 min-content 的传播。 */
.pose-layout { grid-template-columns: 1fr minmax(320px, 400px); }
.mv-layout { grid-template-columns: minmax(340px, 1.05fr) minmax(300px, .95fr); }
/* 中等屏幕（约 1024～1180）：左栏收窄，给右栏结果区多留空间；
   再窄到 980 以下才整体堆成单列。 */
@media (max-width: 1180px) {
}
@media (max-width: 980px) {.tb-layout, .fe-layout, .mv-layout, .pv-layout, .pose-layout { grid-template-columns: 1fr !important; }}
.tb-row, .fe-row, .pv-row, .mv-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tb-row > label { display: block; margin-bottom: 12px; }
.tb-row > label { flex: 1; min-width: 120px; }

/* group + chips（电影感 / 运镜） */
.tb-group { margin-bottom: 14px; }
.tb-group h4 { margin: 0 0 7px; font-size: 12.5px; color: var(--ink); font-weight: 800; letter-spacing: .3px; }
.tb-chips, .fe-chips, .pv-chips, .pose-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-block { display: block; margin: 12px 0; }
.tb-block > span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; font-weight: 700; }
.tb-actions { display: flex; gap: 8px; margin-top: 14px; }

/* 运镜路线预览 */
.mv-route {
  margin-top: 14px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper-deep); padding: 10px 12px 8px;
}
.mv-route-title { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.mv-route-title .tag { font-size: 10px; }
.mv-route svg { width: 100%; display: block; }

/* 多角度：俯视机位台 */
.mv-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mv-stage { padding: 12px 14px 14px; }
.mv-stage-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.mv-stage-head .mono { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
#mv-rig { width: 100%; display: block; background: var(--paper-deep); border: 2px solid var(--line); border-radius: var(--radius-sm); }
.mv-chips3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.mv-chip3 { background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 7px 12px; box-shadow: 2px 2px 0 rgba(58,42,20,.3); }
.mv-chip3 span { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.mv-chip3 b { font-size: 12.5px; color: var(--ink); }
.mv-sliders { display: grid; grid-template-columns: 1fr; gap: 4px 14px; }
.mv-sliders .fe-slider { font-size: 12px; }
#mv-az { accent-color: var(--teal); }
#mv-el { accent-color: var(--red); }
#mv-d { accent-color: var(--yellow-deep); }

/* ---------- canvas hosts（3D 模块） ---------- */
.fe-canvas-wrap, .mv-canvas-wrap, .pv-canvas-wrap {
  width: 100%; min-height: 460px; height: 62vh; border-radius: var(--radius);
  overflow: hidden; position: relative; border: 2px solid var(--line);
  box-shadow: var(--hard);
}
.fe-canvas-wrap { background: #e3e7ea; }
.mv-canvas-wrap { background: #e3e7ea; }
.pv-canvas-wrap { background: #2c2e31; }
.fe-canvas-wrap canvas, .mv-canvas-wrap canvas, .pv-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.fe-loading, .mv-loading, .pv-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; }
.pv-loading { color: #b9b4a6; }

/* ---------- face-expression ---------- */
.fe-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fe-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.fe-tab {
  padding: 5px 13px; border-radius: 999px; cursor: pointer; border: 2px solid var(--line);
  background: var(--panel-2); color: var(--ink); font-size: 12.5px; font-weight: 700;
  box-shadow: 1.5px 2px 0 rgba(58, 42, 20, .3);
}
.fe-tab:hover { background: var(--yellow); }
.fe-tab.active { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.fe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
@media (max-width: 560px) {.fe-grid { grid-template-columns: 1fr; }}
.fe-group { font-size: 11.5px; color: var(--teal-deep); margin: 12px 0 6px; font-weight: 800; }
.fe-slider { display: grid; grid-template-columns: 92px 1fr 42px; gap: 8px; align-items: center; font-size: 11.5px; }
.fe-slider label { color: var(--ink-soft); font-weight: 700; }
.fe-slider .fe-val { color: var(--teal-deep); text-align: right; font-family: var(--mono); font-weight: 700; }
.fe-preset {
  display: inline-flex; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); border: 2px solid var(--line); color: var(--ink);
  font-size: 12px; font-weight: 600; box-shadow: 1.5px 2px 0 rgba(58,42,20,.28);
}
.fe-preset:hover { background: var(--yellow); }
.fe-preset.active { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.fe-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }

/* ---------- previs（保持深色编辑器风，贴近原版 Monoform Studio） ---------- */
#mod-previs .pv-panel { background: #2b2d31; border-color: #17181a; box-shadow: 4px 5px 0 rgba(0, 0, 0, .35); color: #e6e2d6; }
#mod-previs label { color: #b8b2a2; }
#mod-previs select, #mod-previs input[type=number], #mod-previs input[type=text] {
  background: #38393d; color: #f0ede2; border-color: #17181a;
}
#mod-previs select:focus, #mod-previs input:focus { border-color: var(--yellow); box-shadow: none; }
#mod-previs .btn { background: #3a3b40; color: #f0ede2; border-color: #17181a; box-shadow: 2px 2px 0 rgba(0,0,0,.4); }
#mod-previs .btn:hover { background: #4a4b50; }
#mod-previs .btn.primary { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
#mod-previs .chip { background: #38393d; color: #e6e2d6; border-color: #17181a; box-shadow: 1.5px 2px 0 rgba(0,0,0,.4); }
#mod-previs .chip.on, #mod-previs .chip.active { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
#mod-previs .hint, #mod-previs .muted { color: #9b968a; }
#mod-previs .divider { background: rgba(255,255,255,.12); }
#mod-previs .mod-banner { background: #3a3b40; border-color: #17181a; }
#mod-previs .mod-banner-txt h2 { color: #f0ede2; }
#mod-previs .mod-banner-txt p { color: #9b968a; }
#mod-previs .mod-ico, #mod-previs .mod-reset { background: #2b2d31; border-color: #17181a; color: #f0ede2; }
#mod-previs .mod-reset:hover { background: #4a4b50; }
.pv-timeline { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pv-osd {
  position: absolute; left: 10px; top: 10px; background: rgba(0, 0, 0, .6); color: #d8e6e0;
  padding: 4px 9px; border-radius: 6px; font-family: var(--mono); font-size: 11.5px; pointer-events: none;
}
.pv-note { font-size: 12px; color: #9b968a; margin-top: 10px; }
.pv-embed {
  position: relative; height: calc(100vh - 168px); min-height: 460px;
  border: 2px solid #17181a; border-radius: var(--radius); overflow: hidden;
  background: #15161a; box-shadow: 4px 5px 0 rgba(0, 0, 0, .35);
}
.pv-embed iframe { width: 100%; height: 100%; border: 0; display: block; background: #15161a; }
.pv-embed-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #9b968a; font-size: 13px; z-index: 2; pointer-events: none;
}
/* ---------- 白模预演：全屏工作台模式 ---------- */
body.pv-fs { overflow: hidden; }
body.pv-fs .topbar,
body.pv-fs .tabs,
body.pv-fs .footer { display: none; }
body.pv-fs main { padding: 0; max-width: none; }
body.pv-fs #mod-previs { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: #15161a; }
body.pv-fs .pv-embed { flex: 1 1 auto; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
body.pv-fs .pv-fsbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; background: #1e2024; border-bottom: 1px solid #34363b;
}
.pv-fsbar { display: none; }
.pv-fsbar-title { color: #f0ede2; font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.pv-fsbar-hint { color: #8b8f95; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-fsbar-sp { flex: 1; }
.pv-home {
  background: var(--teal); color: #fff; border: 2px solid var(--teal-deep); border-radius: 9px;
  padding: 0 15px; height: 34px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .4); white-space: nowrap;
}
.pv-home:hover { filter: brightness(1.08); }
#mod-previs .mod-reset#pv-home:hover { background: var(--teal-deep); }

/* 全屏工具条上的教程入口（新窗口打开本地 file/ 资源） */
.pv-guide, .pv-video {
  display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
  height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 800;
  white-space: nowrap; box-shadow: 2px 2px 0 rgba(0, 0, 0, .4); font-family: inherit;
}
.pv-guide { background: var(--yellow); color: #2f2413; border: 2px solid #a8791f; }
.pv-video { background: #2f3237; color: #e9edf2; border: 2px solid #4a4e55; }
.pv-guide:hover { filter: brightness(1.08); }
.pv-video:hover { background: #3a3d42; }
.pv-guide:active, .pv-video:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0, 0, 0, .4); }
@media (max-width: 780px) {.pv-fsbar-hint { display: none; }
  .pv-guide, .pv-video { padding: 0 10px; font-size: 12px; }}

/* ---------- pose ---------- */
.pose-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.pose-search {
  flex: 1; min-width: 160px; background: var(--panel-2); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13px; font-weight: 600; font-family: inherit;
}
.pose-search:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(212, 85, 47, .14); }
.pose-chips { max-height: 420px; overflow: auto; padding-right: 4px; }
.pose-chip {
  display: inline-flex; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); border: 2px solid var(--line); color: var(--ink);
  font-size: 12px; font-weight: 600; box-shadow: 1.5px 2px 0 rgba(58,42,20,.28);
}
.pose-chip:hover { background: var(--yellow); }
.pose-chip.on { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.pose-stage { display: flex; flex-direction: column; }
.pose-canvas { display: grid; place-items: center; }

/* ---------- 本地模块通用样式结束 ---------- */
/* =========================================================
   运镜右列（路线预览 + 输出）
   ========================================================= */
.cam-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cam-right .mv-route { margin-top: 0; }

/* =========================================================
   肖像大师：三列（分类导航 / 卡片网格 / 预览+角色库）
   ========================================================= */
a.btn { text-decoration: none; }
.pm3-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr) 318px; gap: 16px; align-items: start; }
.pm3-nav { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 132px; }
.pm3-nav-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 11px 13px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); font-weight: 800; font-size: 13px; cursor: pointer;
  color: var(--ink); box-shadow: 2px 2px 0 rgba(58, 42, 20, .3); font-family: inherit;
}
.pm3-nav-btn em { font-style: normal; font-size: 11px; color: var(--ink-soft); font-family: var(--mono); }
.pm3-nav-btn:hover { background: var(--yellow); }
.pm3-nav-btn.active { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.pm3-nav-btn.active em { color: rgba(255, 255, 255, .85); }

.pm3-mid {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--hard); padding: 16px; min-width: 0;
}
.pm3-mid-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pm3-mid-title h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.pm3-mid-title p { margin: 2px 0 0; }
.pm3-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
  max-height: calc(100vh - 330px); min-height: 320px; overflow: auto; padding-right: 6px;
}
.pm3-cards::-webkit-scrollbar { width: 9px; }
.pm3-cards::-webkit-scrollbar-thumb { background: rgba(58, 42, 20, .35); border-radius: 8px; }
.pm3-card {
  background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; box-shadow: 2px 2px 0 rgba(58, 42, 20, .25);
}
.pm3-card-title { font-weight: 800; font-size: 13px; color: var(--ink); }
.pm3-card .hint { margin: 1px 0 7px; }
.pm3-card select { margin-top: 2px; }
.pm3-weight { display: grid; grid-template-columns: 1fr 48px; gap: 8px; align-items: center; margin-top: 8px; }
.pm3-weight input[type=range] { height: 18px; }
.pm3-wval {
  text-align: center; font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--teal-deep); background: var(--paper-deep);
  border: 1.5px solid rgba(58, 42, 20, .4); border-radius: 7px; padding: 2px 0;
}
.pm3-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pm3-avatar { border-radius: var(--radius-sm); }
.pm-lang-toggle { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pm-lang-btn {
  border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink-soft);
  font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 7px; cursor: pointer;
  box-shadow: 1px 1px 0 rgba(58, 42, 20, .25);
}
.pm-lang-btn:hover { background: var(--yellow); }
.pm-lang-btn.active { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.pm3-lib { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow: auto; }
.pm3-lib-row {
  display: flex; align-items: center; gap: 6px; background: var(--panel-2);
  border: 1.5px solid var(--line); border-radius: 9px; padding: 5px 8px;
}
.pm3-lib-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1120px) {.pm3-layout { grid-template-columns: 150px minmax(0, 1fr); }
  .pm3-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; }}
@media (max-width: 780px) {.pm3-layout { grid-template-columns: 1fr; }
  .pm3-right { grid-template-columns: 1fr; }
  .pm3-nav { flex-direction: row; flex-wrap: wrap; position: static; }
  .pm3-cards { grid-template-columns: 1fr; max-height: none; }}

/* =========================================================
   3D 表情编辑器：深色编辑器风（左侧图标导航 / 大画布 / 右侧面板）
   ========================================================= */
#mod-face-expression .fe2-banner { background: #26282c; border-color: #101113; }
#mod-face-expression .fe2-banner .mod-ico { background: #2f3237; border-color: #101113; }
#mod-face-expression .fe2-banner .mod-banner-txt h2 { color: #f2f4f6; }
#mod-face-expression .fe2-banner .mod-banner-txt p { color: #9aa0a6; }
#mod-face-expression .mod-reset { background: #2f3237; border-color: #101113; color: #e8eaed; }
#mod-face-expression .mod-reset:hover { background: #3a3d42; }
.fe2-badge {
  background: #123c3d; border: 1.5px solid var(--teal-deep); color: #7fd8d9;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.fe2-layout { display: grid; grid-template-columns: 78px minmax(0, 1fr) 342px; gap: 14px; align-items: start; }
.fe2-rail {
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 132px;
  background: #26282c; border: 2px solid #101113; border-radius: var(--radius); padding: 8px 6px;
}
.fe2-rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: 2px solid transparent; border-radius: 10px;
  color: #b9bfc6; font-size: 10.5px; font-weight: 700; padding: 7px 2px; cursor: pointer; font-family: inherit;
}
.fe2-rail-btn .ico { font-size: 17px; }
.fe2-rail-btn:hover { background: #2f3237; color: #e8eaed; }
.fe2-rail-btn.active { background: #123c3d; border-color: var(--teal-deep); color: #7fd8d9; }
.fe2-stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fe2-canvas-wrap {
  position: relative; height: 66vh; min-height: 520px;
  background: #dfe3e6; border: 2px solid #101113; border-radius: var(--radius); overflow: hidden;
}
#fe-canvas { position: absolute; inset: 0; }
#mod-face-expression .fe-loading { color: #5b6167; }
.fe2-osd {
  position: absolute; left: 12px; top: 12px; background: rgba(20, 22, 24, .75); color: #dfe6ea;
  font-family: var(--mono); font-size: 11.5px; padding: 4px 10px; border-radius: 7px; pointer-events: none;
}
.fe2-camreset {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(20, 22, 24, .75); color: #dfe6ea; border: 1.5px solid #101113; cursor: pointer; font-size: 15px;
}
.fe2-camreset:hover { background: rgba(40, 44, 48, .9); }
.fe2-panel {
  background: #26282c; border: 2px solid #101113; border-radius: var(--radius);
  padding: 14px; color: #e6e9ec; overflow: auto; max-height: calc(100vh - 220px);
  position: sticky; top: 132px; box-shadow: 4px 5px 0 rgba(0, 0, 0, .35);
}
.fe2-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fe2-sec-head strong { font-size: 14px; color: #f2f4f6; }
.fe2-scope { display: flex; border: 2px solid #101113; border-radius: 999px; overflow: hidden; }
.fe2-scbtn { background: #2f3237; color: #cfd6dc; border: none; padding: 5px 14px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.fe2-scbtn.active { background: var(--teal); color: #fff; }
.fe2-presetgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 10px; }
.fe2-panel .fe-preset {
  background: #2f3237; border-color: #101113; color: #e6e9ec; box-shadow: none;
  justify-content: center; text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 12px;
}
.fe2-panel .fe-preset:hover { background: #3a3d42; }
.fe2-panel .fe-preset.active { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.fe2-catchips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.fe2-panel .chip { background: #2f3237; border-color: #101113; color: #cfd6dc; box-shadow: none; }
.fe2-panel .chip.on { background: var(--teal); border-color: var(--teal-deep); color: #fff; }
.fe2-rowline { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 8px; }
.fe2-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #b9bfc6; font-weight: 600; cursor: pointer; }
.fe2-check input { accent-color: var(--teal); }
.fe2-inline-select {
  width: auto; max-width: 150px; background: #2f3237; color: #e6e9ec;
  border: 2px solid #101113; border-radius: 9px; padding: 5px 8px; font-size: 12px; font-weight: 600;
}
.fe2-strength { display: grid; grid-template-columns: 64px 1fr 54px; gap: 8px; align-items: center; margin-bottom: 10px; }
.fe2-strength label { font-size: 12px; color: #b9bfc6; font-weight: 700; }
.fe2-strength input[type=range] { accent-color: var(--teal); }
.fe2-num {
  width: 100%; background: #2f3237; color: #e6e9ec; border: 1.5px solid #101113;
  border-radius: 7px; padding: 3px 6px; font-size: 12px; text-align: center; font-family: var(--mono);
}
.fe2-num::-webkit-outer-spin-button, .fe2-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fe2-actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 10px; }
.fe2-abtn {
  background: #2f3237; color: #e6e9ec; border: 2px solid #101113; border-radius: 9px;
  padding: 7px 4px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.fe2-abtn:hover { background: #3a3d42; }
.fe2-abtn.on { background: #123c3d; border-color: var(--teal-deep); color: #7fd8d9; }
.fe2-abtn:disabled { opacity: .5; cursor: default; }
/* 2026-10-10 「生成表情提示词」突出：teal 实底 + 微光描边，呼应模块主题强调色 */
#fe-prompt {
  background: var(--teal); color: #fff; border-color: var(--teal-deep);
  box-shadow: 0 0 0 2px rgba(43, 167, 168, .28), 2px 2px 0 rgba(16, 17, 19, .55);
}
#fe-prompt:hover { background: var(--teal-deep); }
#fe-prompt:active { transform: translate(1px, 1px); box-shadow: 0 0 0 2px rgba(43, 167, 168, .28); }
.fe2-channels { display: flex; flex-direction: column; gap: 6px; }
.fe2-chgroup { font-size: 11px; color: #7fd8d9; font-weight: 800; margin-top: 8px; letter-spacing: .4px; }
.fe2-slider { display: grid; grid-template-columns: 88px 1fr 52px; gap: 8px; align-items: center; }
.fe2-slider label { font-size: 12px; color: #b9bfc6; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe2-slider input[type=range] { accent-color: var(--teal); height: 18px; margin: 0; }
.fe2-colorrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.fe2-colorrow label { font-size: 12.5px; color: #b9bfc6; font-weight: 700; }
.fe2-colorrow select { width: 140px; background: #2f3237; border: 2px solid #101113; color: #e6e9ec; border-radius: 9px; padding: 5px 8px; }
.fe2-colorrow input[type=color] { width: 140px; height: 34px; padding: 2px; cursor: pointer; background: #2f3237; border: 2px solid #101113; border-radius: 9px; }
.fe2-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.fe2-batch {
  background: #2f3237; color: #e6e9ec; border: 2px solid #101113; border-radius: 12px;
  padding: 10px 18px; font-weight: 800; font-size: 13.5px; cursor: pointer; font-family: inherit;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, .4);
}
.fe2-batch:hover { background: #3a3d42; }
.fe2-batch:disabled { opacity: .5; cursor: default; }
.fe2-progress { min-height: 16px; }
.fe2-gen {
  background: var(--teal); color: #fff; border: 2px solid var(--teal-deep); border-radius: 12px;
  padding: 10px 22px; font-weight: 800; font-size: 13.5px; cursor: pointer; font-family: inherit;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, .4);
}
.fe2-gen:hover { background: var(--teal-deep); }
.fe2-gen.w-full { width: 100%; }
@media (max-width: 1120px) {.fe2-layout { grid-template-columns: 64px minmax(0, 1fr); }
  .fe2-panel { grid-column: 1 / -1; max-height: none; position: static; }}
@media (max-width: 780px) {.fe2-layout { grid-template-columns: 1fr; }
  .fe2-rail { flex-direction: row; flex-wrap: wrap; position: static; }
  .fe2-rail-btn { flex-direction: row; padding: 6px 10px; }
  .fe2-canvas-wrap { height: 46vh; }}

/* =========================================================
   导演色卡库 palette.js —— 奶油海报主题适配
   色卡全部由 CSS 按 HEX 渲染，不使用任何 PNG / 截帧
   ========================================================= */
.pl-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
.pl-search {
  flex: 1 1 320px; min-width: 220px;
  background: var(--panel-2); border: 2px solid var(--line); color: var(--ink);
  border-radius: 999px; padding: 9px 16px; font-size: 13px; font-family: inherit;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .18); outline: none;
}
.pl-search:focus { border-color: var(--teal-deep); }
.pl-stat { color: var(--ink-faint); font-size: 12px; font-weight: 600; }
.pl-chips { margin-bottom: 6px; }
.pl-count { color: var(--ink-soft); font-size: 12px; font-weight: 600; margin: 6px 0 12px; }

.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pl-card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  box-shadow: 3px 3px 0 rgba(58, 42, 20, .22); transition: transform .14s, box-shadow .14s;
}
.pl-card:hover, .pl-card:focus-visible { transform: translateY(-2px); box-shadow: 4px 5px 0 rgba(58, 42, 20, .32); outline: none; }
.pl-bar { display: flex; height: 54px; border-bottom: 2px solid var(--line); }
.pl-bar span { display: block; height: 100%; }
.pl-meta { padding: 10px 12px 4px; flex: 1; }
.pl-nm { font-size: 15px; font-weight: 800; color: var(--ink); }
.pl-nm em { font-style: normal; font-weight: 600; font-size: 11.5px; color: var(--ink-faint); margin-left: 6px; }
.pl-rg { color: var(--ink-soft); font-size: 12px; font-weight: 600; margin-top: 2px; }
.pl-hexline { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.pl-hexline i { width: 18px; height: 18px; border-radius: 4px; display: block; border: 1.5px solid rgba(58, 42, 20, .35); }

.pl-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px 10px; margin-top: 4px;
}
.pl-id { font-size: 11.5px; font-weight: 700; color: var(--ink-faint); font-family: var(--mono); }
.pl-copy {
  background: var(--yellow); color: var(--ink); border: 2px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 800;
  font-family: inherit; cursor: pointer; box-shadow: 2px 2px 0 rgba(58, 42, 20, .35);
  white-space: nowrap;
}
.pl-copy:hover { background: var(--teal); color: #fff; border-color: var(--teal-deep); }
.pl-copy:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(58, 42, 20, .35); }

.pl-empty { text-align: center; color: var(--ink-faint); padding: 46px 0; font-weight: 600; }
.pl-note { color: var(--ink-faint); font-size: 12px; line-height: 1.7; margin: 18px 0 6px; padding-top: 12px; border-top: 2px dashed rgba(58, 42, 20, .2); }

.pl-scrim {
  position: fixed; inset: 0; background: rgba(58, 42, 20, .38);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 70;
}
.pl-scrim.on { opacity: 1; pointer-events: auto; }
.pl-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(540px, 100%);
  background: var(--panel); border-left: 3px solid var(--line);
  transform: translateX(100%); transition: transform .22s ease;
  overflow-y: auto; z-index: 80; box-shadow: -18px 0 50px rgba(58, 42, 20, .28);
}
.pl-drawer.open { transform: none; }
.pl-dhead { padding: 18px 22px 14px; border-bottom: 2px solid var(--line); position: relative; background: var(--paper-deep); }
.pl-dhead h3 { margin: 0; font-size: 19px; font-weight: 800; color: var(--ink); }
.pl-d-en { color: var(--ink-soft); font-size: 12.5px; font-weight: 600; letter-spacing: .4px; margin-top: 2px; }
.pl-d-tags { color: var(--ink-faint); font-size: 12px; margin-top: 6px; }
.pl-close {
  position: absolute; top: 14px; right: 16px; width: 32px; height: 32px;
  background: var(--panel-2); border: 2px solid var(--line); color: var(--ink);
  border-radius: 10px; font-size: 17px; line-height: 1; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .3);
}
.pl-close:hover { background: var(--yellow); }
.pl-dbody { padding: 16px 22px 42px; }

.pl-sec { margin-bottom: 22px; }
.pl-sec h4 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; color: var(--teal-deep); }
.pl-sw { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(58, 42, 20, .18); }
.pl-box { width: 44px; height: 44px; border-radius: 8px; flex: none; border: 2px solid var(--line); }
.pl-swinfo { flex: 1; min-width: 0; }
.pl-sw1 { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pl-sw1 code {
  font-family: var(--mono); font-size: 12px; color: var(--teal-deep); margin-left: 6px;
  cursor: pointer; background: rgba(43, 167, 168, .1); padding: 1px 5px; border-radius: 5px;
}
.pl-sw2 { color: var(--ink-faint); font-size: 12px; }
.pl-pct { color: var(--ink-soft); font-size: 13px; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.pl-kv { margin: 0 0 10px; }
.pl-k { color: var(--teal-deep); font-size: 11.5px; font-weight: 800; letter-spacing: 1px; }
.pl-v { color: var(--ink); font-size: 13px; }
.pl-avoid { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-avoid span {
  background: #f7dfd6; border: 2px solid var(--red); color: #8c3418;
  border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600;
}
.pl-copyblock {
  white-space: pre-wrap; word-break: break-word; background: var(--panel-2);
  border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px;
  font-size: 12.5px; color: var(--ink); margin: 0 0 12px; font-family: var(--sans); line-height: 1.75;
}
.pl-motion { background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }

@media (max-width: 640px) {.pl-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
  .pl-bar { height: 42px; }
  .pl-foot { flex-direction: column; align-items: stretch; gap: 6px; }
  .pl-copy { width: 100%; text-align: center; }
  .pl-drawer { width: 100%; }}

/* =========================================================
   可拖拽控件：运镜路线圆点 / 姿势线稿关节
   ========================================================= */
#mo-route-svg { touch-action: none; }
.mo-knob { cursor: grab; transition: r .12s, stroke-width .12s; }
.mo-knob:hover { stroke-width: 4; }
.mo-knob:active { cursor: grabbing; }
.mo-route-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin: 8px 0 2px;
}
.hint-inline { color: var(--ink-faint); font-size: 12px; font-weight: 600; }

.pose-canvas { touch-action: none; }
.pose-svg .pose-joint { cursor: grab; transition: stroke-width .12s; }
.pose-svg .pose-joint:hover { stroke: #d4552f; stroke-width: 3.5; }
.pose-svg .pose-joint.dragging { cursor: grabbing; stroke: #d4552f; stroke-width: 4; }

@media (max-width: 640px) {.mo-route-bar { flex-direction: column; align-items: stretch; }}
.u-nick { font-weight: 700; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-msgs {
  flex: 1; overflow-y: auto; min-height: 200px; max-height: 46vh;
  display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; margin-bottom: 10px;
}
.agent-msg {
  max-width: 86%; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 13px; white-space: pre-wrap; word-break: break-word; line-height: 1.6;
}
.agent-msg.user { align-self: flex-end; background: var(--teal); color: #fff; border: 2px solid var(--line); }
.agent-msg.assistant { align-self: flex-start; background: var(--panel-2); border: 1.5px solid rgba(58,42,20,.3); }
.agent-msg.pending { color: var(--ink-faint); font-style: italic; }
.agent-msg.agent-err { color: var(--red); }
.agent-input-row { display: flex; gap: 8px; }
.agent-input-row input {
  flex: 1; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 13px; background: var(--panel-2); color: var(--ink); font-family: inherit;
}
.agent-input-row input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---------- 提示词库 (prompt-hub) ---------- */
.ph { display: flex; flex-direction: column; gap: 14px; }
.ph-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: var(--panel-2); color: var(--ink);
  font-size: 12.5px; font-weight: 700; transition: .15s; user-select: none;
}
.ph-tab:hover { background: var(--yellow); }
.ph-tab.active { background: var(--ink); color: #fdf3d7; }
.ph-head-meta { font-size: 11px; color: var(--ink-faint); margin-left: auto; }
.ph-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ph-meta { font-size: 11px; color: var(--ink-faint); }
.ph-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-chip {
  border: 1.5px solid var(--line); background: var(--panel-2); border-radius: 999px;
  padding: 3px 10px; font-size: 11px; cursor: pointer; color: var(--ink-soft); font-weight: 600;
}
.ph-chip small { opacity: .65; margin-left: 2px; }
.ph-chip:hover { background: var(--yellow); }
.ph-chip.active { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.ph-card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: .15s; box-shadow: 2px 2px 0 rgba(58,42,20,.18);
  display: flex; flex-direction: column;
}
.ph-card { position: relative; }
.ph-card:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 rgba(58,42,20,.28); }
.ph-play {
  position: absolute; left: 7px; top: 7px; z-index: 2;
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(20,20,24,.78); color: #ffd76a; border: 1px solid rgba(255,215,106,.5);
  pointer-events: none;
}
.ph-poster { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #16161a; display: block; }
.ph-poster-none { display: grid; place-items: center; font-size: 30px; color: #6b6b74; }
.ph-card-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ph-card-title { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.35; }
.ph-card-sum { font-size: 11px; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.ph-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ph-tag {
  font-size: 10px; padding: 1.5px 7px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600;
}
.ph-heat { background: #fdece0; border-color: #eec49f; color: #a35b2a; }
/* 生图模型标签：与视频模型区分开，提示「它只出图，不出成片」 */
.ph-tag-img { background: #e8f1fb; border-color: #b7d3f0; color: #2c5d94; }
/* 去重开关：开启时高亮，提示当前正在隐藏重复提示词 */
.ph-btn-on {
  background: var(--teal-deep, #2c7a6b) !important; border-color: var(--teal-deep, #2c7a6b) !important;
  color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
/* 工具栏下方的模型语义说明 */
.ph-hint {
  font-size: 11px; line-height: 1.6; color: var(--ink-soft); margin: 2px 0 8px;
  padding: 7px 10px; border-left: 3px solid var(--teal-deep, #2c7a6b);
  background: var(--panel-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ph-hint b { color: var(--ink); }
.ph-modal-note {
  font-size: 11.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 8px;
  padding: 7px 10px; background: var(--panel-2); border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}
.ph-empty { text-align: center; color: var(--ink-faint); padding: 30px 0; font-size: 13px; }
.ph-more-wrap { text-align: center; margin: 12px 0; }

/* 详情弹层 */
.ph-modal-mask {
  position: fixed; inset: 0; background: rgba(58,42,20,.5); z-index: 220;
  display: grid; place-items: center; padding: 20px;
}
.ph-modal {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--hard); width: min(760px, 94vw); max-height: 86vh;
  display: flex; flex-direction: column; animation: fade .2s ease;
}
.ph-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 2px solid var(--line);
}
.ph-modal-head b { font-size: 14.5px; }
.ph-modal-body { padding: 14px 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ph-modal-poster { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--line); }

/* 案例视频播放器 */
.ph-video-wrap { display: flex; flex-direction: column; gap: 6px; }
.ph-video {
  width: 100%; max-height: 380px; background: #0d0d10; border: 2px solid var(--line);
  border-radius: var(--radius-sm); display: block;
}
.ph-video-note {
  font-size: 11.5px; line-height: 1.6; color: #8a5a2b;
  background: #fdf1e2; border: 1px solid #eec49f; border-radius: var(--radius-sm); padding: 6px 9px;
}
.ph-modal-sum { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; margin: 0; }
.ph-modal-sub { font-size: 11.5px; color: var(--ink-faint); margin: 0; }
.ph-modal-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.ph-prompt-wrap { border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); overflow: hidden; }
.ph-prompt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; border-bottom: 1.5px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--ink-soft);
}
.ph-prompt {
  margin: 0; padding: 10px 12px; font-size: 12px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow-y: auto;
  font-family: inherit; color: var(--ink);
}
.ph-modal-links { display: flex; gap: 14px; font-size: 12px; }
.ph-modal-links a { color: var(--teal-deep); font-weight: 700; }
.ph-sec { font-size: 12.5px; line-height: 1.7; }
.ph-sec b { display: block; margin-bottom: 4px; font-size: 12.5px; }
.ph-sec ul { margin: 0; padding-left: 18px; }
.ph-sec-warn b { color: #a35b2a; }

/* 风格模板 */
.ph-styles-head { font-size: 11.5px; color: var(--ink-faint); }
.ph-styles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ph-style-card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; transition: .15s; box-shadow: 2px 2px 0 rgba(58,42,20,.18);
  display: flex; flex-direction: column; gap: 6px;
}
.ph-style-card:hover { transform: translateY(-2px); background: var(--yellow); }
.ph-style-cat { font-size: 10.5px; font-weight: 800; color: var(--teal-deep); letter-spacing: .5px; }
.ph-style-title { font-size: 14px; font-weight: 800; color: var(--ink); }
.ph-style-title-en { font-size: 11px; color: var(--ink-faint); }
.ph-style-desc { font-size: 11.5px; color: var(--ink-soft); line-height: 1.6; flex: 1; }
.ph-style-tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* 提示词源 */
.ph-src-intro { font-size: 12px; color: var(--ink-soft); line-height: 1.7; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.ph-src-note { margin-top: 6px; font-size: 11px; color: #a35b2a; }
.ph-src-list { display: flex; flex-direction: column; gap: 8px; }
.ph-src-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; flex-wrap: wrap;
}
.ph-src-info { display: flex; flex-direction: column; gap: 2px; }
.ph-src-info b { font-size: 13px; }
.ph-src-info small { font-size: 11px; color: var(--ink-faint); }
.ph-src-ops { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ph-src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; }
.ph-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
/* Seedance 2.0 提示词已并入案例库统一池（标签 chip 筛选）；选中 chip 时显示来源说明行 */
.ph-ym-note {
  margin: 8px 0 2px; padding: 7px 12px;
  border: 2px dashed var(--yellow-deep); border-radius: 10px;
  background: var(--panel-2); font-size: 12px; color: var(--ink-soft); font-weight: 600;
}
.ph-ym-note a { color: var(--teal-deep); font-weight: 700; }
.ph-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 2px; }
.ph-pager-info { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }

/* ---------- AI 创作（前台直连 OpenAI 兼容接口） ---------- */
.aigc { display: flex; flex-direction: column; gap: 12px; }
.aigc-bar {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border: 2px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--hard); padding: 12px 14px;
}
.aigc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.aigc-field > span { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); }
.aigc-field > span small { font-weight: 600; color: var(--ink-faint); }
.aigc-grow { flex: 1 1 220px; }
.aigc-bar-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.aigc-note {
  margin: 0; font-size: 11.5px; color: var(--ink-faint); line-height: 1.6;
}
.aigc-note code {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px; font-size: 11px;
}
.aigc-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.aigc-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: var(--panel-2);
  color: var(--ink); font-size: 12.5px; font-weight: 700;
  box-shadow: 2px 2px 0 rgba(58, 42, 20, .28); transition: .15s;
}
.aigc-tab:hover { background: var(--yellow); }
.aigc-tab.active { background: var(--ink); color: #fdf3d7; border-color: var(--ink); box-shadow: var(--hard-strong); }
.aigc-body, .aigc-results { min-width: 0; }
.aigc-pane {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--panel); border: 2px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--hard); padding: 14px;
}
.aigc-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.aigc-ta { width: 100%; min-height: 76px; resize: vertical; font-family: inherit; line-height: 1.6; }
.aigc-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.aigc-submit-row { align-items: center; }
.aigc-status { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.aigc-tag {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--yellow); border: 1.5px solid var(--line); color: var(--ink);
}
.aigc-tag-dim { background: var(--panel-2); color: var(--ink-faint); }
.aigc-thumb { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.aigc-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 2px solid var(--line); }
.aigc-x { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--ink-soft); }
.aigc-res-head { font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.aigc-card {
  background: var(--panel); border: 2px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--hard);
  padding: 12px; margin-bottom: 12px; animation: fade .2s ease;
}
.aigc-card-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 800; margin-bottom: 8px;
}
.aigc-card-head small { font-weight: 600; color: var(--ink-faint); }
.aigc-pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-size: 12.5px; line-height: 1.7; background: var(--panel-2);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 10px;
}
.aigc-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.aigc-img { display: flex; flex-direction: column; gap: 6px; }
.aigc-img img {
  width: 100%; border-radius: 8px; border: 2px solid var(--line); background: var(--panel-2);
}
.aigc-img-ops { display: flex; gap: 6px; }
.aigc-err { border-color: #b3402f; }
.aigc-err .aigc-card-body { font-size: 12.5px; color: #b3402f; line-height: 1.6; word-break: break-word; }
.aigc-meta { font-size: 11px; color: var(--ink-faint); margin-top: 6px; word-break: break-all; }
.aigc-modal { max-width: 640px; max-height: 86vh; overflow: auto; }
@media (max-width: 760px) {.aigc-bar { align-items: stretch; }}

/* =========================================================
   移动端适配 · 方案 A（轻量排雷：纯 CSS，不动结构与 JS）
   ========================================================= */
@media (max-width: 600px) {
  /* 1) 横向溢出兜底：任何区块不超出视口 */
  html, body { overflow-x: hidden; }
  main { padding: 14px 12px 28px; }

  /* 2) 顶部 tab：两行布局；移动端每行单独横向滑动（省屏高） */
  .tabs { overflow: visible; }
  .tab-row {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
    -webkit-overflow-scrolling: touch; padding: 2px 4px; gap: 7px;
    scrollbar-width: none;
  }
  .tab-row::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding: 9px 14px; }

  /* 3) 触摸目标放大 + 字号上调一档 */
  body { font-size: 14px; }
  .tab, .subtab, .topbar .btn-ghost,
  select, input[type=text], textarea, input[type=number] { font-size: 13px; }
  .subtab { padding: 8px 13px; }
  select, input[type=text], textarea, input[type=number] { padding: 11px 12px; }
  .mod-reset { width: 40px; height: 40px; }
  .pm3-nav-btn { padding: 12px 13px; }
  .pose-chip { padding: 7px 13px; font-size: 13px; }
  .fe2-rail-btn { padding: 9px 4px; }

  /* 4) 3D 表情：三列 → 单列（手机必塌，否则 342px 列撑出横向溢出） */
  .fe2-layout { grid-template-columns: 1fr; }
  .fe2-rail { flex-direction: row; flex-wrap: wrap; position: static; }
  .fe2-panel { position: static; max-height: none; }

  /* 5) 画布高度适配手机视口（避免被地址栏挤压变形） */
  .fe2-canvas-wrap { height: 60vh; min-height: 380px; }
  .pv-embed { height: calc(100vh - 220px); }
  .mj-iframe { height: calc(100vh - 215px); min-height: 420px; }

  /* 6) 文本更可读 */
  .hint, .muted { font-size: 12.5px; }
}

/* =========================================================
   新增 6 工具模块样式（台词密度 / 分镜拆解 / AB对照 / 角色锁定 / 色卡取色 / 素材库）
   ========================================================= */

/* ---- 通用：新模块内两栏与面板微调用 ---- */
.ld-grid, .sb-grid, .ab-grid { display: grid; gap: 16px; }
.ld-grid, .sb-grid, .ab-grid { grid-template-columns: 1fr 1fr; }
.btn-ghost { background: var(--panel-2); border: 2px solid var(--line); color: var(--ink); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 700; box-shadow: 2px 2px 0 rgba(58,42,20,.35); display: inline-flex; align-items: center; gap: 6px; }
.btn-ghost:hover { background: var(--yellow); }

/* 1) 台词密度 */
.ld-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ld-mode { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ld-sec { width: 72px; }
.ld-secwrap { font-size: 13px; font-weight: 600; }
.ld-hint { font-size: 12px; color: var(--ink-soft); flex-basis: 100%; }
.ld-summary { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.ld-stat { background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; flex-direction: column; min-width: 86px; }
.ld-stat b { font-size: 20px; font-weight: 800; }
.ld-stat span { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.ld-stat.ld-big { border-width: 3px; }
.ld-stat.ld-ok { border-color: var(--green); } .ld-stat.ld-ok b { color: var(--green); }
.ld-stat.ld-warn { border-color: var(--yellow-deep); } .ld-stat.ld-warn b { color: var(--yellow-deep); }
.ld-stat.ld-bad { border-color: var(--red); } .ld-stat.ld-bad b { color: var(--red); }
.ld-list { display: flex; flex-direction: column; gap: 7px; }
.ld-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-left: 4px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 12.5px; }
.ld-row.ld-ok { border-left-color: var(--green); }
.ld-row.ld-warn { border-left-color: var(--yellow-deep); }
.ld-row.ld-bad { border-left-color: var(--red); }
.ld-idx { font-weight: 800; color: var(--ink-soft); min-width: 20px; }
.ld-line { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-meta { color: var(--ink-soft); white-space: nowrap; }

/* 2) 分镜拆解 */
.sb-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; }
.sb-prefix { width: 160px; }
.sb-out { display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow: auto; padding-right: 4px; }
.sb-card { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--panel-2); box-shadow: 2px 2px 0 rgba(58,42,20,.2); }
.sb-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sb-card-h .tag { margin-left: auto; }
.sb-copy { margin-left: 4px; }
.sb-prompt { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: var(--panel); border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 11px; white-space: pre-wrap; word-break: break-word; }
.sb-dlg { margin-top: 6px; font-size: 12.5px; color: var(--teal-deep); font-weight: 600; }

/* 3) AB 对照 */
.ab-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ab-stat { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.ab-strat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.ab-strat select { width: auto; padding: 5px 8px; font-size: 12.5px; }
.ab-out { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; font-family: var(--mono); font-size: 12.5px; }
.ab-out > div { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 7px; overflow: hidden; }
.ab-ca, .ab-cb { padding: 6px 10px; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.ab-same .ab-ca, .ab-same .ab-cb { background: var(--panel-2); }
.ab-rm { box-shadow: inset 4px 0 0 var(--red); }
.ab-rm .ab-ca { background: #f6cfc2; font-weight: 700; }
.ab-rm .ab-cb { background: var(--panel); color: var(--ink-soft); }
.ab-ad { box-shadow: inset 4px 0 0 var(--green); }
.ab-ad .ab-cb { background: #cdeadc; font-weight: 700; }
.ab-ad .ab-ca { background: var(--panel); color: var(--ink-soft); }
.ab-chg { box-shadow: inset 4px 0 0 var(--red); }
.ab-chg .ab-ca { background: #f6cfc2; }
.ab-chg .ab-cb { background: #cdeadc; }
.ab-x { background: #e88f6d; color: #fff; text-decoration: line-through; border-radius: 2px; padding: 0 1px; }
.ab-y { background: #5cae74; color: #fff; border-radius: 2px; padding: 0 1px; }
.ab-tag { position: absolute; right: 6px; top: 5px; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; color: #fff; z-index: 2; }
.ab-tag.diff { background: var(--red); } .ab-tag.onlya { background: var(--red); } .ab-tag.onlyb { background: var(--green); }

/* 4) 角色锁定 */
.cl-wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.cl-views { display: flex; flex-direction: column; gap: 10px; }
.cl-states-h { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; margin: 4px 0 8px; }
.cl-states { display: flex; flex-direction: column; gap: 8px; }
.cl-state-row { display: flex; gap: 8px; align-items: center; }
.cl-state-row input { flex: 1; }
.cl-delstate { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 700; }
.cl-actions { display: flex; gap: 10px; margin-top: 12px; }
.cl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.cl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cl-card { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--panel-2); box-shadow: 2px 2px 0 rgba(58,42,20,.2); }
.cl-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cl-card-ops { margin-left: auto; display: flex; gap: 6px; }
.cl-card-ops button { border: 1.5px solid var(--line); background: var(--panel); border-radius: 7px; padding: 2px 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.cl-desc { font-size: 12.5px; line-height: 1.5; color: var(--ink); word-break: break-word; }
.cl-views-mini, .cl-states-mini { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cl-views-mini span, .cl-states-mini span { font-size: 11px; background: var(--paper-deep); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--ink-soft); }
.cl-copydesc { margin-top: 9px; width: 100%; border: 2px solid var(--line); background: var(--panel); border-radius: 9px; padding: 6px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.cl-copydesc:hover { background: var(--yellow); }

/* 5) 色卡取色 */
.sp-bar { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; }
.sp-hex { flex: 1; }
.sp-out { display: flex; flex-direction: column; gap: 14px; }
.sp-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-sw { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.sp-chip { width: 36px; height: 36px; border-radius: 7px; border: 1.5px solid var(--line); display: inline-block; }
.sp-sw code { font-family: var(--mono); font-size: 12.5px; font-weight: 700; }
.sp-css { border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); padding: 12px; }
.sp-css-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sp-css-h span { font-weight: 800; font-size: 14px; }
.sp-css pre { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: var(--panel); border: 1.5px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; }

/* 6) 素材库 */
.al-drop { border: 2px dashed var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 26px; text-align: center; color: var(--ink-soft); margin-bottom: 14px; }
.al-drop.al-over { background: var(--yellow); border-color: var(--yellow-deep); }
.al-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.al-card { border: 2px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel-2); box-shadow: 2px 2px 0 rgba(58,42,20,.2); }
.al-thumb { height: 130px; background: var(--paper-deep); display: grid; place-items: center; font-size: 28px; }
.al-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-meta { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.al-name { font-weight: 700; }
.al-ops { display: flex; gap: 6px; }
.al-ops button { flex: 1; border: 1.5px solid var(--line); background: var(--panel); border-radius: 7px; padding: 5px; font-size: 12px; font-weight: 700; cursor: pointer; }
.al-ops .al-copy:hover { background: var(--yellow); }
.al-ops .al-dl:hover { background: #cfe3f5; }

/* 7) 台词密度补充：SD2.5 参考 + 无台词行 */
.ld-sd25 { margin-bottom: 14px; }
.ld-sd25 summary { cursor: pointer; font-weight: 800; font-size: 13.5px; color: var(--teal-deep); }
.ld-sd25 ul { margin: 10px 0 2px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.ld-sd25 b { color: var(--red); }
.ld-muted { color: var(--ink-soft); opacity: .7; }
.ld-row.ld-muted-row { border-left-color: var(--line); opacity: .75; }

/* 8) 分镜拆解：台词密度徽章 */
.sb-density { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; border: 1.5px solid var(--line); }
.sb-density.sb-ok { background: #dcefe0; border-color: var(--green); color: #2f6f3d; }
.sb-density.sb-warn { background: #f7ecd0; border-color: var(--yellow-deep); color: #8a6a14; }
.sb-density.sb-bad { background: #f6cfc2; border-color: var(--red); color: #9c3a1d; }
.sb-muted { opacity: .65; font-weight: 400; }

/* ---- 新增模块移动端适配 ---- */
@media (max-width: 600px) {
  .ld-grid, .sb-grid, .ab-grid { grid-template-columns: 1fr; }
  .cl-wrap { grid-template-columns: 1fr; }
  .cl-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .al-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .sb-out { max-height: none; }
  .ab-out { max-height: none; }
  .sp-bar { flex-direction: column; }
  .ld-summary { gap: 8px; }
  .ld-stat { min-width: 72px; flex: 1; }
}

/* ---------- 取色器：色卡库同款 Seedance 色卡 ---------- */
.sp-card {
  background: var(--panel-2); border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 14px 6px; margin-top: 14px; box-shadow: 3px 3px 0 rgba(58, 42, 20, .2);
}
.sp-card-h { font-size: 13px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.pl-sw-list { display: flex; flex-direction: column; gap: 8px; }
.sp-copy-btns { display: inline-flex; gap: 6px; }
.sp-copyblock-wrap { margin-top: 14px; }
.sp-copyblock-wrap pre { margin: 0; }
@media (max-width: 600px) {.sp-copyblock-wrap .sp-css-h { flex-direction: column; align-items: flex-start; gap: 8px; }}

/* ---------- 导演色卡子页签（色卡库 / 取色器） ---------- */
.pl-subtabs { display: flex; gap: 8px; margin-bottom: 14px; }
.pl-subtab {
  border: 2px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 6px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
  font-weight: 700; box-shadow: 2px 2px 0 rgba(58, 42, 20, .3); transition: .15s;
}
.pl-subtab:hover { background: var(--yellow); }
.pl-subtab.on { background: var(--ink); color: #fdf3d7; }

/* ---------- 取色器：参考图 + 占比色块 ---------- */
.sp-count { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); align-self: center; }
.sp-count select { background: var(--panel-2); border: 2px solid var(--line); color: var(--ink); border-radius: 8px; padding: 4px 6px; font-weight: 700; }
.sp-refwrap { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.sp-ref { width: 190px; max-width: 42vw; border-radius: 10px; border: 2px solid var(--line); box-shadow: 2px 2px 0 rgba(58, 42, 20, .25); display: block; }
.sp-grid-grow { flex: 1; min-width: 220px; }
.sp-pct { font-size: 12px; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {.sp-ref { width: 100%; max-width: none; }}

/* ---------- 2026-10-09 肖像大师：风格统一化控件 ---------- */
.pm-stylelock {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.pm-stylelock label { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pm-stylelock select {
  flex: 1; min-width: 120px;
  background: var(--panel-2); border: 2px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 5px 8px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.pm-stylelock select:hover { background: var(--yellow); }
.pm-styleinfo { margin-top: 4px; margin-bottom: 2px; font-size: 12px; font-weight: 700; }
.pm-styleinfo.ok { color: #2f7d4f; }
.pm-styleinfo.warn { color: #b4462f; }
.pm-avatar-title { margin-top: 12px; }
@media (max-width: 600px) {.pm-stylelock select { flex: 1 1 100%; }}

/* ---------- 2026-10-09 3D表情：操作按钮移至面板顶部 ---------- */
.fe2-actions-top { margin-bottom: 12px; }
.fe2-actions-top .fe2-batch { flex: 1; padding: 9px 10px; font-size: 12.5px; }
.fe2-actions-top .fe2-abtn { flex: 1; }

/* ---------- 2026-10-09 分镜拆解：角色绑定 chips（联动角色锁定板） ---------- */
.sb-cast { padding: 10px 14px; }
.sb-cast-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sb-cast-h b { font-size: 13.5px; }
.sb-cast-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sb-cast-chip {
  border: 2px solid var(--line); background: var(--panel-2); color: var(--ink);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 2px 2px 0 rgba(58, 42, 20, .25); transition: .12s;
}
.sb-cast-chip:hover { background: var(--yellow); }
.sb-cast-chip.on { background: var(--ink); color: #fdf3d7; }
.sb-cast-card .sb-card-h b { color: var(--ink); }

/* ---------- 2026-10-09 图片灵感（在线生图提示词库） ---------- */
.ih-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; }
.ih-bar .pose-search { flex: 1; min-width: 160px; margin: 0; }
.ih-bar select { background: var(--panel-2); border: 2px solid var(--line); color: var(--ink); border-radius: 8px; padding: 6px 8px; font-weight: 700; }
.ih-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 14px; }
.ih-card { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 3px 3px 0 rgba(58,42,20,.22); cursor: pointer; transition: transform .12s; display: flex; flex-direction: column; }
.ih-card:hover { transform: translateY(-2px); }
.ih-imgwrap { aspect-ratio: 1; background: var(--paper-deep); display: flex; align-items: center; justify-content: center; }
.ih-imgwrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ih-noimg { font-size: 40px; opacity: .4; }
.ih-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ih-title { font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ih-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ih-tag { font-size: 11px; font-weight: 800; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 8px; background: var(--panel-2); }
.ih-tag-m { background: var(--teal); color: #fff; border-color: var(--teal-deep); }
.ih-prompt { font-size: 12px; color: var(--ink-soft); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ih-ops { margin-top: auto; display: flex; gap: 8px; }
.ih-ops .btn-ghost { padding: 5px 10px; font-size: 12px; }
.ih-more { text-align: center; margin: 16px 0; }
.ih-mtags { display: flex; gap: 6px; flex-wrap: wrap; }
.ih-full { white-space: pre-wrap; word-break: break-word; background: var(--panel-2); border: 2px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.65; max-height: 320px; overflow-y: auto; }
@media (max-width: 600px) {.ih-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }}

/* ---------- 2026-10-10 合规体检 ---------- */
.md-layout { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.1fr); gap: 16px; }
@media (max-width: 980px) {.md-layout { grid-template-columns: 1fr; }}
.md-col { min-width: 0; }
.md-col textarea { width: 100%; box-sizing: border-box; background: var(--panel-2); border: 2px solid var(--line); border-radius: 10px; padding: 10px; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink); resize: vertical; }
.md-meta { font-size: 11.5px; color: var(--ink-faint); font-weight: 700; margin-bottom: 8px; }
.md-cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.md-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.md-cat input { margin: 0; }
.md-verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); margin-bottom: 14px; }
.md-verdict.md-ok { background: #eef7ef; }
.md-verdict.md-yellow { background: #fff6e0; }
.md-verdict.md-red { background: #fdecea; }
.md-badge { font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 3px 11px; border: 1.5px solid var(--line); white-space: nowrap; }
.md-badge.ok { background: #d7f0da; }
.md-badge.yellow { background: var(--yellow); }
.md-badge.red { background: #f6b7b0; }
.md-vtxt { font-size: 12px; color: var(--ink-soft); font-weight: 600; line-height: 1.5; }
.md-block { margin-bottom: 14px; }
.md-block-h { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin-bottom: 6px; }
.md-preview, .md-clean { min-height: 90px; max-height: 260px; line-height: 1.8; }
mark.md-hit { border-radius: 4px; padding: 0 2px; font-weight: 800; }
mark.md-red { background: #f6b7b0; color: #6b1d16; }
mark.md-yellow { background: var(--yellow); color: #4c3a1e; }
.md-hitlist { max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.md-item { background: var(--panel-2); border: 2px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.md-item .md-catname { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); margin-left: 6px; }
.md-item .md-count { font-size: 11px; font-weight: 800; color: var(--ink-faint); margin-left: 4px; }
.md-ctx { font-family: var(--mono); font-size: 12px; color: var(--ink); margin: 6px 0 4px; word-break: break-word; line-height: 1.6; }
.md-alt { font-size: 11.5px; color: var(--ink-soft); line-height: 1.55; }
.md-empty { font-size: 12px; color: var(--ink-faint); padding: 8px 2px; }

/* ---------- 2026-10-10 对比模块底部合规带 ---------- */
.ab-mod-h { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin-bottom: 10px; }
.ab-mod-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) {.ab-mod-row { grid-template-columns: 1fr; }}
.ab-mod-card { background: var(--panel-2); border: 2px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ab-mod-top { display: flex; align-items: center; justify-content: space-between; }
.ab-mod-name { font-size: 13px; font-weight: 800; color: var(--ink); }
.ab-mod-sub { font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; min-height: 16px; }

/* ---------- 2026-10-10 合规体检·目标平台预设 ---------- */
.md-platbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.md-plat { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.md-plat select { font: inherit; font-weight: 700; padding: 5px 9px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.md-tip { flex: 1; min-width: 200px; font-size: 11.5px; font-weight: 600; line-height: 1.5; color: var(--ink-faint); }
.ab-mod-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ab-mod-plat { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.ab-mod-plat select { font: inherit; font-weight: 700; padding: 3px 8px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }

/* ---------- 2026-10-10 顶栏 AI生成 外链按钮 ---------- */
.topbar-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 800; text-decoration: none; color: #fff; background: var(--teal); border: 2px solid var(--teal-deep); border-radius: 999px; padding: 7px 16px; box-shadow: 2px 2px 0 rgba(58,42,20,.35); white-space: nowrap; }
.topbar-cta:hover { background: var(--teal-deep); transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(58,42,20,.35); }
.topbar-cta .external-mark { font-size: 12px; font-weight: 900; }

/* ---------- 2026-10-10 对比模块·历史存档 ---------- */
.ab-hist-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ab-hist-name { flex: 1; min-width: 150px; background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--ink); font-size: 13px; }
.ab-hist-name:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.ab-hist-sel { background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--ink); font-size: 13px; min-width: 200px; flex: 1; }

/* ---------- 2026-10-10 合规体检·我的词库 ---------- */
.md-custom { margin-top: 14px; }
.md-custom > details { background: var(--panel-2); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.md-custom summary { cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--ink); }
.md-custom-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.mdc-in { flex: 1; min-width: 130px; background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--ink); font-size: 13px; }
.mdc-in:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.md-custom-form select { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
.md-custom-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.md-citem { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; }
.md-citem b { color: var(--ink); }
.md-citem .md-alt { color: var(--ink-soft); font-size: 11.5px; }
.mdc-del { margin-left: auto; border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 14px; font-weight: 700; }
.mdc-del:hover { color: #c0392b; }
.md-custom-ops { margin-top: 8px; }
