@charset "utf-8";
/* 게시판 — 분류 · 검색 · 목록(표 / 사진) · 쪽 · 글 보기(본문 · 첨부 · 이전 다음 글) */

.bd-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bd-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-cats a { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; font-size: var(--fs-body); font-weight: 600; color: var(--c-sub); }
.bd-cats a:hover { border-color: var(--c-main); color: var(--c-main); }
.bd-cats a[aria-current="page"] { border-color: var(--c-main); background: var(--c-main); color: #fff; }
.bd-search { display: flex; flex-shrink: 0; width: 320px; height: 44px; overflow: hidden; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; }
.bd-search:focus-within { border-color: var(--c-main); }
.bd-search input { flex: 1 1 auto; min-width: 0; padding: 0 20px; border: 0; background: none; font: inherit; font-size: var(--fs-body); color: var(--c-ink); outline: none; }
.bd-search button { display: grid; place-items: center; width: 48px; border: 0; background: none; color: var(--c-main); font-size: 1.125rem; cursor: pointer; }
.bd-total { margin: 24px 0 12px; font-size: var(--fs-sm); color: var(--c-sub); }
.bd-total b { color: var(--c-main); }
.bd-empty { padding: 96px 0; border-top: 2px solid var(--c-ink); border-bottom: 1px solid var(--c-line); font-size: var(--fs-body); color: var(--c-mute); text-align: center; }

/* 목록 — 표 */
.bd-list { width: 100%; border-collapse: collapse; border-top: 2px solid var(--c-ink); font-size: var(--fs-body); font-variant-numeric: tabular-nums; }
.bd-list th, .bd-list td { height: 64px; padding: 0 12px; border-bottom: 1px solid var(--c-line); text-align: center; }
.bd-list thead th { height: 56px; background: var(--c-tint); font-weight: 700; color: var(--c-ink); }
.bd-c-no { width: 80px; color: var(--c-mute); }
.bd-c-cat { width: 104px; }
.bd-c-date { width: 128px; color: var(--c-sub); }
.bd-c-v { width: 80px; color: var(--c-mute); }
.bd-list td.bd-c-t { text-align: left; }
.bd-c-t a { color: var(--c-ink); font-weight: 600; }
.bd-c-t a:hover { color: var(--c-main); text-decoration: underline; text-underline-offset: 4px; }
.bd-c-t i { margin-left: 8px; color: var(--c-accent); }
.bd-gallery { border-top: 2px solid var(--c-ink); padding-top: 32px; }

/* 쪽 */
.bd-pages { display: flex; justify-content: center; gap: 6px; margin: 48px 0 120px; }
.bd-pages a { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: #fff; font-size: var(--fs-body); font-weight: 600; color: var(--c-sub); font-variant-numeric: tabular-nums; }
.bd-pages a:hover { border-color: var(--c-main); color: var(--c-main); }
.bd-pages a[aria-current="page"] { border-color: var(--c-main); background: var(--c-main); color: #fff; }
.h-wrap > :is(.bd-list, .bd-gallery, .bd-empty):last-child { margin-bottom: 120px; }

/* 글 보기 */
.bd-view { padding-bottom: 120px; }
.bd-view-head { padding: 36px 0 28px; border-top: 2px solid var(--c-ink); border-bottom: 1px solid var(--c-line); text-align: center; }
.bd-view-head h2 { margin-top: 14px; font-family: var(--font-title); font-size: 1.875rem; font-weight: 700; line-height: 2.5rem; letter-spacing: -.02em; }
.bd-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-top: 16px; font-size: var(--fs-sm); color: var(--c-sub); font-variant-numeric: tabular-nums; }
.bd-meta div { display: flex; gap: 8px; }
.bd-meta dt { color: var(--c-mute); }
.bd-body { padding: 48px 0; font-size: var(--fs-body); line-height: 1.85; color: var(--c-ink); text-align: justify; word-break: break-all; }
.bd-body p:empty { display: none; }
.bd-body p + p { margin-top: 8px; }
.bd-body figure { margin: 0 auto 24px; text-align: center; }
.bd-body img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--r-md); }
/* 본문 사진 — 1줄에 1장, 가로 1000px 고정(좁은 화면은 화면 폭), 가운데 정렬 */
.bd-body .photo-grid { display: flex; flex-direction: column; align-items: center; gap: 24px; margin-bottom: 32px; }
.bd-body .photo-grid a { display: block; width: 1000px; max-width: 100%; }
.bd-body .photo-grid img { width: 100%; height: auto; border-radius: var(--r-md); }
.bd-body :is(h2, h3) { margin: 32px 0 12px; font-size: var(--fs-card); font-weight: 800; line-height: 1.5; }   /* 편집기(Quill) 본문 */
.bd-body :is(ol, ul) { margin: 8px 0; padding-left: 1.5em; }
.bd-body li[data-list=bullet] { list-style: disc; }
.bd-body li[data-list=ordered] { list-style: decimal; }
.bd-body .ql-ui { display: none; }
.bd-body blockquote { margin: 16px 0; padding: 12px 20px; border-left: 4px solid var(--c-line); color: var(--c-sub); }
.bd-body .ql-align-center { text-align: center; }
.bd-body .ql-align-right { text-align: right; }
.bd-body p > img { display: inline-block; margin: 8px 0; vertical-align: top; }
.bd-body a { color: var(--c-main); text-decoration: underline; text-underline-offset: 4px; }

