/**
 * Editor.js 콘텐츠 출력·편집 공통 스타일
 * - .editorjs-content : 프론트 SSR HTML (#post-content 등)
 * - .editorjs-holder  : 관리자 Editor.js 편집 UI
 * common.css reset과 분리, 두 화면 동일 토큰·값 사용
 */

.editorjs-content,
.editorjs-holder {
    /* WEB-Custom 가이드: 본문 16 / #131313 / 행간 175% */
    --ej-line-height: 1.75;
    --ej-text: #131313;
    --ej-border-color: #c8ced3;
    --ej-cell-padding-y: 0.55em;
    --ej-cell-padding-x: 0.75em;
    --ej-block-gap: 1em;
    --ej-heading-bg: #f2f4f5;
    /* common.css 미로드(관리자) 대비 — heading 토큰 내장 */
    --font-14: 0.875rem;
    --font-16: 1rem;
    --font-20: 1.25rem;
    --font-24: 1.5rem;
    --font-28: 1.75rem;
    --font-36: 2.25rem;
    --font-48: 3rem;
    --vw-10: 0.52083vw;
    --vw-16: 0.83333vw;

    line-height: var(--ej-line-height);
    word-break: keep-all;
    overflow-wrap: break-word;
    font-family: var(--font-body);
    font-size: max(1rem, var(--font-16));
    color: var(--ej-text);
    letter-spacing: 0;
}

/* 관리자: Editor.js 코어 .cdx-block { padding: .4em 0 } 대체
   - 전역 cdx-block padding 제거 시 header/quote/table 등 툴 padding까지 깨짐
   - 블록 간격은 ce-block margin, paragraph만 padding-block 제거 */
.editorjs-holder .ce-block + .ce-block {
    margin-top: var(--ej-block-gap);
}
.editorjs-holder .ce-paragraph.cdx-block {
    padding-block: 0;
    margin: 0;
}
.editorjs-holder .cdx-block{padding-block: 0;}

