@charset "utf-8";

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

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

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

/* 검색 바 */
.fm-bar {display:flex; align-items:center; gap:14px; padding:17px 22px; border-bottom:1.92px solid var(--line);}
.fm-back {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:58px; height:58px;}
.fm-back img {width:32px; height:32px;}
.fm-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;}
.fm-search img {width:31px; height:31px;}
.fm-search input {flex:1; min-width:0; border:0; background:transparent; font-size:25px; color:var(--ink);}
.fm-search input::placeholder {color:#6B7280;}

/* 브레드크럼 */
.fm-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;}
.fm-crumb img {width:25px; height:25px;}

/* 탭 (스크롤 + 좌우 화살표) */
.fm-tabswrap {position:relative;}
.fm-tabs {display:flex; gap:0; padding:0 22px; overflow-x:auto; scrollbar-width:none; border-bottom:3.84px solid var(--line);}
.fm-tabs::-webkit-scrollbar {display:none;}
.fm-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;}
.fm-tab.on {color:var(--teal); font-weight:700;}
.fm-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);}
.fm-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;}
.fm-tabarrow img {width:16px; height:16px;}
.fm-tabarrow.prev {left:0; background:linear-gradient(to right, var(--card) 55%, transparent);}
.fm-tabarrow.next {right:0; background:linear-gradient(to left, var(--card) 55%, transparent);}

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

/* ── 분류 필터 칩 (스크롤 + 좌우 화살표) ── */
.fm-filterswrap {position:relative; border-bottom:1.92px solid var(--line);}
.fm-filters {display:flex; gap:12px; padding:18px 26px; overflow-x:auto; scrollbar-width:none;}
.fm-filters::-webkit-scrollbar {display:none;}
.fm-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;}
.fm-filter.on {background:var(--teal); border-color:var(--teal); color:#fff; font-weight:700;}
.fm-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;}
.fm-filterarrow img {width:15px; height:15px;}
.fm-filterarrow.prev {left:0; background:linear-gradient(to right, var(--snow) 55%, transparent);}
.fm-filterarrow.next {right:0; background:linear-gradient(to left, var(--snow) 55%, transparent);}

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

/* ── 목록 헤더 (건수 + 정렬) ── */
.fm-lhead {display:flex; align-items:center; justify-content:space-between; padding:22px 26px 14px;}
.fm-lhead-count {font-size:24px; font-weight:600; color:#475569;}
.fm-lhead-count b {font-size:28px; font-weight:800; color:var(--teal);}
.fm-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;}
.fm-sort img {width:18px; height:18px;}

/* ── 게시글 목록 ── */
.fm-list {display:flex; flex-direction:column; gap:0; padding:0 0 190px;}
.fm-empty {padding:64px 26px; text-align:center; font-size:22px; color:var(--sub); background:var(--card); border-top:1.92px solid var(--line);}
.fm-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;}
.fm-item:first-child {border-top:1.92px solid var(--line);}

.fm-item-row1 {display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.fm-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;}
.fm-badge.fm-new {background:#FEE2E2; color:#DC2626;}
.fm-badge.fm-hot {background:#FEF3C7; color:#B45309;}

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

/* ── 페이지네이션 (번호형) ── */
.fm-page {display:flex; align-items:center; justify-content:center; gap:6px; padding:24px 20px 32px; flex-wrap:wrap;}
.fm-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;}
.fm-page .pg.on {background:var(--teal); color:#fff; font-weight:700;}
.fm-page .dots {display:flex; align-items:center; justify-content:center; min-width:32px; height:48px; color:var(--mute); font-size:21px;}

/* ── FAB (글쓰기 버튼, 텍스트형) ── */
.fm-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;}
.fm-fab, .fm-fab:link, .fm-fab:visited, .fm-fab:hover, .fm-fab:active {color:#fff; text-decoration:none;}
.fm-fab img {width:24px; height:24px; filter:brightness(0) invert(1);}

/* ── 하단 탭바 고정 ── */
.fm-nav, .fv-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);}
/* fh-nav: fh-bottom(댓글입력) 안에 중첩되므로 자체 fixed 지정 금지 — 부모가 이미 뷰포트에 고정되어 있음.
   자체 fixed를 주면 댓글 입력창과 같은 위치에 겹쳐 그려져 입력창이 가려짐 */
