/*!
 * board-skin.runtime.css — 게시판 공개 페이지 공통 스타일.
 *
 * 디자인 토큰
 *   primary:  #2563eb
 *   danger:   #dc2626
 *   notice:   #ea580c
 *   text:     #1f2937
 *   muted:    #6b7280
 *   border:   #e5e7eb
 *   bg-soft:  #f9fafb
 *
 * 구성
 *   1) 공통 wrap·error·empty
 *   2) Toolbar (search + write 버튼)
 *   3) 카테고리 (tabs / 2depth / tree)
 *   4) Top notice 영역
 *   5) Table 형 list (NORMAL/NOTICE/QNA/PRESS/DATA/DOWNLOAD)
 *   6) Card 형 list (CARD/GALLERY/VIDEO)
 *   7) Timeline list
 *   8) Accordion/FAQ list
 *   9) Calendar list
 *  10) Paging
 *  11) View (cms-post)
 *  12) prev/next nav + 액션 버튼
 *  13) 비밀글 prompt / 영상 embed / iframe
 *  14) Write form
 *  15) 댓글 (cms-comments)
 *  16) boardType 별 색·아이콘 차별
 *  17) 반응형
 */

/* ============== 1. 공통 ============== */
/* 게시판 마운트 컨테이너 — 페이지 본문 안에서 가로 중앙 정렬 + 최대 폭 제한.
   레이아웃 안 너비가 충분히 좁으면 max-width 가 효과 없고, 넓으면 양쪽 여백이 자동으로 잡힘. */
