.ij-editor{border:1px solid var(--line,#bcc4d0);border-radius:10px;overflow:hidden;min-width:0;background:var(--surface,#fff);color:var(--ink,#172033)}
.ij-editor-toolbar{display:flex;flex-wrap:wrap;gap:5px;padding:10px;border-bottom:1px solid var(--line,#bcc4d0);background:var(--surface-2,#f3f5f8)}
.ij-editor .ij-editor-toolbar button,.ij-editor .ij-editor-toolbar select{width:auto;margin:0;min-height:36px;padding:6px 9px;border:1px solid var(--line,#bcc4d0);border-radius:5px;color:var(--ink,#172033);background:var(--surface,#fff);font:inherit;font-size:13px;cursor:pointer}
.ij-editor-toolbar button[aria-pressed=true]{background:var(--brand,#215ec9);color:#fff}.ij-editor-toolbar button:disabled{opacity:.4;cursor:default}.ij-editor button:focus-visible,.ij-editor select:focus-visible{outline:2px solid var(--brand,#215ec9);outline-offset:2px}
.ij-editor .tiptap{min-height:280px;padding:16px;outline:none;overflow-wrap:anywhere}.ij-editor .tiptap:focus{box-shadow:inset 0 0 0 2px var(--brand,#215ec9)}.ij-editor-status{padding:8px 12px;margin:0;font-size:12px;color:var(--muted,#596579);border-top:1px solid var(--line,#bcc4d0)}
.rich-content{line-height:1.75;overflow-wrap:anywhere;overflow-x:auto;min-width:0}.rich-content p{margin:0 0 12px;white-space:pre-wrap}.rich-content h1,.rich-content h2,.rich-content h3{line-height:1.4;margin:20px 0 12px}.rich-content h1{font-size:1.8em}.rich-content h2{font-size:1.5em}.rich-content h3{font-size:1.25em}
.rich-content ul,.rich-content ol{padding-left:28px;margin:12px 0}.rich-content ul{list-style:disc}.rich-content ol{list-style:decimal}.rich-content blockquote{border-left:4px solid var(--brand,#215ec9);padding:8px 16px;margin:12px 0;background:var(--surface-2,#f3f5f8)}.rich-content pre{white-space:pre-wrap;padding:12px;background:var(--surface-2,#f3f5f8);border-radius:6px}.rich-content a{color:var(--brand,#215ec9);text-decoration:underline}.rich-content img{display:block;max-width:100%;height:auto;margin:12px 0}.rich-content table{border-collapse:collapse;width:100%;table-layout:fixed;margin:16px 0}.rich-content td,.rich-content th{border:1px solid var(--line,#a9b3c4);padding:8px;vertical-align:top;min-width:60px;position:relative}.rich-content th{font-weight:700;background:var(--surface-2,#eef2f8)}.rich-content td p,.rich-content th p{margin:0}.rich-content .selectedCell:after{position:absolute;inset:0;content:'';background:#5599ff44;pointer-events:none}.rich-content .ProseMirror-selectednode{outline:3px solid var(--brand,#215ec9)}.rich-content hr{border:0;border-top:1px solid var(--line,#bcc4d0);margin:20px 0}
@media(max-width:767px){.ij-editor-toolbar{gap:4px;padding:7px}.ij-editor .ij-editor-toolbar button{min-height:40px;font-size:12px}.ij-editor .tiptap{padding:12px;min-height:240px}}
.community-editor>.ij-editor{display:block}
.ij-editor .ij-editor-toolbar .ij-editor-icon{width:36px;min-width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;padding:7px}.ij-editor .ij-editor-toolbar .ij-editor-icon[hidden]{display:none}.ij-editor-icon svg{width:19px;height:19px;flex:none;pointer-events:none}.ij-editor-icon:hover:not(:disabled){background:var(--surface-2,#edf2f8);border-color:var(--brand,#215ec9)}.ij-editor-icon[aria-pressed=true]:hover:not(:disabled){background:var(--brand,#215ec9)}
@media(max-width:767px){.ij-editor .ij-editor-toolbar .ij-editor-icon{width:40px;min-width:40px;height:40px}}
.rich-content .ij-youtube-video{margin:16px 0;padding:4px;max-width:100%;background:#111;border-radius:6px;overflow:hidden}.rich-content .ij-youtube-video iframe{display:block;width:100%;aspect-ratio:16/9;min-height:200px;border:0}.ij-editor .ij-youtube-video{cursor:default}

.ij-featured-picker{padding:10px 12px;border-bottom:1px solid var(--line,#bcc4d0)}.ij-featured-picker summary{cursor:pointer;font-size:13px;font-weight:700}.ij-featured-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;max-height:260px;overflow:auto;padding:10px 2px}.ij-featured-choices button{min-width:0;min-height:72px;padding:6px;border:2px solid var(--line,#bcc4d0);border-radius:7px;background:var(--surface,#fff);color:var(--ink,#172033);cursor:pointer}.ij-featured-choices button[aria-pressed="true"]{border-color:var(--brand,#215ec9);box-shadow:inset 0 0 0 1px var(--brand,#215ec9)}.ij-featured-choices img{display:block;width:100%;height:70px;object-fit:cover}.ij-featured-choices span{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:4px}

/* Keep the editing viewport stable; only its body scrolls beneath the tools. */
.ij-editor-surface{height:clamp(280px,52dvh,560px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding:20px}
.ij-editor .ij-editor-surface .tiptap{min-height:100%;overflow-wrap:anywhere}
.ij-editor-toolbar{position:relative;z-index:2;flex:none}
.ij-editor-surface:focus-within{outline-offset:-2px}
html[data-theme="dark"] .ij-editor-surface{scrollbar-color:#8bbcff #182536}
@media(max-width:767px){.ij-editor-surface{height:clamp(240px,45dvh,440px);scroll-padding:12px}}
