/* =========================================================
 * 칼럼 본문 스타일 (에디터 화면 + 실제 보기 화면 공용)
 * - 에디터: #cwe, #cwe_{id} .cw-body.ce-content (공용 에디터) / .cw-body.ce-content
 * - 보기  : #bo_v #bo_v_con.ce-content  (view.skin.php 의 #bo_v_con 에 class="ce-content" 추가)
 *   → #아이디 선택자까지 포함해서, 스킨 style.css 의 #bo_v_con p {...} 같은 규칙보다 우선 적용
 * 보기 화면(선택): view.skin.php 에 이 파일 연결 + #bo_v_con 에 class="ce-content" (적용방법.txt 참고)
 * 색상은 아래 변수만 바꾸면 전체 적용됩니다.
 * ========================================================= */
:root {
    --ce-accent: #1f7a6d;
    --ce-accent-soft: #eef6f4;
    --ce-text: #222;
    --ce-sub: #666;
    --ce-line: #e3e5e8;
    --ce-bg-soft: #f7f8f9;
}

.ce-content,
:is(#cwe, [id^="cwe_"]) .ce-content,
#bo_v #bo_v_con.ce-content {
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.ce-content,
:is(#cwe, [id^="cwe_"]) .ce-content,
#bo_v #bo_v_con.ce-content {
    color: var(--ce-text);
    font-size: 17px;
    line-height: 1.85;
    letter-spacing: -0.01em;
}

/* 스킨 style.css 가 하위 태그(p, li 등)에 직접 준 행간·글자크기·색·목록 스타일을 무시하고
   에디터와 똑같이 본문 기준값을 상속받게 함 (부품별 지정값은 더 구체적인 아래 규칙이 우선) */
.ce-content p,
.ce-content li,
.ce-content blockquote,
.ce-content span,
.ce-content strong,
.ce-content em,
.ce-content u,
.ce-content s,
:is(#cwe, [id^="cwe_"]) .ce-content p,
:is(#cwe, [id^="cwe_"]) .ce-content li,
:is(#cwe, [id^="cwe_"]) .ce-content blockquote,
:is(#cwe, [id^="cwe_"]) .ce-content span,
:is(#cwe, [id^="cwe_"]) .ce-content strong,
:is(#cwe, [id^="cwe_"]) .ce-content em,
:is(#cwe, [id^="cwe_"]) .ce-content u,
:is(#cwe, [id^="cwe_"]) .ce-content s,
#bo_v #bo_v_con.ce-content p,
#bo_v #bo_v_con.ce-content li,
#bo_v #bo_v_con.ce-content blockquote,
#bo_v #bo_v_con.ce-content span,
#bo_v #bo_v_con.ce-content strong,
#bo_v #bo_v_con.ce-content em,
#bo_v #bo_v_con.ce-content u,
#bo_v #bo_v_con.ce-content s {
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}

.ce-content p,
.ce-content li,
:is(#cwe, [id^="cwe_"]) .ce-content p,
:is(#cwe, [id^="cwe_"]) .ce-content li,
#bo_v #bo_v_con.ce-content p,
#bo_v #bo_v_con.ce-content li {
    color: inherit;
}

.ce-content li,
:is(#cwe, [id^="cwe_"]) .ce-content li,
#bo_v #bo_v_con.ce-content li {
    list-style: inherit;
}

.ce-content p,
:is(#cwe, [id^="cwe_"]) .ce-content p,
#bo_v #bo_v_con.ce-content p {
    margin: 0 0 0.9em;
}

.ce-content p:empty::before,
:is(#cwe, [id^="cwe_"]) .ce-content p:empty::before,
#bo_v #bo_v_con.ce-content p:empty::before {
    content: "\200B";
}

.ce-content h2,
:is(#cwe, [id^="cwe_"]) .ce-content h2,
#bo_v #bo_v_con.ce-content h2 {
    font-size: 1.45em;
    line-height: 1.45;
    font-weight: 700;
    margin: 2.2em 0 0.8em;
    padding-bottom: 0.45em;
    border-bottom: 2px solid var(--ce-text);
    letter-spacing: -0.03em;
}

.ce-content h3,
:is(#cwe, [id^="cwe_"]) .ce-content h3,
#bo_v #bo_v_con.ce-content h3 {
    font-size: 1.18em;
    line-height: 1.5;
    font-weight: 700;
    margin: 1.8em 0 0.6em;
    letter-spacing: -0.02em;
}

.ce-content h2:first-child,
:is(#cwe, [id^="cwe_"]) .ce-content h2:first-child,
#bo_v #bo_v_con.ce-content h2:first-child,
.ce-content h3:first-child,
:is(#cwe, [id^="cwe_"]) .ce-content h3:first-child,
#bo_v #bo_v_con.ce-content h3:first-child {
    margin-top: 0.4em;
}

.ce-content ul,
:is(#cwe, [id^="cwe_"]) .ce-content ul,
#bo_v #bo_v_con.ce-content ul,
.ce-content ol,
:is(#cwe, [id^="cwe_"]) .ce-content ol,
#bo_v #bo_v_con.ce-content ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.ce-content ul,
:is(#cwe, [id^="cwe_"]) .ce-content ul,
#bo_v #bo_v_con.ce-content ul {
    list-style: disc;
}

.ce-content ol,
:is(#cwe, [id^="cwe_"]) .ce-content ol,
#bo_v #bo_v_con.ce-content ol {
    list-style: decimal;
}

.ce-content li,
:is(#cwe, [id^="cwe_"]) .ce-content li,
#bo_v #bo_v_con.ce-content li {
    margin: 0.25em 0;
}

.ce-content a:not(.view_image),
:is(#cwe, [id^="cwe_"]) .ce-content a:not(.view_image),
#bo_v #bo_v_con.ce-content a:not(.view_image) {
    color: var(--ce-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ce-content strong,
:is(#cwe, [id^="cwe_"]) .ce-content strong,
#bo_v #bo_v_con.ce-content strong {
    font-weight: 700;
}

/* ---------- 이미지 ---------- */
.ce-content .ce-img,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-img,
#bo_v #bo_v_con.ce-content .ce-img {
    margin: 1.8em auto;
    text-align: center;
}

.ce-content .ce-img img,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-img img,
#bo_v #bo_v_con.ce-content .ce-img img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
}

.ce-content .ce-img--w50 img,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-img--w50 img,
#bo_v #bo_v_con.ce-content .ce-img--w50 img {
    width: 50%;
}

.ce-content .ce-img--w75 img,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-img--w75 img,
#bo_v #bo_v_con.ce-content .ce-img--w75 img {
    width: 75%;
}

.ce-content .ce-img--w100 img,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-img--w100 img,
#bo_v #bo_v_con.ce-content .ce-img--w100 img {
    width: 100%;
}

.ce-content .ce-caption,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-caption,
#bo_v #bo_v_con.ce-content .ce-caption {
    margin: 0.7em 0 0 !important;
    font-size: 0.82em;
    color: var(--ce-sub);
    text-align: center;
    line-height: 1.6;
}

/* ---------- 동영상 ---------- */
.ce-content .ce-video,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-video,
#bo_v #bo_v_con.ce-content .ce-video {
    position: relative;
    margin: 1.8em 0;
    padding-top: 56.25%;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.ce-content .ce-video iframe,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-video iframe,
#bo_v #bo_v_con.ce-content .ce-video iframe,
.ce-content .ce-video img.Iframevideo,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-video img.Iframevideo,
#bo_v #bo_v_con.ce-content .ce-video img.Iframevideo {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* ---------- 인용구 ---------- */
.ce-content .ce-quote,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote,
#bo_v #bo_v_con.ce-content .ce-quote {
    margin: 1.8em 0;
    padding: 0;
    border: 0;
    font-style: normal;
}

.ce-content .ce-quote p,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote p,
#bo_v #bo_v_con.ce-content .ce-quote p {
    margin: 0 0 0.4em;
}

.ce-content .ce-quote p:last-child,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote p:last-child,
#bo_v #bo_v_con.ce-content .ce-quote p:last-child {
    margin-bottom: 0;
}

.ce-content .ce-quote--line,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote--line,
#bo_v #bo_v_con.ce-content .ce-quote--line {
    padding: 0.2em 0 0.2em 1.1em;
    border-left: 4px solid var(--ce-accent);
    color: #333;
}

.ce-content .ce-quote--mark,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote--mark,
#bo_v #bo_v_con.ce-content .ce-quote--mark {
    position: relative;
    padding: 1.6em 1em 0.6em;
    text-align: center;
    font-size: 1.12em;
    font-weight: 600;
    color: #333;
}

.ce-content .ce-quote--mark::before,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote--mark::before,
#bo_v #bo_v_con.ce-content .ce-quote--mark::before {
    content: "\201C";
    position: absolute;
    top: -0.25em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3em;
    line-height: 1;
    font-family: Georgia, serif;
    color: var(--ce-accent);
}

.ce-content .ce-quote--box,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote--box,
#bo_v #bo_v_con.ce-content .ce-quote--box {
    padding: 1.2em 1.4em;
    background: var(--ce-bg-soft);
    border: 1px solid var(--ce-line);
    border-radius: 10px;
}

.ce-content .ce-quote--note,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote--note,
#bo_v #bo_v_con.ce-content .ce-quote--note {
    position: relative;
    padding: 1.1em 1.3em 1.1em 1.3em;
    background: var(--ce-accent-soft);
    border-radius: 10px;
}

