/* 生图工作台 Image Workbench — 独立版样式（明暗自适应） */
:root {
  --iwb-bg: #f4f5f7;
  --iwb-panel: #ffffff;
  --iwb-layer: #f0f1f4;
  --iwb-layer2: #e8eaf0;
  --iwb-border: #d5d9e0;
  --iwb-border2: #b9bfca;
  --iwb-brand: #4f6ef7;
  --iwb-text: #1c2333;
  --iwb-text2: #5b6478;
  --iwb-err: #e5484d;
  --iwb-ok: #2f9e5f;
  --iwb-warn: #d97706;
}
@media (prefers-color-scheme: dark) {
  :root {
    --iwb-bg: #12141a;
    --iwb-panel: #1c1f27;
    --iwb-layer: #232733;
    --iwb-layer2: #2a2f3d;
    --iwb-border: #343a4a;
    --iwb-border2: #454d61;
    --iwb-brand: #6d8bff;
    --iwb-text: #e6e9f2;
    --iwb-text2: #99a1b5;
    --iwb-err: #ff6368;
    --iwb-ok: #4cc38a;
    --iwb-warn: #f0a14a;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--iwb-bg);
  color: var(--iwb-text);
  font-size: 14px;
}

.iwb-overlay { position: fixed; inset: 0; z-index: 100; background: var(--iwb-bg); }
.iwb-canvas { position: absolute; inset: 0; overflow: hidden; cursor: default; user-select: none; }
.iwb-grid { position: absolute; inset: 0; background-image: radial-gradient(circle, var(--iwb-border) 1px, transparent 1px); background-repeat: repeat; }
.iwb-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.iwb-edges { position: absolute; left: 0; top: 0; }
.iwb-edge { fill: none; stroke: var(--iwb-border2); stroke-width: 2.5; pointer-events: stroke; cursor: pointer; }
.iwb-edge:hover { stroke: var(--iwb-brand); }
.iwb-edge-sel { stroke: var(--iwb-warn); stroke-width: 3.5; }
.iwb-edge-hot { stroke: var(--iwb-brand); stroke-width: 3.5; }
.iwb-edge-temp { stroke: var(--iwb-brand); stroke-dasharray: 6 4; pointer-events: none; }
.iwb-node { position: absolute; background: var(--iwb-panel); border: 1px solid var(--iwb-border2); border-top: 3px solid; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.18); font-size: 12px; color: var(--iwb-text); display: flex; flex-direction: column; }
.iwb-node-selected { border-color: var(--iwb-brand); box-shadow: 0 0 0 2px var(--iwb-brand), 0 6px 20px rgba(0,0,0,0.25); }
.iwb-node:hover { z-index: 4; }
.iwb-node-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; cursor: move; border-bottom: 1px solid var(--iwb-border); background: var(--iwb-layer); border-radius: 9px 9px 0 0; font-weight: 600; }
.iwb-node-title { font-size: 12px; }
.iwb-node-headbtns { display: flex; gap: 2px; }
.iwb-node-del { background: none; border: none; color: var(--iwb-text2); cursor: pointer; font-size: 12px; padding: 0 3px; display: inline-flex; align-items: center; justify-content: center; }
.iwb-node-del:hover { color: var(--iwb-brand); }
.iwb-node-body { padding: 8px 10px; overflow: visible; flex: 1 1 auto; min-height: 0; }
      .iwb-textarea { min-height: 56px; overflow-y: auto; }
