/* 工作台外壳：标题栏、菜单页签与功能区、左停靠窗（模型树 / 任务历史 / 检查器）、视图窗口、消息区、状态栏、弹出菜单、命令面板、对话框、提示。 */

/* 图标分类色 */
.c-blue { color: var(--c-blue); }
.c-orange { color: var(--c-orange); }
.c-green { color: var(--c-green); }
.c-teal { color: var(--c-teal); }
.c-purple { color: var(--c-purple); }
.c-red { color: var(--c-red); }
.c-gray { color: var(--c-gray); }
.c-brand { color: var(--brand); }
.ic { display: block; flex: none; }

/* 细滚动条（桌面版窗口里默认是粗的系统滚动条，和工作台的密排版不协调） */
* { scrollbar-width: thin; scrollbar-color: #c4c6ca transparent; }
*:hover { scrollbar-color: #a9adb3 transparent; }

/* ---------------------------------------------------------------- 骨架：标题栏 + 主体（工作台在下层，智能体界面在上层，见 stage.css） */
.sh-app {
  display: grid; grid-template-rows: var(--h-title) minmax(0, 1fr);
  height: 100vh; min-width: 1200px; min-height: 600px; background: var(--chrome); overflow: hidden;
}
.sh-body { position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.sh-work { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) var(--h-status); min-width: 0; background: var(--chrome); }
.sh-main { display: grid; grid-template-columns: var(--w-left) minmax(0, 1fr); min-height: 0; min-width: 0; }
.sh-app.no-left .sh-main { grid-template-columns: 22px minmax(0, 1fr); }

/* ---------------------------------------------------------------- 标题栏 */
.sh-title { position: relative; display: flex; align-items: center; height: var(--h-title); padding: 0 8px 0 7px; background: var(--chrome); user-select: none; z-index: 30; }
.sh-appic { display: flex; align-items: center; margin-right: 6px; }
/* 智能体 / 工作台 切换 */
.sh-stage { display: flex; align-items: center; gap: 2px; height: 24px; padding: 2px; margin-right: 6px; border-radius: 6px; background: rgba(0, 20, 220, 0.05); border: 1px solid rgba(0, 20, 220, 0.10); }
.sh-stage button {
  position: relative; display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 10px; border: none; border-radius: 4px;
  background: none; color: var(--ink2); font-size: var(--fs-sm); white-space: nowrap;
}
.sh-stage button:hover { color: var(--brand); background: rgba(255, 255, 255, 0.7); }
.sh-stage button.on { background: var(--field); color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 20, 120, 0.16); }
.sh-stage button .ic { color: currentColor; }
.sh-stage-dot { position: absolute; top: 2px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: pulseb 1.6s infinite; }
/* 桌面版：标题行兼做窗口拖动区，右侧留给系统的最小化 / 最大化 / 关闭按钮 */
.is-desktop .sh-title { -webkit-app-region: drag; padding-right: 0; }
.is-desktop .sh-title button, .is-desktop .sh-title input, .is-desktop .sh-title a, .is-desktop .sh-title kbd { -webkit-app-region: no-drag; }
.sh-winctl { flex: none; height: 100%; margin-left: 8px; }
.is-desktop .sh-doc { max-width: calc(100% - 2 * 470px); }
.is-desktop .sh-pal { right: calc(var(--winctl, 0px) + 8px); }
.sh-qat { display: flex; align-items: center; gap: 1px; padding-left: 4px; border-left: 1px solid var(--sep); }
.sh-qb { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--icon); }
.sh-qb:hover { background: var(--hover); border-color: var(--hover-edge); }
.sh-qb:active { background: var(--press); border-color: var(--press-edge); }
.sh-doc {
  position: absolute; left: 50%; top: 0; height: var(--h-title); transform: translateX(-50%); max-width: calc(100% - 2 * 330px);
  display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; overflow: hidden;
}
.sh-doc .dt { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sh-doc .da { color: var(--ink2); flex: none; }
.sh-badge { flex: none; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--r-sm); font-size: var(--fs-xs); border: 1px solid; line-height: 1; }
.sh-badge.caution { background: var(--caution-bg); color: var(--caution-ink); border-color: var(--caution-edge); }
.sh-badge.info { background: #e5f5f8; color: #16788f; border-color: #b4dfe8; }
.sh-badge.mute { background: var(--sunken); color: var(--ink2); border-color: var(--line); }
.sh-cmd {
  margin-left: auto; display: flex; align-items: center; gap: 6px; width: 300px; height: 23px; padding: 0 4px 0 7px;
  background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink3); font-size: var(--fs-sm); text-align: left;
}
.sh-cmd:hover { border-color: var(--accent); }
.sh-cmd .ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-cmd .ic { color: var(--ink3); }