/* 관리자: 게시판 본문 td.contents(30px)와 유사한 좌우 여백 (input-content 10px + 20px) */
.box-table .form-group .input-content .editorjs-holder {
    margin: 60px auto;
    max-width: 1320px;
    padding: 30px;
    /* border: 1px solid #ccc; */
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

/* 관리자: Editor.js 기본 중앙·max-width 제거 → 프론트 full-width와 맞춤 */
.editorjs-holder .ce-block__content,
.editorjs-holder .ce-toolbar__content {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.editorjs-content > *:first-child,
.editorjs-holder .ce-block:first-child .ce-block__content {
    margin-top: 0;
}
.editorjs-content > *:last-child,
.editorjs-holder .ce-block:last-child .ce-block__content {
    margin-bottom: 0;
}

/* Paragraph */
.editorjs-content p,
.editorjs-holder .ce-paragraph {
    margin: 0 0 var(--ej-block-gap);
    font-size: max(1rem, var(--font-16));
    line-height: var(--ej-line-height);
    color: var(--ej-text);
}

/* Headings — 제목1(e2)=48, 제목2(e3)=36, 제목3(e4)=28 (게시글 제목 H1 아래)
   상단 간격은 spacer·이전 블록 margin-bottom·ce-block gap 으로만 조절 */
.editorjs-content h2,
.editorjs-content .ej-heading--e2 {
    font-size: clamp(1.75rem, var(--font-48), 3rem);
    font-weight: 400;
    line-height: 1.25; /* 60 @48 */
    margin: 0 0 0.5em;
    color: var(--ej-text);
    text-decoration: none;
    padding: 0;
}
.editorjs-content h3,
.editorjs-content .ej-heading--e3 {
    font-size: clamp(1.5rem, var(--font-36), 2.25rem);
    font-weight: 400;
    line-height: 1.3333; /* 48 @36 */
    margin: 0 0 0.5em;
    color: var(--ej-text);
    text-decoration: none;
    padding: 0;
}
.editorjs-content h4,
.editorjs-content .ej-heading--e4 {
    font-size: clamp(1.25rem, var(--font-28), 1.75rem);
    font-weight: 400;
    line-height: 1.4286; /* 40 @28 */
    margin: 0 0 0.4em;
    color: var(--ej-text);
    text-decoration: none;
    padding: 0;
}
/* 관리자 — app.admin.css Bootstrap h1–h6 덮어쓰기 */
.editorjs-holder h2.ce-header {
    font-size: clamp(1.75rem, var(--font-48), 3rem) !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    margin: 0 0 0.5em !important;
    color: var(--ej-text) !important;
    text-decoration: none !important;
    padding: 0 !important;
}
.editorjs-holder h3.ce-header {
    font-size: clamp(1.5rem, var(--font-36), 2.25rem) !important;
    font-weight: 400 !important;
    line-height: 1.3333 !important;
    margin: 0 0 0.5em !important;
    color: var(--ej-text) !important;
    text-decoration: none !important;
    padding: 0 !important;
}
.editorjs-holder h4.ce-header {
    font-size: clamp(1.25rem, var(--font-28), 1.75rem) !important;
    font-weight: 400 !important;
    line-height: 1.4286 !important;
    margin: 0 0 0.4em !important;
    color: var(--ej-text) !important;
    text-decoration: none !important;
    padding: 0 !important;
}
.editorjs-holder h1.ce-header {
    font-size: clamp(1.75rem, var(--font-48), 3rem) !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    margin: 0 0 0.5em !important;
    color: var(--ej-text) !important;
    padding: 0 !important;
}
/* legacy: 저장 level 1 → 제목1(48) 스타일 */
.editorjs-content .ej-heading--e1 {
    font-size: clamp(1.75rem, var(--font-48), 3rem);
    font-weight: 400;
    line-height: 1.25;
    margin: 0 0 0.5em;
    color: var(--ej-text);
    text-decoration: none;
}
.editorjs-content h2 a,
.editorjs-content h3 a,
.editorjs-content h4 a,
.editorjs-holder .ce-header a {
    color: var(--color-primary, #2563eb);
    text-decoration: underline;
}
.editorjs-holder .ce-header {
    outline: none;
}
.editorjs-holder .ce-header p,
.editorjs-holder .ce-header div {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    text-decoration: inherit !important;
}

/* Hero 블록 — editorjs heading/paragraph 규칙 제외, 메인 .hero 톤 유지 */
.editorjs-content .tessol-hero .tessol-hero__title,
.editorjs-holder .tessol-hero .tessol-hero__title {
    margin: 0 0 max(0.625rem, var(--vw-10));
    font-size: clamp(1.875rem, 2.5vw, var(--font-36));
    line-height: 1.3889;
    letter-spacing: -0.09375rem;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    padding: 0;
}
.editorjs-content .tessol-hero--text-dark .tessol-hero__title,
.editorjs-holder .tessol-hero--text-dark .tessol-hero__title {
    color: #154670;
}
.editorjs-content .tessol-hero .tessol-hero__sub,
.editorjs-holder .tessol-hero .tessol-hero__sub {
    margin: 0 0 max(2.5rem, var(--vw-40));
    font-size: max(1.25rem, var(--font-20));
    line-height: 1.6;
    font-weight: 300;
    color: #fafaf7;
}
.editorjs-content .tessol-hero--text-dark .tessol-hero__sub,
.editorjs-holder .tessol-hero--text-dark .tessol-hero__sub {
    color: #2a4a66;
}

/* List — common.css ul/ol { list-style:none } 복구 */
.editorjs-content ul.editorjs-list--unordered,
.editorjs-content ul:not([class]) {
    list-style: disc;
}
.editorjs-content ol.editorjs-list--ordered,
.editorjs-content ol:not([class]) {
    list-style: decimal;
}
.editorjs-content ul,
.editorjs-content ol,
.editorjs-holder .cdx-list {
    margin: 0 0 var(--ej-block-gap);
    padding-left: 1.5em;
    line-height: var(--ej-line-height);
    list-style-position: outside;
}
.editorjs-holder .cdx-list--unordered {
    list-style-type: disc;
}
.editorjs-holder .cdx-list--ordered {
    list-style-type: decimal;
}
.editorjs-content ul.editorjs-list--checklist,
.editorjs-holder .cdx-list--checklist {
    list-style: none;
    padding-left: 0;
}
.editorjs-content .editorjs-list--checklist .editorjs-list__item,
.editorjs-holder .cdx-list--checklist .cdx-list__item {
    position: relative;
    padding-left: 1.75em;
    list-style: none;
}
.editorjs-content .editorjs-list--checklist .editorjs-list__item::before,
.editorjs-holder .cdx-list--checklist .cdx-list__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 0.95em;
    height: 0.95em;
    border: 1px solid var(--ej-border-color);
    border-radius: 2px;
    background: #fff;
}
.editorjs-content .editorjs-list--checklist .editorjs-list__item.is-checked::before,
.editorjs-holder .cdx-list--checklist .cdx-list__item--checked::before {
    background: var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
}
.editorjs-content li,
.editorjs-holder .cdx-list__item {
    margin-bottom: 0.3em;
    line-height: var(--ej-line-height);
}

/* ============================================================
   Table — 프론트: <table> / 관리자: .tc-table (grid)
   ============================================================ */

/* 프론트 SSR — Editor.js 표만. 이관 HTML 표(inline style)에는 적용하지 않는다. */
.editorjs-content table.editorjs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--ej-border-color);
    margin: var(--ej-block-gap) 0;
    line-height: var(--ej-line-height);
}
.editorjs-content table.editorjs-table th,
.editorjs-content table.editorjs-table td {
    border: 1px solid var(--ej-border-color);
    padding: var(--ej-cell-padding-y) var(--ej-cell-padding-x);
    text-align: left;
    vertical-align: top;
    line-height: var(--ej-line-height);
}
.editorjs-content table.editorjs-table th {
    background-color: var(--ej-heading-bg);
    font-weight: 600;
}