.iwb-resize { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; cursor: nwse-resize; z-index: 6; }
.iwb-resize::after { content: ''; position: absolute; right: 2px; bottom: 2px; width: 7px; height: 7px; border-right: 2px solid var(--iwb-border2); border-bottom: 2px solid var(--iwb-border2); }
.iwb-label { font-size: 11px; color: var(--iwb-text2); margin: 6px 0 3px; }
.iwb-textarea { width: 100%; box-sizing: border-box; resize: none; border: 1px solid var(--iwb-border); border-radius: 6px; background: var(--iwb-layer2); color: var(--iwb-text); padding: 6px 8px; font-size: 12px; line-height: 1.5; outline: none; }
.iwb-textarea:focus { border-color: var(--iwb-brand); }
.iwb-input { width: 100%; box-sizing: border-box; border: 1px solid var(--iwb-border); border-radius: 6px; background: var(--iwb-layer2); color: var(--iwb-text); padding: 5px 8px; font-size: 12px; outline: none; }
.iwb-input:focus { border-color: var(--iwb-brand); }
.iwb-grow { flex: 1; }
.iwb-row { display: flex; gap: 6px; align-items: center; }
.iwb-actions { margin-top: 8px; }
.iwb-btn { border: 1px solid var(--iwb-border2); background: var(--iwb-layer); color: var(--iwb-text); border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.iwb-btn:hover { border-color: var(--iwb-brand); }
.iwb-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.iwb-btn-sm { padding: 2px 6px; font-size: 11px; }
.iwb-btn-primary { background: var(--iwb-brand); border-color: transparent; color: #fff; }
.iwb-btn-danger { color: var(--iwb-err); }
.iwb-port { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--iwb-layer); border: 2.5px solid var(--iwb-border2); transform: translate(-50%, -50%); z-index: 7; }
.iwb-node:hover .iwb-port { border-color: var(--iwb-brand); background: var(--iwb-panel); }
.iwb-port:hover { border-color: var(--iwb-brand) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--iwb-brand) 25%, transparent); }
.iwb-port::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
.iwb-port:hover { border-color: var(--iwb-brand); }
.iwb-connecting .iwb-port-in { border-color: var(--iwb-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--iwb-brand) 30%, transparent); }
.iwb-port-in { left: 0; cursor: crosshair; }
.iwb-port-out { left: 100%; cursor: crosshair; }
.iwb-ref-thumb { width: 100%; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--iwb-border); }
.iwb-ref-empty { height: 84px; display: flex; align-items: center; justify-content: center; color: var(--iwb-text2); border: 1px dashed var(--iwb-border2); border-radius: 6px; font-size: 12px; }
.iwb-ref-images { display: flex; flex-direction: column; gap: 6px; }
.iwb-ref-imgrow { display: flex; align-items: center; gap: 6px; }
.iwb-ref-idx { flex: 0 0 18px; height: 18px; border-radius: 50%; background: var(--iwb-brand); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.iwb-ref-img { flex: 1; max-height: 90px; object-fit: contain; border-radius: 6px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); cursor: zoom-in; min-width: 0; }
.iwb-ref-imgactions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; }
.iwb-file { display: inline-block; margin-top: 6px; padding: 4px 10px; border: 1px dashed var(--iwb-border2); border-radius: 6px; font-size: 12px; cursor: pointer; color: var(--iwb-text2); }
.iwb-file:hover { border-color: var(--iwb-brand); color: var(--iwb-brand); }
.iwb-hint { font-size: 10px; color: var(--iwb-text2); margin-top: 4px; }
.iwb-results { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.iwb-rgroup { width: 100%; }
.iwb-rlabel { font-size: 10px; color: var(--iwb-text2); margin: 4px 0 3px; }
.iwb-result-thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--iwb-border); }
.iwb-rimg { position: relative; }
.iwb-rimg-actions { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; gap: 4px; justify-content: center; }
.iwb-rimg-actions .iwb-btn { font-size: 10px; padding: 1px 5px; background: var(--iwb-panel); }
.iwb-err { font-size: 11px; color: var(--iwb-err); margin-top: 4px; word-break: break-all; }
.iwb-out-item { margin-bottom: 8px; }
.iwb-out-block { border-top: 1px dashed var(--iwb-border2); padding-top: 6px; margin-top: 6px; }
.iwb-out-block:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.iwb-out-imgwrap { margin-top: 4px; }
.iwb-out-img { width: 100%; border-radius: 8px; border: 1px solid var(--iwb-border); }
.iwb-out-meta { font-size: 10px; color: var(--iwb-text2); margin-top: 3px; }
.iwb-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.iwb-toolbar { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: 12px; padding: 8px 10px; z-index: 10;  box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.iwb-toolbar-title { font-weight: 700; font-size: 13px; margin-right: 2px; }
.iwb-toolbar-sep { width: 1px; height: 18px; background: var(--iwb-border2); margin: 0 2px; }
.iwb-statusbar { position: absolute; right: 62px; top: 12px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; max-width: calc(100vw - 60px); justify-content: flex-end; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: 10px; padding: 6px 12px; z-index: 10; font-size: 11px; color: var(--iwb-text2);  box-shadow: 0 4px 16px rgba(0,0,0,0.12); transition: right 0.15s; }
.iwb-status-err { color: var(--iwb-err); }
.iwb-status-ok { color: var(--iwb-ok); }
.iwb-hint-bottom { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 10px; color: var(--iwb-text2); background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: 8px; padding: 3px 10px; z-index: 9; opacity: 0.8; white-space: nowrap; }
.iwb-boxsel { position: absolute; border: 1px dashed var(--iwb-brand); background: color-mix(in srgb, var(--iwb-brand) 12%, transparent); z-index: 3; pointer-events: none; }
.iwb-minimap { position: absolute; right: 62px; bottom: 14px; width: 168px; height: 112px; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: 8px; z-index: 11; cursor: crosshair; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.iwb-mini-node { position: absolute; border-radius: 2px; opacity: 0.85; }
.iwb-mini-view { position: absolute; border: 1px solid var(--iwb-brand); border-radius: 2px; pointer-events: none; }
.iwb-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 50; display: flex; align-items: center; justify-content: center; }
.iwb-modal { width: 680px; max-width: calc(100vw - 60px); max-height: 82vh; background: var(--iwb-panel); border: 1px solid var(--iwb-border2); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.iwb-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--iwb-border); }
.iwb-modal-body { padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 10px; max-height: 62vh; }
.iwb-modal-foot { padding: 12px 16px; border-top: 1px solid var(--iwb-border); display: flex; justify-content: flex-end; }
.iwb-provider-card { border: 1px solid var(--iwb-border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.iwb-keyrow { display: flex; gap: 6px; align-items: center; }
.iwb-keyname { flex: 0 0 110px; }
.iwb-lib { position: absolute; top: 0; right: 0; bottom: 0; background: var(--iwb-panel); border-left: 1px solid var(--iwb-border2); z-index: 20; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,0.15); }
.iwb-lib-handle { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 3; }
.iwb-lib-handle:hover { background: color-mix(in srgb, var(--iwb-brand) 25%, transparent); }
.iwb-lib-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--iwb-border); }
.iwb-lib-body { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.iwb-pcard { border: 1px solid var(--iwb-border); border-radius: 8px; padding: 8px 10px; }
.iwb-pname { font-weight: 600; font-size: 12px; }
.iwb-pbtns { margin-left: auto; display: flex; gap: 4px; }
.iwb-ptext { font-size: 11px; color: var(--iwb-text2); margin-top: 4px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.iwb-tag { display: inline-block; background: color-mix(in srgb, var(--iwb-brand) 15%, transparent); color: var(--iwb-brand); border-radius: 4px; font-size: 10px; padding: 1px 6px; margin: 3px 4px 0 0; }
.iwb-pedit { border: 1px solid var(--iwb-border); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.iwb-tasks { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.iwb-gen-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.iwb-gen-title { font-weight: 600; }
.iwb-gen-settings { margin-top: 8px; border: 1px solid var(--iwb-border); border-radius: 8px; padding: 8px; background: var(--iwb-layer); display: flex; flex-direction: column; gap: 4px; }
.iwb-task { border: 1px solid var(--iwb-border); border-left: 3px solid var(--iwb-brand); border-radius: 8px; padding: 6px 8px; background: var(--iwb-layer); }
.iwb-task-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.iwb-task-title { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iwb-task-refs { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.iwb-task-ref { width: 40px; height: 40px; object-fit: cover; border-radius: 5px; border: 1px solid var(--iwb-border); cursor: zoom-in; }

.iwb-imgpreview { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.82); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.iwb-imgpreview img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5); cursor: default; }
.iwb-ref-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.iwb-ref-single { width: 100%; min-height: 60px; max-height: 340px; object-fit: contain; object-position: center; border-radius: 6px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); cursor: zoom-in; }
.iwb-task-status { font-size: 11px; margin-top: 4px; color: var(--iwb-text2); }
.iwb-history { position: absolute; left: 12px; right: 12px; bottom: 46px; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: 12px; z-index: 30; box-shadow: 0 8px 30px rgba(0,0,0,0.25); padding: 8px 12px; max-height: 180px; display: flex; flex-direction: column; }
.iwb-history-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--iwb-border); }
.iwb-history-grid { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px; flex: 1; }
.iwb-history-item { position: relative; flex: 0 0 110px; }
.iwb-history-item img { width: 110px; height: 82px; object-fit: contain; border-radius: 6px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); cursor: zoom-in; }
.iwb-history-actions { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; gap: 4px; justify-content: center; opacity: 0; transition: opacity 0.15s; }
.iwb-history-item:hover .iwb-history-actions { opacity: 1; }
.iwb-history-actions .iwb-btn { font-size: 10px; padding: 1px 5px; background: var(--iwb-panel); text-decoration: none; }
.iwb-modal-sm { width: 460px; }
.iwb-pickrow { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; font-size: 12px; }
.iwb-picktext { color: var(--iwb-text); line-height: 1.4; word-break: break-all; }

