@charset "UTF-8";
/**
 * =====================================================
 * 파일명: modules/board/assets/css/board.css
 * 역할:   board 모듈 기반 일반 게시판(/notice 등) 외형 스타일
 *
 * 연동:
 *   - board.render.php 가 출력하는 클래스 (.board-list-wrap / .board-card /
 *     .board-post / .post-reaction-bar / .comment-* 등)
 *   - notice/index.php · write.php · edit.php 의 폼 (.board-form / .form-* / .btn-*)
 *
 * 테마: theme.css 변수(--bg/--surface/--text/--muted/--blade/--line/--border ...)
 *       사용 → 라이트/다크 자동 대응
 * 주의: 외형 전용. 기능/로직과 무관 (JS·PHP 동작에 영향 없음)
 *
 * 버전: v1.0 (2026-05-31) — STEP 6-⑥
 * =====================================================
 */

/* ── [공통] 페이지 래퍼 ───────────────────────────── */
.board-page {
	max-width: 1100px;   /* [11] 사이트 표준 폭(760→1100 통일). 개별 wrapper 인라인 있으면 우선(team=100% 등). feed형(.feed-page)은 별도. */
	margin: 0 auto;
	padding: 18px 16px 40px;
	color: var(--text, #10233a);
	box-sizing: border-box;
}
.board-page * {
	box-sizing: border-box;
}

/* ── [목록] 헤더 (제목 + 글쓰기) ──────────────────── */
.board-list-wrap .board-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 12px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--line, rgba(21,92,151,0.14));
}
.board-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--text, #10233a);
}
.btn-write {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: var(--radius-sm, 12px);
	background: var(--blade, #1ea7ff);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity .15s, transform .15s;
}
.btn-write:hover {
	opacity: .9;
	transform: translateY(-1px);
}

/* ── [목록] 카드 ─────────────────────────────────── */
.board-card-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
/* [STEP5-3g] 자료실 목록은 카드 간격 넓게(:has로 자료실 목록만 — feed 등 무영향) */
.board-card-list:has(.board-card--library) { gap: 18px; }
/* [STEP5-4x] 전 게시판 쓰기=fc-page 2단: 폼 내부 취소/등록 버튼 숨김(사이드바가 제출 담당, 숨은 .btn-submit JS로 클릭). rich=.board-form-actions / simple=.form-actions */
/* !important = rich 는 후순위 `.board-form .form-actions{display:flex}`(L519), simple 은 인라인 style="display:flex"(write.php) 를 모두 제압. 숨은 .btn-submit 은 display:none 이어도 JS .click() 제출 정상. */
.fc-main-card-body .board-form-actions,
.fc-main-card-body .form-actions { display: none !important; }
.fc-main-card-body #bw-existing-atts { margin-top: 6px; }
/* [7b-1d] 첨부 목록 통합 pill — 행 맨 왼쪽(::before). 기존=회색 / 추가됨=파랑(수정 모드만). media.js 재렌더에도 유지되도록 순수 CSS. */
#bw-existing-atts .fc-file-item::before,
.fc-main-card-body.bw-edit #bw-media-module-file-list .fc-file-item::before {
	flex: 0 0 auto; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 999px;
}
#bw-existing-atts .fc-file-item::before { content: '기존'; background: rgba(120,140,170,.18); color: #8a94a6; }
.fc-main-card-body.bw-edit #bw-media-module-file-list .fc-file-item::before { content: '추가됨'; background: rgba(52,180,255,.16); color: #34b4ff; }
/* [7b-1d-m] 모바일(≤767px) 첨부 항목 2줄 — 1줄: 아이콘+파일명(전체폭·ellipsis) / 2줄: pill·크기·×(우측정렬). × 터치영역 36px.
   board 쓰기 전용 스코프(#bw-existing-atts / #bw-media-module-file-list)라 feed·media.js 무영향. */