/* 이관 HTML: width 속성이 없는 표는 내용 너비. common.css table{width:100%}가 레이블 줄을 늘리지 않게. */
.editorjs-content table:not(.editorjs-table):not([width]):not([style*="width"]) {
    width: auto;
    max-width: 100%;
}

/* 이관 HTML 버튼은 span+padding(+border) inline.
   프론트 * { box-sizing: border-box } 이면 패딩만큼 글자가 테두리 밖으로 나간다. */
.editorjs-content span[style*="padding"],
#post-content span[style*="padding"] {
    display: inline-block;
    box-sizing: content-box;
    max-width: 100%;
    vertical-align: top;
}

/* 관리자: Editor.js 기본 border 전부 제거 후 셀 단일 border만 적용 */
.editorjs-holder .tc-wrap {
    --color-border: var(--ej-border-color);
    margin: var(--ej-block-gap) 0;
}
.editorjs-holder .tc-table {
    border-top: none !important;
    line-height: var(--ej-line-height) !important;
    font-size: inherit !important;
}
.editorjs-holder .tc-table--heading .tc-row:first-child {
    border-bottom: none !important;
    background: var(--ej-heading-bg) !important;
    font-weight: 600;
}
.editorjs-holder .tc-row {
    border-bottom: none !important;
}
.editorjs-holder .tc-row::after {
    display: none !important;
    border: none !important;
}
.editorjs-holder .tc-cell {
    border: none !important;
    border-right: 1px solid var(--ej-border-color) !important;
    border-bottom: 1px solid var(--ej-border-color) !important;
    padding: var(--ej-cell-padding-y) var(--ej-cell-padding-x) !important;
    line-height: var(--ej-line-height) !important;
}
.editorjs-holder .tc-row:first-child .tc-cell {
    border-top: 1px solid var(--ej-border-color) !important;
}
.editorjs-holder .tc-row .tc-cell:first-child {
    border-left: 1px solid var(--ej-border-color) !important;
}

/* Table tool — toolbox/popover가 행·셀 아래 깔리지 않도록 stacking 조정 */
.editorjs-holder .tc-wrap {
    overflow: visible;
    z-index: auto;
}
.editorjs-holder .tc-table {
    overflow: visible;
}
.editorjs-holder .tc-row {
    z-index: auto !important;
    position: relative;
}
.editorjs-holder .tc-table--heading .tc-row:first-child {
    position: relative !important;
    z-index: auto !important;
    top: auto !important;
}
.editorjs-holder .tc-cell {
    overflow: visible !important;
}
.editorjs-holder .tc-toolbox {
    z-index: 20 !important;
}
.editorjs-holder .tc-popover {
    z-index: 21 !important;
}
/* 부모 overflow:hidden 시 popover 클리pping 방지 */
.box-table .form-group .input-content:has(.editorjs-holder) {
    overflow: visible;
}
.editorjs-holder .codex-editor__redactor,
.editorjs-holder .ce-block {
    overflow: visible;
}

