.cm-editor { min-height: 70vh; background: #0b0f14; color: #d7dde8; border: 1px solid #263241; border-radius: 0.35rem; font-size: 0.95rem; } .cm-scroller { font-family: "JetBrains Mono", "Hack Nerd Font", monospace; } .cm-content { min-height: 70vh; caret-color: #ffd866; } .cm-gutters { background: #080c10; color: #596678; border-right: 1px solid #263241; } .cm-activeLine { background: rgba(255,255,255,0.035); } .cm-activeLineGutter { background: rgba(255,255,255,0.045); color: #ffd866; } .cm-cursor { border-left-color: #ffd866; } .cm-selectionBackground, .cm-content ::selection { background: rgba(120,160,255,0.35) !important; } .cm-line { padding: 0 0.25rem; } .cm-focused { outline: none; box-shadow: 0 0 0 1px rgba(255,216,102,0.28), 0 0 1.2rem rgba(255,216,102,0.08); } .editor-shell { display: grid; grid-template-columns: 1fr; gap: 1rem; } .editor-toolbar { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; } .editor-toolbar button, .editor-toolbar a { background: #111821; color: #d7dde8; border: 1px solid #263241; border-radius: 0.25rem; padding: 0.38rem 0.7rem; text-decoration: none; } .editor-toolbar button:hover, .editor-toolbar a:hover { background: #1a2430; color: #ffffff; } .editor-meta { color: #8190a5; font-family: "JetBrains Mono", monospace; font-size: 0.86rem; margin-bottom: 0.75rem; } .cm-tooltip { background: #111821; color: #d7dde8; border: 1px solid #44506a; border-radius: 0.25rem; box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.45); z-index: 2000; } .cm-tooltip-autocomplete ul { max-height: 18rem; overflow-y: auto; } .cm-tooltip-autocomplete ul li[aria-selected] { background: #26324a; color: #ffffff; } .cm-vim-panel { background: #080c10; color: #ffd866; border-top: 1px solid #263241; font-family: "JetBrains Mono", monospace; padding: 0.25rem 0.5rem; } .cm-vim-panel input { background: #111821; color: #ffd866; border: 1px solid #44506a; } .cm-editor.cm-focused { outline: none; } /* autocomplete popup */ .cm-tooltip { background: #101624 !important; color: #e6eaff !important; border: 1px solid #5d6f9f !important; border-radius: 0.25rem; box-shadow: 0 0.45rem 1.2rem rgba(0,0,0,0.55); z-index: 3000; } .cm-tooltip-autocomplete { font-family: "JetBrains Mono", monospace; } .cm-tooltip-autocomplete ul { max-height: 18rem; overflow-y: auto; } .cm-tooltip-autocomplete ul li { color: #e6eaff !important; background: #101624 !important; padding: 0.25rem 0.5rem; } .cm-tooltip-autocomplete ul li[aria-selected] { background: #314a7a !important; color: #ffffff !important; } .cm-completionLabel { color: #ffffff !important; } .cm-completionDetail { color: #ffd86f !important; } .cm-completionInfo { background: #101624 !important; color: #e6eaff !important; border: 1px solid #5d6f9f !important; } /* editor layout */ .editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; height: auto; min-height: 30rem; } #editor-mount { min-width: 0; min-height: 0; display: flex; flex-direction: column; } #editor-mount .cm-editor { flex: 1; min-height: 0; height: 100%; } #editor-mount .cm-scroller { overflow: auto; } .preview { min-width: 0; min-height: 0; height: 100%; overflow: auto; } /* status bar */ .editor-statusbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 1.8rem; padding: 0 0.65rem; border: 1px solid #263241; border-top: none; background: #080c10; color: #9fa9c2; font-family: "JetBrains Mono", monospace; font-size: 0.78rem; } .editor-statusbar strong { color: #ffd86f; font-weight: normal; } .editor-status-left, .editor-status-right { display: flex; gap: 0.8rem; align-items: center; } /* viewport-contained editor */ body.mode-editor { height: 100vh; overflow: hidden; } body.mode-editor .topbar { height: 48px; box-sizing: border-box; } body.mode-editor .container { height: calc(100vh - 48px); overflow: hidden; box-sizing: border-box; padding: 1rem; } body.mode-editor .card { height: 100%; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; } body.mode-editor .editor-grid { flex: 1; min-height: 0; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; } body.mode-editor .editor-pane { min-height: 0; display: flex; flex-direction: column; } body.mode-editor #editor-mount { flex: 1; min-height: 0; } body.mode-editor #editor-mount .cm-editor { height: 100%; min-height: 0; } body.mode-editor #editor-mount .cm-scroller { overflow: auto; } body.mode-editor #preview { height: 100%; min-height: 0; overflow: auto; } /* cursor visibility */ .cm-cursor, .cm-dropCursor { border-left: 2px solid #ffd86f !important; } .cm-focused .cm-cursor { border-left-color: #ffef9a !important; box-shadow: 0 0 0.35rem rgba(255,216,102,0.65); } .cm-selectionMatch { background: rgba(255,216,102,0.18); } /* reduce native-looking scrollbar noise */ body.mode-editor { scrollbar-width: none; } body.mode-editor::-webkit-scrollbar { width: 0; height: 0; } /* editor scrollbars */ body.mode-editor .cm-scroller, body.mode-editor #preview, body.mode-editor .preview, body.mode-editor .cm-tooltip-autocomplete ul { scrollbar-width: thin; scrollbar-color: #5d6f9f #080c10; } body.mode-editor .cm-scroller::-webkit-scrollbar, body.mode-editor #preview::-webkit-scrollbar, body.mode-editor .preview::-webkit-scrollbar, body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar { width: 0.55rem; height: 0.55rem; } body.mode-editor .cm-scroller::-webkit-scrollbar-track, body.mode-editor #preview::-webkit-scrollbar-track, body.mode-editor .preview::-webkit-scrollbar-track, body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar-track { background: #080c10; } body.mode-editor .cm-scroller::-webkit-scrollbar-thumb, body.mode-editor #preview::-webkit-scrollbar-thumb, body.mode-editor .preview::-webkit-scrollbar-thumb, body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar-thumb { background: #5d6f9f; border-radius: 999px; border: 2px solid #080c10; } body.mode-editor .cm-scroller::-webkit-scrollbar-thumb:hover, body.mode-editor #preview::-webkit-scrollbar-thumb:hover, body.mode-editor .preview::-webkit-scrollbar-thumb:hover, body.mode-editor .cm-tooltip-autocomplete ul::-webkit-scrollbar-thumb:hover { background: #ffd86f; } /* autocomplete popup width/scroll cleanup */ .cm-tooltip-autocomplete { overflow: hidden !important; } .cm-tooltip-autocomplete ul { background: #101624 !important; padding: 0.15rem 0 !important; } .cm-tooltip-autocomplete ul::-webkit-scrollbar-corner { background: #080c10; } /* line numbers */ .cm-lineNumbers .cm-gutterElement { color: #7f8ca8; padding: 0 0.65rem 0 0.45rem; } .cm-gutters { background: #070c12 !important; border-right: 1px solid #263241 !important; } .cm-activeLineGutter { background: #172033 !important; color: #ffd86f !important; } .cm-lineNumbers .cm-gutterElement:hover { color: #ffffff; } /* editor compact command menu */ .editor-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.6rem; } .editor-head-left { min-width: 0; } .editor-head-path { font-family: "JetBrains Mono", monospace; color: #aab5ce; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .editor-head-right { position: relative; display: flex; align-items: center; gap: 0.45rem; } .editor-format-button, .editor-menu-button { height: 2rem; min-width: 2rem; padding: 0 0.65rem; border: 1px solid #344158; background: #101624; color: #d7dde8; border-radius: 0.25rem; cursor: pointer; } .editor-menu-button { font-size: 1.25rem; line-height: 1; } .editor-format-button:hover, .editor-menu-button:hover { background: #1b2640; color: #ffffff; } .editor-menu { position: absolute; top: 2.35rem; right: 0; display: none; min-width: 12rem; background: #101624; border: 1px solid #44506a; border-radius: 0.3rem; box-shadow: 0 0.5rem 1.4rem rgba(0,0,0,0.55); z-index: 2500; overflow: hidden; } .editor-menu.open { display: block; } .editor-menu button, .editor-menu a { display: block; width: 100%; box-sizing: border-box; padding: 0.55rem 0.75rem; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.06); color: #d7dde8; text-align: left; text-decoration: none; font: inherit; cursor: pointer; } .editor-menu button:hover, .editor-menu a:hover { background: #26324a; color: #ffffff; } .editor-menu .danger { color: #ff8ca8; } .editor-format-dialog { border: 1px solid #44506a; border-radius: 0.35rem; background: #101624; color: #d7dde8; padding: 1rem; min-width: 20rem; } .editor-format-dialog::backdrop { background: rgba(0,0,0,0.55); } .editor-format-dialog h3 { margin-top: 0; } .editor-format-choice { display: flex; flex-direction: column; gap: 0.5rem; } .editor-format-choice button { text-align: left; padding: 0.65rem 0.75rem; } /* CodeMirror syntax colors: dark theme tuning */ .cm-editor { background: #070b10 !important; color: #d8e2f2 !important; } .cm-content { color: #d8e2f2 !important; } .cm-line { color: #d8e2f2; } /* headings / markdown markers */ .cm-heading, .cm-header, .cm-line .ͼc, .cm-line .ͼd, .cm-line .ͼe, .cm-line .ͼf { color: #ffd86f !important; font-weight: 700; } /* links */ .cm-link, .cm-url, .cm-line .ͼa { color: #8bd5ff !important; text-decoration: underline; } /* emphasis */ .cm-emphasis { color: #f7b7d8 !important; font-style: italic; } .cm-strong { color: #ffffff !important; font-weight: 700; } /* code / fenced block */ .cm-monospace, .cm-inlineCode, .cm-line .ͼb { color: #aee7ff !important; background: rgba(174,231,255,0.08); } /* punctuation / markdown syntax */ .cm-punctuation, .cm-line .ͼ13, .cm-line .ͼ14 { color: #7f8ca8 !important; } /* keywords / tags */ .cm-keyword { color: #ff9ecb !important; } .cm-tagName { color: #8bd5ff !important; } .cm-attributeName { color: #ffd86f !important; } .cm-string { color: #b7f7c1 !important; } .cm-comment { color: #7f8ca8 !important; font-style: italic; } /* fallback for generated lezer highlight classes */ .cm-line [class^="ͼ"], .cm-line [class*=" ͼ"] { color: inherit; } /* selection should not destroy contrast */ .cm-selectionBackground, .cm-content ::selection { background: rgba(255,216,102,0.26) !important; color: #ffffff !important; } /* last-resort visual selection override */ .cm-editor .cm-selectionLayer > div, .cm-editor.cm-focused .cm-selectionLayer > div { background-color: rgba(255, 216, 102, 0.55) !important; } .cm-editor.pageswiki-vim-visual .cm-selectionLayer > div { background-color: rgba(183, 247, 193, 0.58) !important; } .preview .diagram, #preview .diagram { margin: 1rem 0; padding: 0.75rem; border: 1px solid #263241; background: #ffffff; border-radius: 0.35rem; overflow: auto; } .preview .diagram img, #preview .diagram img { max-width: 100%; height: auto; display: block; }