.iwb-ref-upload { flex: 1 1 auto; min-height: 110px; display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--iwb-border2); border-radius: 8px; color: var(--iwb-text2); font-size: 13px; cursor: pointer; }
.iwb-ref-upload:hover { border-color: var(--iwb-brand); color: var(--iwb-brand); }
.iwb-ref-show { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.iwb-ref-miniactions .iwb-btn { font-size: 10px; padding: 1px 6px; text-decoration: none; }
.iwb-task-ref { width: 28px; height: 28px; }
.iwb-refmini { position: relative; }
.iwb-refmini .iwb-refmini-idx { position: absolute; left: -3px; top: -3px; background: var(--iwb-brand); color: #fff; font-size: 8px; min-width: 12px; height: 12px; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 0 2px; z-index: 2; }

/* ---- v2 P2：图片传输设置 + 出图清理 ---- */
.iwb-section { border-top: 1px solid var(--iwb-border); margin-top: 16px; padding-top: 12px; }
.iwb-section-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.iwb-section-sub { font-weight: 600; font-size: 12px; margin: 10px 0 6px; color: var(--iwb-text2); }
.iwb-mode-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.iwb-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--iwb-text); }
.iwb-num { width: 76px; flex: none; }
.iwb-hdrbox { min-height: 54px; font-family: ui-monospace, Menlo, monospace; font-size: 11px; resize: vertical; }
.iwb-history-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px solid var(--iwb-border); margin-top: 6px; }

