/* 由 scripts/extract-qingdoc-css.mjs 从青简 wt/dsh-bridge@dc1a0baf 机械提取；声明值不改。 */
/* dsh 面板薄胶水：只建立青简纸面所需的唯一根与原 DOM 骨架。 */
[data-qingagent-doc-panel] {
  isolation: isolate;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* dsh AppFrame 的内建 preference 把 details 钳在 300–520；青简纸面打开时由同一个
   CSS 变量接管第三轨，center 保持 minmax(0,1fr) 弹性收缩。整条 !important 简写也会
   一并接管第一轨，所以第一轨变量必须镜像 AppFrame 行内值；不改 React store，卸载即复原。 */
[class*="detailsCol"]:has([data-qingagent-doc-panel]) {
  width: var(--qing-details-width, clamp(560px, 46vw, 920px)) !important;
  min-width: 0 !important;
}
[class*="frame"]:has(> [class*="detailsCol"] [data-qingagent-doc-panel]) {
  grid-template-columns:
    var(--qing-sidebar-width, 280px)
    minmax(0, 1fr)
    var(--qing-details-width, clamp(560px, 46vw, 920px)) !important;
}
[class*="frame"]:has(> [class*="detailsCol"] [data-qingagent-doc-panel])
  > [class*="centerCol"] {
  min-width: 0 !important;
  width: auto !important;
  flex: 1 1 auto !important;
}
[class*="frame"]:has(> [class*="detailsCol"] [data-qingagent-doc-panel])
  > [class*="handle"][data-side="details"] {
  display: none !important;
}
[data-qingagent-doc-panel] .qingdoc-details-resizer {
  position: absolute;
  z-index: 100300;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  transform: translateX(-50%);
  cursor: col-resize;
  touch-action: none;
  outline: none;
}
[data-qingagent-doc-panel] .qingdoc-details-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: rgba(181, 154, 99, 0);
  transition: background .15s ease;
}
[data-qingagent-doc-panel] .qingdoc-details-resizer:hover::after,
[data-qingagent-doc-panel][data-qing-details-resizing="1"] .qingdoc-details-resizer::after {
  background: rgba(181, 154, 99, .68);
}
[data-qingagent-doc-panel] .ws-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
  position: relative;
}
[data-qingagent-doc-panel] .ws-document-content { display: contents; }
[data-qingagent-doc-panel] .ws-document-content > * { position: relative; z-index: 1; }
[data-qingagent-doc-panel] .qingdoc-stage-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  padding: 10px 12px;
  color: rgba(236, 227, 208, .76);
  border: 0;
  border-bottom: 1px solid rgba(184, 169, 140, .28);
  border-radius: 0;
  background: rgba(8, 11, 15, .96);
  box-shadow: none;
  font: 13px/1.4 var(--font-zh-serif);
}
[data-qingagent-doc-panel] .qingdoc-heading,
[data-qingagent-doc-panel] .qingdoc-host-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-qingagent-doc-panel] .qingdoc-heading { flex: 1 1 auto; }
[data-qingagent-doc-panel] .qingdoc-host-actions { flex: 0 1 auto; }
[data-qingagent-doc-panel] .qingdoc-brand {
  color: #cfb477;
  letter-spacing: .12em;
  white-space: nowrap;
}
[data-qingagent-doc-panel] .qingdoc-doc-switcher {
  position: relative;
  min-width: 0;
  max-width: 260px;
}
[data-qingagent-doc-panel] .qingdoc-doc-trigger {
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  /* 墨条永远是深底,标题色必须固定用青简暖纸色,不跟随 dsh 明暗令牌(浅色模式下深字压深底会看不见) */
  color: #ece3d0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
[data-qingagent-doc-panel] .qingdoc-doc-trigger:hover,
[data-qingagent-doc-panel] .qingdoc-doc-trigger[aria-expanded="true"] {
  background: rgba(236, 227, 208, .08);
}
[data-qingagent-doc-panel] .qingdoc-doc-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(236, 227, 208, .34);
}
[data-qingagent-doc-panel] .qingdoc-stage-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-qingagent-doc-panel] .qingdoc-doc-chevron {
  flex: 0 0 auto;
  color: rgba(236, 227, 208, .55);
  transition: transform .12s ease;
}
[data-qingagent-doc-panel] .qingdoc-doc-trigger[aria-expanded="true"] .qingdoc-doc-chevron {
  transform: rotate(180deg);
}
[data-qingagent-doc-panel] .qingdoc-doc-menu {
  position: absolute;
  z-index: 100400;
  top: calc(100% + 6px);
  left: 0;
  width: max(240px, 100%);
  max-width: min(360px, calc(100vw - 32px));
  max-height: 280px;
  box-sizing: border-box;
  padding: 5px;
  overflow-y: auto;
  /* 青简风(用户拍板 2026-08-16:产品无圆角):暖纸底+褐线直角+墨字,弃 dsh 令牌 */
  color: #5c5346;
  border: 1px solid rgba(120, 90, 50, .28);
  border-radius: 0;
  background: #faf6ec;
  box-shadow: 0 12px 28px rgba(40, 28, 12, .22);
}
[data-qingagent-doc-panel] .qingdoc-doc-option {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  color: #5c5346;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
[data-qingagent-doc-panel] .qingdoc-doc-option:hover,
[data-qingagent-doc-panel] .qingdoc-doc-option[data-focused="true"] {
  color: #2f2a22;
  background: rgba(120, 90, 50, .10);
}
[data-qingagent-doc-panel] .qingdoc-doc-option[aria-selected="true"] {
  color: #a8823f;
}
[data-qingagent-doc-panel] .qingdoc-doc-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a8823f;
}
[data-qingagent-doc-panel] .qingdoc-doc-option-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-qingagent-doc-panel] .qingdoc-doc-state-label {
  flex: 0 0 auto;
  font-size: 11px;
  color: #8a7f6e;
  white-space: nowrap;
}
[data-qingagent-doc-panel] .qingdoc-doc-group-label {
  padding: 6px 8px 3px;
  font-size: 11px;
  color: #8a7f6e;
  white-space: nowrap;
  user-select: none;
}
[data-qingagent-doc-panel] .qingdoc-doc-group-label:not(:first-child) {
  margin-top: 3px;
  border-top: 1px solid rgba(120, 90, 50, .16);
  padding-top: 8px;
}
[data-qingagent-doc-panel] .qingdoc-status {
  min-width: 0;
  color: rgba(236, 227, 208, .58);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-qingagent-doc-panel] .qingdoc-status[data-kind="conflict"],
[data-qingagent-doc-panel] .qingdoc-status[data-kind="blocked"],
[data-qingagent-doc-panel] .qingdoc-status[data-kind="error"] { color: #e6bd86; }
[data-qingagent-doc-panel] .qingdoc-open {
  min-height: 28px;
  box-sizing: border-box;
  color: rgba(236, 227, 208, .66);
  border: 1px solid rgba(184, 169, 140, .22);
  border-radius: 0;
  background: transparent;
  font: inherit;
}
[data-qingagent-doc-panel] .qingdoc-open {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  text-decoration: none;
  white-space: nowrap;
}
[data-qingagent-doc-panel] .qingdoc-conflict-reload {
  min-height: 24px;
  margin-left: 8px;
  padding: 0 10px;
  color: #e6bd86;
  border: 1px solid rgba(230, 189, 134, .45);
  border-radius: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
[data-qingagent-doc-panel] .qingdoc-conflict-reload:hover {
  background: rgba(230, 189, 134, .12);
}
/* 审阅条毛玻璃:注入管线会把 var() 形式的 backdrop-filter 剥掉,这里以显式值重申(面板 JS 另有内联兜底)。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav:not(.is-confirming) {
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
/* 纸面滚动条:青简原版 6px 淡拇指在宣纸上近乎隐形,按用户要求加宽提对比。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right::-webkit-scrollbar { width: 10px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right::-webkit-scrollbar-thumb {
  background: rgba(120, 90, 50, .38);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right::-webkit-scrollbar-thumb:hover { background: rgba(120, 90, 50, .6); background-clip: padding-box; }
[data-qingagent-doc-panel] .qingdoc-open-icon {
  width: 15px;
  height: 15px;
  margin: 0 7px;
  border-radius: 4px;
  /* 图标自带深蓝方章底,在墨条上须描一圈暖纸边才看得清 */
  box-shadow: 0 0 0 1px rgba(236, 227, 208, .45);
  flex: 0 0 auto;
}
[data-qingagent-doc-panel] .qingdoc-open-arrow {
  flex: 0 0 auto;
  margin-left: 5px;
  opacity: .8;
}
[data-qingagent-doc-panel] .qingdoc-close {
  min-height: 28px;
  padding: 0 8px;
  color: rgba(236, 227, 208, .64);
  border: 1px solid rgba(184, 169, 140, .22);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
[data-qingagent-doc-panel] .qingdoc-close { width: 28px; padding: 0; font-size: 17px; }
[data-qingagent-doc-panel] .qingdoc-open:hover,
[data-qingagent-doc-panel] .qingdoc-close:hover {
  color: #ece3d0;
  border-color: rgba(236, 227, 208, .5);
  background: rgba(236, 227, 208, .08);
}

/* source: packages/ui-kit/src/tokens.css:4-48 */
[data-qingagent-doc-panel] {
  /* 中性色板:暖墨纸系(原 slate-blue 冷色 base 已废弃,全站统一暖化)。
   * 暖值与 workspace-ink-skin 的逐容器暖化保持一致(墨 #2f2a22 / 金棕 mark #a8823f)。 */
  --bg-window: #e7ddc9;
  --bg-canvas: #faf6ec;
  --bg-paper-deep: #efe7d6;
  --bg-subtle: rgba(120, 90, 50, 0.07);
  --bg-panel: rgba(120, 90, 50, 0.05);
  --bg-hover: rgba(120, 90, 50, 0.1);
  --line-1: rgba(120, 90, 50, 0.16);
  --line-2: rgba(120, 90, 50, 0.28);
  --line-3: rgba(120, 90, 50, 0.42);
  --line-ink: #2f2a22;
  --ink-1: #2f2a22;
  --ink-2: #5c5346;
  --ink-3: #8a7f6e;
  --ink-4: #b3a791;
  --ink-cool: #8a7f6e;
  --ink-on-dark: #ece3d0;
  --mark: #a8823f;
  --mark-soft: rgba(168, 130, 63, 0.14);
  --diff-ins-bg: #e6ecd7;
  --diff-ins-ink: #3a4e1d;
  --diff-ins-bd: #c2cfa4;
  --diff-del-bg: #f1dfd7;
  --diff-del-ink: #6b2d1a;
  --diff-del-bd: #d7b6a4;
  --sel-bg: #f1e4a8;
  --ink-surface: #1a1410;
  --ink-surface-2: #221c15;
  --shadow-1: 0 1px 2px rgba(50, 38, 18, 0.06);
  --shadow-2: 0 6px 20px rgba(50, 38, 18, 0.1), 0 1px 3px rgba(50, 38, 18, 0.06);
  --shadow-3: 0 24px 60px rgba(50, 38, 18, 0.2), 0 4px 12px rgba(50, 38, 18, 0.08);
  --font-display: "EB Garamond", "Newsreader", "Source Serif Pro", "Charter", Georgia, serif;
  --font-sans: "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --font-zh-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun",
    "宋体", serif;
  --r-sm: 0;
  --r: 0;
  --r-lg: 0;
  --r-pill: 999px;
  --z-popover: 10020;
}

/* source: packages/ui-kit/src/base.css:5-36 */
[data-qingagent-doc-panel], [data-qingagent-doc-panel] * {
  box-sizing: border-box;
}

[data-qingagent-doc-panel],
[data-qingagent-doc-panel] {
  margin: 0;
  padding: 0;
  background: var(--bg-window);
  color: var(--ink-1);
}

[data-qingagent-doc-panel] {
  font-family: var(--font-zh-serif);
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 表单控件的 UA 默认字体不会可靠继承 body；这是 portal、弹窗与菜单共用的字体防线，勿删。
 * 局部等宽/装饰字体仍可由更具体的组件规则覆盖，并会连同完整 font 属性正常继承。 */
[data-qingagent-doc-panel] button,
[data-qingagent-doc-panel] input,
[data-qingagent-doc-panel] select,
[data-qingagent-doc-panel] textarea,
[data-qingagent-doc-panel] optgroup {
  font: inherit;
}

[data-qingagent-doc-panel] .font-mono {
  font-family: var(--font-mono);
}

/* source: packages/ui-kit/src/components.css:181-274 */
/* ============ Doc ============ */
/* .doc-typography 是只读正文的共享排版作用域；.wf-doc 继续承载编辑器 chrome。 */
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-1);
  font-family: var(--font-zh-serif);
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) h1 {
  font-family: var(--font-zh-serif);
  font-size: 26px;
  font-weight: 600;
  margin: 16px 0 10px;
  letter-spacing: 0.012em;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) h2 {
  font-family: var(--font-zh-serif);
  font-size: 20px;
  font-weight: 600;
  margin: 22px 0 8px;
  letter-spacing: 0.01em;
}
/* H3-H6 与 H1/H2 一样继承 .wf-doc 的 --ink-1 深色;曾用 --ink-2/--ink-3
   逐级变浅做层级,但用户要求所有标题一律深色对齐 H1(靠字号/字重区分层级即可) */
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 14px 0 4px;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) h4 {
  font-size: 15.5px;
  font-weight: 600;
  margin: 12px 0 4px;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) h5 {
  font-size: 14.8px;
  font-weight: 600;
  margin: 10px 0 4px;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) h6 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 10px 0 4px;
  letter-spacing: 0.02em;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) p { margin: 8px 0; }
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) table {
  border-collapse: collapse;
  font-size: 12.5px;
  margin: 10px 0;
  border: 1px solid var(--line-2);
  border-radius: 0;
  overflow: hidden;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) th,
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) td {
  border-bottom: 1px solid var(--line-1);
  border-right: 1px solid var(--line-1);
  padding: 7px 12px;
  text-align: left;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--ink-2);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) th:last-child,
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) td:last-child {
  border-right: none;
}
[data-qingagent-doc-panel] :is(.wf-doc, .doc-typography) tr:last-child td {
  border-bottom: none;
}

/* ============ Patches / Selection / Annotation ============ */
[data-qingagent-doc-panel] .wf-patch-ins {
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(74, 180, 100, 0.22) 50%
  );
  color: inherit;
  padding: 0 2px;
  border-radius: 0;
  border-bottom: none;
}
[data-qingagent-doc-panel] .wf-sel {
  background: var(--sel-bg);
  border-radius: 0;
  padding: 0 3px;
  cursor: pointer;
}