[data-cms-board-mount] {
    display: block;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.cms-board, .cms-post {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
}
.cms-board { padding: 16px 0; }
.cms-board__error,
.cms-board__empty {
    padding: 24px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
}

/* ============== 2. Toolbar ============== */
.cms-board__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}
.cms-board__search {
    display: flex;
    gap: 6px;
    align-items: center;
}
.cms-board__search-input {
    width: 240px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
}
.cms-board__search-input:focus {
    outline: 2px solid #2563eb;
    outline-offset: -1px;
    border-color: #2563eb;
}
.cms-board__search-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.cms-board__search-btn:hover { background: #f3f4f6; }
.cms-board__btn-write {
    padding: 8px 18px;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}
.cms-board__btn-write:hover { background: #1d4ed8; }

/* ============== 3. 카테고리 ============== */
.cms-board__filter { margin: 4px 0 0; }
.cms-board__category-tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin: 12px 0;
}
.cms-board__category-tab {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
}
.cms-board__category-tab:hover { background: #f3f4f6; }
.cms-board__category-tab.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.cms-board__category-2depth { display: flex; gap: 8px; margin: 12px 0; }
.cms-board__category-2depth select,
.cms-board__category-tree,
.cms-board__category-select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    min-width: 140px;
    font-size: 13px;
}
.cms-board__category-label {
    display: inline-block;
    padding: 6px 10px 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-right: 4px;
}

/* 마크다운 본문 */
.cms-board__md { font-size: 14px; line-height: 1.7; }
.cms-board__md h1 { font-size: 22px; margin: 16px 0 8px; }
.cms-board__md h2 { font-size: 19px; margin: 14px 0 8px; }
.cms-board__md h3 { font-size: 17px; margin: 12px 0 6px; }
.cms-board__md h4, .cms-board__md h5, .cms-board__md h6 { font-size: 15px; margin: 10px 0 6px; }
.cms-board__md code {
    padding: 1px 5px;
    background: #f3f4f6;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.cms-board__md a { color: #2563eb; text-decoration: underline; }

/* ============== 4. Top notice ============== */
.cms-board__top-notice {
    margin: 8px 0;
    padding: 0;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    overflow: hidden;
}
.cms-board__top-notice:empty { display: none; }
.cms-board__top-notice .cms-board__row,
.cms-board__top-notice .cms-board__card {
    background: transparent;
    border-bottom: 1px dashed #fed7aa;
}
.cms-board__top-notice .cms-board__row:last-child,
.cms-board__top-notice .cms-board__card:last-child {
    border-bottom: 0;
}

/* 그리드/카드형 목록 상단 핀(공지) — 큰 카드로 부풀지 않는 컴팩트 1줄 행.
   그리드 body 안에서는 grid-column:1/-1 로 한 줄 풀폭 차지(없으면 1칸만 점유). */
.cms-board__pinned-notice {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    font-size: 14px;
}
.cms-board__pinned-notice a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cms-board__pinned-notice a:hover { text-decoration: underline; }
.cms-board__pinned-notice .cms-board__pinned-meta {
    color: #9ca3af;
    font-size: 12px;
    margin-left: auto;
    flex: none;
    white-space: nowrap;
}
/* 카드/갤러리/아코디언 핀(공지) — 일반 카드와 동일 형태 유지, 공지 배지 + 미세 강조만. */
.cms-board__card.is-pinned,
.cms-board__lcard.is-pinned,
.cms-board__acc-item.is-pinned {
    box-shadow: 0 0 0 2px #fed7aa;
    border-radius: 8px;
}

/* ============== 5. Table 형 list ============== */
.cms-board__list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}
.cms-board__list thead th {
    padding: 12px 8px;
    background: #f9fafb;
    border-top: 2px solid #1f2937;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}
.cms-board__list .th-no,
.cms-board__list .th-view,
.cms-board__list .th-down { width: 64px; }
.cms-board__list .th-writer,
.cms-board__list .th-source { width: 120px; }
.cms-board__list .th-date { width: 110px; }

.cms-board__list tbody td {
    padding: 12px 8px;
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
    font-size: 13px;
}
.cms-board__list tbody .td-title { text-align: left; }
.cms-board__row { transition: background .12s; }
.cms-board__row:hover { background: #f9fafb; }
.cms-board__row.is-pinned { background: #fffbeb; font-weight: 500; }
.cms-board__row.is-pinned .td-no { color: #ea580c; font-weight: 700; }
.cms-board__list tbody .cms-board__empty {
    padding: 48px 16px;
    background: transparent;
    border: 0;
}

.cms-board__link {
    color: #1f2937;
    text-decoration: none;
}
.cms-board__link:hover { color: #2563eb; text-decoration: underline; }

/* 배지 */
.cms-board__pin {
    display: inline-block;
    padding: 2px 8px;
    background: #ea580c;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
    vertical-align: middle;
}
.cms-board__lock { color: #6b7280; font-size: 12px; margin-right: 2px; }
.cms-board__cat {
    color: #2563eb;
    font-size: 12px;
    margin-right: 4px;
}
.cms-board__badge-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    line-height: 48px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 18px;
    pointer-events: none;
}

/* ============== 6. Card 형 list ============== */
.cms-board__cards,
.cms-board__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.cms-board__card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .15s, transform .15s;
}
.cms-board__card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.cms-board__card.is-pinned {
    border-color: #fed7aa;
    background: #fffbeb;
}
.cms-board__card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.cms-board__card-thumb-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    overflow: hidden;
}
.cms-board__card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cms-board__card-thumb--placeholder {
    background: linear-gradient(135deg, #e5e7eb 25%, #f3f4f6 25%, #f3f4f6 50%, #e5e7eb 50%, #e5e7eb 75%, #f3f4f6 75%, #f3f4f6);
    background-size: 12px 12px;
}
.cms-board__card-badges {
    position: absolute;
    top: 8px; left: 8px;
    display: flex;
    gap: 4px;
}
.cms-board__card-body { padding: 12px 14px; }
.cms-board__card-title {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: calc(1.4em * 2);
}
.cms-board__card-meta { color: #6b7280; font-size: 12px; }

/* ============== 7. Timeline ============== */
.cms-board__timeline {
    position: relative;
    padding: 16px 0 16px 28px;
    margin-top: 8px;
}
.cms-board__timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 10px;
    width: 2px;
    background: #e5e7eb;
}
.cms-board__timeline .cms-board__card { /* timeline 행이 card 컨테이너에 들어가도 무난 */
    position: relative;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 8px 0 16px;
    border-radius: 0;
}
.cms-board__timeline .cms-board__card:hover {
    box-shadow: none;
    transform: none;
    background: #f9fafb;
}
.cms-board__tl-dot {
    position: absolute;
    left: -22px; top: 12px;
    width: 12px; height: 12px;
    background: #2563eb;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #2563eb;
}
.cms-board__tl-body { padding-left: 4px; }
.cms-board__tl-date {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}
.cms-board__tl-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    margin-bottom: 4px;
}
.cms-board__tl-title:hover { color: #2563eb; }
.cms-board__tl-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* ============== 8. Accordion / FAQ ============== */
.cms-board__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.cms-board__items .cms-board__card {
    border-radius: 6px;
    transform: none;
}
.cms-board__items .cms-board__card:hover { transform: none; box-shadow: none; }
.cms-board__acc-head {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    color: #1f2937;
    transition: background .12s;
}
.cms-board__acc-head:hover { background: #f9fafb; }
.cms-board__acc-head.is-open {
    background: #eff6ff;
    color: #1d4ed8;
}
.cms-board__acc-q {
    display: inline-block;
    width: 22px; height: 22px;
    line-height: 22px;
    text-align: center;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.cms-board__acc-arrow {
    margin-left: auto;
    color: #6b7280;
    transition: transform .15s;
}
.cms-board__acc-head.is-open .cms-board__acc-arrow {
    transform: rotate(180deg);
    color: #2563eb;
}
.cms-board__acc-body {
    padding: 14px 16px 18px 50px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}

/* ============== 9. Calendar ============== */
.cms-board__cal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 12px 0;
}
.cms-board__cal-nav button {
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.cms-board__cal-label { font-size: 16px; font-weight: 600; min-width: 100px; text-align: center; }
/* 캘린더 컨테이너 — runtime.js 가 .cms-board__cal-head + .cms-board__cal-body 두 블록을
   생성하므로 컨테이너는 block 으로 세로 스택. (구 7컬럼 grid 정의는 셀이 직접 자식이던
   옛 마크업용 — head/body 구조와 충돌해 레이아웃이 깨지므로 제거함.) */
.cms-board__calendar {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}
.cms-board__cal-item {
    display: inline-block;
    padding: 2px 6px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cms-board__cal-item:hover { background: #dbeafe; }

/* ============== 10. Paging ============== */
.cms-board__paging {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}
.cms-board__page {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
}
.cms-board__page:hover { background: #f3f4f6; }
.cms-board__page.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 600;
}

/* ============== 11. View (cms-post) ============== */
.cms-post {
    margin: 16px 0;
    border-top: 2px solid #1f2937;
}
.cms-post__header {
    padding: 20px 0 16px;
    border-bottom: 1px solid #e5e7eb;
}
.cms-post__title {
    font-size: 22px;
    margin: 0 0 12px;
    line-height: 1.4;
    color: #1f2937;
}
.cms-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #6b7280;
    font-size: 13px;
}
.cms-post__meta > span:empty { display: none; }
.cms-post__cat { color: #2563eb; }
.cms-post__status {
    padding: 2px 8px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 10px;
    font-size: 11px;
}
.cms-post__period {
    margin-top: 8px;
    padding: 6px 12px;
    background: #fef3c7;
    border-radius: 4px;
    color: #92400e;
    font-size: 12px;
    display: inline-block;
}
.cms-post__period:empty { display: none; }
.cms-post__content {
    min-height: 220px;
    padding: 24px 0;
    line-height: 1.8;
    font-size: 14px;
    color: #1f2937;
}
.cms-post__content img { max-width: 100%; height: auto; }
.cms-post__attach {
    margin: 12px 0;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
}
.cms-post__attach:empty { display: none; }
.cms-post__source {
    margin: 12px 0;
    padding: 8px 14px;
    border-left: 3px solid #2563eb;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
}
.cms-post__source:empty { display: none; }
.cms-post__source a { color: #1d4ed8; }
.cms-post__video {
    margin: 16px 0;
}
.cms-post__video:empty { display: none; }

/* ============== 12. prev/next + actions ============== */
.cms-post__nav {
    margin: 20px 0 0;
    border-top: 1px solid #e5e7eb;
}
.cms-post__nav:empty { display: none; }
.cms-post__nav-prev,
.cms-post__nav-next {
    padding: 12px 8px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.cms-post__nav-prev a,
.cms-post__nav-next a {
    color: #1f2937;
    text-decoration: none;
}
.cms-post__nav-prev a:hover,
.cms-post__nav-next a:hover { color: #2563eb; text-decoration: underline; }
.cms-post__nav .is-disabled { color: #9ca3af; }
.cms-post__nav-list { padding: 12px 8px; text-align: center; }
.cms-board__btn-list {
    display: inline-block;
    padding: 8px 24px;
    background: #1f2937;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}
.cms-board__btn-list:hover { background: #111827; }
.cms-post__actions {
    margin: 12px 0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.cms-board__btn-edit,
.cms-board__btn-reply {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #1f2937;
    font-size: 13px;
}
.cms-board__btn-edit:hover,
.cms-board__btn-reply:hover { background: #f3f4f6; }

/* ============== 13. 비밀글 / 영상 / iframe ============== */
.cms-board__secret-prompt {
    padding: 24px;
    text-align: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin: 16px 0;
}
.cms-board__secret-prompt p { margin: 0 0 12px; color: #374151; }
.cms-board__secret-input {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin-right: 6px;
}
.cms-board__secret-unlock {
    padding: 6px 14px;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}
.cms-board__video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}
.cms-board__video-frame iframe,
.cms-board__video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.cms-board__video { aspect-ratio: 16 / 9; background: #000; }
.cms-board__video-link {
    display: inline-block;
    padding: 8px 14px;
    background: #1f2937;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}
.cms-board__iframe {
    width: 100%;
    min-height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}
.cms-board__plain {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ============== 14. Write form ============== */
.cms-board__write {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 0;
    max-width: 880px;
}
.cms-board__field {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
    gap: 12px;
}
.cms-board__label {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    padding-top: 8px;
}
.cms-board__field-body { display: flex; flex-direction: column; gap: 4px; }
.cms-board__input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.cms-board__input:focus {
    outline: 2px solid #2563eb;
    outline-offset: -1px;
    border-color: #2563eb;
}
.cms-board__input--sm { width: auto; min-width: 160px; }
.cms-board__input--lg { font-size: 16px; padding: 10px 14px; }
.cms-board__editor-wrap { display: flex; flex-direction: column; gap: 4px; }
.cms-board__editor {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 220px;
}
.cms-board__hint { color: #6b7280; font-size: 12px; }
.cms-board__check,
.cms-board__radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}
.cms-board__check input,
.cms-board__radio input { margin: 0; }
.cms-board__attach-uploader { padding: 10px 14px; background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 4px; }
.cms-board__attach-empty { padding: 12px; color: #6b7280; font-size: 13px; text-align: center; }
.cms-board__notice {
    color: #b45309;
    font-size: 13px;
    padding: 10px 14px;
    background: #fffbeb;
    border-radius: 4px;
    margin: 0;
}
.cms-board__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.cms-board__btn-submit {
    padding: 10px 24px;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.cms-board__btn-submit:hover { background: #1d4ed8; }
.cms-board__btn-cancel {
    padding: 10px 24px;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.cms-board__btn-cancel:hover { background: #f3f4f6; }

/* ============== 15. 댓글 ============== */
.cms-board__comments { margin-top: 32px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.cms-comments__head h3 { font-size: 15px; margin: 0 0 12px; }
.cms-comments__empty { padding: 24px; text-align: center; color: #6b7280; }
.cms-comments__item { padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.cms-comments__item.is-deleted .cms-comments__body { color: #9ca3af; font-style: italic; }
.cms-comments__item.is-pending .cms-comments__meta em { color: #b45309; font-style: normal; }
.cms-comments__meta { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.cms-comments__body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.cms-comments__actions { margin-top: 6px; display: flex; gap: 6px; }
.cms-comments__actions button {
    padding: 4px 8px; font-size: 12px; background: #fff;
    border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer;
}
.cms-comments__form,
.cms-comments__reply,
.cms-comments__edit {
    margin-top: 12px; display: flex; flex-direction: column; gap: 6px;
}
.cms-comments__form textarea,
.cms-comments__reply textarea,
.cms-comments__edit textarea {
    padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 4px; resize: vertical;
}
.cms-comments__anon { display: flex; gap: 6px; }
.cms-comments__anon input { flex: 1; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px; }
.cms-comments__form-actions { display: flex; justify-content: space-between; align-items: center; }
.cms-comments__form-actions button {
    padding: 6px 14px; background: #2563eb; color: #fff; border: 0; border-radius: 4px; cursor: pointer;
}
.cms-comments__reply-wrap { margin-top: 8px; padding-left: 20px; border-left: 2px solid #e5e7eb; }

/* ============== 16. boardType 차별 ============== */
/* NOTICE: 핀 강조, 제목 굵게 */
.cms-board--notice .cms-board__list thead th { border-top-color: #ea580c; }
.cms-board--notice .cms-board__pin { background: #dc2626; }

/* QNA: 답글 들여쓰기 / 비밀글 빈도 */
.cms-board--qna .cms-board__list thead th { border-top-color: #7c3aed; }
.cms-board--qna .cms-board__row[data-parent-id] .td-title { padding-left: 32px; }

/* PRESS: 매체 색 */
.cms-board--press .cms-board__list .td-source { color: #2563eb; font-weight: 500; }
.cms-board--press .cms-board__list thead th { border-top-color: #2563eb; }

/* DATA / DOWNLOAD: 다운로드 컬럼 강조 */
.cms-board--data .cms-board__list .td-down,
.cms-board--download .cms-board__list .td-down {
    color: #0d9488;
    font-weight: 600;
}
.cms-board--download .cms-board__list thead th { border-top-color: #0d9488; }

/* GALLERY: 더 큰 카드 */
.cms-board--gallery .cms-board__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

/* VIDEO: 16:9 thumb + play 배지 */
.cms-board--video .cms-board__card-thumb-wrap { aspect-ratio: 16 / 9; }
.cms-board--video .cms-board__card { background: #0f172a; color: #f3f4f6; }
.cms-board--video .cms-board__card-title { color: #f3f4f6; }
.cms-board--video .cms-board__card-meta { color: #9ca3af; }

/* CARD: 메타 보조색 */
.cms-board--card .cms-board__card { border-color: #d1d5db; }

/* FAQ: 색 변경 */
.cms-board--faq .cms-board__acc-q { background: #7c3aed; }
.cms-board--faq .cms-board__acc-head.is-open { background: #f5f3ff; color: #6d28d9; }
.cms-board--faq .cms-board__acc-head.is-open .cms-board__acc-arrow { color: #7c3aed; }

/* ACCORDION (FAQ 외): 기본 */
.cms-board--accordion .cms-board__acc-q { background: #2563eb; }

/* TIMELINE: 큰 dot */
.cms-board--timeline .cms-board__tl-dot { background: #0d9488; box-shadow: 0 0 0 2px #0d9488; }

/* CALENDAR */
.cms-board--calendar .cms-board__cal-label { color: #2563eb; }

/* ============== 17. 반응형 ============== */
@media (max-width: 768px) {
    .cms-board__toolbar { flex-direction: column; align-items: stretch; }
    .cms-board__search { width: 100%; }
    .cms-board__search-input { width: 100%; flex: 1; }
    .cms-board__btn-write { width: 100%; }

    .cms-board__list .th-no,
    .cms-board__list .th-view,
    .cms-board__list .th-down,
    .cms-board__list tbody .td-no,
    .cms-board__list tbody .td-view,
    .cms-board__list tbody .td-down { display: none; }
    .cms-board__list .th-writer,
    .cms-board__list tbody .td-writer,
    .cms-board__list .th-source,
    .cms-board__list tbody .td-source { display: none; }

    .cms-board__cards,
    .cms-board__grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .cms-board__field {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .cms-board__label { padding-top: 0; }
    .cms-post__title { font-size: 18px; }
    .cms-post__meta { gap: 8px; font-size: 12px; }

    .cms-board__cal-cell { min-height: 56px; }
    .cms-board__calendar { font-size: 11px; }
}

/* ============================================================
   18) listSkin 풀 분기 보강 (CARD large / ACCORDION / CALENDAR grid / AG_GRID)
   ────────────────────────────────────────────────────────────
   runtime.js 의 listSkin 1차 분기 6종에 맞춘 마크업 스타일.
   기존 .cms-board__card·.cms-board__cards·.cms-board__calendar 는 상단(섹션 6~9)에 정의됨.
   */

/* CARD large — listSkin=CARD: 좌 thumb + 우 본문 row */
.cms-board__cards { display: flex; flex-direction: column; gap: 12px; }
.cms-board__lcard { display: block; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;
    background: #fff; transition: box-shadow .15s; }
.cms-board__lcard:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.cms-board__lcard-link { display: flex; gap: 16px; padding: 16px; color: inherit; text-decoration: none; }
.cms-board__lcard-thumb-wrap { flex: 0 0 160px; height: 120px; overflow: hidden; border-radius: 6px;
    background: #f3f4f6; }
.cms-board__lcard-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.cms-board__lcard-thumb--placeholder { width: 100%; height: 100%;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db); }
.cms-board__lcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cms-board__lcard-title { font-size: 16px; font-weight: 600; color: #1f2937;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-board__lcard-excerpt { font-size: 14px; color: #6b7280; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cms-board__lcard-meta { font-size: 12px; color: #9ca3af; margin-top: auto; }

/* ===== 카드/갤러리 가로·세로 방향 — body 컨테이너 modifier (게시판별 card_layout) =====
   세로(VERTICAL): 다중 컬럼 그리드 + 세로 카드(썸네일 상단).
   가로(HORIZONTAL): 단일 컬럼 스택 + 가로 카드(썸네일 좌측).
   하위 선택자는 스킨별(lcard=CARD / card=GALLERY)로 분리되어 상호 간섭 없음. */
.cms-board__layout--vertical {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.cms-board__layout--vertical .cms-board__lcard-link { flex-direction: column; gap: 12px; }
.cms-board__layout--vertical .cms-board__lcard-thumb-wrap { flex: 0 0 auto; width: 100%; height: 160px; }

.cms-board__layout--horizontal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.cms-board__layout--horizontal .cms-board__card { display: block; }
.cms-board__layout--horizontal .cms-board__card-link { display: flex; gap: 16px; align-items: stretch; }
.cms-board__layout--horizontal .cms-board__card-thumb-wrap { flex: 0 0 220px; aspect-ratio: auto; height: 140px; }
.cms-board__layout--horizontal .cms-board__card-body { flex: 1; min-width: 0; }
/* 가로 스택에서 핀(공지) 카드도 풀폭 1줄 */
.cms-board__layout--horizontal .cms-board__card.is-pinned,
.cms-board__layout--vertical .cms-board__lcard.is-pinned { grid-column: 1 / -1; }

/* ACCORDION — listSkin=ACCORDION: 클릭 펼침 row */
.cms-board__items { display: flex; flex-direction: column; gap: 6px; }
.cms-board__acc-item { border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
.cms-board__acc-head { width: 100%; text-align: left; padding: 12px 16px;
    background: none; border: none; cursor: pointer; font-size: 14px; color: #1f2937;
    display: flex; align-items: center; gap: 10px; }
.cms-board__acc-head:hover { background: #f9fafb; }
.cms-board__acc-q { color: #2563eb; font-weight: 700; }
.cms-board__acc-arrow { margin-left: auto; transition: transform .15s; }
.cms-board__acc-item.is-open .cms-board__acc-arrow { transform: rotate(180deg); }
.cms-board__acc-body { padding: 0 16px 14px 36px; color: #4b5563; font-size: 14px; line-height: 1.7;
    border-top: 1px solid #f3f4f6; }

/* CALENDAR grid — listSkin=CALENDAR: 7×6 월 그리드 */
.cms-board__cal-nav { display: flex; align-items: center; justify-content: center; gap: 16px;
    padding: 10px 0; }
.cms-board__cal-prev, .cms-board__cal-next { background: #fff; border: 1px solid #e5e7eb;
    border-radius: 4px; width: 32px; height: 32px; font-size: 16px; cursor: pointer; }
.cms-board__cal-prev:hover, .cms-board__cal-next:hover { background: #f3f4f6; }
.cms-board__cal-label { font-size: 16px; font-weight: 600; color: #1f2937; min-width: 140px; text-align: center; }
.cms-board__calendar.cms-board__cal-grid { display: block; padding: 0; }
.cms-board__cal-head { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb; background: #f9fafb; }
.cms-board__cal-wday { padding: 8px 4px; text-align: center; font-size: 12px; font-weight: 600;
    color: #6b7280; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.cms-board__cal-wday:first-child { color: #dc2626; }
.cms-board__cal-wday:last-child  { color: #2563eb; }
.cms-board__cal-body { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid #e5e7eb; }
.cms-board__cal-cell { min-height: 84px; min-width: 0; padding: 4px 6px; border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 2px; }
.cms-board__cal-item { display: block; max-width: 100%; }
.cms-board__cal-cell--empty { background: #f9fafb; }
.cms-board__cal-day { font-size: 12px; color: #6b7280; font-weight: 600; }
.cms-board__cal-item { font-size: 12px; color: #2563eb; text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 3px;
    background: #eff6ff; border-radius: 3px; }
.cms-board__cal-item:hover { background: #dbeafe; }

/* AG_GRID — listSkin=AG_GRID: ag-grid mount div. height/width 는 인라인 + theme. 외부 paging 유지. */
.cms-board__ag { height: 600px; width: 100%; }
.cms-board__ag .ag-header-cell-label { justify-content: center; }