/* ---- v2 P3：4-Tab 设置 ---- */
.iwb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--iwb-border); padding: 8px 12px 0; }
.iwb-tab { background: transparent; border: 1px solid transparent; border-bottom: none; padding: 7px 14px; border-radius: 8px 8px 0 0; font-size: 12px; color: var(--iwb-text2); cursor: pointer; }
.iwb-tab:hover { color: var(--iwb-text); }
.iwb-tab-active { background: var(--iwb-panel); border-color: var(--iwb-border); color: var(--iwb-brand); font-weight: 700; }
.iwb-addrrow { gap: 6px; margin-bottom: 6px; }
.iwb-addr-tag { flex: 0 0 26px; text-align: right; }
.iwb-speed { border: 1px solid var(--iwb-border); border-radius: 8px; padding: 6px 8px; margin: 6px 0; background: var(--iwb-layer); }
.iwb-speed-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 11px; }
.iwb-speed-ms { flex: 0 0 74px; font-weight: 600; }
.iwb-speed-fast { color: var(--iwb-brand); }
.iwb-speed-url { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--iwb-text2); }
.iwb-modellist { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; }
.iwb-modelrow { padding: 2px 8px; border: 1px solid var(--iwb-border); border-radius: 6px; background: var(--iwb-layer); }

/* ---- v2 P4：提示词库分组/管理/拖拽 ---- */
.iwb-tag-group { background: color-mix(in srgb, var(--iwb-brand) 8%, transparent); color: var(--iwb-text2); }
.iwb-pcard { cursor: grab; }
.iwb-pcard:active { cursor: grabbing; }