.ce-content .ce-quote--note::before,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-quote--note::before,
#bo_v #bo_v_con.ce-content .ce-quote--note::before {
    content: "원장 TIP";
    display: inline-block;
    margin-bottom: 0.5em;
    padding: 0.15em 0.6em;
    font-size: 0.75em;
    font-weight: 700;
    color: #fff;
    background: var(--ce-accent);
    border-radius: 99px;
    letter-spacing: 0;
}

/* ---------- 구분선 ---------- */
.ce-content hr.ce-hr,
:is(#cwe, [id^="cwe_"]) .ce-content hr.ce-hr,
#bo_v #bo_v_con.ce-content hr.ce-hr {
    display: block !important;
    margin: 2.6em auto;
    border: 0;
    height: 0;
    overflow: visible;
}

.ce-content .ce-hr--line,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-hr--line,
#bo_v #bo_v_con.ce-content .ce-hr--line {
    border-top: 1px solid var(--ce-line);
}

.ce-content .ce-hr--short,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-hr--short,
#bo_v #bo_v_con.ce-content .ce-hr--short {
    width: 60px;
    border-top: 3px solid var(--ce-text);
}

.ce-content .ce-hr--dots,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-hr--dots,
#bo_v #bo_v_con.ce-content .ce-hr--dots {
    height: auto;
    text-align: center;
    line-height: 1;
}

