.wf-rich-editor{margin-top:8px;border:1px solid var(--line);border-radius:9px;overflow:visible;background:var(--paper)}
.wf-rich-editor>label{display:block;padding:12px 14px;font-weight:650;font-size:.88rem}
.wf-editor-toolbar{display:flex;align-items:center;flex-wrap:wrap;padding:7px;background:var(--subtle);border-block:1px solid var(--line);gap:4px;position:relative;z-index:2}
.wf-tool-group{display:flex;align-items:center;gap:2px;padding-right:7px;margin-right:2px;border-right:1px solid var(--line)}
.wf-tool-group:last-child{border-right:0;margin-left:auto}
.wf-editor-toolbar button,.wf-emoji-menu>summary{display:inline-grid;place-items:center;min-width:32px;height:32px;padding:5px;border:0;border-radius:5px;background:transparent;color:var(--ink);font-size:1rem;cursor:pointer}
.wf-editor-toolbar button:hover,.wf-editor-toolbar button[aria-pressed=true],.wf-emoji-menu>summary:hover{background:var(--tint);color:var(--brand)}
.wf-editor-toolbar button:disabled{opacity:.35;cursor:default}
.wf-editor-toolbar select{width:auto!important;max-width:85px;min-height:32px;font-size:.75rem;padding:5px!important;border:0!important;background:transparent!important;margin:0!important}
.wf-rich-editor #editor-body{display:block;width:100%;min-height:280px;margin:0;border:0;border-radius:0;padding:18px;resize:vertical;font-size:.94rem;line-height:1.75;background:var(--paper);color:var(--ink)}
.wf-rich-editor #editor-body[hidden],.wf-editor-preview[hidden]{display:none}
.wf-editor-meta{display:flex;justify-content:space-between;gap:10px;padding:8px 14px;color:var(--muted);font-size:.72rem;border-top:1px solid var(--line)}
.wf-editor-status{font-size:.78rem;padding:0 14px;color:var(--brand)}
.wf-editor-status:not(:empty){padding-block:8px}
.wf-editor-preview{min-height:280px;padding:18px;overflow-wrap:anywhere;line-height:1.75}
.wf-editor-preview img,.post-content .prose img,.cms-post .prose img{max-width:100%;height:auto;border-radius:6px}
.wf-editor-preview img{max-height:420px;object-fit:contain;display:block;margin:12px auto}
.post-content .prose img,.cms-post .prose img{max-height:720px;object-fit:contain}
.wf-editor-images{padding:14px;border-top:1px solid var(--line)}
.wf-editor-images>label{font-size:.83rem;font-weight:650;display:block;margin-bottom:8px}
.wf-editor-images>small{display:block;color:var(--muted);font-size:.73rem;margin-top:8px}
.wf-image-gallery{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.wf-image-card{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:160px;padding:8px;border:1px solid var(--line);border-radius:7px;background:var(--subtle)}
.wf-image-card img{width:100%;height:85px;object-fit:contain;grid-column:1/-1;border-radius:4px}
.wf-image-card>span{grid-column:1/-1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.7rem;color:var(--muted)}
.wf-image-card button{padding:5px 3px;border:1px solid var(--line);border-radius:4px;background:var(--paper);font-size:.65rem}
.wf-emoji-menu{position:relative}
.wf-emoji-menu>summary{list-style:none}
.wf-emoji-menu>div{position:absolute;top:36px;left:0;width:176px;display:grid;grid-template-columns:repeat(4,1fr);background:var(--paper);padding:8px;border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 25px #0002;z-index:3}
.wf-editor-dialog{width:min(440px,calc(100% - 32px));border:1px solid var(--line);border-radius:10px;padding:24px;background:var(--paper);color:var(--ink)}
.wf-editor-dialog::backdrop{background:#06162c88}
.wf-editor-dialog label{display:grid;gap:7px;margin:15px 0;font-size:.83rem}
.wf-editor-dialog input{width:100%;padding:10px;border:1px solid var(--line);border-radius:5px;background:var(--paper)}
.wf-rich-editor.wf-editor-expanded{position:fixed;inset:16px;z-index:200;display:flex;flex-direction:column;max-height:calc(100dvh - 32px);box-shadow:0 0 0 100vmax #06162c99;overflow:auto}
.wf-editor-expanded #editor-body,.wf-editor-expanded .wf-editor-preview{flex:1;min-height:200px}
.wf-editor-expanded .wf-editor-preview{overflow:auto;flex:1 1 0;min-height:120px}
.wf-editor-expanded>label,.wf-editor-expanded .wf-editor-toolbar,.wf-editor-expanded .wf-editor-meta,.wf-editor-expanded .wf-editor-status{flex-shrink:0}
.wf-editor-expanded .wf-editor-images{max-height:180px;overflow:auto;flex-shrink:0}
body.wf-editor-open{overflow:hidden}
.wf-text-underline{text-decoration:underline}.wf-text-strike{text-decoration:line-through}
.wf-text-blue{color:#1763c7}.wf-text-green{color:#087b65}.wf-text-red{color:#bd3d4a}.wf-text-amber{color:#95620a}.wf-text-purple{color:#7848be}
:root[data-theme=dark] .wf-text-blue{color:#91bbff}:root[data-theme=dark] .wf-text-green{color:#75d7bb}:root[data-theme=dark] .wf-text-red{color:#ff99a6}:root[data-theme=dark] .wf-text-amber{color:#f2ca80}:root[data-theme=dark] .wf-text-purple{color:#d0b3ff}
.wf-font-small{font-size:.85em}.wf-font-large{font-size:1.25em}.wf-font-heading{font-size:1.5em;font-weight:700}
.wf-align-left,.wf-align-center,.wf-align-right{display:block}.wf-align-left{text-align:left}.wf-align-center{text-align:center}.wf-align-right{text-align:right}
.wf-spoiler{padding:12px;border:1px solid var(--line);border-radius:6px;background:var(--subtle);margin:10px 0}.wf-spoiler>summary{cursor:pointer;font-weight:600;color:var(--brand)}
@media(max-width:600px){.wf-tool-group:last-child{margin-left:0}.wf-editor-toolbar{gap:6px}.wf-editor-toolbar button{min-width:35px;height:35px}.wf-rich-editor #editor-body{min-height:230px}.wf-editor-meta{flex-wrap:wrap}.wf-rich-editor.wf-editor-expanded{inset:5px;max-height:calc(100dvh - 10px)}}
