.wiki-editor { --wiki-editor-border: #c7d2df; --wiki-editor-accent: #245b77; --wiki-editor-muted: #526477; border: 1px solid var(--wiki-editor-border); border-radius: .8rem; background: var(--wiki-editor-background, #fff); color: inherit; width: 100%; }
.wiki-editor [hidden] { display: none !important; }
.wiki-editor button, .wiki-editor select, .wiki-editor-dialog button, .wiki-editor-dialog input, .wiki-editor-dialog select { font: inherit; }
.wiki-editor button, .wiki-editor select, .wiki-editor-dialog button { border: 1px solid transparent; border-radius: .4rem; color: inherit; background: transparent; padding: .4rem .6rem; cursor: pointer; }
.wiki-editor button:hover, .wiki-editor-dialog button:hover, .wiki-editor summary:hover { background: #eaf1f6; }
.wiki-editor button[aria-pressed="true"], .wiki-editor-dialog button.selected { color: #16445f; background: #deedf6; border-color: #a9cbdc; }
.wiki-editor button:focus-visible, .wiki-editor select:focus-visible, .wiki-editor textarea:focus-visible, .wiki-editor-dialog :focus-visible { outline: 3px solid #548fac; outline-offset: 2px; }
.wiki-editor-top { display: flex; justify-content: flex-end; padding: .45rem .6rem; background: #f6f8fa; border-radius: .8rem .8rem 0 0; }
.wiki-editor-modes { display: flex; gap: .25rem; }
.wiki-editor-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; border-top: 1px solid var(--wiki-editor-border); border-bottom: 1px solid var(--wiki-editor-border); padding: .5rem; background: #f6f8fa; }
.wiki-editor-toolbar > button[aria-label^="Bold"] { font-weight: 750; }
.wiki-editor-toolbar > button[aria-label^="Italic"] { font-style: italic; }
.wiki-editor-surface { width: 100%; box-sizing: border-box; padding: 1.5rem; }
.wiki-editor .tiptap { min-height: 28rem; width: 100%; max-width: none; outline: none; font: inherit; line-height: inherit; overflow-wrap: anywhere; }
.wiki-editor .tiptap > :first-child { margin-top: 0; }
.wiki-editor .tiptap :where(h2,h3,h4) { line-height: 1.25; margin: 1.4em 0 .6em; }
.wiki-editor .tiptap p { margin: .75em 0; }
.wiki-editor .tiptap pre { overflow-x: auto; background: #172635; color: #e9f0f5; border-radius: .5rem; padding: 1rem; white-space: pre; }
.wiki-editor .tiptap code, .wiki-editor-markup { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }
.wiki-editor .tiptap :not(pre) > code { background: #edf2f5; border-radius: .25rem; padding: .1rem .3rem; }
.wiki-editor .tiptap blockquote { border-left: 3px solid #7ba9bb; margin-inline: 0; padding-left: 1rem; }
.wiki-editor .tiptap .tableWrapper { overflow-x: auto; margin: 1rem 0; }
.wiki-editor .tiptap table { border-collapse: collapse; table-layout: fixed; width: 100%; }
.wiki-editor .tiptap td, .wiki-editor .tiptap th { min-width: 2.5rem; border: 1px solid #c7d2df; padding: .5rem .65rem; position: relative; vertical-align: top; }
.wiki-editor .tiptap th { background: #edf3f6; font-weight: 700; }
.wiki-editor .tiptap .selectedCell::after { z-index: 2; position: absolute; inset: 0; background: #76aecd44; content: ''; pointer-events: none; }
.wiki-editor .tiptap .column-resize-handle { position: absolute; right: -2px; top: 0; bottom: -2px; width: 4px; background: #548fac; pointer-events: none; }
.wiki-editor .resize-cursor { cursor: col-resize; }
.wiki-editor-table-menu { position: relative; }
.wiki-editor-table-menu summary { cursor: pointer; border-radius: .4rem; padding: .4rem .6rem; }
.wiki-editor-table-menu > div { position: absolute; z-index: 10; top: 100%; right: 0; min-width: 12rem; display: flex; flex-direction: column; padding: .4rem; background: #fff; border: 1px solid var(--wiki-editor-border); box-shadow: 0 .5rem 1.5rem #152b3a22; border-radius: .5rem; }
.wiki-editor-table-menu button { text-align: left; }
.wiki-editor-markup { box-sizing: border-box; width: 100%; min-height: 32rem; resize: vertical; border: 0; padding: 1.5rem; color: inherit; background: inherit; font-size: .9rem; line-height: 1.6; tab-size: 2; }
.wiki-editor-status { margin: 0; border-top: 1px solid var(--wiki-editor-border); padding: .5rem 1rem; font-size: .8rem; color: var(--wiki-editor-muted); }
.wiki-editor-status.is-error, .wiki-editor-error { color: #9a3126; }
.wiki-link-token { color: #1e647f; text-decoration: underline; text-decoration-style: dotted; cursor: pointer; }
.wiki-fact-token { display: inline; color: #624521; background: #fff3d3; border-radius: .25rem; padding: .05em .2em; font-size: .92em; }
.wiki-spoiler-editor { margin: 1rem 0; border: 1px dashed #a786b4; border-radius: .5rem; padding: .5rem 1rem; background: #f9f5fc; }
.wiki-spoiler-editor::before { display: block; color: #715180; font-size: .78rem; font-weight: 700; letter-spacing: .02em; content: attr(data-wiki-spoiler) ' spoiler'; }
.wiki-editor-image { box-sizing: border-box; margin: 1.5rem auto; max-width: 100%; }
.wiki-editor-image[data-alignment="left"] { margin-left: 0; margin-right: auto; }
.wiki-editor-image[data-alignment="right"] { margin-left: auto; margin-right: 0; }
.wiki-image-frame { position: relative; overflow: hidden; width: 100%; border-radius: .35rem; background: #edf2f5; }
.wiki-image-frame img { position: absolute; max-width: none; height: auto; display: block; }
.wiki-editor-image figcaption { font-size: .86rem; line-height: 1.45; color: #526477; text-align: center; margin-top: .45rem; }
.wiki-editor-image.ProseMirror-selectednode { outline: 3px solid #548fac; outline-offset: 4px; border-radius: .35rem; }
.wiki-editor-image-tools { display: flex; flex-wrap: wrap; gap: .6rem; padding: .75rem; align-items: end; background: #edf5f9; border-bottom: 1px solid var(--wiki-editor-border); }
.wiki-editor-field { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.wiki-editor-field > span { font-weight: 650; font-size: .82rem; }
.wiki-editor-field > :where(input,select,textarea) { border: 1px solid #a9bac8; border-radius: .35rem; padding: .45rem .6rem; min-width: 0; background: #fff; color: #152b3a; }
.wiki-editor-dialog { box-sizing: border-box; width: min(46rem, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 1.5rem; border: 1px solid #b7c8d4; border-radius: .9rem; color: #152b3a; background: #fff; box-shadow: 0 1rem 4rem #10253544; overflow-y: auto; }
.wiki-editor-dialog::backdrop { background: #132c3f88; backdrop-filter: blur(2px); }
.wiki-editor-dialog h2 { font-size: 1.35rem; margin: 0 0 1rem; }
.wiki-editor-dialog .wiki-editor-field { margin: .8rem 0; }
.wiki-editor-dialog input[type="search"] { box-sizing: border-box; width: 100%; border: 1px solid #a9bac8; border-radius: .35rem; padding: .6rem; }
.wiki-editor-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.wiki-editor-dialog button.primary { background: #245b77; color: #fff; }
.wiki-editor-search-results { display: flex; flex-direction: column; gap: .3rem; max-height: 19rem; overflow: auto; margin-top: .7rem; }
.wiki-editor-search-results button { text-align: left; padding: .65rem; }
.wiki-crop-preview { position: relative; width: 100%; user-select: none; touch-action: none; cursor: crosshair; overflow: hidden; background: #172635; }
.wiki-crop-preview > img { display: block; width: 100%; height: auto; max-height: none; pointer-events: none; }
.wiki-crop-rectangle { position: absolute; border: 2px solid #fff; outline: 1px solid #172635; box-sizing: border-box; box-shadow: 0 0 0 100vmax #14233188; cursor: move; }
.wiki-crop-handle { position: absolute; width: .8rem; height: .8rem; border: 1px solid #172635; background: #fff; right: -.4rem; bottom: -.4rem; cursor: nwse-resize; }
.wiki-crop-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; }
@media (max-width: 600px) { .wiki-editor-surface, .wiki-editor-markup { padding: 1rem; } .wiki-editor-dialog { padding: 1rem; } .wiki-crop-fields { grid-template-columns: repeat(2, 1fr); } .wiki-editor-image-tools .wiki-editor-field { flex: 1 1 8rem; } }

.wiki-editor-code-language { max-width: 9rem; border: 1px solid #a9bac8; border-radius: .35rem; padding: .45rem .6rem; font: inherit; }

