/* SOP editor tokens. WPS theme_wps_def numeric values are documented in the module handoff. */
#mindmapModule { --sop-accent:#008e83;--sop-selection:#2196f3;--sop-bg:#eeeeee;--sop-text:#333;--sop-border:#ddd;font-family:'Microsoft YaHei',Arial,sans-serif;padding:16px 24px 24px;box-sizing:border-box; }
#mindmapModule .sop-desktop { display:flex;flex-direction:column;background:var(--sop-bg);padding:0 8px 0;min-height:560px;height:100%;border:1px solid #dce2e9;border-radius:12px;box-shadow:0 4px 18px #243b5310;overflow:hidden; }
#mindmapModule .sop-desktop [hidden] { display:none !important; }
#mindmapModule .sop-desktop button { min-width:0;min-height:0;margin:0;padding:5px 8px;border:0 !important;border-radius:3px !important;box-shadow:none !important;background:transparent !important;color:var(--sop-text) !important;font:12px/20px 'Microsoft YaHei',Arial,sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;cursor:pointer; }
#mindmapModule .sop-desktop button:hover:not(:disabled),#mindmapModule .sop-desktop button[aria-pressed=true] { background:#e1e1e1 !important; }
#mindmapModule .sop-desktop button:focus-visible { outline:2px solid var(--sop-selection);outline-offset:1px; }
#mindmapModule .sop-desktop button:disabled { opacity:.32;cursor:default; }
#mindmapModule .sop-desktop svg:not(.sop-scene) { width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round; }
#mindmapModule .sop-menubar { display:flex;align-items:center;gap:10px;min-height:42px;padding:0 4px; }
#mindmapModule .sop-document-title { width:190px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#222; }
#mindmapModule .sop-menu-tabs { display:flex;align-self:stretch;align-items:center;gap:10px;margin:auto; }
#mindmapModule .sop-menu-tabs button { height:32px;border-radius:0 !important;position:relative;font-size:13px;padding:4px 7px; }
#mindmapModule .sop-menu-tabs button.active { color:var(--sop-accent) !important;font-weight:600; }
#mindmapModule .sop-menu-tabs button.active:after { content:'';position:absolute;bottom:1px;left:8px;right:8px;height:2px;background:var(--sop-accent); }
#mindmapModule .sop-save-status { width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#777;text-align:right; }
#mindmapModule .sop-file-menu { position:relative;z-index:10; }
#mindmapModule .sop-file-menu summary { cursor:pointer;display:flex;align-items:center;padding:5px;list-style:none; }
#mindmapModule .sop-file-menu summary::-webkit-details-marker { display:none; }
#mindmapModule .sop-file-popover { position:absolute;top:32px;left:0;width:180px;padding:6px;background:white;box-shadow:0 3px 16px #0002;border:1px solid #ddd;border-radius:4px; }
#mindmapModule .sop-file-popover button { display:flex;justify-content:flex-start;width:100%;padding:7px 10px; }
#mindmapModule .sop-ribbon { background:#fff;border:1px solid #ddd;border-radius:8px;min-height:42px;box-shadow:0 1px 3px #0000000a;margin-bottom:7px; }
#mindmapModule .sop-ribbon-page { display:flex;align-items:center;gap:3px;padding:5px 8px;overflow-x:auto;min-height:40px;scrollbar-width:thin; }
#mindmapModule .sop-ribbon-page>i { flex:none;height:19px;width:1px;background:#ddd;margin:0 6px; }
#mindmapModule .sop-ribbon-field { display:inline-flex;gap:4px;align-items:center;margin:0;font-size:12px;white-space:nowrap;color:#444; }
#mindmapModule .sop-ribbon-field select { width:auto;min-height:28px;padding:3px 14px 3px 5px;border:0;border-radius:3px;background:#fff;color:#333;font:12px 'Microsoft YaHei',sans-serif;max-width:125px; }
#mindmapModule [data-sop-ribbon=start] .sop-ribbon-field>span { display:none; }
#mindmapModule .sop-color-field { display:inline-flex;align-items:center;gap:4px;font:12px/20px 'Microsoft YaHei';white-space:nowrap;color:#444; }
#mindmapModule .sop-color-field input { width:24px;height:24px;padding:3px;border:0;background:none;cursor:pointer; }
#mindmapModule #sopBoldBtn { font-size:17px;font-weight:600; }
#mindmapModule #sopItalicBtn { font-size:17px;font-style:italic; }
#mindmapModule .sop-work-area { display:flex;flex:1;position:relative;min-height:300px;overflow:hidden;border:1px solid #ddd;border-radius:8px;background:white; }
#mindmapModule .mindmap-workspace { flex:1;position:relative;min-width:0;min-height:0;background:#fff;overflow:hidden; }
#mindmapModule #mindMapCanvasWrap { position:absolute;inset:0;min-height:0;padding:0;overflow:hidden;touch-action:none;background:#fff;cursor:default;outline:none; }
#mindmapModule #mindMapCanvas { position:absolute;inset:0;min-width:0;min-height:0;width:100%;height:100%;padding:0;margin:0;transform:none; }
#mindmapModule .sop-scene { width:100%;height:100%;overflow:visible;user-select:none; }
#mindmapModule .mindmap-sidebar { position:relative;display:block;flex:0 0 250px;width:250px;min-width:0;overflow:auto;background:white;border:0;border-right:1px solid #ddd; }
#mindmapModule .sop-inspector { flex:0 0 260px;width:260px;border-left:1px solid #ddd;overflow:auto;background:#fff; }
#mindmapModule .sop-outline-panel>header,#mindmapModule .sop-inspector>header { display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-bottom:1px solid #eee;font-size:13px;font-weight:400; }
#mindmapModule .mindmap-outline { max-height:none;padding:6px 0;overflow:auto; }
#mindmapModule .sop-inspector-fields { padding:16px;display:grid;gap:16px; }
#mindmapModule .sop-inspector-fields>label { display:grid;gap:8px;font-size:12px;color:#444; }
#mindmapModule .sop-inspector-fields input,#mindmapModule .sop-inspector-fields textarea,#mindmapModule .sop-inspector-fields select { width:100%;border:1px solid #ddd;border-radius:4px;padding:7px;font:13px/1.5 'Microsoft YaHei';color:#333; }
#mindmapModule .sop-inspector-fields textarea { min-height:150px;resize:vertical; }
#mindmapModule .sop-inspector-fields p { color:#888;font-size:11px;line-height:1.7; }
#mindmapModule button.sop-floating-style { position:absolute;right:22px;top:22px;z-index:3;width:50px;height:50px;border:1px solid #ddd !important;border-radius:7px !important;background:white !important;box-shadow:0 5px 25px #00000012 !important; }
#mindmapModule .sop-floating-style span { display:none; }
#mindmapModule .sop-statusbar { display:flex;align-items:center;gap:8px;min-height:38px;font-size:11px;color:#888; }
#mindmapModule .sop-statusbar button { color:#777 !important; }
#mindmapModule .sop-statusbar button svg { width:16px;height:16px; }
#mindmapModule .sop-sheet-tab { color:#008e83;background:#fff;padding:5px 12px;border-radius:5px;font-size:12px; }
#mindmapModule .sop-status-spacer { flex:1; }
#mindmapModule .sop-zoom-controls { display:flex;align-items:center;gap:3px; }
#mindmapModule #sopZoomSlider { width:100px;accent-color:#9bb3de;height:14px; }
#mindmapModule .sop-statusbar #fitMindMapBtn span,#mindmapModule .sop-statusbar #centerMindMapBtn span { display:none; }
#mindmapModule #sopNodeCount { padding:0 10px;border-right:1px solid #d4d4d4; }
#mindmapModule .sop-topic { position:relative;box-sizing:border-box;display:inline-block;white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;min-width:24px;max-width:320px;font:14px/1.4 'Microsoft YaHei',Arial,sans-serif;background:transparent;color:#222;padding:3px 12px;border:0;border-radius:0; }
#mindmapModule .sop-title { white-space:pre-wrap; }
#mindmapModule .sop-note-icon { display:inline-block;position:absolute;right:1px;bottom:1px;color:#777;font:11px/12px sans-serif; }
#mindmapModule .sop-node { cursor:default; }
#mindmapModule .sop-selection { display:none;fill:none;stroke:var(--sop-selection);stroke-width:2;pointer-events:none; }
#mindmapModule .sop-node.is-selected>.sop-selection { display:block; }
#mindmapModule .sop-node:hover .sop-topic { filter:brightness(.98); }
#mindmapModule .sop-node.is-drop-target>.sop-selection { display:block;stroke:#fc7e00; }
#mindmapModule .sop-node.is-dragging { opacity:.3;pointer-events:none; }
#mindmapModule .sop-drag-preview { opacity:.5;pointer-events:none; }
#mindmapModule .sop-drag-line { fill:none;stroke:#fc7e00;stroke-width:2;pointer-events:none; }
#mindmapModule .sop-fold circle { fill:#fff;stroke:#ddd;stroke-width:1; }
#mindmapModule .sop-fold text { fill:#aaa;font:12px Arial;pointer-events:none; }
#mindmapModule .sop-fold:hover circle { stroke:#008e83; }
#mindmapModule .sop-measure { position:absolute;left:-10000px;top:0;visibility:hidden;width:max-content;pointer-events:none; }
#mindmapModule textarea.sop-inline { position:absolute;z-index:5;margin:0;padding:5px 8px;box-sizing:border-box;border:1px solid #2196f3;border-radius:2px;background:#fff;color:#333;resize:vertical;max-height:75%;font:14px/1.4 'Microsoft YaHei',Arial,sans-serif; }
#mindmapModule .sop-drag-ghost { position:absolute;z-index:6;pointer-events:none;padding:3px 6px;background:#fff;color:#777;border:1px solid #ddd;border-radius:3px;font-size:11px;white-space:nowrap; }
#mindmapModule .sop-search-panel,#mindmapModule .sop-context-menu { position:absolute;z-index:8;padding:8px;background:#fff;border:1px solid #ddd;border-radius:5px;box-shadow:0 4px 16px #0002; }
#mindmapModule .sop-search-panel { right:16px;top:16px;width:240px;display:flex;flex-wrap:wrap;gap:6px; }
#mindmapModule .sop-search-panel input { width:100%;padding:6px;border:1px solid #ddd;font:12px 'Microsoft YaHei'; }
#mindmapModule .sop-search-panel output { font-size:11px;color:#888; }
#mindmapModule .sop-context-menu { min-width:170px; }
#mindmapModule .sop-context-menu button { width:100%;justify-content:space-between; }
@media(max-width:700px) {
 #mindmapModule { padding:12px; }
 #mindmapModule .sop-desktop { height:70dvh;min-height:500px;padding:0 4px; }
 #mindmapModule .sop-menubar { flex-wrap:wrap;gap:2px;padding:4px; }
 #mindmapModule .sop-document-title { flex:1;width:180px; }
 #mindmapModule .sop-save-status { width:70px; }
 #mindmapModule .sop-menu-tabs { order:3;width:100%;justify-content:center;gap:15px; }
 #mindmapModule .sop-ribbon-page { flex-wrap:wrap;padding:4px;gap:2px; }
 #mindmapModule .sop-ribbon-page>i { margin:0 2px; }
 #mindmapModule .sop-ribbon-field select { max-width:100px; }
 #mindmapModule .sop-statusbar { flex-wrap:wrap;gap:3px; }
 #mindmapModule #sopNodeCount { display:none; }
 #mindmapModule #sopZoomSlider { width:60px; }
 #mindmapModule .sop-outline-panel,#mindmapModule .sop-inspector { position:absolute;top:0;bottom:0;width:min(260px,80vw);z-index:7;box-shadow:0 4px 12px #0002; }
 #mindmapModule .sop-outline-panel { left:0; }
 #mindmapModule .sop-inspector { right:0; }
}

/* Fill the actual space below sync notices and the topbar; no fixed header estimate. */
@media(min-width:981px) {
 #appShell:not(.hidden):has(#mindmapModule.active):not(.profile-open) { display:flex;height:100dvh;min-height:0;flex-direction:column;overflow:hidden; }
 #appShell:has(#mindmapModule.active)>.workspace-sync-panel { flex:none;max-height:30dvh;overflow:auto; }
 #appShell:has(#mindmapModule.active)>.topbar { flex:none; }
 #appShell:not(.profile-open):has(#mindmapModule.active)>.app-workspace { flex:1;min-height:0;align-items:stretch;overflow:hidden; }
 #appShell:has(#mindmapModule.active) .module-content { min-height:0;height:100%; }
 #appShell:has(#mindmapModule.active) .module-nav { position:relative;top:auto;height:calc(100% - 28px);min-height:0; }
 #mindmapModule.active { height:100%;min-height:0;padding-bottom:14px; }
 #mindmapModule .sop-desktop { height:100%;min-height:0;box-sizing:border-box; }
}