/* Image — @editorjs/image 플러그인과 동일 (관리자·프론트 공통) */
.editorjs-content .image-tool,
.editorjs-holder .image-tool {
    --ej-image-bg: #cdd1e0;
    --ej-image-accent: #388ae5;
    --ej-image-border: #e8e8eb;

    margin: 1.2em 0;
}

.editorjs-content .image-tool__image,
.editorjs-holder .image-tool__image {
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
    text-align: center;
    line-height: 0;
}

.editorjs-content .image-tool__image-picture,
.editorjs-holder .image-tool__image-picture,
.editorjs-content .image-tool__image img,
.editorjs-holder .image-tool__image img {
    max-width: 100%;
    vertical-align: bottom;
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
}

.editorjs-content .image-tool__caption,
.editorjs-holder .image-tool__caption {
    position: relative;
    margin-top: 0.5em;
    margin-bottom: 0;
    font-size: 0.875em;
    color: #707684;
    line-height: var(--ej-line-height);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* 관리자: @editorjs/image 플러gin absolute·padding-bottom hack 덮어쓰기 → 일반 흐름 */
.editorjs-holder .image-tool--caption {
    padding-bottom: 0;
}

.editorjs-holder .image-tool--caption .image-tool__caption {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    visibility: visible;
}

/* 관리자: Editor.js 코어 .cdx-input(캡션 편집) border·inset 제거 */
.editorjs-holder .image-tool__caption.cdx-input {
    border: none;
    box-shadow: none;
    padding: 0;
    outline: none;
    background: transparent;
    border-radius: 0;
    width: 100%;
}

.editorjs-content .image-tool--withBorder .image-tool__image,
.editorjs-holder .image-tool--withBorder .image-tool__image,
.editorjs-content .image-tool--withBackground .image-tool__image,
.editorjs-holder .image-tool--withBackground .image-tool__image {
    padding: 15px;
}

.editorjs-content .image-tool--withBorder .image-tool__image,
.editorjs-holder .image-tool--withBorder .image-tool__image {
    border: 1px solid var(--ej-image-border);
}

.editorjs-content .image-tool--withBackground .image-tool__image,
.editorjs-holder .image-tool--withBackground .image-tool__image {
    background: var(--ej-image-bg);
}

.editorjs-content .image-tool--withBackground .image-tool__image-picture,
.editorjs-holder .image-tool--withBackground .image-tool__image-picture,
.editorjs-content .image-tool--withBackground .image-tool__image img,
.editorjs-holder .image-tool--withBackground .image-tool__image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 60%;
}

.editorjs-content .image-tool--stretched .image-tool__image-picture,
.editorjs-holder .image-tool--stretched .image-tool__image-picture,
.editorjs-content .image-tool--stretched .image-tool__image img,
.editorjs-holder .image-tool--stretched .image-tool__image img {
    width: 100%;
    max-width: 100%;
}

/* figure (레거시 HTML 호환) */
.editorjs-content figure {
    margin: 1.2em 0;
    text-align: center;
}
.editorjs-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.editorjs-content figcaption {
    margin-top: 0.5em;
    font-size: 0.875em;
    color: #666;
    line-height: var(--ej-line-height);
}

/* Quote — Fog Gray + Line Gray left bar */
.editorjs-content blockquote,
.editorjs-holder .cdx-quote {
    margin: var(--ej-block-gap) 0;
    padding: max(1.25rem, var(--vw-20, 1.04167vw));
    border: none;
    border-left: 4px solid #e1e7eb;
    background: #f2f4f5;
    color: var(--ej-text);
    line-height: var(--ej-line-height);
    font-size: max(1rem, var(--font-16));
}
.editorjs-content blockquote cite,
.editorjs-holder .cdx-quote__caption {
    display: block;
    margin-top: max(0.625rem, var(--vw-10, 0.52083vw));
    font-size: 0.75rem; /* 12 */
    color: #5e5e5e;
    font-style: normal;
    line-height: var(--ej-line-height);
}

/* Delimiter — #C8CED3 1px solid */
.editorjs-content hr,
.editorjs-holder .ce-delimiter {
    display: block;
    border: none;
    border-top: 1px solid #c8ced3;
    margin: 2em 0;
    height: 0;
    line-height: 0;
    overflow: visible;
    text-align: center;
}

.editorjs-holder .ce-delimiter:before {
    content: none;
    display: none;
}

