﻿/* styles/workbench.css v13 — standalone workbench page + three-panel KB
 * Scope: body.in-workbench and .view-workbench.
 */

.is-hidden {
    display: none !important;
}

/* In workbench mode, hide home's top header */
body.in-workbench .top {
    display: none !important;
}

body.in-workbench {
    background: #F3F4F6;
    height: 100vh;
    overflow: hidden;
}

body.in-workbench[data-mode="dark"] {
    background: #0F1115;
}

/* ===== Scene-themed backgrounds (matches home page ambient colors) ===== */
body.in-workbench[data-scene="learn"][data-mode="light"] {
    background: #f5efe1;
}

body.in-workbench[data-scene="learn"][data-mode="dark"] {
    background: #1c160e;
}

body.in-workbench[data-scene="work"][data-mode="dark"] {
    background: #07090d;
}

body.in-workbench[data-scene="work"][data-mode="light"] {
    background: #f4f5f8;
}

body.in-workbench[data-scene="life"][data-mode="light"] {
    background: #fff6ee;
}

body.in-workbench[data-scene="life"][data-mode="dark"] {
    background: #1a0f26;
}

/* Workbench page without body.in-workbench (standalone workbench.html) */
body:not(.in-workbench) {
    transition: background-color .5s ease;
}

body:not(.in-workbench)[data-scene="learn"][data-mode="light"] {
    background: #f5efe1;
}

body:not(.in-workbench)[data-scene="learn"][data-mode="dark"] {
    background: #1c160e;
}

body:not(.in-workbench)[data-scene="work"][data-mode="dark"] {
    background: #07090d;
}

body:not(.in-workbench)[data-scene="work"][data-mode="light"] {
    background: #f4f5f8;
}

body:not(.in-workbench)[data-scene="life"][data-mode="light"] {
    background: #fff6ee;
}

body:not(.in-workbench)[data-scene="life"][data-mode="dark"] {
    background: #1a0f26;
}

/* ===== Blank scene CSS variables (fallback for workbench default) ===== */
body[data-scene="blank"][data-mode="light"] {
    --bg: #E8EBF0;
    --bg-elev: #FFFFFF;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-2: rgba(218, 223, 234, 0.90);
    --surface-3: rgba(198, 205, 220, 0.96);
    --border: rgba(30, 42, 80, 0.12);
    --border-2: rgba(30, 42, 80, 0.22);
    --text: #111827;
    --muted: #6B7280;
    --faint: #9CA3AF;
    --accent: #3B82F6;
    --accent-soft: rgba(59, 130, 246, 0.12);
}

body[data-scene="blank"][data-mode="dark"] {
    --bg: #0B0D12;
    --bg-elev: #181B22;
    --surface: rgba(22, 25, 32, 0.90);
    --surface-2: rgba(12, 14, 20, 0.94);
    --surface-3: rgba(8, 10, 16, 0.98);
    --border: rgba(255, 255, 255, 0.07);
    --border-2: rgba(255, 255, 255, 0.14);
    --text: #E5E7EB;
    --muted: #9CA3AF;
    --faint: #6B7280;
    --accent: #3B82F6;
    --accent-soft: rgba(59, 130, 246, 0.18);
}

.view-workbench {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;

    /* Bridge to main.css scene variables — auto-adapts on theme switch */
    --wb-bg-body: var(--bg, #F3F4F6);
    --wb-bg-panel: var(--surface, rgba(255, 255, 255, 0.72));
    --wb-bg-hover: var(--surface-2, rgba(229, 231, 235, 0.80));
    --wb-bg-active: var(--surface-3, rgba(209, 213, 219, 0.88));
    --wb-bg-chat: var(--bg-elev, rgba(249, 250, 251, 0.90));
    --wb-text-main: var(--text, #111827);
    --wb-text-muted: var(--muted, #6B7280);
    --wb-text-light: var(--faint, #9CA3AF);
    --wb-border: var(--border, rgba(229, 231, 235, 0.70));
    --wb-accent: #3B82F6;
    --wb-accent-bg: var(--accent-soft, #EFF6FF);
    --wb-header-h: 40px;
    --wb-left-w: 260px;
    --wb-right-w: 340px;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wb-text-main);
    background: transparent;
}

.view-workbench * {
    box-sizing: border-box;
}

.view-workbench button,
.view-workbench input,
.view-workbench textarea,
.view-workbench select {
    font-family: inherit;
}

.view-workbench ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.view-workbench ::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
}

.view-workbench *:hover::-webkit-scrollbar-thumb {
    background: var(--wb-text-light);
}

/* ===== Header ===== */
.wb-header {
    height: var(--wb-header-h);
    background: var(--wb-bg-body);
    border-bottom: 1px solid var(--wb-border);
    display: flex;
    align-items: center;
    padding: 0 16px 0 0;
    flex-shrink: 0;
    user-select: none;
    transition: background-color .5s ease, border-color .5s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
}

.wb-h-left {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 16px;
    width: var(--wb-left-w);
    flex-shrink: 0;
    gap: 8px;
}

.wb-logo {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wb-text-main);
    cursor: pointer;
    background: none;
    border: none;
}

.wb-h-tabs {
    flex: 1;
    display: flex;
    align-items: center;
    height: 100%;
    overflow-x: auto;
    padding-left: 8px;
    gap: 2px;
    min-width: 0;
}

.wb-h-tabs::-webkit-scrollbar {
    display: none;
}

.wb-tab {
    height: 100%;
    padding: 0 12px;
    color: var(--wb-text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    min-width: 120px;
    max-width: 220px;
    z-index: 1;
    border: none;
    background: transparent;
}

.wb-tab::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    z-index: -1;
    transition: 0.15s;
}

.wb-tab:hover::before {
    background: rgba(0, 0, 0, 0.04);
}

[data-mode="dark"] .wb-tab:hover::before {
    background: rgba(255, 255, 255, 0.05);
}

.wb-tab.is-active {
    color: var(--wb-text-main);
    font-weight: 500;
}

.wb-tab.is-active::before {
    background: var(--wb-bg-panel);
    border-color: var(--wb-border);
}

.wb-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--wb-bg-panel);
    z-index: 2;
}

