.modal-box.modal-box-editor { width: 740px; max-width: calc(100vw - 32px); }
.rich-editor { border: 1px solid var(--color-border); border-radius: 7px; background: #fff; overflow: hidden; }
.rich-editor:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 2px #6366f115; }
.rich-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 7px; border-bottom: 1px solid #e6e8ee; background: #fafbfc; }
.rich-tool { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; height: 29px; padding: 4px 6px; border: 0; border-radius: 4px; background: transparent; color: #535968; font-size: 15px; line-height: 1; cursor: pointer; }
.rich-tool svg { width: 17px; height: 17px; }
.rich-tool:hover, .rich-tool[aria-pressed="true"] { background: #eae9f9; color: #5c56bb; }
.rich-tool:focus-visible, .rich-tool-select:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.rich-tool:disabled { opacity: .35; cursor: default; }
.rich-separator { height: 18px; border-left: 1px solid #dddfe6; margin: 0 3px; }
.rich-toolbar .rich-tool-select { width: auto; max-width: 91px; min-height: 29px; border: 0; padding: 3px; background: transparent; color: #535968; font-size: 12px; cursor: pointer; }
.rich-highlight-icon { background: linear-gradient(transparent 60%, #ffe276 60%); }
.rich-clear-icon { align-self: flex-end; font-size: 11px; }
.rich-content { min-height: 145px; max-height: 320px; overflow-y: auto; padding: 12px 14px; outline: none; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }
.rich-content p { margin: 0 0 7px; min-height: 1em; }
.rich-content ul, .rich-content ol { padding-left: 26px; margin: 7px 0; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li > p { margin: 0; }
.rich-content blockquote { margin: 10px 0; border-left: 3px solid #b8b5de; padding: 4px 12px; color: #5b6070; background: #f8f8fc; }
.rich-content pre { white-space: pre-wrap; padding: 10px; border-radius: 5px; background: #f0f2f6; }
.rich-content code { background: #f0f2f6; border-radius: 3px; padding: 1px 4px; font-size: .9em; }
.rich-content img { display: block; max-width: 100%; height: auto; max-height: 420px; object-fit: contain; margin: 8px 0; border-radius: 4px; }
.rich-content .ProseMirror-selectednode { outline: 2px solid var(--color-primary); }
.rich-content a { color: #175cd3; text-decoration: underline; cursor: text; }
.rich-content ul[data-type="taskList"] { list-style: none; padding-left: 0; }
.rich-content ul[data-type="taskList"] > li { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; }
.rich-content ul[data-type="taskList"] > li > label { flex: 0 0 auto; padding-top: 2px; margin: 0; }
.rich-content ul[data-type="taskList"] > li > label input { width: 15px; height: 15px; accent-color: #6366b8; cursor: pointer; }
.rich-content ul[data-type="taskList"] > li > div { flex: 1; min-width: 0; }
.rich-content li[data-checked="true"] > div > p { color: #7c8290; text-decoration: line-through; }
.rich-content ul[data-type="taskList"] ul { margin-left: 12px; }
.rich-status { padding: 0 12px; font-size: 12px; color: #475467; }
.rich-status:not(:empty) { padding-top: 7px; padding-bottom: 7px; }
.rich-status.is-error { color: #b42318; }
.rich-help { padding: 7px 12px; font-size: 11px; line-height: 1.6; color: #7c8290; border-top: 1px solid #f0f1f4; }
.rich-link-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 8px 10px; background: #f5f5fc; border-bottom: 1px solid #e6e8ee; }
.rich-link-panel[hidden] { display: none; }
.rich-link-panel label { font-size: 12px; margin: 0; }
.rich-link-panel input { flex: 1; min-width: 160px; padding: 5px 8px; border: 1px solid var(--color-border); border-radius: 4px; font-size: 13px; }
@media (max-width: 600px) {
  .modal-box.modal-box-editor { max-width: calc(100vw - 16px); }
  .rich-toolbar { gap: 3px; }
  .rich-tool { min-width: 32px; height: 32px; }
  .rich-content { max-height: 260px; }
}
