/* /cs/board 목록 전용 안정화 */
html,
body {
    overflow-x: hidden !important;
}

html.kv-cs-board-list-page table,
body.kv-cs-board-list-page table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

html.kv-cs-board-list-page table tbody tr,
body.kv-cs-board-list-page table tbody tr {
    height: 85px !important;
    min-height: 85px !important;
}

html.kv-cs-board-list-page table th,
html.kv-cs-board-list-page table td,
body.kv-cs-board-list-page table th,
body.kv-cs-board-list-page table td {
    box-sizing: border-box !important;
    vertical-align: middle !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: 1.28 !important;
    overflow: hidden !important;
}

/* 선택 */
html.kv-cs-board-list-page table th:nth-child(1),
html.kv-cs-board-list-page table td:nth-child(1),
body.kv-cs-board-list-page table th:nth-child(1),
body.kv-cs-board-list-page table td:nth-child(1) {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    text-align: center !important;
}

/* 번호 */
html.kv-cs-board-list-page table th:nth-child(2),
html.kv-cs-board-list-page table td:nth-child(2),
body.kv-cs-board-list-page table th:nth-child(2),
body.kv-cs-board-list-page table td:nth-child(2) {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* 분류 */
html.kv-cs-board-list-page table th:nth-child(3),
html.kv-cs-board-list-page table td:nth-child(3),
body.kv-cs-board-list-page table th:nth-child(3),
body.kv-cs-board-list-page table td:nth-child(3) {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* 제목 */
html.kv-cs-board-list-page table th:nth-child(4),
html.kv-cs-board-list-page table td:nth-child(4),
body.kv-cs-board-list-page table th:nth-child(4),
body.kv-cs-board-list-page table td:nth-child(4) {
    width: auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: normal !important;
}

/* 글쓴이 */
html.kv-cs-board-list-page table th:nth-child(5),
html.kv-cs-board-list-page table td:nth-child(5),
body.kv-cs-board-list-page table th:nth-child(5),
body.kv-cs-board-list-page table td:nth-child(5) {
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    text-align: center !important;
}

/* AI상태 */
html.kv-cs-board-list-page table th:nth-child(6),
html.kv-cs-board-list-page table td:nth-child(6),
body.kv-cs-board-list-page table th:nth-child(6),
body.kv-cs-board-list-page table td:nth-child(6) {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    text-align: center !important;
}

/* 중요도 */
html.kv-cs-board-list-page table th:nth-child(7),
html.kv-cs-board-list-page table td:nth-child(7),
body.kv-cs-board-list-page table th:nth-child(7),
body.kv-cs-board-list-page table td:nth-child(7) {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    text-align: center !important;
}

/* 날짜 */
html.kv-cs-board-list-page table th:nth-child(8),
html.kv-cs-board-list-page table td:nth-child(8),
body.kv-cs-board-list-page table th:nth-child(8),
body.kv-cs-board-list-page table td:nth-child(8) {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    text-align: center !important;
    white-space: normal !important;
}

/* 작업: 원문만 */
html.kv-cs-board-list-page table th:nth-child(9),
html.kv-cs-board-list-page table td:nth-child(9),
body.kv-cs-board-list-page table th:nth-child(9),
body.kv-cs-board-list-page table td:nth-child(9) {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    text-align: center !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

html.kv-cs-board-list-page table td:nth-child(9) a,
html.kv-cs-board-list-page table td:nth-child(9) button,
body.kv-cs-board-list-page table td:nth-child(9) a,
body.kv-cs-board-list-page table td:nth-child(9) button {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2px auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
}

/* 미리보기 */
.kv-list-preview {
    display: block !important;
    margin-top: 4px !important;
    max-width: 100% !important;
    max-height: 18px !important;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 사진/관련사진 */
.kv-list-image-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 6px !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border: 1px solid #93c5fd !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

.kv-list-image-icon-related {
    background: #fff7ed !important;
    color: #c2410c !important;
    border-color: #fdba74 !important;
}

/* 글쓴이: 그린 파스텔 버튼 */
.kv-writer-search-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 132px !important;
    min-height: 24px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    border: 1px solid #86efac !important;
    background: #dcfce7 !important;
    color: #166534 !important;
    border-radius: 999px !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}

.kv-writer-search-btn:hover {
    background: #bbf7d0 !important;
}

.kv-board-detail-clickable {
    cursor: pointer !important;
}

/* 게시판 목록 컬럼 폭 보정: 분류 넓히고 제목 줄이기 */
#boardListTable,
.board-list table,
.kv-board-list table,
table.board-list-table {
    table-layout: fixed;
}

/* 선택 */
#boardListTable th:nth-child(1),
#boardListTable td:nth-child(1),
.board-list table th:nth-child(1),
.board-list table td:nth-child(1),
.kv-board-list table th:nth-child(1),
.kv-board-list table td:nth-child(1),
table.board-list-table th:nth-child(1),
table.board-list-table td:nth-child(1) {
    width: 42px !important;
}

/* 번호 */
#boardListTable th:nth-child(2),
#boardListTable td:nth-child(2),
.board-list table th:nth-child(2),
.board-list table td:nth-child(2),
.kv-board-list table th:nth-child(2),
.kv-board-list table td:nth-child(2),
table.board-list-table th:nth-child(2),
table.board-list-table td:nth-child(2) {
    width: 68px !important;
}

/* 분류: [불량&오배송] 안 짤리게 확대 */
#boardListTable th:nth-child(3),
#boardListTable td:nth-child(3),
.board-list table th:nth-child(3),
.board-list table td:nth-child(3),
.kv-board-list table th:nth-child(3),
.kv-board-list table td:nth-child(3),
table.board-list-table th:nth-child(3),
table.board-list-table td:nth-child(3) {
    width: 118px !important;
    min-width: 118px !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

/* 제목: 분류 늘린 만큼 살짝 축소 */
#boardListTable th:nth-child(4),
#boardListTable td:nth-child(4),
.board-list table th:nth-child(4),
.board-list table td:nth-child(4),
.kv-board-list table th:nth-child(4),
.kv-board-list table td:nth-child(4),
table.board-list-table th:nth-child(4),
table.board-list-table td:nth-child(4) {
    width: auto !important;
}

/* 글쓴이 */
#boardListTable th:nth-child(5),
#boardListTable td:nth-child(5),
.board-list table th:nth-child(5),
.board-list table td:nth-child(5),
.kv-board-list table th:nth-child(5),
.kv-board-list table td:nth-child(5),
table.board-list-table th:nth-child(5),
table.board-list-table td:nth-child(5) {
    width: 120px !important;
}

/* AI상태 */
#boardListTable th:nth-child(6),
#boardListTable td:nth-child(6),
.board-list table th:nth-child(6),
.board-list table td:nth-child(6),
.kv-board-list table th:nth-child(6),
.kv-board-list table td:nth-child(6),
table.board-list-table th:nth-child(6),
table.board-list-table td:nth-child(6) {
    width: 90px !important;
}

/* 중요도 */
#boardListTable th:nth-child(7),
#boardListTable td:nth-child(7),
.board-list table th:nth-child(7),
.board-list table td:nth-child(7),
.kv-board-list table th:nth-child(7),
.kv-board-list table td:nth-child(7),
table.board-list-table th:nth-child(7),
table.board-list-table td:nth-child(7) {
    width: 86px !important;
}

/* 날짜 */
#boardListTable th:nth-child(8),
#boardListTable td:nth-child(8),
.board-list table th:nth-child(8),
.board-list table td:nth-child(8),
.kv-board-list table th:nth-child(8),
.kv-board-list table td:nth-child(8),
table.board-list-table th:nth-child(8),
table.board-list-table td:nth-child(8) {
    width: 76px !important;
}

/* 작업 */
#boardListTable th:nth-child(9),
#boardListTable td:nth-child(9),
.board-list table th:nth-child(9),
.board-list table td:nth-child(9),
.kv-board-list table th:nth-child(9),
.kv-board-list table td:nth-child(9),
table.board-list-table th:nth-child(9),
table.board-list-table td:nth-child(9) {
    width: 68px !important;
}

/* 게시판 목록 분류 컬럼 138px 최종 보정 */
#boardListTable th:nth-child(3),
#boardListTable td:nth-child(3),
.board-list table th:nth-child(3),
.board-list table td:nth-child(3),
.kv-board-list table th:nth-child(3),
.kv-board-list table td:nth-child(3),
table.board-list-table th:nth-child(3),
table.board-list-table td:nth-child(3),
#boardTable th:nth-child(3),
#boardTable td:nth-child(3),
table th:nth-child(3).board-category,
table td:nth-child(3).board-category {
    width: 138px !important;
    min-width: 138px !important;
    max-width: 138px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* 제목 컬럼은 분류가 늘어난 만큼 줄임 */
#boardListTable th:nth-child(4),
#boardListTable td:nth-child(4),
.board-list table th:nth-child(4),
.board-list table td:nth-child(4),
.kv-board-list table th:nth-child(4),
.kv-board-list table td:nth-child(4),
table.board-list-table th:nth-child(4),
table.board-list-table td:nth-child(4),
#boardTable th:nth-child(4),
#boardTable td:nth-child(4) {
    width: calc(100% - 710px) !important;
    max-width: calc(100% - 710px) !important;
}

/* 제목 내부 텍스트가 너무 밀릴 때 줄바꿈 허용 */
#boardListTable td:nth-child(4),
.board-list table td:nth-child(4),
.kv-board-list table td:nth-child(4),
table.board-list-table td:nth-child(4),
#boardTable td:nth-child(4) {
    overflow: hidden !important;
}

/* kv-comment-count-badge: 댓글 수 배지 */
.kv-comment-count-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  margin-left: 4px !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
  background: #4f7dcc !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
}

/* === kv-comment-count-badge-final === */
.kv-board-list-page .kv-comment-count-badge,
.kv-board-card .kv-comment-count-badge,
.kv-list-title-line .kv-comment-count-badge,
.board-title-cell .kv-comment-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    margin-left: 4px !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    background: #4f7dcc !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
}

/* === kv-comment-count-badge-size-final: 전체탭과 비슷한 작은 크기 === */
.kv-comment-count-badge,
.kv-list-title-line .kv-comment-count-badge,
.board-title-cell .kv-comment-count-badge,
.kv-board-list-page .kv-comment-count-badge,
.kv-board-card .kv-comment-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    margin-left: 4px !important;
    padding: 1px 5px !important;
    border-radius: 999px !important;
    background: #4f7dcc !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

/* === kv-comment-count-badge-width-fix: 세로 복구 + 가로폭만 축소 === */
.kv-comment-count-badge,
.kv-list-title-line .kv-comment-count-badge,
.board-title-cell .kv-comment-count-badge,
.kv-board-list-page .kv-comment-count-badge,
.kv-board-card .kv-comment-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: fit-content !important;
    inline-size: fit-content !important;
    min-width: unset !important;
    min-inline-size: unset !important;
    max-width: fit-content !important;
    max-inline-size: fit-content !important;

    height: auto !important;
    min-height: unset !important;
    flex: none !important;
    white-space: nowrap !important;

    margin-left: 4px !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    background: #4f7dcc !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

/* === kv-comment-count-badge-circle-final: 댓글 수 정원형 배지 === */
.kv-comment-count-badge,
.kv-list-title-line .kv-comment-count-badge,
.board-title-cell .kv-comment-count-badge,
.kv-board-list-page .kv-comment-count-badge,
.kv-board-card .kv-comment-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;

    padding: 0 !important;
    margin-left: 5px !important;

    border-radius: 50% !important;
    background: #4f7dcc !important;
    color: #fff !important;

    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    flex: 0 0 20px !important;
}
