/*
 * 게시글 본문(공지·스토리) 공통 스타일.
 * 관리자 에디터(.note-editable)와 홈페이지·앱 게시 화면이 같은 규칙을 써서
 * 작성 화면과 게시 화면의 글씨 크기 비율·정렬·문단 간격·사진 배치가 같게 보이도록 한다.
 *
 * --board-unit : 에디터의 1px 이 화면에서 차지하는 크기.
 *   - 관리자 에디터 : 1px (작성한 그대로)
 *   - 게시 화면     : 더 크게 (PC 17/14, 모바일 16/14) → 에디터 14px 글씨가 PC 17px·모바일 16px 로 보인다.
 * 게시 화면에서는 본문에 직접 들어간 font-size:Npx 를 cfBoardContent() 가
 * calc(var(--board-unit) * N) 으로 바꿔서, 에디터에서 정한 크기 비율을 그대로 유지한 채 함께 커진다.
 */
.board_content{
    --board-unit: 1px;
    font-size: calc(var(--board-unit) * 14);
    line-height: 1.7;
    color: #111;
    text-align: left;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.board_content p,
.board_content div,
.board_content li{
    font-size: inherit;
    line-height: inherit;
}
.board_content p{
    margin: 0 0 calc(var(--board-unit) * 16);
}
.board_content b,
.board_content strong{
    font-weight: bold;
}
/* 어떤 요소도 본문 폭을 넘지 않게 (다른 곳에서 붙여넣은 고정 폭 상자 포함) → 모바일에서 가로로 넘치지 않는다 */
.board_content *{
    max-width: 100%;
}
.board_content img{
    max-width: 100%;
    /* 에디터가 높이를 px 로 박아둔 이미지도 폭이 줄 때 비율을 유지한다 */
    height: auto !important;
}
/* 칸보다 좁은 사진은 가운데에 둔다 (관리자 작성창과 게시 화면 모두).
   문단에 사진이 한 장만 있을 때만 적용한다 — 한 문단에 여러 장을 나란히 놓은 사진(50%+50% 등)은
   작성한 그대로 나란히 둔다. 왼쪽/오른쪽 띄우기(float)로 둔 사진과, 오른쪽 정렬 문단 안의 사진도 그대로 둔다 */
.board_content img:only-of-type:not(.note-float-left):not(.note-float-right):not([style*="float"]){
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.board_content [style*="text-align: right"] img:only-of-type:not(.note-float-left):not(.note-float-right):not([style*="float"]){
    margin-right: 0;
}
.board_content iframe{
    max-width: 100%;
}

/* 게시 화면 (관리자 에디터에는 board_view 를 붙이지 않는다) */
.board_content.board_view{
    --board-unit: calc(17px / 14);
}
@media screen and (max-width:499px), screen and (hover:none){
    .board_content.board_view{
        --board-unit: calc(16px / 14);
    }
}