.bd-files { padding: 24px 28px; border-radius: var(--r-lg); background: var(--c-tint); }
.bd-files h3 { font-size: var(--fs-card); font-weight: 800; }
.bd-files h3 b { color: var(--c-main); }
.bd-files ul { display: grid; gap: 8px; margin-top: 16px; }
.bd-files a { display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 16px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: #fff; color: var(--c-ink); }
.bd-files a:hover { border-color: var(--c-main); color: var(--c-ink); }
.bd-ext { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: var(--t1); color: #fff; font-size: var(--fs-sm); font-weight: 800; }
.bd-fn { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; font-size: var(--fs-body); font-weight: 700; overflow-wrap: anywhere; }
.bd-fn small { font-size: var(--fs-sm); font-weight: 500; color: var(--c-mute); }
.bd-files .h-btn { flex-shrink: 0; height: 44px; }

.bd-pn { margin-top: 48px; border-top: 1px solid var(--c-line); }
.bd-pn > * { display: grid; grid-template-columns: 112px minmax(0, 1fr) 120px; align-items: center; height: 64px; padding: 0 16px; border-bottom: 1px solid var(--c-line); font-size: var(--fs-body); color: var(--c-ink); }
.bd-pn a:hover .bd-pn-t { color: var(--c-main); text-decoration: underline; text-underline-offset: 4px; }
.bd-pn-lb { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c-sub); }
.bd-pn-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-pn-none .bd-pn-t { color: var(--c-mute); }
.bd-pn-d { font-size: var(--fs-sm); color: var(--c-mute); text-align: right; font-variant-numeric: tabular-nums; }
.bd-back { margin-top: 40px; text-align: center; }

@media (max-width: 1023.98px) {
  .bd-bar { flex-direction: column; align-items: stretch; }
  .bd-search { width: 100%; }
}
@media (max-width: 767.98px) {
  .bd-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .bd-cats a { flex-shrink: 0; height: 40px; padding: 0 16px; }
  .bd-list thead { display: none; }
  .bd-list, .bd-list tbody { display: block; }
  .bd-list tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding: 16px 4px; border-bottom: 1px solid var(--c-line); }
  .bd-list td { display: block; height: auto; padding: 0; border: 0; text-align: left; }
  .bd-c-no, .bd-c-v { display: none !important; }
  .bd-c-cat { width: auto; }
  .bd-list td.bd-c-t { grid-column: 1 / -1; grid-row: 2; }
  .bd-c-date { width: auto; justify-self: end; font-size: var(--fs-sm); }
  .bd-pages { margin-bottom: 64px; }
  .bd-view { padding-bottom: 64px; }
  .bd-view-head h2 { font-size: 1.375rem; line-height: 1.875rem; }
  .bd-body { padding: 32px 0; }
  .bd-files { padding: 20px 16px; }
  .bd-files a { flex-wrap: wrap; }
  .bd-files .h-btn { flex: 1 1 100%; }
  .bd-pn > * { grid-template-columns: 88px minmax(0, 1fr); }
  .bd-pn-d { display: none; }
}

/* 문서 캡처 그림(공지 · 자료실) — 2장 이상이면 한 줄에 2장, 테두리 + 간격 12px. 편집기는 쪽 그림을 한 문단에 이어 넣는다 */
.bd-body--doc p:has(> img + img), .bd-body--doc .photo-grid:has(> a + a) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.bd-body--doc p:has(> img + img) > img, .bd-body--doc .photo-grid:has(> a + a) > a { width: 100%; margin: 0; }
.bd-body--doc p:has(> img + img) > br { display: none; }
.bd-body--doc img { border: 1px solid var(--c-line); border-radius: 0; }
@media (max-width: 767.98px) {
  .bd-body--doc p:has(> img + img), .bd-body--doc .photo-grid:has(> a + a) { grid-template-columns: 1fr; }
}

/* 관리자로 로그인했을 때만 보이는 줄(위쪽) — 글쓰기(목록) · 수정 · 삭제(글 보기) */
.bd-adm { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 24px; padding: 12px 16px; border-radius: var(--r-md); background: var(--c-tint); }
.bd-adm-lb { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: var(--fs-sm); font-weight: 700; color: var(--c-main); }
.bd-adm form { margin: 0; }
.bd-adm-x { color: #c0392b; border-color: color-mix(in oklab, #c0392b 40%, #fff); }