/* source: apps/web/src/app.css:1-15 */
@font-face {
  font-family: "QingYanShiSubset";
  src: url("./assets/yanshi-colophon-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

[data-qingagent-doc-panel] {
  /* 转场、新建页与工作区共用同一张玄青桌面，避免跨路由首尾帧色值断层。 */
  --desk-base: #16212c;
  --desk-cinnabar-glow: radial-gradient(130% 100% at 72% 8%, rgba(207, 90, 79, 0.1), transparent 50%);
  --desk-teal-glow: radial-gradient(120% 120% at 16% 90%, rgba(70, 120, 120, 0.09), transparent 55%);
  --desk-vignette: radial-gradient(150% 130% at 50% 42%, transparent 0%, transparent 48%, rgba(8, 13, 19, 0.42) 100%);
}

/* source: apps/web/src/app.css:252-474 */
[data-qingagent-doc-panel] .ws-folder-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(8, 10, 12, 0.55);
  backdrop-filter: none;
  animation: ws-folder-modal-overlay-in 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-qingagent-doc-panel] .ws-folder-modal-overlay.is-exiting {
  pointer-events: none;
  animation: ws-folder-modal-overlay-out 220ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

[data-qingagent-doc-panel] .ws-folder-modal-overlay > .ws-folder-intro-modal,
[data-qingagent-doc-panel] .ws-folder-modal-overlay > .ws-folder-confirm-modal {
  width: min(460px, 92vw);
  color: var(--ink-1);
  background: var(--bg-paper-deep);
  border: 1px solid var(--line-2);
  border-radius: 0;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  transform-origin: 50% 56%;
  will-change: opacity, transform;
  animation: ws-folder-modal-panel-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-qingagent-doc-panel] .ws-folder-modal-overlay > .ws-folder-intro-modal {
  padding: 26px 26px 20px;
}

[data-qingagent-doc-panel] .ws-folder-modal-overlay > .ws-folder-confirm-modal {
  max-width: 330px;
  padding: 22px 24px 18px;
}

[data-qingagent-doc-panel] .ws-folder-confirm-modal h3 {
  margin: 0 0 10px;
  color: var(--ink-1);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

[data-qingagent-doc-panel] .ws-folder-confirm-modal p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}

[data-qingagent-doc-panel] .ws-folder-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

[data-qingagent-doc-panel] .ws-folder-modal-primary,
[data-qingagent-doc-panel] .ws-folder-modal-secondary,
[data-qingagent-doc-panel] .ws-folder-modal-danger {
  border-radius: 0;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

[data-qingagent-doc-panel] .ws-folder-modal-primary {
  padding: 9px 18px;
  color: var(--bg-paper-deep);
  font-weight: 600;
  background: var(--ink-1);
  border: 0;
}

[data-qingagent-doc-panel] .ws-folder-modal-secondary {
  padding: 8px 16px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-2);
}

[data-qingagent-doc-panel] .ws-folder-modal-danger {
  padding: 8px 16px;
  color: #fff;
  font-weight: 600;
  background: #c0392b;
  border: 0;
}

/* 授予/连接类主按钮:暖金实底配深墨字(与设置里的 sm-btn.primary 同一套令牌)。
   授权不是报错,不能用 danger 的红。 */
[data-qingagent-doc-panel] .ws-folder-modal-affirm {
  padding: 8px 16px;
  color: #241c0c;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--qj-cinnabar, #c8a96a);
  border: 1px solid var(--qj-cinnabar, #c8a96a);
  transition: background 0.2s, border-color 0.2s;
}

[data-qingagent-doc-panel] .ws-folder-modal-affirm:hover:not(:disabled),
[data-qingagent-doc-panel] .ws-folder-modal-affirm:focus-visible {
  background: var(--qj-cinnabar-lite, #dcc189);
  border-color: var(--qj-cinnabar-lite, #dcc189);
}

[data-qingagent-doc-panel] .ws-folder-modal-affirm:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

/* affirm 卡略宽:比"确定删除吗"多一行路径与一行脚注。 */
[data-qingagent-doc-panel] .ws-folder-modal-overlay > .ws-folder-confirm-modal.is-affirm {
  max-width: 388px;
}

/* 标题下的路径行:等宽,避免 ~/.lark-cli 被衬线体拉花。 */
[data-qingagent-doc-panel] .ws-folder-confirm-subject {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

[data-qingagent-doc-panel] .ws-folder-confirm-foot {
  margin: 2px 0 0;
  color: var(--ink-3, var(--ink-2));
  font-size: 12px;
  line-height: 1.7;
}

[data-qingagent-doc-panel] .ws-folder-modal-primary:disabled,
[data-qingagent-doc-panel] .ws-folder-modal-secondary:disabled,
[data-qingagent-doc-panel] .ws-folder-modal-danger:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

[data-qingagent-doc-panel] .ws-folder-modal-overlay.is-exiting > .ws-folder-intro-modal,
[data-qingagent-doc-panel] .ws-folder-modal-overlay.is-exiting > .ws-folder-confirm-modal {
  animation: ws-folder-modal-panel-out 220ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

@keyframes ws-folder-modal-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ws-folder-modal-overlay-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes ws-folder-modal-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ws-folder-modal-panel-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
}

@keyframes ws-folder-modal-panel-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ws-folder-modal-panel-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-qingagent-doc-panel] .ws-folder-modal-overlay > .ws-folder-intro-modal,
[data-qingagent-doc-panel] .ws-folder-modal-overlay > .ws-folder-confirm-modal {
    animation-name: ws-folder-modal-panel-fade-in;
    transform: none;
  }

  [data-qingagent-doc-panel] .ws-folder-modal-overlay.is-exiting > .ws-folder-intro-modal,
[data-qingagent-doc-panel] .ws-folder-modal-overlay.is-exiting > .ws-folder-confirm-modal {
    animation-name: ws-folder-modal-panel-fade-out;
    transform: none;
  }
}

/* source: apps/web/src/pages/workspace/workspace.css:169-169 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-separator {height:1px;margin:4px 7px;background:var(--line-2)}:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-item.is-danger {color:var(--danger)}

/* source: apps/web/src/pages/workspace/workspace.css:197-214 */
  /* 右栏 DOC · 文档独立滚动容器。
     作为 .ws-body(横向 flex)的 flex item,必须显式 min-height:0:
     flex item 默认 min-height:auto 会被长文档内容撑开,使 overflow-y:auto 失效、
     高度溢出冒泡到 body。加 min-height:0 后高度被父锁死,长文档在本列内部滚动。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right {
    flex:1 1 auto;min-width:0;min-height:0;position:relative;overflow-y:auto;overflow-x:hidden;
    /* flex 列:让内容区撑满高度,末尾 .ws-edit-lock 用 margin-top:auto 稳定钉底——
       否则生成期 RightPane 渲染 QingLoading 等矮占位时,sticky-bottom 的编辑锁会落到顶部
       (自然流位置)。bigplan 态早已用 flex column,此处统一为默认。 */
    display:flex;flex-direction:column;
    /* 顶部 36 留白(深墨间隔=顶部空间);底部 0,纸张 min-height:100% 直接铺到底,不留黑空隙 */
    padding:36px 80px 0 60px;
    background:var(--bg-canvas);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right::-webkit-scrollbar {width:6px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right::-webkit-scrollbar-thumb {background:var(--line-2);border-radius:0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right::-webkit-scrollbar-thumb:hover {background:var(--ink-4)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right::-webkit-scrollbar-track {background:transparent}

/* source: apps/web/src/pages/workspace/workspace.css:294-376 */
  /* ============ Patch 固定顶条 ============ */
  /* ============ Patch 审核条 · 只在 review 态出现 · 贴正文左, 横向精简 ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav {
    position:sticky;top:0;z-index:8;
    margin:0 0 18px 0;              /* 对齐 .wf-doc 左边 */
    max-width:660px;                /* = 860 正文 - 200 右留白 */
    width:100%;
    padding:7px 10px 7px 14px;
    background:var(--bg-subtle);    /* 去 backdrop-filter 提速 */
    border:1px solid var(--line-2);
    border-radius:var(--r);
    display:flex;align-items:center;gap:8px;
    font-size:12px;color:var(--ink-2);
    white-space:nowrap;
    /* 改动B 微调:"打字"完成后审批条才挂载,挂载时下滑淡入 */
    animation:pn-in .34s cubic-bezier(.2,.7,.3,1) both;
  }
  @keyframes pn-in {from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-dot {
    width:7px;height:7px;border-radius:50%;
    background:#e8913a;box-shadow:0 0 0 3px rgba(232,145,58,.18);flex-shrink:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-label {color:var(--ink-1);font-weight:500;margin-right:4px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-label b {color:#e8913a;font-weight:600;margin:0 2px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump {
    display:inline-flex;align-items:center;gap:4px;
    background:transparent;color:var(--ink-1);
    border:1px solid var(--line-2);border-radius:var(--r-sm);
    padding:3px 10px;font-size:11.5px;cursor:pointer;
    transition:background .12s,border-color .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump:hover {background:var(--bg-hover);border-color:var(--ink-3)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost {
    background:transparent;color:var(--ink-3);
    border:1px solid var(--line-2);border-radius:var(--r-sm);
    padding:3px 10px;font-size:11.5px;cursor:pointer;
    transition:color .12s,border-color .12s,background .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost:hover {color:var(--ink-1);border-color:var(--ink-3);background:var(--bg-hover)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit {
    display:inline-flex;align-items:center;gap:4px;
    background:var(--ink-1);color:var(--ink-on-dark);
    border:1px solid var(--ink-1);border-radius:var(--r-sm);
    padding:3px 12px;font-size:11.5px;cursor:pointer;font-weight:500;
    transition:background .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit:hover {background:#2d2a22}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump:disabled {opacity:.35;cursor:default;pointer-events:none}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-spacer {flex:1}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-inline {
    width:100%;display:flex;align-items:center;gap:8px;white-space:nowrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-message {font-size:12.5px;font-weight:500}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-action,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-cancel {
    padding:4px 12px;border:1px solid var(--line-2);border-radius:0;
    font:11.5px/1.4 var(--font-zh-serif);cursor:pointer;transition:background .12s,border-color .12s,color .12s;
  }

  /* ============ 整篇审(大改 ≥70%)新旧版切换 ============ */
  /* 底部条里的互斥选择器 [新版 ‖ 旧版]:滑动 thumb;颜色在 ink-skin 按暗条重定。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wdr-toggle {
    position:relative;display:inline-flex;align-items:center;
    background:var(--bg-hover);border:1px solid var(--line-2);
    border-radius:999px;padding:2px;margin-left:2px;flex-shrink:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wdr-opt {
    position:relative;z-index:1;flex:1 1 0;min-width:46px;text-align:center;
    background:transparent;border:0;padding:3px 13px;
    font-size:11.5px;font-family:inherit;color:var(--ink-3);
    cursor:pointer;border-radius:999px;transition:color .18s;white-space:nowrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wdr-opt.is-on {color:var(--ink-on-dark)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wdr-thumb {
    position:absolute;z-index:0;left:2px;top:2px;bottom:2px;
    width:calc(50% - 2px);background:var(--ink-1);border-radius:999px;
    transition:transform .26s cubic-bezier(.4,.1,.2,1);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wdr-thumb.is-new {transform:translateX(0)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wdr-thumb.is-old {transform:translateX(100%)}
  /* 新旧版正文切换:淡入 + 轻微上移(keyed remount 触发) */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wdr-swap {animation:wdr-swap-in .34s cubic-bezier(.22,.61,.36,1) both}
  @keyframes wdr-swap-in {from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

/* source: apps/web/src/pages/workspace/workspace.css:1136-1173 */
  /* ============ 青简 Loading（空文档占位：静止态/推理态） ============ */
  /* 复用 .doc-empty 那张「奶白纸」(ink-skin 给了 top/背景/阴影)，只把里面的浮动 loader 换成青字效果，
     所以这里不自定义铺满背景/定位——纸张与位置完全沿用原空态。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-col {display:flex;flex-direction:column;align-items:center}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-stage {position:relative}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-stage .qing-ch,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-stage .qing-center {
    position:absolute;left:0;top:0;display:flex;align-items:center;justify-content:center;
    line-height:1;user-select:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-stage .qing-ch {will-change:opacity;pointer-events:none;opacity:0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-stage .qing-center {z-index:5;font-weight:700;color:var(--mark)}
  /* 静止态：青字浅金；hover 整张纸(.qing-empty)时加深、辉光增强 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-empty.is-static .qing-center {
    color:#cbab70;filter:drop-shadow(0 0 10px rgba(168,130,63,.20));
    transition:color .28s ease,filter .28s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-empty.is-static:hover .qing-center {
    color:var(--mark);filter:drop-shadow(0 0 16px rgba(168,130,63,.42));
  }
  /* 署名默认隐藏，仅鼠标移到圆圈(stage 被 clip-path 裁成圆)上才淡出；静止态完全不显示 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-tag {
    text-align:center;font-family:var(--font-zh-serif);
    color:#6b6256;opacity:0;transition:opacity .3s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-stage:hover ~ .qing-tag {opacity:.62}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-empty.is-static .qing-tag {display:none}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-tag-inner {will-change:opacity,transform}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-tag-inner .qt-title {font-size:14px;letter-spacing:2px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .qing-tag-inner .qt-author {font-size:12px;letter-spacing:2px;opacity:.8;margin-top:8px}

  /* ============ doc-state 容器 ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty {
    position:absolute;inset:0;z-index:3;
    display:flex;align-items:center;justify-content:center;
    background:var(--bg-canvas);
    overflow:hidden;
  }

/* source: apps/web/src/pages/workspace/workspace.css:1305-3668 */
  /* ============ 工具栏 · 浮现式 (选中文本时出现在选区上方) ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar {
    /* z-index 必须高于表格列/行头热区(.tbl-col-hdr/.tbl-row-hdr=100010、.tbl-dot=100020):
       在表格单元格内选中文字时,本浮层会盖在表格顶部,层级不够会被列头热区反盖住,
       重叠处点击穿透去触发选列(bug)。抬到 100050 让工具栏始终在最上、挡住下层点击 */
    position:fixed;z-index:100050;
    display:flex;align-items:center;gap:2px;
    padding:5px 6px;
    background:var(--ink-1);
    border:1px solid var(--ink-1);border-radius:var(--r);
    box-shadow:0 10px 28px rgba(20,30,38,.28),0 2px 6px rgba(20,30,38,.12);
    font-size:13px;user-select:none;
    opacity:0;pointer-events:none;transform:translate(-50%,-4px);
    transition:opacity .14s ease,transform .14s cubic-bezier(.2,.8,.2,1);
    white-space:nowrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar.on {opacity:1;pointer-events:auto;transform:translate(-50%,0)}
  /* 指向箭头:用 clip-path 切出的纯三角(非旋转方块),顶边正好贴气泡底缘、不伸进气泡内部。
     旋转方块那种"一半压进气泡"的做法,当气泡/箭头半透明时叠加区会出现加深的三角;纯三角零
     重叠,根除该问题。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar::after {
    content:"";position:absolute;left:50%;top:100%;transform:translateX(-50%);
    width:12px;height:6px;background:var(--ink-1);
    clip-path:polygon(50% 100%, 0 0, 100% 0); /* 朝下三角 */
  }
  /* 浮条翻到选区下方时(上方没空间),箭头移到顶部并朝上指向选区。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar.is-below::after {
    top:auto;bottom:100%;
    clip-path:polygon(50% 0, 0 100%, 100% 100%); /* 朝上三角 */
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn {
    display:inline-flex;align-items:center;justify-content:center;gap:3px;
    min-width:26px;height:26px;padding:0 6px;
    background:transparent;border:none;cursor:pointer;
    color:var(--ink-1);font-size:13px;font-family:var(--font-zh-serif);
    border-radius:var(--r-sm);transition:background .1s,color .1s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn:hover {background:var(--bg-hover)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn.active {background:#e5dfc9;color:var(--ink-1)}
  /* 暂不支持的格式命令(行内标记/对齐等)按钮置灰,避免"看着能点其实无效"的误导。
     待 0606 给文档模型加行内标记支持后再启用。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn:disabled {
    opacity:.32;cursor:not-allowed;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn:disabled:hover {background:transparent}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn .dt-lbl {font-family:var(--font-zh-serif);font-weight:500;font-size:14px;line-height:1}
  /* 尖角/对齐改成 SVG 图标(旧的 ▾ ≡ 是文字字符,字形随系统字体、粗细不一也不居中) */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn .dt-caret {
    display:inline-flex;align-items:center;justify-content:center;color:var(--ink-3);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn .dt-lbl-icon {display:inline-flex;align-items:center;justify-content:center}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-svg {
    width:16px;height:16px;display:block;fill:none;
    stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
  }
  /* 表格结构类图标(合并/删除/对齐)线条多,1.8 描边显糊粗,细化与左侧文字钮协调。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-svg-thin {stroke-width:1.3}
  /* 删除行/列是危险操作,用项目红提亮(深底可辨),避免金棕被误读为禁用态;
     需盖过 .doc-toolbar .dt-btn 的 ink-on-dark。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-btn.dt-btn-danger {color:#d97a5e}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-btn.dt-btn-danger:hover {color:#e8907a}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-code-icon {
    width:30px;height:22px;display:inline-flex;align-items:center;justify-content:center;
    border:1px solid rgba(255,255,255,.28);border-radius:0;
    background:rgba(255,255,255,.08);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-code-icon .dt-svg {width:18px;height:18px;stroke-width:1.9}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-divider {width:1px;height:16px;background:var(--line-2);margin:0 4px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-group {position:relative}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-menu {
    display:none;position:absolute;top:calc(100% + 6px);left:0;z-index:100030;
    min-width:148px;padding:4px 0;
    background:var(--bg-canvas);border:1px solid var(--line-2);
    border-radius:var(--r);box-shadow:0 8px 20px rgba(20,30,38,.20);
    max-height:min(60vh, 420px);overflow-y:auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-group.open .dt-menu {display:block}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-group.flip-up .dt-menu {top:auto;bottom:calc(100% + 6px)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-mi {
    padding:6px 12px;font-size:12.5px;color:var(--ink-1);cursor:pointer;
    display:flex;align-items:center;gap:8px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-mi:focus {outline:none}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-mi:focus-visible {
    outline:1px solid rgba(255,255,255,.32);
    outline-offset:-2px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-mi:hover {background:var(--bg-hover)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-mi-spacer {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;color:var(--ink-3)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-mi-k {font-family:var(--font-mono);font-size:10px;color:var(--ink-3);min-width:24px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-menu-icon {
    width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;
    flex:0 0 18px;color:currentColor;opacity:.86;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-menu-svg {
    width:17px;height:17px;display:block;fill:none;
    stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-menu-colors {
    min-width:214px;padding:10px;max-height:min(70vh,560px);overflow:auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-size-picker {
    position:fixed;z-index:100070;box-sizing:border-box;width:238px;padding:10px;
    background:var(--bg-canvas);border:1px solid var(--line-2);border-radius:0;
    box-shadow:0 10px 28px rgba(20,30,38,.18),0 2px 6px rgba(20,30,38,.08);
    color:var(--ink-1);font-family:var(--font-zh-serif);user-select:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-size-picker:focus-visible {outline:1px solid var(--mark);outline-offset:2px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-size-picker__head {
    display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;
    font-size:12.5px;color:var(--ink-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-size-picker__head output {
    color:var(--mark);font-family:var(--font-mono);font-size:11px;font-variant-numeric:tabular-nums;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-size-picker__grid {
    display:grid;grid-template-columns:repeat(10,18px);grid-auto-rows:18px;gap:3px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-size-picker__grid [data-table-size-cell] {
    width:18px;height:18px;box-sizing:border-box;padding:0;border:1px solid var(--line-2);
    border-radius:0;background:var(--bg-subtle);cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-size-picker__grid [data-table-size-cell].is-active {
    border-color:var(--mark);background:var(--mark-soft);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-color-menu {display:flex;flex-direction:column;gap:10px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-color-menu-compact {gap:6px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-color-section {display:flex;flex-direction:column;gap:6px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-color-label {
    font-size:11px;color:rgba(255,255,255,.62);
    padding:0 2px;font-family:var(--font-zh-serif);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-swatch-grid,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-swatch-grid {
    display:grid;grid-template-columns:repeat(7,22px);gap:6px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-swatch,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-swatch {
    width:22px;height:22px;padding:0;border:1px solid transparent;border-radius:0;
    background:transparent;display:flex;align-items:center;justify-content:center;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-swatch:hover,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-swatch:focus-visible,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-swatch:hover,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-swatch:focus-visible {
    background:rgba(255,255,255,.14);outline:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-swatch-chip,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-swatch-chip {
    width:14px;height:14px;border-radius:50%;display:block;
    border:1.5px solid rgba(0,0,0,.22);box-shadow:0 0 0 1px rgba(255,255,255,.16);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-swatch-text .dt-swatch-chip {border-color:rgba(255,255,255,.32)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-color-none,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-color-none {
    background:var(--bg-canvas) !important;
    border:1.5px dashed var(--ink-4) !important;position:relative;overflow:hidden;
    display:block;width:14px;height:14px;border-radius:50%;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-color-none::after,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-color-none::after {
    content:"";position:absolute;left:50%;top:50%;
    width:12px;height:1.5px;background:var(--ink-4);
    transform:translate(-50%,-50%) rotate(-45deg);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-hi-bar {
    display:block;height:2.5px;margin-top:1px;border-radius:0;
    background:#fff3a3;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-text-bar {
    display:block;height:2.5px;margin-top:1px;border-radius:0;
    background:#f5e985;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-cell-fill-icon {
    width:18px;height:18px;display:inline-grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;
    border:1.4px solid currentColor;border-radius:0;overflow:hidden;opacity:.92;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-cell-fill-icon span {
    grid-column:1 / -1;grid-row:2;background:#fff3a3;border-top:1px solid currentColor;
  }
  /* 深色浮现工具栏 · 按钮反白 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-btn {color:var(--ink-on-dark)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-btn:hover {background:rgba(255,255,255,.15)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-btn.active {background:rgba(255,255,255,.28)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-btn .dt-caret {color:rgba(255,255,255,.6)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-divider {background:rgba(255,255,255,.22)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-menu {background:#1f2a31;border-color:#2c3942}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-mi {color:#fff}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-mi:hover {background:rgba(255,255,255,.08)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-mi-k {color:rgba(255,255,255,.55)}
  /* 深底工具栏菜单里的标题层级格 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .wf-hlevel {color:rgba(255,255,255,.86)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .wf-hlevel:hover:not(:disabled) {
    background:rgba(255,255,255,.10);color:#fff;border-color:rgba(255,255,255,.24);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .wf-hlevel.is-active {
    color:var(--mark);border-color:var(--mark);background:rgba(255,255,255,.10);
  }
  /* AI 修改按钮 · 把选中段引用到 chat */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn.dt-ai {
    background:var(--mark);color:#fff;
    padding:3px 10px;margin-left:2px;
    border-radius:var(--r-sm);font-weight:500;
    font-family:var(--font-zh-serif);font-size:12px;
    display:inline-flex;align-items:center;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-btn.dt-ai:hover {background:#a4381f}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .dt-btn.dt-ai .dt-ai-ico {margin-right:3px}

  /* Block handle · "+" button on empty lines */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-wrap {
    transform:translate(-100%,-50%);
    /* 手柄右缘与正文留一点呼吸位(此前 0 会贴死正文,用户反馈拖柄离正文太近)。
       wrap 整体 translate(-100%),右缘锚在正文左缘,padding-right 把手柄内容往左推出 ~3px 间距。 */
    padding-right:3px;
    display:flex;align-items:center;gap:2px;
  }
  /* 飞书风:贴正文左侧、暖灰、可拖拽,无常驻边框(仅 hover 淡底)。手柄是 fixed 覆盖层,
     不在 .wf-doc 纸面变量作用域内,直接用奶白纸上的暖色硬值(用 --ink-* 会拿到暗色 chrome 浅色、纸上看不见)。 */
  /* 块/列表手柄(飞书式 chip):左侧蓝色格式图标 + 右侧灰色六点抓手,圆角描边、无白底 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-btn {
    border:0;background:transparent;cursor:grab;
    display:flex;align-items:center;justify-content:center;
    transition:background .12s,color .12s,border-color .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-btn:active {cursor:grabbing}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-btn.is-plus {
    width:20px;height:20px;border-radius:0;color:rgba(95,83,70,.55);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-btn.is-plus:hover {background:var(--bg-hover);color:var(--ink-1)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-btn.is-chip {
    height:18px;padding:0 3px;border-radius:0;
    border:1px solid var(--line-2);background:transparent;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-btn.is-chip:hover {
    border-color:rgba(120,90,50,.46);background:rgba(120,90,50,.08);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-chip-inner {display:flex;align-items:center;gap:3px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-type {display:flex;align-items:center;color:rgba(95,83,70,.72)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-type-text {
    font-family:var(--font-mono);font-size:9px;font-weight:700;
    letter-spacing:-.04em;line-height:1;color:rgba(95,83,70,.72);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-type-svg {display:block}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-grip {display:block;color:rgba(95,83,70,.5)}
  /* 折叠三角:SVG 旋转保证展开/折叠尺寸一致(展开▼=向下90°,折叠▶=向右0°) */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .fold-toggle {
    width:16px;height:16px;border:0;border-radius:0;
    background:transparent;color:rgba(95,83,70,.6);cursor:pointer;padding:0;
    display:flex;align-items:center;justify-content:center;
    transition:background .12s,color .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .fold-toggle:hover {background:var(--bg-hover);color:var(--ink-1)}
  /* transform-box:fill-box + 居中轴心 → 三角绕自身中心旋转,展开/折叠切换时原地转不偏移 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .fold-caret {display:block;transform-box:fill-box;transform-origin:center;transform:rotate(90deg)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .fold-toggle.is-collapsed .fold-caret {transform:rotate(0deg)}
  /* 折叠态常驻三角:gutter 悬浮层(fixed,不进入内容区),和拖拽托柄/hover 折叠三角同锚点
     (translate -100% → 右缘对齐 left,在 gutter 内、列表圆点左侧)。点击展开。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-fold-persist {
    transform:translate(-100%,-50%);
    width:16px;height:16px;border:0;border-radius:0;padding:0;
    background:transparent;color:rgba(95,83,70,.6);cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:background .12s,color .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-fold-persist:hover {background:var(--bg-hover);color:var(--ink-1)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-fold-persist__icon {display:block;transform-box:fill-box;transform-origin:center}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .is-folded-hidden {display:none !important}
  /* 空块占位符(@tiptap Placeholder):空标题显示"几级标题"、空文档首段给提示。
     暖灰、不占位、不可选;标题块的 ::before 继承大字号 → 自然是大号灰字(对齐飞书)。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .is-empty::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .is-editor-empty::before {
    content:attr(data-placeholder);
    color:rgba(47,42,34,.32);
    float:left;height:0;pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-menu {
    position:fixed;top:0;left:0;
    z-index:100060;
    min-width:222px;padding:6px 0;
    background:var(--bg-canvas);border:1px solid var(--line-2);
    border-radius:var(--r);
    box-shadow:0 8px 24px rgba(20,30,38,.14),0 2px 6px rgba(20,30,38,.08);
    animation:bh-in .14s ease-out;
    /* 矮视口兜底(review #5):菜单比视口高时可滚,尾部菜单项不至于永远够不到 */
    max-height:calc(100vh - 16px);overflow-y:auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-menu.flip-up {bottom:auto}
  @keyframes bh-in {from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

  /* Section labels */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-section-label {
    padding:4px 14px 2px;font-family:var(--font-mono);font-size:10px;
    color:var(--ink-4);letter-spacing:.06em;text-transform:uppercase;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-divider {
    height:1px;background:var(--line-1);margin:6px 10px;
  }

  /* 标题层级选择器(工具栏标题下拉 / 块手柄「转换为」共用同一套):六级排一行,不做六行长列表 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-hlevels {
    display:grid;grid-template-columns:repeat(6,32px);grid-auto-rows:28px;
    gap:2px;padding:2px 10px 4px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-hlevel {
    width:32px;height:28px;border:1px solid transparent;border-radius:var(--r-sm);
    background:transparent;color:var(--ink-2);cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    font-family:var(--font-mono);font-size:11.5px;font-weight:600;line-height:1;
    transition:background .1s,color .1s,border-color .1s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-hlevel:hover:not(:disabled) {
    background:var(--bg-hover);color:var(--ink-1);border-color:var(--line-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-hlevel.is-active {
    color:var(--mark);border-color:var(--mark);background:var(--mark-soft);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-hlevel:disabled {opacity:.32;cursor:not-allowed}

  /* 转换宫格统一六列自动流：H1~H5 + 正文填满首排，H6 与其余块类型连续顺延。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-grid {
    display:grid;grid-template-columns:repeat(6,32px);grid-auto-rows:28px;
    gap:2px;padding:2px 10px 4px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-grid-btn {
    width:32px;height:28px;border:1px solid transparent;border-radius:var(--r-sm);
    background:transparent;color:var(--ink-3);cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:background .1s,color .1s,border-color .1s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-grid-btn:hover {
    background:var(--bg-hover);color:var(--ink-1);border-color:var(--line-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-heading-btn {
    color:var(--ink-2);font-family:var(--font-mono);font-size:11.5px;font-weight:600;line-height:1;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-heading-btn.is-active {
    color:var(--mark);border-color:var(--mark);background:var(--mark-soft);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-svg {
    width:16px;height:16px;display:block;flex:0 0 auto;
    fill:none;stroke:currentColor;stroke-width:1.45;
    stroke-linecap:round;stroke-linejoin:round;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-grid-btn .bh-svg {width:15px;height:15px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-svg-ordered text {
    fill:currentColor;stroke:none;
    font-family:var(--font-mono);font-size:5.2px;font-weight:700;
  }

  /* List items */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-item {
    display:flex;align-items:center;gap:10px;width:100%;height:34px;
    padding:7px 14px;background:transparent;border:none;
    color:var(--ink-1);font-size:13px;font-family:var(--font-zh-serif);
    cursor:pointer;text-align:left;
    transition:background .1s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-item:hover {background:var(--bg-hover)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-item.is-danger:hover {
    background:rgba(150,58,42,.10);color:#7f2f22;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-icon {
    width:20px;height:20px;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;
    color:var(--ink-3);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-item:hover .bh-icon {color:var(--ink-1)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-item.is-danger:hover .bh-icon {color:#7f2f22}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu {position:relative}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu-trigger {padding-right:10px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-caret {
    margin-left:auto;width:16px;height:16px;display:flex;align-items:center;justify-content:center;
    color:var(--ink-3);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-caret .bh-svg {width:13px;height:13px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu-panel {
    position:fixed;left:var(--bh-submenu-left, -9999px);top:var(--bh-submenu-top, -9999px);z-index:100061;
    min-width:164px;padding:6px 0;
    background:var(--bg-canvas);border:1px solid var(--line-2);
    border-radius:var(--r);
    box-shadow:0 8px 24px rgba(20,30,38,.14),0 2px 6px rgba(20,30,38,.08);
    opacity:0;pointer-events:none;transform:translateX(-4px);
    transition:opacity .1s ease-out,transform .1s ease-out;
    max-height:calc(100vh - 16px);overflow:auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu.is-left .bh-submenu-panel,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu-panel.is-left {
    transform:translateX(4px);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu:hover .bh-submenu-panel,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu:focus-within .bh-submenu-panel,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu-panel.is-open {
    opacity:1;pointer-events:auto;transform:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu-panel .block-handle-item {white-space:nowrap}

  /* 纯阅读排版统一走 :is(.wf-doc,.doc-typography)：主编辑器与只读衍生预览同源。
     ProseMirror 选中态、表格手柄和 decoration 仍只挂 .wf-doc，禁止泄漏到只读预览。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc.ProseMirror {outline:none}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc.ProseMirror .ProseMirror-gapcursor {display:none}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .pm-footnote-reference {
    position:relative;display:inline-block;min-width:.8em;margin:0 1px;color:var(--mark);
    font-family:var(--font-zh-serif);font-size:.72em;line-height:1;vertical-align:super;
    cursor:help;outline:none
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .pm-footnote-reference::after {content:attr(data-footnote-number)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .pm-footnote-reference::before {
    content:attr(data-footnote-note);position:absolute;left:50%;bottom:calc(100% + 8px);z-index:12;
    box-sizing:border-box;width:max-content;max-width:320px;padding:8px 10px;border:1px solid var(--line-2);
    border-radius:0;background:var(--bg-paper-deep);color:var(--ink-1);box-shadow:var(--shadow-2);
    font:13px/1.6 var(--font-zh-serif);text-align:left;white-space:normal;
    opacity:0;pointer-events:none;transform:translate(-50%,4px);
    transition:opacity .12s ease-out,transform .12s ease-out
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .pm-footnote-reference:hover::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .pm-footnote-reference:focus::before {opacity:1;transform:translate(-50%,0)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .pm-footnote-reference.ProseMirror-selectednode {outline:1px solid var(--mark)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark {border-radius:0;padding:0 1px;background:#fff3a3;color:inherit}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="ink"] {color:var(--ink-1)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="gray"] {color:#5f625c}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="slate"] {color:#44555c}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="brown"] {color:#7a5234}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="red"] {color:#a33a2a}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="orange"] {color:#a65d1f}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="amber"] {color:#927016}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="yellow"] {color:#7f7418}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="lime"] {color:#627a22}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="green"] {color:#3f7a42}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="sage"] {color:#57745c}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="mint"] {color:#2f7b69}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="teal"] {color:#24777a}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="cyan"] {color:#27738e}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="sky"] {color:#3f6e9a}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="blue"] {color:#365d9f}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="indigo"] {color:#4d55a0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="violet"] {color:#694c9a}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="purple"] {color:#7a4d9b}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="magenta"] {color:#974487}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="pink"] {color:#a6476f}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="rose"] {color:#a74755}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="sand"] {color:#836d4a}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) span[data-text-color="lavender"] {color:#6f5c8f}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="ink"] {background:#eee2c6}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="gray"] {background:#e8e5dc}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="slate"] {background:#dbe7e9}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="brown"] {background:#ead8c7}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="red"] {background:#f4d2ca}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="orange"] {background:#f2d9bd}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="amber"] {background:#f0e0ad}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="yellow"] {background:#fff3a3}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="lime"] {background:#e5efba}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="green"] {background:#d4edd4}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="sage"] {background:#dce9d7}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="mint"] {background:#cfebe0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="teal"] {background:#cce8e7}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="cyan"] {background:#cde8f0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="sky"] {background:#d7e7f6}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="blue"] {background:#cfe0f5}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="indigo"] {background:#d8dcf5}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="violet"] {background:#e1d8f2}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="purple"] {background:#e7d7ff}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="magenta"] {background:#efd4ea}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="pink"] {background:#f5d0cf}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="rose"] {background:#f3d3d9}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="sand"] {background:#eadfc8}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) mark[data-color="lavender"] {background:#e5ddf0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="ink"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="ink"] {background:#eee4cf}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="gray"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="gray"] {background:#e7e1d4}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="slate"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="slate"] {background:#d3d9d5}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="brown"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="brown"] {background:#e5d4c3}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="red"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="red"] {background:#e4c9bf}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="orange"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="orange"] {background:#e6ceb4}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="amber"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="amber"] {background:#ead9ae}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="yellow"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="yellow"] {background:#eee4bd}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="lime"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="lime"] {background:#dde1c2}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="green"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="green"] {background:#cad9c8}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="sage"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="sage"] {background:#d6dfcf}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="mint"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="mint"] {background:#cfebe0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="teal"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="teal"] {background:#cadbd2}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="cyan"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="cyan"] {background:#cde8f0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="sky"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="sky"] {background:#d7e7f6}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="blue"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="blue"] {background:#cfe0f5}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="indigo"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="indigo"] {background:#d8dcf5}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="violet"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="violet"] {background:#e1d8f2}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="purple"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="purple"] {background:#e7d7ff}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="magenta"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="magenta"] {background:#efd4ea}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="pink"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="pink"] {background:#f5d0cf}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="rose"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="rose"] {background:#f3d3d9}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="sand"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="sand"] {background:#eadfc8}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td[data-bg-color="lavender"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-bg-color="lavender"] {background:#e5ddf0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) img {
    max-width:100%;height:auto;border-radius:var(--r-sm);
    margin:8px 0;cursor:default;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc img.ProseMirror-selectednode {
    outline:2px solid var(--mark);outline-offset:2px;
  }

  /* ============ Table 基础样式 ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .tableWrapper {overflow-x:auto;max-width:100%}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) table {
    border-collapse:separate;border-spacing:0;width:auto;min-width:240px;
    margin:16px 0;border:0;box-shadow:none;
  }
  /* UIKit 的 table overflow:hidden 会截断 cell sticky 的滚动参照；真表由外层 wrapper 负责裁剪。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .tableWrapper > table,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .pm-table-scroll > table {overflow:visible}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td {
    border:0;border-right:1px solid var(--line-2);border-bottom:1px solid var(--line-2);padding:8px 12px;
    min-width:80px;vertical-align:top;position:relative;
    font-size:13px;line-height:1.6;
  }
  /* TipTap 表格首子元素是 colgroup,:first-child 会落空;按 thead/tbody 首个取首行补上边框。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) table > :is(thead,tbody):first-of-type > tr:first-child > th,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) table > :is(thead,tbody):first-of-type > tr:first-child > td {
    border-top:1px solid var(--line-2);
  }
  /* TableMap / 静态渲染写入逻辑列号；overlay 等无标记克隆退回首个 DOM 格。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) table > :is(thead,tbody,tfoot) > tr > [data-table-logical-col="0"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) table > :is(thead,tbody,tfoot) > tr > :first-child:not([data-table-logical-col]) {
    border-left:1px solid var(--line-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th {
    background:var(--bg-subtle);font-weight:700;font-size:12.5px;color:var(--ink-2);
  }
  /* 标题列由 JS 按逻辑第 0 列标记，rowspan 覆盖行不重复标记。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) [data-sticky-col] {
    position:sticky;left:0;z-index:4;
  }
  /* 无自定义底色时补不透明纸底；显式 data-bg-color 继续保留用户选择的实色。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) [data-sticky-col]:not([data-bg-color]) {
    background:var(--bg-canvas);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) th[data-sticky-col]:not([data-bg-color]) {
    background:var(--bg-subtle);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .tableWrapper[data-scrolled-x] [data-sticky-col],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) .pm-table-scroll[data-scrolled-x] [data-sticky-col],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-header-overlay-viewport[data-scrolled-x] [data-sticky-col] {
    box-shadow:6px 0 8px -6px color-mix(in srgb,var(--ink-1) 22%,transparent);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-header-overlay-viewport {
    overflow:clip;z-index:100005;background:var(--bg-canvas);pointer-events:auto;
    box-shadow:0 6px 8px -6px color-mix(in srgb,var(--ink-1) 22%,transparent);
  }
  /* 只借用 wf-doc 的正文语义样式；display:contents 隔离墨水皮肤的整页纸面盒模型。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc.table-header-overlay-content {
    display:contents!important;background:transparent!important;box-shadow:none!important;
    padding:0!important;width:auto!important;max-width:none!important;min-height:0!important;margin:0!important;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc.table-header-overlay-content > .table-header-overlay__table {
    margin:0;border-collapse:separate;border-spacing:0;border:0;box-shadow:none;
    background:var(--bg-canvas);color:var(--ink-1);
    font-family:var(--font-zh-serif);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-header-overlay__table th {
    box-sizing:border-box;border:0;border-right:1px solid var(--line-2);border-bottom:1px solid var(--line-2);padding:8px 12px;
    min-width:80px;vertical-align:top;text-align:left;background:var(--bg-subtle);
    font-size:12.5px;line-height:1.6;font-weight:700;color:var(--ink-2);cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .table-header-overlay__table th:hover {background:var(--bg-hover)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td p {margin:0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) td img {max-width:100%;margin:4px 0;border-radius:var(--r-sm)}
  /* TipTap selected cell highlight */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .selectedCell::after {
    content:"";position:absolute;inset:0;
    background:color-mix(in srgb,var(--mark) 18%,transparent);pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .column-resize-handle {
    position:absolute;top:0;right:-4px;bottom:-2px;width:8px;
    background:transparent;pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .column-resize-handle::before {
    content:"";position:absolute;inset:0 auto 0 50%;width:1px;
    transform:translateX(-50%);
    background:color-mix(in srgb,var(--mark) 62%,transparent);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .column-resize-dragging .column-resize-handle::before {
    background:var(--mark);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc.resize-cursor,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc.resize-cursor * {cursor:col-resize!important}

  /* ============ 待办清单 taskList ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul[data-type="taskList"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list {
    list-style:none;margin:8px 0;padding-left:2px;
  }
  /* NodeView 渲染的 li 只带 data-checked 不带 data-type,统一用 ul > li 命中 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul[data-type="taskList"] > li,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list > li {
    display:flex;align-items:flex-start;gap:8px;margin:4px 0;
  }
  /* label/checkbox 与首行文字垂直居中:行高约 24.6px、框 16px,几何居中上边距≈4.3px;
     CJK 文字光学重心偏下,再补 ~1.2px 让勾框视觉对齐首行中心(多行待办仍对齐首行,符合飞书/Notion) */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul[data-type="taskList"] > li > label {
    flex:0 0 auto;margin-top:5.5px;user-select:none;
    display:inline-flex;align-items:center;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul[data-type="taskList"] > li > div,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list > li > div {
    flex:1 1 auto;min-width:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul[data-type="taskList"] > li > div > p,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list > li > div > p {margin:0}
  /* 暖色自定义 checkbox(对齐暖墨纸面;未勾=暖描边透明框,勾选=暖金填充+白勾居中) */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul[data-type="taskList"] input[type="checkbox"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list input[type="checkbox"] {
    appearance:none;-webkit-appearance:none;
    width:16px;height:16px;flex:0 0 16px;box-sizing:border-box;
    border:1.5px solid rgba(120,90,50,.45);border-radius:0;
    background:transparent;cursor:pointer;margin:0;
    display:inline-flex;align-items:center;justify-content:center;
    transition:background .12s,border-color .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul[data-type="taskList"] input[type="checkbox"]:hover,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list input[type="checkbox"]:hover {
    border-color:rgba(120,90,50,.7);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul[data-type="taskList"] input[type="checkbox"]:checked,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list input[type="checkbox"]:checked {
    background:var(--mark);border-color:var(--mark);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul[data-type="taskList"] input[type="checkbox"]:checked::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list input[type="checkbox"]:checked::after {
    content:"";width:4px;height:8px;margin-top:-1px;
    border:solid #fff;border-width:0 2px 2px 0;
    transform:rotate(45deg);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list > li input[type="checkbox"] {margin-top:5.5px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul[data-type="taskList"] > li[data-checked="true"] > div,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) ul.pm-task-list > li[data-checked="true"] > div {
    color:var(--ink-3);text-decoration:line-through;text-decoration-color:var(--line-2);
  }

  /* ============ Callout 高亮框 ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout {
    position:relative;
    display:flex;gap:8px;align-items:flex-start;
    padding:10px 12px;margin:8px 0;
    border-radius:var(--r-sm);
    background:var(--bg-subtle);border:1px solid var(--line-2);
  }
  /* emoji 图标:编辑态是 button(可点选换图标),只读/序列化态是 span;两者同款式 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-wrap {flex:0 0 auto;position:relative;line-height:1.7}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji {
    flex:0 0 auto;line-height:1.7;user-select:none;
    border:0;background:transparent;padding:0 1px;margin:0;font:inherit;font-size:1em;
    cursor:pointer;border-radius:0;transition:background .12s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout button.pm-callout-emoji:hover {background:rgba(120,90,50,.12)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-empty {opacity:.42;font-weight:600}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-body {flex:1 1 auto;min-width:0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-body p {margin:0 0 4px 0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-body p:last-child {margin-bottom:0}

  /* emoji 选择器浮层(暖白底,贴纸面美学) */
  /* 宽度按 8 列定宽格子精算(8×28 + 7×2 gap = 238,+16 padding = 254),box-sizing:border-box
     杜绝 emoji 字形宽于 1fr 轨道导致最后一列溢出面板背景框(各平台 emoji 字形宽度不一)。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-pop {
    position:absolute;top:calc(100% + 6px);left:0;z-index:20;
    width:254px;padding:8px;border-radius:0;box-sizing:border-box;
    background:var(--bg-canvas);border:1px solid rgba(120,90,50,.24);
    box-shadow:0 12px 28px rgba(40,28,12,.22);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-grid {
    display:grid;grid-template-columns:repeat(8,28px);gap:2px;justify-content:center;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-opt {
    width:28px;height:28px;display:flex;align-items:center;justify-content:center;
    box-sizing:border-box;border:0;background:transparent;cursor:pointer;
    font-size:16px;line-height:1;padding:0;border-radius:0;transition:background .1s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-opt:hover {background:rgba(120,90,50,.12)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-opt.is-active {background:rgba(168,130,63,.28)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-none {
    width:100%;margin-top:6px;padding:4px;border:1px solid rgba(120,90,50,.2);
    background:transparent;border-radius:0;cursor:pointer;font-size:12px;color:var(--ink-3);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-emoji-none:hover {background:rgba(120,90,50,.08)}

  /* 主题选择器:右上角触发钮(当前主题色),默认隐藏,hover/聚焦编辑时浮现;点开为带名色板 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-themes-wrap {
    position:absolute;top:7px;right:8px;
    opacity:0;transition:opacity .14s ease;pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout:hover .pm-callout-themes-wrap,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout:focus-within .pm-callout-themes-wrap {opacity:1;pointer-events:auto}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-trigger {
    width:15px;height:15px;border-radius:50%;cursor:pointer;padding:0;display:block;
    border:1px solid rgba(255,255,255,.65);box-shadow:0 0 0 1px rgba(120,90,50,.3);
    transition:transform .1s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-trigger:hover {transform:scale(1.12)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-pop {
    position:absolute;top:calc(100% + 6px);right:0;z-index:20;
    width:190px;padding:6px;border-radius:0;
    display:grid;grid-template-columns:1fr 1fr;gap:2px;
    background:var(--bg-canvas);border:1px solid rgba(120,90,50,.24);
    box-shadow:0 12px 28px rgba(40,28,12,.22);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-opt {
    display:flex;align-items:center;gap:7px;padding:5px 7px;border:0;border-radius:0;
    background:transparent;cursor:pointer;font-size:12.5px;color:var(--ink-2);text-align:left;
    transition:background .1s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-opt:hover {background:rgba(120,90,50,.1)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-opt.is-active {background:rgba(168,130,63,.22)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-chip {
    width:13px;height:13px;border-radius:50%;flex:0 0 auto;
    border:1px solid rgba(255,255,255,.6);box-shadow:0 0 0 1px rgba(120,90,50,.25);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout .pm-callout-theme-label {flex:1 1 auto;white-space:nowrap}

  /* 10 主题暖化配色(贴合奶白纸 + 暖墨;全部去饱和、压低,横跨色相轮不刺眼) */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--neutral {background:rgba(120,90,50,.06);border-color:rgba(120,90,50,.20)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--warning {background:var(--mark-soft);border-color:rgba(168,130,63,.34)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--ochre {background:rgba(176,122,60,.13);border-color:rgba(176,122,60,.32)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--danger {background:rgba(176,74,52,.10);border-color:rgba(176,74,52,.28)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--rose {background:rgba(189,106,114,.11);border-color:rgba(189,106,114,.30)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--mauve {background:rgba(154,106,158,.11);border-color:rgba(154,106,158,.30)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--indigo {background:rgba(106,108,174,.10);border-color:rgba(106,108,174,.28)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--info {background:rgba(82,108,150,.10);border-color:rgba(82,108,150,.26)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--teal {background:rgba(79,143,136,.12);border-color:rgba(79,143,136,.30)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-callout--success {background:rgba(90,125,74,.12);border-color:rgba(90,125,74,.30)}

  /* ============ 内容分栏 ============ */
  /* 左右各留 10px 内边距、再用负外边距抵消——列的视觉位置不变,但 hover 背景 ::before 的 -8px
     外延落在这段 padding 里,不会撑破 overflow-x:auto 冒出横向滚动条。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list {
    position:relative;display:flex;box-sizing:border-box;
    margin:12px -24px;padding:0 24px;overflow-x:auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list > .pm-column-list-content {
    display:flex;width:100%;min-width:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list > .pm-column-list-content > [data-node-view-content-react] {
    display:flex;align-items:stretch;gap:24px;width:100%;min-width:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list > .pm-column-list-content > [data-node-view-content-react] > .react-renderer.node-column {
    display:contents;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list > .pm-column,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list > .pm-column-list-content > .pm-column,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list > .pm-column-list-content > [data-node-view-content-react] > .react-renderer.node-column > .pm-column {
    position:relative;min-width:0;box-sizing:border-box;
  }
  /* 分栏是容器：默认列间无竖线；hover 列时淡色底（飞书风格),提示内部各块各自可编辑/格式化。
     背景用 ::before 负外延(左右各伸出 8px)——不改文字排版(文字仍严格左对齐),但 hover 高亮
     左右多出一截留白,文字不再贴边。::before z-index:0、正文 z-index:1,背景压在文字下。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column {border-radius:0;isolation:isolate}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column::before {
    content:"";position:absolute;inset:0 -8px;border-radius:0;z-index:0;pointer-events:none;
    background:transparent;transition:background .14s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column:hover::before {background:var(--bg-subtle)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-list.pm-column-resizing .pm-column:hover::before {background:transparent}
  /* 分隔线区域独立 hover：gutter 是左列的子元素,hover 它会连带触发 .pm-column:hover——
     用 :has 在"正 hover 自己的 gutter"时压掉该列底色,让分隔线有独立 hover、不连带亮列。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column:has(> .pm-column-gutter:hover)::before {background:transparent}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-body {position:relative;z-index:1;min-width:0;padding-right:12px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column:last-child .pm-column-body,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .react-renderer.node-column:last-child > .pm-column .pm-column-body {padding-right:0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-body p {margin:0 0 6px 0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-body p:last-child {margin-bottom:0}

  /* ── 分隔线 gutter：占列间间隙，默认无可见竖线，hover/拖拽才显形 ── */
  /* gutter 只在非末列由 React 渲染（!isLastColumn）；勿用 .pm-column:last-child——
     编辑态每个 .pm-column 都是其 .react-renderer 包裹层的唯一/末位子元素，该选择器恒真会全隐藏。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-gutter {
    position:absolute;top:0;right:-22px;bottom:0;width:20px;z-index:5;user-select:none;
  }
  /* 末列右侧追加柄：整条落在内容区外侧的右留白里(列表 padding:24px 内,不溢出)、无竖线。
     它本身就是 hover 触发区——鼠标移到背景右侧外面这条留白时才显形(不跟随列背景 hover);
     复用上面的基础规则 .pm-column-gutter:hover .pm-column-insert-dot{opacity:1} 显形,
     并由 :has(> .pm-column-gutter:hover) 在此时压掉列背景。因整条在内容外,不会挡文字。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-gutter--end {right:-22px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-resize-handle {
    position:absolute;inset:0;cursor:col-resize;touch-action:none;background:transparent;
  }
  /* 竖线：更细(2px)、顶端从 24px 起——与上方圆点留出空隙不相连;无 hover 光晕,线就只是线。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-resize-handle::before {
    content:"";position:absolute;top:24px;bottom:6px;left:50%;transform:translateX(-50%);
    width:2px;border-radius:0;background:transparent;
    transition:background .12s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-gutter:hover .pm-column-resize-handle::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-resize-handle:active::before {
    background:var(--line-3);
  }

  /* 拖拽时各列右上角的实时百分比徽标 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-pct-badge {
    position:absolute;top:4px;right:4px;z-index:7;
    padding:1px 6px;border-radius:999px;
    font-size:11px;font-weight:600;line-height:1.6;
    color:#fff;background:rgba(120,90,50,.92);
    box-shadow:0 1px 3px rgba(40,30,15,.25);
    pointer-events:none;user-select:none;font-variant-numeric:tabular-nums;
  }

  /* 分隔线顶端小圆点 → hover 展开为加号圆钮 → 点击插入新分栏 */
  /* 圆点贴分隔线顶端，但留在列表盒内——.pm-column-list 的 overflow-x:auto 会令 overflow-y 也变 auto，
     若用负 top 伸到列表外会被裁掉、且命中不到。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot {
    position:absolute;top:10px;left:50%;transform:translate(-50%,-50%);
    display:flex;align-items:center;justify-content:center;
    width:14px;height:14px;padding:0;border:none;border-radius:50%;
    background:transparent;cursor:pointer;opacity:0;z-index:6;
    transition:opacity .12s ease,width .12s ease,height .12s ease,background .12s ease,box-shadow .12s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-gutter:hover .pm-column-insert-dot {opacity:1}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot__icon {
    position:relative;width:7px;height:7px;border-radius:50%;
    background:rgba(120,90,50,.5);transition:background .12s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot__icon::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot__icon::after {
    content:"";position:absolute;top:50%;left:50%;background:#fff;border-radius:0;opacity:0;
    transition:opacity .12s ease;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot__icon::before {width:11px;height:2px;transform:translate(-50%,-50%)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot__icon::after {width:2px;height:11px;transform:translate(-50%,-50%)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot:hover {
    width:20px;height:20px;background:rgba(168,130,63,.96);box-shadow:0 2px 6px rgba(40,30,15,.25);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot:hover .pm-column-insert-dot__icon {background:transparent}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot:hover .pm-column-insert-dot__icon::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-insert-dot:hover .pm-column-insert-dot__icon::after {opacity:1}
  /* 列表拖拽时压制原生 dropcursor(配了 .wf-dropcursor class):列表自绘了金色落点线,原生
     dropcursor 会在嵌套 gap 里与它同时出现两根线。dropcursor 元素挂在 .ProseMirror 兄弟/父级,
     用 body scope class 兜住最可靠。分栏 DnD 竖直落点故意复用原生 dropcursor,故不在此压制。 */
  [data-qingagent-doc-panel].pm-listitem-dnd-active-scope .wf-dropcursor,
[data-qingagent-doc-panel].pm-listitem-dnd-active-scope .ProseMirror-dropcursor {display:none !important}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-listitem-drop-line {
    position:fixed;
    height:1px;
    transform:translateY(-50%);
    border-radius:999px;
    background:rgba(188,142,56,.85);
    pointer-events:none;
    z-index:8;
  }
  /* 飞书式拖拽选区高亮:高亮当前落点所属的层级容器(列表项),暗示正在哪一层排序/嵌入;根级不高亮。
     用 ::before 画一整块底色并向左延伸盖住 marker 圆点,无边线、不改布局。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .pm-listitem-drop-scope {position:relative}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .pm-listitem-drop-scope::before {
    content:"";position:absolute;top:0;bottom:0;left:-28px;right:0;
    background:rgba(188,142,56,.12);
    border-radius:0;
    z-index:-1;pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-drop-target--left,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-drop-target--right {
    background:linear-gradient(0deg, rgba(188,142,56,.10), rgba(188,142,56,.10));
    border-radius:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-drop-target--left {
    box-shadow:inset 4px 0 0 rgba(188,142,56,.78), 0 0 0 1px rgba(188,142,56,.18);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-column-drop-target--right {
    box-shadow:inset -4px 0 0 rgba(188,142,56,.78), 0 0 0 1px rgba(188,142,56,.18);
  }

  /* ============ LaTeX 公式(KaTeX) ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tiptap-mathematics-render {border-radius:var(--r-sm);padding:0 2px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tiptap-mathematics-render--editable {cursor:pointer;transition:background .15s}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tiptap-mathematics-render--editable:hover {background:rgba(168,130,63,.16)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) div.tiptap-mathematics-render {padding:8px 4px;margin:8px 0;text-align:center}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tiptap-mathematics-render.block-math-error,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tiptap-mathematics-render.inline-math-error,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-math-error {
    color:#c0392b;font-family:ui-monospace,monospace;font-size:13px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tiptap-mathematics-render.ProseMirror-selectednode {
    outline:2px solid var(--mark);outline-offset:2px;
  }

  /* 公式编辑浮层 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-popover {
    position:fixed;z-index:99999;width:340px;
    display:flex;flex-direction:column;gap:8px;
    padding:10px;
    background:var(--bg-paper-deep);border:1px solid rgba(168,130,63,.30);border-radius:var(--r-sm);
    box-shadow:0 10px 28px rgba(40,30,15,.22),0 2px 6px rgba(40,30,15,.12);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-popover textarea {
    width:100%;min-height:56px;resize:vertical;
    font-family:ui-monospace,monospace;font-size:13px;line-height:1.5;
    padding:6px 8px;border:1px solid rgba(168,130,63,.28);border-radius:var(--r-sm);
    background:#f3ecdc;color:var(--ink-1);outline:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-popover textarea:focus {border-color:rgba(168,130,63,.6)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-preview {
    min-height:32px;display:flex;align-items:center;justify-content:center;
    padding:6px;border-radius:var(--r-sm);background:#f3ecdc;color:var(--ink-1);
    overflow-x:auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-preview.is-error {color:#c0392b;font-size:12px;font-family:ui-monospace,monospace}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-actions {display:flex;justify-content:flex-end;gap:6px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-actions button {
    font-size:12px;padding:4px 10px;border-radius:var(--r-sm);cursor:pointer;
    border:1px solid rgba(168,130,63,.30);background:var(--bg-paper-deep);color:var(--ink-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .math-edit-actions button.primary {
    background:var(--mark);border-color:var(--mark);color:#fff;
  }

  /* ============ 链接 hover 浮层(暖纸面,与编辑器同色系) ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card {
    display:flex;align-items:center;max-width:380px;
    padding:5px 8px;border-radius:0;font-size:12.5px;
    background:var(--bg-paper-deep);border:1px solid rgba(168,130,63,.30);
    box-shadow:0 8px 24px rgba(40,30,15,.20),0 2px 6px rgba(40,30,15,.10);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-view,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-edit {display:flex;align-items:center;gap:6px;width:100%}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-url {
    color:var(--mark);text-decoration:none;max-width:240px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-url:hover {text-decoration:underline}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-sep {flex:0 0 auto;width:1px;height:14px;background:rgba(168,130,63,.30)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-btn {
    flex:0 0 auto;font-size:12px;padding:2px 8px;border-radius:0;cursor:pointer;white-space:nowrap;
    border:1px solid rgba(168,130,63,.30);background:transparent;color:var(--ink-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-btn:hover {background:var(--bg-hover);color:var(--ink-1)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-btn.primary {background:var(--mark);border-color:var(--mark);color:#fff}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-input {
    flex:1;min-width:200px;font-size:12.5px;padding:3px 7px;
    border:1px solid rgba(168,130,63,.30);border-radius:0;
    background:#f3ecdc;color:var(--ink-1);outline:none;font-family:var(--font-mono);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .link-hover-card .lhc-input:focus {border-color:rgba(168,130,63,.6)}

  /* ============ Table controls (Feishu-style) ============ */

  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-chrome-viewport {
    overflow:clip;pointer-events:none;z-index:100010;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-span-hint {
    z-index:100040;padding:4px 8px;border:1px solid var(--line-2);border-radius:0;
    background:var(--bg-canvas);color:var(--ink-2);box-shadow:var(--shadow-2);
    font:12px/1.5 var(--font-zh-serif);pointer-events:none;
  }

  /* column / row header bars — always visible when cursor in table */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-col-hdr {
    cursor:pointer;z-index:100010;pointer-events:auto;
    background:rgba(168,130,63,.16);
    border-radius:0;
    transition:background .1s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-col-hdr:hover {background:rgba(168,130,63,.25)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-col-hdr.active {background:rgba(168,130,63,.55)}

  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-row-hdr {
    cursor:pointer;z-index:100010;pointer-events:auto;
    background:rgba(168,130,63,.16);
    border-radius:0;
    transition:background .1s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-row-hdr:hover {background:rgba(168,130,63,.25)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-row-hdr.active {background:rgba(168,130,63,.55)}

  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-axis-drag-ghost {
    z-index:100025;pointer-events:none;background:rgba(168,130,63,.18);
    border:1px solid rgba(168,130,63,.48);opacity:.68;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-axis-drag-ghost[data-clone="true"] {
    box-shadow:4px 4px 0 rgba(168,130,63,.14);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-axis-drop-line {
    z-index:100030;pointer-events:none;background:var(--mark);
    box-shadow:0 0 8px rgba(168,130,63,.32);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-axis-drop-line[data-axis="column"] {width:2px;transform:translateX(-1px)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-axis-drop-line[data-axis="row"] {height:2px;transform:translateY(-1px)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-axis-drop-line.is-forbidden {
    background:rgba(176,74,52,.85);box-shadow:none;
  }

  /* edge dots — small circles between col/row borders */
  /* 默认态保持低调:透明底无描边只见 ::before 小点;不透明纸底只给 hover 态(+号),避免一排白圈扎眼。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot {
    width:16px;height:16px;border-radius:50%;
    box-sizing:border-box;border:1px solid transparent;background:transparent;color:var(--mark);
    cursor:pointer;z-index:100020;
    display:flex;align-items:center;justify-content:center;
    transform:translate(-50%,-50%);
    padding:0;position:relative;pointer-events:auto;
    transition:width .12s,height .12s,background .12s,border-color .12s,color .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot::before {
    content:"";width:5px;height:5px;border-radius:50%;
    background:color-mix(in srgb,var(--mark) 50%,transparent);transition:opacity .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot .tbl-dot-mark {
    display:none;position:relative;z-index:1;overflow:visible;pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot:hover::before {display:none}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot:hover {
    width:18px;height:18px;background:var(--bg-paper-deep);border-color:var(--mark);color:var(--mark);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot:hover .tbl-dot-mark {display:block}

  /* guide line on dot hover — clipped to table size via --tbl-guide */
  /* z-index:-1 让指示线沉到按钮不透明底之下,避免贯穿加号(按钮自身是 stacking context,不会漏到页面层)。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot-col:hover::after {
    content:"";position:absolute;top:50%;left:50%;z-index:-1;
    width:1px;height:var(--tbl-guide,100px);
    background:color-mix(in srgb,var(--mark) 42%,transparent);transform:translateX(-50%);
    pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-dot-row:hover::after {
    content:"";position:absolute;top:50%;left:50%;z-index:-1;
    height:1px;width:var(--tbl-guide,200px);
    background:color-mix(in srgb,var(--mark) 42%,transparent);transform:translateY(-50%);
    pointer-events:none;
  }

  /* selection toolbar — reuses .doc-toolbar styles, minor overrides */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-sel-toolbar {z-index:100040}
  /* 箭头已改 clip-path 纯三角(见 .doc-toolbar::after),不再用 rotate 方块,这里只居中即可。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .tbl-sel-toolbar.doc-toolbar::after {left:50%;transform:translateX(-50%)}

  /* editing idle · .wf-doc 可编辑 · 不加任何背景/focus 染色 */
  :is([data-qingagent-doc-panel][data-content="editing"][data-tool="none"], #qingagent-doc-panel-specificity) .wf-doc {outline:none;background:transparent;cursor:text}

  /* editing idle 下, 正文不显示 review 阶段的 patch 染色 · 表现为干净正文 */
  :is([data-qingagent-doc-panel][data-content="editing"][data-tool="none"], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-ins {
    background:transparent;border:none;color:inherit;text-decoration:none;padding:0;
  }
  :is([data-qingagent-doc-panel][data-content="editing"][data-tool="none"], #qingagent-doc-panel-specificity) .wf-doc .wf-sel {
    background:transparent;border-bottom:none;cursor:text;
  }

  /* 改动B:审批入口 patch 标记"逐处入场"——每个标记随 revealedPatchIds 递进而 mount，mount 即淡入。
     仅 pendingReview content 生效；若 data-content 未设亦安全降级（标记直接出现，功能不受影响）。 */
  @keyframes wf-patch-reveal {from{opacity:0;filter:blur(2px)}to{opacity:1;filter:blur(0)}}
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-ins-wrap,
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-del-marker {
    animation:wf-patch-reveal .32s ease-out;
  }
  /* 发光特效:打字进行中(发光开关开启),新点亮的绿字随入场短暂泛光,与右栏环境辉光呼应。
     仅在 body[data-patch-revealing] 时生效——关闭发光开关即整体收敛为朴素淡入。 */
  :is([data-qingagent-doc-panel][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-ins {
    animation:wf-patch-ins-glow .7s ease-out;
  }
  @keyframes wf-patch-ins-glow {
    0%{text-shadow:0 0 9px rgba(74,180,100,.85)}
    60%{text-shadow:0 0 6px rgba(74,180,100,.5)}
    100%{text-shadow:0 0 0 rgba(74,180,100,0)}
  }
  /* 发光特效:打字进行中给右栏挂 Apple-Intelligence 环境辉光(复用 locked/drafting 全文生成那套) */
  :is([data-qingagent-doc-panel][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .ws-right {
    animation:ai-inner-glow 4s ease-in-out infinite;
  }

  /* ============ 0603 拟人鼠标 overlay(叠加在打字光标之上) ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .human-cursor-layer {position:fixed;inset:0;pointer-events:none;z-index:40}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-cursor {position:fixed;transform:translate(-2px,-2px);transition:opacity .2s ease;will-change:left,top}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-arrow {display:block;filter:drop-shadow(0 1px 2px rgba(20,30,38,.28))}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-name {
    position:absolute;left:13px;top:11px;padding:1px 6px;border-radius:0;
    color:#fff;font-size:11px;font-weight:700;white-space:nowrap;line-height:1.5;
    box-shadow:0 4px 12px rgba(20,30,38,.18);
  }
  /* 越界边缘气泡:上圆下尖 pin,颜色随 --hc(lane 同色系),带序号 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-edge {position:fixed;transform:translateX(-50%)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-edge-num {
    width:22px;height:22px;border-radius:50%;background:var(--hc,#b58a3e);color:#fff;
    display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;
    border:2px solid #fff;box-shadow:0 2px 8px rgba(20,30,38,.32);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-edge::after {content:"";position:absolute;left:50%;transform:translateX(-50%);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-edge-bottom::after {top:19px;border-top:7px solid var(--hc,#b58a3e)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .hc-edge-top::after {bottom:19px;border-bottom:7px solid var(--hc,#b58a3e)}

  /* Markdown 阅读排版：主文档与只读衍生预览共用。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) blockquote {
    margin:10px 0;padding:6px 14px;
    border-left:3px solid var(--line-2);
    color:var(--ink-2);background:var(--bg-subtle);
    border-radius:0 var(--r-sm) var(--r-sm) 0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ol {margin:8px 0;padding-left:24px;line-height:1.7}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ul {list-style:disc}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) ol {list-style:decimal}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) li {margin:2px 0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) hr {
    border:none;height:1px;background:var(--line-2);margin:16px 0;
  }
  /* 分隔线不做选中态视觉(ProseMirror 默认给选中节点描一圈系统蓝);编辑语义不变。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc hr.ProseMirror-selectednode {
    outline:none;box-shadow:none;background:var(--line-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) a {color:var(--mark);text-decoration:underline;text-decoration-thickness:.5px;text-underline-offset:2px}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre.md-code-block {
    background:var(--bg-subtle);border:1px solid var(--line-1);
    border-radius:var(--r-sm);padding:10px 14px;margin:10px 0;
    font-family:var(--font-mono);font-size:12.5px;line-height:1.55;
    color:var(--ink-2);white-space:pre-wrap;
  }
  /* 代码行内样式 (自定义 code 包) */
  /* 行内代码:暖底 + 暖锈字(与金色链接区分),贴合奶白纸 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) code.inline-code {
    background:rgba(120,90,50,.09);border:1px solid rgba(168,130,63,.22);
    padding:1px 5px;border-radius:0;
    font-family:var(--font-mono);font-size:.9em;color:#9c5a2c;
  }

  /* ============ Code block (ProseMirror + lowlight) ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .code-block-node {
    position:relative;margin:14px 0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .code-block-node pre {
    margin:0;white-space:pre-wrap;cursor:text;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .code-block-node pre::before {
    content:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .code-block-node pre code {
    display:block;white-space:pre-wrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .code-block-language-select {
    position:absolute;top:8px;right:10px;z-index:2;
    font-family:var(--font-mono);font-size:10px;line-height:1.4;
    color:var(--ink-3);background:transparent;border:1px solid rgba(168,130,63,.24);
    border-radius:var(--r-sm);padding:1px 6px;cursor:pointer;
    outline:none;appearance:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .code-block-language-select:hover {
    color:var(--ink-2);border-color:var(--line-2);
  }
  /* 自定义语言下拉菜单(portal 到 body,正文树之外,不污染正文 innerText) */
  [data-qingagent-doc-panel] .code-block-language-menu {
    z-index:1000;max-height:260px;overflow-y:auto;
    min-width:132px;padding:5px;
    background:var(--bg-canvas);
    border:1px solid var(--line-2);border-radius:var(--r-sm, 0);
    box-shadow:0 8px 26px rgba(60,48,30,.20);
    font-family:var(--font-mono);font-size:11px;
  }
  /* 选项是 <button>:浏览器默认给按钮塞系统无衬线 13.3px,且 font 不从菜单容器继承。
     不在选项自身写死字族/字号,菜单就退化成"白底大号无衬线"的裸样子(用户真机反馈)。 */
  [data-qingagent-doc-panel] .code-block-language-option {
    display:flex;align-items:center;gap:6px;width:100%;
    padding:4px 8px 4px 6px;border:none;background:transparent;cursor:pointer;
    color:var(--ink-2);border-radius:0;white-space:nowrap;text-align:left;
    font-family:var(--font-mono);font-size:11px;line-height:1.6;
  }
  [data-qingagent-doc-panel] .code-block-language-option:hover { background:var(--mark-soft);color:var(--ink-1); }
  [data-qingagent-doc-panel] .code-block-language-option:focus-visible { outline:1px solid var(--line-3);outline-offset:-1px; }
  [data-qingagent-doc-panel] .code-block-language-option[data-active="true"] { color:var(--mark);font-weight:600; }
  /* 勾选位固定占位:当前语言打勾时其余选项不左右位移 */
  [data-qingagent-doc-panel] .code-block-language-option__check {
    display:inline-flex;width:12px;flex:none;align-items:center;justify-content:center;
    color:var(--mark);
  }
  /* Read-only pre blocks (static render) keep basic style */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre {
    position:relative;
    background:#ece1cc;border:1px solid rgba(168,130,63,.22);
    border-radius:var(--r);padding:32px 16px 14px;margin:14px 0;
    font-family:var(--font-mono);font-size:12.5px;line-height:1.6;
    color:#3a322a;white-space:pre;overflow-x:auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre code {
    background:none;border:none;padding:0;border-radius:0;
    font-family:inherit;font-size:inherit;color:inherit;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-keyword,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-built_in,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-selector-tag {
    color:#9c5a2c;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-string,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-title,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-section,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-attribute {
    color:#5a7d4a;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-comment,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-quote {
    color:var(--ink-3);font-style:italic;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-number,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-literal,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-variable,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-template-variable {
    color:var(--mark);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-type,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-class,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-function,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-name {
    color:#7b5d94;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-operator,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-punctuation,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-symbol,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-bullet {
    color:#6f665a;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-meta,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-deletion {
    color:#b15059;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre .hljs-addition {
    color:#4f7d61;
  }
  /* Language label for static pre blocks */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) :is(.wf-doc,.doc-typography) pre::before {
    content:attr(data-language);
    position:absolute;top:8px;right:12px;
    font-family:var(--font-mono);font-size:10px;
    color:#9ca3af;text-transform:uppercase;letter-spacing:.04em;
    pointer-events:none;
  }

  /* locked · 文档区编辑锁的「正在编辑中」提示统一由 .ws-edit-lock(贴底,
     workspace-ink-skin.css)负责;旧的 .doc-lock-mask 居中提示已移除,避免重复。 */
  :is([data-qingagent-doc-panel][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .wf-doc {
    pointer-events:none;user-select:none;
  }

  /* ============ AI editing cursors · imageProgress tool ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ai-cursor {
    display: inline-block;
    position: relative;
    width: 0;
    height: 1.2em;
    vertical-align: text-bottom;
    margin: 0 1px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ai-cursor::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(181, 138, 62, 0.8);
    border-radius:0;
    animation: ai-cursor-blink 1s step-end infinite;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ai-cursor::after {
    content: "";
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(181, 138, 62, 0.9);
  }
  @keyframes ai-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  /* Red cursor variant for deletion phase */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ai-cursor.red::before {
    background: rgba(220, 80, 70, 0.8);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ai-cursor.red::after {
    background: rgba(220, 80, 70, 0.9);
  }
  /* ============ Tiptap 原生应用动效 ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-shell {
    position:relative;
    min-height:100%;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-shell.native-presentation-active {
    /* 动效光晕使用负 inset，必须限制在纸张容器内，避免扩大 .ws-right 的滚动尺寸。 */
    overflow:hidden;
    /* .ws-right 是 flex 容器:默认 shrink 会把壳压到视口高,叠加上面的 hidden 就把
       打字中越过首屏的正文整段剪掉,滚动区归零(260726 用户报障:放映时右侧滚不动)。
       flex:none 让壳保持内容高 → hidden 只裁光晕的负 inset,滚动恢复。 */
    flex:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-vignette {
    position:absolute;
    /* 顶部不再用负 inset 上溢:纸张顶上浮着固定的 .ws-doc-topbar(z-index:21),
       负的 -36px 顶 inset 会把环境辉光顶到导航栏区域("内发光盖到顶栏")。
       顶边收回到纸张顶(0),只保留左右/底的柔光晕——发光只落在纸张区域内。 */
    inset:0 -80px -40px -60px;
    z-index:0;
    pointer-events:none;
    box-shadow:
      inset 0 0 70px rgba(44, 76, 128, .12),
      inset 0 0 110px rgba(92, 164, 135, .08);
    animation:ai-inner-glow 4s ease-in-out infinite;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-shell .wf-doc.ProseMirror {
    position:relative;
    z-index:1;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-char-enter {
    /* 拉长到 .5s + 柔缓动:多个相邻新字的淡入相互重叠,形成"半透明渐变波"丝滑流出,而非逐字硬蹦。 */
    animation:native-char-enter .5s cubic-bezier(.22,1,.36,1);
    will-change:opacity, filter;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-cursor::before {
    animation:
      ai-cursor-blink 1s step-end infinite,
      native-presentation-cursor-vibe .18s ease-in-out infinite;
    background:var(--native-cursor-color, rgba(181, 138, 62, .8));
    box-shadow:0 0 10px color-mix(in srgb, var(--native-cursor-color, #b58a3e) 46%, transparent);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-cursor::after {
    background:var(--native-cursor-color, rgba(181, 138, 62, .9));
    box-shadow:0 0 14px color-mix(in srgb, var(--native-cursor-color, #b58a3e) 38%, transparent);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-cursor.red::before {
    background: rgba(220, 80, 70, .85);
    box-shadow:0 0 10px rgba(220, 80, 70, .34);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-cursor.red::after {
    background: rgba(220, 80, 70, .9);
    box-shadow:0 0 14px rgba(220, 80, 70, .30);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-red-dot::before {
    display:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-red-dot::after {
    top:.35em;
  }
  /* ============ 临时 churn 动效调参面板 ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .presentation-tuning-panel {
    position:fixed;
    right:22px;
    bottom:22px;
    z-index:44;
    width:286px;
    border:1px solid rgba(31,42,49,.14);
    border-radius:0;
    background:rgba(251,248,242,.96);
    box-shadow:0 18px 48px rgba(20,30,38,.18);
    backdrop-filter:blur(14px);
    color:var(--ink-1);
    user-select:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .presentation-tuning-panel.is-collapsed {
    width:auto;
    border-radius:999px;
  }
  /* 入场动效面板:与 Churn 动效面板共用内部样式,挪到左下角,避免两个浮层重叠 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .reveal-tuning-panel {
    right:auto;
    left:22px;
  }
  /* 拟人鼠标面板:挪到右上(顶栏下),避开 Churn(右下)与入场(左下) */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .human-cursor-tuning-panel {
    right:22px;
    left:auto;
    bottom:auto;
    top:72px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-toggle {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:var(--ink-2);
    cursor:pointer;
    flex-wrap:wrap;
  }
  /* 勾选框样式统一由 .wf-checkbox(ui-kit components.css)提供,这里不再各自设 accent-color */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-toggle small {
    flex-basis:100%;
    font-size:10.5px;
    color:var(--ink-3);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-header {
    display:flex;
    align-items:center;
    gap:9px;
    min-height:38px;
    padding:7px 8px;
    cursor:grab;
    touch-action:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-header:active {cursor:grabbing}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-collapse,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-reset,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-replay {
    border:1px solid var(--line-2);
    border-radius:0;
    background:var(--bg-canvas);
    color:var(--ink-2);
    font-family:var(--font-zh-serif);
    cursor:pointer;
    transition:background .12s,border-color .12s,color .12s,opacity .12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-collapse:hover,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-reset:hover,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-replay:hover:not(:disabled) {
    background:var(--bg-hover);
    border-color:var(--ink-3);
    color:var(--ink-1);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-collapse {
    flex:0 0 auto;
    min-width:32px;
    height:26px;
    padding:0 8px;
    font-size:12px;
    font-weight:700;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .is-collapsed .ptp-collapse {
    min-width:48px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-title {
    flex:1 1 auto;
    min-width:0;
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:8px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-title span {
    font-size:12.5px;
    font-weight:700;
    white-space:nowrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-title small {
    font-family:var(--font-mono);
    font-size:10.5px;
    color:var(--ink-3);
    white-space:nowrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-reset {
    height:26px;
    padding:0 8px;
    font-size:11.5px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-body {
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:0 12px 12px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-field {
    display:flex;
    flex-direction:column;
    gap:5px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-field-head {
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:10px;
    font-size:12px;
    color:var(--ink-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-field-head strong {
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--ink-1);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-field input[type="range"] {
    width:100%;
    accent-color:#4d6dff;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-hint {
    font-size:10.5px;
    color:var(--ink-3);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-actions {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding-top:2px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-replay {
    height:30px;
    padding:0 12px;
    font-size:12px;
    font-weight:700;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-replay:disabled {
    cursor:not-allowed;
    opacity:.48;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ptp-actions span {
    font-size:11px;
    color:var(--ink-3);
  }
  @keyframes native-presentation-cursor-vibe {
    0%,100%{transform:translateX(0)}
    50%{transform:translateX(.7px)}
  }
  @keyframes native-char-enter {
    from{opacity:0;filter:var(--fx-native-char-enter-from)}
    to{opacity:1;filter:var(--fx-native-char-enter-to)}
  }

  /* review · patch three-state wrappers + hover popup */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-wrap,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap {
    position:relative;
    display:inline;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap[data-patch-state="replace"] {
    -webkit-box-decoration-break:clone;
    box-decoration-break:clone;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins {
    background:linear-gradient(to bottom, transparent 50%, rgba(74, 180, 100, 0.25) 50%);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-add-badge {
    display:inline-flex;
    align-items:center;
    height:16px;
    margin-right:5px;
    padding:0 5px;
    border:1px solid rgba(74, 180, 100, 0.34);
    background:rgba(74, 180, 100, 0.12);
    color:#2f6d3b;
    font-size:10px;
    font-weight:700;
    line-height:1;
    vertical-align:1px;
  }
  /* 审阅态行级 diff:列表/待办清单逐行标注,取代整块替换 —— 新增/改动行用与行内新增
     (.wf-row-ins)一致的"半高绿高亮"(下半截绿),不再画整块绿底或左侧条;
     删除行正文消失，仅留可 hover 的紧凑删除标记。 */
  /* 所有行统一左内距,各行 checkbox/文字左对齐一致。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row {
    padding-left:8px;
  }
  /* 块级「左绿条 + 极淡底」只留给**无法字符级**的整块替换/新增(.wf-diff-inline 之外);
     能走字符级的行/块(加了 .wf-diff-inline)不再叠这层块级底色——改动字的行内绿(.wf-row-ins)
     就是唯一标记,块级+字符级是一件事,不重复出。半高绿渐变永不用于块级背景。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--added:not(.wf-diff-inline),
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--changed:not(.wf-diff-inline) {
    box-shadow:inset 3px 0 0 rgba(74, 180, 100, 0.55);
    background:rgba(74, 180, 100, 0.06);
  }
  /* 行级删除:被删那行整行清掉——不出列表圆点、且**零布局占位**(height:0 + margin:0),
     上下两行仍按正常行距贴合、绝不因删除而撑开;红横线 + 左端红点用绝对定位骑在行间缝隙上,
     命中区(delete-marker span)也绝对定位、不占布局。hover 这条缝线才弹出被删原文。
     选择器必须带 .wf-doc 提权,否则 margin 被 `.wf-doc li{margin:2px}` 压过、删除位仍多 2px。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .wf-list-row--removed {
    list-style:none;
    position:relative;
    height:0;
    margin:0;
    padding:0;
    cursor:default;
  }
  /* 命中区收窄到 8px 且不越过缝隙太多,避免抢上一行(尤其相邻 changed 行)的 hover。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--removed > .wf-review-delete-marker {
    position:absolute;
    left:0;
    right:0;
    top:0;
    height:8px;
    transform:translateY(-50%);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--removed::before {
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:50%;
    height:2px;
    background:rgba(220, 80, 70, 0.5);
    transform:translateY(-50%);
    pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--removed::after {
    content:"";
    position:absolute;
    left:-1px;
    top:50%;
    width:5px;
    height:5px;
    border-radius:50%;
    background:rgba(220, 80, 70, 0.6);
    transform:translateY(-50%);
    pointer-events:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-del {
    color:var(--ink-3, #8a8f98);
    text-decoration:line-through;
    text-decoration-color:rgba(220, 80, 70, 0.7);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-ins {
    background:linear-gradient(to bottom, transparent 50%, rgba(74, 180, 100, 0.25) 50%);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) [data-review-target-id] { cursor:default; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-review-delete-marker {
    position:relative;
    display:block;
    width:100%;
    min-width:18px;
    height:10px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-review-delete-marker::before {
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:50%;
    height:2px;
    background:rgba(220, 80, 70, 0.5);
    transform:translateY(-50%);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-review-delete-marker::after {
    content:"";
    position:absolute;
    left:-1px;
    top:50%;
    width:5px;
    height:5px;
    border-radius:50%;
    background:rgba(220, 80, 70, 0.6);
    transform:translateY(-50%);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--removed > .wf-review-delete-marker::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--removed > .wf-review-delete-marker::after {
    display:none;
  }
  /* 审阅态容器局部 diff：表格只标真实变化的行/格，callout/分栏只标变化的内部块。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row--added > .wf-table-cell {
    box-shadow:inset 3px 0 0 rgba(74, 180, 100, 0.55);
    background:rgba(74, 180, 100, 0.06);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row--removed {
    position:relative;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-delete-cell {
    padding:2px 8px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-cell--changed:not(.wf-diff-inline) {
    box-shadow:inset 3px 0 0 rgba(74, 180, 100, 0.55);
    background:rgba(74, 180, 100, 0.06);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block {
    position:relative;
    padding-left:8px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block--added:not(.wf-diff-inline),
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block--changed:not(.wf-diff-inline) {
    box-shadow:inset 3px 0 0 rgba(74, 180, 100, 0.55);
    background:rgba(74, 180, 100, 0.06);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block--removed {
    min-height:10px;
    padding-top:2px;
    padding-bottom:2px;
  }
  /* 栏级增删必须覆盖整栏边界，不能只给栏内首个块着色，否则空栏/多块栏会丢失“整栏”语义。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-column--added {
    box-shadow:inset 3px 0 0 rgba(74, 180, 100, 0.55);
    background:rgba(74, 180, 100, 0.06);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-column--removed {
    min-width:18px;
  }
  /* hover 卡片"原文":自带紧凑表格样式(不借 .wf-doc,避免吃整篇纸张 padding/min-height/阴影污染)。
     宽表在卡片内横向滚动、不被裁切;收紧首尾外边距贴合紧凑卡片。 */
  /* 静态 PM 表格横滚容器(正文块级补丁 / hover 原文共用):宽表在此滚动,不撑破布局。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-table-scroll { overflow-x:auto; max-width:100%; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .review-table-reveal-cell {
    display:flex;align-items:baseline;min-height:1.6em;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .review-table-reveal-cell > p {margin:0;min-width:0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .review-table-reveal-cursor {flex:0 0 auto;pointer-events:none}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original { overflow-x:auto; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original > :first-child { margin-top:0; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original > :last-child { margin-bottom:0; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original table {
    border-collapse:separate;
    border-spacing:0;
    width:auto;
    max-width:100%;
    margin:4px 0;
    border:0;
    box-shadow:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original th,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original td {
    border:0;
    border-right:1px solid var(--line-2);
    border-bottom:1px solid var(--line-2);
    padding:4px 8px;
    text-align:left;
    vertical-align:top;
  }
  /* 同 .wf-doc:colgroup 抢占 :first-child,按 thead/tbody 首个取首行补上边框。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original table > :is(thead,tbody):first-of-type > tr:first-child > th,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original table > :is(thead,tbody):first-of-type > tr:first-child > td {
    border-top:1px solid var(--line-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original table > :is(thead,tbody,tfoot) > tr > [data-table-logical-col="0"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original table > :is(thead,tbody,tfoot) > tr > :first-child:not([data-table-logical-col]) {
    border-left:1px solid var(--line-2);
  }
  /* 单元格内段落去掉 UA 外边距(对齐正文 .wf-doc td p{margin:0}),行高不虚胖。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original th > p,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original td > p,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .pm-hover-original li > p { margin:0; }
  /* 流式正文打字头:末尾几个刚打出的字用横向渐变遮罩,光标处最透明→变老变实,做半透明渐变淡入。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-head {
    -webkit-mask-image:linear-gradient(90deg, #000 0%, #000 30%, transparent 100%);
    mask-image:linear-gradient(90deg, #000 0%, #000 30%, transparent 100%);
  }
  @keyframes wf-patch-current-flash-green {
    0%,100%{
      background-color:transparent;
      box-shadow:none;
      filter:none;
    }
    22%,68%{
      background-color:rgba(74, 180, 100, 0.10);
      box-shadow:0 0 0 3px rgba(74, 180, 100, 0.28), 0 0 18px rgba(74, 180, 100, 0.22);
      filter:saturate(1.12);
    }
  }
  @keyframes wf-patch-current-flash-red {
    0%,100%{
      background-color:rgba(220, 80, 70, 0.82);
      box-shadow:none;
      filter:none;
    }
    22%,68%{
      background-color:rgba(220, 80, 70, 0.95);
      box-shadow:0 0 0 3px rgba(220, 80, 70, 0.30), 0 0 18px rgba(220, 80, 70, 0.22);
      filter:saturate(1.12);
    }
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-wrap.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="replace"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.is-current[data-patch-state="replace"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row-add-hover.is-current[data-patch-state="insert"] {
    animation:wf-patch-current-flash-green .72s ease-in-out 0s 2;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--added.is-current,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--changed.is-current,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row--added.is-current,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-cell--changed.is-current,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block--added.is-current,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block--changed.is-current {
    animation:wf-patch-current-flash-green .72s ease-in-out 0s 2;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-wrap.is-current[data-patch-state="insert"] .wf-patch-ins,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="insert"] .wf-patch-ins,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="replace"] .wf-patch-ins {
    animation:wf-patch-current-flash-green .72s ease-in-out 0s 2;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-del-marker.is-current[data-patch-state="delete"] .patch-del-cursor {
    animation:wf-patch-current-flash-red .72s ease-in-out 0s 2;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-del-marker.is-current[data-patch-state="delete"] .patch-del-cursor::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del.is-current[data-patch-state="delete"] .wf-blockmark-del-line,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del.is-current[data-patch-state="delete"] .wf-blockmark-del-line::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .row-del.is-current[data-patch-state="delete"] .row-del-line {
    animation:wf-patch-current-flash-red .72s ease-in-out 0s 2;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--removed.is-current::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-list-row--removed.is-current::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row--removed.is-current .wf-review-delete-marker::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row--removed.is-current .wf-review-delete-marker::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block--removed.is-current .wf-review-delete-marker::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-container-block--removed.is-current .wf-review-delete-marker::after {
    animation:wf-patch-current-flash-red .72s ease-in-out 0s 2;
  }
  @media (prefers-reduced-motion:reduce) {
    :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-wrap.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="replace"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.is-current[data-patch-state="replace"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row-add-hover.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-wrap.is-current[data-patch-state="insert"] .wf-patch-ins,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="insert"] .wf-patch-ins,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="replace"] .wf-patch-ins,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-del-marker.is-current[data-patch-state="delete"] .patch-del-cursor,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-del-marker.is-current[data-patch-state="delete"] .patch-del-cursor::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del.is-current[data-patch-state="delete"] .wf-blockmark-del-line,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del.is-current[data-patch-state="delete"] .wf-blockmark-del-line::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .row-del.is-current[data-patch-state="delete"] .row-del-line {
      animation:none;
    }
    :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-wrap.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="replace"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.is-current[data-patch-state="replace"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-row-add-hover.is-current[data-patch-state="insert"],
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-ins-wrap.is-current[data-patch-state="insert"] .wf-patch-ins,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="insert"] .wf-patch-ins,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-replace-wrap.is-current[data-patch-state="replace"] .wf-patch-ins {
      background-color:rgba(74, 180, 100, 0.10);
      box-shadow:0 0 0 2px rgba(74, 180, 100, 0.24);
    }
    :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-del-marker.is-current[data-patch-state="delete"] .patch-del-cursor,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-del-marker.is-current[data-patch-state="delete"] .patch-del-cursor::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del.is-current[data-patch-state="delete"] .wf-blockmark-del-line,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del.is-current[data-patch-state="delete"] .wf-blockmark-del-line::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .row-del.is-current[data-patch-state="delete"] .row-del-line {
      background-color:rgba(220, 80, 70, 0.95);
      box-shadow:0 0 0 2px rgba(220, 80, 70, 0.26);
    }
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-diff-list .wf-patch-ins-wrap {
    display:inline;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-diff-list [data-row-status="same"] .wf-patch-ins {
    background:transparent;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-diff-list [data-row-status="removed"] {
    list-style:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-diff-list .row-del {
    position:relative;
    display:block;
    width:min(58%, 320px);
    padding:5px 0;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-diff-list .row-del-line {
    display:block;
    height:2px;
    border-radius:0;
    background:repeating-linear-gradient(90deg,
      rgba(220,80,70,0.7) 0, rgba(220,80,70,0.7) 8px,
      transparent 8px, transparent 14px);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-diff-list .cb-changed {
    box-shadow:0 0 0 2px rgba(74,180,100,.5);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-row-diff-list .wf-task-cb-change {
    display:inline-flex;
    position:relative;
    flex:0 0 auto;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-diff tr.row-add {
    background:rgba(74, 180, 100, 0.08);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-diff tr.row-add > th,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-diff tr.row-add > td {
    background:rgba(74, 180, 100, 0.10);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-diff .wf-table-row-add-hover {
    position:relative;
    display:inline-block;
    min-width:100%;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-diff .row-del {
    position:relative;
    display:block;
    width:100%;
    padding:5px 0;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-table-diff .row-del-line {
    display:block;
    height:2px;
    border-radius:0;
    background:repeating-linear-gradient(90deg,
      rgba(220,80,70,0.7) 0, rgba(220,80,70,0.7) 8px,
      transparent 8px, transparent 14px);
  }
  /* hover 卡片:翻新 + 加宽。定位由 patchHover.tsx 写入 fixed 坐标,
     不参与正文流、不触发布局宽度变化。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-hover-popup {
    display:none;
    position:fixed;
    bottom:calc(100% + 10px);
    left:0;
    background:#fffdf8;
    border:1px solid var(--line-1);
    border-radius:0;
    padding:11px 14px;
    box-shadow:0 10px 32px rgba(20,30,38,0.14), 0 2px 6px rgba(20,30,38,0.06);
    width:fit-content;
    min-width:min(240px, calc(100vw - 32px));
    max-width:min(540px, calc(100vw - 32px));
    z-index:20;
    pointer-events:auto;
    white-space:normal;
    overflow-wrap:anywhere;
    line-height:1.6;
    contain:layout paint;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-hover-popup::before {
    content:"";
    position:absolute;
    left:-14px;
    right:-14px;
    bottom:-16px;
    height:16px;
    background:transparent;
    pointer-events:auto;
  }
  /* 自适应翻转(usePopupPlacement 写入 data 属性):默认朝上左对齐;顶部不够朝下、右侧越界右对齐 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-hover-popup[data-vplace="down"] {
    bottom:auto;
    top:calc(100% + 10px);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-hover-popup[data-vplace="down"]::before {
    bottom:auto;
    top:-16px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-hover-popup[data-hplace="right"] {
    left:auto;
    right:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-hover-popup.is-visible {
    display:flex;
    flex-direction:column;
    gap:7px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-title {
    font-family:var(--font-mono);
    font-size:11px;
    font-weight:700;
    color:var(--ink-2);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-badge {
    align-self:flex-start;
    border:1px solid rgba(74, 180, 100, 0.34);
    background:rgba(74, 180, 100, 0.12);
    color:#2f6d3b;
    padding:1px 7px;
    font-size:12px;
    font-weight:700;
    line-height:1.5;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-original {
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:8px;
    align-items:start;
    font-size:13px;
    line-height:1.55;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-label {
    color:var(--ink-4);
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-original-text {
    color:var(--ink-2);
    overflow-wrap:anywhere;
  }
  /* 替换 hover:字符级改动片段「旧 → 新」,逐处一行;旧字灰淡、新字绿,不再弹整行原文。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-frag-list {
    display:flex;
    flex-direction:column;
    gap:2px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-frag {
    display:flex;
    align-items:baseline;
    gap:6px;
    overflow-wrap:anywhere;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-frag-old {
    color:var(--ink-3);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-frag-arrow {
    color:var(--ink-4);
    flex:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-frag-new {
    color:#3f7a4e;
    font-weight:600;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-note {
    color:var(--ink-3);
    font-size:12.5px;
    line-height:1.55;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-removed-text {
    color:#a8413a;
    text-decoration:line-through;
    text-decoration-color:rgba(220, 80, 70, 0.7);
    font-weight:600;
  }
  /* hover 卡片里的「被删块缩放原版」:把被删结构块(图表/表格/图片等)缩小渲染出来,看到删的是什么 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-preview {
    margin:2px 0;
    max-width:340px;
    max-height:240px;
    overflow:auto;
    border:1px solid var(--line-1);
    border-radius:0;
    padding:6px 9px;
    background:var(--bg-canvas);
    zoom:0.8;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-preview > * {margin:2px 0}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-actions {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:2px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-btn {
    align-self:flex-start;
    font-size:11px;
    padding:3px 10px;
    border:1px solid var(--line-2);
    border-radius:var(--r-sm);
    background:var(--bg-canvas);
    color:var(--ink-2);
    cursor:pointer;
    transition:all 0.12s;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-popup-btn:hover {
    background:var(--mark-soft);
    color:var(--mark);
    border-color:var(--mark);
  }

  /* 结构块(图片/分隔线/整表/整图等块内无可标注文本)整块新增/删除:
     仅一道左侧细竖条(不铺背景),hover 看"新增图片/删除表格"说明;删除时内容降透明示意。
     文字块(标题/段落等)不走这里——整段已由行内 patchIns/patchDel 铺色。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark {
    position:relative;
    padding-left:14px;
    margin:10px 0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark::before {
    content:"";
    position:absolute;left:0;top:2px;bottom:2px;
    width:2px;border-radius:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.insert::before {background:rgba(74, 180, 100, 0.72)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.delete::before {background:rgba(220, 80, 70, 0.72)}
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark {cursor:pointer}
  /* 块级删除/替换:被移除的旧块不留在正文(与行内删除同口径——折叠成红线 marker + hover 看原文),
     只保留独立的 wf-blockmark-del 折叠标记 widget。否则替换会把整张旧表格也画在正文里。 */
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-blockmark.delete {
    display:none;
  }
  /* 块级新增(整张表格/图表等):只保留左侧绿竖线,不叠 wf-patch-ins 的半截绿渐变——
     那渐变是给行内文字做下划线的,套到整块上就成了突兀的"下半截绿色块"。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.insert .wf-patch-ins {
    background:none;
  }
  /* 行级/单元格级 diff 的替换块(列表/待办清单逐行标注):去掉块级整条绿竖线 + 左内距,
     只保留内部逐行标注,避免"既有行级又有块级"的重复标记。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.insert.is-granular {
    padding-left:0;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark.insert.is-granular::before {
    display:none;
  }
  /* 审阅态图表允许交互(缩放按钮 / 平移看细节),不被 wf-doc 的 pointer-events:none 禁掉。
     只放开外层 .pm-diagram 即可突破;内部交由 React Flow 自管(勿用 * 覆盖,否则会破坏
     background/viewport/nodes/edge 各层各自的 pointer-events,导致平移与边命中失效)。 */
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .pm-diagram {
    pointer-events:auto;
  }
  /* 结构块删除:折叠成一道红色细线标记(不显示被删内容),hover 看被删内容。
     与行内删除"红光标 + hover"同口径——删除一律不把旧内容留在原位。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del {
    position:relative;
    margin:8px 0;
    padding:5px 0;
    cursor:pointer;
  }
  /* 与行内删除光标(.patch-del-cursor)同粗细同浓淡:竖条 2px、球 5px、alpha .55/.6,真正统一。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del-line {
    display:block;
    position:relative;
    width:2px;
    height:18px;
    margin-left:2px;
    border-radius:999px;
    background:rgba(220, 80, 70, 0.55);
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-blockmark-del-line::after {
    content:"";
    position:absolute;
    left:50%;
    top:-4px;
    width:5px;
    height:5px;
    border-radius:50%;
    background:rgba(220, 80, 70, 0.6);
    transform:translateX(-50%);
  }
  /* 审阅态纯删除铁律：被删正文原位只留「竖线+圆点」游标，原文仅在 hover 卡展示。
     替换不走此红色分支，只显示绿色新值。改此处前先读 AGENTS.md UI Iron Rules。 */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-del {
    display:inline-block;
    width:0;
    max-width:0;
    overflow:hidden;
    white-space:pre;
    font-size:0;
    line-height:0;
    color:transparent;
    vertical-align:baseline;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-patch-del-marker {
    position:relative;
    display:inline;
    cursor:pointer;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-del-cursor {
    display:inline-block;
    position:relative;
    width:2px;height:1.05em;
    vertical-align:text-bottom;
    margin:0 2px;
    background:rgba(220, 80, 70, 0.55);
    border-radius:999px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-del-cursor::after {
    content:"";
    position:absolute;left:50%;top:-4px;
    width:5px;height:5px;
    border-radius:50%;
    background:rgba(220, 80, 70, 0.6);
    transform:translateX(-50%);
  }

  /* pendingReview · patch 单独操作 · 插在 .wf-patch-ins 之后 */
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc {
    pointer-events:none;user-select:text;cursor:default;
  }
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-ins-wrap,
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-replace-wrap {
    pointer-events:auto;
  }
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-blockmark,
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-blockmark-del {
    pointer-events:auto;
  }
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .row-del,
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-task-cb-change,
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-table-row-add-hover {
    pointer-events:auto;
  }
  :is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .wf-patch-del-marker {
    pointer-events:auto;
  }
  /* ============ Apple Intelligence inner glow · active tool ============ */
  :is([data-qingagent-doc-panel][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel][data-tool="agentBusy"], #qingagent-doc-panel-specificity) .ws-right {
    animation: ai-inner-glow 4s ease-in-out infinite;
  }

  @keyframes ai-inner-glow {
    0%, 100% {
    box-shadow:
    inset 0 0 30px 5px rgba(100, 150, 255, 0.15),
    inset 0 0 60px 10px rgba(160, 100, 255, 0.08);
    }
    25% {
    box-shadow:
    inset 0 0 30px 5px rgba(255, 100, 150, 0.15),
    inset 0 0 60px 10px rgba(255, 180, 100, 0.08);
    }
    50% {
    box-shadow:
    inset 0 0 30px 5px rgba(100, 220, 150, 0.15),
    inset 0 0 60px 10px rgba(100, 180, 255, 0.08);
    }
    75% {
    box-shadow:
    inset 0 0 30px 5px rgba(200, 100, 255, 0.15),
    inset 0 0 60px 10px rgba(255, 100, 180, 0.08);
    }
  }

  /* ============ Chat loading dots ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .chat-loading-dots {
    display: inline-flex;
    gap: 3px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .chat-loading-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ink-3);
    animation: chat-dot-pulse 1.2s infinite ease-in-out;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .chat-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .chat-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes chat-dot-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
  }

  /* Batch 5 · 低端 / 减少动态:仅关闭常驻 infinite 动画,high 默认规则不动。 */
  :is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .au-dot,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .doc-empty.drafting::before,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .doc-drafting-page::after,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .doc-empty-loader,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .doc-empty-loader::after,
:is([data-qingagent-doc-panel][data-perf="low"][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .ai-cursor::before,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .native-presentation-vignette,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .native-presentation-cursor::before,
:is([data-qingagent-doc-panel][data-perf="low"][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel][data-perf="low"][data-tool="agentBusy"], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .chat-loading-dots span {
    animation:none;
  }
  :is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .doc-empty-loader,
:is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .chat-loading-dots span {
    opacity:1;
    transform:none;
  }
  :is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .doc-empty-loader::after {
    opacity:.45;
    transform:translateX(0);
  }
  :is([data-qingagent-doc-panel][data-perf="low"], #qingagent-doc-panel-specificity) .presentation-tuning-panel {
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }

  @media (prefers-reduced-motion: reduce) {
    :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .au-dot,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty.drafting::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-drafting-page::after,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty-loader,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty-loader::after,
:is([data-qingagent-doc-panel][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ai-cursor::before,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-vignette,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-cursor::before,
:is([data-qingagent-doc-panel][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel][data-tool="agentBusy"], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .chat-loading-dots span {
      animation:none;
    }
    :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty-loader,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .chat-loading-dots span {
      opacity:1;
      transform:none;
    }
    :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty-loader::after {
      opacity:.45;
      transform:translateX(0);
    }
    :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .presentation-tuning-panel {
      backdrop-filter:none;
      -webkit-backdrop-filter:none;
    }
  }

  /* ============ AskUser summary card (submitted questionnaire) ============ */
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card {
    background:var(--bg-subtle, #f7f7f5);
    border:1px solid var(--line-1, #e8e5e0);
    border-radius:0;
    padding:10px 14px;
    margin:4px 0 6px;
    width:100%;
    box-sizing:border-box;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card-header {
    display:flex;align-items:center;gap:6px;
    font-size:12.5px;font-weight:500;color:var(--ink-2);
    margin-bottom:8px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card-check {
    color:#5ca465;font-size:13px;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card-body {
    display:flex;flex-direction:column;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card-row {
    display:flex;justify-content:space-between;align-items:baseline;gap:12px;
    padding:5px 0;
    border-bottom:1px solid var(--line-1, #eee);
    font-size:12.5px;line-height:1.5;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card-row:last-child {
    border-bottom:none;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card-q {
    color:var(--ink-3);flex-shrink:0;max-width:45%;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .askuser-card-a {
    color:var(--ink-1);font-weight:500;text-align:right;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }

  /* 左栏联动置灰 (imageProgress/pendingReview) */


/* p02:penNote 块在可编辑 TipTap 中的样式(只读渲染另有路径) */
[data-qingagent-doc-panel] .wf-doc aside.pm-pen-note {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid rgba(31, 42, 49, 0.35);
  background: rgba(31, 42, 49, 0.05);
  font-style: italic;
  color: rgba(31, 42, 49, 0.78);
}

/* ===== 文档查找/替换条 DocFindBar(跟随奶白纸右缘的固定浮层;字体走宋体 serif;直角;既有 token) ===== */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-bar {
  position:fixed; z-index:20;
  /* 水平居中于文档纸(--doc-left/--doc-right=纸真实左右边);--doc-top=纸面静止顶部,再进纸内 10px */
  top:calc(var(--doc-top, 12px) + 10px);
  left:calc((var(--doc-left, 0px) + var(--doc-right, 100vw)) / 2);
  transform:translateX(-50%);
  display:flex; flex-direction:column; gap:6px;
  background:var(--bg-paper-deep); border:1px solid var(--line-2); border-radius:0;
  box-shadow:0 6px 24px rgba(20,24,32,.14); padding:8px 10px; min-width:360px;
  font-family:var(--font-zh-serif); font-size:13px; color:var(--ink-1);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-row {display:flex; align-items:center; gap:6px}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-field {position:relative; flex:1; min-width:0; display:flex}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-field .ws-find-input {padding-right:46px}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-input {
  flex:1; min-width:0; border:1px solid var(--line-2); border-radius:0; padding:5px 8px;
  font-family:var(--font-zh-serif); font-size:13px; background:var(--bg-canvas); color:var(--ink-1); outline:none;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-input:focus {border-color:var(--ink-3)}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-input.is-nohit {animation:ws-find-nohit .5s ease}
@keyframes ws-find-nohit {0%,100%{border-color:var(--line-2)} 30%{border-color:#9e2b25; background:rgba(158,43,37,.06)}}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-count {position:absolute; right:8px; top:50%; transform:translateY(-50%); color:var(--ink-3); font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; pointer-events:none}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-btn {
  border:none; background:transparent; border-radius:0; width:26px; height:26px;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
  color:var(--ink-2); font-family:var(--font-zh-serif); font-size:13px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-btn:hover {background:rgba(0,0,0,.06)}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-btn[aria-pressed="true"] {background:rgba(0,0,0,.08); color:var(--ink-1)}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-btn:disabled {opacity:.35; cursor:default}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-replace-row[hidden] {display:none}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-act {
  border:1px solid var(--line-2); border-radius:0; background:var(--bg-canvas); color:var(--ink-1);
  padding:4px 10px; font-family:var(--font-zh-serif); font-size:12.5px; cursor:pointer; white-space:nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-act:hover {background:rgba(0,0,0,.05)}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-find-act:disabled {opacity:.4; cursor:not-allowed}
/* 命中高亮:普通命中=青蓝浅底;当前命中=描金描边+淡金底(非审阅态,状态①) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .ws-find-hit {background:rgba(64,120,150,.22); color:inherit; border-radius:0}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .ws-find-hit.is-current {background:rgba(196,150,58,.38); outline:2px solid rgba(176,128,32,.85); outline-offset:0}
/* 审阅态双通道:命中切"只描边不填底",不与补丁底色打架(状态③) */
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .ws-find-hit {background:transparent; outline:1.5px solid rgba(64,120,150,.55); outline-offset:0}
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc .ws-find-hit.is-current {background:rgba(196,150,58,.20); outline:2px solid rgba(176,128,32,.9)}

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:20-60 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) {
  /* 玄青桌面基色 = 纹理槽:整块背景的最底层。以后要在"整个后边"铺纹理,
     就把纹理作为 background-image 的最后一层(压在色斑/暗角之下)叠到这里即可。
     深墨蓝、非纯黑(旧渐变外圈 #0a0d10 近黑已弃)。 */
  background-color: var(--desk-base);
  /* 色斑与暗角都用**半透明**叠在基色上 → 背后的基色/未来纹理能透出来("打穿")。
     暗角:中心完全透明(不提亮、不发灰)、只往四周压一层浅半透明深墨,
     底部因此读作深蓝而非死黑(旧的不透明近黑 #0a0d10 已弃)。 */
  background-image:
    var(--desk-cinnabar-glow),
    var(--desk-teal-glow),
    var(--desk-vignette);
  /* 字体统一 Noto Serif SC(只改 family,字号沿用现有);大红同新建页 */
  --font-sans: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-zh-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --ws-red: #d8382b;
  --ws-red-lite: #ee6a59;
  --fx-workspace-glass-bg: rgba(16, 21, 26, 0.56);
  --fx-workspace-input-glass-bg: rgba(8, 11, 15, 0.72);
  --fx-workspace-backdrop-filter: blur(18px) saturate(1.3);
  --fx-workspace-glass-shadow: 0 16px 46px rgba(0, 0, 0, 0.5);
  --fx-workspace-dot-glow: 0 0 8px rgba(184, 169, 140, 0.5);
  --fx-input-agent-opacity: 1;
  --fx-input-agent-glow-rest:
    0 0 0 1px rgba(184, 169, 140, 0.32),
    0 0 16px 2px rgba(184, 169, 140, 0.22);
  --fx-input-agent-glow-peak:
    0 0 0 1px rgba(184, 169, 140, 0.4),
    0 0 20px 3px rgba(184, 169, 140, 0.24);
  --fx-input-agent-glow-static:
    0 0 0 1px rgba(184, 169, 140, 0.34),
    0 0 14px 2px rgba(184, 169, 140, 0.22);
  --ws-float-bar-height: 52px;
  --ws-float-bar-bottom: 26px;
  --ws-float-bar-safe-gap: 96px;
  --ws-bigplan-bottom-safe-area: calc(
    var(--ws-float-bar-height) + var(--ws-float-bar-bottom) + var(--ws-float-bar-safe-gap)
  );
  font-family: var(--font-zh-serif);
}

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:119-204 */
/* 主体:居中的左右组(无顶栏,占满全高) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-body {
  /* 左右栏定宽不再被压缩:窗口放不下整组时,整体横向滚动而不是把两栏挤窄。
     safe center:放得下时居中,放不下时回退到 start(靠左)以保证能滚到左侧、不被裁掉。 */
  justify-content: safe center !important;
  align-items: stretch !important;
  gap: var(--ws-paper-column-gap) !important;
  padding: 0 var(--ws-paper-body-padding-inline) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}
/* 左对话区:定宽 400(不再随 vw 收窄),放不下走 .ws-body 的横向滚动 */

/* 右文档列:定宽上限与首页探针共用 --ws-paper-* 几何变量。转场通过同构 DOM 实测
   safe-center + scrollbar-gutter 后的真实 rect；窗口放不下时两端都回退靠左，
   由 .ws-body 横向滚动承接。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right {
  --ws-paper-min-height: 100%;
  /* 纸内功能区(.ws-docfns)绝对定位的锚:相对滚动容器定位,随内容一起滚。 */
  position: relative;
  flex: 0 0 var(--ws-paper-column-width) !important;
  width: auto !important;
  max-width: var(--ws-paper-column-width) !important;
  padding: var(--ws-paper-top-offset) 0 0 !important;
  overflow-y: auto;
  /* 内容变长出滚动条时,经典占位滚动条(自定义 4px)会吃掉内容区宽,居中的纸右边被挤、
     视觉上「往左缩一点」。both-edges 让两侧恒留同宽的滚动槽 → 滚动条出不出,内容区宽度
     与纸面中心都恒定不跳。 */
  scrollbar-gutter: stable both-edges;
}

:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc > *,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar {
  transition:
    opacity 0.44s ease,
    transform 0.52s cubic-bezier(0.19, 0.85, 0.23, 1),
    filter 0.44s ease;
}





:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-arriving .wf-doc > *,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-returning .wf-doc > *,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-arriving .doc-toolbar,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-returning .doc-toolbar {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(1.5px);
  pointer-events: none;
}

:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-arrive-revealing .wf-doc > * {
  transition-delay: 80ms;
}




/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:592-682 */
/* —— 审批条 PatchNav:复用顶层浮动观感(暗底描金、底部居中、弹性浮现) —— */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav {
  position: fixed !important;
  z-index: 41;
  /* 与问卷条完全一致:宽=正文内容宽、固定高 52、毛玻璃 */
  left: max(12px, calc(var(--doc-left, 0px) + 64px));
  right: max(12px, calc(100vw - var(--doc-right, 100%) + 64px));
  top: auto !important;
  bottom: var(--ws-float-bar-bottom);
  margin: 0;
  max-width: none;
  width: auto;
  height: var(--ws-float-bar-height);
  box-sizing: border-box;
  padding: 0 14px 0 16px;
  /* 审核条改用纸张色(不要黑底):暖奶白半透明 + 毛玻璃,与正文纸面同语言 */
  background: rgba(250, 246, 236, 0.92) !important;
  border: 1px solid rgba(120, 90, 50, 0.22) !important;
  border-radius: 0 !important;
  backdrop-filter: var(--fx-workspace-backdrop-filter);
  -webkit-backdrop-filter: var(--fx-workspace-backdrop-filter);
  box-shadow: 0 16px 46px rgba(60, 45, 25, 0.18);
  color: var(--ink-1) !important;
  /* 入场同样由 FLIP 从输入框位置滑来接管(内容浮现见上方 .patch-nav > *) */
  animation: none !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-label {
  color: var(--ink-1) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-label b {
  color: #9a6a1a !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-dot {
  background: #b59a63 !important;
  box-shadow: 0 0 8px rgba(168, 130, 63, 0.4) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost {
  color: var(--ink-2) !important;
  border-color: rgba(120, 90, 50, 0.24) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump:hover,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost:hover {
  color: var(--ink-1) !important;
  border-color: rgba(120, 90, 50, 0.4) !important;
  background: var(--bg-hover) !important;
}
/* 提交钮:金色实心(对应 clip-221224 的「提交↵」高亮) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit {
  background: #b59a63 !important;
  border-color: #b59a63 !important;
  color: var(--ink-surface) !important;
  font-weight: 600 !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit:hover {
  background: #c7af78 !important;
}
/* 整篇审:新旧版互斥选择器(暗条上,浅色 + 古铜金 thumb,与提交钮同语义) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-toggle {
  background: rgba(120, 90, 50, 0.12) !important;
  border-color: rgba(120, 90, 50, 0.22) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-opt {
  color: var(--ink-2) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-opt.is-on {
  color: var(--ink-surface) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-thumb {
  background: #b59a63 !important;
}
/* 审阅条(逐处审 + 整篇审)统一用产品衬线字体(与正文/品牌一致),比默认无衬线更稳重。
   <button> 默认不继承 font-family(UA 强制无衬线),故对导航/提交/放弃各钮显式指定。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-label,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-opt {
  font-family: var(--font-zh-serif);
  letter-spacing: 0.02em;
}
/* 审批态:审批条 fixed 脱流后给右栏留底部安全区,避免文档尾/改动/hover 弹层被浮条遮住,
   并让 scrollIntoView(block:center) 到末尾时有补偿空间 */
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .ws-right {
  padding-bottom: 0 !important;
  scroll-padding-bottom: 104px;
}
:is([data-qingagent-doc-panel][data-content="pendingReview"], #qingagent-doc-panel-specificity) .wf-doc {
  padding-bottom: 156px !important;
}

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:1111-1220 */
/* 审批操作条(patch-nav / 整篇审 wdr-nav)统一成深色风格,和问卷条(askuser-overlay)一致。
   它挂在右侧文档区(.ws-right),原本走 base 浅色令牌(--bg-subtle 暖白 / --line-2 浅描边),
   且 .ws-right 没有覆盖 --mark → 整条上的 var(--mark) 会落到 ui-kit base 的暗红 #b15059
   (= 原「提交」按钮变红的根因)。这里把整组语义令牌按问卷条暗皮重定:
   - 暗玻璃底 + 赭金 --mark(与 askuser-overlay 同一套 #b59a63 / line / ink 色阶)
   - 提交 = 实心赭金主按钮(深字),放弃全部 / 上一处下一处 = 暗底描边次按钮
   - 整篇审 wdr-nav 共用同壳,thumb/active 文字也跟着走暗皮。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav {
  --mark: #b59a63;
  --ink-1: #ece3d0;
  --ink-2: rgba(236, 227, 208, 0.64);
  --ink-3: rgba(236, 227, 208, 0.44);
  --ink-4: rgba(236, 227, 208, 0.3);
  --line-1: rgba(184, 169, 140, 0.16);
  --line-2: rgba(184, 169, 140, 0.28);
  --bg-subtle: rgba(255, 255, 255, 0.04);
  --bg-hover: rgba(255, 255, 255, 0.06);
  --ink-on-dark: var(--ink-surface);
  background: var(--fx-workspace-input-glass-bg) !important;
  backdrop-filter: var(--fx-workspace-backdrop-filter);
  -webkit-backdrop-filter: var(--fx-workspace-backdrop-filter);
  border-color: rgba(184, 169, 140, 0.28) !important;
}
/* dot / 计数高亮:base 用硬编码暖橙 #e8913a,在暗玻璃上偏跳;统一成赭金,与问卷条 au-dot 一致 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-dot {
  background: var(--mark) !important;
  box-shadow: 0 0 0 3px rgba(181, 154, 99, 0.18) !important;
}
/* PatchNav portal 到面板根直属子节点；保持 fixed 与青简的视口定位几何。
   面板根的 isolation 只限定层级，不应改变 fixed 的 containing block。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) > .patch-nav {
  position: fixed !important;
  left: max(12px, calc(var(--doc-left, 0px) + 64px));
  right: max(12px, calc(100vw - var(--doc-right, 100%) + 64px));
  top: auto !important;
  bottom: var(--ws-float-bar-bottom);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-label {
  color: var(--ink-1) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-label b {
  color: var(--mark) !important;
}
/* 次按钮:上一处/下一处 + 放弃全部 —— 与 askuser-overlay .wf-btn.ghost 一个调性(暗底描边浅字) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost {
  background: transparent !important;
  border: 1px solid rgba(184, 169, 140, 0.28) !important;
  color: #cdbf9f !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump:hover:not(:disabled),
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost:hover {
  border-color: rgba(184, 169, 140, 0.42) !important;
  background: rgba(184, 169, 140, 0.12) !important;
  color: #f3ecdb !important;
}
/* 主按钮:提交 / 应用新版 —— 实心赭金 + 深字,醒目且与暗条同色系(修掉变红) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit {
  background: var(--mark) !important;
  border-color: var(--mark) !important;
  color: var(--ink-on-dark) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit:hover:not(:disabled) {
  background: #c9ad75 !important;
  border-color: #c9ad75 !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-commit:disabled,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-jump:disabled,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-ghost:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}
/* 放弃全部确认态直接替换底栏内容。使用单层实底暖纸，避免浮层与玻璃底栏叠色。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav.is-confirming {
  background: var(--bg-paper-deep) !important;
  border-color: rgba(120, 90, 50, 0.28) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 16px 46px rgba(60, 45, 25, 0.18);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-message {
  color: var(--ink-surface) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-action {
  background: var(--mark) !important;
  border-color: var(--mark) !important;
  color: var(--ink-surface) !important;
  font-weight: 600;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-action:hover {
  background: #c9ad75 !important;
  border-color: #c9ad75 !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-cancel {
  background: transparent !important;
  border-color: rgba(120, 90, 50, 0.28) !important;
  color: var(--ink-surface) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-cancel:hover,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .pn-confirm-cancel:focus-visible {
  background: var(--bg-hover) !important;
  border-color: rgba(120, 90, 50, 0.42) !important;
}
/* 整篇审切换器(新版‖旧版):thumb 用 --ink-1(暗皮翻成浅奶白),active 文字用深字 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-toggle {
  border-color: rgba(184, 169, 140, 0.28) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-opt {
  color: rgba(236, 227, 208, 0.44) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-opt.is-on {
  color: var(--ink-surface) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .patch-nav .wdr-thumb {
  /* thumb 用 --ink-1(暗皮翻成浅奶白 #ece3d0),让深色 active 文字(--ink-surface)
     压在浅底上可见;曾误写成 --ink-on-dark(暗皮翻成 #1a1410 深)→ 深字压深底看不见 */
  background: var(--ink-1) !important;
}

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:1527-1667 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(8, 10, 12, 0.55);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-modal,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-confirm-modal {
  width: min(460px, 92vw);
  color: var(--ink-1);
  background: var(--bg-paper-deep);
  border: 1px solid rgba(120, 90, 50, 0.26);
  border-radius:0;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-modal {
  padding: 26px 26px 20px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-confirm-modal {
  max-width: 330px;
  padding: 22px 24px 18px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: #9c8552;
  border: 1px solid rgba(120, 90, 50, 0.26);
  border-radius:0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-modal h3,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-confirm-modal h3 {
  margin: 0 0 12px;
  color: var(--ink-1);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-confirm-modal h3 {
  margin-bottom: 10px;
  font-size: 16px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-modal p,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-confirm-modal p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-point {
  display: flex;
  gap: 9px;
  margin-bottom: 9px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-point > span {
  flex: 0 0 auto;
  color: #9c8552;
  font-weight: 700;
  line-height: 1.7;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-point p {
  margin: 0;
  line-height: 1.7;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(120, 90, 50, 0.26);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-primary,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-secondary,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-danger {
  border-radius:0;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-primary {
  padding: 9px 18px;
  color: var(--bg-paper-deep);
  font-weight: 600;
  background: var(--ink-1);
  border: 0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-secondary {
  padding: 8px 16px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid rgba(120, 90, 50, 0.26);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-danger {
  padding: 8px 16px;
  color: #fff;
  font-weight: 600;
  background: #c0392b;
  border: 0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-danger:disabled {
  cursor: wait;
  opacity: 0.7;
}
@media (max-width: 560px) {
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-foot {
    align-items: stretch;
    flex-direction: column;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-modal-primary {
    width: 100%;
  }
}

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:1669-1802 */
/* —— 右侧:玄青桌面留白,正文为奶白文档纸 —— */
/* 画布贯通契约:从横向工作区到纸面内容之间不允许任何中间层另刷底色。
   尤其 .ws-right 的 stable both-edges gutter 属于滚动容器绘制区；整条父链透明后，
   左右预留槽会按原坐标直接露出 #view-workspace 的玄青色斑与暗角。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-body,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-document-content,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-shell,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-surface {
  background: transparent !important;
}
/* 纸壳仍是唯一不透明层，但外投影会落入两侧透明 gutter，并被滚动容器裁成贯穿
   全高的窄黑条。纸张与桌面的分界已由明暗材质本身建立，不再向纸外绘制阴影。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-shell,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deriv-view,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .fd-right-preview,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bigplan-panel {
  box-shadow: none !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-shell {
  /* !important:覆盖 editing/pendingReview 等态把纸改成 transparent 的规则,任何态都保持奶白 */
  background: var(--bg-paper-deep) !important;
  padding: 52px 64px !important;
  border-radius: var(--ws-paper-radius);
  /* 纸宽 = 右列扣除浏览器实际双侧 scrollbar-gutter 后的内容宽。首页探针复刻同一规则，
     转场终帧直接采用实测值，不再把列宽上限误当成纸壳真实宽度。 */
  width: 100% !important;
  max-width: var(--ws-paper-column-width) !important;
  box-sizing: border-box !important;
  /* 铺满滚动容器内容区:短文档也撑到底、底部不露深墨黑;长文档随内容向下延伸。
     顶部留白由 ws-right 的 padding-top 提供(深墨间隔),底部由 padding-bottom:0 贴到底 */
  min-height: var(--ws-paper-min-height);
  margin: 0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-shell {
  position: absolute;
  top: var(--ws-paper-top-offset);
  left: 0;
  z-index: 0;
  pointer-events: none;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-surface {
  position: relative;
  width: 100%;
  max-width: var(--ws-paper-column-width);
  min-height: var(--ws-paper-min-height);
  /* 审阅态纸面是 .ws-right(列 flex 容器)的直接弹性子项;默认 flex-shrink:1 会把纸面
     从内容真实高压缩到 min-height(一屏),正文靠 overflow 溢出照常滚,但发光层 inset:0
     只认被压扁的一屏高度 → 滚过一屏发光断裂出横切。锁死 flex-shrink,让纸面按内容撑满。 */
  flex-shrink: 0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  box-sizing: border-box;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-shell {
  min-height: var(--ws-paper-min-height);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .native-presentation-shell .wf-doc.ProseMirror {
  min-height: var(--ws-paper-min-height);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar {
  background: var(--ink-1) !important;
  border-color: var(--ink-1) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar::after {
  background: var(--ink-1) !important;
  border-right-color: var(--ink-1) !important;
  border-bottom-color: var(--ink-1) !important;
}
/* 下方弹出时 caret 朝上,暖墨皮肤下同样染成深墨色(用 top/left 边) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar.is-below::after {
  border-left-color: var(--ink-1) !important;
  border-top-color: var(--ink-1) !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-toolbar .dt-menu {
  background: var(--ink-1) !important;
  border-color: #3a3328 !important;
}
/* 代码块语言菜单通过 portal 挂到 body,不在 #view-workspace 作用域内。
   这里单独抬高层级并锁住滚动,避免下半选项被正文层吃掉或 wheel 穿透。 */
[data-qingagent-doc-panel] .code-block-language-menu {
  z-index: 100120;
  pointer-events: auto;
  max-height: min(52vh, 280px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* 块手柄菜单(转换为 / 插入)暖化:它是 fixed/absolute 浮层,在 .wf-doc 暖作用域外,
   基础 --bg-canvas 现已暖化为 #faf6ec(tokens.css)。这里给整套暖 token + 暖白底(比纸面略亮、
   靠阴影分离),让面板/分组标题/列表项/图标/网格/hover 全部跟随暖墨纸面,不再白。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .block-handle-menu,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .bh-submenu-panel {
  background: var(--bg-canvas) !important;
  border-color: rgba(120, 90, 50, 0.22) !important;
  --line-1: rgba(120, 90, 50, 0.14);
  --line-2: rgba(120, 90, 50, 0.24);
}
/* 空/生成中态也是同一张奶白纸 —— 翻转落地即有纸接住,内容随后 settle 进来(接缝不断)。
   原 .doc-empty 是 absolute inset:0(填满右列、top:0);改为 top:40 起,与纸落点 rect 对齐。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty {
  top: 52px !important;
  background: var(--bg-paper-deep) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deriv-view.is-generating > .doc-empty {
  top: 0 !important;
  box-shadow: none;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty-title {
  color: #2c2419;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .doc-empty-sub {
  color: #8a7350;
}
/* 文档纸:无边框(纯净奶白纸面) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc {
  position: relative;
}
/* 文档纸内的语义令牌翻成「暖纸」系:ui-kit base token 是冷绿灰底 + 暗红 mark(#b15059),
   表格/行内代码/链接/callout/公式默认走它,在奶白纸上格格不入。这里在纸作用域内统一暖化——
   凡用 var(--mark / --line-* / --bg-subtle / --ink-*) 的元素自动跟随变暖。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc,
[data-qingagent-doc-panel] /* 文件预览面板(AssetPreview)同样套暖色 token,
[data-qingagent-doc-panel] 否则文字/标签会落到基础冷色(slate-blue)→ 白底青蓝字、与主题不搭。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .fd-right-preview {
  --bg-canvas: var(--bg-paper-deep);
}

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:1863-2074 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-anchor {
  position: relative;
  pointer-events: auto;
  display: inline-flex;
}

/* 纸内功能区(用户拍板:导出移进文档区,审查/导出皆图标,右上角横排):
   绝对定位钉进纸张右上内侧,随纸滚动;幽灵图标钮,hover 才出淡底。
   right 公式 = 纸外侧留白的一半 + 纸内缩进,与 794px 纸宽对齐。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-docfns {
  position: absolute;
  /* 纸顶 = .ws-right padding-top 52,再往纸内缩 12;右侧给滚动条留 18。 */
  top: 64px;
  right: 18px;
  z-index: 24;
  display: flex;
  gap: 2px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-docfn-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-docfn-btn:hover {
  background: rgba(47, 42, 34, 0.07);
  color: var(--mark);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-docfn-btn.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-picker {
  display: grid;
  gap: 12px;
  min-width: 0;
  font-family: var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-folder-intro-modal.ws-lexicon-modal {
  width: min(520px, 92vw);
  max-height: min(680px, 86vh);
  padding: 0;
  overflow: hidden;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: center;
  min-height: 58px;
  padding: 0 52px 0 22px;
  border-bottom: 1px solid var(--line-2);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-head h2 {
  margin: 0;
  color: var(--ink-1);
  font: 700 17px/1.3 var(--font-zh-serif);
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-head-count {
  justify-self: end;
  color: var(--ink-3);
  font: 12px/1.4 var(--font-mono);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-back,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-close {
  padding: 0;
  color: var(--ink-2);
  font-family: var(--font-zh-serif);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-close {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  top: 15px;
  right: 18px;
  width: 28px;
  height: 28px;
  font-size: 21px;
  line-height: 26px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-back:hover,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-close:hover { color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-picker { padding: 18px 22px 20px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-picker-hint,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-empty,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-error {
  margin: 0;
  color: var(--ink-3);
  line-height: 1.6;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-error { color: var(--ws-red); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-list {
  display: grid;
  max-height: min(300px, 36vh);
  overflow-y: auto;
  border-top: 1px solid var(--line-1);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-option {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--line-1);
  color: var(--ink-1);
  transition: background-color 120ms ease;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-option:hover { background: var(--bg-subtle); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-check {
  display: grid;
  place-items: center;
  align-self: stretch;
  cursor: pointer;
}
/* 勾选框本体统一走 .wf-checkbox(ui-kit components.css),这里只留容器排布 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-open {
  display: grid;
  grid-template-columns: 1fr auto 18px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  padding: 0 8px 0 0;
  color: var(--ink-1);
  text-align: left;
  font: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-open > small {
  color: var(--ink-3);
  font-family: var(--font-mono);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-copy strong {
  font-weight: 600;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-copy small {
  color: var(--ink-3);
  font: 12px/1.45 var(--font-zh-serif);
  white-space: normal;
  overflow-wrap: anywhere;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: color 120ms ease, transform 120ms ease;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-hover-card { position:fixed; z-index:41; display:flex; flex-direction:column; box-sizing:border-box; width:min(540px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow:hidden; padding:16px; border:1px solid var(--line-2); border-radius:0; background:var(--bg-canvas); color:var(--ink-1); box-shadow:0 8px 24px color-mix(in srgb,var(--ink-1) 16%,transparent); font-family:var(--font-zh-serif); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-color:var(--line-3) transparent; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-head { padding-bottom:8px; border-bottom:1px solid var(--line-1); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-title-row { display:flex; align-items:center; justify-content:space-between; gap:18px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-title-row>strong { flex:1; min-width:0; color:var(--ink-1); font-size:15px; line-height:1.45; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-nav { flex:none; display:flex; align-items:center; gap:4px; color:var(--ink-3); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-count { margin-right:2px; white-space:nowrap; font-size:11px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-nav button { appearance:none; display:grid; place-items:center; width:24px; height:24px; padding:0; border:1px solid transparent; border-radius:0; background:transparent; color:var(--ink-3); cursor:pointer; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-nav button:hover:not(:disabled) { border-color:var(--line-2); background:var(--bg-hover); color:var(--ink-1); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-nav button:disabled { color:var(--ink-4); cursor:default; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-meta { display:flex; align-items:center; gap:8px; margin-top:1px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-origin { display:block; color:var(--ink-4); font-size:10.5px; line-height:1.5; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-severity { font-size:10.5px; line-height:1.5; margin-left:8px; padding:0 5px; border:1px solid currentColor; border-radius:0; font-weight:400; vertical-align:1px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-severity[data-severity="error"] { color:var(--diff-del-ink); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-severity[data-severity="warn"] { color:var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-severity[data-severity="info"] { color:var(--ink-4); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-reason { padding:10px 0 11px; border-bottom:1px solid var(--line-1); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-reason>span,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-suggestion>label { color:var(--mark); font-size:12px; font-weight:600; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-reason p { margin:5px 0 0; color:var(--ink-1); font-size:13.5px; line-height:1.7; white-space:pre-wrap; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-suggestion { display:grid; gap:6px; padding-top:10px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-suggestion textarea { box-sizing:border-box; width:100%; height:68px; min-height:68px; max-height:68px; overflow-y:auto; resize:none; padding:8px 10px; border:1px solid var(--line-2); border-radius:0; outline:none; background:var(--bg-canvas); color:var(--ink-1); font:13px/1.6 var(--font-zh-serif); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-suggestion textarea:focus { border-color:var(--mark); box-shadow:inset 0 0 0 1px var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-hover-card footer { flex:none; display:flex; justify-content:flex-end; gap:8px; margin-top:13px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-hover-card footer button { appearance:none; min-width:76px; padding:6px 14px; border-radius:0; cursor:pointer; font:600 12.5px/1.4 var(--font-zh-serif); transition:background 120ms ease,border-color 120ms ease,color 120ms ease; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-hover-card button:focus-visible { outline:2px solid var(--mark); outline-offset:2px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-accept-actions { display:flex; align-items:center; gap:8px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-accept { border:1px solid var(--ink-1); background:var(--ink-1); color:var(--bg-canvas); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-accept:hover:not(:disabled) { border-color:var(--mark); background:var(--mark); color:var(--ink-surface); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-accept:disabled { border-color:var(--line-2); background:var(--bg-subtle); color:var(--ink-4); cursor:not-allowed; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-ignore { border:1px solid var(--line-2); background:transparent; color:var(--ink-2); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-ignore:hover { border-color:var(--line-3); background:var(--bg-hover); color:var(--ink-1); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ahc-ignore-actions { display:flex; align-items:center; justify-content:flex-end; margin-right:auto; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-anchor-active { text-decoration-line:underline; text-decoration-style:wavy; text-decoration-color:var(--mark); text-decoration-thickness:1.5px; text-underline-offset:3px; background:color-mix(in srgb,var(--mark) 9%,transparent); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-anchor-active[data-annotation-severity="error"] { text-decoration-color:var(--diff-del-ink); background:color-mix(in srgb,var(--diff-del-bg) 55%,transparent); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-anchor-active[data-annotation-severity="warn"] { text-decoration-color:var(--mark); background:color-mix(in srgb,var(--mark) 9%,transparent); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-anchor-active[data-annotation-severity="info"] { text-decoration-color:var(--ink-4); text-decoration-thickness:1px; background:var(--bg-subtle); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-anchor-active[data-annotation-overlap="true"] { background:color-mix(in srgb,var(--mark) 16%,transparent); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .annotation-anchor-accepted { text-decoration-line:underline; text-decoration-style:wavy; text-decoration-color:var(--ink-4); text-decoration-thickness:1px; text-underline-offset:3px; background:transparent; }

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:2096-2694 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-open:hover .ws-lexicon-chevron { color: var(--mark); transform: translateX(2px); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-instruction {
  display: grid;
  gap: 7px;
  color: var(--ink-2);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-instruction select {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  outline: 0;
  background: var(--bg-paper-deep);
  color: var(--ink-1);
  font: inherit;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-instruction select:focus { border-color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-instruction textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  outline: 0;
  background: var(--bg-paper-deep);
  color: var(--ink-1);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-instruction textarea:focus { border-color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-instruction > small { color: var(--ink-3); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-template.is-selected { background: var(--mark-soft); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-template .ws-lexicon-open { grid-template-columns: minmax(0, 1fr) auto; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-supplement textarea { min-height: 76px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-supplement span small { color: var(--ink-3); font: inherit; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-detail { display: grid; gap: 16px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-source { margin: 0; color: var(--ink-3); font-size: 12px; line-height: 1.6; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-detail .ws-lexicon-instruction input {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  outline: 0;
  background: var(--bg-paper-deep);
  color: var(--ink-1);
  font: inherit;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-detail .ws-lexicon-instruction input:focus { border-color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-deai-detail .ws-lexicon-instruction textarea { min-height: 260px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-modal {
  display: flex;
  flex-direction: column;
  width: min(780px, 94vw);
  max-height: min(680px, 88vh);
  padding: 0;
  overflow: hidden;
  font-family: var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-head {
  position: relative;
  display: flex;
  flex: none;
  align-items: baseline;
  gap: 10px;
  min-height: 54px;
  padding: 17px 52px 0 22px;
  border-bottom: 1px solid var(--line-2);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-head h2 {
  display: flex;
  align-items: center;
  flex: none;
  gap: 7px;
  margin: 0;
  color: var(--ink-1);
  font: 700 15px/1.3 var(--font-zh-serif);
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-back,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-close,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-back { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 13px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-subtitle {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-3);
  font: 11.5px/1.5 var(--font-zh-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-close {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  top: 13px;
  right: 16px;
  width: 28px;
  height: 28px;
  font-size: 21px;
  line-height: 26px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-back:hover:not(:disabled),
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-close:hover:not(:disabled),
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-link:hover:not(:disabled) { color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-back:disabled,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-close:disabled { color: var(--ink-4); cursor: default; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-body {
  display: grid;
  min-height: 0;
  gap: 11px;
  padding: 14px 22px 16px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-content,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-form,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-editor { display: grid; min-width: 0; gap: 11px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-starters {
  display: flex;
  min-width: 0;
  flex: 1 1 240px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-right: auto;
  gap: 4px 10px;
  color: var(--ink-3);
  font-size: 12px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-starters button {
  padding: 0;
  border: 0;
  border-bottom: 1px dotted var(--mark);
  border-radius: 0;
  background: transparent;
  color: var(--mark);
  cursor: pointer;
  font: inherit;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-starters button:hover {
  border-bottom-color: var(--ink-1);
  color: var(--ink-1);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-starters button:disabled {
  border-bottom-color: var(--ink-4);
  color: var(--ink-4);
  cursor: default;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-group { display: grid; min-width: 0; gap: 8px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-group-head { display: flex; align-items: baseline; gap: 12px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-modal .ws-launch-template-group-title {
  margin: 0;
  color: var(--ink-2);
  font: 600 12.5px/1.4 var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  min-width: 0;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-grid.is-portrait {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card {
  position: relative;
  min-width: 0;
  min-height: 56px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--ink-1);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card:hover { background: var(--bg-hover); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card.is-selected {
  border-color: var(--mark);
  background: var(--mark-soft);
  box-shadow: inset 3px 0 var(--mark);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card.is-portrait {
  width: auto;
  min-height: 148px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-select {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  gap: 3px;
  padding: 8px 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card.is-portrait .ws-launch-template-select {
  display: flex;
  min-height: 146px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 13px 8px 10px;
  text-align: center;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-role-avatar {
  display: grid;
  width: 54px;
  height: 58px;
  margin: 0 auto 7px;
  place-items: center;
  color: currentColor;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-role-avatar svg { width: 54px; height: 54px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card.is-portrait .ws-launch-template-name {
  display: block;
  width: 100%;
  text-align: center;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card.is-portrait .ws-launch-template-name strong {
  display: block;
  width: 100%;
  text-align: center;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-role-position {
  overflow: hidden;
  width: 100%;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-role-recommended {
  position: absolute;
  top: 5px;
  left: 6px;
  color: var(--mark);
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: 0.08em;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-name strong {
  overflow: hidden;
  color: var(--ink-1);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-summary {
  overflow: hidden;
  color: var(--ink-3);
  padding-right: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-edit {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-4);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-edit svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card:hover .ws-launch-template-edit { opacity: 1; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-edit:hover:not(:disabled) { color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-select:focus-visible,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-edit:focus-visible,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-new:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-new {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font: 11.5px/1.4 var(--font-zh-serif);
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-group:hover .ws-launch-template-new,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-new:focus-visible { opacity: 1; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-new:hover:not(:disabled) { color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-select:disabled,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-edit:disabled { cursor: default; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-card:hover .ws-launch-template-edit:disabled { opacity: 0.5; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-new:disabled { cursor: default; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-translate-language-group { display: grid; gap: 8px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-translate-language-group h3 { margin: 0; color: var(--ink-2); font-size: 13px; font-weight: 600; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-translate-language-chips { display: flex; flex-wrap: wrap; gap: 7px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-translate-language-chips button { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 0; background: transparent; color: var(--ink-3); font: 12.5px var(--font-zh-serif); cursor: pointer; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-translate-language-chips button.is-selected { border-color: var(--mark); background: rgba(200, 169, 106, 0.13); color: var(--ink-1); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-translate-language-chips button:disabled:not(.is-selected) { opacity: 0.35; cursor: default; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-1);
  color: var(--ink-2);
  font-size: 12.5px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mark);
  font: 600 12px/1.6 var(--font-zh-serif);
  white-space: nowrap;
  cursor: pointer;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-source-blocked { background: var(--bg-subtle); color: var(--ink-3); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font: 600 12.5px/1.4 var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field input,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  outline: 0;
  background: var(--bg-canvas);
  color: var(--ink-1);
  font: 400 12.5px/1.6 var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field textarea { min-height: 150px; resize: vertical; }
/* 字段标题行:左标题 + 右侧字段级动作(AI 起草贴在提示词框右上角) */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-ai-draft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-bottom: 1px dotted var(--mark);
  border-radius: 0;
  background: transparent;
  color: var(--mark);
  cursor: pointer;
  font: 600 12px/1.6 var(--font-zh-serif);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-ai-draft:hover:not(:disabled) {
  border-bottom-color: var(--ink-1);
  color: var(--ink-1);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-ai-draft:disabled {
  border-bottom-color: var(--ink-4);
  color: var(--ink-4);
  cursor: default;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field input:focus,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field textarea:focus { border-color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field input::placeholder,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-field textarea::placeholder { color: var(--ink-4); font-weight: 400; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-supplement textarea { min-height: 58px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-actions {
  position: sticky;
  bottom: -16px;
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 -22px -16px;
  padding: 10px 22px 16px;
  border-top: 1px solid var(--line-2);
  background: var(--bg-paper-deep);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-actions .wf-btn { padding: 7px 16px; font-size: 12.5px; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-actions .wf-btn.primary { border-color: var(--mark); background: var(--mark); color: var(--bg-canvas); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-actions .wf-btn.primary:hover:not(:disabled) { border-color: var(--ink-1); background: var(--ink-1); color: var(--bg-canvas); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-actions .wf-btn[data-danger="true"] { margin-right: auto; color: var(--ws-red); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-modal .ws-launch-error,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-modal .ws-launch-status { margin: 0; color: var(--ink-3); line-height: 1.6; }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-modal .ws-launch-error { color: var(--ws-red); }
@media (max-width: 560px) {
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-head { padding-left: 16px; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-body { padding-right: 16px; padding-left: 16px; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-actions { margin-right: -16px; margin-left: -16px; padding-right: 16px; padding-left: 16px; }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-launch-template-grid.is-portrait { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-entry-list {
  min-height: 240px;
  max-height: min(480px, 58vh);
  overflow-y: auto;
  border-top: 1px solid var(--line-1);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 18px;
  min-height: 44px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line-1);
  transition: background-color 120ms ease;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-entry:hover { background: var(--bg-subtle); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-word {
  overflow: hidden;
  color: var(--ink-1);
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-replacement,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-mark-only {
  justify-self: end;
  font-size: 13px;
  white-space: nowrap;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-replacement { display: inline-flex; align-items: center; gap: 3px; color: var(--mark); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-lexicon-mark-only { color: var(--ink-3); }
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 30;
  min-width: 156px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius:0;
  border: 1px solid rgba(200, 169, 106, 0.34);
  background: rgba(16, 21, 26, 0.62);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  transform-origin: top right;
  animation: ws-export-pop 0.18s cubic-bezier(0.34, 1.28, 0.5, 1) both;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) [data-wf="ReviewMenu"] {
  /* 菜单在暖纸 token 作用域内却使用深墨底；局部换回暗底可辨的 line-2 色阶。 */
  --line-2: rgba(184, 169, 140, 0.28);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) [data-wf="ReviewMenu"] .ws-export-separator {
  background: var(--line-2);
}
@keyframes ws-export-pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  border-radius:0;
  background: transparent;
  color: rgba(236, 227, 208, 0.84);
  font-size: 13px;
  font-family: var(--font-zh-serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 0.14s,
    color 0.14s;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-item:hover:not(:disabled) {
  background: rgba(200, 169, 106, 0.1);
  color: #ecdcb4;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity):not(.ws-doc-scrolled) .ws-export-menu .ws-export-item.is-danger {
  color: var(--ws-red-lite);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-item:disabled {
  opacity: 0.45;
  cursor: default;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(236, 227, 208, 0.22);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ws-export-spin 0.85s linear infinite;
}
@keyframes ws-export-spin {
  to {
    transform: rotate(360deg);
  }
}
/* 平台项(走技能·发 query):朱砂点,和确定性导出区分 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-item--platform {
  color: #c8a96a;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-item--platform:hover:not(:disabled) {
  background: rgba(200, 169, 106, 0.14);
  color: #dcc086;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-sep {
  height: 1px;
  margin: 4px 8px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(200, 169, 106, 0.28),
    transparent
  );
}
/* 正文上滚后:顶栏按钮已翻奶白纸面,菜单同步翻成宣纸描墨,避免悬在奶白纸上发暗突兀 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-doc-scrolled .ws-export-menu {
  border-color: rgba(120, 90, 50, 0.3);
  background: rgba(243, 236, 221, 0.94);
  box-shadow: 0 16px 40px rgba(60, 44, 22, 0.22);
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-doc-scrolled .ws-export-item {
  color: #5b4a2e;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-doc-scrolled .ws-export-item:hover:not(:disabled) {
  background: var(--bg-hover);
  color: #3f3320;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-doc-scrolled .ws-export-item--platform {
  color: #9e2b25;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-doc-scrolled .ws-export-item--platform:hover:not(:disabled) {
  background: rgba(158, 43, 37, 0.1);
  color: #7d211c;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity).ws-doc-scrolled .ws-export-sep {
  background: linear-gradient(90deg, transparent, rgba(120, 90, 50, 0.3), transparent);
}
@media (prefers-reduced-motion: reduce) {
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-export-menu {
    animation: none;
  }
}

/* source: apps/web/src/pages/workspace/workspace-ink-skin.css:3215-3530 */
/* 审阅态 diff 当前定位只保留 workspace.css 的绿色加深;不再加赭金描边 / 外发光。 */

/* —— 文末落款:正文末尾续奶白纸,竖排两列「作于{干支年月初几} | 成文{中文数字}字+印章」——
   position + z-index:1 保持纸内兄弟层级连续,正文+落款连成一张纸。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon {
  --ws-colophon-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  margin: 0;
  box-sizing: border-box;
  padding: 48px 64px 90px;
  background: var(--bg-paper-deep);
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-start;
  /* 两列间距收小(左列「作于…」随之右移、更靠右列),字号 +2(18→20)。 */
  gap: 5px;
  /* 文末落款用书法艺术字型(子集 yanshi-colophon-subset 本就为落款字造),回落宋体 */
  font-family: "QingYanShiSubset", var(--font-zh-serif);
  font-size: 20px;
  user-select: none;
}
/* 两列竖排:右列「成文X字」、左列「作于干支年月初几」——同字号同字色(用户要求一致)。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-count,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-date {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-family: "QingYanShiSubset", var(--font-zh-serif);
  font-size: 1em;
  font-weight: 400;
  color: #2c2419;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  animation: wsColophonTextIn 520ms var(--ws-colophon-ease) forwards;
  will-change: transform, opacity;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-glyph {
  display: grid;
  place-items: center;
  width: 1.18em;
  height: 1.28em;
  line-height: 1;
  text-align: center;
  transform: translateX(var(--ws-colophon-glyph-x, 0));
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-count {
  animation-delay: 40ms;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-date {
  animation-delay: 120ms;
}
/* 右列:字数(竖排)+ 印章接其下面;列宽≈一列竖排字宽。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-countcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 1.6em;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-seal {
  width: 1.18em;
  height: auto;
  object-fit: contain;
  opacity: 0;
  flex-shrink: 0;
  transform-origin: 50% 42%;
  filter: blur(2px);
  animation: wsColophonSealStamp 720ms var(--ws-colophon-ease) 420ms both;
  will-change: transform, opacity, filter;
}
@keyframes wsColophonTextIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes wsColophonSealStamp {
  0% {
    opacity: 0;
    filter: blur(2px);
    transform: translate3d(0, -42px, 0) scale(1.58) rotate(-6deg);
  }
  48% {
    opacity: 0.88;
    filter: blur(0.8px);
    transform: translate3d(0, -8px, 0) scale(1.22) rotate(-2deg);
  }
  68% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 1px, 0) scale(0.92) rotate(1.5deg);
  }
  84% {
    opacity: 0.96;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1.03) rotate(-0.6deg);
  }
  100% {
    opacity: 0.95;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-count,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-date,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-seal {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
    will-change: auto;
  }
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon-seal {
    opacity: 0.95;
  }
}

/* 落款占位态(问题B):审阅/编辑过渡态的静态路径渲染 .ws-colophon.is-placeholder ——
   奶白纸 + 完整 padding 照常占位、把那块约一屏的空间提前留好;但署名文字 / 印章
   不显现(opacity:0、不跑入场动画),保留布局高度。提交结清 → 翻回可编辑路径,
   那条渲染非占位真落款,文字 + 印章按既有 wsColophonTextIn / wsColophonSealStamp
   入场动画"淡入显现"。于是空间一直在、只是内容显隐 → 消除提交后凭空蹦一块的跳动。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon.is-placeholder .ws-colophon-count,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon.is-placeholder .ws-colophon-date,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-colophon.is-placeholder .ws-colophon-seal {
  opacity: 0;
  animation: none;
  transform: none;
  filter: none;
  will-change: auto;
}

/* ============================================================================
   落款层级根因修复:.wf-doc.ProseMirror 在 workspace.css 里被
   `.native-presentation-shell .wf-doc.ProseMirror{position:relative;z-index:1}`
   无条件赋了 z-index:1(本意是放映态让纸盖在 vignette 之上)。z-index:1 让纸
   形成层叠上下文,把纸内的高亮/callout 调色浮层(.pm-callout-theme-pop /
   .pm-callout-emoji-pop,z-index:20)整体困死在纸的上下文里;而文末落款
   .ws-colophon 是纸的兄弟、同样 z-index:1,DOM 在后 → 落款整体盖在纸(连同纸内
   浮层)之上,浮层只要向下溢出到落款带就被切断。
   非放映态根本没有 vignette,这个 z-index:1 纯属多余的"陷阱"。这里仅在
   非 active(无 vignette)时把纸的 z-index 还原为 auto:纸不再成层叠上下文,
   浮层 z-index:20 直接压过落款 z-index:1;落款(定位+z-index:1)继续维持纸内层级,
   放映态(.native-presentation-active)
   维持原 z-index:1,vignette 叠放不受影响。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity)
  .native-presentation-shell:not(.native-presentation-active)
  .wf-doc.ProseMirror {
  z-index: auto;
}

/* ============================================================================
   生成/编辑期间的文档区编辑锁(问题1)
   信号:复用现有 body[data-tool="agentBusy"|"imageProgress"] 与
         body[data-patch-revealing="1"](青简正在改文档时由 WorkspacePage 落到 body)。
   能滚不能点:遮罩层 .ws-edit-lock 自身 pointer-events:none,滚轮/触控板事件穿透
   给 .ws-right 滚动容器(故"能滚");屏蔽点击/编辑则交给"忙时给 .wf-doc 加
   pointer-events:none"——纸面所有点击/调色浮层/块手柄全部不可点(故"不能点"),
   而滚动作用在 .ws-right 上、不受子级 pointer-events 影响。 */
/* 遮罩/提示锚:portal 到 body 顶层,与 qa-toast 同一 fixed 层级。它不再属于
   .ws-right 滚动流,因此不会被右侧滚动、sticky 或 transform/backdrop-filter 祖先带走。 */
[data-qingagent-doc-panel] > .ws-edit-lock {
  position: fixed;
  /* 水平居中于文档纸(--doc-left/--doc-right 由 WorkspacePage 写=纸的真实左右边),而非视口右下角。
     用户口径:"贴右侧底部"指右侧编辑面板的底部居中,不是右对齐。默认回退到视口中心。 */
  left: calc((var(--doc-left, 0px) + var(--doc-right, 100vw)) / 2);
  transform: translateX(-50%);
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 9999;
  height: auto;
  pointer-events: none; /* 关键:遮罩不吃事件,滚轮穿透到 .ws-right */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}
[data-qingagent-doc-panel][data-tool="agentBusy"] > .ws-edit-lock,
[data-qingagent-doc-panel][data-tool="imageProgress"] > .ws-edit-lock,
[data-qingagent-doc-panel][data-patch-revealing="1"] > .ws-edit-lock {
  opacity: 1;
}
/* 忙时屏蔽纸面所有点击/编辑(浮层、块手柄、调色钮),但 .ws-right 滚动不受影响 */
:is([data-qingagent-doc-panel][data-tool="agentBusy"], #qingagent-doc-panel-specificity) .ws-right .wf-doc,
:is([data-qingagent-doc-panel][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .ws-right .wf-doc,
:is([data-qingagent-doc-panel][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .ws-right .wf-doc {
  pointer-events: none;
}

/* hover 提示:不 hover 不显示;fixed 父层贴右下,提示自身只管样式与显隐过渡。 */
[data-qingagent-doc-panel] > .ws-edit-lock .ws-edit-lock-hint {
  position: relative;
  pointer-events: none;
  width: fit-content;
  min-height: 38px;
  box-sizing: border-box;
  max-width: min(520px, calc(100vw - 48px));
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(38, 32, 22, 0.9);
  color: #f3ead6;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow:
    0 10px 30px rgba(20, 14, 6, 0.4),
    inset 0 0 0 1px rgba(200, 175, 130, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
/* 仅在文档区(.ws-right) hover 且处于忙态时浮现提示。portal 在 body 下,
   这里用 :has 连接右侧 hover 状态与顶层 fixed 提示。 */
[data-qingagent-doc-panel][data-tool="agentBusy"]:has(:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right:hover)
  > .ws-edit-lock
  .ws-edit-lock-hint,
[data-qingagent-doc-panel][data-tool="imageProgress"]:has(:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right:hover)
  > .ws-edit-lock
  .ws-edit-lock-hint,
[data-qingagent-doc-panel][data-patch-revealing="1"]:has(:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right:hover)
  > .ws-edit-lock
  .ws-edit-lock-hint {
  opacity: 1;
  transform: translateY(0);
}
[data-qingagent-doc-panel] > .ws-edit-lock .ws-edit-lock-hint-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8b86a;
  box-shadow: 0 0 0 0 rgba(216, 184, 106, 0.6);
  animation: ws-edit-lock-dot 1.6s ease-in-out infinite;
}
@keyframes ws-edit-lock-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(216, 184, 106, 0.55);
  }
  60% {
    box-shadow: 0 0 0 6px rgba(216, 184, 106, 0);
  }
}

/* 编辑纸面环境发光:表示"正在编辑中"。发光层挂在 .ws-paper-surface 内,
   随右侧滚动内容一起滚动,覆盖整张纸;patch-nav / body 级 .ws-edit-lock
   保持独立浮层,不参与发光层布局裁剪。低端/reduced-motion 守卫见下方。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right .wf-doc {
  position: relative;
}
:is([data-qingagent-doc-panel][data-tool="agentBusy"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
:is([data-qingagent-doc-panel][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
:is([data-qingagent-doc-panel][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow {
  opacity: 1;
  animation: ws-paper-breathe 3.6s ease-in-out infinite;
}
/* 内发光呼吸:更明显 + 在风格内缓慢"流转"色相(金→琥珀→青→赭→金),
   类 Apple Intelligence 的活感,但只取与玄青/赭金相搭的低饱和色,色差不跳。 */
@keyframes ws-paper-breathe {
  0%,
  100% {
    box-shadow:
      inset 0 0 42px 6px rgba(181, 154, 99, 0.32),
      inset 0 0 100px 20px rgba(181, 154, 99, 0.16);
  }
  28% {
    box-shadow:
      inset 0 0 54px 11px rgba(203, 170, 108, 0.44),
      inset 0 0 118px 26px rgba(203, 170, 108, 0.2);
  }
  55% {
    box-shadow:
      inset 0 0 54px 11px rgba(120, 156, 142, 0.4),
      inset 0 0 118px 26px rgba(120, 156, 142, 0.18);
  }
  80% {
    box-shadow:
      inset 0 0 48px 9px rgba(178, 128, 104, 0.4),
      inset 0 0 110px 22px rgba(178, 128, 104, 0.17);
  }
}

/* 低端 / 减少动态:关掉呼吸与提示点动画,保留遮罩"能滚不能点"的纯功能态 */
:is([data-qingagent-doc-panel][data-perf="low"][data-tool="agentBusy"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
:is([data-qingagent-doc-panel][data-perf="low"][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
:is([data-qingagent-doc-panel][data-perf="low"][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
[data-qingagent-doc-panel][data-perf="low"] > .ws-edit-lock .ws-edit-lock-hint-dot {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  :is([data-qingagent-doc-panel][data-tool="agentBusy"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
:is([data-qingagent-doc-panel][data-tool="imageProgress"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
:is([data-qingagent-doc-panel][data-patch-revealing="1"], #qingagent-doc-panel-specificity) .ws-paper-surface > .ws-editor-glow,
[data-qingagent-doc-panel] > .ws-edit-lock .ws-edit-lock-hint-dot {
    animation: none;
  }
  [data-qingagent-doc-panel] > .ws-edit-lock .ws-edit-lock-hint {
    transition: opacity 0.22s ease;
    transform: translateY(0);
  }
}

/* source: apps/web/src/pages/workspace/workspace-responsive.css:1-30 */
/*
 * 窄桌面工作区降级。
 *
 * 完整桌面继续使用 400 / 800 双定宽列；产品从 768px 起进入桌面界面，
 * Electron 主窗口又允许缩到 960px，因此 1024px 不能依赖横向滚动才能找到核心操作。
 * 这里仅压缩框架留白与左栏，把剩余宽度全部交给纸列；1280px 起保持既有几何不变。
 */
@media (min-width: 768px) and (max-width: 1279px) {
  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) {
    --ws-paper-body-padding-inline: 24px;
    --ws-paper-chat-column-width: 320px;
    --ws-paper-column-gap: 24px;
    --ws-paper-column-width: min(
      800px,
      calc(
        100vw
        - var(--ws-paper-body-padding-inline)
        - var(--ws-paper-body-padding-inline)
        - var(--ws-paper-chat-column-width)
        - var(--ws-paper-column-gap)
      )
    );
  }

  :is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-shell {
    padding-right: 48px !important;
    padding-left: 48px !important;
  }
}
/* source: packages/ui-kit/src/tokens.css:4-48 (component portals) */
[data-drawio-editor-host="true"],
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer, .graph-diagram-pan-tip) {
  /* 中性色板:暖墨纸系(原 slate-blue 冷色 base 已废弃,全站统一暖化)。
   * 暖值与 workspace-ink-skin 的逐容器暖化保持一致(墨 #2f2a22 / 金棕 mark #a8823f)。 */
  --bg-window: #e7ddc9;
  --bg-canvas: #faf6ec;
  --bg-paper-deep: #efe7d6;
  --bg-subtle: rgba(120, 90, 50, 0.07);
  --bg-panel: rgba(120, 90, 50, 0.05);
  --bg-hover: rgba(120, 90, 50, 0.1);
  --line-1: rgba(120, 90, 50, 0.16);
  --line-2: rgba(120, 90, 50, 0.28);
  --line-3: rgba(120, 90, 50, 0.42);
  --line-ink: #2f2a22;
  --ink-1: #2f2a22;
  --ink-2: #5c5346;
  --ink-3: #8a7f6e;
  --ink-4: #b3a791;
  --ink-cool: #8a7f6e;
  --ink-on-dark: #ece3d0;
  --mark: #a8823f;
  --mark-soft: rgba(168, 130, 63, 0.14);
  --diff-ins-bg: #e6ecd7;
  --diff-ins-ink: #3a4e1d;
  --diff-ins-bd: #c2cfa4;
  --diff-del-bg: #f1dfd7;
  --diff-del-ink: #6b2d1a;
  --diff-del-bd: #d7b6a4;
  --sel-bg: #f1e4a8;
  --ink-surface: #1a1410;
  --ink-surface-2: #221c15;
  --shadow-1: 0 1px 2px rgba(50, 38, 18, 0.06);
  --shadow-2: 0 6px 20px rgba(50, 38, 18, 0.1), 0 1px 3px rgba(50, 38, 18, 0.06);
  --shadow-3: 0 24px 60px rgba(50, 38, 18, 0.2), 0 4px 12px rgba(50, 38, 18, 0.08);
  --font-display: "EB Garamond", "Newsreader", "Source Serif Pro", "Charter", Georgia, serif;
  --font-sans: "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --font-zh-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun",
    "宋体", serif;
  --r-sm: 0;
  --r: 0;
  --r-lg: 0;
  --r-pill: 999px;
  --z-popover: 10020;
}
/* source: apps/web/src/pages/workspace/components/MediaBlockToolbar.css:1-64 */
[data-qingagent-doc-panel] .pm-image-toolbar,
[data-drawio-editor-host="true"] .pm-image-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(55, 45, 32, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 22px rgba(55, 45, 32, 0.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

[data-qingagent-doc-panel] .pm-image-chrome,
[data-drawio-editor-host="true"] .pm-image-chrome,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-chrome {
  user-select: none;
  -webkit-user-select: none;
}

[data-qingagent-doc-panel] .pm-image-tool,
[data-drawio-editor-host="true"] .pm-image-tool,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-tool {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink-2, #4a4034);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

[data-qingagent-doc-panel] .pm-image-tool:hover,
[data-drawio-editor-host="true"] .pm-image-tool:hover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-tool:hover {
  background: var(--bg-hover);
}

[data-qingagent-doc-panel] .pm-image-tool.is-active,
[data-drawio-editor-host="true"] .pm-image-tool.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-tool.is-active {
  border-color: rgba(168, 130, 63, 0.38);
  background: var(--mark-soft);
  color: var(--mark, #8f6d30);
}

[data-qingagent-doc-panel] .pm-image-tool--wide,
[data-drawio-editor-host="true"] .pm-image-tool--wide,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-tool--wide {
  min-width: 58px;
}

[data-qingagent-doc-panel] .pm-image-tool--icon,
[data-drawio-editor-host="true"] .pm-image-tool--icon,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-tool--icon {
  display: inline-grid;
  width: 26px;
  min-width: 26px;
  padding: 0;
  place-items: center;
}

[data-qingagent-doc-panel] .pm-image-tool-icon,
[data-drawio-editor-host="true"] .pm-image-tool-icon,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-tool-icon {
  display: block;
  width: 15px;
  height: 15px;
  color: currentColor;
}

/* source: apps/web/src/pages/workspace/components/ImageView.css:1-128 */
[data-qingagent-doc-panel] .pm-image,
[data-drawio-editor-host="true"] .pm-image,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image,
[data-qingagent-doc-panel] .pm-image-readonly,
[data-drawio-editor-host="true"] .pm-image-readonly,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-readonly {
  position: relative;
}

[data-qingagent-doc-panel] .pm-image.is-selected .pm-image-frame,
[data-drawio-editor-host="true"] .pm-image.is-selected .pm-image-frame,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image.is-selected .pm-image-frame {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
}

[data-qingagent-doc-panel] .pm-image-frame,
[data-drawio-editor-host="true"] .pm-image-frame,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-frame {
  position: relative;
}

[data-qingagent-doc-panel] .pm-image-media,
[data-drawio-editor-host="true"] .pm-image-media,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-media {
  position: relative;
  max-width: 100%;
  line-height: 0;
}

:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc .pm-image-media img,
[data-drawio-editor-host="true"] #view-workspace .wf-doc .pm-image-media img,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) #view-workspace .wf-doc .pm-image-media img,
[data-qingagent-doc-panel] .pm-image-media img,
[data-drawio-editor-host="true"] .pm-image-media img,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-media img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: var(--r-sm, 6px);
}

[data-qingagent-doc-panel] .pm-image-caption,
[data-drawio-editor-host="true"] .pm-image-caption,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-caption {
  margin-top: 6px;
  color: var(--ink-3, #777);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

[data-qingagent-doc-panel] .pm-image:hover .pm-image-toolbar,
[data-drawio-editor-host="true"] .pm-image:hover .pm-image-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image:hover .pm-image-toolbar,
[data-qingagent-doc-panel] .pm-image.is-selected .pm-image-toolbar,
[data-drawio-editor-host="true"] .pm-image.is-selected .pm-image-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image.is-selected .pm-image-toolbar {
  opacity: 1;
  pointer-events: auto;
}

[data-qingagent-doc-panel] .pm-image-resize-handle,
[data-drawio-editor-host="true"] .pm-image-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  z-index: 2;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--mark);
  box-shadow: 0 2px 8px rgba(55, 45, 32, 0.28);
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity 0.15s ease;
}

[data-qingagent-doc-panel] .pm-image:hover .pm-image-resize-handle,
[data-drawio-editor-host="true"] .pm-image:hover .pm-image-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image:hover .pm-image-resize-handle,
[data-qingagent-doc-panel] .pm-image.is-selected .pm-image-resize-handle,
[data-drawio-editor-host="true"] .pm-image.is-selected .pm-image-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image.is-selected .pm-image-resize-handle {
  opacity: 1;
}

[data-qingagent-doc-panel] .pm-image-fullscreen-btn,
[data-drawio-editor-host="true"] .pm-image-fullscreen-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-fullscreen-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(55, 45, 32, 0.14);
  border-radius:0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-2, #4a4034);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

[data-qingagent-doc-panel] .pm-image-readonly:hover .pm-image-fullscreen-btn,
[data-drawio-editor-host="true"] .pm-image-readonly:hover .pm-image-fullscreen-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-readonly:hover .pm-image-fullscreen-btn {
  opacity: 1;
}

[data-qingagent-doc-panel] .pm-image-upload-overlay,
[data-drawio-editor-host="true"] .pm-image-upload-overlay,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-upload-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm, 6px);
  background: rgba(246, 241, 231, 0.78);
  color: var(--ink-2, #4a4034);
  font-size: 12px;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

[data-qingagent-doc-panel] .pm-image-upload-overlay.is-error,
[data-drawio-editor-host="true"] .pm-image-upload-overlay.is-error,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-upload-overlay.is-error {
  background: rgba(253, 232, 226, 0.82);
  color: #9f3d2e;
}

[data-qingagent-doc-panel] .pm-image-upload-spinner,
[data-drawio-editor-host="true"] .pm-image-upload-spinner,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-upload-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(74, 64, 52, 0.22);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: pm-image-upload-spin 0.9s linear infinite;
}

[data-qingagent-doc-panel] .pm-image-upload-overlay.is-error .pm-image-upload-spinner,
[data-drawio-editor-host="true"] .pm-image-upload-overlay.is-error .pm-image-upload-spinner,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-image-upload-overlay.is-error .pm-image-upload-spinner {
  display: none;
}

@keyframes pm-image-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

/* source: apps/web/src/pages/workspace/components/MediaZoomFullscreen.css:1-130 */
[data-qingagent-doc-panel] .media-zoom-fullscreen,
[data-drawio-editor-host="true"] .media-zoom-fullscreen,
body:has([data-qingagent-doc-panel]) > .media-zoom-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(20, 18, 16, 0.76);
  backdrop-filter: blur(2px);
}

[data-qingagent-doc-panel] .media-zoom-toolbar,
[data-drawio-editor-host="true"] .media-zoom-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-toolbar {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
}

[data-qingagent-doc-panel] .media-zoom-btn,
[data-drawio-editor-host="true"] .media-zoom-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius:0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

[data-qingagent-doc-panel] .media-zoom-btn:hover,
[data-drawio-editor-host="true"] .media-zoom-btn:hover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}
[data-qingagent-doc-panel] .media-zoom-btn:focus-visible,
[data-drawio-editor-host="true"] .media-zoom-btn:focus-visible,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-btn:focus-visible { outline: 1px solid var(--mark); outline-offset: 2px; }
[data-qingagent-doc-panel] .media-zoom-btn--close,
[data-drawio-editor-host="true"] .media-zoom-btn--close,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-btn--close { display:flex;align-items:center;justify-content:center;width:34px;padding:0; }
[data-qingagent-doc-panel] .media-zoom-btn--close svg,
[data-drawio-editor-host="true"] .media-zoom-btn--close svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-btn--close svg { width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round; }

[data-qingagent-doc-panel] .media-zoom-btn--text,
[data-drawio-editor-host="true"] .media-zoom-btn--text,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-btn--text {
  min-width: 48px;
  font-size: 13px;
}

[data-qingagent-doc-panel] .media-zoom-viewport,
[data-drawio-editor-host="true"] .media-zoom-viewport,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: default;
  touch-action: none;
}

[data-qingagent-doc-panel] .media-zoom-viewport.is-panning,
[data-drawio-editor-host="true"] .media-zoom-viewport.is-panning,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-viewport.is-panning,
[data-qingagent-doc-panel] .media-zoom-viewport.is-panning .media-zoom-content,
[data-drawio-editor-host="true"] .media-zoom-viewport.is-panning .media-zoom-content,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-viewport.is-panning .media-zoom-content {
  cursor: grabbing;
}

[data-qingagent-doc-panel] .media-zoom-content,
[data-drawio-editor-host="true"] .media-zoom-content,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  width: min(90vw, 1100px);
  max-width: 96vw;
  padding: 24px;
  border-radius:0;
  /* 全屏预览所见即所得:用文档纸米黄 #efe7d6 作底,等于图嵌进正文后的真实观感 */
  background: var(--bg-paper-deep);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  cursor: grab;
  /* 不在这里常驻 will-change:transform —— 那会把内容常驻合成层、把矢量 SVG 栅格化,
   * 默认(scale=1)全屏看图表就发糊(用户反馈"全屏甘特图还是有点模糊")。
   * 改为仅在拖拽平移时由组件内联挂 will-change,静止/缩放后保持矢量清晰。 */
}

[data-qingagent-doc-panel] .media-zoom-content svg,
[data-drawio-editor-host="true"] .media-zoom-content svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content svg {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

[data-qingagent-doc-panel] .media-zoom-content img,
[data-drawio-editor-host="true"] .media-zoom-content img,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 88vh;
  width: auto;
  height: auto;
  margin: 0;
  border-radius:0;
}

[data-qingagent-doc-panel] .media-zoom-content--image,
[data-drawio-editor-host="true"] .media-zoom-content--image,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--image {
  width: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* SVG 配图全屏:SVG 的 <img> 只有 viewBox 没固有宽高,width:auto 会塌成 0(全屏空白)——
   这里给【显式宽】+ 文档纸米黄底(所见即所得,等于嵌进正文的观感)。 */
[data-qingagent-doc-panel] .media-zoom-content--svg,
[data-drawio-editor-host="true"] .media-zoom-content--svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--svg {
  width: min(90vw, 1000px);
  padding: 24px;
  background: var(--bg-paper-deep);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}
[data-qingagent-doc-panel] .media-zoom-content--svg img,
[data-drawio-editor-host="true"] .media-zoom-content--svg img,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--svg img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 86vh;
  margin: 0;
  border-radius: 0;
}
[data-qingagent-doc-panel] .media-zoom-content--ask-preview,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview {
  width: min(92vw, 1280px);
  max-width: none;
  max-height: none;
  min-height: min(82vh, 820px);
  padding: clamp(28px, 4vw, 58px);
  overflow: visible;
}
[data-qingagent-doc-panel] .media-zoom-content--ask-preview .auq-preview-doc--fullscreen,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview .auq-preview-doc--fullscreen,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview .auq-preview-doc--fullscreen { min-height:70vh;font-size:15px;line-height:1.8; }
[data-qingagent-doc-panel] .media-zoom-content--ask-preview .auq-preview-fullscreen,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview .auq-preview-fullscreen,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview .auq-preview-fullscreen { display:none; }
[data-qingagent-doc-panel] .media-zoom-content--ask-preview .auq-preview-diagram,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview .auq-preview-diagram,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview .auq-preview-diagram { display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:inherit; }
[data-qingagent-doc-panel] .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-view--readonly,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-view--readonly,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-view--readonly,
[data-qingagent-doc-panel] .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-svg,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-svg,
[data-qingagent-doc-panel] .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-svg-inner,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-svg-inner,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview .auq-preview-diagram .pm-diagram-svg-inner { width:100%;min-height:min(52vh,620px);height:auto; }
[data-qingagent-doc-panel] .media-zoom-content--ask-preview .auq-preview-diagram svg,
[data-drawio-editor-host="true"] .media-zoom-content--ask-preview .auq-preview-diagram svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .media-zoom-content--ask-preview .auq-preview-diagram svg { width:100% !important;max-width:none !important;height:auto !important; }

/* source: apps/web/src/pages/workspace/components/DiagramView.css:1-379 */
/* 图表块(diagram / mermaid)样式 */
[data-qingagent-doc-panel] .pm-diagram,
[data-drawio-editor-host="true"] .pm-diagram,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram {
  margin: 14px 0;
  border-radius:0;
}
/* 整块对齐:仅当图表宽度小于栏宽(用户拖窄/设了 width)时可见效果;满栏宽时三种一致。
   把 .pm-diagram-view 在块内左/中/右摆放(margin auto)。 */
[data-qingagent-doc-panel] .pm-diagram[data-align="left"] .pm-diagram-view,
[data-drawio-editor-host="true"] .pm-diagram[data-align="left"] .pm-diagram-view,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram[data-align="left"] .pm-diagram-view {
  margin-right: auto;
  margin-left: 0;
}
[data-qingagent-doc-panel] .pm-diagram[data-align="center"] .pm-diagram-view,
[data-drawio-editor-host="true"] .pm-diagram[data-align="center"] .pm-diagram-view,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram[data-align="center"] .pm-diagram-view {
  margin-left: auto;
  margin-right: auto;
}
[data-qingagent-doc-panel] .pm-diagram[data-align="right"] .pm-diagram-view,
[data-drawio-editor-host="true"] .pm-diagram[data-align="right"] .pm-diagram-view,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram[data-align="right"] .pm-diagram-view {
  margin-left: auto;
  margin-right: 0;
}
/* 选中描边落在内画布上(而非整块):宽度被拖窄后描边仍贴合实际尺寸,不会留全栏宽的空框。
   颜色统一成图表框的棕色(rgb(176,138,62)),与画布边框/圆点句柄一致,不再用朱红。 */
[data-qingagent-doc-panel] .pm-diagram.is-selected .pm-diagram-view,
[data-drawio-editor-host="true"] .pm-diagram.is-selected .pm-diagram-view,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram.is-selected .pm-diagram-view {
  outline: 2px solid rgba(176, 138, 62, 0.95);
  outline-offset: 0;
}
[data-qingagent-doc-panel] .pm-diagram-view,
[data-drawio-editor-host="true"] .pm-diagram-view,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 内部画布铺满,不留内边框/留白(用户反馈"边框没必要")。 */
  padding: 0;
  background: transparent;
  border: none;
  border-radius:0;
  /* 内容由内层容器(.graph-diagram-canvas / .pm-diagram-svg)各自 overflow:hidden 裁剪;
     这里放开溢出,好让右下角圆点句柄能"骑"在边框线上(用户要求落在边框上)而不被裁掉。 */
  overflow: visible;
  box-sizing: border-box;
  /* 默认尺寸:占满栏宽 + 一个合理高度;内层画布 height:100% 跟随,拖高时不再被卡住留空带。
     内联 style(用户拖拽落进 attrs 的 width/height)会覆盖这两条默认值。 */
  width: 100%;
  max-width: 100%;
  height: min(56vh, 520px);
  min-height: 160px;
}
[data-qingagent-doc-panel] .pm-diagram-view--error,
[data-drawio-editor-host="true"] .pm-diagram-view--error,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view--error {
  height: auto !important;
  min-height: 0;
  align-items: flex-start;
  justify-content: flex-start;
}
/* 圆点拖拽句柄:替代原生 resize:vertical 的双斜线("两个拖拽点"),骑在图表块右下角边框线上,
   同时调宽+高;悬停/选中图表块时显现。圆心对齐边框角(right/bottom 各 -8px,圆点 16px → 居中压线),
   用户要求"落在边框上"。颜色统一成图表框棕色 rgb(176,138,62),不再朱红。 */
[data-qingagent-doc-panel] .pm-diagram-resize-handle,
[data-drawio-editor-host="true"] .pm-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-resize-handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgb(176, 138, 62);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(47, 42, 34, 0.28);
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity 0.16s ease;
  z-index: 3;
  touch-action: none;
}
[data-qingagent-doc-panel] .pm-diagram:hover .pm-diagram-resize-handle,
[data-drawio-editor-host="true"] .pm-diagram:hover .pm-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram:hover .pm-diagram-resize-handle,
[data-qingagent-doc-panel] .pm-diagram.is-selected .pm-diagram-resize-handle,
[data-drawio-editor-host="true"] .pm-diagram.is-selected .pm-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram.is-selected .pm-diagram-resize-handle,
[data-qingagent-doc-panel] .pm-diagram-view:focus-within .pm-diagram-resize-handle,
[data-drawio-editor-host="true"] .pm-diagram-view:focus-within .pm-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view:focus-within .pm-diagram-resize-handle {
  opacity: 0.9;
}
[data-qingagent-doc-panel] .pm-diagram-resize-handle:hover,
[data-drawio-editor-host="true"] .pm-diagram-resize-handle:hover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-resize-handle:hover {
  opacity: 1;
}
[data-qingagent-doc-panel] .pm-diagram-svg,
[data-drawio-editor-host="true"] .pm-diagram-svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-svg {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden; /* 放大平移时裁掉溢出,不撑破图表块 */
}
/* 就地缩放/平移的变换层(双指 pinch / ctrl+滚轮 驱动,见 MermaidPreview.tsx) */
[data-qingagent-doc-panel] .pm-diagram-svg-inner,
[data-drawio-editor-host="true"] .pm-diagram-svg-inner,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-svg-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* will-change 不在此常驻:常驻会把 SVG 栅格化致文字发糊。仅缩放态由内联 style 临时加(见 MermaidPreview)。 */
}
/* 在容器内"等比铺满且绝不溢出/变形":svg 自带 viewBox + preserveAspectRatio(默认 meet),
   给 100%×100% 盒子即按比例缩放居中适配——拖宽拖高都不会把饼图/时序图撑变形或溢出边框
   (此前 width:100%+height:auto+max-height:100% 会在限高时强行压宽 → 椭圆/溢出,用户反馈"饼图变形")。 */
[data-qingagent-doc-panel] .pm-diagram-svg svg,
[data-drawio-editor-host="true"] .pm-diagram-svg svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-svg svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
}
/* 嵌在编辑器图表块里的只读 SVG 外壳:填满外层 .pm-diagram-view(而非自带 56vh 默认高),
   否则外层放开 overflow 后内层按自身高把图顶出边框(用户反馈饼图溢出)。独立快照场景(无外层
   .pm-diagram-view)不匹配此规则,仍用默认高。 */
[data-qingagent-doc-panel] .pm-diagram-view .pm-diagram-view--readonly,
[data-drawio-editor-host="true"] .pm-diagram-view .pm-diagram-view--readonly,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view .pm-diagram-view--readonly {
  height: 100%;
  min-height: 0;
}
/* SVG 图表全屏查看(MediaZoomFullscreen 内):跟随卡片内容区,svg 等比铺满。 */
[data-qingagent-doc-panel] .pm-diagram-zoom-svg,
[data-drawio-editor-host="true"] .pm-diagram-zoom-svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-zoom-svg {
  width: 100%;
}
[data-qingagent-doc-panel] .pm-diagram-zoom-svg svg,
[data-drawio-editor-host="true"] .pm-diagram-zoom-svg svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-zoom-svg svg {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
}
[data-qingagent-doc-panel] .pm-diagram-empty,
[data-drawio-editor-host="true"] .pm-diagram-empty,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 160px;
  color: var(--ink-3, #999);
  font-size: 13px;
  padding: 20px;
}
[data-qingagent-doc-panel] .pm-diagram-error,
[data-drawio-editor-host="true"] .pm-diagram-error,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-error {
  color: var(--danger, #b42318);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  width: 100%;
  font-family: var(--font-mono);
  /* 出错时也不许撑变形:限高可滚、限宽。 */
  max-width: 100%;
  max-height: 220px;
  overflow: auto;
}
[data-qingagent-doc-panel] .pm-diagram-renderer-fallback,
[data-drawio-editor-host="true"] .pm-diagram-renderer-fallback,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-renderer-fallback {
  position: relative;
  width: 100%;
  height: 100%;
}
[data-qingagent-doc-panel] .pm-diagram-visual-notice,
[data-drawio-editor-host="true"] .pm-diagram-visual-notice,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-visual-notice {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 11;
  max-width: min(520px, calc(100% - 20px));
  padding: 7px 10px;
  border: 1px solid var(--line-2, rgba(47, 42, 34, 0.18));
  border-radius: 0;
  background: var(--bg-canvas, #fffaf0);
  color: var(--ink-2, #5c5346);
  font: 12px/1.45 var(--font-zh-serif);
  box-shadow: 0 4px 14px rgba(47, 42, 34, 0.08);
  pointer-events: none;
}
/* 全屏编辑器内部按钮；外部预览工具栏统一复用图片块的 .pm-image-tool。 */
[data-qingagent-doc-panel] .pm-diagram-tool,
[data-drawio-editor-host="true"] .pm-diagram-tool,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius:0;
  background: transparent;
  color: var(--ink-2, #4a4034);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}
[data-qingagent-doc-panel] .pm-diagram-tool:hover:not(:disabled),
[data-drawio-editor-host="true"] .pm-diagram-tool:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool:hover:not(:disabled) {
  background: var(--bg-hover);
}
[data-qingagent-doc-panel] .pm-diagram-tool:focus-visible,
[data-drawio-editor-host="true"] .pm-diagram-tool:focus-visible,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool:focus-visible {
  outline: 1px solid var(--mark, #8f6d30);
  outline-offset: 1px;
}
[data-qingagent-doc-panel] .pm-diagram-tool:disabled,
[data-drawio-editor-host="true"] .pm-diagram-tool:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
[data-qingagent-doc-panel] .pm-diagram-tool.is-active,
[data-drawio-editor-host="true"] .pm-diagram-tool.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool.is-active {
  border-color: rgba(168, 130, 63, 0.38);
  background: var(--mark-soft);
  color: var(--mark, #8f6d30);
}
[data-qingagent-doc-panel] .pm-diagram-tool--icon,
[data-drawio-editor-host="true"] .pm-diagram-tool--icon,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool--icon {
  width: 28px;
  min-width: 28px;
  padding: 0;
}
[data-qingagent-doc-panel] .pm-diagram-tool--wide,
[data-drawio-editor-host="true"] .pm-diagram-tool--wide,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool--wide {
  min-width: 58px;
  gap: 2px;
}
[data-qingagent-doc-panel] .pm-diagram-tool-sep,
[data-drawio-editor-host="true"] .pm-diagram-tool-sep,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-tool-sep {
  width: 1px;
  height: 16px;
  margin: 0 2px;
  background: rgba(55, 45, 32, 0.14);
}
/* SVG 图表外部工具栏只负责显隐，结构/视觉来自图片块共享组件。 */
[data-qingagent-doc-panel] .pm-diagram-svg-viewbar,
[data-drawio-editor-host="true"] .pm-diagram-svg-viewbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-svg-viewbar {
  opacity: 0;
  pointer-events: none;
}
[data-qingagent-doc-panel] .pm-diagram:hover .pm-diagram-svg-viewbar,
[data-drawio-editor-host="true"] .pm-diagram:hover .pm-diagram-svg-viewbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram:hover .pm-diagram-svg-viewbar,
[data-qingagent-doc-panel] .pm-diagram.is-selected .pm-diagram-svg-viewbar,
[data-drawio-editor-host="true"] .pm-diagram.is-selected .pm-diagram-svg-viewbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram.is-selected .pm-diagram-svg-viewbar,
[data-qingagent-doc-panel] .pm-diagram-view:hover .pm-diagram-svg-viewbar,
[data-drawio-editor-host="true"] .pm-diagram-view:hover .pm-diagram-svg-viewbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view:hover .pm-diagram-svg-viewbar {
  opacity: 1;
  pointer-events: auto;
}

/* 文字编辑按钮(可视化编辑 / 编辑 Mermaid)移到左下角(用户反馈:右上角让位给统一工具栏)。 */
[data-qingagent-doc-panel] .pm-diagram-view-actions,
[data-drawio-editor-host="true"] .pm-diagram-view-actions,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view-actions {
  position: absolute;
  z-index: 12;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0s linear 0.16s;
}
[data-qingagent-doc-panel] .pm-diagram-view:hover .pm-diagram-view-actions,
[data-drawio-editor-host="true"] .pm-diagram-view:hover .pm-diagram-view-actions,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view:hover .pm-diagram-view-actions,
[data-qingagent-doc-panel] .pm-diagram.is-selected .pm-diagram-view-actions,
[data-drawio-editor-host="true"] .pm-diagram.is-selected .pm-diagram-view-actions,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram.is-selected .pm-diagram-view-actions,
[data-qingagent-doc-panel] .pm-diagram-view:focus-within .pm-diagram-view-actions,
[data-drawio-editor-host="true"] .pm-diagram-view:focus-within .pm-diagram-view-actions,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view:focus-within .pm-diagram-view-actions {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
[data-qingagent-doc-panel] .pm-diagram-view-btn,
[data-drawio-editor-host="true"] .pm-diagram-view-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(47, 42, 34, 0.18);
  border-radius:0;
  background: rgba(143, 109, 48, 0.96);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(47, 42, 34, 0.08);
}
[data-qingagent-doc-panel] .pm-diagram-view-btn:hover,
[data-drawio-editor-host="true"] .pm-diagram-view-btn:hover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view-btn:hover {
  background: #755821;
}
[data-qingagent-doc-panel] .pm-diagram-view-btn:disabled,
[data-drawio-editor-host="true"] .pm-diagram-view-btn:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view-btn:disabled {
  opacity: 0.58;
  cursor: wait;
}
[data-qingagent-doc-panel] .pm-diagram-view-btn.is-unavailable:disabled,
[data-drawio-editor-host="true"] .pm-diagram-view-btn.is-unavailable:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view-btn.is-unavailable:disabled {
  cursor: not-allowed;
}
[data-qingagent-doc-panel] .pm-diagram-view-btn--ghost,
[data-drawio-editor-host="true"] .pm-diagram-view-btn--ghost,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view-btn--ghost {
  background: var(--bg-canvas, #fffaf0);
  color: var(--ink-1, #2f2a22);
}
[data-qingagent-doc-panel] .pm-diagram-view-btn--ghost:hover,
[data-drawio-editor-host="true"] .pm-diagram-view-btn--ghost:hover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view-btn--ghost:hover {
  border-color: rgba(143, 109, 48, 0.72);
  background: var(--bg-hover, #f3ecdd);
  color: var(--ink-1, #2f2a22);
}
/* 全屏覆盖层(legacy,已不再由图表使用) */
[data-qingagent-doc-panel] .pm-diagram-fullscreen,
[data-drawio-editor-host="true"] .pm-diagram-fullscreen,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(20, 18, 16, 0.72);
  backdrop-filter: blur(2px);
  cursor: zoom-out;
}
[data-qingagent-doc-panel] .pm-diagram-fullscreen-body,
[data-drawio-editor-host="true"] .pm-diagram-fullscreen-body,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-fullscreen-body {
  /* 定宽:svg 用 width:100% 才有参照(此前 width:auto 无参照 → svg 塌成 0 宽 → 全屏一片空白) */
  width: min(90vw, 1100px);
  max-width: 96vw;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius:0;
  padding: 24px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  cursor: default;
}
[data-qingagent-doc-panel] .pm-diagram-fullscreen-body svg,
[data-drawio-editor-host="true"] .pm-diagram-fullscreen-body svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-fullscreen-body svg {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 84vh;
  display: block;
}
[data-qingagent-doc-panel] .pm-diagram-fullscreen-close,
[data-drawio-editor-host="true"] .pm-diagram-fullscreen-close,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-fullscreen-close {
  position: fixed;
  top: 20px;
  right: 24px;
  padding: 6px 14px;
  font-size: 13px;
  border-radius:0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
[data-qingagent-doc-panel] .pm-diagram-edit,
[data-drawio-editor-host="true"] .pm-diagram-edit,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-edit {
  border: 1px solid var(--qj-cinnabar, #9e2b25);
  border-radius:0;
  overflow: hidden;
}
[data-qingagent-doc-panel] .pm-diagram-preview,
[data-drawio-editor-host="true"] .pm-diagram-preview,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-preview {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.015);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  min-height: 60px;
}
[data-qingagent-doc-panel] .pm-diagram-source,
[data-drawio-editor-host="true"] .pm-diagram-source,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-source {
  display: block;
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-1, #222);
  background: #fbfbfa;
}
[data-qingagent-doc-panel] .pm-diagram-actions,
[data-drawio-editor-host="true"] .pm-diagram-actions,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: #f5f4f2;
}
[data-qingagent-doc-panel] .pm-diagram-btn,
[data-drawio-editor-host="true"] .pm-diagram-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-btn {
  padding: 4px 14px;
  font-size: 12px;
  border-radius:0;
  border: 1px solid var(--qj-cinnabar, #9e2b25);
  background: var(--qj-cinnabar, #9e2b25);
  color: #fff;
  cursor: pointer;
}
[data-qingagent-doc-panel] .pm-diagram-btn:disabled,
[data-drawio-editor-host="true"] .pm-diagram-btn:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-btn:disabled {
  border-color: var(--line-2, rgba(47, 42, 34, 0.18));
  background: var(--bg-paper-deep, #efe7d6);
  color: var(--ink-3, #8c857a);
  cursor: not-allowed;
}
[data-qingagent-doc-panel] .pm-diagram-btn--ghost,
[data-drawio-editor-host="true"] .pm-diagram-btn--ghost,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-btn--ghost {
  background: transparent;
  color: var(--ink-2, #444);
  border-color: rgba(0, 0, 0, 0.15);
}

/* source: apps/web/src/pages/workspace/components/DrawioEditorOverlay.css:1-106 */
[data-qingagent-doc-panel] .drawio-editor-overlay,
[data-drawio-editor-host="true"] .drawio-editor-overlay,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-paper-deep);
  color: var(--ink-1);
  font-family: var(--font-zh-serif);
  overscroll-behavior: contain;
}

[data-qingagent-doc-panel] .drawio-editor-overlay__topbar,
[data-drawio-editor-host="true"] .drawio-editor-overlay__topbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__topbar {
  min-width: 0;
}

[data-qingagent-doc-panel] .drawio-editor-overlay__heading,
[data-drawio-editor-host="true"] .drawio-editor-overlay__heading,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__heading {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 12px;
}

[data-qingagent-doc-panel] .drawio-editor-overlay__heading strong,
[data-drawio-editor-host="true"] .drawio-editor-overlay__heading strong,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__heading strong {
  flex: 0 0 auto;
}

[data-qingagent-doc-panel] .drawio-editor-overlay__heading span,
[data-drawio-editor-host="true"] .drawio-editor-overlay__heading span,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__heading span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-qingagent-doc-panel] .drawio-editor-overlay__heading span.is-error,
[data-drawio-editor-host="true"] .drawio-editor-overlay__heading span.is-error,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__heading span.is-error {
  color: var(--mark);
}

[data-qingagent-doc-panel] .drawio-editor-overlay__stage,
[data-drawio-editor-host="true"] .drawio-editor-overlay__stage,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--line-2);
  background: var(--bg-paper-deep);
}

[data-qingagent-doc-panel] .drawio-editor-overlay__frame,
[data-drawio-editor-host="true"] .drawio-editor-overlay__frame,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg-canvas);
}

[data-qingagent-doc-panel] .drawio-editor-overlay__frame.is-saving,
[data-drawio-editor-host="true"] .drawio-editor-overlay__frame.is-saving,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__frame.is-saving {
  pointer-events: none;
}

[data-qingagent-doc-panel] .drawio-editor-overlay__boot,
[data-drawio-editor-host="true"] .drawio-editor-overlay__boot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__boot {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-paper-deep);
  color: var(--ink-3);
  font-size: 13px;
  pointer-events: auto;
}

[data-qingagent-doc-panel] .drawio-editor-overlay__spinner,
[data-drawio-editor-host="true"] .drawio-editor-overlay__spinner,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-2);
  border-top-color: var(--mark);
  border-radius: 50%;
  animation: drawio-editor-overlay-spin 0.8s linear infinite;
}

@keyframes drawio-editor-overlay-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  [data-qingagent-doc-panel] .drawio-editor-overlay__topbar,
[data-drawio-editor-host="true"] .drawio-editor-overlay__topbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__topbar {
    gap: 8px;
  }

  [data-qingagent-doc-panel] .drawio-editor-overlay,
[data-drawio-editor-host="true"] .drawio-editor-overlay,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay {
    padding: 10px;
  }

  [data-qingagent-doc-panel] .drawio-editor-overlay__heading,
[data-drawio-editor-host="true"] .drawio-editor-overlay__heading,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .drawio-editor-overlay__heading {
    display: grid;
    gap: 1px;
  }
}

/* source: apps/web/src/pages/workspace/components/diagramEditorChrome.css:1-96 */
[data-qingagent-doc-panel] .diagram-editor-chrome,
[data-drawio-editor-host="true"] .diagram-editor-chrome,
body:has([data-qingagent-doc-panel]) > .diagram-editor-chrome {
  background: var(--bg-paper-deep, #f6f1e7);
  color: var(--ink-1);
  font-family: var(--font-zh-serif);
}

[data-qingagent-doc-panel] .diagram-editor-chrome__topbar,
[data-drawio-editor-host="true"] .diagram-editor-chrome__topbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  background: var(--bg-paper-deep, #f6f1e7);
}

[data-qingagent-doc-panel] .diagram-editor-chrome__title,
[data-drawio-editor-host="true"] .diagram-editor-chrome__title,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__title {
  color: var(--ink-1);
  font-family: var(--font-zh-serif);
  font-size: 16px;
  font-weight: 650;
}

[data-qingagent-doc-panel] .diagram-editor-chrome__close,
[data-drawio-editor-host="true"] .diagram-editor-chrome__close,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__close {
  display: inline-grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: var(--bg-canvas);
  color: var(--ink-2);
  font: 400 18px/1 var(--font-zh-serif);
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

[data-qingagent-doc-panel] .diagram-editor-chrome__close:hover,
[data-drawio-editor-host="true"] .diagram-editor-chrome__close:hover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__close:hover {
  border-color: var(--line-3);
  background: var(--bg-hover);
  color: var(--ink-1);
}

[data-qingagent-doc-panel] .diagram-editor-chrome__close:focus-visible,
[data-drawio-editor-host="true"] .diagram-editor-chrome__close:focus-visible,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__close:focus-visible {
  outline: 1px solid var(--mark);
  outline-offset: 2px;
}

[data-qingagent-doc-panel] .diagram-editor-chrome__toolbar,
[data-drawio-editor-host="true"] .diagram-editor-chrome__toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__toolbar {
  position: absolute;
  z-index: 12;
  bottom: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: color-mix(in srgb, var(--bg-canvas) 94%, transparent);
  box-shadow: 0 10px 28px rgba(47, 42, 34, 0.16);
  transform: translateX(-50%);
}

[data-qingagent-doc-panel] .diagram-editor-chrome__toolbar .pm-diagram-tool,
[data-drawio-editor-host="true"] .diagram-editor-chrome__toolbar .pm-diagram-tool,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__toolbar .pm-diagram-tool {
  width: auto;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  gap: 6px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-zh-serif);
}

[data-qingagent-doc-panel] .diagram-editor-chrome__toolbar .pm-diagram-tool:hover:not(:disabled),
[data-drawio-editor-host="true"] .diagram-editor-chrome__toolbar .pm-diagram-tool:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__toolbar .pm-diagram-tool:hover:not(:disabled) {
  border-color: var(--line-2);
  background: var(--mark-soft);
  color: var(--ink-1);
}

[data-qingagent-doc-panel] .diagram-editor-chrome__toolbar .pm-diagram-tool.is-active,
[data-drawio-editor-host="true"] .diagram-editor-chrome__toolbar .pm-diagram-tool.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__toolbar .pm-diagram-tool.is-active {
  border-color: var(--mark);
  background: var(--mark-soft);
  color: var(--mark);
}

@media (max-width: 640px) {
  [data-qingagent-doc-panel] .diagram-editor-chrome__toolbar,
[data-drawio-editor-host="true"] .diagram-editor-chrome__toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .diagram-editor-chrome__toolbar {
    bottom: 16px;
    max-width: calc(100vw - 32px);
  }
}

/* source: apps/web/src/pages/workspace/components/diagram/graphDiagram.css:1-1441 */
[data-qingagent-doc-panel] .graph-diagram,
[data-drawio-editor-host="true"] .graph-diagram,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram,
[data-qingagent-doc-panel] .graph-diagram-editor,
[data-drawio-editor-host="true"] .graph-diagram-editor,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor,
[data-qingagent-doc-panel] .graph-diagram-viewer,
[data-drawio-editor-host="true"] .graph-diagram-viewer,
body:has([data-qingagent-doc-panel]) > .graph-diagram-viewer {
  --graph-node-fill: #efe3cc;
  --graph-node-stroke: #b08a3e;
  --graph-line-color: #8d7447;
  --graph-node-text: #2f2a22;
  --graph-edge-text: #5c5346;
  --graph-canvas-background: #fbf7ee;
  --graph-edge-label-background: rgba(255, 250, 240, 0.88);
  --graph-cluster-fill: #f3ecdd;
  --graph-cluster-stroke: #cdbfa3;
  /* 连线圆点与其命中盒统一悬在元素外侧的距离:不骑边框,也不与四角 resize 方块重叠。 */
  --graph-handle-offset: 11px;
  /* 命中盒边长必须 ≥ offset*2:命中盒以锚点为中心,只有铺满 offset 这段距离才能紧贴
     节点边框。留空档的话鼠标从节点走向圆点途中会同时脱离两者,hover 当场丢失。 */
  --graph-handle-hit: 22px;
  /* 选中包围盒(以及挂在同一圈上的 resize 四角把手)相对元素边框外移的距离。 */
  --graph-select-inset: 3px;
}

[data-qingagent-doc-panel] .graph-diagram,
[data-drawio-editor-host="true"] .graph-diagram,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram {
  position: relative;
  z-index: 0;
  width: 100%;
  min-height: 260px;
}

[data-qingagent-doc-panel] .graph-diagram-canvas,
[data-drawio-editor-host="true"] .graph-diagram-canvas,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas {
  position: relative;
  /* 定高链从 .pm-diagram / .pm-diagram-view 一路都是 min-height 撑出来的 auto 高度,没有一层是定值 height,
     故内层 .react-flow 用 height:100% 会解析成 0 → 节点被 overflow:hidden 裁掉、画布空白。
     这里改用 flex 列容器,让 .react-flow 以 flex:1 填满画布当前高度(既覆盖只读 260px 场景,
     也跟随编辑态用户拖拽出的动态高度),不再依赖不存在的定值高度链。 */
  display: flex;
  flex-direction: column;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(176, 138, 62, 0.26);
  border-radius:0;
  background: var(--graph-canvas-background);
}

[data-qingagent-doc-panel] .graph-diagram-canvas .react-flow,
[data-drawio-editor-host="true"] .graph-diagram-canvas .react-flow,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas .react-flow {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--preview,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview {
  z-index: 0;
  /* 高度交给外层 .pm-diagram-view(默认 min(56vh,520px),用户拖拽时被内联高度覆盖):
     画布 100% 跟随,拖高不再卡在 520px 留出空白带。 */
  height: 100%;
  border: 0;
}

/* 内联图表块里:.graph-diagram 撑满 .pm-diagram-view,让 --preview 画布有可填满的高度链。 */
[data-qingagent-doc-panel] .pm-diagram-view .graph-diagram,
[data-drawio-editor-host="true"] .pm-diagram-view .graph-diagram,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram-view .graph-diagram {
  height: 100%;
}

/* 外部工具栏结构/视觉复用图片块，只在图表作用域补显隐。 */
[data-qingagent-doc-panel] .graph-diagram-viewbar.pm-image-toolbar,
[data-drawio-editor-host="true"] .graph-diagram-viewbar.pm-image-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewbar.pm-image-toolbar {
  opacity: 0;
  pointer-events: none;
}

[data-qingagent-doc-panel] .graph-diagram-canvas-tool-icon,
[data-drawio-editor-host="true"] .graph-diagram-canvas-tool-icon,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas-tool-icon {
  display: block;
  width: 17px;
  height: 17px;
  color: currentColor;
}
[data-qingagent-doc-panel] .pm-diagram:hover .graph-diagram-viewbar.pm-image-toolbar,
[data-drawio-editor-host="true"] .pm-diagram:hover .graph-diagram-viewbar.pm-image-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram:hover .graph-diagram-viewbar.pm-image-toolbar,
[data-qingagent-doc-panel] .pm-diagram.is-selected .graph-diagram-viewbar.pm-image-toolbar,
[data-drawio-editor-host="true"] .pm-diagram.is-selected .graph-diagram-viewbar.pm-image-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .pm-diagram.is-selected .graph-diagram-viewbar.pm-image-toolbar,
[data-qingagent-doc-panel] .graph-diagram-canvas--preview:hover .graph-diagram-viewbar.pm-image-toolbar,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview:hover .graph-diagram-viewbar.pm-image-toolbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview:hover .graph-diagram-viewbar.pm-image-toolbar {
  opacity: 1;
  pointer-events: auto;
}

/* 连线 hover 态:鼠标移到箭头/连线上时加深加粗,给出可交互反馈(用户反馈"箭头没有 hover 态")。
   预览态连线默认 pointer-events:none(不可选),这里只为 hover 反馈放开命中,不影响点击空白选块。 */
[data-qingagent-doc-panel] .graph-diagram-canvas--preview .react-flow__edge,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview .react-flow__edge,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview .react-flow__edge {
  pointer-events: visiblestroke;
}
[data-qingagent-doc-panel] .graph-diagram .react-flow__edge:hover .react-flow__edge-path,
[data-drawio-editor-host="true"] .graph-diagram .react-flow__edge:hover .react-flow__edge-path,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram .react-flow__edge:hover .react-flow__edge-path {
  stroke-width: 2.4;
  filter: brightness(0.82);
}

[data-qingagent-doc-panel] .graph-diagram-canvas--preview .react-flow,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview .react-flow,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview .react-flow,
[data-qingagent-doc-panel] .graph-diagram-canvas--preview .react-flow__renderer,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview .react-flow__renderer,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview .react-flow__renderer,
[data-qingagent-doc-panel] .graph-diagram-canvas--preview .react-flow__pane,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview .react-flow__pane,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview .react-flow__pane {
  z-index: 0;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--preview .react-flow__attribution,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview .react-flow__attribution,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview .react-flow__attribution {
  display: none;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor {
  flex: 1;
  min-height: 0;
  border-radius:0;
  border-color: var(--line-2);
  background: var(--graph-canvas-background);
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor.is-drawing-subgraph,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor.is-drawing-subgraph,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor.is-drawing-subgraph,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor.is-drawing-subgraph .react-flow__pane,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor.is-drawing-subgraph .react-flow__pane,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor.is-drawing-subgraph .react-flow__pane {
  cursor: crosshair;
}

[data-qingagent-doc-panel] .graph-diagram-subgraph-draft,
[data-drawio-editor-host="true"] .graph-diagram-subgraph-draft,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-subgraph-draft {
  position: absolute;
  z-index: 20;
  box-sizing: border-box;
  min-width: 1px;
  min-height: 1px;
  border: 1.5px dashed var(--mark);
  background: color-mix(in srgb, var(--mark) 7%, transparent);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 250, 240, 0.64) inset;
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__node,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__node,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__node,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node {
  white-space: pre-line;
  box-shadow: none;
  transition: filter 0.14s ease;
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__node-graphNode,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__node-graphNode,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__node-graphNode,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node-graphNode,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node-graphNode,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node-graphNode {
  line-height: 1.45;
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__node-graphCluster,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__node-graphCluster,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__node-graphCluster,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node-graphCluster,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node-graphCluster,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node-graphCluster {
  pointer-events: none;
  z-index: -1;
}

[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node-graphCluster,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node-graphCluster,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node-graphCluster {
  pointer-events: auto;
}

[data-qingagent-doc-panel] .graph-diagram-cluster,
[data-drawio-editor-host="true"] .graph-diagram-cluster,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-cluster {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border: var(--graph-cluster-stroke-width, 1.5px) solid var(--graph-cluster-stroke);
  border-radius: 0;
  background: color-mix(in srgb, var(--graph-cluster-fill) 72%, transparent);
  color: var(--graph-cluster-text, var(--graph-node-text));
  font-family: var(--font-zh-serif);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

[data-qingagent-doc-panel] .graph-diagram-cluster.is-empty,
[data-drawio-editor-host="true"] .graph-diagram-cluster.is-empty,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-cluster.is-empty {
  border-style: dashed;
}

[data-qingagent-doc-panel] .graph-diagram-cluster__title,
[data-drawio-editor-host="true"] .graph-diagram-cluster__title,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-cluster__title {
  position: absolute;
  top: 9px;
  right: 13px;
  left: 13px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-qingagent-doc-panel] .graph-diagram-cluster__empty-hint,
[data-drawio-editor-host="true"] .graph-diagram-cluster__empty-hint,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-cluster__empty-hint {
  position: absolute;
  top: 50%;
  right: 12px;
  left: 12px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
  transform: translateY(-20%);
}

[data-qingagent-doc-panel] .graph-diagram-editor .graph-diagram-cluster__title,
[data-drawio-editor-host="true"] .graph-diagram-editor .graph-diagram-cluster__title,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .graph-diagram-cluster__title {
  pointer-events: auto;
  cursor: grab;
}

[data-qingagent-doc-panel] .graph-diagram-editor .graph-diagram-cluster,
[data-drawio-editor-host="true"] .graph-diagram-editor .graph-diagram-cluster,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .graph-diagram-cluster {
  cursor: grab;
}

[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node.dragging .graph-diagram-cluster__title,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node.dragging .graph-diagram-cluster__title,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node.dragging .graph-diagram-cluster__title {
  cursor: grabbing;
}

/* 拖拽中"松手能进"的分区:边框点亮(黄棕强调色),与松手收编判定同源。 */
[data-qingagent-doc-panel] .graph-diagram-cluster.is-drop-target,
[data-drawio-editor-host="true"] .graph-diagram-cluster.is-drop-target,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-cluster.is-drop-target {
  border-color: var(--mark);
  border-style: solid;
  background: color-mix(in srgb, var(--mark) 9%, var(--graph-cluster-fill));
  box-shadow: 0 0 0 2px var(--mark-soft);
}

[data-qingagent-doc-panel] .graph-diagram-cluster.is-selected,
[data-drawio-editor-host="true"] .graph-diagram-cluster.is-selected,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-cluster.is-selected {
  border-color: var(--mark);
  background: color-mix(in srgb, var(--graph-cluster-fill) 82%, transparent);
  box-shadow: 0 0 0 2px var(--mark-soft);
}

[data-qingagent-doc-panel] .graph-diagram-cluster__title-input,
[data-drawio-editor-host="true"] .graph-diagram-cluster__title-input,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-cluster__title-input {
  box-sizing: border-box;
  width: min(240px, 100%);
  height: 26px;
  padding: 2px 7px;
  border: 1px solid var(--line-3);
  border-radius: 0;
  outline: none;
  background: #fffaf0;
  color: var(--graph-node-text);
  font: 600 14px/1.4 var(--font-zh-serif);
  text-align: center;
  box-shadow: 0 0 0 3px var(--mark-soft);
  pointer-events: auto;
}

[data-qingagent-doc-panel] .graph-diagram-node-shell,
[data-drawio-editor-host="true"] .graph-diagram-node-shell,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--graph-node-text);
}

/* 形状层必须显式 100%:svg 是替换元素,只写 inset:0 时浏览器按 viewBox 的固有宽高比定尺寸
   (忽略 bottom/right 约束)——节点被非等比拉伸后,填充与边框只占外壳的一部分,文字掉在图形外。
   写死 100% 才能让 preserveAspectRatio="none" 真正自由形变、与外壳始终重合。 */
[data-qingagent-doc-panel] .graph-diagram-node-shape-svg,
[data-drawio-editor-host="true"] .graph-diagram-node-shape-svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-shape-svg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

[data-qingagent-doc-panel] .graph-diagram-node-shape-fill,
[data-drawio-editor-host="true"] .graph-diagram-node-shape-fill,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-shape-fill,
[data-qingagent-doc-panel] .graph-diagram-node-shape-detail,
[data-drawio-editor-host="true"] .graph-diagram-node-shape-detail,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-shape-detail {
  transition: filter 0.14s ease, stroke 0.14s ease, stroke-width 0.14s ease;
}

[data-qingagent-doc-panel] .graph-diagram-node-shape-fill,
[data-drawio-editor-host="true"] .graph-diagram-node-shape-fill,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-shape-fill {
  filter: drop-shadow(0 3px 10px rgba(77, 55, 26, 0.1));
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__node:hover .graph-diagram-node-shape-fill,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__node:hover .graph-diagram-node-shape-fill,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__node:hover .graph-diagram-node-shape-fill,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node:hover .graph-diagram-node-shape-fill,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node:hover .graph-diagram-node-shape-fill,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node:hover .graph-diagram-node-shape-fill {
  /* 阴影色必须写成显式 rgba:filter 过渡按 oklab 插值,若端点是 color-mix(..., transparent),
     中间帧会算出越出 sRGB 色域的值(实测 oklab(1 3.82 1.89)),渲染成粉红外发光——
     拖拽 resize 时最明显,松手即消失。金墨皮肤不允许出现红色。 */
  filter: drop-shadow(0 8px 16px rgba(168, 130, 63, 0.2));
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__node.selected,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__node.selected,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__node.selected,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node.selected,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node.selected,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node.selected {
  outline: none;
  box-shadow: none;
}

[data-qingagent-doc-panel] .graph-diagram-node-label,
[data-drawio-editor-host="true"] .graph-diagram-node-label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 10px 16px;
  color: inherit;
  line-height: 1.35;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: var(--graph-node-font-size, 13px);
}

[data-qingagent-doc-panel] .graph-diagram-node-label.is-editing,
[data-drawio-editor-host="true"] .graph-diagram-node-label.is-editing,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-label.is-editing {
  z-index: 6;
  outline: none;
  cursor: text;
  /* React Flow 给 .react-flow__node 设了 -webkit-user-select: none;只写不带前缀的一条,
     WebKit 系仍按继承的 none 处理 contenteditable 后代,点击落不下光标。三条一起写死。 */
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  caret-color: var(--mark);
}

[data-qingagent-doc-panel] .graph-diagram-node-label.is-editing:focus,
[data-drawio-editor-host="true"] .graph-diagram-node-label.is-editing:focus,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-label.is-editing:focus {
  text-shadow: 0 0 0 currentColor;
}

[data-qingagent-doc-panel] .graph-diagram-node--diamond .graph-diagram-node-label,
[data-drawio-editor-host="true"] .graph-diagram-node--diamond .graph-diagram-node-label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node--diamond .graph-diagram-node-label,
[data-qingagent-doc-panel] .graph-diagram-node--circle .graph-diagram-node-label,
[data-drawio-editor-host="true"] .graph-diagram-node--circle .graph-diagram-node-label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node--circle .graph-diagram-node-label,
[data-qingagent-doc-panel] .graph-diagram-node--doublecircle .graph-diagram-node-label,
[data-drawio-editor-host="true"] .graph-diagram-node--doublecircle .graph-diagram-node-label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node--doublecircle .graph-diagram-node-label,
[data-qingagent-doc-panel] .graph-diagram-node--hexagon .graph-diagram-node-label,
[data-drawio-editor-host="true"] .graph-diagram-node--hexagon .graph-diagram-node-label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node--hexagon .graph-diagram-node-label {
  padding: 10px 36px;
}

[data-qingagent-doc-panel] .graph-diagram-node--parallelogram .graph-diagram-node-label,
[data-drawio-editor-host="true"] .graph-diagram-node--parallelogram .graph-diagram-node-label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node--parallelogram .graph-diagram-node-label {
  padding: 10px 28px;
}

/* 命中盒与可见圆点同心:清掉 React Flow 默认的贴边定位,改用与圆点同一套外侧偏移,
   再以 translate(-50%,-50%) 让 16px 命中盒以自身中心对齐锚点(旧的 transform:none 会整体偏 8px)。 */
[data-qingagent-doc-panel] .graph-diagram .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram .react-flow__handle,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__handle,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__handle {
  z-index: 7;
  width: var(--graph-handle-hit);
  height: var(--graph-handle-hit);
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  cursor: crosshair;
  inset: auto;
  transform: translate(-50%, -50%);
}

[data-qingagent-doc-panel] .graph-diagram .graph-diagram-handle--t,
[data-drawio-editor-host="true"] .graph-diagram .graph-diagram-handle--t,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram .graph-diagram-handle--t,
[data-qingagent-doc-panel] .graph-diagram-editor .graph-diagram-handle--t,
[data-drawio-editor-host="true"] .graph-diagram-editor .graph-diagram-handle--t,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .graph-diagram-handle--t {
  top: calc(var(--graph-handle-offset) * -1);
  left: 50%;
}

[data-qingagent-doc-panel] .graph-diagram .graph-diagram-handle--r,
[data-drawio-editor-host="true"] .graph-diagram .graph-diagram-handle--r,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram .graph-diagram-handle--r,
[data-qingagent-doc-panel] .graph-diagram-editor .graph-diagram-handle--r,
[data-drawio-editor-host="true"] .graph-diagram-editor .graph-diagram-handle--r,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .graph-diagram-handle--r {
  top: 50%;
  left: calc(100% + var(--graph-handle-offset));
}

[data-qingagent-doc-panel] .graph-diagram .graph-diagram-handle--b,
[data-drawio-editor-host="true"] .graph-diagram .graph-diagram-handle--b,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram .graph-diagram-handle--b,
[data-qingagent-doc-panel] .graph-diagram-editor .graph-diagram-handle--b,
[data-drawio-editor-host="true"] .graph-diagram-editor .graph-diagram-handle--b,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .graph-diagram-handle--b {
  top: calc(100% + var(--graph-handle-offset));
  left: 50%;
}

[data-qingagent-doc-panel] .graph-diagram .graph-diagram-handle--l,
[data-drawio-editor-host="true"] .graph-diagram .graph-diagram-handle--l,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram .graph-diagram-handle--l,
[data-qingagent-doc-panel] .graph-diagram-editor .graph-diagram-handle--l,
[data-drawio-editor-host="true"] .graph-diagram-editor .graph-diagram-handle--l,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .graph-diagram-handle--l {
  top: 50%;
  left: calc(var(--graph-handle-offset) * -1);
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__handle {
  display: block;
  opacity: 0;
  pointer-events: none;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--preview .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview .react-flow__handle {
  display: none;
}

[data-qingagent-doc-panel] .graph-diagram-handle-slot,
[data-drawio-editor-host="true"] .graph-diagram-handle-slot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-slot {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

[data-qingagent-doc-panel] .graph-diagram-handle-slot .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-handle-slot .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-slot .react-flow__handle {
  pointer-events: none;
}

[data-qingagent-doc-panel] .graph-diagram-handle-dot,
[data-drawio-editor-host="true"] .graph-diagram-handle-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-dot {
  position: absolute;
  z-index: 5;
  width: 8px;
  height: 8px;
  border: 1.5px solid #fffaf0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mark) 82%, var(--ink-1));
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

[data-qingagent-doc-panel] .graph-diagram-handle-dot--t,
[data-drawio-editor-host="true"] .graph-diagram-handle-dot--t,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-dot--t {
  top: calc(var(--graph-handle-offset) * -1);
  left: 50%;
}

[data-qingagent-doc-panel] .graph-diagram-handle-dot--r,
[data-drawio-editor-host="true"] .graph-diagram-handle-dot--r,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-dot--r {
  top: 50%;
  left: calc(100% + var(--graph-handle-offset));
}

[data-qingagent-doc-panel] .graph-diagram-handle-dot--b,
[data-drawio-editor-host="true"] .graph-diagram-handle-dot--b,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-dot--b {
  top: calc(100% + var(--graph-handle-offset));
  left: 50%;
}

[data-qingagent-doc-panel] .graph-diagram-handle-dot--l,
[data-drawio-editor-host="true"] .graph-diagram-handle-dot--l,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-dot--l {
  top: 50%;
  left: calc(var(--graph-handle-offset) * -1);
}

[data-qingagent-doc-panel] .graph-diagram-node-shell.is-renaming .graph-diagram-handle-slot,
[data-drawio-editor-host="true"] .graph-diagram-node-shell.is-renaming .graph-diagram-handle-slot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-shell.is-renaming .graph-diagram-handle-slot {
  display: none;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node:hover .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node:hover .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node:hover .react-flow__handle,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.is-selected .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.is-selected .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.is-selected .react-flow__handle,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.selected .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.selected .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.selected .react-flow__handle,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__handle.connectingfrom,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__handle.connectingfrom,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__handle.connectingfrom,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__handle.connectingto,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__handle.connectingto,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__handle.connectingto,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor.is-connecting .react-flow__handle.connectionindicator,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor.is-connecting .react-flow__handle.connectionindicator,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor.is-connecting .react-flow__handle.connectionindicator {
  pointer-events: auto;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-handle-dot,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-handle-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-handle-dot,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-handle-dot,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-handle-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-handle-dot,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-handle-dot,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-handle-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-handle-dot,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .graph-diagram-node-shell[data-handle-zone="active"] .graph-diagram-handle-dot,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .graph-diagram-node-shell[data-handle-zone="active"] .graph-diagram-handle-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .graph-diagram-node-shell[data-handle-zone="active"] .graph-diagram-handle-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 带宽限期的悬停区(节点 + 四个外挂把手)激活时,把手一直可点:纯 :hover 判定在
   指针离开节点包围盒的那一刻就会收走命中能力,导致圆点永远按不下去。 */
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .graph-diagram-node-shell[data-handle-zone="active"] .react-flow__handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .graph-diagram-node-shell[data-handle-zone="active"] .react-flow__handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .graph-diagram-node-shell[data-handle-zone="active"] .react-flow__handle {
  pointer-events: auto;
}

[data-qingagent-doc-panel] .graph-diagram-handle-slot[data-handle-state="plus"] .graph-diagram-handle-dot,
[data-drawio-editor-host="true"] .graph-diagram-handle-slot[data-handle-state="plus"] .graph-diagram-handle-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-slot[data-handle-state="plus"] .graph-diagram-handle-dot,
[data-qingagent-doc-panel] .graph-diagram-handle-slot[data-handle-state="preview"] .graph-diagram-handle-dot,
[data-drawio-editor-host="true"] .graph-diagram-handle-slot[data-handle-state="preview"] .graph-diagram-handle-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-slot[data-handle-state="preview"] .graph-diagram-handle-dot {
  opacity: 0 !important;
}

/* resize 只保留四角方块把手:四条边线既不显示也不可抓取(选中框由外壳包围盒承担),
   边中点整块让给连线圆点,两者命中盒不再重叠。 */
[data-qingagent-doc-panel] .graph-diagram-resize-line,
[data-drawio-editor-host="true"] .graph-diagram-resize-line,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-resize-line {
  border-color: transparent !important;
  opacity: 0;
  pointer-events: none;
}

/* 四角方块把手外移到与选中包围盒同一圈上,和圆点(11px 外)彼此错开。 */
[data-qingagent-doc-panel] .graph-diagram-resize-handle,
[data-drawio-editor-host="true"] .graph-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-resize-handle {
  width: 8px !important;
  height: 8px !important;
  border: 1px solid var(--mark) !important;
  border-radius: 0 !important;
  background: #fffaf0 !important;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease, background 0.12s ease;
}

[data-qingagent-doc-panel] .graph-diagram-resize-handle.top,
[data-drawio-editor-host="true"] .graph-diagram-resize-handle.top,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-resize-handle.top {
  margin-top: calc(var(--graph-select-inset) * -1);
}

[data-qingagent-doc-panel] .graph-diagram-resize-handle.bottom,
[data-drawio-editor-host="true"] .graph-diagram-resize-handle.bottom,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-resize-handle.bottom {
  margin-top: var(--graph-select-inset);
}

[data-qingagent-doc-panel] .graph-diagram-resize-handle.left,
[data-drawio-editor-host="true"] .graph-diagram-resize-handle.left,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-resize-handle.left {
  margin-left: calc(var(--graph-select-inset) * -1);
}

[data-qingagent-doc-panel] .graph-diagram-resize-handle.right,
[data-drawio-editor-host="true"] .graph-diagram-resize-handle.right,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-resize-handle.right {
  margin-left: var(--graph-select-inset);
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-resize-handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-resize-handle,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-resize-handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-resize-handle,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-resize-handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-resize-handle,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.resizing .graph-diagram-resize-handle,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.resizing .graph-diagram-resize-handle,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.resizing .graph-diagram-resize-handle {
  opacity: 1;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .graph-diagram-resize-handle:hover,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .graph-diagram-resize-handle:hover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .graph-diagram-resize-handle:hover {
  background: color-mix(in srgb, var(--mark) 18%, var(--bg-canvas)) !important;
  transform: scale(1.2);
}

[data-qingagent-doc-panel] .graph-diagram-handle-add,
[data-drawio-editor-host="true"] .graph-diagram-handle-add,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-add {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fffaf0;
  color: color-mix(in srgb, var(--mark) 78%, var(--ink-1));
  font: 700 13px/1 var(--font-zh-serif);
  opacity: 1;
  cursor: copy;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.12s ease, transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

[data-qingagent-doc-panel] .graph-diagram-handle-add .graph-diagram-canvas-tool-icon,
[data-drawio-editor-host="true"] .graph-diagram-handle-add .graph-diagram-canvas-tool-icon,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-add .graph-diagram-canvas-tool-icon {
  width: 11px;
  height: 11px;
  stroke-width: 1.8;
}

[data-qingagent-doc-panel] .graph-diagram-handle-add--t,
[data-drawio-editor-host="true"] .graph-diagram-handle-add--t,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-add--t {
  top: calc(var(--graph-handle-offset) * -1);
  left: 50%;
}

[data-qingagent-doc-panel] .graph-diagram-handle-add--r,
[data-drawio-editor-host="true"] .graph-diagram-handle-add--r,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-add--r {
  top: 50%;
  left: calc(100% + var(--graph-handle-offset));
}

[data-qingagent-doc-panel] .graph-diagram-handle-add--b,
[data-drawio-editor-host="true"] .graph-diagram-handle-add--b,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-add--b {
  top: calc(100% + var(--graph-handle-offset));
  left: 50%;
}

[data-qingagent-doc-panel] .graph-diagram-handle-add--l,
[data-drawio-editor-host="true"] .graph-diagram-handle-add--l,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-add--l {
  top: 50%;
  left: calc(var(--graph-handle-offset) * -1);
}

[data-qingagent-doc-panel] .graph-diagram-handle-add.is-preview,
[data-drawio-editor-host="true"] .graph-diagram-handle-add.is-preview,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-add.is-preview {
  border-color: color-mix(in srgb, var(--mark) 62%, transparent);
  background: var(--bg-canvas);
}

[data-qingagent-doc-panel] .graph-diagram-handle-direction-icon,
[data-drawio-editor-host="true"] .graph-diagram-handle-direction-icon,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-direction-icon {
  width: 12px;
  height: 12px;
}

[data-qingagent-doc-panel] .graph-diagram-handle-direction-icon--t,
[data-drawio-editor-host="true"] .graph-diagram-handle-direction-icon--t,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-direction-icon--t {
  transform: rotate(-90deg);
}

[data-qingagent-doc-panel] .graph-diagram-handle-direction-icon--b,
[data-drawio-editor-host="true"] .graph-diagram-handle-direction-icon--b,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-direction-icon--b {
  transform: rotate(90deg);
}

[data-qingagent-doc-panel] .graph-diagram-handle-direction-icon--l,
[data-drawio-editor-host="true"] .graph-diagram-handle-direction-icon--l,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-direction-icon--l {
  transform: rotate(180deg);
}

/* 幽灵预览:容器只是定位原点,落点/尺寸/连接段长度全部由 JS 的同一套几何给出(与创建共用),
   这里只管观感(虚化、不吃指针)。 */
[data-qingagent-doc-panel] .graph-diagram-handle-ghost,
[data-drawio-editor-host="true"] .graph-diagram-handle-ghost,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-ghost {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: color-mix(in srgb, var(--mark) 72%, transparent);
  opacity: 0.55;
  pointer-events: none;
}

[data-qingagent-doc-panel] .graph-diagram-handle-ghost__line,
[data-drawio-editor-host="true"] .graph-diagram-handle-ghost__line,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-ghost__line {
  position: absolute;
  overflow: visible;
}

[data-qingagent-doc-panel] .graph-diagram-handle-ghost__node,
[data-drawio-editor-host="true"] .graph-diagram-handle-ghost__node,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-ghost__node {
  position: absolute;
  color: var(--graph-node-text);
  filter: saturate(0.72);
}

[data-qingagent-doc-panel] .graph-diagram-handle-ghost__node svg,
[data-drawio-editor-host="true"] .graph-diagram-handle-ghost__node svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-ghost__node svg {
  display: block;
  width: 100%;
  height: 100%;
}

[data-qingagent-doc-panel] .graph-diagram-handle-ghost .graph-diagram-node-shell::before,
[data-drawio-editor-host="true"] .graph-diagram-handle-ghost .graph-diagram-node-shell::before,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-ghost .graph-diagram-node-shell::before {
  display: none;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--preview .graph-diagram-handle-add,
[data-drawio-editor-host="true"] .graph-diagram-canvas--preview .graph-diagram-handle-add,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--preview .graph-diagram-handle-add {
  display: none;
}

/* 空白拖拽的框选选区:黄棕细线 + 低透明填充(强调色统一走 --mark 体系)。 */
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__selection,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__selection,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__selection,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__selection,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__selection,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__selection {
  border: 1px solid color-mix(in srgb, var(--mark) 72%, transparent);
  border-radius: 0;
  background: color-mix(in srgb, var(--mark) 12%, transparent);
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__nodesselection-rect,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__nodesselection-rect,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__nodesselection-rect {
  border: 1px solid color-mix(in srgb, var(--mark) 62%, transparent);
  background: transparent;
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__node.is-selected,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__node.is-selected,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__node.is-selected,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node.is-selected,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node.is-selected,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node.is-selected {
  outline: none;
  box-shadow: none;
}

/* 选中指示 = 元素外侧一圈细包围盒(不跟随形状轮廓,不压在元素自己的边框上),
   与 resize 四角把手同处一圈;悬停给一层更淡的同款框。 */
[data-qingagent-doc-panel] .graph-diagram-node-shell::before,
[data-drawio-editor-host="true"] .graph-diagram-node-shell::before,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-node-shell::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: calc(var(--graph-select-inset) * -1);
  border: 1.5px solid var(--mark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-node-shell::before,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-node-shell::before,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node:hover .graph-diagram-node-shell::before {
  opacity: 0.4;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-node-shell::before,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-node-shell::before,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.is-selected .graph-diagram-node-shell::before,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-node-shell::before,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-node-shell::before,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .react-flow__node.selected .graph-diagram-node-shell::before,
[data-qingagent-doc-panel] .graph-diagram-canvas--editor .graph-diagram-node-shell.is-renaming::before,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor .graph-diagram-node-shell.is-renaming::before,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor .graph-diagram-node-shell.is-renaming::before {
  opacity: 1;
}

[data-qingagent-doc-panel] .graph-diagram-handle-ghost .graph-diagram-node-shell::before,
[data-drawio-editor-host="true"] .graph-diagram-handle-ghost .graph-diagram-node-shell::before,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-handle-ghost .graph-diagram-node-shell::before {
  display: none;
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__node.is-parent-target,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__node.is-parent-target,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__node.is-parent-target,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__node.is-parent-target,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__node.is-parent-target,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__node.is-parent-target {
  outline: 2px dashed var(--mark);
  outline-offset: 5px;
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__edge-path,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__edge-path,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__edge-path,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__edge-path,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__edge-path,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__edge-path {
  stroke-linecap: round;
  transition: stroke 0.14s ease, stroke-width 0.14s ease, filter 0.14s ease;
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__edge.is-selected .react-flow__edge-path,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__edge.is-selected .react-flow__edge-path,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__edge.is-selected .react-flow__edge-path,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__edge.is-selected .react-flow__edge-path,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__edge.is-selected .react-flow__edge-path,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__edge.is-selected .react-flow__edge-path {
  filter: drop-shadow(0 3px 4px rgba(168, 130, 63, 0.28));
}

[data-qingagent-doc-panel] .graph-diagram[data-diagram-type] .react-flow__edge:hover .react-flow__edge-path,
[data-drawio-editor-host="true"] .graph-diagram[data-diagram-type] .react-flow__edge:hover .react-flow__edge-path,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram[data-diagram-type] .react-flow__edge:hover .react-flow__edge-path,
[data-qingagent-doc-panel] .graph-diagram-editor .react-flow__edge:hover .react-flow__edge-path,
[data-drawio-editor-host="true"] .graph-diagram-editor .react-flow__edge:hover .react-flow__edge-path,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .react-flow__edge:hover .react-flow__edge-path {
  stroke: var(--mark) !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 3px 5px rgba(168, 130, 63, 0.24));
}

[data-qingagent-doc-panel] .graph-diagram-edge-label,
[data-drawio-editor-host="true"] .graph-diagram-edge-label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-edge-label {
  position: absolute;
  z-index: 8;
  min-width: 16px;
  max-width: 220px;
  padding: 2px 7px;
  border-radius:0;
  background: var(--graph-edge-label-background);
  color: var(--ink-2);
  font: 12px/1.35 var(--font-zh-serif);
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: all;
  box-shadow: 0 2px 8px rgba(47, 42, 34, 0.08);
}

[data-qingagent-doc-panel] .graph-diagram-edge-label.is-empty,
[data-drawio-editor-host="true"] .graph-diagram-edge-label.is-empty,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-edge-label.is-empty {
  width: 22px;
  min-height: 18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

[data-qingagent-doc-panel] .graph-diagram-edge-label.is-editing,
[data-drawio-editor-host="true"] .graph-diagram-edge-label.is-editing,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-edge-label.is-editing {
  min-width: 76px;
  outline: none;
  border: 1px solid var(--line-3);
  background: rgba(255, 250, 240, 0.98);
  box-shadow: 0 0 0 3px var(--mark-soft), 0 10px 24px rgba(47, 42, 34, 0.14);
  cursor: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  caret-color: var(--mark);
}

[data-qingagent-doc-panel] .graph-diagram-editor,
[data-drawio-editor-host="true"] .graph-diagram-editor,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-paper-deep, #f6f1e7);
  pointer-events: auto;
  overscroll-behavior: contain;
}

[data-qingagent-doc-panel] .graph-diagram-viewer,
[data-drawio-editor-host="true"] .graph-diagram-viewer,
body:has([data-qingagent-doc-panel]) > .graph-diagram-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-paper-deep, #f6f1e7);
  pointer-events: auto;
  overscroll-behavior: contain;
}

[data-qingagent-doc-panel] .graph-diagram-editor__topbar,
[data-drawio-editor-host="true"] .graph-diagram-editor__topbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-editor__topbar,
[data-qingagent-doc-panel] .graph-diagram-viewer__topbar,
[data-drawio-editor-host="true"] .graph-diagram-viewer__topbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewer__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

[data-qingagent-doc-panel] .graph-diagram-editor__title,
[data-drawio-editor-host="true"] .graph-diagram-editor__title,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-editor__title,
[data-qingagent-doc-panel] .graph-diagram-viewer__title,
[data-drawio-editor-host="true"] .graph-diagram-viewer__title,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewer__title {
  color: #211f1b;
  font-family: var(--font-zh-serif);
  font-size: 16px;
  font-weight: 650;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--fullscreen,
[data-drawio-editor-host="true"] .graph-diagram-canvas--fullscreen,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--fullscreen {
  flex: 1;
  height: auto;
  min-height: 0;
  border: 1px solid var(--line-2);
}

[data-qingagent-doc-panel] .graph-diagram-context button,
[data-drawio-editor-host="true"] .graph-diagram-context button,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context button,
[data-qingagent-doc-panel] .graph-diagram-viewer .graph-diagram-editor__close,
[data-drawio-editor-host="true"] .graph-diagram-viewer .graph-diagram-editor__close,
body:has([data-qingagent-doc-panel]) > .graph-diagram-viewer .graph-diagram-editor__close {
  height: 30px;
  border: 1px solid rgba(47, 42, 34, 0.18);
  border-radius:0;
  background: #fffaf0;
  color: var(--ink-1);
  font-size: 12px;
  cursor: pointer;
}

[data-qingagent-doc-panel] .graph-diagram-viewer .graph-diagram-editor__close,
[data-drawio-editor-host="true"] .graph-diagram-viewer .graph-diagram-editor__close,
body:has([data-qingagent-doc-panel]) > .graph-diagram-viewer .graph-diagram-editor__close {
  padding: 0 14px;
  background: var(--bg-canvas, #fffaf0);
  color: var(--ink-1);
}

[data-qingagent-doc-panel] .graph-diagram-context button,
[data-drawio-editor-host="true"] .graph-diagram-context button,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context button {
  padding: 0 10px;
}

[data-qingagent-doc-panel] .graph-diagram-context button:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-context button:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context button:hover:not(:disabled),
[data-qingagent-doc-panel] .graph-diagram-context button:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-context button:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context button:hover:not(:disabled) {
  border-color: var(--line-3);
  color: var(--ink-1);
}

[data-qingagent-doc-panel] .graph-diagram-viewer .graph-diagram-editor__close:hover,
[data-drawio-editor-host="true"] .graph-diagram-viewer .graph-diagram-editor__close:hover,
body:has([data-qingagent-doc-panel]) > .graph-diagram-viewer .graph-diagram-editor__close:hover {
  background: var(--bg-hover);
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls {
  position: absolute;
  z-index: 30;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  user-select: none;
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls__group,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls__group,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls__group {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-canvas, #fffaf0) 96%, transparent);
  box-shadow: 0 8px 24px rgba(47, 42, 34, 0.14);
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls button,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls button,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls button {
  display: inline-grid;
  width: 34px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-zh-serif);
  cursor: pointer;
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls button + button,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls button + button,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls button + button {
  border-left-color: var(--line-1);
}

/* 手型按钮悬浮提示:黑底提示条 + 键帽。控件组为了圆角药丸带 overflow:hidden,提示条只能挂在
   body 上用定位浮层,否则必被裁掉(真机不可见);层级压过全屏编辑层,不吃指针、不占布局。 */
[data-qingagent-doc-panel] .graph-diagram-pan-tip,
[data-drawio-editor-host="true"] .graph-diagram-pan-tip,
body:has([data-qingagent-doc-panel]) > .graph-diagram-pan-tip {
  position: fixed;
  z-index: 2147483020;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 0;
  background: var(--ink-1);
  color: var(--ink-on-dark);
  font: 12px/1 var(--font-zh-serif);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -100%);
  box-shadow: 0 10px 28px rgba(20, 18, 16, 0.28);
}

[data-qingagent-doc-panel] .graph-diagram-pan-tip kbd,
[data-drawio-editor-host="true"] .graph-diagram-pan-tip kbd,
body:has([data-qingagent-doc-panel]) > .graph-diagram-pan-tip kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 250, 240, 0.86);
  font: 11px/1.3 var(--font-mono);
}

[data-qingagent-doc-panel] .graph-diagram-pan-tip__sep,
[data-drawio-editor-host="true"] .graph-diagram-pan-tip__sep,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-pan-tip__sep,
[data-qingagent-doc-panel] .graph-diagram-pan-tip__plus,
[data-drawio-editor-host="true"] .graph-diagram-pan-tip__plus,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-pan-tip__plus {
  color: rgba(255, 250, 240, 0.5);
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls button:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls button:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls button:hover:not(:disabled),
[data-qingagent-doc-panel] .graph-diagram-viewport-controls button.is-active,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls button.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls button.is-active {
  background: var(--mark-soft);
  color: var(--mark);
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls button:disabled,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls button:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls button:disabled {
  color: var(--ink-3);
  cursor: not-allowed;
  opacity: 0.42;
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls button:focus-visible,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls button:focus-visible,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 1px solid var(--mark);
  outline-offset: -2px;
}

[data-qingagent-doc-panel] .graph-diagram-viewport-controls .graph-diagram-viewport-controls__zoom,
[data-drawio-editor-host="true"] .graph-diagram-viewport-controls .graph-diagram-viewport-controls__zoom,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-viewport-controls .graph-diagram-viewport-controls__zoom {
  width: 54px;
  font: 12px/1 var(--font-mono);
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor.is-pan-enabled .react-flow__pane,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor.is-pan-enabled .react-flow__pane,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor.is-pan-enabled .react-flow__pane {
  cursor: grab;
}

[data-qingagent-doc-panel] .graph-diagram-canvas--editor.is-pan-enabled .react-flow__pane:active,
[data-drawio-editor-host="true"] .graph-diagram-canvas--editor.is-pan-enabled .react-flow__pane:active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-canvas--editor.is-pan-enabled .react-flow__pane:active {
  cursor: grabbing;
}

[data-qingagent-doc-panel] .graph-diagram-context button:disabled,
[data-drawio-editor-host="true"] .graph-diagram-context button:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

[data-qingagent-doc-panel] .graph-diagram-context,
[data-drawio-editor-host="true"] .graph-diagram-context,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context {
  position: fixed;
  z-index: 2147483010;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: min(92vw, 560px);
  padding: 5px 6px;
  border: 1px solid var(--ink-1);
  border-radius: 0;
  background: var(--ink-1);
  color: var(--ink-on-dark);
  overflow: visible;
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(20, 18, 16, 0.28), 0 2px 6px rgba(20, 18, 16, 0.12);
  font: 13px/1 var(--font-zh-serif);
  user-select: none;
  white-space: nowrap;
}

[data-qingagent-doc-panel] .graph-diagram-context::after,
[data-drawio-editor-host="true"] .graph-diagram-context::after,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 12px;
  height: 6px;
  background: var(--ink-1);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform: translateX(-50%);
}

[data-qingagent-doc-panel] .graph-diagram-context.is-below::after,
[data-drawio-editor-host="true"] .graph-diagram-context.is-below::after,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context.is-below::after {
  top: auto;
  bottom: 100%;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

[data-qingagent-doc-panel] .graph-diagram-context--above,
[data-drawio-editor-host="true"] .graph-diagram-context--above,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context--above {
  transform: translate(-50%, -100%);
}

[data-qingagent-doc-panel] .graph-diagram-context--below,
[data-drawio-editor-host="true"] .graph-diagram-context--below,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context--below {
  transform: translateX(-50%);
}

[data-qingagent-doc-panel] .graph-diagram-context__hint,
[data-drawio-editor-host="true"] .graph-diagram-context__hint,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context__hint {
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}

[data-qingagent-doc-panel] .graph-diagram-toolbar__row,
[data-drawio-editor-host="true"] .graph-diagram-toolbar__row,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: min(92vw, 560px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-qingagent-doc-panel] .graph-diagram-toolbar__button,
[data-drawio-editor-host="true"] .graph-diagram-toolbar__button,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 32px;
  min-width: 32px;
  max-width: 120px;
  height: 26px;
  padding: 0 6px !important;
  border: 0;
  border-radius:0;
  background: transparent;
  white-space: nowrap;
  box-shadow: none;
}

[data-qingagent-doc-panel] .graph-diagram-context .dt-btn,
[data-drawio-editor-host="true"] .graph-diagram-context .dt-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context .dt-btn,
[data-qingagent-doc-panel] .graph-diagram-context .dt-mi,
[data-drawio-editor-host="true"] .graph-diagram-context .dt-mi,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context .dt-mi {
  border-color: transparent;
  background: transparent;
  color: var(--ink-on-dark);
  font-family: var(--font-zh-serif);
}

[data-qingagent-doc-panel] .graph-diagram-context .dt-btn:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-context .dt-btn:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context .dt-btn:hover:not(:disabled),
[data-qingagent-doc-panel] .graph-diagram-context .dt-mi:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-context .dt-mi:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context .dt-mi:hover:not(:disabled) {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink-on-dark);
}

[data-qingagent-doc-panel] .graph-diagram-toolbar__button:has(.graph-diagram-toolbar__value),
[data-drawio-editor-host="true"] .graph-diagram-toolbar__button:has(.graph-diagram-toolbar__value),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__button:has(.graph-diagram-toolbar__value) {
  width: auto;
}

[data-qingagent-doc-panel] .graph-diagram-icon,
[data-drawio-editor-host="true"] .graph-diagram-icon,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* 填充/边框触发钮的色样圆点放大到与 dt-swatch 色块同一档视觉直径(约 18px)。 */
[data-qingagent-doc-panel] .graph-diagram-toolbar__button .graph-diagram-icon:has(.graph-diagram-icon__color-sample),
[data-drawio-editor-host="true"] .graph-diagram-toolbar__button .graph-diagram-icon:has(.graph-diagram-icon__color-sample),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__button .graph-diagram-icon:has(.graph-diagram-icon__color-sample) {
  width: 20px;
  height: 20px;
}

[data-qingagent-doc-panel] .graph-diagram-icon__color-sample--fill,
[data-drawio-editor-host="true"] .graph-diagram-icon__color-sample--fill,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon__color-sample--fill {
  r: 9;
}

[data-qingagent-doc-panel] .graph-diagram-icon__color-sample--border,
[data-drawio-editor-host="true"] .graph-diagram-icon__color-sample--border,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon__color-sample--border {
  r: 8;
  stroke-width: 3;
}

[data-qingagent-doc-panel] .graph-diagram-toolbar__button.is-active,
[data-drawio-editor-host="true"] .graph-diagram-toolbar__button.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__button.is-active,
[data-qingagent-doc-panel] .graph-diagram-toolbar__button:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-toolbar__button:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__button:hover:not(:disabled) {
  border-color: var(--line-3);
  background: var(--mark-soft);
  color: var(--mark);
}

[data-qingagent-doc-panel] .graph-diagram-toolbar__value,
[data-drawio-editor-host="true"] .graph-diagram-toolbar__value,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__value {
  max-width: 76px;
  overflow: hidden;
  color: var(--ink-on-dark);
  text-overflow: ellipsis;
}

[data-qingagent-doc-panel] .graph-diagram-toolbar__caret,
[data-drawio-editor-host="true"] .graph-diagram-toolbar__caret,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 250, 240, 0.62);
}

[data-qingagent-doc-panel] .graph-diagram-popover,
[data-drawio-editor-host="true"] .graph-diagram-popover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-popover {
  position: absolute;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: max-content;
  min-width: 230px;
  max-width: min(92vw, 360px);
  max-height: min(56vh, 420px);
  padding: 10px;
  border: 1px solid #3a3328;
  border-radius:0;
  background: var(--ink-1);
  color: var(--ink-on-dark);
  overflow: auto;
  transform: translateX(-50%);
  box-shadow: 0 18px 42px rgba(47, 42, 34, 0.18);
}

[data-qingagent-doc-panel] .graph-diagram-context--above .graph-diagram-popover,
[data-drawio-editor-host="true"] .graph-diagram-context--above .graph-diagram-popover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context--above .graph-diagram-popover {
  top: auto;
  bottom: calc(100% + 8px);
}

[data-qingagent-doc-panel] .graph-diagram-context--below .graph-diagram-popover,
[data-drawio-editor-host="true"] .graph-diagram-context--below .graph-diagram-popover,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context--below .graph-diagram-popover {
  top: calc(100% + 8px);
  bottom: auto;
}

[data-qingagent-doc-panel] .graph-diagram-popover--menu,
[data-drawio-editor-host="true"] .graph-diagram-popover--menu,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-popover--menu {
  min-width: 210px;
  padding: 6px;
}

[data-qingagent-doc-panel] .graph-diagram-menu-item,
[data-drawio-editor-host="true"] .graph-diagram-menu-item,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  height: 32px;
  padding: 0 8px !important;
  border-color: transparent !important;
  background: transparent;
  text-align: left;
}

[data-qingagent-doc-panel] .graph-diagram-menu-item:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-menu-item:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-menu-item:hover:not(:disabled) {
  background: var(--mark-soft);
}

/* 破坏性菜单项(解散分区/删除节点/删除连线)按惯例用红字提示后果;
   这条只管菜单项文字,报错呈现仍守"不出红"的铁律。 */
[data-qingagent-doc-panel] .graph-diagram-context .graph-diagram-menu-item.is-danger,
[data-drawio-editor-host="true"] .graph-diagram-context .graph-diagram-menu-item.is-danger,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context .graph-diagram-menu-item.is-danger {
  color: #e2705d;
}

[data-qingagent-doc-panel] .graph-diagram-context .graph-diagram-menu-item.is-danger:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-context .graph-diagram-menu-item.is-danger:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context .graph-diagram-menu-item.is-danger:hover:not(:disabled) {
  background: rgba(226, 112, 93, 0.16);
  color: #f0897a;
}

[data-qingagent-doc-panel] .graph-diagram-menu-item kbd,
[data-drawio-editor-host="true"] .graph-diagram-menu-item kbd,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-menu-item kbd {
  min-width: 34px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius:0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 250, 240, 0.58);
  font: 11px/1.4 var(--font-mono);
  text-align: center;
}

/* 弹层小标题与分隔线(边框/形状弹层照分组排布)。 */
[data-qingagent-doc-panel] .graph-diagram-popover__title,
[data-drawio-editor-host="true"] .graph-diagram-popover__title,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-popover__title {
  color: rgba(255, 250, 240, 0.66);
  font-size: 12px;
  line-height: 1.4;
}

[data-qingagent-doc-panel] .graph-diagram-popover__divider,
[data-drawio-editor-host="true"] .graph-diagram-popover__divider,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-popover__divider {
  height: 1px;
  margin: 2px 0;
  background: rgba(255, 255, 255, 0.14);
}

/* 线型/线宽这类等宽小钮成行排布。 */
[data-qingagent-doc-panel] .graph-diagram-option-row,
[data-drawio-editor-host="true"] .graph-diagram-option-row,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-option-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-qingagent-doc-panel] .graph-diagram-option-btn,
[data-drawio-editor-host="true"] .graph-diagram-option-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-option-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 250, 240, 0.82);
  cursor: pointer;
}

[data-qingagent-doc-panel] .graph-diagram-option-btn svg,
[data-drawio-editor-host="true"] .graph-diagram-option-btn svg,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-option-btn svg {
  width: 20px;
  height: 20px;
}

[data-qingagent-doc-panel] .graph-diagram-option-btn:hover:not(:disabled),
[data-drawio-editor-host="true"] .graph-diagram-option-btn:hover:not(:disabled),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-option-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

[data-qingagent-doc-panel] .graph-diagram-option-btn.is-active,
[data-drawio-editor-host="true"] .graph-diagram-option-btn.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-option-btn.is-active {
  border-color: var(--mark);
  background: color-mix(in srgb, var(--mark) 32%, transparent);
  color: #fffaf0;
}

[data-qingagent-doc-panel] .graph-diagram-option-btn:disabled,
[data-drawio-editor-host="true"] .graph-diagram-option-btn:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

[data-qingagent-doc-panel] .graph-diagram-width-dot,
[data-drawio-editor-host="true"] .graph-diagram-width-dot,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-width-dot {
  display: block;
  border-radius: 999px;
  background: currentColor;
}

/* 色板两行:格子/色块/无色/hover 全部走正文工具栏的 dt-swatch 体系(workspace.css 单一定义),
   这里只补图表侧特有的"当前选中"描边与「+」自定义格。 */
[data-qingagent-doc-panel] .graph-diagram-swatch-panel,
[data-drawio-editor-host="true"] .graph-diagram-swatch-panel,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-swatch-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

[data-qingagent-doc-panel] .graph-diagram-editor .dt-swatch.is-active .dt-swatch-chip,
[data-drawio-editor-host="true"] .graph-diagram-editor .dt-swatch.is-active .dt-swatch-chip,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .dt-swatch.is-active .dt-swatch-chip,
[data-qingagent-doc-panel] .graph-diagram-editor .dt-swatch.is-active .dt-color-none,
[data-drawio-editor-host="true"] .graph-diagram-editor .dt-swatch.is-active .dt-color-none,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .dt-swatch.is-active .dt-color-none {
  box-shadow: 0 0 0 2px var(--ink-1), 0 0 0 3.5px var(--mark);
}

[data-qingagent-doc-panel] .graph-diagram-swatch-custom,
[data-drawio-editor-host="true"] .graph-diagram-swatch-custom,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-swatch-custom {
  position: relative;
}

[data-qingagent-doc-panel] .graph-diagram-editor .graph-diagram-swatch-custom .dt-swatch-chip,
[data-drawio-editor-host="true"] .graph-diagram-editor .graph-diagram-swatch-custom .dt-swatch-chip,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor .graph-diagram-swatch-custom .dt-swatch-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 250, 240, 0.86);
  font: 600 12px/1 var(--font-zh-serif);
  box-shadow: none;
}

[data-qingagent-doc-panel] .graph-diagram-swatch-custom input[type="color"],
[data-drawio-editor-host="true"] .graph-diagram-swatch-custom input[type="color"],
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-swatch-custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

[data-qingagent-doc-panel] .graph-diagram-shape-grid,
[data-drawio-editor-host="true"] .graph-diagram-shape-grid,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-shape-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

[data-qingagent-doc-panel] .graph-diagram-popover--shape,
[data-drawio-editor-host="true"] .graph-diagram-popover--shape,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-popover--shape {
  min-width: 236px;
}

[data-qingagent-doc-panel] .graph-diagram-shape-btn,
[data-drawio-editor-host="true"] .graph-diagram-shape-btn,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-shape-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  min-width: 0;
  padding: 0 !important;
  border: 1px solid transparent;
}

/* 迷你形状预览换一套适配深色浮层的描边填充(几何仍与画布同源)。 */
[data-qingagent-doc-panel] .graph-diagram-shape-glyph,
[data-drawio-editor-host="true"] .graph-diagram-shape-glyph,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-shape-glyph {
  --graph-node-fill: rgba(255, 250, 240, 0.14);
  --graph-node-stroke: rgba(255, 250, 240, 0.76);
  --graph-node-stroke-width: 3px;
  display: block;
  width: 26px;
  height: 18px;
  overflow: visible;
}

[data-qingagent-doc-panel] .graph-diagram-shape-btn.is-active,
[data-drawio-editor-host="true"] .graph-diagram-shape-btn.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-shape-btn.is-active {
  border-color: var(--mark);
  background: color-mix(in srgb, var(--mark) 32%, transparent);
}

[data-qingagent-doc-panel] .graph-diagram-shape-btn.is-active .graph-diagram-shape-glyph,
[data-drawio-editor-host="true"] .graph-diagram-shape-btn.is-active .graph-diagram-shape-glyph,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-shape-btn.is-active .graph-diagram-shape-glyph {
  --graph-node-stroke: #fffaf0;
}

/* 形状触发钮:图形在按钮盒里居中,背景高亮块与其他钮同规格(此前图形偏出高亮块)。 */
[data-qingagent-doc-panel] .graph-diagram-toolbar__button .graph-diagram-shape-glyph,
[data-drawio-editor-host="true"] .graph-diagram-toolbar__button .graph-diagram-shape-glyph,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__button .graph-diagram-shape-glyph {
  width: 20px;
  height: 14px;
  flex: 0 0 auto;
  margin: 0 auto;
}

[data-qingagent-doc-panel] .graph-diagram-toolbar__button:has(.graph-diagram-shape-glyph),
[data-drawio-editor-host="true"] .graph-diagram-toolbar__button:has(.graph-diagram-shape-glyph),
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__button:has(.graph-diagram-shape-glyph) {
  /* 图标 + 尖角比默认 32px 宽,固定宽会让高亮块包不住内容(常态/hover/选中三态都错位);
     改为按内容自适应,盒与内容始终同心。 */
  width: auto;
  min-width: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px !important;
}

[data-qingagent-doc-panel] .graph-diagram-icon-options,
[data-drawio-editor-host="true"] .graph-diagram-icon-options,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

[data-qingagent-doc-panel] .graph-diagram-icon-options__label,
[data-drawio-editor-host="true"] .graph-diagram-icon-options__label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon-options__label {
  color: rgba(255, 250, 240, 0.66);
  font-size: 12px;
}

[data-qingagent-doc-panel] .graph-diagram-icon-options__row,
[data-drawio-editor-host="true"] .graph-diagram-icon-options__row,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon-options__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-qingagent-doc-panel] .graph-diagram-icon-option,
[data-drawio-editor-host="true"] .graph-diagram-icon-option,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  padding: 0 !important;
  border-radius:0;
  background: #fffaf0;
}

[data-qingagent-doc-panel] .graph-diagram-icon-option.is-active,
[data-drawio-editor-host="true"] .graph-diagram-icon-option.is-active,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-icon-option.is-active {
  border-color: var(--mark);
  background: var(--mark-soft);
  color: var(--mark);
}

[data-qingagent-doc-panel] .graph-diagram-color-control,
[data-drawio-editor-host="true"] .graph-diagram-color-control,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-color-control {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

[data-qingagent-doc-panel] .graph-diagram-color-control__row,
[data-drawio-editor-host="true"] .graph-diagram-color-control__row,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-color-control__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

[data-qingagent-doc-panel] .graph-diagram-color-control__custom,
[data-drawio-editor-host="true"] .graph-diagram-color-control__custom,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-color-control__custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 250, 240, 0.66);
  font-size: 12px;
  white-space: nowrap;
}

[data-qingagent-doc-panel] .graph-diagram-color-control input[type="color"],
[data-drawio-editor-host="true"] .graph-diagram-color-control input[type="color"],
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-color-control input[type="color"] {
  width: 30px;
  height: 28px;
  padding: 2px;
  border: 1px solid rgba(47, 42, 34, 0.18);
  border-radius:0;
  background: #fffaf0;
  cursor: pointer;
}

[data-qingagent-doc-panel] .graph-diagram-color-control input[type="color"]:disabled,
[data-drawio-editor-host="true"] .graph-diagram-color-control input[type="color"]:disabled,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-color-control input[type="color"]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}


[data-qingagent-doc-panel] .graph-diagram-range-control,
[data-drawio-editor-host="true"] .graph-diagram-range-control,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-range-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

[data-qingagent-doc-panel] .graph-diagram-range-control__header,
[data-drawio-editor-host="true"] .graph-diagram-range-control__header,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-range-control__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 250, 240, 0.66);
  font-size: 12px;
}

[data-qingagent-doc-panel] .graph-diagram-range-control__header label,
[data-drawio-editor-host="true"] .graph-diagram-range-control__header label,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-range-control__header label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-qingagent-doc-panel] .graph-diagram-range-control input[type="number"],
[data-drawio-editor-host="true"] .graph-diagram-range-control input[type="number"],
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-range-control input[type="number"] {
  width: 58px;
  height: 26px;
  box-sizing: border-box;
  border: 1px solid rgba(47, 42, 34, 0.16);
  border-radius:0;
  background: #fffaf0;
  color: var(--ink-1);
  font: inherit;
  text-align: center;
}

[data-qingagent-doc-panel] .graph-diagram-range-control input[type="range"],
[data-drawio-editor-host="true"] .graph-diagram-range-control input[type="range"],
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-range-control input[type="range"] {
  width: 100%;
  accent-color: var(--mark);
}

[data-qingagent-doc-panel] .graph-diagram-error,
[data-drawio-editor-host="true"] .graph-diagram-error,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-error {
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  background: var(--bg-hover);
  color: var(--ink-2);
  font-size: 12px;
}

[data-qingagent-doc-panel] .graph-diagram-error--floating,
[data-drawio-editor-host="true"] .graph-diagram-error--floating,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-error--floating {
  position: absolute;
  z-index: 10;
  top: 70px;
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  border-radius:0;
  transform: translateX(-50%);
  box-shadow: 0 10px 24px rgba(47, 42, 34, 0.12);
}

[data-qingagent-doc-panel] .graph-diagram-export,
[data-drawio-editor-host="true"] .graph-diagram-export,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-export {
  display: none;
}

@media (max-width: 640px) {
  [data-qingagent-doc-panel] .graph-diagram-editor,
[data-drawio-editor-host="true"] .graph-diagram-editor,
body:has([data-qingagent-doc-panel]) > .graph-diagram-editor {
    padding: 10px;
  }

  [data-qingagent-doc-panel] .graph-diagram-editor__topbar,
[data-drawio-editor-host="true"] .graph-diagram-editor__topbar,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-editor__topbar {
    align-items: center;
    flex-direction: row;
  }

  [data-qingagent-doc-panel] .graph-diagram-context,
[data-drawio-editor-host="true"] .graph-diagram-context,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-context {
    max-width: calc(100vw - 20px);
  }

  [data-qingagent-doc-panel] .graph-diagram-toolbar__row,
[data-drawio-editor-host="true"] .graph-diagram-toolbar__row,
body:has([data-qingagent-doc-panel]) > :is(.media-zoom-fullscreen, .graph-diagram-editor, .graph-diagram-viewer) .graph-diagram-toolbar__row {
    flex-wrap: wrap;
    max-width: calc(100vw - 20px);
  }
}
/* 纸内功能区几何换算:产品 top 64 = 纸上留白 52 + 纸内缩 12,right 18 以
   「滚动容器宽=纸宽」为前提;插件纸上留白为 0 且容器弹性全宽,尾部宿主适配
   逐件居中纸面以对半分配富余,换算为:顶=纸内缩 12,右=纸右缘往内 18。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-docfns {
  top: 12px;
  right: max(18px, calc((100% - min(var(--ws-paper-column-width), 100%)) / 2 + 18px));
}


/* dsh 宿主适配:列背景透明,顶部 36px 间隔露出面板深色底,纸张自身保持奶白。 */
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-right {
  background: transparent;
  /* 青简桌面是 400/800 双定宽列,纸列宽以整窗 100vw 计;dsh 里纸列=整个详情面板,
     必须回归弹性,否则列窄于 800 时纸面连同滚动条一起溢出被裁(用户实测「没有滚动条」)。 */
  /* !important:产品侧同选择器规则(ink-skin:141-146)本身带 !important 固定 800,
     不带就永远输,窄列时纸面被 overflow:hidden 静默裁切(2026-08-16 #34 实测)。 */
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .wf-doc,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-shell,
:is([data-qingagent-doc-panel], #qingagent-doc-panel-specificity) .ws-paper-surface {
  max-width: min(800px, 100%);
  /* shell 是绝对定位且源规则只钉了 left:0;双向 offset + auto margin 才居中。
     对 relative 的另两者 right:0 不产生位移;逐件 auto margin 不改变其它 flex 子项。 */
  right: 0;
  margin-inline: auto;
}