.wb-tab-icon {
    font-size: 13px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.wb-tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-tab-close {
    font-size: 14px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0;
    margin-right: -4px;
    color: var(--wb-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.wb-tab:hover .wb-tab-close {
    opacity: 1;
}

.wb-tab-close:hover {
    background: var(--wb-bg-hover);
    color: #ef4444;
}

.wb-addtab {
    height: 28px;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--wb-text-muted);
    margin-left: 4px;
    background: none;
    border: none;
    font-size: 16px;
    flex-shrink: 0;
}

.wb-addtab:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-h-right {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 12px;
}

.wb-iconbtn {
    background: none;
    border: none;
    color: var(--wb-text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    font-size: 14px;
}

.wb-mode-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Theme dropdown */
.wb-theme-dd {
    position: relative;
}

.wb-theme-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--wb-bg-panel);
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    padding: 4px;
    min-width: 80px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

[data-mode="dark"] .wb-theme-pop {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

.wb-theme-item {
    padding: 7px 10px;
    border: none;
    border-radius: 5px;
    background: none;
    color: var(--wb-text-muted);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    transition: 0.12s;
}

.wb-theme-item:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-theme-item.is-active {
    background: color-mix(in srgb, var(--wb-accent) 12%, transparent);
    color: var(--wb-accent);
    font-weight: 500;
}

/* Model selector dropdown */
.wb-model-dd {
    position: relative;
}

.wb-model-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    background: var(--wb-bg-body);
    color: var(--wb-text-muted);
    font-size: 11.5px;
    cursor: pointer;
    transition: 0.12s;
    max-width: 140px;
}

.wb-model-btn:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-model-btn span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-model-chev {
    display: flex;
    opacity: 0.6;
}

.wb-model-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--wb-bg-panel);
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    padding: 4px;
    min-width: 140px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

[data-mode="dark"] .wb-model-pop {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

.wb-model-item {
    padding: 7px 10px;
    border: none;
    border-radius: 5px;
    background: none;
    color: var(--wb-text-muted);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    transition: 0.12s;
}

.wb-model-item:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-model-item.is-active {
    background: color-mix(in srgb, var(--wb-accent) 12%, transparent);
    color: var(--wb-accent);
    font-weight: 500;
}

.wb-iconbtn:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

/* ===== Workspace ===== */
.wb-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.wb-panel {
    background: var(--wb-bg-panel);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 0;
    transition: background-color .5s ease, border-color .5s ease;
}

.wb-left {
    width: var(--wb-left-w);
    border-right: 1px solid var(--wb-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: background-color .5s ease, border-color .5s ease;
    /* Sidebar is visually recessed vs. the bright editor center */
    background: var(--wb-bg-hover);
}

/* ===== R3 左栏三栏：目录 / 图谱 / 大纲 ===== */
.wb-left-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 8px 6px;
    border-bottom: 1px solid var(--wb-border);
}

.wb-left-tab {
    flex: 1;
    padding: 5px 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--wb-text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.wb-left-tab:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-left-tab.is-active {
    background: color-mix(in srgb, var(--wb-accent, #6b5bff) 14%, transparent);
    color: var(--wb-accent, #6b5bff);
}

.wb-left-add {
    width: 24px;
    height: 24px;
    font-size: 14px;
    flex: none;
}

.wb-left-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.wb-left-pane {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.wb-left-pane[hidden] {
    display: none;
}

.wb-left-empty {
    margin: auto;
    padding: 24px 16px;
    text-align: center;
    color: var(--wb-text-light);
    font-size: 12px;
    line-height: 1.8;
}

.wb-left-empty small {
    color: var(--wb-text-light);
    opacity: .7;
}

.wb-outline {
    flex: 1;
    overflow-y: auto;
    padding: 8px 8px 12px;
}

.wb-ol-item {
    display: block;
    width: 100%;
    padding: 5px 8px;
    border: none;
    border-left: 2px solid transparent;
    border-radius: 0 5px 5px 0;
    background: transparent;
    color: var(--wb-text-muted);
    font-size: 12.5px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

.wb-ol-item:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
    border-left-color: var(--wb-accent, #6b5bff);
}

/* ===== R5 双链 wiki-link ===== */
.wb-editor .ProseMirror .wb-wikilink {
    display: inline;
    padding: 0 3px;
    border-radius: 4px;
    color: var(--wb-accent, #6b5bff);
    background: color-mix(in srgb, var(--wb-accent, #6b5bff) 10%, transparent);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s;
}

.wb-editor .ProseMirror .wb-wikilink:hover {
    background: color-mix(in srgb, var(--wb-accent, #6b5bff) 22%, transparent);
}

/* ===== R5 知识图谱 ===== */
.wb-left-pane[data-lpane="graph"] {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.wb-graph-toolbar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 8px 4px;
    border-bottom: 1px solid var(--wb-border);
    flex-shrink: 0;
}

.wb-graph-filter {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    background: var(--wb-bg-body);
    color: var(--wb-text-main);
    font-size: 12px;
    outline: none;
}

.wb-graph-filter:focus {
    border-color: var(--wb-accent);
}

.wb-graph-modes {
    display: flex;
    gap: 2px;
}

.wb-graph-mode {
    flex: 1;
    padding: 4px 2px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--wb-text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.wb-graph-mode:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-graph-mode.is-active {
    background: color-mix(in srgb, var(--wb-accent, #6b5bff) 14%, transparent);
    color: var(--wb-accent, #6b5bff);
    font-weight: 500;
}

.wb-graph-canvas {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.wb-graph-edge.is-folder {
    stroke-dasharray: 4 3;
    opacity: .5;
}

.wb-graph-node.is-folder-node rect {
    transition: stroke-width .12s;
}

.wb-graph-node.is-folder-node:hover rect {
    stroke: var(--wb-accent, #6b5bff);
    stroke-width: 2;
}

.wb-graph-node.is-tag-node circle {
    stroke-dasharray: 3 2;
}

/* 大纲图标 */
.wb-ol-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    flex-shrink: 0;
    opacity: .6;
    vertical-align: middle;
}

.wb-graph-svg {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.wb-graph-svg:active {
    cursor: grabbing;
}

.wb-graph-edge {
    stroke: var(--wb-border);
    stroke-width: 1;
    opacity: .7;
    transition: opacity .15s, stroke .15s, stroke-width .15s;
}

.wb-graph-edge.is-hot {
    stroke: var(--wb-accent, #6b5bff);
    stroke-width: 1.6;
    opacity: 1;
}

.wb-graph-edge.is-dim {
    opacity: .12;
}

.wb-graph-label {
    font-size: 9px;
    fill: var(--wb-text-muted);
    pointer-events: none;
}

.wb-graph-node {
    transition: opacity .15s;
}

.wb-graph-node circle {
    transition: stroke-width .12s, r .12s;
}

.wb-graph-node:hover circle {
    stroke: var(--wb-accent, #6b5bff);
    stroke-width: 2.5;
}

.wb-graph-node.is-near circle {
    stroke: var(--wb-accent, #6b5bff);
    stroke-width: 1.8;
}

.wb-graph-node.is-active circle {
    stroke: var(--wb-accent, #6b5bff);
    stroke-width: 3;
}

.wb-graph-node.is-active .wb-graph-label {
    fill: var(--wb-accent, #6b5bff);
    font-weight: 600;
}

.wb-graph-node.is-ghost circle {
    stroke-dasharray: 3 2;
}

.wb-graph-node.is-ghost .wb-graph-label {
    fill: var(--wb-text-light);
}

.wb-graph-node.is-dim {
    opacity: .22;
}

.wb-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-top: 1px solid var(--wb-border);
    position: relative;
}

.wb-right {
    width: var(--wb-right-w);
    border-left: 1px solid var(--wb-border);
    /* Match left sidebar, not a separate chat color */
    background: var(--wb-bg-hover);
    transition: background-color .5s ease, border-color .5s ease;
    display: flex;
    flex-direction: column;
}

/* ===== Left tree ===== */
.wb-left-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 8px;
    gap: 4px;
}

.wb-left-head .wb-iconbtn {
    width: 24px;
    height: 24px;
    font-size: 14px;
}

.wb-left-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--wb-text-muted);
    padding: 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wb-tree {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 12px;
    font-size: 13px;
}

.wb-node {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--wb-text-muted);
    user-select: none;
    gap: 6px;
}

.wb-node:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-node.is-active {
    background: var(--wb-accent-bg);
    color: var(--wb-accent);
    font-weight: 500;
}

.wb-node-arrow {
    width: 14px;
    display: inline-block;
    text-align: center;
    transition: transform 0.2s;
    font-size: 10px;
    flex-shrink: 0;
}

.wb-folder.is-open>.wb-node>.wb-node-arrow {
    transform: rotate(90deg);
}

.wb-children {
    display: none;
    padding-left: 12px;
    margin-left: 6px;
    border-left: 1px solid var(--wb-border);
}

.wb-folder.is-open>.wb-children {
    display: block;
}

.wb-node-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.wb-node-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-node.is-pinned .wb-node-label {
    font-weight: 600;
}

.wb-node-pin {
    opacity: 0;
    background: none;
    border: none;
    color: var(--wb-text-light);
    cursor: pointer;
    font-size: 11px;
    padding: 0 3px;
    border-radius: 3px;
    line-height: 1;
}

.wb-node.is-pinned .wb-node-pin {
    opacity: 1;
}

.wb-node-pin:hover {
    color: var(--wb-accent);
    background: var(--wb-bg-hover);
}

.wb-tree.is-dragover {
    outline: 2px dashed var(--wb-accent);
    outline-offset: -2px;
    border-radius: 8px;
    background: var(--wb-accent-bg);
}

.wb-node-del {
    opacity: 0;
    background: none;
    border: none;
    color: var(--wb-text-light);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    border-radius: 3px;
}

.wb-node:hover .wb-node-del,
.wb-node:hover .wb-node-pin {
    opacity: 1;
}

.wb-node-del:hover {
    color: #ef4444;
    background: var(--wb-bg-hover);
}

/* 右键菜单 */
.wb-ctx-menu {
    position: fixed;
    z-index: 10050;
    min-width: 168px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

[data-mode="dark"] .wb-ctx-menu {
    background: #1e2026;
}

.wb-ctx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--wb-text-main);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.wb-ctx-item:hover,
.wb-ctx-item.is-active {
    background: var(--wb-bg-hover);
}

.wb-ctx-item.is-danger {
    color: #ef4444;
}

.wb-ctx-item.is-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.wb-ctx-sep {
    height: 1px;
    margin: 4px 6px;
    background: var(--wb-border);
}

.wb-ctx-item.has-sub {
    position: relative;
}

.wb-ctx-item.has-sub::after {
    content: '›';
    opacity: 0.5;
    margin-left: 8px;
}

.wb-ctx-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -4px;
    min-width: 140px;
    padding: 4px;
    margin-left: 4px;
    background: #ffffff;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

[data-mode="dark"] .wb-ctx-submenu {
    background: #1e2026;
}

.wb-ctx-item.has-sub:hover>.wb-ctx-submenu,
.wb-ctx-item.has-sub.is-open>.wb-ctx-submenu {
    display: block;
}

.wb-new-folder-btn {
    display: block;
    width: calc(100% - 16px);
    margin: 4px 8px 8px;
    padding: 7px 10px;
    border: 1px dashed var(--wb-border);
    border-radius: 6px;
    background: transparent;
    color: var(--wb-text-muted);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.wb-new-folder-btn:hover {
    border-color: var(--wb-accent);
    color: var(--wb-accent);
    background: var(--wb-accent-bg);
}

.wb-folder-create {
    padding: 4px 8px 8px 20px;
}

.wb-folder-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid var(--wb-accent);
    border-radius: 6px;
    background: var(--wb-bg-body);
    color: var(--wb-text-main);
    font-size: 13px;
    outline: none;
}

.wb-empty-hint {
    padding: 6px 14px;
    font-size: 11px;
    color: var(--wb-text-light);
    font-style: italic;
}

/* ===== Middle ===== */
.wb-doctop {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--wb-bg-panel);
    border-bottom: 1px solid var(--wb-border);
    flex-shrink: 0;
    gap: 12px;
}

.wb-breadcrumb {
    font-size: 12px;
    color: var(--wb-text-muted);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-doctools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.wb-tool-group {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.wb-tool-sep {
    width: 1px;
    height: 18px;
    background: var(--wb-border);
    margin: 0 4px;
    flex-shrink: 0;
}

.wb-tool {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--wb-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: background .12s, color .12s;
    white-space: nowrap;
}

.wb-tool svg {
    flex-shrink: 0;
    opacity: .85;
}

.wb-tool:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-tool:hover svg {
    opacity: 1;
}

.wb-tool-accent {
    color: var(--wb-accent);
    font-weight: 500;
}

.wb-tool-accent:hover {
    background: var(--wb-accent-bg);
    color: var(--wb-accent);
}

.wb-tool.is-busy {
    opacity: .55;
    pointer-events: none;
}

.wb-tool-more {
    position: relative;
}

.wb-tool-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 168px;
    padding: 4px;
    background: var(--wb-bg-panel);
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
    z-index: 50;
}

.wb-tool-pop-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wb-text-light);
    padding: 6px 10px 4px;
}

.wb-tool-pop-divider {
    height: 1px;
    background: var(--wb-border);
    margin: 4px 0;
}

.wb-export-themes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 0 4px 4px;
}

.wb-export-theme-item {
    padding: 5px 8px;
    border: 1px solid var(--wb-border);
    border-radius: 5px;
    background: transparent;
    color: var(--wb-text-muted);
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    transition: background .12s, border-color .12s, color .12s;
}

.wb-export-theme-item:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-export-theme-item.is-active {
    background: var(--wb-accent, #6b5bff);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.wb-tool-pop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--wb-text-main);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}

.wb-tool-pop-item:hover {
    background: var(--wb-bg-hover);
}

.wb-tool-pop-item svg {
    flex-shrink: 0;
    color: var(--wb-text-muted);
}

.wb-btn {
    background: var(--wb-bg-panel);
    border: 1px solid var(--wb-border);
    color: var(--wb-text-muted);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    transition: 0.15s;
}

.wb-btn:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-btn-primary {
    background: var(--wb-accent);
    color: #fff;
    border-color: transparent;
}

.wb-btn-primary:hover {
    background: #2563EB;
    color: #fff;
}

.wb-editor-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: var(--wb-bg-panel);
    min-height: 0;
}

.wb-editor {
    position: relative;
    color: var(--wb-text-main);
}

/* ===== 编辑器排版 — Notion/Bear/Typora 风格 ===== */
.wb-editor .ProseMirror {
    outline: none;
    min-height: 60vh;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--wb-text-main);
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    caret-color: var(--wb-accent);
}

.wb-editor .ProseMirror h1 {
    font-size: 2em;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 1.4em 0 0.5em;
    color: var(--wb-text-main);
}

.wb-editor .ProseMirror h1:first-child {
    margin-top: 0;
}

.wb-editor .ProseMirror h2 {
    font-size: 1.5em;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin: 1.6em 0 0.45em;
    padding-bottom: 0.25em;
    border-bottom: 1px solid color-mix(in srgb, var(--wb-border) 70%, transparent);
}

.wb-editor .ProseMirror h3 {
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.35;
    margin: 1.3em 0 0.35em;
    color: var(--wb-text-main);
}

.wb-editor .ProseMirror p {
    margin: 0 0 0.65em;
    min-height: 1.75em;
}

.wb-editor .ProseMirror ul,
.wb-editor .ProseMirror ol {
    margin: 0.25em 0 0.85em;
    padding-left: 1.5em;
}

.wb-editor .ProseMirror li {
    margin: 0.2em 0;
}

.wb-editor .ProseMirror li p {
    margin: 0;
}

.wb-editor .ProseMirror blockquote {
    border-left: 3px solid var(--wb-accent);
    margin: 0.85em 0;
    padding: 0.15em 0 0.15em 1em;
    color: var(--wb-text-muted);
    font-style: normal;
}

.wb-editor .ProseMirror blockquote p {
    margin-bottom: 0.35em;
}

.wb-editor .ProseMirror blockquote p:last-child {
    margin-bottom: 0;
}

.wb-editor .ProseMirror code {
    background: color-mix(in srgb, var(--wb-bg-hover) 80%, var(--wb-accent-bg));
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: "IBM Plex Mono", "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.875em;
    color: #c7254e;
}

body[data-mode="dark"] .wb-editor .ProseMirror code {
    color: #f472b6;
}

.wb-editor .ProseMirror pre {
    background: #282c34;
    color: #abb2bf;
    border: 1px solid color-mix(in srgb, var(--wb-border) 40%, #282c34);
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: "IBM Plex Mono", "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.875em;
    line-height: 1.6;
    margin: 0.85em 0 1em;
}

body[data-mode="dark"] .wb-editor .ProseMirror pre {
    background: #1a1b26;
    border-color: #2a2b3d;
}

.wb-editor .ProseMirror pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.wb-editor .ProseMirror hr {
    border: none;
    height: 1px;
    background: var(--wb-border);
    margin: 1.75em 0;
}

.wb-editor .ProseMirror a {
    color: var(--wb-accent);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--wb-accent) 40%, transparent);
    text-underline-offset: 2px;
    transition: text-decoration-color .12s;
}

.wb-editor .ProseMirror a:hover {
    text-decoration-color: var(--wb-accent);
}

.wb-editor .ProseMirror mark {
    background: #fef08a;
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

body[data-mode="dark"] .wb-editor .ProseMirror mark {
    background: color-mix(in srgb, #fef08a 35%, #422006);
    color: #fef9c3;
}

.wb-editor .ProseMirror img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5em 0;
}

.wb-editor .ProseMirror ::selection {
    background: color-mix(in srgb, var(--wb-accent) 22%, transparent);
}

/* ===== R7-W4 CodeBlockLowlight 语法高亮（精简 hljs 主题） ===== */
.wb-editor .ProseMirror pre .hljs-comment,
.wb-editor .ProseMirror pre .hljs-quote {
    color: #8a919a;
    font-style: italic;
}

.wb-editor .ProseMirror pre .hljs-keyword,
.wb-editor .ProseMirror pre .hljs-selector-tag,
.wb-editor .ProseMirror pre .hljs-built_in,
.wb-editor .ProseMirror pre .hljs-name {
    color: #c678dd;
}

.wb-editor .ProseMirror pre .hljs-string,
.wb-editor .ProseMirror pre .hljs-attr,
.wb-editor .ProseMirror pre .hljs-template-tag {
    color: #98c379;
}

.wb-editor .ProseMirror pre .hljs-number,
.wb-editor .ProseMirror pre .hljs-literal,
.wb-editor .ProseMirror pre .hljs-symbol,
.wb-editor .ProseMirror pre .hljs-bullet {
    color: #d19a66;
}

.wb-editor .ProseMirror pre .hljs-title,
.wb-editor .ProseMirror pre .hljs-function .hljs-title,
.wb-editor .ProseMirror pre .hljs-section {
    color: #61afef;
}

.wb-editor .ProseMirror pre .hljs-type,
.wb-editor .ProseMirror pre .hljs-class .hljs-title {
    color: #e5c07b;
}

.wb-editor .ProseMirror pre .hljs-tag,
.wb-editor .ProseMirror pre .hljs-meta {
    color: #56b6c2;
}

.wb-editor .ProseMirror pre .hljs-emphasis {
    font-style: italic;
}

.wb-editor .ProseMirror pre .hljs-strong {
    font-weight: 600;
}

.wb-editor .ProseMirror p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: var(--wb-text-light);
    pointer-events: none;
    height: 0;
}

/* ===== R7-W2 原生组件：表格 / 任务列表 / 公式 ===== */
.wb-editor .ProseMirror table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    margin: 0.85em 0 1em;
    overflow: hidden;
    font-size: 0.9375em;
    border-radius: 6px;
}

.wb-editor .ProseMirror table td,
.wb-editor .ProseMirror table th {
    border: 1px solid var(--wb-border);
    padding: 8px 12px;
    vertical-align: top;
    box-sizing: border-box;
    position: relative;
}

.wb-editor .ProseMirror table th {
    background: var(--wb-bg-hover);
    font-weight: 600;
    text-align: left;
}

.wb-editor .ProseMirror table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--wb-bg-hover) 45%, transparent);
}

.wb-editor .ProseMirror table p {
    margin: 0;
}

.wb-editor .ProseMirror table .selectedCell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--wb-accent) 16%, transparent);
    pointer-events: none;
}

.wb-editor .ProseMirror table .column-resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--wb-accent);
    cursor: col-resize;
}

/* 任务列表 */
.wb-editor .ProseMirror ul[data-type="taskList"],
.wb-editor .ProseMirror .task-list {
    list-style: none;
    padding-left: 2px;
    margin-left: 0;
}

.wb-editor .ProseMirror ul[data-type="taskList"] li,
.wb-editor .ProseMirror .task-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0.25em 0;
}

.wb-editor .ProseMirror ul[data-type="taskList"] li>label,
.wb-editor .ProseMirror .task-list li>label {
    margin-top: 4px;
    user-select: none;
    flex-shrink: 0;
}

.wb-editor .ProseMirror ul[data-type="taskList"] li>div,
.wb-editor .ProseMirror .task-list li>div {
    flex: 1;
    min-width: 0;
}

.wb-editor .ProseMirror ul[data-type="taskList"] li>div>p,
.wb-editor .ProseMirror .task-list li>div>p {
    margin: 0;
}

.wb-editor .ProseMirror ul[data-type="taskList"] input[type="checkbox"],
.wb-editor .ProseMirror .task-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--wb-accent);
    cursor: pointer;
    border-radius: 3px;
}

.wb-editor .ProseMirror ul[data-type="taskList"] li[data-checked="true"]>div,
.wb-editor .ProseMirror .task-list li[data-checked="true"]>div {
    opacity: 0.55;
    text-decoration: line-through;
    text-decoration-color: var(--wb-text-muted);
}

/* 公式（KaTeX 节点） */
.wb-editor .ProseMirror .tiptap-mathematics-render {
    padding: 0 1px;
}

.wb-editor .ProseMirror [data-type="block-math"],
.wb-editor .ProseMirror .tiptap-mathematics-render--editable[data-type="block-math"] {
    display: block;
    text-align: center;
    margin: 8px 0 16px;
    overflow-x: auto;
}

.wb-editor .ProseMirror .tiptap-mathematics-render.ProseMirror-selectednode,
.wb-editor .ProseMirror .tiptap-mathematics-render:hover {
    background: var(--wb-bg-hover);
    border-radius: 4px;
    cursor: pointer;
}

.wb-emptystate {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wb-text-light);
    gap: 14px;
    font-size: 13px;
    padding: 40px;
    text-align: center;
}

.wb-emptystate h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--wb-text-muted);
    margin: 0;
}

.wb-emptystate .wb-btn-primary {
    font-size: 13px;
    padding: 8px 16px;
    height: auto;
}

/* ===== Right (copilot placeholder) ===== */
.wb-copilot-head {
    height: 40px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--wb-border);
    flex-shrink: 0;
}