/* Inline */
.editorjs-content b,
.editorjs-content strong,
.editorjs-holder b,
.editorjs-holder strong {
    font-weight: 700;
}
.editorjs-content i,
.editorjs-content em,
.editorjs-holder i,
.editorjs-holder em {
    font-style: italic;
}
.editorjs-content a,
.editorjs-holder a {
    color: var(--color-primary, #2563eb);
    text-decoration: underline;
}

/* Tessol 블록 CTA — 본문 링크(밑줄·프라이머리 색) 적용 제외 */
.editorjs-content a.tessol-hero__cta,
.editorjs-content a.tessol-mixed__cta,
.editorjs-content a.tessol-callout__cta,
.editorjs-content a.tessol-contact__cta,
.editorjs-content a.tessol-download__btn,
.editorjs-holder a.tessol-hero__cta,
.editorjs-holder a.tessol-mixed__cta,
.editorjs-holder a.tessol-callout__cta,
.editorjs-holder a.tessol-contact__cta,
.editorjs-holder a.tessol-download__btn {
    text-decoration: none;
}
.editorjs-content a.tessol-hero__cta,
.editorjs-holder a.tessol-hero__cta {
    color: #154670; /* 흰 필 CTA */
}
.editorjs-content a.tessol-hero__cta:hover,
.editorjs-holder a.tessol-hero__cta:hover {
    color: #154670;
    text-decoration: none;
}
.editorjs-content a.tessol-callout__cta,
.editorjs-holder a.tessol-callout__cta {
    color: #131313; /* Fog Gray 바 + 텍스트 링크 */
}
.editorjs-content a.tessol-callout__cta:hover,
.editorjs-holder a.tessol-callout__cta:hover {
    color: #131313;
    text-decoration: none;
    opacity: 0.85;
}
.editorjs-content a.tessol-mixed__cta,
.editorjs-content a.tessol-contact__cta,
.editorjs-content a.tessol-download__btn,
.editorjs-holder a.tessol-mixed__cta,
.editorjs-holder a.tessol-contact__cta,
.editorjs-holder a.tessol-download__btn {
    color: #fff; /* 유색 필 CTA */
}
.editorjs-content a.tessol-mixed__cta:hover,
.editorjs-content a.tessol-contact__cta:hover,
.editorjs-content a.tessol-download__btn:hover,
.editorjs-holder a.tessol-mixed__cta:hover,
.editorjs-holder a.tessol-contact__cta:hover,
.editorjs-holder a.tessol-download__btn:hover {
    color: #fff;
    text-decoration: none;
}

.editorjs-content mark,
.editorjs-content .cdx-marker,
.editorjs-holder mark,
.editorjs-holder .cdx-marker {
    background: rgba(245, 235, 111, 0.29);
    padding: 3px 0;
}

.editorjs-content u,
.editorjs-content .cdx-underline,
.editorjs-holder u,
.editorjs-holder .cdx-underline {
    text-decoration: underline;
}

.editorjs-content s,
.editorjs-content del,
.editorjs-content .cdx-strikethrough,
.editorjs-holder s,
.editorjs-holder del,
.editorjs-holder .cdx-strikethrough {
    text-decoration: line-through;
}

.editorjs-content code,
.editorjs-content .inline-code,
.editorjs-holder code,
.editorjs-holder .inline-code {
    background: #f4f4f4;
    padding: 0.15em 0.35em;
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

/* 게시판 상세 — app.css bbs-view 본문 규칙보다 우선 (관리자 에디터와 동일) */
table.bbs-view tbody td.contents #post-content .editorjs-content {
    line-height: var(--ej-line-height);
    word-break: keep-all;
}
table.bbs-view tbody td.contents #post-content .editorjs-content p,
table.bbs-view tbody td.contents #post-content .editorjs-content li,
table.bbs-view tbody td.contents #post-content .editorjs-content td,
table.bbs-view tbody td.contents #post-content .editorjs-content th,
table.bbs-view tbody td.contents #post-content .editorjs-content .image-tool__caption {
    line-height: var(--ej-line-height);
}
table.bbs-view tbody td.contents #post-content .editorjs-content p {
    margin: 0 0 var(--ej-block-gap);
}
table.bbs-view tbody td.contents #post-content .editorjs-content table.editorjs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--ej-border-color);
    margin: var(--ej-block-gap) 0;
}
table.bbs-view tbody td.contents #post-content .editorjs-content table.editorjs-table th,
table.bbs-view tbody td.contents #post-content .editorjs-content table.editorjs-table td {
    border: 1px solid var(--ej-border-color);
    padding: var(--ej-cell-padding-y) var(--ej-cell-padding-x);
    text-align: left;
    vertical-align: top;
    line-height: var(--ej-line-height);
}
table.bbs-view tbody td.contents #post-content .editorjs-content table.editorjs-table th {
    background-color: var(--ej-heading-bg);
    font-weight: 600;
}
table.bbs-view tbody td.contents #post-content .editorjs-content .image-tool__image-picture,
table.bbs-view tbody td.contents #post-content .editorjs-content .image-tool__image img {
    max-width: 100%;
    height: auto;
    border: 0;
    border-radius: 0;
}
table.bbs-view tbody td.contents #post-content .editorjs-content h2,
table.bbs-view tbody td.contents #post-content .editorjs-content h3,
table.bbs-view tbody td.contents #post-content .editorjs-content h4,
table.bbs-view tbody td.contents #post-content .editorjs-content .ej-heading {
    color: var(--ej-text, #131313);
    text-decoration: none;
    font-weight: 400;
    padding: 0;
}
table.bbs-view tbody td.contents #post-content .editorjs-content h2,
table.bbs-view tbody td.contents #post-content .editorjs-content .ej-heading--e2 {
    font-size: clamp(1.75rem, var(--font-48), 3rem);
    line-height: 1.25;
    margin: 1.6em 0 0.5em;
}
table.bbs-view tbody td.contents #post-content .editorjs-content h3,
table.bbs-view tbody td.contents #post-content .editorjs-content .ej-heading--e3 {
    font-size: clamp(1.5rem, var(--font-36), 2.25rem);
    line-height: 1.3333;
    margin: 1.5em 0 0.5em;
}
table.bbs-view tbody td.contents #post-content .editorjs-content h4,
table.bbs-view tbody td.contents #post-content .editorjs-content .ej-heading--e4 {
    font-size: clamp(1.25rem, var(--font-28), 1.75rem);
    line-height: 1.4286;
    margin: 1.3em 0 0.4em;
}
table.bbs-view tbody td.contents #post-content .editorjs-content ul,
table.bbs-view tbody td.contents #post-content .editorjs-content ol {
    padding-left: 1.5em;
}
table.bbs-view tbody td.contents #post-content .editorjs-content ul.editorjs-list--unordered,
table.bbs-view tbody td.contents #post-content .editorjs-content ul:not([class]) {
    list-style: disc;
}
table.bbs-view tbody td.contents #post-content .editorjs-content ol.editorjs-list--ordered,
table.bbs-view tbody td.contents #post-content .editorjs-content ol:not([class]) {
    list-style: decimal;
}
table.bbs-view tbody td.contents #post-content .editorjs-content hr {
    display: block;
    border: none;
    border-top: 2px solid #eee;
    margin: 2em 0;
    height: 0;
}

