.content-editor{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}
.editing-active .reading-area{overflow:hidden}.editor-toolbar,.editor-tools{display:flex;align-items:center;gap:9px;padding:10px 16px;border-bottom:1px solid var(--border);flex-wrap:wrap;background:var(--side)}
.editor-toolbar strong{font-size:12px;font-weight:550;margin-right:7px}.editor-toolbar button,.editor-tools button{font-size:11px;padding:5px 9px}.editor-toolbar .spacer{flex:1}.editor-toolbar label{font-size:11px;margin:0;white-space:nowrap}.editor-toolbar kbd{font-size:9px;margin-left:5px;opacity:.7}.editor-tools{padding:7px 15px;gap:6px;background:var(--panel)}.editor-tools select{font-size:10px;padding:5px;width:auto}.editor-mode-switch{display:flex;margin-left:auto;gap:0;border:1px solid var(--border);border-radius:6px;overflow:hidden}.editor-mode-switch button{border:0;border-radius:0;padding:6px 12px}.editor-mode-switch .selected{background:var(--accent-bg);color:var(--accent)}
.editor-search{padding:9px 15px;display:flex;align-items:center;gap:6px;background:var(--side);border-bottom:1px solid var(--border);flex-wrap:wrap}.editor-search[hidden]{display:none}.editor-search input{width:180px;font-size:11px;padding:6px}.editor-search button{padding:5px 9px;font-size:11px}.editor-search span{font-size:10px;color:var(--muted)}.editor-format{padding:6px 16px;font-size:10px;color:var(--muted);line-height:1.6;background:var(--side);border-bottom:1px solid var(--border)}
.editor-panes{display:flex;flex:1;min-height:0;overflow:hidden}.editor-source{flex:1;min-width:0;min-height:0;position:relative}.editor-preview{flex:1;min-width:0;max-width:none;border-left:1px solid var(--border);overflow:auto;padding:22px 28px;margin:0;background:var(--bg)}.mode-edit .editor-preview{display:none}.mode-preview .editor-source{display:none}.editor-panes.mode-preview .editor-preview{border-left:0}.editor-bottom{display:flex;align-items:center;gap:15px;justify-content:space-between;padding:8px 16px;border-top:1px solid var(--border);font-size:10px;color:var(--muted);background:var(--side);flex-wrap:wrap}.editor-bottom a{color:var(--accent)}.save-ok{color:var(--accent);font-size:11px}.save-dirty{color:#d6bd87;font-size:11px}.save-error{color:var(--danger);font-size:11px}.editor-problem{background:#b347471a;color:var(--danger);border-bottom:1px solid #b3474733;padding:10px 16px;display:flex;align-items:center;gap:12px;font-size:11px;line-height:1.8;flex-wrap:wrap}.editor-problem button{padding:4px 8px;font-size:11px;color:var(--danger)}.editor-problem span+span{opacity:.8}.editor-problem[hidden]{display:none}
.cm-s-study.CodeMirror{height:100%;background:var(--code);color:var(--text);font-family:Consolas,"Cascadia Code","Microsoft YaHei",monospace;font-size:14px;line-height:1.85}.cm-s-study .CodeMirror-lines{padding:16px 0}.cm-s-study .CodeMirror-gutters{background:var(--code);border-right:1px solid var(--border);padding:0 9px 0 6px}.cm-s-study .CodeMirror-linenumber{font-size:10px;color:var(--muted);min-width:35px}.cm-s-study .CodeMirror-cursor{border-left:2px solid var(--accent)}.cm-s-study .CodeMirror-selected{background:var(--accent-bg)}.cm-s-study.CodeMirror-focused .CodeMirror-selected{background:var(--accent-bg)}.cm-s-study .cm-keyword,.cm-s-study .cm-header{color:#b5a4dd}.cm-s-study .cm-string,.cm-s-study .cm-string-2{color:#cfb78b}.cm-s-study .cm-number,.cm-s-study .cm-atom{color:#8bbbd2}.cm-s-study .cm-comment,.cm-s-study .cm-quote{color:#758d78}.cm-s-study .cm-def,.cm-s-study .cm-variable-2,.cm-s-study .cm-type{color:#87c9b7}.cm-s-study .cm-tag,.cm-s-study .cm-property{color:#a0c8d7}.cm-s-study .cm-link,.cm-s-study .cm-url{color:var(--accent)}.cm-s-study .cm-error{color:var(--danger)}.cm-s-study .CodeMirror-matchingbracket{color:var(--accent)!important;background:var(--accent-bg)}.cm-s-study .cm-searching{background:#c1aa4855}.cm-s-study .CodeMirror-activeline-background{background:var(--hover)}
:root[data-theme=light] .cm-s-study .cm-keyword,:root[data-theme=light] .cm-s-study .cm-header{color:#764595}:root[data-theme=light] .cm-s-study .cm-string{color:#8d5a19}:root[data-theme=light] .cm-s-study .cm-number,:root[data-theme=light] .cm-s-study .cm-atom{color:#266ba2}:root[data-theme=light] .cm-s-study .cm-type,:root[data-theme=light] .cm-s-study .cm-def{color:#287662}
#editor-dialog{width:min(1000px,96vw)}.diff-panes{display:grid;grid-template-columns:1fr 1fr;gap:15px}.diff-panes textarea{font-family:Consolas,"Microsoft YaHei",monospace;font-size:11px;line-height:1.8;height:210px;white-space:pre;overflow:auto}.unified-diff{max-height:240px;overflow:auto;background:var(--code);border:1px solid var(--border);padding:15px;font-size:11px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.unified-diff span{display:inline}.diff-add{color:var(--accent);background:#76aa8220}.diff-remove{color:var(--danger);background:#bb737320}#editor-dialog summary{font-size:12px;color:var(--muted);cursor:pointer}.draft-notice{position:sticky;top:0;z-index:3;background:var(--accent-bg);color:var(--accent);padding:12px 20px;font-size:11px;display:flex;align-items:center;gap:18px;justify-content:space-between}.draft-notice button{font-size:11px;padding:5px 8px}.markdown .task-list-item{list-style:none}.markdown input[type=checkbox]{width:auto;margin:0 7px 0 0;accent-color:var(--accent)}
@media(max-width:1000px){.editor-toolbar,.editor-tools{padding:7px 9px;gap:6px}.editor-toolbar #edit-autosave+span{display:none}.editor-mode-switch{margin-left:0}.editor-panes.mode-split{flex-direction:column}.mode-split .editor-preview{border-top:1px solid var(--border);border-left:0;padding:15px 20px}.diff-panes{grid-template-columns:1fr}.editor-bottom{gap:5px}.editor-bottom span:nth-child(2){display:none}}