/* ---------------------------------------------------------------- 页签与功能区 */
.sh-rib-wrap { background: var(--chrome); }
.sh-tabs { display: flex; align-items: flex-end; height: var(--h-tabs); padding: 0 6px 0 0; }
.sh-tablist { display: flex; align-items: flex-end; height: 100%; }
.sh-tab {
  position: relative; height: 24px; padding: 0 13px; border: 1px solid transparent; border-bottom: none; background: none;
  font-size: var(--fs-sm); color: var(--ink); border-radius: var(--r-sm) var(--r-sm) 0 0; white-space: nowrap;
}
.sh-tab:hover { color: var(--accent-ink); background: rgba(255, 255, 255, 0.55); }
.sh-tab.on { background: var(--panel); border-color: var(--line); color: var(--accent-ink); height: 25px; margin-bottom: -1px; z-index: 1; }
.sh-tab.file { height: 26px; margin: 0 6px 0 0; padding: 0 16px; background: var(--accent-ink); color: #fff; border-radius: 0; border: none; }
.sh-tab.file:hover { background: #224a85; color: #fff; }
.sh-tabs-sp { flex: 1; }
.sh-ctx { font-size: var(--fs-xs); color: var(--ink3); margin-right: 8px; align-self: center; white-space: nowrap; }
.sh-tabs-tool { width: 22px; height: 20px; align-self: center; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--ink2); }
.sh-tabs-tool:hover { background: var(--hover); border-color: var(--hover-edge); }

.sh-ribbon {
  display: flex; height: var(--h-ribbon); padding: 2px 4px 0; background: var(--panel);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden;
}
.sh-app.rib-min .sh-tabs { border-bottom: 1px solid var(--line); }
.rb-g { display: flex; flex-direction: column; padding: 0 3px; border-right: 1px solid var(--line-soft); flex: none; }
.rb-gb { flex: 1; display: flex; align-items: flex-start; gap: 1px; padding-top: 1px; min-height: 0; }
.rb-gt { height: 15px; line-height: 14px; text-align: center; font-size: var(--fs-xs); color: var(--ink3); white-space: nowrap; }
.rb-big {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 46px; max-width: 74px; height: 64px;
  padding: 5px 5px 2px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; font-size: var(--fs-sm); line-height: 1.2; color: var(--ink); text-align: center;
}
.rb-big .rb-ic { position: relative; height: 30px; display: flex; align-items: center; justify-content: center; }
.rb-big .rb-lb { margin-top: 3px; white-space: nowrap; }
.rb-stack { display: flex; flex-direction: column; padding: 0 1px; }
.rb-sm {
  display: flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px 0 3px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; font-size: var(--fs-sm); white-space: nowrap; color: var(--ink); text-align: left;
}
.rb-big:hover, .rb-sm:hover { background: var(--hover); border-color: var(--hover-edge); }
.rb-big:active, .rb-sm:active { background: var(--press); border-color: var(--press-edge); }
.rb-big.on, .rb-sm.on { background: var(--sel); border-color: var(--press-edge); }
.rb-big.dis, .rb-sm.dis { color: var(--ink4); }
.rb-big.dis .rb-ic, .rb-sm.dis .rb-ic { color: var(--ink4); }
.rb-big.dis:hover, .rb-sm.dis:hover, .rb-big.dis:active, .rb-sm.dis:active { background: none; border-color: transparent; }
.rb-badge {
  position: absolute; top: -3px; right: -9px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 10px; font-style: normal; line-height: 15px; text-align: center; box-shadow: 0 0 0 1.5px var(--panel);
}

/* ---------------------------------------------------------------- 左停靠窗 */
.sh-left { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border-right: 1px solid var(--line); border-top: 1px solid var(--line-soft); }
.sh-lrail {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border: none; border-right: 1px solid var(--line);
  background: var(--panel); color: var(--ink2); font-size: var(--fs-xs); writing-mode: vertical-rl;
}
.sh-lrail:hover { background: var(--hover); }
.sh-lrail .ic { writing-mode: horizontal-tb; }
.dk-pane { display: flex; flex-direction: column; min-height: 0; }
.dk-pane.top { flex: 1 1 54%; min-height: 140px; border-bottom: 1px solid var(--line); }
.dk-pane.bottom { flex: 1 1 46%; min-height: 170px; }
.dk-tabs { display: flex; align-items: flex-end; height: 25px; padding: 0 4px; background: var(--chrome); border-bottom: 1px solid var(--line); flex: none; gap: 1px; }
.dk-tabs > button:not(.dk-tool) {
  height: 22px; padding: 0 9px; border: 1px solid transparent; border-bottom: none; background: none; font-size: var(--fs-sm); color: var(--ink2);
  border-radius: var(--r-sm) var(--r-sm) 0 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
}
.dk-tabs > button:not(.dk-tool):hover { color: var(--accent-ink); }
.dk-tabs > button.on { background: var(--panel); border-color: var(--line); color: var(--ink); height: 23px; margin-bottom: -1px; }
.dk-tabs.sm > button:not(.dk-tool) { padding: 0 7px; }
.dk-sp { flex: 1; }
.dk-tool { width: 22px; height: 20px; align-self: center; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--ink2); flex: none; }
.dk-tool:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-edge); }
.dk-tool:disabled { color: var(--ink4); }
.dk-cnt { font-size: 10.5px; color: var(--ink3); background: var(--sunken); border: 1px solid var(--line-soft); border-radius: 7px; padding: 0 5px; line-height: 13px; }
.dk-cnt.warn { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-edge); }
.dk-treewrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dk-filter { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px; border-bottom: 1px solid var(--line-soft); color: var(--ink3); flex: none; }
.dk-filter input { flex: 1; height: 21px; border-color: var(--line-soft); font-size: var(--fs-sm); }
.dk-blank { padding: 12px 10px; color: var(--ink3); font-size: var(--fs-sm); line-height: 1.6; }
.dk-blank.err { color: var(--danger); }
.dk-sect { margin: 10px 0 4px; font-size: var(--fs-xs); color: var(--ink3); }