.wb-copilot-title {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wb-copilot-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    color: var(--wb-text-light);
    font-size: 12px;
    line-height: 1.7;
}

/* ===== Stream pill ===== */
.wb-stream-pill {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wb-accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.wb-stream-pill .wb-spin {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wb-spin 0.8s linear infinite;
}

@keyframes wb-spin {
    to {
        transform: rotate(360deg);
    }
}

.wb-stream-pill button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    padding: 0 4px;
    border-radius: 3px;
    margin-left: 6px;
}

.wb-stream-pill button:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ===== Modal: new note ===== */
.wb-modal-back {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.wb-modal {
    background: #fff;
    color: #111827;
    width: min(560px, 92vw);
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-mode="dark"] .wb-modal {
    background: #181A1F;
    color: #E5E7EB;
}

.wb-modal-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--wb-border, #E5E7EB);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wb-modal-head h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.wb-modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wb-modal-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--wb-border, #E5E7EB);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.wb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wb-field label {
    font-size: 12px;
    color: var(--wb-text-muted, #6B7280);
    font-weight: 500;
}

.wb-field select,
.wb-field input,
.wb-field textarea {
    border: 1px solid var(--wb-border, #E5E7EB);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: inherit;
    background: var(--wb-bg-body, #F3F4F6);
    outline: none;
}

[data-mode="dark"] .wb-field select,
[data-mode="dark"] .wb-field input,
[data-mode="dark"] .wb-field textarea {
    background: #0F1115;
    border-color: #2B2D31;
}

.wb-field textarea {
    min-height: 90px;
    resize: vertical;
}

.wb-field select:focus,
.wb-field input:focus,
.wb-field textarea:focus {
    border-color: var(--wb-accent, #3B82F6);
    box-shadow: 0 0 0 2px var(--wb-accent-bg, #EFF6FF);
}

.wb-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ===== Copilot chat ===== */
.wb-chat {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: transparent;
}

.wb-chat-empty {
    color: var(--wb-text-light);
    font-size: 12px;
    text-align: center;
    padding: 32px 12px;
    line-height: 1.7;
}

.wb-msg {
    display: flex;
    gap: 10px;
    font-size: 13px;
    line-height: 1.55;
}

.wb-msg-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    background: var(--wb-text-main);
    color: var(--wb-bg-panel);
}

.wb-msg-user .wb-msg-icon {
    background: var(--wb-bg-active);
    color: var(--wb-text-main);
    border-radius: 50%;
}

.wb-msg-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--wb-text-main);
    word-break: break-word;
}

.wb-msg-user .wb-msg-body {
    white-space: pre-wrap;
}

.wb-msg .wb-md p {
    margin: 0 0 8px;
    font-size: 13px;
}

.wb-msg .wb-md p:last-child {
    margin-bottom: 0;
}

.wb-msg .wb-md h1,
.wb-msg .wb-md h2,
.wb-msg .wb-md h3 {
    font-size: 14px;
    margin: 6px 0 4px;
}

.wb-msg .wb-md ul,
.wb-msg .wb-md ol {
    margin: 4px 0 8px 18px;
}

.wb-msg .wb-md code {
    background: var(--wb-bg-hover);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 12px;
}

.wb-msg .wb-md pre {
    background: var(--wb-bg-hover);
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    margin: 4px 0;
}

.wb-msg-ops {
    background: var(--wb-accent-bg);
    border: 1px solid var(--wb-accent);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--wb-accent);
}

.wb-msg-ops ul {
    margin: 4px 0 0 18px;
    padding: 0;
}

.wb-msg-ops li {
    margin: 2px 0;
    color: var(--wb-text-main);
}

/* ===== Change cards & diff (Phase 3.5b) ===== */
.wb-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.wb-change {
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 12px;
    background: var(--wb-bg-panel);
}

.wb-change-applied {
    border-color: #10B981;
    opacity: 0.85;
}

.wb-change-discarded {
    border-color: var(--wb-border);
    opacity: 0.5;
}

.wb-change-head {
    padding: 6px 10px;
    background: var(--wb-bg-body);
    border-bottom: 1px solid var(--wb-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.wb-change-label {
    color: var(--wb-text-main);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-change-label b {
    color: var(--wb-accent);
}

.wb-cs-ok {
    color: #10B981;
    font-weight: 500;
    font-size: 11px;
}

.wb-cs-no {
    color: var(--wb-text-light);
    font-size: 11px;
}

.wb-change-actions {
    padding: 6px 10px;
    display: flex;
    gap: 6px;
    border-top: 1px solid var(--wb-border);
}

.wb-change-actions .wb-btn {
    font-size: 11px;
    padding: 3px 8px;
    height: 24px;
}

.wb-diff {
    display: none;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 10px;
    font-family: "IBM Plex Mono", Menlo, monospace;
    font-size: 11px;
    line-height: 1.45;
    background: var(--wb-bg-chat);
    border-top: 1px solid var(--wb-border);
}

.wb-diff.is-open {
    display: block;
}

.wb-d-add {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
    padding: 0 4px;
    border-left: 2px solid #10B981;
}

.wb-d-del {
    background: rgba(239, 68, 68, 0.10);
    color: #DC2626;
    padding: 0 4px;
    border-left: 2px solid #DC2626;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.wb-d-same {
    color: var(--wb-text-muted);
    padding: 0 4px;
}

[data-mode="dark"] .wb-d-add {
    color: #34D399;
    background: rgba(52, 211, 153, 0.15);
}

[data-mode="dark"] .wb-d-del {
    color: #F87171;
    background: rgba(248, 113, 113, 0.15);
}

.wb-change-bulk {
    display: flex;
    gap: 6px;
    padding: 4px 0;
    border-top: 1px dashed var(--wb-border);
    margin-top: 4px;
}

.wb-change-bulk .wb-btn {
    font-size: 11px;
    padding: 3px 10px;
    height: 24px;
}

.wb-thinking {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.wb-thinking span {
    width: 5px;
    height: 5px;
    background: var(--wb-text-light);
    border-radius: 50%;
    animation: wb-bounce 1.4s infinite ease-in-out both;
}

.wb-thinking span:nth-child(1) {
    animation-delay: -0.32s;
}

.wb-thinking span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes wb-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.wb-chat-input-wrap {
    padding: 10px 12px 12px;
    background: var(--wb-bg-hover);
    border-top: 1px solid var(--wb-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wb-ctx-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--wb-bg-body);
    border: 1px solid var(--wb-border);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--wb-text-muted);
    width: max-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-chat-box {
    border: 1px solid var(--wb-border);
    border-radius: 10px;
    padding: 8px 10px 6px;
    background: var(--wb-bg-body);
    transition: 0.15s;
}

.wb-chat-box:focus-within {
    border-color: var(--wb-accent);
    box-shadow: 0 0 0 2px var(--wb-accent-bg);
    background: var(--wb-bg-panel);
}

.wb-chat-box textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    font-size: 13px;
    color: var(--wb-text-main);
    min-height: 44px;
    max-height: 200px;
    font-family: inherit;
    line-height: 1.5;
}

.wb-chat-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.wb-chat-tools .wb-btn-primary {
    padding: 4px 12px;
    font-size: 12px;
    height: auto;
}

/* 斜杠命令补全菜单 */
.wb-cmd-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 4px);
    background: var(--wb-bg-panel);
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    padding: 4px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 200px;
    overflow-y: auto;
}

.wb-cmd-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 8px;
    border: none;
    border-radius: 5px;
    background: none;
    color: var(--wb-text-main);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.wb-cmd-item:hover,
.wb-cmd-item.is-active {
    background: var(--wb-bg-hover);
}

.wb-cmd-name {
    font-family: var(--wb-font-mono, monospace);
    color: var(--wb-accent);
    font-weight: 500;
    flex-shrink: 0;
}

.wb-cmd-desc {
    color: var(--wb-text-muted);
    font-size: 11px;
}

.wb-chat-tools .wb-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wb-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 200;
}

/* ============== R2 编辑手感：行槽 gutter + 斜杠菜单 ============== */
.wb-gutter {
    position: absolute;
    left: -52px;
    width: 48px;
    display: flex;
    gap: 2px;
    z-index: 6;
    user-select: none;
}

.wb-gutter-btn {
    width: 22px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--wb-text-light);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.wb-gutter-btn:hover {
    background: var(--wb-bg-body);
    color: var(--wb-text-main);
}

.wb-gutter-drag {
    cursor: grab;
    font-size: 12px;
    letter-spacing: -1px;
}

.wb-gutter-drag:active {
    cursor: grabbing;
}

/* ===== R7-W3 官方 DragHandle 拉手（W4 打磨：悬停渐显 + 描边图标） ===== */
.wb-dh {
    display: flex;
    align-items: center;
    gap: 1px;
    padding-right: 4px;
    user-select: none;
    opacity: .55;
    transition: opacity .14s ease;
}

.wb-dh:hover {
    opacity: 1;
}

.wb-dh-btn {
    width: 22px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--wb-text-light);
    line-height: 1;
    cursor: pointer;
    transition: background .12s, color .12s, transform .08s;
}