/* ---- v2 P6：节点编组 ---- */
.iwb-group { position: absolute; border: 2px dashed var(--iwb-brand); border-radius: 12px; pointer-events: none; z-index: 0; background: color-mix(in srgb, var(--iwb-brand) 5%, transparent); }
.iwb-group:hover { border-color: var(--iwb-brand); }
.iwb-group-sel { border-color: var(--iwb-brand); background: color-mix(in srgb, var(--iwb-brand) 6%, transparent); }
.iwb-group-bar { position: absolute; top: -10px; left: 10px; display: flex; align-items: center; gap: 4px; background: var(--iwb-brand); color: #fff; border-radius: 8px; padding: 2px 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.25); pointer-events: auto; cursor: move; z-index: 5; }
.iwb-group-name { font-size: 10px; font-weight: 700; color: #fff; white-space: nowrap; user-select: none; }
.iwb-group-bar .iwb-btn { font-size: 10px; padding: 0 5px; text-decoration: none; color: #fff; background: transparent; border: none; }
.iwb-lib-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--iwb-border); padding: 6px 12px 0; }
.iwb-lib-tab { background: transparent; border: 1px solid transparent; border-bottom: none; padding: 6px 12px; border-radius: 8px 8px 0 0; font-size: 12px; color: var(--iwb-text2); cursor: pointer; }
.iwb-lib .iwb-pcard { margin-bottom: 8px; }

/* ---- v2 P8：增强 ---- */
.iwb-history-more { text-align: center; padding: 6px 0; }
.iwb-help { gap: 6px; }
.iwb-help-row { font-size: 12px; line-height: 1.5; }
.iwb-help-row b { color: var(--iwb-brand); font-weight: 700; }
.iwb-toolbar { overflow: visible; }

.iwb-node-fixed .iwb-node-body { display: flex; flex-direction: column; overflow: visible; min-height: 0; }
.iwb-node-fixed .iwb-textarea { flex: 1 1 auto; max-height: none; min-height: 56px; height: auto !important; }

/* ---- v3：toast 提示 ---- */
.iwb-toast { position: fixed; left: 50%; top: 56px; transform: translateX(-50%); z-index: 200; background: var(--iwb-panel); border: 1px solid var(--iwb-border2); border-radius: 10px; padding: 10px 18px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); font-size: 13px; font-weight: 600; animation: iwb-fadein 0.18s ease; }
.iwb-toast-ok { border-left: 3px solid var(--iwb-brand); }
.iwb-toast-err { border-left: 3px solid #ef4444; }
@keyframes iwb-fadein { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- v3：左侧多工作台 ---- */
.iwb-wsrail { position: absolute; left: 0; top: 0; bottom: 0; width: 52px; background: var(--iwb-panel); border-right: 1px solid var(--iwb-border); z-index: 25; display: flex; flex-direction: column; align-items: stretch; transition: width 0.15s; }
.iwb-wsrail-title { display: flex; align-items: center; gap: 4px; padding: 14px 12px; font-weight: 800; font-size: 16px; color: var(--iwb-text); border-bottom: 1px solid var(--iwb-border); cursor: pointer; user-select: none; white-space: nowrap; flex: 0 0 auto; }
.iwb-wsrail-title:hover { background: var(--iwb-layer); }
.iwb-wsrail-section { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px; }
.iwb-wsrail-label { font-size: 10px; color: var(--iwb-text2); font-weight: 700; letter-spacing: 1px; margin: 2px 2px 4px; user-select: none; }
.iwb-wsrail-foot { flex: 0 0 auto; border-top: 1px solid var(--iwb-border); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.iwb-wsrail-footrow { display: flex; gap: 6px; }
.iwb-wsrail-footrow .iwb-btn { flex: 1 1 auto; justify-content: center; font-size: 11px; }
.iwb-ws-tab { position: relative; width: 100%; height: 34px; border-radius: 8px; background: var(--iwb-layer); border: 1px solid var(--iwb-border); display: flex; align-items: center; gap: 6px; padding: 0 10px; cursor: pointer; font-size: 12px; color: var(--iwb-text2); flex: 0 0 auto; }
.iwb-ws-tab:hover { border-color: var(--iwb-brand); }
.iwb-ws-active { border-color: var(--iwb-brand); background: color-mix(in srgb, var(--iwb-brand) 16%, transparent); color: var(--iwb-text); font-weight: 700; }
.iwb-ws-num { font-size: 13px; font-weight: 700; color: var(--iwb-text2); }
.iwb-ws-active .iwb-ws-num { color: var(--iwb-text); }
.iwb-ws-name-full { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iwb-ws-del { width: 18px; height: 18px; border-radius: 5px; background: var(--iwb-panel); border: 1px solid var(--iwb-border); color: var(--iwb-text2); font-size: 10px; line-height: 1; padding: 0; display: none; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
/* 默认态不显示删除按钮（仅展开+管理模式） */
.iwb-wsrail-row { display: flex; gap: 6px; align-items: stretch; }
.iwb-wsrail-row .iwb-ws-add { flex: 1 1 auto; }
.iwb-ws-manage { flex: 0 0 34px; width: 34px; justify-content: center; padding: 0; border-radius: 8px; border: 1px dashed var(--iwb-border2); background: none; color: var(--iwb-text2); }
.iwb-ws-manage .iwb-ic { width: 15px; height: 15px; }
.iwb-ws-add { width: 100%; height: 30px; border-radius: 8px; border: 1px dashed var(--iwb-border2); background: none; color: var(--iwb-text2); cursor: pointer; font-size: 12px; flex: 0 0 auto; }
.iwb-ws-add:hover { border-color: var(--iwb-brand); color: var(--iwb-brand); }
.iwb-ws-rename-input { width: 100%; min-width: 0; height: 24px; padding: 2px 6px; font-size: 12px; }
.iwb-canvas { left: 52px; transition: left 0.15s; }
.iwb-toolbar-wrap { position: absolute; left: 0; right: 60px; bottom: 14px; display: flex; justify-content: center; pointer-events: none; z-index: 10; }
.iwb-overlay.has-minimap .iwb-toolbar-wrap { right: 244px; }

.ws-expanded .iwb-wsrail { width: 200px; }
.ws-expanded .iwb-ws-tab:hover .iwb-ws-del { display: inline-flex; }
.ws-expanded .iwb-ws-del { display: inline-flex; }
.ws-expanded .iwb-canvas { left: 200px; }



/* ---- v3：工具栏分组 ---- */
.iwb-tgroup { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 8px; background: var(--iwb-layer); font-size: 10px; color: var(--iwb-text2); }
.iwb-tgroup:empty { display: none; }
.iwb-task-count { display: inline-flex; align-items: center; }
.iwb-task-count-sel { width: auto; min-width: 58px; padding: 1px 4px; font-size: 11px; }
.iwb-toolbar { gap: 6px; }
.iwb-toolbar .iwb-btn { padding: 4px 7px; }

/* ---- v3.1：参数行压缩 / 全屏编辑弹窗 / 面板互斥 ---- */
.iwb-paramrow { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.iwb-plabel { flex: 0 0 64px; font-size: 11px; color: var(--iwb-text2); }
.iwb-paramrow .iwb-input { flex: 1 1 auto; min-width: 0; }
.iwb-modal-lg { width: min(900px, 94vw); height: min(84vh, 760px); }
.iwb-modal-lg .iwb-modal-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.iwb-modal-lg .iwb-textarea { flex: 1 1 auto; min-height: 200px; }

/* ---- 参考图节点：图片随框自适应 / 底部操作栏 / 固定高度填满 ---- */
.iwb-ref-body { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.iwb-ref-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.iwb-node-fixed .iwb-ref-single { flex: 1 1 auto; min-height: 0; max-height: none; height: auto; }
.iwb-node-fixed .iwb-ref-show { flex: 1 1 auto; min-height: 0; }

/* ---- 右侧统一面板抽屉（提示词库 / 节点组 / 图片历史） ---- */
.iwb-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 330px; background: var(--iwb-panel); border-left: 1px solid var(--iwb-border); z-index: 22; display: flex; flex-direction: column; }
.iwb-drawer-tabs { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--iwb-border); flex: 0 0 auto; }
.iwb-drawer-tab { background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--iwb-text2); cursor: pointer; white-space: nowrap; }
.iwb-drawer-tab:hover { color: var(--iwb-text); }
.iwb-drawer-tab-active { background: var(--iwb-layer); border-color: var(--iwb-border); color: var(--iwb-brand); font-weight: 700; }
.iwb-drawer-spacer { flex: 1 1 auto; }
.iwb-drawer-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.iwb-drawer-toggle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 21; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-right: none; border-radius: 8px 0 0 8px; padding: 12px 5px; cursor: pointer; font-size: 12px; color: var(--iwb-text2); box-shadow: -4px 0 12px rgba(0,0,0,0.1); writing-mode: vertical-lr; letter-spacing: 2px; }
.iwb-drawer-toggle:hover { color: var(--iwb-brand); }
/* 嵌入抽屉时面板填满 */
.iwb-lib-embedded, .iwb-groups-embedded { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.iwb-history-embedded { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 12px; gap: 8px; overflow: hidden; }
.iwb-history-embedded .iwb-history-grid { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; display: flex; align-items: flex-start; gap: 8px; padding: 2px 2px 8px; }
.iwb-history-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.iwb-history-embedded .iwb-history-item { position: relative; flex: none; width: 100%; }
.iwb-history-embedded .iwb-history-item img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); cursor: zoom-in; }

.iwb-wsrail-section-collapsed { align-items: center; padding: 8px 6px; }
.iwb-wsrail-section-collapsed .iwb-ws-tab { width: 40px; height: 40px; justify-content: center; padding: 0; }

/* ---- SVG 图标 / 底部工具栏 ---- */
.iwb-btn { display: inline-flex; align-items: center; gap: 5px; }
.iwb-ic { width: 16px; height: 16px; flex: 0 0 auto; }
.iwb-btn-primary .iwb-ic { width: 15px; height: 15px; }
.iwb-btn-text { font-size: 12px; }
.iwb-wsrail-foot .iwb-btn .iwb-ic { width: 14px; height: 14px; }

/* ---- 右侧抽屉占位：工具栏/状态栏联动平移 ---- */
.iwb-overlay.drawer-open .iwb-statusbar { right: 342px; }
.iwb-overlay.drawer-open .iwb-canvas { right: 0; }
.iwb-overlay.drawer-open .iwb-toolbar-wrap { right: 330px; }

/* 工具栏放大 */
.iwb-toolbar-bottom { position: static; padding: 10px 14px; gap: 8px; width: auto; max-width: 100%; pointer-events: auto; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.iwb-toolbar-bottom .iwb-btn { padding: 7px 10px; background: transparent !important; border: none !important; color: var(--iwb-text2); opacity: 0.75; transition: opacity 0.12s, color 0.12s; }
.iwb-toolbar-bottom .iwb-btn:hover { opacity: 1; color: var(--iwb-text); }
.iwb-toolbar-bottom .iwb-btn:active { opacity: 1; color: var(--iwb-text); }
.iwb-toolbar-bottom .iwb-btn:disabled { opacity: 0.32; }
.iwb-toolbar-bottom .iwb-ic { width: 18px; height: 18px; }
.iwb-toolbar-bottom .iwb-tgroup { padding: 4px 8px; font-size: 11px; background: transparent !important; color: var(--iwb-text2); }

/* ---- 统一悬停说明（data-tip 自定义 tooltip） ---- */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--iwb-text);
  color: var(--iwb-bg);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s, visibility 0.12s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
[data-tip]:hover::after { opacity: 1; visibility: visible; }
.iwb-node [data-tip]::after { bottom: auto; top: calc(100% + 6px); }
.iwb-toolbar-bottom [data-tip]::after { bottom: calc(100% + 8px); }

/* ---- 统一按钮 / 输入框设计 ---- */
.iwb-btn {
  background: var(--iwb-layer2);
  border: 1px solid var(--iwb-border);
  color: var(--iwb-text);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s, box-shadow 0.12s;
}
.iwb-btn:hover { border-color: var(--iwb-brand); color: var(--iwb-brand); }
.iwb-btn:active { transform: translateY(1px); }
.iwb-btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--iwb-brand) 60%, transparent); outline-offset: 1px; }
.iwb-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.iwb-btn-primary { background: var(--iwb-brand); border-color: var(--iwb-brand); color: #fff; }
.iwb-btn-primary:hover { background: color-mix(in srgb, var(--iwb-brand) 85%, #000); border-color: var(--iwb-brand); color: #fff; }
.iwb-btn-sm { padding: 3px 7px; font-size: 11px; }
.iwb-btn-danger:hover { border-color: #ef4444; color: #ef4444; }
.iwb-input, .iwb-textarea {
  background: var(--iwb-layer2);
  border: 1px solid var(--iwb-border);
  border-radius: 8px;
  color: var(--iwb-text);
  font-size: 12px;
  padding: 6px 9px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.iwb-input:focus, .iwb-textarea:focus { border-color: var(--iwb-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-brand) 20%, transparent); }
.iwb-drawer-tab { display: inline-flex; align-items: center; gap: 5px; }
.iwb-wsrail-title-text { display: inline-flex; align-items: center; gap: 6px; }
.iwb-wsrail-label { display: flex; align-items: center; gap: 5px; }
.iwb-ws-add { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.iwb-wsrail-foot .iwb-btn { border-radius: 8px; background: color-mix(in srgb, var(--iwb-layer) 42%, transparent); border-color: color-mix(in srgb, var(--iwb-border2) 40%, transparent); }
.iwb-drawer-toggle { display: flex; align-items: center; gap: 4px; writing-mode: initial; }
.iwb-ws-tab .iwb-ic { width: 15px; height: 15px; }

/* 窄屏时压缩工具栏避免换行 */
@media (max-width: 760px) {
  .iwb-toolbar-bottom { padding: 6px 8px; gap: 4px; }
  .iwb-toolbar-bottom .iwb-btn { padding: 4px 6px; }
  .iwb-toolbar-bottom .iwb-ic { width: 15px; height: 15px; }
  .iwb-toolbar-bottom .iwb-tgroup { padding: 2px 4px; font-size: 10px; }
}

/* ---- 右侧竖向面板栏（与左侧栏统一：无阴影） ---- */
.iwb-rightrail { position: absolute; right: 0; top: 0; bottom: 0; width: 48px; background: transparent; z-index: 24; display: flex; flex-direction: column; align-items: center; padding: 12px 4px; gap: 8px; }
.iwb-rail-tab { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 40px; padding: 9px 2px; border-radius: 8px; background: var(--iwb-layer); border: 1px solid var(--iwb-border); color: var(--iwb-text2); font-size: 12px; cursor: pointer; }
.iwb-rail-tab:hover { border-color: var(--iwb-brand); color: var(--iwb-brand); }
.iwb-rail-tab-active { border-color: var(--iwb-brand); background: color-mix(in srgb, var(--iwb-brand) 14%, transparent); color: var(--iwb-text); font-weight: 700; }
.iwb-rail-tab .iwb-ic { width: 16px; height: 16px; }
.iwb-rail-tab .iwb-btn-text { writing-mode: vertical-rl; font-size: 11px; letter-spacing: 2px; }
.iwb-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--iwb-border); flex: 0 0 auto; }
.iwb-drawer-toggle { display: none; }

/* 工作台标题行：右侧两个图标（新建＋ / 管理🔧） */
.iwb-wsrail-labelrow { display: flex; align-items: center; gap: 4px; margin: 2px 2px 6px; }
.iwb-wsrail-labelrow .iwb-wsrail-label { margin: 0; flex: 0 0 auto; }
.iwb-wsrail-spacer { flex: 1 1 auto; }
.iwb-ws-headicon { flex: 0 0 26px; width: 26px; height: 24px; padding: 0; justify-content: center; background: transparent !important; border: none !important; color: var(--iwb-text2); opacity: 0.75; transition: opacity 0.12s, color 0.12s; }
.iwb-ws-headicon:hover { opacity: 1; color: var(--iwb-text); }
.iwb-ws-headicon:active { opacity: 1; color: var(--iwb-text); }
.iwb-ws-headicon.iwb-btn-primary { background: transparent !important; border: none !important; color: var(--iwb-brand); opacity: 1; }
.iwb-ws-headicon .iwb-ic { width: 14px; height: 14px; }

.iwb-toolbar-bottom .iwb-btn-fit .iwb-ic { width: 15px; height: 15px; }
.iwb-toolbar-bottom .iwb-btn-fit { padding: 7px 7px; }

/* ---- 连线拖拽反馈：可连接绿框 / 不可连接红框 ---- */
.iwb-node.iwb-conn-ok { border-color: #22c55e !important; box-shadow: 0 0 0 2px rgba(34,197,94,0.45), 0 6px 20px rgba(0,0,0,0.25) !important; }
.iwb-node.iwb-conn-bad { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239,68,68,0.55), 0 6px 20px rgba(0,0,0,0.25) !important; }
.iwb-edge-temp.iwb-edge-ok { stroke: #22c55e !important; }
.iwb-edge-temp.iwb-edge-bad { stroke: #ef4444 !important; }

/* 任务失败详情 */
.iwb-task-err-toggle { display: block; width: 100%; text-align: left; margin-top: 6px; font-size: 11px; color: #ef4444; background: none; border: none; cursor: pointer; padding: 2px 0; }
.iwb-task-err-toggle:hover { text-decoration: underline; }
.iwb-task-err { margin-top: 6px; border: 1px solid color-mix(in srgb, #ef4444 40%, transparent); border-radius: 6px; background: color-mix(in srgb, #ef4444 6%, transparent); padding: 6px 8px; }
.iwb-task-errline { font-size: 11px; color: #ef4444; word-break: break-all; line-height: 1.5; }

/* ---- 窄屏适配（轻量） ---- */
@media (max-width: 860px) {
  .iwb-drawer { width: 300px; }
  .iwb-overlay.drawer-open .iwb-statusbar { right: 312px; }
  .iwb-overlay.drawer-open .iwb-toolbar-wrap { right: 300px; }
}
@media (max-width: 720px) {
  .iwb-statusbar .iwb-status-item:nth-child(3), .iwb-statusbar .iwb-status-item:nth-child(4) { display: none; }
  .iwb-minimap { display: none; }
  .iwb-overlay.has-minimap .iwb-toolbar-wrap { right: 24px; }
  .iwb-toolbar-bottom { max-width: calc(100vw - 40px); }
}

/* ---- 自定义右键菜单 ---- */
.iwb-ctxmask { position: fixed; inset: 0; background: transparent; z-index: 90; }
.iwb-ctxmenu { position: fixed; min-width: 196px; max-width: 240px; padding: 6px; background: var(--iwb-layer); border: 1px solid var(--iwb-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.16); z-index: 91; display: flex; flex-direction: column; gap: 2px; }
.iwb-ctx-title { font-size: 10px; font-weight: 700; color: var(--iwb-text2); letter-spacing: 1px; padding: 6px 10px 2px; text-transform: uppercase; }
.iwb-ctx-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: none; border-radius: 8px; background: transparent; color: var(--iwb-text); font-size: 12.5px; cursor: pointer; text-align: left; }
.iwb-ctx-item .iwb-ic { width: 14px; height: 14px; flex: 0 0 auto; color: var(--iwb-text2); }
.iwb-ctx-item:hover:not(:disabled) { background: color-mix(in srgb, var(--iwb-brand) 12%, transparent); color: var(--iwb-text); }
.iwb-ctx-item:hover:not(:disabled) .iwb-ic { color: var(--iwb-brand); }
.iwb-ctx-item:disabled { opacity: 0.38; cursor: default; }
.iwb-ctx-item.iwb-ctx-danger { color: #ef4444; }
.iwb-ctx-item.iwb-ctx-danger .iwb-ic { color: #ef4444; }
.iwb-ctx-item.iwb-ctx-danger:hover:not(:disabled) { background: color-mix(in srgb, #ef4444 10%, transparent); color: #ef4444; }
.iwb-ctx-sep { height: 1px; margin: 4px 6px; background: var(--iwb-border); flex: 0 0 auto; }

/* ---- 历史图片：管理模式（多选批量删除）+ 单图删除 ---- */
.iwb-history-managed img { cursor: pointer; opacity: 0.82; }
.iwb-history-managed:hover img { opacity: 0.92; }
.iwb-history-selected img { opacity: 1; border-color: var(--iwb-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-brand) 55%, transparent); }
.iwb-history-check { position: absolute; top: 5px; left: 5px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.45); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 2; pointer-events: none; }
.iwb-history-selected .iwb-history-check { background: var(--iwb-brand); }
.iwb-history-check .iwb-ic { width: 12px; height: 12px; }

/* ---- 生图节点参数区：参数设置标题行（摘要+折叠）+ 两列紧凑布局 ---- */
.iwb-gen-headrow { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 8px; margin: 0 0 6px; border-radius: 7px; background: color-mix(in srgb, var(--iwb-brand) 9%, transparent); border: 1px solid color-mix(in srgb, var(--iwb-brand) 24%, transparent); user-select: none; transition: background 0.12s; }
.iwb-gen-headrow:hover { background: color-mix(in srgb, var(--iwb-brand) 15%, transparent); }
.iwb-gen-headrow:active { background: color-mix(in srgb, var(--iwb-brand) 20%, transparent); }
.iwb-gen-summary { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 0; overflow: hidden; white-space: nowrap; }
.iwb-gen-seg { display: inline-flex; align-items: baseline; min-width: 0; }
.iwb-gen-val { font-size: 11px; font-weight: 700; color: var(--iwb-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iwb-gen-sep { font-size: 10px; color: var(--iwb-text2); opacity: 0.65; margin: 0 4px; }
.iwb-gen-toggle { flex: 0 0 auto; padding: 1px 3px !important; background: transparent !important; border: none !important; color: var(--iwb-text2); min-width: 0; }
.iwb-gen-toggle:hover { color: var(--iwb-text); }
.iwb-gen-toggle .iwb-ic { width: 14px; height: 14px; }
.iwb-gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.iwb-gen-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iwb-gen-cell .iwb-plabel { flex: none; font-size: 10px; color: var(--iwb-text2); }
.iwb-gen-cell .iwb-input { width: 100%; min-width: 0; font-size: 11px; padding: 3px 5px; }

/* ---- 任务卡：张数下拉移到右下角（状态在左） ---- */
.iwb-task-btns { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.iwb-task-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 5px; }
.iwb-task-foot .iwb-task-status { margin-top: 0; }
.iwb-task-count-sel { min-width: 56px; }

/* 节点标题行：标题 + 右对齐生成全部按钮 */
.iwb-gen-headbtns { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.iwb-gen-head .iwb-gen-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iwb-gen-head .iwb-btn-primary { padding: 3px 8px; font-size: 11px; }

/* ---- 标注文字节点 ---- */
.iwb-label-body { padding: 10px 12px; display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-height: 40px; }
.iwb-label-input { flex: 1 1 auto; width: 100%; min-width: 0; background: transparent; border: none; outline: none; resize: none; color: var(--iwb-text); font-weight: 700; text-align: center; }
.iwb-label-input::placeholder { color: var(--iwb-text2); opacity: 0.55; font-weight: 400; }
.iwb-node-fixed .iwb-label-body { height: calc(100% - 30px); }
.iwb-node-fixed .iwb-label-input { height: 100%; }

/* 左侧栏底部：收起态图标列 + 链接按钮 */
.iwb-wsrail-foot-collapsed { padding-top: 6px; border-top: 1px solid var(--iwb-border); }
.iwb-wsrail-iconcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.iwb-wsrail-iconcol .iwb-ws-headicon { width: 32px; height: 30px; }
.iwb-wsrail-foot a.iwb-btn, a.iwb-btn { text-decoration: none; }
.iwb-wsrail-foot .iwb-ws-headicon .iwb-ic { width: 15px; height: 15px; }

/* 收起态：工作台列表区隐藏滚动条（避免图标列上方出现滑动条） */
.iwb-wsrail-section-collapsed { scrollbar-width: none; -ms-overflow-style: none; }
.iwb-wsrail-section-collapsed::-webkit-scrollbar { display: none; width: 0; height: 0; }
.iwb-wsrail-iconcol { gap: 4px; }
.iwb-wsrail-foot-collapsed { padding: 8px 6px; }