.fh-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);}
.fm-nav .tab, .fh-nav .tab, .fv-nav .tab {display:flex; flex-direction:column; align-items:center; gap:5.8px; color:var(--sub); font-size:19.2px;}
.fm-nav .tab img, .fh-nav .tab img, .fv-nav .tab img {width:42px; height:42px;}
.fm-nav .tab.on, .fh-nav .tab.on, .fv-nav .tab.on {color:var(--teal);}
.fm-nav .tab-fab, .fh-nav .tab-fab, .fv-nav .tab-fab {position:relative; align-self:stretch; width:96px;}
.fm-nav .tab-fab .fab, .fh-nav .tab-fab .fab, .fv-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);}
.fm-nav .tab-fab .fab img, .fh-nav .tab-fab .fab img, .fv-nav .tab-fab .fab img {width:48px; height:48px;}

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

/* 헤더 */
.fh-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);}
.fh-back {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:58px; height:58px;}
.fh-back img {width:32px; height:32px;}
.fh-head-title {flex:1; font-size:28px; font-weight:700; color:var(--ink); text-align:center;}
.fh-hacts {flex:0 0 auto; display:flex; align-items:center; gap:4px;}
.fh-hbtn {display:flex; align-items:center; justify-content:center; width:48px; height:48px; background:none; border:0; cursor:pointer;}
.fh-hbtn img {width:24px; height:24px;}

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

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

/* 배지 + 제목 */
.fh-badges {display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px;}
.fh-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:#E0F2FE; color:#0369A1;}
.fh-title {font-size:32px; font-weight:800; color:var(--ink); line-height:1.4; margin:0 0 24px; word-break:keep-all;}

/* 작성자 */
.fh-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;}
.fh-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;}
.fh-author-info {flex:1; min-width:0;}
.fh-author-name {display:block; font-size:24px; font-weight:700; color:var(--ink);}
.fh-author-date {display:block; font-size:21px; font-weight:400; color:var(--sub); margin-top:4px;}
.fh-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;}

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

/* 좋아요(카운트 표시)/공유/저장 버튼 */
.fh-acts {display:flex; align-items:center; gap:0; border:1.92px solid var(--line); border-radius:16px; overflow:hidden; margin-bottom:28px;}
.fh-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;}
.fh-act + .fh-act {border-left:1.92px solid var(--line);}
.fh-act img {width:26px; height:26px;}
.fh-act.on {color:var(--teal);}
.fh-act.heart.on {background:#FEF2F2; color:#DC2626;}
.fh-act.heart.on img {filter:none;}

/* 본문 내용 */
.fh-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;}

/* 태그 */
.fh-tags {display:flex; flex-wrap:wrap; gap:12px; padding:24px 0; border-top:1.92px solid var(--line); margin-bottom:0;}
.fh-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;}

/* 댓글 섹션 */
.fh-cmtsec {padding:8px 0;}
.fh-cmt-head {display:flex; align-items:center; gap:12px; padding:20px 0 18px; border-top:3.84px solid var(--line);}
.fh-cmt-head h2 {margin:0; font-size:27px; font-weight:700; color:var(--ink);}
.fh-cmt-cnt {font-size:22px; font-weight:700; color:var(--teal);}
.fh-cmt-empty {display:flex; flex-direction:column; align-items:center; gap:10px; padding:48px 0; color:var(--sub); font-size:22px;}
.fh-cmt-list {display:flex; flex-direction:column; gap:0;}
.fh-cmt-item {display:flex; gap:18px; padding:22px 0; border-bottom:1.92px solid var(--line);}
.fh-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;}
.fh-cmt-body {flex:1; min-width:0;}
.fh-cmt-top {display:flex; align-items:center; gap:12px; margin-bottom:8px;}
.fh-cmt-nm {font-size:23px; font-weight:700; color:var(--ink);}
.fh-cmt-dt {font-size:20px; font-weight:400; color:var(--sub);}
.fh-cmt-text {font-size:23px; font-weight:400; color:var(--ink); line-height:1.6; margin:0 0 12px; word-break:keep-all;}
.fh-cmt-acts {display:flex; gap:20px;}
.fh-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;}
.fh-cmt-act img {width:22px; height:22px;}