@media (max-width: 767px) {
	/* justify-content:flex-end = 2줄(pill·크기·×)을 오른쪽 끝 정렬. 1줄은 이름 flex-grow 로 좌측 유지(영향 없음). */
	#bw-existing-atts .fc-file-item,
	#bw-media-module-file-list .fc-file-item { flex-wrap: wrap; row-gap: 4px; justify-content: flex-end; }
	#bw-existing-atts .fc-file-item .fc-file-ic,
	#bw-media-module-file-list .fc-file-item .fc-file-ic { order: 1; }
	#bw-existing-atts .fc-file-item .fc-file-name,
	#bw-media-module-file-list .fc-file-item .fc-file-name { order: 2; flex: 1 1 calc(100% - 32px); }   /* 아이콘+이름=1줄 전체폭 → 나머지 2줄로 */
	#bw-existing-atts .fc-file-item::before,
	#bw-media-module-file-list .fc-file-item::before { order: 3; }   /* pill = 2줄 첫 항목(우측정렬은 컨테이너 justify-content) */
	#bw-existing-atts .fc-file-item .fc-file-size,
	#bw-media-module-file-list .fc-file-item .fc-file-size { order: 4; }
	#bw-existing-atts .fc-file-item .fc-file-del,
	#bw-media-module-file-list .fc-file-item .fc-file-del { order: 5; min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
}
/* [fix6] fc-page 쓰기 모바일 하단 고정 등록바 — 사이트 모바일 경계(619.98px) 정렬 + safe-area.
   하단바 스타일(.fc-mobile-bar/-back/-submit)은 feed-create.css @767 재사용(원본 미변경). board.css=board 페이지 전용 로드 → feed 무영향.
   feed-create 는 767 에서 사이드바를 접지만, board 쓰기는 사이트 표준 620 경계 사용 → 아래 두 미디어쿼리로 재정렬. .page-body 스코프=feed-create 동일 특정도(.fc-page) 제압. */
