.rich-toolbar{position:sticky;top:0;z-index:5;background:#f7f9ffee;border:1px solid var(--line,#d7def0);border-radius:14px;padding:8px;margin:0 0 10px;backdrop-filter:blur(6px)}
.rich-toolbar-row{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.rich-toolbar button,.rich-toolbar select{flex:none;min-height:40px;padding:6px 10px;border:1px solid var(--line,#d7def0);border-radius:10px;background:#fff;color:var(--ink,#172c48);font:inherit;font-size:.875rem}
.rich-toolbar button:active{background:#eef2ff}
.rich-toolbar select{max-width:110px}
.rich-surface{min-height:220px;max-height:min(58vh,520px);overflow:auto;border:1px solid var(--line,#d7def0);border-radius:14px;padding:14px 16px;background:#fff;line-height:1.75;overflow-wrap:anywhere}
.rich-surface:empty:before,.rich-surface[data-placeholder]:not(:focus):has(> p:only-child:has(> br:only-child)):before{content:attr(data-placeholder);color:#8a97ad}
.rich-surface:focus{outline:2px solid var(--accent,#465bdc);outline-offset:1px}
.rich-surface h2{font-size:1.25rem;margin:12px 0 8px}
.rich-surface p,.rich-surface li,.rich-surface blockquote{margin:8px 0}
.rich-surface blockquote{border-left:3px solid #8b7cc9;padding-left:12px;color:#4b4771;background:#f7f5ff}
.rich-surface ul,.rich-surface ol{padding-left:1.4em}
.rich-figure{margin:14px 0;padding:10px;border:1px dashed #c9d3ea;border-radius:12px;background:#f8faff}
.rich-figure img{display:block;max-width:100%;height:auto;border-radius:8px}
.rich-caption{width:100%;margin-top:8px;min-height:40px}
.rich-fig-del{margin-top:8px}
.rich-pop{margin:8px 0 12px;padding:12px;border:1px solid var(--line,#d7def0);border-radius:12px;background:#f8faff}
.rich-swatches{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.rich-swatch{width:28px;height:28px;border-radius:8px;border:1px solid #c5cee0;padding:0;min-height:28px}
.article-document [style*="text-align:center"],.article-document [data-align=center]{text-align:center}
.article-document [data-align=right]{text-align:right}
.article-document [data-align=justify]{text-align:justify}
@media(max-width:430px){.rich-toolbar{padding:6px}.rich-toolbar button,.rich-toolbar select{min-height:38px;padding:5px 8px;font-size:.8125rem}.rich-surface{max-height:48vh;padding:12px}}