/* Block Tune — Background */
.editorjs-content .editorjs-block-bg,
.editorjs-holder .cdx-background-tune {
    border-radius: 3px;
    padding: max(0.75rem, var(--vw-16));
    margin: var(--ej-block-gap) 0;
}
.editorjs-content .editorjs-block-bg--info,
.editorjs-holder .cdx-background-tune--info {
    background-color: rgba(92, 182, 255, 0.1);
}
.editorjs-content .editorjs-block-bg--warning,
.editorjs-holder .cdx-background-tune--warning {
    background-color: rgba(255, 208, 37, 0.1);
}

/* Block Tune — Spoiler (관리자·프론트 동일 UI) */
.editorjs-content .editorjs-spoiler,
.editorjs-holder .cdx-spoiler-tune--active .editorjs-spoiler {
    margin: var(--ej-block-gap) 0;
    border: 1px solid var(--ej-border-color);
    border-radius: 3px;
    overflow: hidden;
}
.editorjs-content .editorjs-spoiler__label,
.editorjs-holder .editorjs-spoiler__label {
    display: block;
    padding: max(0.625rem, var(--vw-10)) max(0.75rem, var(--vw-16));
    background: #f5f5f5;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    color: inherit;
    user-select: none;
}
.editorjs-content .editorjs-spoiler__label::-webkit-details-marker,
.editorjs-holder .editorjs-spoiler__label::-webkit-details-marker {
    display: none;
}
.editorjs-content .editorjs-spoiler__body,
.editorjs-holder .editorjs-spoiler__body {
    padding: max(0.75rem, var(--vw-16));
}
/* 스포일러 OFF — details 껍데기 숨기고 본문만 */
.editorjs-holder .cdx-spoiler-tune:not(.cdx-spoiler-tune--active) .editorjs-spoiler {
    border: none;
    margin: 0;
}
.editorjs-holder .cdx-spoiler-tune:not(.cdx-spoiler-tune--active) .editorjs-spoiler__label {
    display: none;
}
.editorjs-holder .cdx-spoiler-tune:not(.cdx-spoiler-tune--active) .editorjs-spoiler__body {
    padding: 0;
}

