.workbench-shell,
.app-ai-chat-dialog.tc-ai-chat {
  /* Workbench visual system: flat light workspace, solid panels, 8px panels, 32px icon controls. */
  --workbench-topbar-height: 56px;
  --workbench-timeline-height: 188px;
  --workbench-preview-timeline-height: 208px;
  --workbench-timeline-label-width: 112px;
  --workbench-bg: var(--nomi-bg);
  --workbench-surface: var(--nomi-paper);
  --workbench-surface-solid: var(--nomi-paper);
  --workbench-surface-soft: var(--nomi-ink-05);
  --workbench-border: var(--nomi-line);
  --workbench-border-soft: var(--nomi-line-soft);
  --workbench-border-strong: var(--nomi-ink-30);
  --workbench-muted: var(--nomi-ink-60);
  --workbench-muted-soft: var(--nomi-ink-40);
  --workbench-ink: var(--nomi-ink);
  --workbench-accent: var(--nomi-accent);
  --workbench-accent-soft: var(--nomi-accent-soft);
  --workbench-success: #34c759;
  --workbench-success-soft: rgba(52, 199, 89, 0.12);
  --workbench-danger: #ff3b30;
  --workbench-danger-soft: rgba(255, 59, 48, 0.1);
  --workbench-video: #00a886;
  --workbench-video-soft: rgba(0, 168, 134, 0.11);
  --workbench-success-ink: #248a3d;
  --workbench-hover: rgba(60, 60, 67, 0.06);
  --workbench-pressed: rgba(60, 60, 67, 0.09);
  --workbench-overlay: rgba(255, 255, 255, 0.82);
  --workbench-overlay-strong: rgba(255, 255, 255, 0.94);
  --workbench-backdrop: rgba(29, 29, 31, 0.16);
  --workbench-focus: color-mix(in srgb, var(--workbench-accent) 42%, transparent);
  --workbench-code-bg: #1d1d1f;
  --workbench-code-ink: #f5f5f7;
  --workbench-radius: var(--nomi-radius);
  --workbench-shadow-sm: var(--nomi-shadow-sm);
  --workbench-shadow-md: var(--nomi-shadow-md);
  --workbench-shadow-pop: var(--nomi-shadow-lg);
  --workbench-control-size: 32px;
  --workbench-control-size-sm: 26px;
  --workbench-control-radius: 7px;
  --workbench-icon-size: 16px;
  --workbench-icon-stroke: 2;
  --canvas-surface-bg: var(--workbench-bg);
  --tc-spotlight-grid-color: rgba(60, 60, 67, 0.22);
}

/* ── TipTap / ProseMirror editor content typography ── */
.workbench-editor__content {
  min-height: 100%;
  padding: 24px 32px 80px;
  color: var(--workbench-ink);
  cursor: text;
  font-size: 16px;
  line-height: 1.76;
  letter-spacing: 0;
}

.workbench-editor__scroll > div {
  min-height: 100%;
  display: flex;
}

.workbench-editor__scroll .ProseMirror,
.workbench-editor__scroll .tiptap {
  min-height: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* v0.7.8: 显式去掉 contenteditable 的浏览器默认 focus outline。
   之前在 macOS 上 outline:auto 会跟系统强调色 — 用户设了"黄色"就出黄框。
   我们的设计里整个外层 section 已经有 border + shadow，编辑区本身不需要再画框。 */
.workbench-editor__scroll .ProseMirror:focus,
.workbench-editor__scroll .ProseMirror:focus-visible,
.workbench-editor__scroll .tiptap:focus,
.workbench-editor__scroll .tiptap:focus-visible {
  outline: none;
  box-shadow: none;
}

.workbench-editor__content p {
  margin: 0 0 14px;
}

.workbench-editor__content h1,
.workbench-editor__content h2,
.workbench-editor__content h3 {
  margin: 22px 0 12px;
  color: var(--workbench-ink);
  line-height: 1.22;
  letter-spacing: 0;
}

.workbench-editor__content h1 {
  font-size: 28px;
}

.workbench-editor__content h2 {
  font-size: 22px;
}

.workbench-editor__content h3 {
  font-size: 18px;
}

.workbench-editor__content ul,
.workbench-editor__content ol {
  margin: 0 0 14px;
  padding-left: 24px;
}

.workbench-editor__content blockquote {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-left: 3px solid color-mix(in srgb, var(--workbench-accent) 34%, transparent);
  background: var(--workbench-surface-soft);
  color: var(--workbench-ink);
}

.workbench-editor__content pre {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 7px;
  overflow: auto;
  background: var(--workbench-code-bg);
  color: var(--workbench-code-ink);
}

.workbench-editor__content code {
  border-radius: 4px;
  padding: 1px 4px;
  background: var(--workbench-pressed);
  font-size: 0.92em;
}

/* (节点错误显示已统一到 NodeErrorReport.tsx，原 .error-peek 已删；规则 1) */
