:root {
  --navy: #14213d;
  --navy-2: #1d2d50;
  --blue: #2a4a8a;
  --gold: #c9a24b;
  --gold-2: #e3c77f;
  --cream: #f7f2e8;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e5e1d8;
  --red: #c0392b;
  --bg: #ffffff;
  --radius: 14px;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --serif: var(--sans);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; word-break: keep-all; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4 { letter-spacing: -0.035em; }
input, textarea, select { font: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; margin-top: 40px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: .22em; color: var(--gold); font-weight: 600; margin-bottom: 10px; }

/* ===== 상단 유틸리티 바 ===== */
.util-bar { background: var(--navy); color: #c8cfdc; font-size: 12px; }
.util-inner { display: flex; justify-content: flex-end; align-items: stretch; height: 32px; gap: 0; }
.util-inner a { display: flex; align-items: center; padding: 0 14px; transition: color .2s; }
.util-inner a:hover { color: #fff; }
.util-inner .util-strong { background: var(--gold); color: var(--navy); font-weight: 700; padding: 0 20px; margin-left: 8px; }
.util-inner .util-strong:hover { background: var(--gold-2); color: var(--navy); }
.live-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff3b30; margin-right: 6px; }

/* ===== 헤더 ===== */
.header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #ececec; transition: box-shadow .2s; }
.header.scrolled { box-shadow: 0 4px 16px rgba(20,33,61,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: 18px; flex: none; }
.logo-img { height: 48px; width: auto; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text small { font-size: 11px; color: var(--muted); letter-spacing: -0.02em; border-bottom: 1px solid #c9ccd3; padding-bottom: 2px; margin-bottom: 2px; }
.logo-text strong { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.05em; }

.gnb > ul { display: flex; }
.gnb > ul > li { position: relative; }
.gnb > ul > li > a { display: block; padding: 28px 22px; font-weight: 700; font-size: 17px; color: #222; transition: color .2s; }
.gnb > ul > li > a:hover, .gnb a.current { color: var(--blue); }
.gnb .sub { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px); min-width: 150px; background: #fff; border-top: 2px solid var(--navy); padding: 10px 0; opacity: 0; visibility: hidden; transition: .2s; box-shadow: 0 10px 24px rgba(20,33,61,.12); }
.gnb li:hover > .sub, .gnb li:focus-within > .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.gnb .sub a { display: block; padding: 7px 20px; font-size: 14px; color: #555; white-space: nowrap; text-align: center; }
.gnb .sub a:hover { color: var(--blue); background: #f4f6fa; }

.menu-btn { display: none; width: 40px; height: 40px; position: relative; }
.menu-btn span { position: absolute; left: 8px; right: 8px; height: 2px; background: var(--navy); transition: .25s; }
.menu-btn span:nth-child(1) { top: 13px; }
.menu-btn span:nth-child(2) { top: 19px; }
.menu-btn span:nth-child(3) { top: 25px; }
.menu-btn.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ===== 버튼 ===== */
.btn { display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: .2s; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-line:hover { background: rgba(255,255,255,.1); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-line-dark { border: 1px solid var(--navy); color: var(--navy); }
.btn-line-dark:hover { background: var(--navy); color: #fff; }

/* ===== 섹션 공통 (하위 페이지용) ===== */
.section { padding: 80px 0; }
.section-cream { background: var(--cream); }
.section-head { text-align: center; margin-bottom: 40px; }
.section h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 750; line-height: 1.3; }
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tab { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.tab.active, .tab:hover { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }

/* ===== 메인 배너 슬라이더 ===== */
.main-banner { padding-top: 20px; }
.slider { position: relative; height: 400px; overflow: hidden; background: var(--navy); touch-action: pan-y; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 0 80px; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.slide.active { opacity: 1; visibility: visible; }
.slide h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.25; letter-spacing: -0.045em; }
.slide-verse { margin-top: 14px; font-size: 16px; opacity: .85; }
.slide-meta { margin-top: 18px; font-size: 13px; opacity: .65; }
.slide-btn { display: inline-block; margin-top: 24px; padding: 12px 28px; background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; transition: .2s; }
.slide-btn:hover { background: var(--blue); }

.slide-sermon { background: radial-gradient(ellipse at 85% 10%, #2f4a85 0%, var(--navy) 65%); color: #fff; }
.slide-book { background: radial-gradient(ellipse at 78% 55%, #fffaf0 0%, #f3e6cc 45%, #e6d2a8 100%); color: #3a1018; }
.slide-book .eyebrow { color: #a51d34; }
.slide-book h2 { color: #2a0d13; }
.slide-book .slide-meta { opacity: .75; font-weight: 600; color: #a51d34; }
.slide-book .slide-btn { background: #a51d34; }
.slide-book .slide-btn:hover { background: #87162a; }
.slide-book .slide-art { align-self: stretch; position: relative; }
.slide-book .slide-art::before { content: ""; position: absolute; left: 50%; bottom: 26px; width: 260px; height: 26px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(60,20,20,.35) 0%, transparent 70%); }
.book-3d { position: relative; height: 340px; width: auto; filter: drop-shadow(18px 22px 24px rgba(60,20,20,.28)); transition: transform .5s; }
.slide-book:hover .book-3d { transform: translateY(-6px); }
.slide-warn { background: linear-gradient(120deg, #e9eef6 0%, #cfd9ea 100%); color: var(--navy); }
.slide-warn .eyebrow { color: var(--red); }

.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.slide-art { display: grid; place-items: center; }
.big-mark { width: 150px; height: 150px; border-radius: 50%; background: var(--red); color: #fff; font-size: 90px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 14px 30px rgba(192,57,43,.3); }

.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; font-size: 40px; line-height: 1; color: rgba(255,255,255,.8); background: rgba(0,0,0,.15); z-index: 2; transition: background .2s; }
.slider-arrow:hover { background: rgba(0,0,0,.35); color: #fff; }
.slider-arrow.prev { left: 0; }
.slider-arrow.next { right: 0; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(0,0,0,.12); transition: .2s; }
.slider-dots button.active { background: #fff; width: 26px; border-radius: 5px; }

/* ===== 아이콘 바로가기 ===== */
.icon-menu { padding: 36px 0 30px; }
.icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.icon-item { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0; font-size: 16px; font-weight: 700; color: #333; }
.icon-item svg { width: 50px; height: 50px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s, stroke .25s; }
.icon-item:hover svg { transform: translateY(-4px); stroke: var(--gold); }
.icon-item:hover span { color: var(--blue); }

/* ===== 타일 그리드 1 ===== */
.tiles { padding-bottom: 20px; }
.bento { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 180px 180px; gap: 8px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.t-label { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.04em; }
.t-label time { font-size: 15px; font-weight: 600; margin-left: 6px; opacity: .85; }

.t-sermon { grid-row: span 2; color: #fff; }
.t-sermon-main { flex: 1; padding: 26px 30px; background: linear-gradient(135deg, #1f56c4 0%, #2a4a8a 100%); display: flex; flex-direction: column; position: relative; }
.t-sermon-main::after { content: "✝"; position: absolute; right: 26px; bottom: -30px; font-size: 180px; line-height: 1; color: rgba(255,255,255,.07); }
.t-sermon-main strong { margin-top: 14px; font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -0.045em; }
.t-ref { margin-top: 8px; font-size: 14px; opacity: .85; }
.t-who { margin-top: auto; font-size: 15px; font-weight: 700; }
.t-sermon-sub { padding: 16px 30px; background: #4c86d9; display: flex; flex-direction: column; transition: background .2s; }
.t-sermon-sub .t-label { font-size: 16px; }
.t-sermon-sub strong { font-size: 20px; font-weight: 800; }
.t-sermon-main:hover { filter: brightness(1.06); }
.t-sermon-sub:hover { background: #5b93e2; }

.t-board { grid-row: span 2; background: #fff; border: 1px solid #dfe3ea; padding: 22px 20px 16px; }
.t-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 2px solid var(--navy); }
.t-head h3 { font-size: 22px; font-weight: 800; color: var(--navy); }
.t-head a { font-size: 13px; color: var(--muted); }
.t-head a:hover { color: var(--navy); }
.t-board .board-preview { flex: 1; overflow: hidden; }
.t-board .board-preview li { border-bottom: 1px solid #eef0f4; }
.t-board .board-preview li:nth-child(n+5) { display: none; }
.t-board .board-preview a { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.t-board .badge { font-size: 11px; padding: 2px 8px; }
.t-board .pv-meta { display: none; }
.t-board .empty { padding: 30px 0; font-size: 14px; }
.t-write { margin-top: 10px; text-align: center; padding: 9px; background: var(--cream); font-size: 14px; font-weight: 700; color: var(--navy); transition: background .2s; }
.t-write:hover { background: #efe5cf; }

.t-yt, .t-book { padding: 22px 22px 18px; transition: filter .2s; }
.t-yt:hover, .t-book:hover { filter: brightness(1.05); }
.t-yt h3, .t-book h3 { font-size: 22px; font-weight: 800; }
.t-yt { background: #f1ede4; color: #2b2b2b; }
.t-yt h3::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #ff0000; margin-right: 8px; vertical-align: 2px; }
.t-yt ul { margin-top: 8px; font-size: 14px; color: #555; }
.t-yt li::before { content: "· "; }
.t-book { background: #e9dcc2; color: var(--navy); }
.t-book p { margin-top: 6px; font-size: 15px; font-weight: 600; }
.t-go { margin-top: auto; font-size: 13px; font-weight: 700; }

/* ===== 타일 그리드 2 : 사진 타일 ===== */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; gap: 8px; margin-top: 8px; }
.ptile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 16px; color: #fff; background: var(--c, #333); isolation: isolate; }
.ptile::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--img) center 40% / 240% auto no-repeat #111; transition: transform .5s; }
.ptile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,16,30,.82) 0%, rgba(10,16,30,.35) 55%, rgba(10,16,30,.15) 100%); }
.ptile-color::after { background: none; }
a.ptile:hover::before { transform: scale(1.06); }
a.ptile-color:hover { filter: brightness(1.08); }
.ptile h3 { font-size: 21px; font-weight: 800; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.ptile p { margin-top: auto; margin-bottom: auto; font-size: 15px; line-height: 1.5; opacity: .92; }
.ptile p b { color: var(--gold-2); }

.ptile-prayer { justify-content: flex-start; }
.prayer-slider { position: relative; flex: 1; width: 100%; }
.prayer-slider p { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-size: 14px; opacity: 0; transition: opacity .6s; }
.prayer-slider p.active { opacity: 1; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.35); }
.dots button.active { background: var(--gold); }

/* ===== 사이트맵 ===== */
.sitemap { margin-top: 30px; border-top: 1px solid #d6d9df; padding: 30px 0 40px; position: relative; }
.sitemap-toggle { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 30px; height: 20px; background: #5f9ea8; color: #fff; font-size: 10px; }
.sitemap-toggle[aria-expanded="false"] { transform: translateX(-50%) rotate(180deg); }
.sitemap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; }
.sitemap.collapsed .sitemap-grid { display: none; }
.sitemap dl { display: grid; grid-template-columns: 100px 1fr; row-gap: 8px; font-size: 13px; }
.sitemap dt { font-weight: 800; color: #222; }
.sitemap dd { color: #666; }
.sitemap dd a + a::before { content: "|"; margin: 0 9px; color: #bbb; }
.sitemap dd a:hover { color: var(--blue); }

/* ===== 푸터 ===== */
.footer { background: #5f6573; color: #e6e8ec; padding: 34px 0 36px; font-size: 13px; position: relative; }
.footer-inner { display: flex; gap: 50px; align-items: flex-start; }
.logo-footer .logo-img { height: 44px; }
.logo-footer .logo-text small { color: #e6e8ec; border-color: rgba(255,255,255,.4); }
.logo-footer .logo-text strong { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; font-weight: 700; color: #fff; }
.footer-links a + a::before { content: "|"; margin: 0 12px; opacity: .5; font-weight: 400; }
.footer-links a:hover { text-decoration: underline; }
.disclaimer { margin-top: 10px; line-height: 1.75; opacity: .9; }
.copy { margin-top: 4px; font-size: 12px; opacity: .75; }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 50px; height: 50px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.2); opacity: 0; visibility: hidden; transition: .3s; z-index: 40; }
.to-top.show { opacity: 1; visibility: visible; }

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
  .gnb > ul > li > a { padding: 28px 14px; font-size: 16px; }
  .slide { padding: 0 60px; gap: 28px; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .t-sermon { grid-column: span 2; grid-row: auto; min-height: 300px; }
  .t-board { grid-row: span 2; min-height: 320px; }
  .t-yt, .t-book { min-height: 156px; }
}

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .header-inner { height: 64px; }
  .logo-img { height: 40px; }
  .gnb { position: fixed; top: 96px; left: 0; right: 0; bottom: 0; background: #fff; transform: translateX(100%); transition: transform .3s; overflow-y: auto; }
  .header.scrolled .gnb { top: 64px; }
  .gnb.open { transform: none; }
  .gnb > ul { flex-direction: column; padding: 10px 20px; }
  .gnb > ul > li > a { padding: 16px 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .gnb .sub { position: static; transform: none; opacity: 1; visibility: visible; border: 0; box-shadow: none; padding: 4px 0 8px 12px; }
  .gnb li:hover > .sub, .gnb li:focus-within > .sub { transform: none; }
  .gnb .sub a { text-align: left; }

  .main-banner { padding-top: 0; }
  .main-banner .container { padding: 0; }
  .slider { height: 520px; }
  .slide { grid-template-columns: 1fr; padding: 36px 24px 50px; align-content: center; gap: 24px; text-align: center; }
  .slide-art { display: none; }
  .slide-book { align-content: center; gap: 14px; }
  .slide-book .slide-art { display: grid; order: -1; }
  .slide-book .slide-art::before { bottom: 0; width: 140px; }
  .book-3d { height: 170px; }
  .slide-book .slide-verse { margin-top: 8px; font-size: 14px; }
  .slide-book .slide-btn { margin-top: 12px; padding: 10px 24px; }
  .slide-book .slide-meta { margin-top: 8px; }
  .slide-book { padding-top: 24px; padding-bottom: 56px; }
  .slider-arrow { display: none; }

  .icon-grid { grid-template-columns: repeat(5, 1fr); }
  .icon-item { font-size: 13px; gap: 6px; }
  .icon-item svg { width: 38px; height: 38px; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .sitemap-grid { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner { flex-direction: column; gap: 18px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .util-inner { justify-content: center; }
  .util-inner a { padding: 0 9px; }
  .slider { height: 480px; }
  .slide h2 { font-size: 26px; }
  .icon-grid { grid-template-columns: repeat(5, 1fr); gap: 0; }
  .icon-item span { font-size: 12px; letter-spacing: -0.04em; }
  .bento { grid-template-columns: 1fr; }
  .t-sermon, .t-board { grid-column: auto; grid-row: auto; }
  .photo-grid { grid-auto-rows: 130px; }
  .ptile h3 { font-size: 17px; }
  .ptile p { font-size: 13px; }
  .sitemap dl { grid-template-columns: 80px 1fr; }
}

/* ============================================================
   성도 나눔 (게시판)
   ============================================================ */
.gnb a.current { color: var(--gold); }

/* 홈 미리보기 */
.stories-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: center; }
.stories-intro h2 { color: var(--navy); margin-bottom: 14px; }
.stories-intro .muted { margin-bottom: 26px; }
.board-preview { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 8px 26px; }
.board-preview li { border-bottom: 1px solid var(--line); }
.board-preview li:last-child { border-bottom: 0; }
.board-preview a { display: flex; align-items: center; gap: 12px; padding: 16px 0; }
.board-preview a:hover .pv-title { color: var(--gold); }
.pv-title { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.pv-title em, .p-title em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--gold); margin-left: 4px; }
.pv-meta { flex: none; font-size: 13px; color: var(--muted); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 15px; list-style: none; }

/* 배지 */
.badge { flex: none; display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; letter-spacing: -0.01em; background: #eef1f6; color: var(--navy); }
.badge-notice { background: var(--navy); color: #fff; }
.badge-testimony { background: #fbf3df; color: #94701f; }
.badge-prayer { background: #eaf3ee; color: #2f6b4a; }
.badge-question { background: #eaf0fb; color: #2d55a3; }
.badge-free { background: #f3eefa; color: #6b4a9a; }

/* 페이지 배너 */
.page-banner { background: radial-gradient(ellipse at 80% 20%, #2a3d68 0%, var(--navy) 60%); color: #fff; padding: 72px 0 60px; text-align: center; }
.page-banner h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.2; }
.page-banner p { color: #c8cfdc; margin-top: 10px; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; font-size: 13px; color: #8b95ab; margin-top: 22px; }
.breadcrumb a:hover { color: var(--gold-2); }

/* 게시판 */
.board-section { padding-top: 56px; }
.mode-notice { background: #fff8e6; border: 1px solid #f0dca6; color: #7a5d17; border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 28px; }
.mode-notice code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.tabs-light { justify-content: flex-start; margin-top: 0; }
.tabs-light .tab { border-color: var(--line); color: var(--muted); }
.tabs-light .tab.active, .tabs-light .tab:hover { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.board-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 28px 0 14px; }
.post-total { font-size: 14px; color: var(--muted); }
.board-bar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-form { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.search-form input { border: 0; outline: 0; padding: 10px 16px; width: 220px; font-size: 14px; background: transparent; }
.search-form button { padding: 0 16px; font-size: 14px; color: var(--navy); font-weight: 600; border-left: 1px solid var(--line); }
.search-form:focus-within { border-color: var(--navy); }

.post-list { border-top: 2px solid var(--navy); }
.post-row { border-bottom: 1px solid var(--line); }
.post-row button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 8px; text-align: left; color: inherit; transition: background .15s; }
.post-row button:hover { background: #faf8f3; }
.post-row.is-notice { background: #f8f6f1; }
.post-row.is-notice .p-title { font-weight: 700; }
.p-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta { flex: none; display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.p-meta span:first-child { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-amen { min-width: 44px; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.pager button { min-width: 38px; height: 38px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.pager button:hover:not(:disabled) { background: var(--cream); color: var(--navy); }
.pager button.active { background: var(--navy); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .35; cursor: default; }
.board-rule { margin-top: 48px; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.8; }

/* 다이얼로그 */
.dlg { border: 0; padding: 0; border-radius: 18px; width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; margin: auto; box-shadow: 0 30px 80px rgba(13,23,43,.35); color: var(--ink); }
.dlg::backdrop { background: rgba(13,23,43,.55); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlgIn .22s ease-out; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dlg-inner { position: relative; padding: 40px 40px 34px; }
.dlg-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; color: var(--muted); }
.dlg-close:hover { background: var(--cream); color: var(--navy); }
.dlg-title { font-size: 24px; font-weight: 750; color: var(--navy); margin-bottom: 24px; }

.pd-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); padding-right: 30px; }
.pd-head h2 { font-size: 24px; font-weight: 750; line-height: 1.4; color: var(--navy); margin: 12px 0 8px; }
.pd-meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.pd-body { padding: 26px 0; font-size: 16px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-actions { display: flex; justify-content: center; align-items: center; gap: 16px; padding-bottom: 28px; border-bottom: 1px solid var(--line); position: relative; }
.pd-actions .link-btn { position: absolute; right: 0; }
.amen-btn { padding: 12px 28px; border-radius: 999px; border: 1.5px solid var(--gold); color: #94701f; font-weight: 600; font-size: 15px; transition: .2s; }
.amen-btn:hover:not(:disabled) { background: var(--gold); color: var(--navy); }
.amen-btn.done { background: var(--gold); color: var(--navy); cursor: default; }
.amen-btn b { margin-left: 4px; }
.link-btn { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--red); }

.comments { padding-top: 24px; }
.comments h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.comments h3 span { color: var(--gold); }
.comments ul li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comments ul li.empty { padding: 20px 0; }
.c-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.c-meta b { color: var(--ink); font-weight: 600; }
.c-meta .link-btn { margin-left: auto; }
.comments ul li p { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { margin-top: 18px; display: grid; gap: 8px; }
.cf-row { display: flex; gap: 8px; }
.cf-row input { flex: 1; min-width: 0; }
.cf-row textarea { flex: 1; resize: vertical; }
.cf-row .btn { flex: none; border-radius: 10px; }

.comment-form input, .comment-form textarea,
.write-form input, .write-form textarea, .write-form select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 15px; background: #fff; color: var(--ink); outline: 0; transition: border-color .15s, box-shadow .15s;
}
.comment-form input:focus, .comment-form textarea:focus,
.write-form input:focus, .write-form textarea:focus, .write-form select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20,33,61,.08); }
.write-form { display: grid; gap: 16px; }
.write-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.write-form textarea { resize: vertical; line-height: 1.7; }
.wf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

@media (max-width: 860px) {
  .stories-wrap { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .board-preview { padding: 4px 16px; }
  .board-preview a { flex-wrap: wrap; gap: 6px 10px; }
  .pv-title { flex-basis: calc(100% - 90px); }
  .pv-meta { width: 100%; }
  .board-bar-right, .search-form { width: 100%; }
  .search-form input { flex: 1; width: auto; }
  .board-bar-right .btn { width: 100%; text-align: center; }
  .post-row button { flex-wrap: wrap; gap: 6px 10px; padding: 16px 4px; }
  .p-title { flex-basis: calc(100% - 90px); font-size: 15px; }
  .p-meta { width: 100%; gap: 12px; }
  .dlg-inner { padding: 32px 20px 24px; }
  .pd-head h2 { font-size: 20px; }
  .cf-row { flex-direction: column; }
  .wf-row { grid-template-columns: 1fr; }
  .tabs-light { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .tabs-light .tab { flex: none; }
}
.dlg-close:focus { outline: none; }
.dlg-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 유튜브 썸네일 플레이어 (클릭하면 재생) */
.yt-lite { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; display: block; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, opacity .3s; opacity: .9; }
.yt-lite:hover img { transform: scale(1.03); opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); background: #ff0000; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: transform .2s; }
.yt-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.yt-lite:hover .yt-play { transform: translate(-50%, -50%) scale(1.1); }
.yt-lite:focus-visible { outline: 3px solid var(--gold, #c9a253); outline-offset: 3px; }

/* 홈 타일 안의 최신글 목록 */
.t-board .board-preview { border: 0; border-radius: 0; padding: 0; background: none; }