.sh-tree { flex: 1; min-height: 0; overflow: auto; padding: 2px 0 6px; }
.sh-tree .tr {
  display: flex; align-items: center; gap: 4px; height: 22px; padding-right: 6px; font-size: var(--fs-sm); white-space: nowrap;
  border: 1px solid transparent; margin: 0 2px; border-radius: var(--r-sm); color: var(--ink);
}
.sh-tree .tr:hover { background: var(--hover); border-color: var(--hover-edge); }
.sh-tree .tr.sel { background: var(--sel); border-color: var(--press-edge); }
.sh-tree .tw { width: 12px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--ink3); }
.sh-tree .ti { flex: none; display: flex; }
.sh-tree .tsw { width: 10px; height: 10px; border-radius: 2px; margin: 0 3px; flex: none; }
.sh-tree .tl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sh-tree .ts { color: var(--ink3); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sh-tree .ct { margin-left: auto; color: var(--ink3); font-size: var(--fs-xs); padding-left: 6px; }
.sh-tree .grade { margin-left: auto; }
.sh-tree .tv { margin-left: auto; font-variant-numeric: tabular-nums; font-size: var(--fs-xs); color: var(--ink2); padding-left: 6px; }
.sh-tree .tv.ok { color: var(--success); }
.sh-tree .tv.bad { color: var(--danger); }
.sh-tree .tst { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ink4); }
.tst.st-converged { background: #2c9a45; }
.tst.st-failed { background: var(--danger); }
.tst.st-running { background: var(--accent); animation: blink 1.2s infinite; }
.sh-tree .tb, .tb { flex: none; font-size: 10.5px; line-height: 15px; padding: 0 4px; border-radius: var(--r-sm); border: 1px solid; white-space: nowrap; }
.sh-tree .tb { margin-left: auto; }
.sh-tree .tst + .tb, .sh-tree .grade + .tb, .sh-tree .ct + .tb { margin-left: 4px; }
.k-ok { background: var(--success-bg); color: var(--success); border-color: var(--success-edge); }
.k-wait { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-edge); }
.k-bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-edge); }
.k-warn { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-edge); }
.k-run { background: var(--info-bg); color: var(--accent-ink); border-color: var(--info-edge); }
.k-mute { background: var(--sunken); color: var(--ink3); border-color: var(--line-soft); }