/* 배경 색상 패널 — Block Tunes / 인라인 툴바 팝오버 내부에 붙여 메뉴가 닫히지 않게 함 */
.ce-popover:has(.editorjs-color-panel) {
    max-height: 340px;
}
.ce-inline-toolbar:has(.editorjs-color-panel) {
    flex-wrap: wrap;
    max-width: 320px;
}
.ce-popover .editorjs-color-panel,
.ce-inline-toolbar .editorjs-color-panel {
    position: relative;
    left: auto;
    top: auto;
    z-index: 1;
    width: 100%;
    margin-top: 6px;
    box-sizing: border-box;
    box-shadow: none;
}
.editorjs-color-panel {
    position: fixed;
    z-index: 100000;
    background: #fff;
    border: 1px solid #e8e8eb;
    border-radius: 6px;
    box-shadow: 0 3px 15px -3px rgba(13, 20, 33, 0.13);
    padding: 8px;
}
.editorjs-color-panel__row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.editorjs-color-panel__swatch {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e8e8eb;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}
.editorjs-color-panel__hex {
    width: 90px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #e8e8eb;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}
.editorjs-color-panel__apply {
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: #388ae5;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Editor.js JSON 복사·붙여넣기 바 / 모달 */
.editorjs-json-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	padding: 8px 10px;
	background: #f4f6f8;
	border: 1px solid #e2e6ea;
	border-radius: 6px;
}
.editorjs-json-bar__btn {
	appearance: none;
	border: 1px solid #c8ced3;
	background: #fff;
	color: #131313;
	font-size: 13px;
	line-height: 1.2;
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
}
.editorjs-json-bar__btn:hover {
	border-color: #9aa3ab;
}
.editorjs-json-bar__btn--primary {
	border-color: #1a73e8;
	background: #1a73e8;
	color: #fff;
}
.editorjs-json-bar__btn--primary:hover {
	background: #1557b0;
	border-color: #1557b0;
}
.editorjs-json-bar__link {
	margin-left: auto;
	font-size: 12px;
	color: #1a73e8;
	text-decoration: underline;
}
.editorjs-json-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.editorjs-json-modal[hidden] {
	display: none !important;
}
.editorjs-json-modal__dim {
	position: absolute;
	inset: 0;
	background: rgba(19, 19, 19, 0.45);
}
.editorjs-json-modal__panel {
	position: relative;
	z-index: 1;
	width: min(720px, 100%);
	max-height: min(90vh, 840px);
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	padding: 16px 18px 14px;
}
.editorjs-json-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.editorjs-json-modal__head h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}
.editorjs-json-modal__x {
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}
.editorjs-json-modal__hint {
	margin: 0;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
}
.editorjs-json-modal__ta {
	width: 100%;
	min-height: 280px;
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	line-height: 1.45;
	padding: 10px;
	border: 1px solid #c8ced3;
	border-radius: 6px;
	box-sizing: border-box;
}
.editorjs-json-modal__msg {
	margin: 0;
	font-size: 13px;
	color: #0b6e4f;
}
.editorjs-json-modal__msg.is-error {
	color: #c62828;
}
.editorjs-json-modal__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.editorjs-json-modal__replace {
	font-size: 13px;
	color: #333;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.editorjs-json-modal__btns {
	display: flex;
	gap: 8px;
}
.editorjs-json-modal__btn {
	appearance: none;
	border: 1px solid #c8ced3;
	background: #fff;
	padding: 7px 14px;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
}
.editorjs-json-modal__btn--primary {
	border-color: #1a73e8;
	background: #1a73e8;
	color: #fff;
}
.editorjs-json-modal__btn--ghost:hover {
	border-color: #9aa3ab;
}
