:root {
    color-scheme: dark;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    color: var(--text-normal);
    background: var(--background-primary);
    --background-primary: #1e1e1e;
    --background-primary-alt: #242424;
    --background-secondary: #262626;
    --background-secondary-alt: #303030;
    --background-modifier-border: #383838;
    --background-modifier-hover: #ffffff0c;
    --background-modifier-active-hover: #ffffff14;
    --background-modifier-form-field: #202020;
    --text-normal: #dadada;
    --text-muted: #a3a3a3;
    --text-faint: #747474;
    --text-accent: #b5a1ec;
    --text-selection: #74609966;
    --interactive-normal: #393939;
    --interactive-hover: #454545;
    --interactive-accent: #8c70c9;
    --font-interface: "Segoe UI", sans-serif;
    --font-text: "Segoe UI", sans-serif;
    --font-monospace: Consolas, monospace;
    --left-sidebar-width: 260px;
    --right-sidebar-width: 260px;
}
* { box-sizing: border-box; }
[hidden], dialog:not([open]) { display: none !important; }
body { margin: 0; overflow: hidden; }
button, input { font: inherit; }
button {
    color: inherit; background: var(--interactive-normal); border: 1px solid var(--background-modifier-border);
    border-radius: 5px; padding: 6px 12px; cursor: pointer; -webkit-app-region: no-drag;
}
button:hover:not(:disabled) { background: var(--interactive-hover); }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--interactive-accent); outline-offset: -2px; }
input {
    color: inherit; background: var(--background-modifier-form-field); border: 1px solid var(--background-modifier-border);
    border-radius: 5px; padding: 8px 10px; min-width: 0; outline: none;
}
input:focus { border-color: var(--interactive-accent); }
h1, h2 { font-size: 18px; font-weight: 600; margin: 0 0 20px; }
p { font-size: 13px; line-height: 1.6; }
.svg-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.clickable-icon {
    display: inline-flex; justify-content: center; align-items: center; width: 30px; height: 30px;
    padding: 5px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); flex-shrink: 0;
}
.clickable-icon:hover:not(:disabled) { background: var(--background-modifier-hover); color: var(--text-normal); }
.shell { height: 100vh; display: flex; flex-direction: column; }
.workspace-window { display: flex; flex: 1; min-height: 0; min-width: 0; }
.workspace-ribbon { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 44px; flex-shrink: 0; background: var(--background-secondary); padding: 0 5px 10px; }
.workspace-ribbon .ribbon-collapse { height: 40px; margin-bottom: 5px; }
.ribbon-spacer { flex: 1; }
#plugin-ribbon, #core-ribbon { display: flex; flex-direction: column; gap: 7px; }
.workspace-sidedock { background: var(--background-secondary); display: flex; flex-direction: column; min-height: 0; flex-shrink: 0; }
.left-sidebar { width: var(--left-sidebar-width); }
.right-sidebar { width: var(--right-sidebar-width); }
.sidebar-tab-header { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; flex-shrink: 0; color: var(--text-muted); background: var(--background-secondary-alt); -webkit-app-region: drag; font-size: 12px; }
.right-sidebar .sidebar-tab-header { padding-right: 140px; }
 .sidebar-view, .core-side-views { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
 .side-view-tab.is-active { color: var(--text-normal); background: var(--background-modifier-hover); }
 .side-view-strip { display: flex; flex: 1; min-width: 0; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-app-region: no-drag; }
 #outline-content { min-height: 0; overflow: auto; }
 #metadata-status { color: var(--text-warning, #d5b565); }
 #metadata-status:empty { display: none; }
 .outgoing-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 0; font-size: 13px; }
 .outgoing-source { padding: 4px 12px 10px; color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
 .outgoing-link-pane { overflow: auto; }
 .outgoing-section { padding: 4px 8px; }
 .outgoing-section > summary { cursor: pointer; padding: 7px 4px; font-size: 12px; color: var(--text-muted); }
 .outgoing-count { float: right; margin-left: 8px; color: var(--text-faint); }
 .outgoing-link-result, .outgoing-mention-result { display: block; width: 100%; text-align: left; padding: 7px 12px; border: 0; background: transparent; font-size: 12px; overflow-wrap: anywhere; }
 .outgoing-link-result.is-unresolved { color: var(--text-faint); text-decoration: underline dotted; }
.nav-header { display: flex; justify-content: flex-end; gap: 4px; padding: 9px 12px 8px; }
.file-tree { flex: 1; min-height: 0; overflow: auto; padding: 0 10px 16px; }
.nav-folder { margin: 2px 0; }
.nav-folder-title { display: flex; gap: 7px; align-items: center; padding: 6px 7px; cursor: pointer; border-radius: 4px; color: var(--text-normal); list-style: none; }
.nav-folder-title::-webkit-details-marker { display: none; }
.nav-folder-title .svg-icon { width: 12px; height: 12px; color: var(--text-faint); }
.nav-folder[open] > .nav-folder-title .svg-icon { transform: rotate(90deg); }
.nav-folder-title:hover { background: var(--background-modifier-hover); }
.nav-folder-children { margin-left: 12px; border-left: 1px solid var(--background-modifier-border); padding-left: 7px; }
.nav-file-title { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: transparent; color: var(--text-muted); line-height: 1.4; }
.nav-file-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-file-title.is-active { background: var(--background-modifier-active-hover); color: var(--text-normal); }
.nav-file-title:hover:not(:disabled) { background: var(--background-modifier-hover); }
.nav-file-tag { margin-left: auto; text-transform: uppercase; font-size: 9px; }
.vault-switcher { display: flex; align-items: center; gap: 9px; width: 100%; font-size: 12px; padding: 14px 10px; border: 0; border-top: 1px solid var(--background-modifier-border); border-radius: 0; background: transparent; text-align: left; }
.vault-switcher .svg-icon { width: 13px; height: 13px; color: var(--text-faint); }
.vault-switcher strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-switcher > span { margin-left: auto; color: var(--text-faint); font-size: 10px; }
.sidebar-resizer { position: relative; width: 1px; flex: 0 0 1px; background: var(--background-modifier-border); cursor: col-resize; touch-action: none; z-index: 5; }
.sidebar-resizer::before { content: ""; position: absolute; inset: 0 -3px; }
.sidebar-resizer:hover { background: var(--interactive-accent); }
.left-collapsed .left-sidebar, .left-collapsed .left-resizer, .right-collapsed .right-sidebar, .right-collapsed .right-resizer { display: none; }
.workspace-root, .workspace-split, .workspace-tabs, .workspace-tab-container, .workspace-leaf { display: flex; min-width: 0; min-height: 0; flex: 1; }
.workspace-root { overflow: hidden; }
.workspace-split[data-direction="vertical"] { flex-direction: row; }
.workspace-split[data-direction="horizontal"] { flex-direction: column; }
.workspace-split > .workspace-split, .workspace-split > .workspace-tabs { overflow: hidden; }
.workspace-split > :not(:first-child) { border-left: 1px solid var(--background-modifier-border); }
.workspace-split[data-direction="horizontal"] > :not(:first-child) { border-left: 0; border-top: 1px solid var(--background-modifier-border); }
.workspace-tabs, .workspace-tab-container, .workspace-leaf { flex-direction: column; }
.workspace-tab-header-container { display: flex; align-items: flex-end; gap: 2px; height: 40px; flex: 0 0 40px; padding: 4px 7px 0; background: var(--background-secondary-alt); overflow: hidden; -webkit-app-region: drag; }
.workspace-tab-header-container.has-window-controls { padding-right: 145px; }
.workspace-tab-header { display: flex; align-items: center; gap: 7px; flex: 0 1 205px; height: 36px; min-width: 70px; max-width: 230px; border-radius: 6px 6px 0 0; padding: 0 7px 0 12px; color: var(--text-muted); cursor: pointer; -webkit-app-region: no-drag; }
.workspace-tab-header:hover { background: var(--background-modifier-hover); }
.workspace-tab-header.is-active { background: var(--background-primary); color: var(--text-normal); }
.workspace-tab-header > .svg-icon { width: 14px; height: 14px; color: var(--text-faint); }
.workspace-tab-header > .workspace-tab-pin { width: 12px; height: 12px; color: var(--text-accent); }
.workspace-tab-pin:not(.is-pinned) { display: none; }
.workspace-tab-header-inner-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; flex: 1; }
.workspace-tab-header-inner-close-button { width: 22px; height: 22px; padding: 4px; }
.workspace-tab-header-inner-close-button .svg-icon { width: 14px; height: 14px; }
.workspace-tab-dirty { color: var(--text-accent); font-size: 15px; }
.workspace-tab-header-container > .clickable-icon { margin-bottom: 3px; }
.workspace-tab-container { background: var(--background-primary); overflow: hidden; }
.view-header { height: 40px; flex-shrink: 0; display: flex; align-items: center; padding: 4px 8px; gap: 8px; color: var(--text-muted); }
.view-header-nav-buttons { display: flex; }
.view-header-nav-buttons .clickable-icon { width: 27px; height: 27px; }
.view-header-nav-buttons .svg-icon { width: 16px; height: 16px; }
.view-header-title { flex: 1; text-align: center; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size: 12px; padding: 0 12px; }
.workspace-tabs:not(.mod-active) .view-header-title { color: var(--text-faint); }
.inline-title { font-family: var(--font-text); font-size: 28px; line-height: 1.3; font-weight: 700; width: calc(100% - 96px); max-width: 760px; margin: 38px auto 0; padding: 0 4px 8px; overflow-wrap: anywhere; }
.markdown-source-view { flex: 1; min-height: 0; overflow: hidden; }
.markdown-view-content { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.markdown-preview-view { flex: 1; min-height: 0; overflow: auto; padding: 15px max(48px, calc((100% - 760px) / 2 + 4px)) 100px; font: 15px/1.7 var(--font-text); overflow-wrap: anywhere; }
.markdown-preview-view:focus { outline: none; }
.markdown-preview-view :is(h1,h2,h3,h4,h5,h6) { font-weight: 650; line-height: 1.35; margin: 1.4em 0 .6em; scroll-margin-top: 16px; }
.markdown-preview-view > :first-child { margin-top: 0; }
.markdown-preview-view h1 { font-size: 2em; }
.markdown-preview-view h2 { font-size: 1.5em; }
.markdown-preview-view h3 { font-size: 1.25em; }
.markdown-preview-view p { font-size: inherit; line-height: inherit; margin: .8em 0; }
.markdown-preview-view a { color: var(--text-accent); cursor: pointer; text-decoration: underline; }
.markdown-preview-view :is(ul,ol) { padding-left: 1.6em; }
.markdown-preview-view blockquote { margin: 1em 0; padding: .1em 1em; border-left: 3px solid var(--interactive-accent); color: var(--text-muted); }
.markdown-preview-view code { font-family: var(--font-monospace); font-size: .9em; padding: .15em .35em; border-radius: 4px; background: var(--background-secondary); }
.markdown-preview-view pre { overflow: auto; padding: 14px 18px; border: 1px solid var(--background-modifier-border); border-radius: 6px; background: var(--background-secondary); }
.markdown-preview-view pre code { padding: 0; background: transparent; white-space: pre; }
.markdown-preview-view table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; margin: 1em 0; }
.markdown-preview-view :is(th,td) { border: 1px solid var(--background-modifier-border); padding: 6px 12px; text-align: left; }
.markdown-preview-view th { background: var(--background-secondary); }
.markdown-preview-view hr { border: 0; border-top: 1px solid var(--background-modifier-border); margin: 1.5em 0; }
.markdown-preview-view img { max-width: 100%; height: auto; }
.core-discovery-pane { display: flex; flex-direction: column; min-height: 0; padding: 12px; gap: 10px; overflow: auto; }
.core-discovery-pane > input, .core-discovery-pane > select { width: 100%; min-width: 0; }
.discovery-controls { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 12px; }
.discovery-controls label { display: flex; align-items: center; gap: 6px; }
.discovery-status { color: var(--text-muted); font-size: 12px; }
.discovery-status.is-error { color: var(--text-error, #f87171); white-space: pre-wrap; }
.discovery-results { overflow: auto; min-height: 0; }
.discovery-result-group { padding: 6px 0; border-bottom: 1px solid var(--background-modifier-border); }
.discovery-result-group summary { cursor: pointer; color: var(--text-muted); font-size: 12px; margin: 4px 0; }
.discovery-result-title, .discovery-context, .discovery-tag { display: block; width: 100%; text-align: left; background: transparent; border: 0; box-shadow: none; white-space: pre-wrap; overflow-wrap: anywhere; padding: 6px; }
.discovery-result-title { font-weight: 600; }
.discovery-context { font-size: 12px; line-height: 1.6; }
.discovery-context mark { color: inherit; background: #88713066; border-radius: 2px; }
.discovery-results :is(h3,h4) { font-size: 12px; color: var(--text-muted); margin: 12px 4px 3px; }
.discovery-tag-row { display: flex; align-items: center; gap: 2px; }
.discovery-tag { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tag-toggle-spacer { width: 24px; flex-shrink: 0; }
.inline-backlinks { flex-shrink: 0; max-height: 220px; overflow: auto; padding: 8px 16px; border-top: 1px solid var(--background-modifier-border); }
.inline-backlinks h3 { margin: 4px 0; font-size: 13px; }
.backlink-status { background: transparent; border: none; color: var(--text-muted); font-size: 11px; box-shadow: none; padding: 0 5px; }
.reading-embed-error { display: inline-block; color: var(--text-muted); border: 1px solid var(--background-modifier-border); padding: 4px 8px; font-size: 12px; }
.cm-editor { height: 100%; font-size: 15px; }
.cm-scroller { overflow: auto; font-family: var(--font-monospace); line-height: 1.7; padding: 0 48px; }
.cm-content { padding: 15px 4px 100px; width: 100%; max-width: 760px; margin-inline: auto; }
.cm-gutters { display: none !important; }
.cm-editor.cm-focused { outline: none; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; color: var(--text-muted); padding-bottom: 100px; }
.empty-state h2 { font-size: 21px; color: var(--text-normal); }
.empty-state button { width: 300px; border: 0; background: transparent; display: flex; justify-content: space-between; padding: 9px 12px; color: var(--text-accent); }
kbd { font-size: 11px; font-family: var(--font-interface); color: var(--text-faint); }
.status-bar { height: 25px; display: flex; align-items: center; gap: 13px; padding: 0 6px 0 12px; flex-shrink: 0; color: var(--text-muted); font-size: 11px; background: var(--background-secondary); border-top: 1px solid var(--background-modifier-border); }
.status-bar .clickable-icon { width: 23px; height: 22px; padding: 4px; }
.status-bar .svg-icon { width: 14px; height: 14px; }
.status-spacer { flex: 1; }
#active-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; color: var(--text-faint); }
.compatibility-badge { padding: 0; border: 0; background: transparent; color: #bda475; font-size: 10px; }
#plugin-status-bar { display: flex; gap: 12px; }
#editor-statistics { white-space: pre; }
#outline-content { overflow: auto; padding: 12px 8px; }
.outline-heading { display: block; width: 100%; text-align: left; font-size: 12px; padding: 7px 12px; border: 0; background: transparent; overflow-wrap: anywhere; }
.empty-outline { color: var(--text-faint); padding: 12px; font-size: 12px; }
.error-banner, #client-errors:not(:empty) { position: fixed; top: 46px; left: 320px; right: 20px; z-index: 150; padding: 12px 18px; color: #ffb9b9; background: #49292d; border: 1px solid #825157; border-radius: 6px; font-size: 12px; white-space: pre-wrap; max-height: 160px; overflow: auto; }
.vault-changing .workspace-window { pointer-events: none; opacity: .65; }
dialog { color: var(--text-normal); background: var(--background-primary-alt); border: 1px solid var(--background-modifier-border); border-radius: 10px; box-shadow: 0 20px 70px #0008; padding: 0; }
dialog::backdrop { background: #0007; }
.vault-dialog { width: min(660px, 90vw); max-height: 90vh; padding: 28px; overflow: auto; }
.vault-dialog h2 { margin-bottom: 8px; font-size: 24px; }
.vault-choice { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--background-modifier-border); }
.vault-choice h3 { margin: 0 0 16px; font-size: 15px; }
.vault-choice label { display: block; font-size: 12px; margin: 12px 0 7px; color: var(--text-muted); }
.vault-choice input { width: 100%; }
.vault-path-row { display: flex; gap: 8px; }
.vault-path-row input { flex: 1; }
.vault-path-row button { flex-shrink: 0; }
.vault-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; }
.vault-dialog-footer p { margin: 0; }
.vault-dialog-footer button { flex-shrink: 0; }
.new-note-dialog { width: 440px; padding: 28px; }
.new-note-dialog input { width: 100%; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.mod-cta { background: var(--interactive-accent); border-color: var(--interactive-accent); color: white; }
.mod-cta:hover:not(:disabled) { background: #9c80d9; }
.settings-dialog[open] { display: grid; grid-template-columns: 205px minmax(0, 1fr); width: min(940px, 90vw); height: min(740px, 86vh); overflow: hidden; }
.settings-navigation { padding: 24px 12px; background: var(--background-secondary); overflow: auto; }
.settings-navigation h2 { font-size: 13px; color: var(--text-muted); margin: 0 8px 18px; }
.settings-navigation button { display: block; width: 100%; text-align: left; background: transparent; border: 0; font-size: 13px; margin: 3px 0; }
.settings-navigation button.is-active { background: var(--background-modifier-active-hover); }
.settings-content { position: relative; overflow: auto; padding: 40px 36px; }
.settings-close { position: absolute; top: 10px; right: 10px; }
.plugin-trust-warning { color: #c9b082; padding-bottom: 14px; border-bottom: 1px solid var(--background-modifier-border); }
.plugin-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--background-modifier-border); padding: 18px 0; }
.plugin-card > div:first-child { flex: 1; min-width: 150px; }
.plugin-card strong { font-size: 14px; }
.plugin-card p { margin: 7px 0 0; color: var(--text-muted); }
.plugin-card-actions { display: flex; gap: 6px; }
.plugin-card button { font-size: 12px; }
.plugin-error { color: #ffaaaa !important; white-space: pre-wrap; width: 100%; }
.core-plugin-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--background-modifier-border); padding: 16px 0; }
.core-plugin-card > div:first-child { flex: 1; min-width: 120px; }
.core-plugin-card p { margin: 5px 0 0; }
.core-plugin-actions { display: flex; align-items: center; gap: 8px; }
.core-plugin-actions button { font-size: 12px; }
.core-setting-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--background-modifier-border); }
.core-setting-field input[type=text] { width: 250px; }
.core-command-row, .core-command-add { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.core-command-row > span { flex: 1; }
.core-command-row button { font-size: 12px; }
.core-command-add input { flex: 1; }
[data-core-form] > button { margin-top: 20px; }
#core-settings-host h3 { margin-top: 24px; }
.core-file-explorer-disabled #file-explorer-view { display: none; }
.core-file-explorer-disabled .vault-switcher { margin-top: auto; }
.core-outline-disabled #outline-view, .core-right-empty #right-sidebar, .core-right-empty #right-sidebar-resizer { display: none; }
.core-word-count-disabled #editor-statistics { display: none; }
.core-command-palette-disabled .workspace-ribbon > [aria-label="Command palette"], .core-switcher-disabled .workspace-ribbon > [aria-label="Quick switcher"] { display: none; }
.muted { color: var(--text-muted); font-size: 12px; }
.setting-item { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--background-modifier-border); }
.setting-item-name { font-size: 14px; }
.setting-item-description { font-size: 12px; color: var(--text-muted); margin: 6px 0; }
.setting-item-control input { max-width: 250px; }
.picker-dialog { width: min(650px, 85vw); margin-top: 12vh; max-height: 70vh; overflow: hidden; }
.prompt-title { font-size: 12px; color: var(--text-muted); padding: 17px 22px 0; margin: 0; }
.prompt-input { width: 100%; padding: 17px 22px; background: transparent; border: 0; border-radius: 0; font-size: 18px; }
.suggestion-container { max-height: 44vh; overflow: auto; border-top: 1px solid var(--background-modifier-border); padding: 7px; }
.suggestion-item { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 12px; border: 0; background: transparent; text-align: left; }
.suggestion-item.is-selected { background: var(--background-modifier-active-hover); }
.suggestion-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-note { color: var(--text-faint); font-size: 11px; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-empty { padding: 26px; color: var(--text-muted); text-align: center; }
.prompt-instructions { padding: 12px 18px; color: var(--text-faint); font-size: 10px; border-top: 1px solid var(--background-modifier-border); }
.modal-container { position: fixed; inset: 0; display: grid; place-items: center; z-index: 100; background: #0009; }
.modal { position: relative; width: min(520px, 85vw); padding: 30px; border: 1px solid var(--background-modifier-border); border-radius: 9px; background: var(--background-primary-alt); }
.modal-close-button { position: absolute; top: 7px; right: 8px; }
.notice-container { position: fixed; bottom: 40px; right: 25px; display: flex; flex-direction: column; gap: 5px; z-index: 160; max-height: 50vh; overflow: auto; }
.notice { background: var(--background-secondary-alt); padding: 11px 18px; border: 1px solid var(--background-modifier-border); border-radius: 6px; max-width: 460px; font-size: 13px; }
.prototype-todo { background: #756018; color: #fff1a3; border-radius: 3px; }