.wb-dh-btn:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.wb-dh-btn:active {
    transform: scale(.92);
}

.wb-dh-btn svg {
    display: block;
}

.wb-dh-grip {
    cursor: grab;
}

.wb-dh-grip:active {
    cursor: grabbing;
}

/* ===== R7-W4 块操作菜单（点击 ⠿ 弹出，Notion 风格） ===== */
.wb-dhmenu {
    position: absolute;
    z-index: 45;
    min-width: 168px;
    padding: 5px;
    background: var(--wb-bg-panel, #fff);
    border: 1px solid var(--wb-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
}

.wb-dhmenu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--wb-text-main);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background .12s;
}

.wb-dhmenu-item svg {
    color: var(--wb-text-light);
    flex: 0 0 auto;
}

.wb-dhmenu-item:hover {
    background: var(--wb-bg-hover);
}

.wb-dhmenu-danger:hover {
    background: rgba(220, 53, 69, .1);
    color: #d9362f;
}

.wb-dhmenu-danger:hover svg {
    color: #d9362f;
}

/* ===== R7-W4 公式行内编辑浮层 ===== */
.wb-mathpop {
    position: absolute;
    z-index: 46;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    min-width: 240px;
    background: var(--wb-bg-panel, #fff);
    border: 1px solid var(--wb-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
}

.wb-mathpop-in {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid var(--wb-border);
    border-radius: 7px;
    background: var(--wb-bg-input, #fff);
    color: var(--wb-text-main);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    outline: none;
}

.wb-mathpop-in:focus {
    border-color: var(--wb-accent, #6b5bff);
}

.wb-mathpop-hint {
    font-size: 11px;
    color: var(--wb-text-light);
}

/* ===== R7-W3 BubbleMenu 选中浮条 — Notion 风格 ===== */
.wb-bubble {
    display: flex;
    align-items: center;
    padding: 4px;
    background: var(--wb-bg-panel, #fff);
    border: 1px solid var(--wb-border, #E5E7EB);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .06);
    gap: 1px;
    z-index: 30;
    position: absolute;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
    width: max-content;
}

.wb-bubble[style*="top"],
.wb-bubble[style*="left"],
.wb-bubble[style*="transform"] {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
}

.wb-bubble-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--wb-text-main);
    cursor: pointer;
    transition: background .12s, color .12s;
    flex-shrink: 0;
}

.wb-bubble-btn svg {
    display: block;
}

.wb-bubble-btn:hover {
    background: var(--wb-bg-hover);
}

.wb-bubble-btn.is-active {
    background: var(--wb-accent-bg);
    color: var(--wb-accent);
}

.wb-bubble-btn.is-active:hover {
    background: var(--wb-accent-bg);
    filter: brightness(0.97);
}

.wb-bubble-sep {
    width: 1px;
    height: 20px;
    background: var(--wb-border);
    margin: 0 2px;
    flex-shrink: 0;
}

.wb-slash {
    position: absolute;
    z-index: 40;
    width: 234px;
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
    background: var(--wb-bg-panel);
    border: 1px solid var(--wb-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

.wb-slash-sec {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .05em;
    color: var(--wb-text-light);
    text-transform: uppercase;
    padding: 6px 8px 3px;
}

.wb-slash-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 9px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--wb-text-main);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background .1s;
}

.wb-slash-item small {
    margin-left: auto;
    color: var(--wb-text-light);
    font-size: 11px;
}

.wb-slash-item.is-active {
    background: color-mix(in srgb, var(--wb-accent, #6b5bff) 12%, transparent);
}

.wb-slash-item.is-active .wb-slash-ic {
    border-color: var(--wb-accent, #6b5bff);
    color: var(--wb-accent, #6b5bff);
}

.wb-slash-ic {
    flex: none;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--wb-text-muted);
    background: var(--wb-bg-panel);
}

.wb-slash-lb {
    font-weight: 500;
}


/* ===== Presenter (Phase 5) ===== */
.aiua-presenter {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0F172A;
    display: flex;
    flex-direction: column;
    color: #F1F5F9;
    font-family: -apple-system, "PingFang SC", system-ui, sans-serif;
}

.aiua-pres-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #F1F5F9;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.aiua-pres-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.aiua-pres-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    overflow: hidden;
}

.aiua-pres-slide {
    width: 100%;
    max-width: 1200px;
    max-height: 100%;
    overflow-y: auto;
    font-size: 22px;
    line-height: 1.6;
}

.aiua-pres-slide h1 {
    font-size: 56px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 32px;
    border-bottom: 4px solid #3B82F6;
    padding-bottom: 16px;
}

.aiua-pres-slide h2 {
    font-size: 42px;
    font-weight: 700;
    color: #60A5FA;
    margin: 0 0 24px;
}

.aiua-pres-slide h3 {
    font-size: 28px;
    color: #93C5FD;
    margin: 20px 0 12px;
}

.aiua-pres-slide p {
    margin: 14px 0;
    color: #E2E8F0;
}

.aiua-pres-slide ul,
.aiua-pres-slide ol {
    padding-left: 32px;
    margin: 14px 0;
}

.aiua-pres-slide li {
    margin: 8px 0;
    color: #E2E8F0;
}

.aiua-pres-slide blockquote {
    border-left: 4px solid #FBBF24;
    padding: 12px 20px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 6px;
    margin: 16px 0;
    color: #FEF3C7;
}

.aiua-pres-slide code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.aiua-pres-slide pre {
    background: #1E293B;
    color: #F1F5F9;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 16px;
}

.aiua-pres-slide table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

.aiua-pres-slide th,
.aiua-pres-slide td {
    border: 1px solid #334155;
    padding: 10px 14px;
}

.aiua-pres-slide th {
    background: rgba(59, 130, 246, 0.2);
}

.aiua-pres-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aiua-pres-bar button {
    width: 44px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #F1F5F9;
    border-radius: 4px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.aiua-pres-bar button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.aiua-pres-bar span {
    font-size: 13px;
    color: #94A3B8;
    min-width: 60px;
    text-align: center;
    font-family: "IBM Plex Mono", monospace;
}

.aiua-pres-timer {
    position: absolute;
    top: 20px;
    right: 68px;
    z-index: 2;
    font-size: 14px;
    font-family: "IBM Plex Mono", monospace;
    color: #94A3B8;
    letter-spacing: 0.04em;
    user-select: none;
}

.aiua-pres-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.aiua-pres-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3B82F6, #06B6D4);
    transition: width 0.25s ease;
}

.aiua-pres-hint {
    position: absolute;
    left: 50%;
    bottom: 72px;
    transform: translateX(-50%);
    z-index: 3;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 13px;
    color: #CBD5E1;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.aiua-pres-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    margin: 0 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    color: #F1F5F9;
}

.aiua-pres-notes {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 56px;
    max-height: 28vh;
    overflow-y: auto;
    padding: 14px 80px 18px;
    background: rgba(0, 0, 0, 0.55);
    border-top: 1px solid rgba(251, 191, 36, 0.35);
    backdrop-filter: blur(6px);
}

.aiua-pres-notes-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FBBF24;
    margin-bottom: 8px;
}

.aiua-pres-notes-body {
    font-size: 15px;
    line-height: 1.55;
    color: #FDE68A;
}

.aiua-pres-notes-body p {
    margin: 6px 0;
    color: inherit;
}

.aiua-pres-notes-empty {
    color: #94A3B8 !important;
    font-size: 13px !important;
}

.aiua-pres-notes-empty code {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
}

.aiua-presenter.aiua-pres-notes-open .aiua-pres-stage {
    padding-bottom: 32vh;
}

/* ===== 标签栏（侧边栏内） ===== */
.wb-kb-tags {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px 6px;
}

.wb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 28px;
    overflow: hidden;
    transition: max-height .2s ease;
}

.wb-kb-tags.is-expanded .wb-tag-list {
    max-height: 200px;
}

.wb-tag-pill {
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid var(--wb-border);
    border-radius: 10px;
    background: transparent;
    color: var(--wb-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all .12s;
}

.wb-tag-pill:hover {
    border-color: var(--wb-accent, #6b5bff);
    color: var(--wb-text-main);
}

.wb-tag-pill.is-active {
    border-color: transparent;
    background: var(--wb-accent, #6b5bff);
    color: #fff;
}

.wb-tag-toggle {
    font-size: 10px;
    padding: 1px 6px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--wb-text-muted);
    cursor: pointer;
    align-self: flex-end;
}

.wb-tag-toggle:hover {
    color: var(--wb-accent, #6b5bff);
}

/* ===== Copilot 关闭按钮（移动端，内置于头部） ===== */
.wb-copilot-close-inner {
    display: none;
}

/* ===== 命令面板 ===== */
.wb-menu-btn,
.wb-drawer-backdrop,
.wb-copilot-fab {
    display: none;
}

.wb-menu-btn {
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--wb-text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.wb-menu-btn:hover {
    background: var(--wb-bg-hover);
    color: var(--wb-text-main);
}

.cmd-palette {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
}

.cmd-palette[hidden] {
    display: none !important;
}

.cmd-palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
}

.cmd-palette-dialog {
    position: relative;
    width: min(520px, 100%);
    background: var(--wb-bg-panel, #fff);
    border: 1px solid var(--wb-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
    overflow: hidden;
}

[data-mode="dark"] .cmd-palette-dialog {
    background: #1e2026;
    border-color: #2b2d31;
}

.cmd-palette-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--wb-border, #e5e7eb);
    background: transparent;
    color: var(--wb-text-main, #111827);
    font-size: 15px;
    outline: none;
}

[data-mode="dark"] .cmd-palette-input {
    border-bottom-color: #2b2d31;
    color: #e5e7eb;
}

.cmd-palette-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.cmd-palette-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--wb-text-main, #111827);
    cursor: pointer;
}

[data-mode="dark"] .cmd-palette-item {
    color: #e5e7eb;
}

.cmd-palette-item.is-active {
    background: color-mix(in srgb, var(--wb-accent, #3B82F6) 14%, transparent);
}

.cmd-palette-item kbd {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--wb-border, #e5e7eb);
    color: var(--wb-text-muted, #6b7280);
    font-family: inherit;
}

.cmd-palette-empty {
    padding: 16px 12px;
    text-align: center;
    color: var(--wb-text-muted, #6b7280);
    font-size: 13px;
}

/* ===== 移动端 (<768px) ===== */
@media (max-width: 768px) {
    .view-workbench {
        --wb-left-w: min(88vw, 300px);
        --wb-right-w: min(92vw, 360px);
    }

    .wb-menu-btn {
        display: inline-flex;
    }

    .wb-copilot-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 48px;
        height: 48px;
        border: none;
        border-radius: 50%;
        background: var(--wb-accent, #3B82F6);
        color: #fff;
        box-shadow: 0 4px 16px rgba(59, 130, 246, .45);
        cursor: pointer;
        z-index: 180;
    }

    .wb-copilot-fab:hover {
        filter: brightness(1.08);
    }

    .wb-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        top: var(--wb-header-h);
        background: rgba(0, 0, 0, .4);
        z-index: 190;
    }

    .wb-drawer-backdrop[hidden] {
        display: none !important;
    }

    .wb-left {
        position: fixed;
        top: var(--wb-header-h);
        left: 0;
        bottom: 0;
        z-index: 200;
        width: var(--wb-left-w);
        transform: translateX(-100%);
        transition: transform .25s ease;
        display: flex !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
    }

    .view-workbench.wb-drawer-open .wb-left {
        transform: translateX(0);
    }

    .wb-right {
        position: fixed;
        top: var(--wb-header-h);
        right: 0;
        bottom: 0;
        z-index: 200;
        width: var(--wb-right-w);
        transform: translateX(100%);
        transition: transform .25s ease;
        display: flex !important;
        box-shadow: -4px 0 24px rgba(0, 0, 0, .12);
    }

    .view-workbench.wb-copilot-open .wb-right {
        transform: translateX(0);
    }

    .wb-mid {
        flex: 1;
        width: 100%;
        min-width: 0;
    }

    .wb-h-tabs {
        max-width: calc(100vw - 200px);
    }

    .wb-model-dd {
        display: none;
    }

    .wb-doctools {
        flex-wrap: wrap;
        gap: 2px;
    }

    .wb-doctools .wb-tool span {
        display: none;
    }

    .wb-doctools .wb-tool {
        padding: 0 6px;
    }

    .wb-doctools .wb-tool-accent span {
        display: none;
    }

    .wb-copilot-close-inner {
        display: inline-flex !important;
    }

    /* 流式生成时防止横向溢出产生滚动条 */
    .wb-editor-wrap {
        overflow-x: hidden;
    }

    .wb-editor .ProseMirror {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* BubbleMenu 工具栏上移，避免被系统剪切板遮挡 */
    .wb-bubble {
        transform: translateY(-48px) !important;
    }
}
