.creation-workbench {
  /* Inner content follows the canvas transform, without chrome compensation. */
  --zoom-inv: 1;
  --zoom-inv-raw: 1;
  --node-label-comp: 1;
  --node-title-ui-scale: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-1, #fff);
  color: var(--text-primary, #253039);
  font: 14px/1.6 var(--app-font-ui, 'Microsoft YaHei UI', sans-serif);
  text-align: left;
  border-radius: 6px;
  outline: none;
}
#v2-wrap .v2-node[data-node-type='ai-text'] { --sw-node-content-pad: 3px; --sw-node-component-margin-bottom: 3px; }
#v2-wrap .v2-node[data-node-type='ai-text'] .is-creation-workbench-node > .aigen-text-preview { padding: 0 !important; overflow: hidden !important; border: 0 !important; }
.is-creation-workbench-node > .aigen-text-preview { display: flex; width: 100%; height: 100%; }
.creation-workbench * { box-sizing: border-box; letter-spacing: 0; }
.creation-workbench [hidden] { display: none !important; }
.creation-workbench button { cursor: pointer; border: 0; background: transparent; color: inherit; font: inherit; border-radius: 5px; }
.creation-workbench button:hover { background: var(--bg-hover, #edf2f3); }
.creation-workbench button:focus-visible, .creation-workbench input:focus-visible, .creation-workbench textarea:focus-visible { outline: 2px solid var(--accent, #298e9c); outline-offset: 2px; }
.creation-workbench button:disabled { opacity: .45; cursor: not-allowed; }
.creation-workbench button[data-cw-action] { min-width: 30px; min-height: 30px; padding: 5px; }
.creation-workbench svg { flex: 0 0 auto; vertical-align: middle; }
.cw-document-header, .cw-document-header > div, .cw-chat > header, .cw-tools, .cw-document-chapter > header, .cw-document-part > header { display: flex; align-items: center; gap: 10px; }
.cw-columns { display: grid; grid-template-columns: minmax(320px, 34%) minmax(0, 1fr); flex: 1; min-height: 0; }
.cw-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--stroke-08, #e5eaed); background: var(--bg-2, #fafcfc); }
.cw-chat > header { flex: 0 0 48px; justify-content: space-between; padding: 0 16px; }
.cw-chat-mount { flex: 1 1 auto; min-height: 70px; overflow: hidden; display: flex; }
.cw-chat .aigen-text-conversation { display: flex; flex-direction: column; flex: 1; padding: 4px 14px 16px; overflow-y: auto; min-width: 0; max-height: none; width: 100%; gap: 22px; }
.cw-chat .aigen-text-message { display: flex; flex-direction: column; align-items: flex-start; position: relative; flex: 0 0 auto; min-width: 0; }
.cw-chat .aigen-text-message-role { font-size: 12px; color: var(--text-secondary, #68767e); margin-bottom: 7px; }
.cw-chat .aigen-text-message-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.8; }
.cw-chat .aigen-text-message--user .aigen-text-message-content { padding: 12px; border-radius: 6px; background: var(--bg-3, #ecf1f2); }
#v2-wrap .cw-chat .aigen-text-message-actions:not(.aigen-text-route-confirmation-actions) { display: flex; flex-direction: row; align-items: center; gap: 4px; margin-top: 8px; opacity: 1; pointer-events: auto; transform: none; }
#v2-wrap .cw-chat .aigen-text-message-primary-actions { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 4px; width: max-content; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#v2-wrap .cw-chat .aigen-text-message-primary-actions > button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; min-width: 30px; max-width: 30px; height: 30px; min-height: 30px; max-height: 30px; margin: 0; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text-secondary, #68767e); box-shadow: none; line-height: 1; transform: none; transition: background-color .15s ease, color .15s ease; }
#v2-wrap .cw-chat .aigen-text-message-primary-actions > button:hover { border-color: var(--stroke-10, #dce2e6); background: var(--bg-hover, #edf2f3); color: var(--text-primary, #253039); box-shadow: none; transform: none; }
#v2-wrap .cw-chat .aigen-text-message-primary-actions > button:active { background: var(--bg-3, #ecf1f2); }
#v2-wrap .cw-chat .aigen-text-message-primary-actions > button.is-copied { color: var(--accent, #298e9c); }
#v2-wrap .cw-chat .aigen-text-message-primary-actions > button svg { width: 16px; height: 16px; }
.cw-chat .aigen-text-message-action-glyph { display: inline-flex; width: 16px; height: 16px; }
.cw-chat .aigen-text-message-action-glyph svg { width: 16px; height: 16px; }
.cw-chat .aigen-text-message-actions :is(.aigen-text-message-derived-action, .aigen-text-message-more-action, .aigen-text-message-more-menu) { display: none; }
.cw-task-status { font-size: 12px; padding: 0 12px; color: var(--text-secondary, #68767e); overflow-wrap: anywhere; max-height: 95px; overflow-y: auto; flex-shrink: 0; }
.cw-task-status:not(:empty) { padding-top: 9px; padding-bottom: 9px; }
.cw-scope { display: flex; gap: 5px; padding: 0 14px; flex-wrap: wrap; flex-shrink: 0; max-height: 100px; overflow-y: auto; }
.cw-scope > span { display: inline-flex; align-items: center; padding: 2px 4px 2px 8px; font-size: 12px; background: var(--bg-3, #eaf1f2); border-radius: 5px; }
.cw-scope small { width: 100%; padding: 3px; }
.cw-quote { margin: 8px 14px; padding: 12px; border: 1px solid var(--stroke-15, #d4dfe3); border-radius: 6px; font-size: 13px; flex-shrink: 0; }
.cw-quote p { margin: 0 0 6px; }
.cw-quote > div { display: flex; gap: 8px; }
.cw-quote button { padding: 6px 12px !important; }
.cw-quote [data-cw-action='confirm-task'] { background: var(--accent, #298e9c); color: #fff; }
.cw-composer-mount { flex-shrink: 0; padding: 10px 10px 12px; }
#v2-wrap .v2-node[data-node-type='ai-text'] .creation-workbench .text-prompt-panel[data-control-placement='inline'] { position: static !important; inset: auto !important; width: 100% !important; min-width: 0 !important; max-width: none !important; display: flex !important; flex-direction: column; padding: 10px !important; margin: 0 !important; background: var(--bg-1, #fff); border: 1px solid var(--stroke-10, #dce2e6); border-radius: 6px !important; box-shadow: none !important; transform: none !important; visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; }
.cw-composer-mount .prompt-input-wrapper, .cw-composer-mount .prompt-input-frame { min-height: 0; width: 100%; padding: 0; position: relative; box-shadow: none; }
#v2-wrap .v2-node[data-node-type='ai-text'] .cw-composer-mount .prompt-textarea { display: block; width: 100%; min-height: 70px !important; max-height: 160px !important; height: 100px !important; margin: 8px 0; padding: 7px 3px !important; overflow-y: auto; outline: none; border: none; background: transparent; color: inherit; font-family: inherit; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.cw-composer-mount .prompt-textarea:empty::before { content: attr(data-placeholder); color: var(--text-muted, #89959b); pointer-events: none; }
.cw-composer-mount .prompt-tool-row, .cw-composer-mount .prompt-tool-row-left, .cw-composer-mount .prompt-tool-row-right, .cw-composer-mount .prompt-inline-tools { display: flex; gap: 6px; align-items: center; position: static; }
.cw-composer-mount .prompt-tool-row { justify-content: space-between; }
.cw-composer-mount .prompt-box-resize-handle { display: none; }
.cw-composer-mount .prompt-composer { --composer-text: var(--ui-text, #253039); --composer-muted: var(--ui-muted, #68767e); --composer-line: var(--ui-line, #dce2e6); --composer-accent: var(--ui-accent, #298e9c); --composer-submit-bg: var(--ui-surface, #fff); --composer-submit-bg-hover: var(--bg-hover, #edf2f3); --composer-submit-line: var(--ui-line, #dce2e6); --composer-submit-icon: var(--ui-text, #253039); }
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  grid-template-rows: 34px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 8px;
}
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-footer .image-composer-controls {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-control {
  justify-content: flex-start;
  flex: 0 1 auto;
  width: max-content;
  gap: 6px;
  height: 30px;
  min-width: 0;
  max-width: 100%;
  padding: 0 2px;
  font-size: 12px;
}
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-control-summary {
  display: block;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-control-icon { flex: 0 0 15px; width: 15px; height: 15px; }
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-control-icon svg { width: 15px; height: 15px; }
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-points { grid-column: 2; grid-row: 1; justify-self: end; min-width: 0; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
#v2-wrap .cw-composer-mount .prompt-composer .image-composer-submit { grid-column: 3; grid-row: 1; justify-self: end; box-shadow: none !important; }
.cw-composer-mount .prompt-inline-tool-btn, .cw-composer-mount .prompt-attachment-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; min-width: 28px; padding: 2px 4px; font-size: 12px; }
.cw-composer-mount .prompt-attachment-btn .btn-icon, .cw-composer-mount .prompt-attachment-btn svg { width: 16px; height: 16px; }
.cw-composer-mount .node-ref-bar, .cw-composer-mount .node-reference-bar { display: flex; align-items: center; gap: 5px; }
.cw-composer-mount .prompt-textarea :is(.ref-pill,.prompt-skill-pill) { display: inline-flex; align-items: center; gap: 4px; padding: 1px 5px; border: 1px solid var(--composer-line); border-radius: 4px; background: var(--bg-3, #ecf1f2); vertical-align: baseline; max-width: 100%; }
.cw-composer-mount .prompt-skill-pill-remove { width: 18px; height: 18px; padding: 0; }
.cw-document { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg-1, #fff); }
.cw-document-header { justify-content: space-between; flex: 0 0 48px; padding: 0 20px; }
.cw-nav { display: flex; gap: 4px; flex: 0 0 auto; padding: 6px 14px; border-bottom: 1px solid var(--stroke-08, #e5eaed); overflow-x: auto; }
.cw-nav:empty { display: none; }
.cw-nav button { padding: 5px 10px !important; white-space: nowrap; font-size: 12px; }
.cw-document-stream { flex: 1; min-height: 0; padding: 18px 20px 32px; overflow-y: auto; overflow-x: hidden; scroll-padding-top: 20px; }
.cw-document-chapter { margin-bottom: 38px; scroll-margin-top: 18px; }
.cw-document-chapter + .cw-document-chapter { border-top: 1px solid var(--stroke-08, #e5eaed); padding-top: 30px; }
.cw-document-chapter h2 { font-size: 19px; font-weight: 600; line-height: 1.45; margin: 0; flex: 1; overflow-wrap: anywhere; }
.cw-document-part { padding-top: 20px; }
.cw-document-part + .cw-document-part { margin-top: 20px; border-top: 1px solid var(--stroke-05, #edf0f2); }
.cw-document-part h3 { font-size: 15px; line-height: 1.5; font-weight: 600; margin: 0; flex: 1; overflow-wrap: anywhere; }
.cw-document-part > header { flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cw-version { color: var(--text-muted, #89959b); font-size: 11px; margin-left: auto; }
.cw-tools { flex-shrink: 0; gap: 2px; }
.cw-tools button { width: 30px; height: 30px; color: var(--text-secondary, #68767e); }
.creation-workbench .cw-tools .cw-reference { position: relative; flex: 0 0 24px; width: 24px; height: 24px; min-width: 24px; min-height: 24px; margin-left: 6px; touch-action: none; user-select: none; }
.cw-body { font-size: 14px; line-height: 1.95; }
.cw-body p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 14px; }
.cw-editor input, .cw-editor textarea { width: 100%; font: inherit; padding: 9px; border: 1px solid var(--stroke-15, #d4dfe3); color: inherit; background: var(--bg-1, #fff); border-radius: 5px; }
.cw-editor input { margin-bottom: 10px; }
.cw-editor textarea { min-height: 210px; resize: vertical; line-height: 1.8; }
.cw-editor > div { display: flex; justify-content: flex-end; margin-top: 8px; gap: 8px; }
.cw-empty { padding: 70px 24px; text-align: center; color: var(--text-muted, #89959b); }
.cw-empty button { padding: 8px 15px; border: 1px solid var(--stroke-10, #dce2e6); }
.cw-document > footer { display: flex; gap: 12px; justify-content: space-between; padding: 8px 20px; font-size: 11px; color: var(--text-muted, #89959b); border-top: 1px solid var(--stroke-08, #e5eaed); }
.cw-popover { position: absolute; z-index: 5; max-height: calc(100% - 32px); overflow-y: auto; padding: 12px; background: var(--bg-1, #fff); border: 1px solid var(--stroke-15, #d4dfe3); border-radius: 6px; box-shadow: 0 8px 30px #17232922; }
.cw-popover[data-layout="tools"] { padding: 6px; }
.cw-menu-tools { display: flex; gap: 6px; align-items: center; }
.cw-menu-tools { justify-content: flex-end; }
.cw-menu-tools button { min-width: 34px; min-height: 34px; }
.cw-popover p { margin: 0 0 10px; }
.cw-history-body { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 0; font-size: 12px; }
.cw-reference-context { padding: 3px 5px 6px; color: var(--sw-menu-muted, #89959b); font-size: var(--sw-command-sub-size, 11px); line-height: 1.4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