.ce-content .ce-hr--dots::before,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-hr--dots::before,
#bo_v #bo_v_con.ce-content .ce-hr--dots::before {
    content: "\00B7\2003\00B7\2003\00B7";
    font-size: 1.6em;
    color: #999;
}

/* ---------- 표 ---------- */
.ce-content .ce-table,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-table,
#bo_v #bo_v_con.ce-content .ce-table {
    margin: 1.6em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ce-content .ce-table table,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-table table,
#bo_v #bo_v_con.ce-content .ce-table table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: 0.92em;
    line-height: 1.6;
}

.ce-content .ce-table th,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-table th,
#bo_v #bo_v_con.ce-content .ce-table th,
.ce-content .ce-table td,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-table td,
#bo_v #bo_v_con.ce-content .ce-table td {
    padding: 0.7em 0.9em;
    border: 1px solid var(--ce-line);
    text-align: left;
    vertical-align: top;
}

.ce-content .ce-table th,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-table th,
#bo_v #bo_v_con.ce-content .ce-table th {
    background: var(--ce-bg-soft);
    font-weight: 700;
}

/* ---------- 핵심 요약 (AEO) ---------- */
.ce-content .ce-summary,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-summary,
#bo_v #bo_v_con.ce-content .ce-summary {
    margin: 0 0 2em;
    padding: 1.3em 1.5em 1.2em;
    background: var(--ce-accent-soft);
    border: 1px solid rgba(31, 122, 109, .25);
    border-radius: 12px;
}

