.rich-text,
.ql-editor,
.note-editor .note-editable {
    line-height: 1.65;
    color: #0f172a;
    font-size: 14px;
    font-family: "Pretendard", system-ui, -apple-system, sans-serif;
}

.rich-text p,
.ql-editor p,
.note-editor .note-editable p {
    margin: 0.35rem 0;
}

.rich-text img,
.ql-editor img,
.note-editor .note-editable img {
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
}

.ql-editor img {
    cursor: zoom-in;
    transition: outline-color 0.15s ease;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.ql-editor img:hover {
    outline-color: rgba(99, 102, 241, 0.4);
}

.rich-text p:has(> br:only-child),
.ql-editor p:has(> br:only-child),
.note-editor .note-editable p:has(> br:only-child) {
    margin: 0;
}

.rich-text ul,
.rich-text ol,
.ql-editor ul,
.ql-editor ol,
.note-editor .note-editable ul,
.note-editor .note-editable ol {
    padding-left: 1.25rem;
    margin: 0.35rem 0;
    list-style-position: outside;
}

.rich-text li,
.ql-editor li,
.note-editor .note-editable li {
    margin: 0.2rem 0;
}

.rich-text ul,
.ql-editor ul,
.note-editor .note-editable ul {
    list-style-type: disc;
}

.rich-text ul ul,
.ql-editor ul ul,
.note-editor .note-editable ul ul {
    list-style-type: circle;
}

.rich-text ul ul ul,
.ql-editor ul ul ul,
.note-editor .note-editable ul ul ul {
    list-style-type: square;
}

.rich-text ol,
.ql-editor ol,
.note-editor .note-editable ol {
    list-style-type: decimal;
}

.rich-text ol ol,
.ql-editor ol ol,
.note-editor .note-editable ol ol {
    list-style-type: lower-alpha;
}

.rich-text ol ol ol,
.ql-editor ol ol ol,
.note-editor .note-editable ol ol ol {
    list-style-type: lower-roman;
}

/* indent 대응 (기존 Quill 데이터 포함) */
.ql-indent-1,
.ql-editor .ql-indent-1,
.rich-text .ql-indent-1,
.note-editor .note-editable .ql-indent-1 {
    margin-left: 1.5rem;
}

.ql-indent-2,
.ql-editor .ql-indent-2,
.rich-text .ql-indent-2,
.note-editor .note-editable .ql-indent-2 {
    margin-left: 3rem;
}

.ql-indent-3,
.ql-editor .ql-indent-3,
.rich-text .ql-indent-3,
.note-editor .note-editable .ql-indent-3 {
    margin-left: 4.5rem;
}

.ql-indent-4,
.ql-editor .ql-indent-4,
.rich-text .ql-indent-4,
.note-editor .note-editable .ql-indent-4 {
    margin-left: 6rem;
}

.ql-indent-5,
.ql-editor .ql-indent-5,
.rich-text .ql-indent-5,
.note-editor .note-editable .ql-indent-5 {
    margin-left: 7.5rem;
}

.rich-text .ql-align-center,
.note-editor .note-editable .ql-align-center {
    text-align: center;
}

.rich-text .ql-align-right,
.note-editor .note-editable .ql-align-right {
    text-align: right;
}

.rich-text .ql-align-justify,
.note-editor .note-editable .ql-align-justify {
    text-align: justify;
}

/* Tailwind preflight 가 img 를 display:block 으로 바꿔서 text-align 이 안 먹히기 때문에
   block 이미지를 margin auto 로 정렬한다 */
.ql-editor .ql-align-center > img,
.rich-text .ql-align-center > img,
.note-editor .note-editable .ql-align-center > img {
    margin-left: auto;
    margin-right: auto;
}

.ql-editor .ql-align-right > img,
.rich-text .ql-align-right > img,
.note-editor .note-editable .ql-align-right > img {
    margin-left: auto;
    margin-right: 0;
}

.ql-editor .ql-align-justify > img,
.rich-text .ql-align-justify > img,
.note-editor .note-editable .ql-align-justify > img {
    margin-left: 0;
    margin-right: auto;
}

.ql-snow .ql-editor {
    padding: 0.75rem 0.9rem;
    border: none;
}

.ql-snow .ql-editor ul,
.ql-snow .ql-editor ol {
    padding-left: 0;
}

.rich-text ul,
.rich-text ol {
    list-style: none;
    padding-left: 0;
}

.rich-text ol {
    counter-reset: list-0;
}

.rich-text ul > li,
.rich-text ol > li {
    padding-left: 1.5em;
    position: relative;
}

.rich-text ul > li::before {
    content: "•";
    display: inline-block;
    width: 1.2em;
    margin-left: -1.5em;
    margin-right: 0.3em;
    text-align: right;
}

.rich-text ol > li {
    counter-increment: list-0;
}

.rich-text ol > li::before {
    content: counter(list-0) ".";
    display: inline-block;
    width: 1.2em;
    margin-left: -1.5em;
    margin-right: 0.3em;
    text-align: right;
}