/* 任务历史 */
.sh-tree.hist { padding: 0; }
.hr { padding: 5px 8px 5px 8px; border-bottom: 1px solid var(--line-soft); border-left: 2px solid transparent; }
.hr:hover { background: var(--hover); }
.hr.sel { background: var(--sel); border-left-color: var(--accent); }
.hr1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.hr1 .ht { font-weight: 400; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr2 { display: flex; gap: 8px; color: var(--ink3); font-size: var(--fs-xs); margin-top: 1px; white-space: nowrap; overflow: hidden; }
.hr2 .signed { color: var(--success); }
.hr2 .show { color: var(--brand, #0014dc); }
/* 任务历史的分类页签（全部 / 我的任务 / 展示案例）+ 案例库入口 */
.dk-kinds { display: flex; align-items: center; gap: 12px; height: 28px; padding: 0 8px; border-bottom: 1px solid var(--line-soft); flex: none; }
.dk-kinds button[role="tab"] {
  display: inline-flex; align-items: center; gap: 4px; height: 27px; padding: 0; border: none; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; color: var(--ink2); font-size: var(--fs-sm); white-space: nowrap;
}
.dk-kinds button[role="tab"] i { font-style: normal; font-size: var(--fs-xs); color: var(--ink3); }
.dk-kinds button[role="tab"]:hover { color: var(--brand, #0014dc); }
.dk-kinds button[role="tab"].on { color: var(--brand, #0014dc); border-bottom-color: var(--brand, #0014dc); }
.dk-cases { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 21px; padding: 0; border: 1px solid var(--line-soft); border-radius: 0; background: none; color: var(--ink2); font-size: var(--fs-xs); }
.dk-cases:hover { border-color: var(--brand, #0014dc); color: var(--brand, #0014dc); }

/* 检查器 */
.dk-insp { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dk-ih { padding: 6px 10px 4px; border-bottom: 1px solid var(--line-soft); flex: none; }
.dk-obj { font-size: var(--fs-xl); font-weight: 300; line-height: 1.25; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-ih2 { font-size: var(--fs-xs); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-ib { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px 8px; }
.dk-props { display: grid; grid-template-columns: minmax(64px, 34%) minmax(0, 1fr); margin: 0; font-size: var(--fs-sm); }
.dk-props dt { color: var(--ink3); padding: 3px 6px 3px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-props dd { margin: 0; padding: 3px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; word-break: break-word; font-variant-numeric: tabular-nums; }
.dk-props dt.wide { grid-column: 1 / -1; border-bottom: none; padding-bottom: 0; }
.dk-props dd.wide { grid-column: 1 / -1; color: var(--ink2); line-height: 1.55; }
.dk-props dd.mono { font-family: var(--mono); font-size: var(--fs-xs); }
.dk-props dd.ok { color: var(--success); }
.dk-props dd.bad { color: var(--danger); }
.dk-list { margin-top: 6px; display: flex; flex-direction: column; }
.dk-li { display: flex; align-items: baseline; gap: 6px; padding: 3px 4px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.dk-li:hover { background: var(--hover); }
.dk-li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.dk-li b.ok { color: var(--success); }
.dk-li b.bad { color: var(--danger); }
.dk-cite { padding: 4px 2px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.dk-cite .kid { margin-right: 5px; }
.dk-diag { padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); line-height: 1.55; }
.dk-diag b { font-weight: 400; color: var(--ink3); margin-right: 5px; }
.dk-stream { padding: 5px 2px 6px; border-bottom: 1px solid var(--line-soft); }
.dk-stream:hover { background: var(--hover); }
.dk-stream .h { display: flex; align-items: baseline; gap: 5px; font-size: var(--fs-sm); }
.dk-stream .h .r { margin-left: auto; color: var(--ink2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.dk-stream .bar { display: grid; grid-template-columns: 64px minmax(0, 1fr) 58px; align-items: center; gap: 6px; font-size: var(--fs-xs); margin-top: 2px; }
.dk-stream .bar .n { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-stream .bar .b { height: 7px; background: var(--sunken); border: 1px solid var(--line-soft); overflow: hidden; }
.dk-stream .bar .b i { display: block; height: 100%; }
.dk-stream .bar .v { text-align: right; font-variant-numeric: tabular-nums; }
.dk-log { font-size: var(--fs-sm); }
.dk-lrow { display: grid; grid-template-columns: 50px 52px minmax(0, 1fr); gap: 6px; padding: 2px 2px; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.dk-lrow .ts { color: var(--ink3); font-size: var(--fs-xs); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dk-lrow .who { color: var(--ink3); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-lrow .st { color: var(--ink3); font-size: var(--fs-xs); white-space: nowrap; }
.dk-lrow .tx { min-width: 0; word-break: break-word; }
.dk-lrow.warn { background: #fffbec; }
.dk-lrow.warn .who { color: var(--warning-ink); }
.dk-lrow.error { background: #fff5f5; }
.dk-lrow.error .who, .dk-lrow.error .tx { color: var(--danger); }
.dk-lrow.wait { background: var(--brand-soft); }
.dk-lrow.wait .who, .dk-lrow.wait .tx { color: var(--brand); }
.src-tag { margin-left: 6px; font-size: 10.5px; color: var(--ink3); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 0 3px; white-space: nowrap; }
.dk-iact { flex: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 5px 8px; border-top: 1px solid var(--line-soft); background: var(--panel); }

/* ---------------------------------------------------------------- 中央视图区 */
.sh-center { display: flex; flex-direction: column; gap: var(--gutter); padding: var(--gutter); min-width: 0; min-height: 0; }
.sh-grid { flex: 1; min-height: 0; display: grid; gap: var(--gutter); }
.sh-grid.l1, .sh-grid.maxed { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.sh-grid.l2:not(.maxed) { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }
.sh-grid.l4:not(.maxed) { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.sh-vwin {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel);
  border: 1px solid var(--card-edge); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card);
}
.sh-vwin.on { border-color: #a8c9e4; }
.sh-vh { display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 3px 0 2px; background: var(--panel); border-bottom: 1px solid var(--line-soft); flex: none; user-select: none; }
.sh-vwin.on .sh-vh { box-shadow: inset 0 2px 0 var(--accent); }
.sh-vtitle {
  display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px 0 4px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; font-size: var(--fs-sm); color: var(--ink); min-width: 0; max-width: calc(100% - 30px);
}
.sh-vtitle:hover { background: var(--hover); border-color: var(--hover-edge); }
.vh-ic { display: flex; flex: none; }
.vh-t { font-weight: 600; white-space: nowrap; }
.vh-o { color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vh-dd { display: flex; color: var(--ink3); flex: none; }
.vh-sp { flex: 1; align-self: stretch; }
.sh-wb { width: 24px; height: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--ink2); flex: none; }
.sh-wb:hover { background: var(--hover); border-color: var(--hover-edge); }
.sh-vb { flex: 1; min-height: 0; min-width: 0; display: flex; position: relative; }

.vw { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sh-vbar {
  display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px; flex: none; background: var(--panel);
  border-bottom: 1px solid var(--line-soft); overflow: hidden; white-space: nowrap;
}
.sh-vsep { width: 1px; height: 16px; background: var(--line); flex: none; margin: 0 2px; }
.sh-vsp { flex: 1; min-width: 4px; }
.vb-note { font-size: var(--fs-xs); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vb-legend { font-size: var(--fs-xs); color: var(--ink3); white-space: nowrap; overflow: hidden; }
.sh-seg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); overflow: hidden; }
.sh-seg > button { height: 20px; padding: 0 8px; border: none; border-right: 1px solid var(--line-soft); background: none; font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; }
.sh-seg > button:last-child { border-right: none; }
.sh-seg > button:hover { background: var(--hover); }
.sh-seg > button.on { background: var(--sel); color: var(--accent-ink); }
.sh-seg.sm > button { height: 18px; padding: 0 6px; font-size: var(--fs-xs); }
.sh-tb {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 6px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; flex: none;
}
.sh-tb .ic { color: var(--icon); }
.sh-tb:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-edge); }
.sh-tb.on { background: var(--sel); border-color: var(--press-edge); }
.sh-tb:disabled { color: var(--ink4); }
.sh-tb:disabled .ic { color: var(--ink4); }
.sh-ddw { display: inline-flex; flex: none; }
.sh-dd { height: 22px; padding: 0 4px; font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); max-width: 220px; }
.sh-dd.wide { min-width: 170px; }
.sh-chk { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; flex: none; }
.sh-chk.off { color: var(--ink4); }
.sh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 22px; padding: 0 9px; border: 1px solid #c5c7cb;
  border-radius: var(--r-sm); background: #fdfdfd; font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; flex: none;
}
.sh-btn:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-edge); }
.sh-btn:active:not(:disabled) { background: var(--press); border-color: var(--press-edge); }
.sh-btn:disabled { color: var(--ink4); background: var(--sunken); border-color: var(--line-soft); }
.sh-btn .ic { color: var(--icon); }
.sh-btn.pri { background: var(--accent); border-color: #2f7db6; color: #fff; }
.sh-btn.pri .ic { color: #fff; }
.sh-btn.pri:hover:not(:disabled) { background: #2f7db6; }
.sh-btn.ask { background: var(--brand-soft); border-color: var(--brand-edge); color: var(--brand); }
.sh-btn.ask .ic { color: var(--brand); }
.sh-btn.ask:hover:not(:disabled) { background: #e2e6ff; border-color: var(--brand); }

.vw-main { flex: 1; min-height: 0; min-width: 0; display: flex; position: relative; }
.vw-main.split { flex-direction: column; }
.vw-main.split > .vw-canvas { flex: 1 1 60%; }
.vw-main.split > .vw-table { flex: 1 1 40%; min-height: 90px; border-top: 1px solid var(--line); overflow: auto; background: var(--field); }
.vw-main.side > .vw-canvas, .vw-main.side > .vw-doc { flex: 1 1 auto; }
.vw-sidepane { flex: 0 0 36%; min-width: 260px; max-width: 420px; border-left: 1px solid var(--line); overflow: auto; background: var(--field); padding: 0; }
.vw-sidepane.doc { padding: 8px 10px; background: var(--panel); }
.vw-canvas { flex: 1; min-width: 0; min-height: 0; position: relative; }
.vw-canvas.canvas { background: var(--canvas); }
.vw-canvas.plain { background: var(--field); }
.vw-canvas > * { position: absolute; inset: 0; }
.vw-canvas > .echart { inset: 2px 2px 0 0; height: auto !important; width: auto; }
.vw-canvas > .pfd { inset: 6px 8px 18px; }
.vw-canvas > .tbl-scroll { overflow: auto; }
.vw-canvas > .vw-hint { inset: auto auto 3px 8px; font-size: var(--fs-xs); color: var(--ink3); pointer-events: none; }
.vw-doc { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 10px 14px; background: var(--field); position: relative; }
.vw-doc.flush { padding: 0; }
.vw-doc.page-doc { padding: 8px; background: var(--chrome); }
.vw-doc .vw-empty { position: static; min-height: 220px; }
.vw-table .tbl-scroll { height: 100%; }
.vw-notice { flex: none; padding: 3px 8px; font-size: var(--fs-xs); border-bottom: 1px solid; display: flex; align-items: center; gap: 8px; }
.vw-notice.warn { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-edge); }
.vw-notice.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-edge); }
.vw-stats { flex: none; display: flex; gap: 2px 18px; flex-wrap: wrap; padding: 4px 10px; border-bottom: 1px solid var(--line-soft); background: var(--field); font-size: var(--fs-xs); }
.vw-stats .st { display: flex; gap: 5px; align-items: baseline; white-space: nowrap; }
.vw-stats .k { color: var(--ink3); }
.vw-stats b { font-weight: 600; font-variant-numeric: tabular-nums; }
.vw-stats b.ok { color: var(--success); }
.vw-stats b.bad { color: var(--danger); }
.vw-legend { padding: 6px 8px; font-size: var(--fs-xs); color: var(--ink3); line-height: 1.6; border-top: 1px solid var(--line-soft); }
.vw-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px; text-align: center; }
.vw-empty-ic { color: #9fb7cf; margin-bottom: 2px; display: flex; }
.vw-empty-ic.busy { color: var(--accent); animation: blink 1.6s infinite; }
.vw-empty-t { font-size: var(--fs-md); color: var(--ink2); }
.vw-empty-x { font-size: var(--fs-sm); color: var(--ink3); max-width: 420px; line-height: 1.6; }
.pane-h { font-size: var(--fs-sm); font-weight: 600; color: var(--ink2); margin: 8px 0 4px; }
.pane-h:first-child { margin-top: 0; }
.rs-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font-size: var(--fs-xs); background: var(--warning-bg); color: var(--warning-ink); border: 1px solid var(--warning-edge); flex: none; }
.rs-chip.ok { background: var(--success-bg); color: var(--success); border-color: var(--success-edge); }
/* 设备初估表 */
.sz { max-width: 760px; }
.sz.wide { max-width: none; display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.sz.wide .sz-main { flex: 1 1 520px; max-width: 760px; min-width: 0; }
.sz-fig { margin: 0; padding: 6px 10px 8px; border: 1px solid var(--line-soft); border-radius: var(--r); background: linear-gradient(180deg, #fafbff, #eef5fd); flex: none; }
.sz-fig figcaption { font-size: var(--fs-xs); color: var(--ink3); margin-top: 2px; }
.sz-fig svg { display: block; }
.sz-t { font-size: 11px; fill: var(--ink2); font-family: inherit; }
.sz-t.b { font-weight: 600; fill: var(--ink); font-size: 12px; }
.sz-t.acc { fill: var(--accent-ink); }
.sz-t.mute { fill: var(--ink3); }
.sz-tw { cursor: pointer; }
.sz-tw:hover rect:nth-of-type(2), .sz-tw.on rect:nth-of-type(2) { stroke: var(--accent); stroke-width: 2; }
.sz-tbl th { position: static; }
.sz-tbl tr.cap th { background: var(--field); color: var(--ink); border-bottom: 1px solid var(--line-soft); height: 24px; white-space: normal; }
.sz-tbl tbody tr { cursor: default; }
.sz-tag { display: inline-block; margin-right: 6px; padding: 0 4px; line-height: 15px; font-size: 10.5px; border-radius: var(--r-sm); color: var(--caution-ink); background: var(--caution-bg); border: 1px solid var(--caution-edge); vertical-align: 1px; }
.sz-basis { margin-left: 10px; color: var(--ink3); font-size: var(--fs-xs); }
.sz-note { margin-top: 5px; font-size: var(--fs-xs); color: var(--ink3); line-height: 1.6; }
.dk-sz { margin: 8px 8px 4px; }
.dk-szh { font-size: var(--fs-xs); color: var(--ink2); margin-bottom: 4px; }
.dk-szr { padding: 4px 6px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--field); margin-bottom: 4px; cursor: pointer; }
.dk-szr:hover { background: var(--hover); border-color: var(--hover-edge); }
.dk-szr .a { font-size: var(--fs-sm); color: var(--ink); }
.dk-szr .a b { margin-right: 2px; }
.dk-szr .b { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--fs-xs); color: var(--ink3); margin-top: 1px; font-variant-numeric: tabular-nums; }
.dk-szr .b b { color: var(--accent-ink); font-weight: 600; }
.rp-now { padding: 5px 10px; font-size: var(--fs-sm); background: #e5f5f8; color: #16788f; border-bottom: 1px solid #b4dfe8; }
.rp-list td { vertical-align: middle; }
/* 自主模式轨迹（ViewAutonomous）：每轮推理一张卡，卡里是思考和工具调用；Skill 读取用紫色，MCP 工具用蓝色 */
.vw-stats b.warn { color: var(--warning-ink); }
.rt-doc-wrap { padding: 10px 14px 18px; }
.rt-task { font-size: var(--fs-sm); line-height: 1.6; padding: 6px 10px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r); }
.rt-k { display: inline-block; margin-right: 8px; padding: 0 5px; border-radius: var(--r-sm); background: var(--sunken); color: var(--ink2); font-size: var(--fs-xs); }
.rt-note { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 2px; padding: 6px 10px; font-size: var(--fs-xs); line-height: 1.6; color: #4a3a8c; background: #f4f1ff; border: 1px solid #ddd5fb; border-radius: var(--r); }
.rt-note .ic { flex: none; margin-top: 2px; color: #7c5cff; }
.rt-list { list-style: none; margin: 8px 0 0; padding: 0; }
.rt-round { position: relative; margin: 0 0 6px; padding: 6px 10px 6px 34px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); animation: rt-in 0.28s ease-out; }
.rt-round.final { border-color: var(--success-edge); background: var(--success-bg); }
@keyframes rt-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rt-h { display: flex; gap: 8px; align-items: center; font-size: var(--fs-xs); }
.rt-no { position: absolute; left: 8px; top: 6px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.rt-round.final .rt-no { background: var(--success); }
.rt-fin { color: var(--success); font-weight: 600; }
.rt-thought { margin: 2px 0 4px; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink); white-space: pre-wrap; }
.rt-call { margin: 4px 0 2px; padding: 4px 8px; border-left: 3px solid #4a86c5; background: #f5f9fe; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.rt-call.skill { border-left-color: #7c5cff; background: #f7f5ff; }
.rt-call.file { border-left-color: var(--line); background: var(--field); }
.rt-c1 { display: flex; gap: 6px; align-items: baseline; min-width: 0; font-size: var(--fs-sm); }
.rt-c1 b { flex: none; }
.rt-srv { flex: none; padding: 0 5px; border-radius: var(--r-sm); font-size: 10.5px; line-height: 16px; background: #e3eefa; color: #24598f; }
.rt-call.skill .rt-srv { background: #ebe5ff; color: #5636d0; }
.rt-args { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink3); font-size: var(--fs-xs); }
.rt-cdoc { margin-top: 1px; font-size: var(--fs-xs); color: var(--ink3); line-height: 1.5; }
.rt-res { display: flex; gap: 6px; align-items: baseline; width: 100%; margin-top: 2px; padding: 1px 0; border: none; background: none; text-align: left; font-size: var(--fs-xs); color: var(--ink2); cursor: pointer; line-height: 1.5; }
.rt-res:hover:not(:disabled) { color: var(--accent-ink); }
.rt-res.none { color: var(--danger); cursor: default; }
.rt-arrow { flex: none; color: var(--ink4); }
.rt-dt { margin-left: auto; flex: none; padding-left: 8px; }
.rt-raw { margin: 3px 0 2px; padding: 6px 8px; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: 11px; line-height: 1.5; background: var(--field); border: 1px solid var(--line-soft); border-radius: var(--r-sm); }
.rt-answer { margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); }
.rt-runs, .rt-skills, .rt-tools { list-style: none; margin: 0 0 6px; padding: 0; font-size: var(--fs-xs); }
.rt-runs button { display: flex; gap: 6px; align-items: center; width: 100%; padding: 4px 6px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; text-align: left; font-size: var(--fs-xs); color: var(--ink); cursor: pointer; }
.rt-runs button:hover { background: var(--hover); }
.rt-runs button.on { background: var(--sel); border-color: var(--hover-edge); color: var(--accent-ink); }
.rt-rt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink4); }
.rt-dot.ok { background: var(--success); }
.rt-dot.warn { background: #e0902a; }
.rt-dot.bad { background: var(--danger); }
.rt-skills li { padding: 3px 0 4px; border-bottom: 1px dashed var(--line-soft); line-height: 1.5; color: var(--ink2); }
.rt-skills li b { color: #5636d0; }
.rt-tools li { display: flex; gap: 6px; align-items: baseline; padding: 2px 0; }
.vw-doc.page-doc .page > .card, .vw-doc.page-doc .grid-2 > .card { box-shadow: var(--shadow-card); }

/* 回放控制条 */
.sh-replay {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; flex: none; background: var(--panel);
  border: 1px solid #b4dfe8; border-radius: var(--r); box-shadow: inset 3px 0 0 var(--c-teal); white-space: nowrap; overflow: hidden;
}
.sh-replay .rp-t { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.sh-replay .scrub { min-width: 100px; }

/* ---------------------------------------------------------------- 消息区 */
.sh-bottom { flex: none; display: flex; flex-direction: column; height: 28px; background: var(--panel); border: 1px solid var(--card-edge); border-radius: var(--r); overflow: hidden; }
.sh-bottom.open { height: 30%; min-height: 150px; max-height: 300px; }
.dk-bbar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 2px; flex: none; background: var(--panel); }
.sh-bottom.open .dk-bbar { border-bottom: 1px solid var(--line-soft); }
.dk-btabs { display: flex; gap: 1px; flex: none; }
.dk-btabs > button {
  height: 22px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; font-size: var(--fs-sm);
  color: var(--ink2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.dk-btabs > button:hover { background: var(--hover); border-color: var(--hover-edge); }
.dk-btabs > button.on { background: var(--sel); border-color: var(--press-edge); color: var(--ink); }
.dk-bsep { width: 1px; height: 14px; background: var(--line); flex: none; }
.dk-last { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); font-size: var(--fs-sm); }
.dk-last.wait { color: var(--brand); }
.dk-last.warn { color: var(--warning-ink); }
.dk-last.error { color: var(--danger); }
.dk-bbody { flex: 1; min-height: 0; overflow: auto; background: var(--field); }
.dk-bbody > .dk-log { height: 100%; overflow: auto; }
.dk-bbody .dk-lrow { grid-template-columns: 64px 56px 28px minmax(0, 1fr); padding: 1px 8px; }
.dk-bfill { height: 100%; overflow: auto; }
.dk-bfill.pad { padding: 6px 10px; }
.tbl tr.p-running td { background: var(--info-bg); }
.tbl tr.p-failed td { background: #fff5f5; }
.tbl tr.p-repaired td { background: #fffaea; }
.tbl tr.p-pending td { color: var(--ink3); }

/* ---------------------------------------------------------------- 状态栏 */
.sh-status {
  display: flex; align-items: stretch; height: var(--h-status); background: var(--chrome); border-top: 1px solid var(--line);
  font-size: var(--fs-xs); color: var(--ink2); white-space: nowrap; overflow: hidden;
}
.sh-status .sb { display: flex; align-items: center; gap: 5px; padding: 0 9px; border: none; border-right: 1px solid var(--line-soft); background: none; font-size: var(--fs-xs); color: var(--ink2); min-width: 0; flex: none; }
.sh-status .sb:last-child { border-right: none; }
.sh-status button.sb:hover:not(:disabled) { background: var(--hover); }
.sh-status .sb.task { max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: block; line-height: var(--h-status); }
.sh-status .sb.agent { flex: 1 1 auto; justify-content: flex-start; color: var(--ink2); }
.sh-status .sb.agent .at { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sh-status .sb.agent b { font-weight: 400; color: var(--accent-ink); text-decoration: underline; flex: none; }
.sh-status .sb.agent.wait { background: var(--brand-soft); color: var(--brand); }
.sh-status .sb.agent.wait b { color: var(--brand); font-weight: 600; }
.sh-status .sb.agent.ask { color: var(--brand); }
.sh-status .sb.agent:disabled { cursor: default; }
.sb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink4); flex: none; display: inline-block; }
.sb.st.running .sb-dot { background: var(--accent); animation: blink 1.2s infinite; }
.sb.st.waiting .sb-dot { background: var(--brand); }
.sb.st.waiting { color: var(--brand); }
.sb.st.done .sb-dot, .sb.st.none .sb-dot { background: #2c9a45; }
.sb.conn.online .sb-dot { background: #2c9a45; }
.sb.conn.mock { color: var(--caution-ink); }
.sb.conn.mock .sb-dot { background: var(--caution); }
.sb.conn.probing .sb-dot { background: var(--accent); animation: blink 1.2s infinite; }

/* ---------------------------------------------------------------- 弹出菜单 */
.sh-menu-back { position: fixed; inset: 0; z-index: 200; }
.sh-menu {
  position: fixed; z-index: 201; background: var(--field); border: 1px solid #c9cacd; box-shadow: var(--shadow-pop);
  padding: 3px 0; overflow: auto; font-size: var(--fs-sm); max-width: 420px;
}
.sh-menu .mh { padding: 3px 10px 4px; color: var(--ink3); font-size: var(--fs-xs); border-bottom: 1px solid var(--line-soft); margin-bottom: 2px; white-space: nowrap; }
.sh-menu .ms { height: 1px; background: var(--line-soft); margin: 3px 0; }
.sh-menu .mi {
  display: flex; align-items: center; gap: 7px; width: 100%; height: 24px; padding: 0 8px 0 6px; border: 1px solid transparent; background: none;
  font-size: var(--fs-sm); color: var(--ink); text-align: left; white-space: nowrap;
}
.sh-menu .mi:hover, .sh-menu .mi:focus { background: var(--hover); border-color: var(--hover-edge); outline: none; }
.sh-menu .mi.on { background: var(--sel); }
.sh-menu .mi.dis { color: var(--ink4); }
.sh-menu .mi.dis .mic { color: var(--ink4); }
.sh-menu .mi.dis:hover { background: none; border-color: transparent; }
.sh-menu .mic { width: 16px; display: flex; justify-content: center; flex: none; }
.sh-menu .ml { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sh-menu .mhint { color: var(--ink3); font-size: var(--fs-xs); margin-left: 12px; }
.sh-menu .mck { width: 14px; display: flex; color: var(--accent-ink); flex: none; }

/* ---------------------------------------------------------------- 命令面板 */
.sh-pal-back { position: fixed; inset: 0; z-index: 210; background: rgba(240, 240, 241, 0.35); }
.sh-pal {
  position: fixed; top: 28px; right: 8px; width: 560px; max-width: calc(100vw - 16px); max-height: min(560px, calc(100vh - 60px));
  display: flex; flex-direction: column; background: var(--field); border: 1px solid #c3c5c9; box-shadow: var(--shadow-pop); border-radius: var(--r-sm);
}
.sh-pal .pi { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px; border-bottom: 1px solid var(--line); color: var(--ink3); flex: none; }
.sh-pal .pi input { flex: 1; height: 26px; border: none; box-shadow: none; font-size: var(--fs-md); padding: 0 2px; }
.sh-pal .pi input:focus { box-shadow: none; }
.sh-pal .pl { flex: 1; min-height: 0; overflow: auto; padding: 2px 0 4px; }
.sh-pal .pgh { padding: 6px 10px 2px; font-size: var(--fs-xs); color: var(--ink3); }
.sh-pal .pr { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border: 1px solid transparent; font-size: var(--fs-sm); white-space: nowrap; }
.sh-pal .pr.on { background: var(--hover); border-color: var(--hover-edge); }
.sh-pal .pr.dis { color: var(--ink4); }
.sh-pal .pr.ask .pt { color: var(--brand); }
.sh-pal .pic { display: flex; width: 16px; justify-content: center; flex: none; }
.sh-pal .pt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sh-pal .pon { color: var(--accent-ink); display: flex; }
.sh-pal .pp { margin-left: auto; color: var(--ink3); font-size: var(--fs-xs); padding-left: 12px; flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.sh-pal .pe { padding: 14px; color: var(--ink3); text-align: center; }
.sh-pal .pf { display: flex; gap: 12px; padding: 4px 10px; border-top: 1px solid var(--line-soft); color: var(--ink3); font-size: var(--fs-xs); flex: none; background: var(--panel); }
.sh-pal .pf .sp { flex: 1; }

/* ---------------------------------------------------------------- 对话框 */
.sh-dlg-back { position: fixed; inset: 0; z-index: 220; background: rgba(30, 32, 36, 0.22); display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; }
.sh-dlg { width: 560px; max-width: calc(100vw - 40px); max-height: 80vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid #bfc1c5; box-shadow: var(--shadow-pop); }
.sh-dlg.dlg-help { width: 680px; }
.dlg-h { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 6px 0 10px; background: var(--chrome); border-bottom: 1px solid var(--line); flex: none; }
.dlg-ic { color: var(--icon); display: flex; }
.dlg-t { font-size: var(--fs-md); }
.dlg-x { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; background: none; color: var(--ink2); border-radius: var(--r-sm); }
.dlg-x:hover { background: var(--danger); color: #fff; }
.dlg-b { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; font-size: var(--fs-sm); background: var(--field); }
.dlg-f { display: flex; justify-content: flex-end; gap: 6px; padding: 7px 10px; border-top: 1px solid var(--line); background: var(--panel); flex: none; }
.dlg-f .sh-btn { min-width: 76px; height: 24px; }
.dlg-lead { margin: 0 0 8px; color: var(--ink2); line-height: 1.6; }
.dlg-dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); margin: 0; }
.dlg-dl dt { color: var(--ink3); padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line-soft); }
.dlg-dl dd { margin: 0; padding: 4px 0; border-bottom: 1px solid var(--line-soft); line-height: 1.6; }
.dlg-about { display: flex; align-items: center; gap: 12px; padding: 4px 0 10px; }
.dlg-about .ab-t { font-size: var(--fs-xl); font-weight: 300; }
.tbl.keys td { height: 24px; }
.tbl.keys td:first-child { width: 170px; }
.pf-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.pf-k { width: 76px; color: var(--ink2); flex: none; }
.pf-in { width: 220px; }
.pf-note { margin-top: 10px; color: var(--ink3); font-size: var(--fs-xs); }
.gtag { display: inline-block; font-size: 10.5px; font-weight: 600; line-height: 15px; padding: 0 4px; border-radius: var(--r-sm); color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-edge); }

/* ---------------------------------------------------------------- 提示 */
.sh-toasts { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 230; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.sh-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 7px; max-width: 520px; padding: 6px 12px 6px 9px; background: var(--field);
  border: 1px solid #c9cacd; border-left: 3px solid var(--accent); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); color: var(--ink);
}
.sh-toast .ic { color: var(--accent); }
.sh-toast.warn { border-left-color: var(--warning); }
.sh-toast.warn .ic { color: var(--warning-ink); }
.sh-toast.error { border-left-color: var(--danger); }
.sh-toast.error .ic { color: var(--danger); }

/* ---------------------------------------------------------------- 窄屏（1366 左右） */
@media (max-width: 1500px) {
  .sh-cmd { width: 250px; }
  .sh-doc { max-width: calc(100% - 2 * 290px); }
  .sh-tab { padding: 0 10px; }
  .sh-ctx { display: none; }
  .rb-big { min-width: 42px; padding: 5px 3px 2px; }
  .rb-sm { padding: 0 5px 0 2px; }
  .sh-status .sb { padding: 0 7px; }
  .sh-status .sb.task { max-width: 160px; }
}