.ce-content .ce-summary .ce-summary-title,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-summary .ce-summary-title,
#bo_v #bo_v_con.ce-content .ce-summary .ce-summary-title {
    margin: 0 0 0.6em;
    font-weight: 700;
    font-size: 0.95em;
    color: var(--ce-accent);
}

.ce-content .ce-summary ul,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-summary ul,
#bo_v #bo_v_con.ce-content .ce-summary ul {
    margin: 0;
    padding-left: 1.2em;
}

.ce-content .ce-summary li,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-summary li,
#bo_v #bo_v_con.ce-content .ce-summary li {
    margin: 0.3em 0;
}

/* ---------- FAQ (AEO) ---------- */
.ce-content .ce-faq,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq,
#bo_v #bo_v_con.ce-content .ce-faq {
    margin: 2.4em 0;
}

.ce-content .ce-faq .ce-faq-title,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq .ce-faq-title,
#bo_v #bo_v_con.ce-content .ce-faq .ce-faq-title {
    margin: 0 0 0.8em;
}

.ce-content .ce-faq-item,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq-item,
#bo_v #bo_v_con.ce-content .ce-faq-item {
    margin: 0 0 0.8em;
    border: 1px solid var(--ce-line);
    border-radius: 10px;
    overflow: hidden;
}

.ce-content .ce-faq-q,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq-q,
#bo_v #bo_v_con.ce-content .ce-faq-q {
    position: relative;
    margin: 0;
    padding: 0.9em 1.1em 0.9em 2.8em;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.6;
    background: var(--ce-bg-soft);
    border: 0;
}

.ce-content .ce-faq-q::before,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq-q::before,
#bo_v #bo_v_con.ce-content .ce-faq-q::before {
    content: "Q";
    position: absolute;
    left: 1.1em;
    top: 0.9em;
    color: var(--ce-accent);
    font-weight: 800;
}

.ce-content .ce-faq-a,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq-a,
#bo_v #bo_v_con.ce-content .ce-faq-a {
    position: relative;
    padding: 0.9em 1.1em 0.9em 2.8em;
}

.ce-content .ce-faq-a::before,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq-a::before,
#bo_v #bo_v_con.ce-content .ce-faq-a::before {
    content: "A";
    position: absolute;
    left: 1.1em;
    top: 0.9em;
    color: #999;
    font-weight: 800;
}

.ce-content .ce-faq-a p,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq-a p,
#bo_v #bo_v_con.ce-content .ce-faq-a p {
    margin: 0 0 0.4em;
}

.ce-content .ce-faq-a p:last-child,
:is(#cwe, [id^="cwe_"]) .ce-content .ce-faq-a p:last-child,
#bo_v #bo_v_con.ce-content .ce-faq-a p:last-child {
    margin-bottom: 0;
}

/* ---------- 작성 의료진 박스 (column_view.inc.php) ---------- */
.ce-author {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 2.4em 0 1em;
    padding: 1.1em 1.3em;
    border: 1px solid var(--ce-line);
    border-radius: 12px;
}

.ce-author__badge {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ce-accent-soft);
    color: var(--ce-accent);
    font-weight: 800;
}

.ce-author__name {
    font-weight: 700;
}

.ce-author__meta {
    font-size: 0.85em;
    color: var(--ce-sub);
}

@media (max-width: 640px) {

    .ce-content,
    :is(#cwe, [id^="cwe_"]) .ce-content,
    #bo_v #bo_v_con.ce-content {
        font-size: 16px;
    }

    .ce-content .ce-img--w50 img,
    :is(#cwe, [id^="cwe_"]) .ce-content .ce-img--w50 img,
    #bo_v #bo_v_con.ce-content .ce-img--w50 img,
    .ce-content .ce-img--w75 img,
    :is(#cwe, [id^="cwe_"]) .ce-content .ce-img--w75 img,
    #bo_v #bo_v_con.ce-content .ce-img--w75 img {
        width: 100%;
    }

    .ce-content .ce-summary,
    :is(#cwe, [id^="cwe_"]) .ce-content .ce-summary,
    #bo_v #bo_v_con.ce-content .ce-summary {
        padding: 1.1em 1.1em 1em;
    }
}