@media (min-width: 620px) {
	/* 620~767: 아직 PC=2단 유지. feed-create @767 은 (세로쌓기+사이드바숨김)을 함께 하므로 둘 다 되돌려야 함(특정도 0-2-0 > 0-1-0). */
	.fc-page .fc-body { flex-direction: row; }                        /* 세로쌓기 취소 → 2단 복원 */
	.fc-page .fc-col--left { display: block; }                        /* 사이드바 숨김 취소 */
	.fc-page .fc-col--right { width: auto; flex: 1; min-width: 0; }   /* 우측 100%→flex(2단 폭 복원) */
	.fc-page .fc-mobile-bar { display: none; }                        /* 하단바는 ≤619.98 에서만 노출 */
}
@media (max-width: 619.98px) {
	.page-body .fc-page { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }   /* 본문/업로드가 하단바에 가리지 않도록 여백 + safe-area */
	.fc-page .fc-mobile-bar { height: auto; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }   /* 하단바 자체도 safe-area 만큼 아래 여백 */
}
.board-card {
	border: 1px solid var(--line, rgba(21,92,151,0.14));
	border-radius: var(--radius-md, 16px);
	background: var(--surface, rgba(255,255,255,0.76));
	box-shadow: var(--shadow, 0 8px 24px rgba(17,50,78,0.08));
	transition: border-color .15s, transform .15s;
}
.board-card:hover {
	border-color: var(--blade, #1ea7ff);
	transform: translateY(-2px);
}
.board-card.pinned {
	border-color: var(--accent, #ff7a3d);
}
.board-card .card-link {
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	text-decoration: none;
	color: inherit;
}
.card-thumb-area {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-sm, 12px);
	background: var(--surface--m, rgba(0,0,0,0.06));
	display: flex;
	align-items: center;
	justify-content: center;
}
.card-media-badge {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted, #6f8598);
}
.card-body {
	flex: 1;
	min-width: 0;
}
.pin-badge {
	display: inline-block;
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--accent, #ff7a3d);
}
.card-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	color: var(--text, #10233a);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.card-preview {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted, #6f8598);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--muted, #6f8598);
}
.card-meta .card-author {
	font-weight: 600;
	color: var(--text, #10233a);
}
.board-empty {
	padding: 60px 16px;
	text-align: center;
	font-size: 14px;
	color: var(--muted, #6f8598);
}

/* ── [목록] 페이지네이션 ──────────────────────────── */
.board-pagination {
	margin-top: 18px;
}
.board-pagination .page-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	gap: 4px;
}
.board-pagination .page-list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--line, rgba(21,92,151,0.14));
	border-radius: 8px;
	font-size: 13px;
	text-decoration: none;
	color: var(--text, #10233a);
	transition: background .15s, border-color .15s;
}
.board-pagination .page-list a:hover {
	border-color: var(--blade, #1ea7ff);
}
.board-pagination .page-num.active {
	background: var(--blade, #1ea7ff);
	border-color: var(--blade, #1ea7ff);
	color: #fff;
	font-weight: 700;
}

/* ── [상세] 본문 ─────────────────────────────────── */
.board-post {
	border: 1px solid var(--line, rgba(21,92,151,0.14));
	border-radius: var(--radius-md, 16px);
	background: var(--surface, rgba(255,255,255,0.76));
	padding: 18px 18px 14px;
}
.post-author {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 12px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--line, rgba(21,92,151,0.12));
}
.author-avatar,
.author-avatar-placeholder {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	flex-shrink: 0;
	object-fit: cover;
	background: var(--surface--m, rgba(0,0,0,0.08));
}
.author-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.author-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--text, #10233a);
}
.post-date {
	font-size: 12px;
	color: var(--muted, #6f8598);
}
.post-edited {
	margin-left: 6px;
	font-size: 11px;
	color: var(--muted, #6f8598);
}
.post-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}
.post-title {
	margin: 0 0 10px;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--text, #10233a);
}
.post-body {
	font-size: 15px;
	line-height: 1.75;
	color: var(--text, #10233a);
	word-break: break-word;
	white-space: normal;
}
.post-media {
	margin-top: 14px;
}

/* ── [상세] 수정/삭제 버튼 (작성자·관리자) ─────────── */
.btn-edit,
.btn-delete {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	background: transparent;
	color: var(--text, #10233a);
	transition: background .15s, border-color .15s, color .15s;
}
.btn-edit:hover {
	border-color: var(--blade, #1ea7ff);
	color: var(--blade, #1ea7ff);
}
.btn-delete:hover {
	border-color: var(--accent-settling, #e05a5a);
	color: var(--accent-settling, #e05a5a);
}

/* ── [상세] 반응 바 (좋아요/댓글수/조회수/북마크/신고) ── */
.post-reaction-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--line, rgba(21,92,151,0.12));
}
.post-reaction-bar .btn-like,
.post-reaction-bar .btn-bookmark,
.post-reaction-bar .btn-report {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 13px;
	border-radius: 20px;
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	background: transparent;
	color: var(--text, #10233a);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
.post-reaction-bar .btn-like:hover,
.post-reaction-bar .btn-bookmark:hover {
	border-color: var(--blade, #1ea7ff);
	color: var(--blade, #1ea7ff);
}
.post-reaction-bar .btn-like.liked {
	border-color: #ff5a7a;
	color: #ff5a7a;
	background: rgba(255,90,122,0.08);
}
.post-reaction-bar .btn-bookmark.bookmarked {
	border-color: var(--blade, #1ea7ff);
	color: var(--blade, #1ea7ff);
	background: rgba(30,167,255,0.08);
}
.post-reaction-bar .btn-report:hover {
	border-color: var(--accent-settling, #e05a5a);
	color: var(--accent-settling, #e05a5a);
}
/* [STEP4-B] 이미 신고한 글 = 빨강 깃발(재신고 사전 차단 시각표시). board 전용(is-reported 는 board-detail.js 만 부여). */
.feed-action-btn.btn-report.is-reported,
.post-reaction-bar .btn-report.is-reported { color: #ef4444; }
.post-reaction-bar .comment-count-badge,
.post-reaction-bar .view-count {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: var(--muted, #6f8598);
}

/* ── [댓글] 영역 ─────────────────────────────────── */
.board-comments {
	margin-top: 22px;
}
.comments-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	color: var(--text, #10233a);
}
.comment-empty {
	padding: 18px 4px;
	font-size: 13px;
	color: var(--muted, #6f8598);
}
.comment-list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.comment-item {
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line, rgba(21,92,151,0.1));
}
.comment-author {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 5px;
}
.comment-avatar,
.comment-avatar-placeholder {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	flex-shrink: 0;
	object-fit: cover;
	background: var(--surface--m, rgba(0,0,0,0.08));
}
.comment-author-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--text, #10233a);
}
.comment-date {
	font-size: 11px;
	color: var(--muted, #6f8598);
}
.btn-comment-delete {
	margin-left: auto;
	padding: 3px 9px;
	border-radius: 6px;
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	background: transparent;
	color: var(--muted, #6f8598);
	font-size: 11px;
	cursor: pointer;
	transition: border-color .15s, color .15s;
}
.btn-comment-delete:hover {
	border-color: var(--accent-settling, #e05a5a);
	color: var(--accent-settling, #e05a5a);
}
.comment-body {
	font-size: 14px;
	line-height: 1.6;
	color: var(--text, #10233a);
	word-break: break-word;
	padding-left: 34px;
}

/* ── [댓글] 입력 폼 ───────────────────────────────── */
.comment-form-wrap {
	margin-top: 6px;
}
.comment-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px;
}
.comment-form .comment-input {
	flex: 1;
	min-width: 200px;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	border-radius: var(--radius-sm, 12px);
	background: var(--surface-strong, #fff);
	color: var(--text, #10233a);
	font-size: 14px;
	line-height: 1.5;
	resize: vertical;
}
.comment-form .comment-input:focus {
	outline: none;
	border-color: var(--blade, #1ea7ff);
}
.comment-form .anon-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: var(--muted, #6f8598);
	white-space: nowrap;
}
.btn-comment-submit {
	flex-shrink: 0;
	padding: 10px 18px;
	border: none;
	border-radius: var(--radius-sm, 12px);
	background: var(--blade, #1ea7ff);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s;
}
.btn-comment-submit:hover {
	opacity: .9;
}
.btn-comment-submit:disabled {
	opacity: .5;
	cursor: default;
}
.comment-login-required {
	padding: 14px;
	font-size: 13px;
	color: var(--muted, #6f8598);
	text-align: center;
	border: 1px dashed var(--line, rgba(21,92,151,0.2));
	border-radius: var(--radius-sm, 12px);
}
.comment-login-required a {
	color: var(--blade, #1ea7ff);
	font-weight: 600;
}

/* ── [작성/수정] 폼 (notice/write.php · edit.php) ───── */
.board-write-page .board-title,
.board-edit-page .board-title {
	margin-bottom: 14px;
}
.board-form .form-row {
	margin-bottom: 10px;
}
.board-form .form-input,
.board-form .form-textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	border-radius: var(--radius-sm, 12px);
	background: var(--surface-strong, #fff);
	color: var(--text, #10233a);
	font-size: 15px;
	line-height: 1.6;
}
.board-form .form-textarea {
	resize: vertical;
	min-height: 240px;
}
.board-form .form-input:focus,
.board-form .form-textarea:focus {
	outline: none;
	border-color: var(--blade, #1ea7ff);
}
.board-form .form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 14px;
}
.board-form .btn-cancel,
.board-form .btn-submit {
	display: inline-flex;
	align-items: center;
	padding: 10px 20px;
	border-radius: var(--radius-sm, 12px);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.board-form .btn-cancel {
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	background: transparent;
	color: var(--muted, #6f8598);
}
.board-form .btn-cancel:hover {
	border-color: var(--text, #10233a);
	color: var(--text, #10233a);
}
.board-form .btn-submit {
	border: none;
	background: var(--blade, #1ea7ff);
	color: #fff;
}
.board-form .btn-submit:hover {
	opacity: .9;
}
.board-form .btn-submit:disabled {
	opacity: .5;
	cursor: default;
}

/* ── [상세] 하단 목록 버튼 ────────────────────────── */
.board-detail-foot {
	margin-top: 18px;
}
.btn-list {
	display: inline-flex;
	align-items: center;
	padding: 9px 16px;
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	border-radius: var(--radius-sm, 12px);
	font-size: 14px;
	color: var(--text, #10233a);
	text-decoration: none;
	transition: border-color .15s, color .15s;
}
.btn-list:hover {
	border-color: var(--blade, #1ea7ff);
	color: var(--blade, #1ea7ff);
}

/* ── [자료실형] 첨부파일 다운로드 목록 (render_board_attachment_list, [5] 중간안) ── */
.board-attachments {
	margin: 16px 0 4px;
}
.board-attachments .attach-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--muted, #5a6b80);
	margin: 0 0 8px;
}
.board-attachments .attach-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--line, rgba(21,92,151,0.2));
	border-radius: var(--radius-sm, 12px);
	overflow: hidden;
}
.board-attachments .attach-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-top: 1px solid var(--line, rgba(21,92,151,0.12));
}
.board-attachments .attach-item:first-child {
	border-top: 0;
}
.board-attachments .attach-icon {
	flex: 0 0 auto;
	font-size: 16px;
}
.board-attachments .attach-type {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--muted, #5a6b80);
}
.board-attachments .attach-name {
	color: var(--text, #10233a);
	text-decoration: none;
	word-break: break-all;
	transition: color .15s;
}
.board-attachments a.attach-name:hover {
	color: var(--blade, #1ea7ff);
	text-decoration: underline;
}
.board-attachments .attach-name--disabled {
	color: var(--muted, #8a97a8);
	cursor: default;
}
.board-attachments .attach-note {
	font-size: 12px;
	color: var(--muted, #8a97a8);
}

/* ── [자료실형] 목록 카드 첨부 요약 라인 (board_render_post_card, [5] STEP3) ── */
.board-card .card-attach-line {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--muted, #5a6b80);
	min-width: 0;
}
.board-card .card-attach-ic {
	flex: 0 0 auto;
}
.board-card .card-attach-fn {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--text, #10233a);
}
.board-card .card-attach-ty,
.board-card .card-attach-more {
	flex: 0 0 auto;
	color: var(--muted, #8a97a8);
}

/* [14] 자료실형 첨부 다운로드 링크 (카드 링크 바깥 — board.render.php board_render_post_card) */
.board-card .card-attach-files {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 14px 12px;
	border-top: 1px solid var(--line, rgba(120,140,170,.15));
}
.board-card .card-attach-dl {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--blade, #4a90d9);
	text-decoration: none;
	min-width: 0;
}
.board-card .card-attach-dl:hover {
	text-decoration: underline;
}
.board-card .card-attach-dl .card-attach-sz {
	flex: 0 0 auto;
	color: var(--muted, #8a97a8);
	font-size: 12px;
}

/* ── [14] 자료실형(detail=none) 카드 — 클릭 불가 · 팀 자료실 스타일 파일 리스트 ── */
.board-card--library {
	cursor: default;
	padding: 16px;   /* [STEP5-3f] 카드 내부 여백 일원화(옛 .lib-entry 제거분 보정) */
	border-color: rgba(130,150,180,.30);   /* [fix5] 다크 배경에서 카드가 묻히지 않도록 경계 한 단계 명확(--line .14 → .30). library 스코프=feed/일반 board 무영향. shadow는 기존 유지(과다 금지). */
}
.board-card--library .lib-entry-desc {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--muted, #5a6b80);
	line-height: 1.5;
	white-space: pre-wrap;    /* [fix2] 입력한 줄바꿈·연속공백을 쓴 대로 표시(pre 아님=모바일 가로넘침 방지) */
	word-break: break-word;   /* 긴 URL/단어가 카드 밖으로 넘치지 않도록 줄바꿈 */
}
/* 헤더 라인: 좌 작성자·날짜 / 우 수정 — 아래 내용과 border 구분 */
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 0 0 10px; margin: 0 0 12px; border-bottom: 1px solid var(--line, rgba(140,150,170,.22)); }
.lib-head-by { font-size: 13px; color: var(--muted, #8a97a8); }
.lib-head-by strong { font-weight: 700; color: var(--text, #46586e); }
.lib-head-edit { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--blade, #53b8ff);
	text-decoration: none; padding: 2px 9px; border: 1px solid var(--line, rgba(140,150,170,.3)); border-radius: 6px; }
.lib-head-edit:hover { background: rgba(120,165,225,.12); }

/* [STEP5-3e] 섹션 라벨 (시각 자료 (N) / 문서 (N)) + 우측 좌우버튼 */
.lib-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 6px; }
.lib-sec-head:first-of-type { margin-top: 2px; }
.lib-sec-title { font-size: 12.5px; font-weight: 700; color: var(--text, #46586e); }
.lib-sec-title em { font-style: normal; font-weight: 600; color: var(--muted, #8a97a8); }
.lib-car-nav { display: inline-flex; gap: 6px; }
.lib-vis-sec.no-scroll .lib-car-nav { display: none; }   /* 안 넘치면 좌우 버튼 숨김 */
.lib-car-btn { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line, rgba(140,150,170,.3));
	background: var(--surface, rgba(255,255,255,.04)); color: var(--text, #46586e); cursor: pointer; font-size: 11px;
	display: flex; align-items: center; justify-content: center; }
.lib-car-btn:hover { border-color: var(--blade, #53b8ff); color: var(--blade, #53b8ff); }
/* 가로 스크롤 트랙(썸네일) — 줄바꿈 대신 좌우 스크롤 */
.lib-car-track { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: thin; padding: 1px 0 8px; }
.lib-car-track::-webkit-scrollbar { height: 6px; }
.lib-car-track::-webkit-scrollbar-thumb { background: rgba(140,150,170,.4); border-radius: 3px; }
.lib-media-cell { flex: 0 0 auto; }
.lib-media-thumb { position: relative; width: 132px; height: 90px; border-radius: 8px; overflow: hidden; background: rgba(140,150,170,.14); }
.lib-media-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-media-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #8a94a6; font-size: 22px; }
/* 썸네일 하단 바: 좌=유형 뱃지 / 우=액션 (모든 아이콘 24px 통일) */
.lib-media-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between;
	gap: 4px; padding: 5px 6px; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); }
.lib-media-acts { display: inline-flex; gap: 4px; }
.lib-media-badge { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; flex: 0 0 auto; pointer-events: none;
	display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.92); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.lib-media-badge--image { color: #3b82f6; }
.lib-media-badge--video { color: #8b5cf6; }
.lib-media-badge--youtube { color: #ff0000; }
.lib-ov-btn { width: 24px; height: 24px; border-radius: 6px; border: none; background: rgba(15,22,35,.6); color: #fff;
	display: inline-flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; text-decoration: none; }
.lib-ov-btn:hover { background: var(--blade, #53b8ff); }
.lib-ov-btn.ok { background: rgba(34,197,94,.95); }
/* 초소형(≤380px) — 썸네일·버튼 축소 */
@media (max-width: 380px) {
	.lib-media-thumb { width: 116px; height: 80px; }
	.lib-ov-btn { width: 22px; height: 22px; }
}
/* [14/③ STEP5-3] 자료 뷰어 모달 (이미지 확대/영상·유튜브 재생/PDF 보기 — 새 창 아님) */
.lib-modal { position: fixed; inset: 0; z-index: 9998; display: none; }
.lib-modal.on { display: block; }
.lib-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.82); }
.lib-modal-box { position: absolute; inset: 3vh 3vw; display: flex; align-items: center; justify-content: center; }
.lib-modal-close { position: absolute; top: -6px; right: -6px; width: 42px; height: 42px; border-radius: 50%; border: none;
	background: rgba(20,28,40,.92); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; }
.lib-modal-close:hover { background: #e5484d; }
.lib-modal-body { max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; }
.lib-modal-img { max-width: 96vw; max-height: 94vh; object-fit: contain; border-radius: 4px; }
.lib-modal-media { max-width: 96vw; max-height: 94vh; background: #000; border-radius: 4px; }
.lib-modal-embed { width: min(94vw, 1000px); height: 94vh; }
.lib-modal-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; }

/* 파일 리스트 */
/* [STEP5-3b] 문서(PDF/일반파일) = 2열 그리드 */
.lib-file-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	padding: 0;
}
/* 사이트 모바일 경계(619.98px) 미만 = 문서 1열 (해상도 따라 2열→1열) */
@media (max-width: 619.98px) { .lib-file-grid { grid-template-columns: 1fr; } }
.lib-file {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid rgba(130,150,180,.18);   /* [fix5] 문서 박스 경계 추가 — 카드 배경과 구분(기존=테두리 없이 배경 0.06 만이라 묻힘) */
	background: rgba(120,140,170,.06);
	min-width: 0;   /* 그리드 셀 축소 허용 → 긴 파일명 … 말줄임 */
}
.lib-file:hover { background: rgba(120,150,200,.12); }
.lib-file-ic {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 17px;
	background: rgba(120,140,170,.14);
	color: #7a8aa0;
}
.lib-file-ic.ic-pdf { color: #e2574c; }
.lib-file-ic.ic-xls { color: #1f9e5e; }
.lib-file-ic.ic-doc { color: #2b7cd3; }
.lib-file-ic.ic-ppt { color: #d24726; }
.lib-file-ic.ic-zip { color: #b08a3e; }
.lib-file-ic.ic-img { color: #6b8fb5; }
.lib-file-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.lib-file-name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--text, #10233a);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.lib-file-sub {
	font-size: 12px;
	color: var(--muted, #8a97a8);
}
.lib-file-actions {
	flex: 0 0 auto;
	display: flex;
	gap: 4px;
}
.lib-file-del,
.lib-file-btn {
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	border: none;
	background: rgba(120,140,170,.12);
	color: #5a6b80;
	cursor: pointer;
	font-size: 14px;
	text-decoration: none;
}
.lib-file-btn:hover { background: var(--bladeL, rgba(74,144,217,.18)); color: var(--blade, #4a90d9); }
.lib-file-del:hover { background: rgba(226,87,76,.16); color: #e2574c; }
.lib-file-empty {
	padding: 12px 16px 16px;
	font-size: 13px;
	color: var(--muted, #8a97a8);
}

/* ── [반응형] 모바일 (≤ 680px) ───────────────────── */
@media (max-width: 680px) {
	.board-page {
		padding: 14px 12px 32px;
	}
	.post-title {
		font-size: 19px;
	}
	.comment-body {
		padding-left: 0;
	}
	.comment-form .comment-input {
		min-width: 100%;
	}
}