/* 하단 고정 (댓글 입력 + 탭바) */
.fh-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);}
.fh-cmt-write {display:flex; align-items:center; gap:16px; padding:18px 26px 60px;}
.fh-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);}
.fh-cmt-input::placeholder {color:var(--sub);}
.fh-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;}
.fh-send img {width:28px; height:28px; filter:brightness(0) invert(1);}

/* 삭제 확인 팝업 (window.confirm 대체) */
.fh-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);}
.fh-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);}
.fh-confirm-head {display:flex; flex-direction:column; align-items:center; gap:8px; padding:35px 35px 23px;}
.fh-confirm-head h3 {margin:0; font-size:28px; font-weight:800; color:var(--ink); text-align:center;}
.fh-confirm-head p {margin:0; font-size:22px; color:var(--sub); text-align:center;}
.fh-confirm-foot {display:flex; gap:12px; padding:0 27px 30px;}
.fh-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;}
.fh-confirm-btn.ghost {border:1.92px solid var(--line); background:none; color:var(--body);}
.fh-confirm-btn.danger {background:#DC2626; color:#fff;}

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

/* 헤더 */
.fv-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);}
.fv-back {flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:58px; height:58px;}
.fv-back img {width:32px; height:32px;}
.fv-head-title {flex:1; font-size:28px; font-weight:700; color:var(--ink); text-align:center;}
.fv-hspacer {flex:0 0 auto; width:58px; height:58px;}

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

/* 분류 태그 (2열 카드 그리드, 카테고리별 색상) */
.fv-cats {display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:16px;}
.fv-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;}
.fv-cat.on {border-color:var(--cat-fg); font-weight:800;}

/* 안내 콜아웃 (파란 정보 박스) */
.fv-note {display:flex; align-items:flex-start; gap:10px; padding:16px 18px; background:#E0F2FE; border:1.92px solid #BAE6FD; border-radius:12px;}
.fv-note p {margin:0; font-size:20px; font-weight:500; color:#0369A1; line-height:1.5;}

/* input */
.fv-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;}
.fv-input::placeholder {color:var(--sub);}
.fv-count {text-align:right; margin-top:8px; font-size:20px; color:var(--sub);}

/* textarea */
.fv-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;}
.fv-textarea::placeholder {color:var(--sub);}
.fv-hint {margin:10px 0 0; font-size:20px; font-weight:400; color:var(--mute);}

/* 사진 첨부 (컴팩트 버튼) */
.fv-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;}
.fv-upload img {width:36px; height:36px; opacity:.45;}
.fv-upload span {font-size:20px; font-weight:500; color:var(--sub);}

/* 제출 버튼 */
.fv-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;}
.fv-submit:active {background:var(--teal-2);}

/* ── 다크모드 ── */
.churchro.dark-mode .fm-pinned {background:#0F172A;}
.churchro.dark-mode .fm-pinned-title {color:#E2E8F0;}
.churchro.dark-mode .fm-desc {background:#16202E;}
.churchro.dark-mode .fv-input,
.churchro.dark-mode .fv-textarea {background:var(--snow); color:var(--ink);}
.churchro.dark-mode .fv-note {background:#0C2A3A; border-color:#0369A1;}
.churchro.dark-mode .fv-note p {color:#7DD3FC;}
