.editor-layout{display:flex;flex-direction:column;height:calc(100vh - 330px);background:var(--bg-color);border-radius:4px;overflow:hidden;border:1px solid var(--border-color);margin-top:0;min-height:300px}.editor-area{flex:1;position:relative;overflow:hidden}.editor-container{display:none;position:relative;background:var(--bg-color);padding:0;margin-bottom:12px}.editor-container.active{display:block}.editor-toolbar{margin:8px 0 12px 0;padding:0 16px}.editor-button{padding:8px 16px;border:1px solid var(--border-color);background:var(--bg-color);color:var(--text-color);border-radius:4px;cursor:pointer;font-size:14px;transition:all .2s ease}.editor-button:hover{border-color:var(--primary-color);color:var(--primary-color)}.editor-button.primary{background:var(--primary-color);color:#fff;border-color:var(--primary-color)}.editor-button.primary:hover{opacity:.9}.custom-toolbar{border-bottom:1px solid var(--border-color)!important;padding:4px 8px!important;margin-top:0!important;background:var(--sidebar-bg)!important;display:flex;flex-wrap:wrap;gap:4px;position:sticky;top:0;z-index:10}.custom-toolbar button{color:var(--text-color)!important;border:1px solid var(--border-color)!important;border-radius:4px!important;margin:0 1px!important;height:28px;width:28px;display:flex;align-items:center;justify-content:center;background:0 0;cursor:pointer;font-size:14px}.custom-toolbar button:hover{background:var(--hover-bg)!important;border-color:var(--primary-color)!important;color:var(--primary-color)!important}.custom-toolbar button.active{background-color:var(--hover-bg)!important;border-color:var(--primary-color)!important;color:var(--primary-color)!important}.custom-toolbar button.insert-row-button::after{content:"↔";position:absolute;font-size:10px;bottom:1px;right:1px;color:var(--breadcrumb-color);font-weight:700;text-shadow:0 0 1px var(--bg-color)}.custom-toolbar button.insert-column-button::after{content:"↕";position:absolute;font-size:10px;bottom:1px;right:1px;color:var(--breadcrumb-color);font-weight:700;text-shadow:0 0 1px var(--bg-color)}.custom-toolbar button.delete-row-button::after{content:"↔";position:absolute;font-size:10px;bottom:1px;right:1px;color:var(--breadcrumb-color);font-weight:700;text-shadow:0 0 1px var(--bg-color)}.custom-toolbar button.delete-column-button::after{content:"↕";position:absolute;font-size:10px;bottom:1px;right:1px;color:var(--breadcrumb-color);font-weight:700;text-shadow:0 0 1px var(--bg-color)}.custom-toolbar button.move-row-down-button,.custom-toolbar button.move-row-up-button{position:relative}.custom-toolbar button.move-row-down-button::after,.custom-toolbar button.move-row-up-button::after{content:"↔";position:absolute;font-size:10px;bottom:1px;right:1px;color:var(--breadcrumb-color);font-weight:700;text-shadow:0 0 1px var(--bg-color)}.custom-toolbar button.move-column-left-button,.custom-toolbar button.move-column-right-button{position:relative}.custom-toolbar button.move-column-left-button::after,.custom-toolbar button.move-column-right-button::after{content:"↕";position:absolute;font-size:10px;bottom:1px;right:1px;color:var(--breadcrumb-color);font-weight:700;text-shadow:0 0 1px var(--bg-color)}.custom-toolbar button.align-column-center-button,.custom-toolbar button.align-column-left-button,.custom-toolbar button.align-column-none-button,.custom-toolbar button.align-column-right-button{position:relative}.custom-toolbar button.align-column-center-button::after,.custom-toolbar button.align-column-left-button::after,.custom-toolbar button.align-column-none-button::after,.custom-toolbar button.align-column-right-button::after{content:"↕";position:absolute;font-size:10px;bottom:1px;right:1px;color:var(--breadcrumb-color);font-weight:700;text-shadow:0 0 1px var(--bg-color)}.custom-toolbar button.align-column-center-button:hover::after,.custom-toolbar button.align-column-left-button:hover::after,.custom-toolbar button.align-column-none-button:hover::after,.custom-toolbar button.align-column-right-button:hover::after,.custom-toolbar button.delete-column-button:hover::after,.custom-toolbar button.delete-row-button:hover::after,.custom-toolbar button.insert-column-button:hover::after,.custom-toolbar button.insert-row-button:hover::after,.custom-toolbar button.move-column-left-button:hover::after,.custom-toolbar button.move-column-right-button:hover::after,.custom-toolbar button.move-row-down-button:hover::after,.custom-toolbar button.move-row-up-button:hover::after{color:var(--primary-color)}.custom-toolbar i.separator{display:inline-block;width:0;border-left:1px solid var(--border-color);border-right:1px solid transparent;color:transparent;text-indent:-10px;margin:0 4px;height:28px}.custom-toolbar button.disabled{opacity:.5;cursor:not-allowed!important}.custom-toolbar button.disabled:hover{background:0 0!important;border-color:var(--border-color)!important;color:var(--text-color)!important}.custom-toolbar button.preview-button{opacity:1!important;cursor:pointer!important}.custom-toolbar button.preview-button:hover{background:var(--hover-bg)!important;border-color:var(--primary-color)!important;color:var(--primary-color)!important}.editor-preview{position:absolute;top:0;left:0;right:0;bottom:0;background:var(--bg-color);padding:16px;display:none;overflow:auto;font-family:var(--text-font);line-height:1.6}.editor-preview-active{display:block}.preview-loading{color:var(--breadcrumb-color);text-align:center;padding:20px;font-style:italic}.editor-preview pre code{background:0 0!important;color:inherit!important;border:none!important;padding:0!important;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace!important}.editor-preview pre{background-color:var(--code-bg);border:1px solid var(--border-color);border-radius:3px;padding:.5em;margin:.5em 0;overflow:auto}.editor-statusbar{color:var(--text-color)!important;background:var(--sidebar-bg)!important;border-top:1px solid var(--border-color)!important;padding:8px 10px;font-size:12px;text-align:right;position:sticky;bottom:0;z-index:10}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-statusbar .lines:before{content:'lines: '}.editor-statusbar .words:before{content:'words: '}.editor-statusbar .cursor:before{content:'cursor: '}.custom-editor-wrapper{background:var(--bg-color);display:block;height:100%}.custom-editor-wrapper .CodeMirror{color:var(--text-color);background:var(--bg-color);height:100%!important;max-height:none;border:none;font-family:'Fira Code',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace}.custom-editor-wrapper .CodeMirror-scroll{min-height:100%}.custom-editor-wrapper .CodeMirror-gutters{background-color:var(--hover-bg);border-right:1px solid var(--border-color);width:50px}.custom-editor-wrapper .CodeMirror-linenumber{color:var(--breadcrumb-color);padding:0 5px 0 5px}.custom-editor-wrapper .CodeMirror-activeline-background{background:rgba(var(--primary-rgb),.03)}.custom-editor-wrapper .CodeMirror-activeline-gutter{background-color:var(--code-bg)}.custom-editor-wrapper .CodeMirror-cursor{border-left:2px solid rgba(var(--primary-rgb),.4)!important;margin-left:0!important}.CodeMirror-selected{background-color:rgba(var(--primary-rgb),.15)!important}.CodeMirror-selectedtext{background-color:rgba(var(--primary-rgb),.2)!important;color:var(--text-color)!important}::selection{background-color:rgba(var(--primary-rgb),.2)!important;color:var(--text-color)!important}::-moz-selection{background-color:rgba(var(--primary-rgb),.2)!important;color:var(--text-color)!important}.custom-editor-wrapper .CodeMirror .cm-header{color:var(--text-color)}.custom-editor-wrapper .CodeMirror .cm-header-2{border-bottom-color:var(--border-color)}.custom-editor-wrapper .CodeMirror .CodeMirror-line .cm-header-2:after{background-color:var(--border-color)}.custom-editor-wrapper .CodeMirror .cm-header{display:inline}.custom-editor-wrapper .CodeMirror .cm-header-1,.custom-editor-wrapper .CodeMirror .cm-header-2,.custom-editor-wrapper .CodeMirror .cm-header-3{padding-top:8px;padding-bottom:2px}.custom-editor-wrapper .CodeMirror .cm-header-1{font-size:32px;font-weight:600;line-height:1.2;display:inline}.custom-editor-wrapper .CodeMirror .cm-header-2{font-size:24px;font-weight:600;line-height:1.2;display:inline}.custom-editor-wrapper .CodeMirror .cm-header-3{font-size:20px;font-weight:600;line-height:1.2;display:inline}.custom-editor-wrapper .CodeMirror .cm-header-4{font-size:18px;font-weight:600;line-height:1.2;display:inline}.custom-editor-wrapper .CodeMirror .cm-header-5{font-size:16px;font-weight:600;line-height:1.2;display:inline}.custom-editor-wrapper .CodeMirror .cm-header-6{font-size:14px;font-weight:600;line-height:1.2;display:inline}.custom-editor-wrapper .CodeMirror .CodeMirror-line .cm-header-2:after{content:'';display:block;height:1px;background-color:var(--border-color);position:absolute;left:0;right:0;bottom:-4px}.custom-editor-wrapper .CodeMirror-line:has(.cm-header){line-height:normal!important}.custom-editor-wrapper .CodeMirror-line:has(.cm-header-1) .CodeMirror-cursor{height:32px!important}.custom-editor-wrapper .CodeMirror-line:has(.cm-header-2) .CodeMirror-cursor{height:24px!important}.custom-editor-wrapper .CodeMirror-line:has(.cm-header-3) .CodeMirror-cursor{height:20px!important}.custom-editor-wrapper .CodeMirror-line:has(.cm-header-4) .CodeMirror-cursor{height:18px!important}.custom-editor-wrapper .CodeMirror-line:has(.cm-header-5) .CodeMirror-cursor{height:16px!important}.custom-editor-wrapper .CodeMirror-line:has(.cm-header-6) .CodeMirror-cursor{height:14px!important}.editor-preview h1{margin-top:0;margin-bottom:.5em;font-size:32px;font-weight:600;color:var(--text-color)}.editor-preview h2{font-size:24px;font-weight:600;margin-top:1em;margin-bottom:.5em;padding-bottom:.25em;border-bottom:1px solid var(--border-color)}.editor-preview h3{font-size:20px;font-weight:600;margin-top:1em;margin-bottom:.5em}.editor-preview h4{font-size:18px;font-weight:600;margin-top:1em;margin-bottom:.5em}.editor-preview h5{font-size:16px;font-weight:600;margin-top:1em;margin-bottom:.5em}.editor-preview h6{font-size:14px;font-weight:600;margin-top:1em;margin-bottom:.5em}.editor-preview h1,.editor-preview h2,.editor-preview h3,.editor-preview h4,.editor-preview h5,.editor-preview h6{color:var(--text-color)}.editor-preview img{max-width:100%;height:auto;display:block;margin:1.5rem auto;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.1)}.editor-preview a{color:var(--primary-color);text-decoration:none}.editor-preview a:hover{text-decoration:underline}.table-picker{position:fixed;background:var(--bg-color);border:1px solid var(--border-color);border-radius:4px;padding:10px;z-index:1000;box-shadow:0 2px 8px rgba(0,0,0,.15);max-width:320px;width:auto}.table-picker .cell{display:inline-block;width:15px;height:15px;border:1px solid var(--border-color);margin:1px;cursor:pointer}.table-picker .cell.active{background-color:var(--primary-color);border-color:var(--primary-color)}.emoji-picker{position:fixed;background:var(--bg-color);border:1px solid var(--border-color);border-radius:4px;padding:10px;z-index:1000;box-shadow:0 2px 8px rgba(0,0,0,.15);max-width:320px;max-height:300px;overflow-y:auto;width:auto}.emoji-container{display:grid;grid-template-columns:repeat(8,1fr);gap:5px}.emoji-picker .emoji-btn{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;cursor:pointer;border-radius:4px;border:1px solid transparent;background:0 0;font-size:18px;transition:all .2s ease}.anchor-picker,.doc-picker{position:fixed;background:var(--bg-color);border:1px solid var(--border-color);border-radius:4px;padding:10px;z-index:1000;box-shadow:0 2px 8px rgba(0,0,0,.15);max-width:320px;min-width:260px;max-height:350px;overflow-y:hidden;overflow-x:hidden;width:auto;box-sizing:border-box}.anchor-search-input,.doc-search-container{margin-bottom:10px;width:100%;padding:0;box-sizing:border-box}.anchor-search-input,.doc-search-input{width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid var(--border-color);border-radius:4px;font-size:14px;background:var(--bg-color);color:var(--text-color)}.anchor-list-container,.docs-container{display:flex;flex-direction:column;gap:5px;max-height:220px;overflow-y:auto;overflow-x:hidden;width:100%;box-sizing:border-box}.docs-loading{padding:20px;text-align:center;color:var(--breadcrumb-color)}.anchor-btn,.doc-btn{display:flex;flex-direction:column;align-items:flex-start;padding:6px 8px;background:0 0;border:1px solid var(--border-color);border-radius:4px;cursor:pointer;text-align:left;width:100%;color:var(--text-color);max-width:100%}.anchor-btn:hover,.doc-btn:hover{background:var(--hover-bg);border-color:var(--primary-color)}.doc-name{font-weight:700;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:100%}.doc-path{font-size:12px;color:var(--breadcrumb-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.no-results{padding:15px;text-align:center;color:var(--breadcrumb-color);font-style:italic}.anchor-btn:hover,.doc-btn:hover,.emoji-btn:hover{background:var(--hover-bg);border-color:var(--primary-color)}.anchor-picker-header{display:flex;align-items:center;gap:6px;margin-bottom:6px}.anchor-back-btn{background:0 0;border:none;color:var(--text-color);font-size:16px;line-height:1;padding:4px 6px;cursor:pointer;border-radius:4px;transition:background-color .15s ease,color .15s ease}.anchor-back-btn:hover{background:var(--hover-bg);color:var(--primary-color)}.anchor-picker{overflow-y:hidden}.anchor-list-container{max-height:240px;overflow-y:auto;padding-bottom:10px}.anchor-list-container{flex:1 1 auto}.anchor-btn.level-2{padding-left:12px}.anchor-btn.level-3{padding-left:24px}.anchor-btn.level-4{padding-left:36px}.anchor-btn.level-5{padding-left:48px}.anchor-btn.level-6{padding-left:60px}.sidebar-blur{pointer-events:none!important;transition:filter .3s ease!important}.CodeMirror pre.CodeMirror-line{padding:0 10px 0 5px!important}@media (max-width:768px){.editor-container{margin:0 -8px;width:calc(100% + 16px)}.editor-toolbar{padding:0 8px;margin:4px 0 8px 0}.editor-layout{margin-top:0}.custom-editor-wrapper{border-radius:0}.custom-editor-wrapper .CodeMirror{border-radius:0;border-left:none;border-right:none}.custom-editor-wrapper .CodeMirror-code{margin-left:8px}.custom-toolbar{padding:3px 6px!important;margin-top:0!important}.custom-editor-wrapper .CodeMirror-activeline-background{background:0 0!important;box-shadow:none!important}.custom-editor-wrapper .CodeMirror-activeline-gutter{background-color:transparent!important;box-shadow:none!important}.custom-editor-wrapper .CodeMirror-activeline .CodeMirror-linenumber{font-weight:700;color:var(--primary-color)}.custom-editor-wrapper .CodeMirror-line{position:relative;z-index:2}.custom-editor-wrapper .CodeMirror-cursor{border-left:2px solid rgba(var(--primary-rgb),.7)!important}body.sidebar-active .CodeMirror,body.sidebar-active .custom-editor-wrapper,body.sidebar-active .custom-toolbar,body.sidebar-active .editor-container,body.sidebar-active .editor-layout,body.sidebar-active .editor-preview,body.sidebar-active .editor-preview-active,body.sidebar-active .editor-statusbar{pointer-events:none;transition:filter .3s ease}.CodeMirror,.custom-editor-wrapper,.custom-toolbar,.editor-container,.editor-layout,.editor-statusbar{pointer-events:auto;transition:filter .3s ease}.editor-area.sidebar-blur,.editor-preview.sidebar-blur{pointer-events:none!important;transition:filter .3s ease!important}body.sidebar-active::after{content:'';position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.3);z-index:90;backdrop-filter:blur(2px)}.custom-editor-wrapper .CodeMirror .cm-header-1{font-size:24px}.custom-editor-wrapper .CodeMirror .cm-header-2{font-size:20px}.custom-editor-wrapper .CodeMirror .cm-header-3{font-size:18px}.custom-editor-wrapper .CodeMirror .cm-header-4{font-size:16px}.custom-editor-wrapper .CodeMirror .cm-header-5,.custom-editor-wrapper .CodeMirror .cm-header-6{font-size:14px}.editor-preview h1{font-size:24px}.editor-preview h2{font-size:20px}.editor-preview h3{font-size:18px}.editor-preview h4{font-size:16px}.editor-preview h5,.editor-preview h6{font-size:14px}.emoji-picker{max-width:calc(100vw - 40px);max-height:250px;padding:8px}.emoji-container{grid-template-columns:repeat(6,1fr);gap:4px}.emoji-picker .emoji-btn{width:36px;height:36px;font-size:20px}.doc-btn{padding:8px}.table-picker{max-width:calc(100vw - 40px);padding:8px}.table-picker .cell{width:18px;height:18px;margin:2px}}.editor-preview.kanban-preview{padding:20px;overflow-x:auto}.editor-preview.kanban-preview .kanban-board{min-height:400px}.editor-preview.kanban-preview .kanban-card{margin-bottom:10px}