@charset "utf-8";

/* ===== 이단알리기 — Figma 스크린샷 없음, 자유게시글(free-board.css) 구조를 그대로 이식(사용자 확인 완료) ===== */
/* (720px viewport / 375 Figma = 1.92×) 헤더(검색바+브레드크럼+탭스크롤) 구조는 자유게시글과 동일 패턴을 따름 */

/* ── 목록 래퍼 ── */
.ca-wrap {display:flex; flex-direction:column; min-height:100%; background:var(--snow);}

/* ── 헤더 ── */
.ca-head {position:sticky; top:0; z-index:20; background:var(--card);}

/* 검색 바 */
.ca-bar {display:flex; align-items:center; gap:14px; padding:17px 22px; border-bottom:1.92px solid var(--line);}
.ca-back {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:58px; height:58px;}
.ca-back img {width:32px; height:32px;}
.ca-search {flex:1; display:flex; align-items:center; gap:16px; height:74px; padding:0 28px; background:var(--snow); border:1.92px solid var(--line); border-radius:42px;}
.ca-search img {width:31px; height:31px;}
.ca-search input {flex:1; min-width:0; border:0; background:transparent; font-size:25px; color:var(--ink);}
.ca-search input::placeholder {color:#6B7280;}

/* 브레드크럼 */
.ca-crumb {display:flex; align-items:center; gap:11px; padding:15px 27px 13px; border-bottom:1.92px solid var(--line); font-size:23px; font-weight:700; color:#6B7280;}
.ca-crumb img {width:25px; height:25px;}

/* 탭 (스크롤 + 좌우 화살표) */
.ca-tabswrap {position:relative;}
.ca-tabs {display:flex; gap:0; padding:0 22px; overflow-x:auto; scrollbar-width:none; border-bottom:3.84px solid var(--line);}
.ca-tabs::-webkit-scrollbar {display:none;}
.ca-tab {flex:0 0 auto; position:relative; padding:21px 20px; background:none; border:0; color:#94A3B8; font-size:25px; font-weight:500; white-space:nowrap; cursor:pointer;}
.ca-tab.on {color:var(--teal); font-weight:700;}
.ca-tab.on::after {content:''; position:absolute; left:0; right:0; bottom:-3.84px; height:3.84px; border-radius:3px 3px 0 0; background:var(--teal);}
.ca-tabarrow {position:absolute; top:0; bottom:3.84px; width:46px; z-index:5; display:flex; align-items:center; justify-content:center; border:0; cursor:pointer; padding:0;}
.ca-tabarrow img {width:16px; height:16px;}
.ca-tabarrow.prev {left:0; background:linear-gradient(to right, var(--card) 55%, transparent);}
.ca-tabarrow.next {right:0; background:linear-gradient(to left, var(--card) 55%, transparent);}

/* ── 게시판 설명 바 ── */
.ca-desc {display:flex; align-items:flex-start; gap:14px; padding:20px 26px; background:#F8FAFC; border-bottom:1.92px solid var(--line);}
.ca-desc-ic {flex:0 0 auto; width:30px; height:30px; margin-top:2px;}
.ca-desc p {margin:0; font-size:22px; font-weight:400; color:#475569; line-height:1.55;}

/* ── 분류 필터 칩 (스크롤 + 좌우 화살표) ── */
.ca-filterswrap {position:relative; border-bottom:1.92px solid var(--line);}
.ca-filters {display:flex; gap:12px; padding:18px 26px; overflow-x:auto; scrollbar-width:none;}
.ca-filters::-webkit-scrollbar {display:none;}
.ca-filter {flex:0 0 auto; display:flex; align-items:center; gap:6px; padding:11px 22px; border:1.92px solid var(--line); border-radius:38px; background:var(--card); font-size:21px; font-weight:500; color:#475569; cursor:pointer; white-space:nowrap;}
.ca-filter.on {background:var(--teal); border-color:var(--teal); color:#fff; font-weight:700;}
.ca-filterarrow {position:absolute; top:0; bottom:0; width:44px; z-index:5; display:flex; align-items:center; justify-content:center; border:0; cursor:pointer; padding:0;}
.ca-filterarrow img {width:15px; height:15px;}
.ca-filterarrow.prev {left:0; background:linear-gradient(to right, var(--snow) 55%, transparent);}
.ca-filterarrow.next {right:0; background:linear-gradient(to left, var(--snow) 55%, transparent);}

/* ── 핀 공지 (어두운 배경) ── */
.ca-pinned {display:flex; align-items:center; gap:18px; padding:28px 26px; background:#1E293B; cursor:pointer; text-decoration:none;}
.ca-pinned-ic {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:48px; height:48px; background:rgba(255,255,255,.12); border-radius:50%; font-size:24px;}
.ca-pinned-info {flex:1; min-width:0;}
.ca-pinned-badges {display:flex; gap:8px; margin-bottom:8px;}
.ca-pinned-badges .ca-badge {padding:3px 12px; font-size:18px;}
.ca-pinned-title {display:block; font-size:24px; font-weight:700; color:#F1F5F9; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.ca-pinned-meta {display:block; margin-top:6px; font-size:20px; font-weight:400; color:#94A3B8;}
.ca-pinned-arr {flex:0 0 auto; width:22px; height:22px; filter:brightness(0) invert(.6);}

/* ── 목록 헤더 (건수 + 정렬) ── */
.ca-lhead {display:flex; align-items:center; justify-content:space-between; padding:22px 26px 14px;}
.ca-lhead-count {font-size:24px; font-weight:600; color:#475569;}
.ca-lhead-count b {font-size:28px; font-weight:800; color:var(--teal);}
.ca-sort {display:flex; align-items:center; gap:6px; padding:10px 18px; border-radius:38px; background:none; border:none; font-size:21px; font-weight:500; color:#475569; cursor:pointer;}
.ca-sort img {width:18px; height:18px;}

/* ── 게시글 목록 ── */
.ca-list {display:flex; flex-direction:column; gap:0; padding:0 0 190px;}
.ca-empty {padding:64px 26px; text-align:center; font-size:22px; color:var(--sub); background:var(--card); border-top:1.92px solid var(--line);}
.ca-item {display:flex; flex-direction:column; gap:8px; padding:26px 26px 22px; background:var(--card); border-bottom:1.92px solid var(--line); cursor:pointer; text-decoration:none;}
.ca-item:first-child {border-top:1.92px solid var(--line);}

.ca-item-row1 {display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.ca-badge {display:inline-flex; align-items:center; gap:5px; padding:5px 16px; border-radius:38px; font-size:20px; font-weight:700; white-space:nowrap; background:#EFF6FF; color:#2563EB;}
.ca-badge.ca-new {background:#FEE2E2; color:#DC2626;}
.ca-badge.ca-hot {background:#FEE2E2; color:#DC2626;}

.ca-item-title {font-size:26px; font-weight:600; color:var(--ink); line-height:1.4; word-break:keep-all;}
.ca-item-meta {display:flex; align-items:center; gap:8px; font-size:21px; font-weight:400; color:var(--sub);}
.ca-item-meta .dot {color:var(--mute);}
.ca-item-stats {display:flex; align-items:center; gap:22px;}
.ca-stat {display:flex; align-items:center; gap:7px; font-size:21px; font-weight:400; color:var(--sub);}
.ca-stat img {width:22px; height:22px; opacity:.55; color:#94A3B8;}

/* ── 페이지네이션 (번호형) ── */
.ca-page {display:flex; align-items:center; justify-content:center; gap:6px; padding:24px 20px 32px; flex-wrap:wrap;}
.ca-page .pg {display:flex; align-items:center; justify-content:center; min-width:48px; height:48px; padding:0 8px; border:0; border-radius:10px; background:none; font-size:21px; font-weight:500; color:var(--sub); cursor:pointer;}
.ca-page .pg.on {background:var(--teal); color:#fff; font-weight:700;}
.ca-page .dots {display:flex; align-items:center; justify-content:center; min-width:32px; height:48px; color:var(--mute); font-size:21px;}

/* ── FAB (글쓰기 버튼, 텍스트형) ── */
.ca-fab {position:fixed; right:32px; bottom:176px; z-index:30; display:flex; align-items:center; gap:8px; padding:18px 26px; background:var(--teal); border-radius:44px; box-shadow:0 8px 24px rgba(15,118,110,.35); text-decoration:none; color:#fff; font-size:23px; font-weight:700;}
.ca-fab, .ca-fab:link, .ca-fab:visited, .ca-fab:hover, .ca-fab:active {color:#fff; text-decoration:none;}
.ca-fab img {width:24px; height:24px; filter:brightness(0) invert(1);}

/* ── 하단 탭바 고정 ── */
.ca-nav, .cg-nav {position:fixed; left:50%; bottom:0; transform:translateX(-50%); z-index:40; width:720px; max-width:100%; display:flex; align-items:center; justify-content:space-between; padding:20px 40px; background:var(--card); border-top:1.85px solid var(--line);}
/* cb-nav: cb-bottom(댓글입력) 안에 중첩되므로 자체 fixed 지정 금지 — 부모가 이미 뷰포트에 고정되어 있음.
   자체 fixed를 주면 댓글 입력창과 같은 위치에 겹쳐 그려져 입력창이 가려짐 */
.cb-nav {display:flex; align-items:center; justify-content:space-between; width:100%; padding:20px 40px; background:var(--card); border-top:1.85px solid var(--line);}
.ca-nav .tab, .cb-nav .tab, .cg-nav .tab {display:flex; flex-direction:column; align-items:center; gap:5.8px; color:var(--sub); font-size:19.2px;}
.ca-nav .tab img, .cb-nav .tab img, .cg-nav .tab img {width:42px; height:42px;}
.ca-nav .tab.on, .cb-nav .tab.on, .cg-nav .tab.on {color:var(--teal);}
.ca-nav .tab-fab, .cb-nav .tab-fab, .cg-nav .tab-fab {position:relative; align-self:stretch; width:96px;}
.ca-nav .tab-fab .fab, .cb-nav .tab-fab .fab, .cg-nav .tab-fab .fab {position:absolute; left:50%; top:0; transform:translate(-50%,-50%); display:flex; align-items:center; justify-content:center; width:96px; height:96px; border-radius:50%; background:linear-gradient(135deg, #0D9488, #1E3A5F); border:5px solid var(--card); box-shadow:0 10px 24px rgba(13,148,136,0.4);}
.ca-nav .tab-fab .fab img, .cb-nav .tab-fab .fab img, .cg-nav .tab-fab .fab img {width:48px; height:48px;}

/* =========================================================
   상세 (cb-*)
   ========================================================= */
.cb-wrap {display:flex; flex-direction:column; min-height:100%; background:var(--snow);}

/* 헤더 */
.cb-head {position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:0; height:88px; padding:0 22px; background:var(--card); border-bottom:1.92px solid var(--line);}
.cb-back {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:58px; height:58px;}
.cb-back img {width:32px; height:32px;}
.cb-head-title {flex:1; font-size:28px; font-weight:700; color:var(--ink); text-align:center;}
.cb-hacts {flex:0 0 auto; display:flex; align-items:center; gap:4px;}
.cb-hbtn {display:flex; align-items:center; justify-content:center; width:48px; height:48px; background:none; border:0; cursor:pointer;}
.cb-hbtn img {width:24px; height:24px;}

/* 브레드크럼 */
.cb-crumb {display:flex; align-items:center; gap:8px; padding:18px 26px 14px; font-size:21px; font-weight:500; color:var(--sub);}
.cb-crumb img {width:20px; height:20px; opacity:.6;}
.cb-crumb span {color:var(--mute);}

/* 본문 영역 */
.cb-body {flex:1; padding:0 26px 260px; background:var(--card);}

/* 배지 + 제목 */
.cb-badges {display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px;}
.cb-badge {display:inline-flex; align-items:center; gap:5px; padding:5px 16px; border-radius:38px; font-size:20px; font-weight:700; white-space:nowrap; background:#FEE2E2; color:#B91C1C;}
.cb-title {font-size:32px; font-weight:800; color:var(--ink); line-height:1.4; margin:0 0 24px; word-break:keep-all;}

/* 작성자 */
.cb-author {display:flex; align-items:center; gap:18px; padding:20px 0; border-top:1.92px solid var(--line); border-bottom:1.92px solid var(--line); margin-bottom:20px;}
.cb-avatar {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:56px; height:56px; border-radius:50%; background:var(--teal); font-size:24px; font-weight:700; color:#fff;}
.cb-author-info {flex:1; min-width:0;}
.cb-author-name {display:block; font-size:24px; font-weight:700; color:var(--ink);}
.cb-author-date {display:block; font-size:21px; font-weight:400; color:var(--sub); margin-top:4px;}
.cb-report-btn {flex:0 0 auto; padding:10px 20px; border:1.92px solid var(--line); border-radius:38px; background:none; font-size:21px; font-weight:500; color:var(--sub); cursor:pointer;}

/* 통계 (좋아요/댓글/조회) */
.cb-stats {display:flex; align-items:center; gap:0; padding:18px 0; border-bottom:1.92px solid var(--line); margin-bottom:24px;}
.cb-stat-col {flex:1; display:flex; flex-direction:column; align-items:center; gap:6px;}
.cb-stat-col + .cb-stat-col {border-left:1.92px solid var(--line);}
.cb-stat-label {font-size:20px; font-weight:400; color:var(--sub);}
.cb-stat-val {font-size:27px; font-weight:700; color:var(--ink);}

/* 좋아요(카운트 표시)/공유/저장 버튼 */
.cb-acts {display:flex; align-items:center; gap:0; border:1.92px solid var(--line); border-radius:16px; overflow:hidden; margin-bottom:28px;}
.cb-act {flex:1; display:flex; align-items:center; justify-content:center; gap:10px; padding:22px 0; background:var(--card); border:0; font-size:23px; font-weight:500; color:#475569; cursor:pointer;}
.cb-act + .cb-act {border-left:1.92px solid var(--line);}
.cb-act img {width:26px; height:26px;}
.cb-act.on {color:var(--teal);}
.cb-act.heart.on {background:#FEF2F2; color:#DC2626;}
.cb-act.heart.on img {filter:none;}

/* 본문 내용 */
.cb-content {font-size:24px; font-weight:400; color:var(--ink); line-height:1.75; margin-bottom:28px; white-space:pre-wrap; word-break:keep-all;}

/* 태그 */
.cb-tags {display:flex; flex-wrap:wrap; gap:12px; padding:24px 0; border-top:1.92px solid var(--line); margin-bottom:0;}
.cb-tag {padding:9px 20px; border:1.92px solid var(--line); border-radius:38px; font-size:21px; font-weight:500; color:#475569; background:var(--snow); cursor:pointer;}

/* 댓글 섹션 */
.cb-cmtsec {padding:8px 0;}
.cb-cmt-head {display:flex; align-items:center; gap:12px; padding:20px 0 18px; border-top:3.84px solid var(--line);}
.cb-cmt-head h2 {margin:0; font-size:27px; font-weight:700; color:var(--ink);}
.cb-cmt-cnt {font-size:22px; font-weight:700; color:var(--teal);}
.cb-cmt-empty {display:flex; flex-direction:column; align-items:center; gap:10px; padding:48px 0; color:var(--sub); font-size:22px;}
.cb-cmt-list {display:flex; flex-direction:column; gap:0;}
.cb-cmt-item {display:flex; gap:18px; padding:22px 0; border-bottom:1.92px solid var(--line);}
.cb-cmt-av {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:54px; height:54px; border-radius:50%; font-size:22px; font-weight:700; color:#fff;}
.cb-cmt-body {flex:1; min-width:0;}
.cb-cmt-top {display:flex; align-items:center; gap:12px; margin-bottom:8px;}
.cb-cmt-nm {font-size:23px; font-weight:700; color:var(--ink);}
.cb-cmt-dt {font-size:20px; font-weight:400; color:var(--sub);}
.cb-cmt-text {font-size:23px; font-weight:400; color:var(--ink); line-height:1.6; margin:0 0 12px; word-break:keep-all;}
.cb-cmt-acts {display:flex; gap:20px;}
.cb-cmt-act {display:flex; align-items:center; gap:6px; font-size:20px; font-weight:500; color:var(--sub); background:none; border:0; cursor:pointer; padding:0;}
.cb-cmt-act img {width:22px; height:22px;}

/* 하단 고정 (댓글 입력 + 탭바) */
.cb-bottom {position:fixed; left:50%; bottom:0; transform:translateX(-50%); width:720px; max-width:100%; z-index:30; background:var(--card); border-top:1.92px solid var(--line);}
.cb-cmt-write {display:flex; align-items:center; gap:16px; padding:18px 26px 60px;}
.cb-cmt-input {flex:1; height:64px; padding:0 22px; border:1.92px solid var(--line); border-radius:38px; background:var(--snow); font-size:23px; color:var(--ink);}
.cb-cmt-input::placeholder {color:var(--sub);}
.cb-send {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:64px; height:64px; border-radius:50%; background:var(--teal); border:0; cursor:pointer;}
.cb-send img {width:28px; height:28px; filter:brightness(0) invert(1);}

/* 삭제 확인 팝업 (window.confirm 대체) — mypage.css .my-modal 패턴 참고 */
.cb-confirm {position:fixed; left:50%; bottom:0; transform:translateX(-50%); z-index:60; width:720px; max-width:100%; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:38px; background:rgba(0,0,0,.5);}
.cb-confirm-card {width:100%; max-width:538px; overflow:hidden; border-radius:28px; background:var(--card); box-shadow:0 15px 77px rgba(0,0,0,.2);}
.cb-confirm-head {display:flex; flex-direction:column; align-items:center; gap:8px; padding:35px 35px 23px;}
.cb-confirm-head h3 {margin:0; font-size:28px; font-weight:800; color:var(--ink); text-align:center;}
.cb-confirm-head p {margin:0; font-size:22px; color:var(--sub); text-align:center;}
.cb-confirm-foot {display:flex; gap:12px; padding:0 27px 30px;}
.cb-confirm-btn {flex:1; display:flex; align-items:center; justify-content:center; padding:22px 0; border-radius:14px; font-size:23px; font-weight:700; border:0; cursor:pointer;}
.cb-confirm-btn.ghost {border:1.92px solid var(--line); background:none; color:var(--body);}
.cb-confirm-btn.danger {background:#DC2626; color:#fff;}

/* =========================================================
   작성 (cg-*)
   ========================================================= */
.cg-wrap {display:flex; flex-direction:column; min-height:100%; background:var(--snow);}

/* 헤더 */
.cg-head {position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:0; height:88px; padding:0 22px; background:var(--card); border-bottom:1.92px solid var(--line);}
.cg-back {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:58px; height:58px;}
.cg-back img {width:32px; height:32px;}
.cg-head-title {flex:1; font-size:28px; font-weight:700; color:var(--ink); text-align:center;}
.cg-hspacer {flex:0 0 auto; width:58px; height:58px;}

/* 폼 본문 */
.cg-body {flex:1; padding:24px 0 200px;}
.cg-card {margin:0 22px 18px; padding:28px 26px 24px; background:var(--card); border:1.92px solid var(--line); border-radius:19px;}
.cg-label {display:flex; align-items:center; gap:8px; margin-bottom:16px; font-size:24px; font-weight:700; color:var(--ink);}
.cg-label i {color:#EF4444; font-style:normal; font-size:26px;}
.cg-label small {font-size:20px; font-weight:400; color:var(--sub);}

/* 분류 태그 (2열 카드 그리드, 카테고리별 색상) */
.cg-cats {display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.cg-cat {display:flex; align-items:center; justify-content:center; gap:8px; padding:20px 18px; border:1.92px solid transparent; border-radius:14px; background:var(--cat-bg); color:var(--cat-fg); font-size:22px; font-weight:600; cursor:pointer;}
.cg-cat.on {border-color:var(--cat-fg); font-weight:800;}

/* 사실확인 경고 콜아웃 (주황 — 자유게시글의 파란 정보 박스와 달리 법적 리스크 경고 성격) */
.cg-notice {display:flex; align-items:flex-start; gap:10px; padding:16px 18px; background:#FFF7ED; border:1.92px solid #FED7AA; border-radius:12px; margin-bottom:16px;}
.cg-notice p {margin:0; font-size:20px; font-weight:500; color:#9A3412; line-height:1.5;}

/* input */
.cg-input {width:100%; height:72px; padding:0 22px; border:1.92px solid var(--line); border-radius:14px; background:var(--snow); font-size:24px; color:var(--ink); box-sizing:border-box;}
.cg-input::placeholder {color:var(--sub);}
.cg-count {text-align:right; margin-top:8px; font-size:20px; color:var(--sub);}

/* textarea */
.cg-textarea {width:100%; min-height:220px; padding:20px 22px; border:1.92px solid var(--line); border-radius:14px; background:var(--snow); font-size:24px; color:var(--ink); line-height:1.6; resize:vertical; box-sizing:border-box;}
.cg-textarea::placeholder {color:var(--sub);}

/* 사진 첨부 (컴팩트 버튼) */
.cg-upload {display:flex; align-items:center; justify-content:center; flex-direction:column; gap:10px; width:144px; height:144px; border:1.92px dashed var(--line); border-radius:14px; background:var(--snow); cursor:pointer;}
.cg-upload img {width:36px; height:36px; opacity:.45;}
.cg-upload span {font-size:20px; font-weight:500; color:var(--sub);}

/* 제출 버튼 */
.cg-submit {display:block; width:calc(100% - 44px); margin:0 22px; height:88px; border-radius:16px; background:var(--teal); border:0; font-size:28px; font-weight:700; color:#fff; cursor:pointer; letter-spacing:.5px;}
.cg-submit:active {background:var(--teal-2);}

/* ── 다크모드 ── */
.churchro.dark-mode .ca-pinned {background:#0F172A;}
.churchro.dark-mode .ca-pinned-title {color:#E2E8F0;}
.churchro.dark-mode .ca-desc {background:#16202E;}
.churchro.dark-mode .cg-input,
.churchro.dark-mode .cg-textarea {background:var(--snow); color:var(--ink);}
.churchro.dark-mode .cg-notice {background:#3A2410; border-color:#9A3412;}
.churchro.dark-mode .cg-notice p {color:#FDBA74;}
