/* 게시글 본문 공용 스타일 — 보기 화면(bbs_view.html, .view-content)과 편집 화면(bbs_write.html, .ck-content)이 함께 쓴다.
   같은 규칙을 양쪽에 적용해서 편집기에서 보이는 모양이 보기 화면과 같게(위지위그) 한다. 수정은 이 파일에서만 한다. */
    :is(.view-content, .ck-content) { min-height:300px; line-height:1.8; color:#444; }
    :is(.view-content, .ck-content) img { max-width:100%; height:auto; }
    /* 게시글 표(가변형) — sanitizer 가 class 를 지우므로 구조 선택자만 사용 */
    /* 편집기 기본 본문 스타일(ckeditor5-content.css)이 표 틀을 display:table 로 만들어 본문 폭을 넘기고 표 테두리를 덧그리므로, 기존(가변형 표) 모양으로 되돌린다 */
    :is(.view-content, .ck-content) figure.table{display:block;width:auto;margin:20px 0;overflow:auto;max-height:80vh;border:1px solid #d5dbe3;border-radius:8px;-webkit-overflow-scrolling:touch}
    :is(.view-content, .ck-content) figure.table table{table-layout:auto;border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:14px;text-align:center;line-height:1.4}
    :is(.view-content, .ck-content) table th,:is(.view-content, .ck-content) table td,:is(.view-content, .ck-content) table tr{vertical-align:middle}
    :is(.view-content, .ck-content) figure.table table{border:0;height:auto}
    :is(.view-content, .ck-content) figure.table th,:is(.view-content, .ck-content) figure.table td{min-width:0;border-top:1px solid #dee2e6;border-left:0}
    :is(.view-content, .ck-content) figure.table th,:is(.view-content, .ck-content) figure.table td{padding:8px 6px;border-right:1px solid #e3e7ed;border-bottom:1px solid #e3e7ed;white-space:nowrap;vertical-align:middle}
    :is(.view-content, .ck-content) figure.table thead th{position:sticky;top:0;z-index:3;background:#1f3a5f;color:#fff;font-weight:700}
    :is(.view-content, .ck-content) figure.table thead tr:nth-child(2) th{top:37px;font-weight:500;font-size:13px}
    :is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(8){background:#2b6a73}
    :is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(9){background:#6a4f8f}
    :is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(10){background:#8a5a2b}
    :is(.view-content, .ck-content) figure.table thead tr:nth-child(2) th{background:#2d5287}
    :is(.view-content, .ck-content) figure.table thead tr:nth-child(2) th:nth-child(n+7):nth-child(-n+12){background:#3a8791}
    :is(.view-content, .ck-content) figure.table thead tr:nth-child(2) th:nth-child(n+13):nth-child(-n+18){background:#8368a8}
    :is(.view-content, .ck-content) figure.table thead tr:nth-child(2) th:nth-child(n+19){background:#a8763f}
    :is(.view-content, .ck-content) figure.table tbody tr{background:#fff}
    :is(.view-content, .ck-content) figure.table tbody tr:nth-child(even){background:#f7f9fc}
    :is(.view-content, .ck-content) figure.table tbody tr:hover{background:#fff6dd}
    :is(.view-content, .ck-content) figure.table tbody td{background:inherit}
    :is(.view-content, .ck-content) figure.table tbody td:nth-child(6n):not(:nth-child(6)){background-image:linear-gradient(rgba(120,170,225,.2),rgba(120,170,225,.2));font-weight:700}
    :is(.view-content, .ck-content) figure.table tbody td:nth-child(4),:is(.view-content, .ck-content) figure.table tbody td:nth-child(5),:is(.view-content, .ck-content) figure.table tbody td:nth-child(6){font-weight:700}
    :is(.view-content, .ck-content) figure.table tbody td:nth-child(1),:is(.view-content, .ck-content) figure.table tbody td:nth-child(4),:is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(1),:is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(4){position:sticky;z-index:2}
    :is(.view-content, .ck-content) figure.table tbody td:nth-child(1),:is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(1){left:0;min-width:48px}
    :is(.view-content, .ck-content) figure.table tbody td:nth-child(4),:is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(4){left:48px;min-width:80px;border-right:2px solid #9aa6b5}
    :is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(1),:is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(4){z-index:5}
    :is(.view-content, .ck-content) h3{word-break:keep-all;text-align:center;font-size:22px;font-weight:700;margin:10px 0 20px}
    @media(max-width:768px){:is(.view-content, .ck-content) figure.table table{font-size:12px}:is(.view-content, .ck-content) figure.table th,:is(.view-content, .ck-content) figure.table td{padding:6px 4px}:is(.view-content, .ck-content) h3{font-size:18px!important;padding:16px 0!important}:is(.view-content, .ck-content) figure.table tbody td:nth-child(4),:is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(4){left:40px;min-width:64px}:is(.view-content, .ck-content) figure.table tbody td:nth-child(1),:is(.view-content, .ck-content) figure.table thead tr:first-child th:nth-child(1){min-width:40px}}
