/* ==========================================================================
   일심성결교회 — 디자인 시스템
   브랜드: 로고·표어의 남색 + 옛 사이트의 노란색, 따뜻한 아이보리 바탕
   ========================================================================== */
:root {
  --ivory: #faf7f2;
  --sand: #f3ede2;
  --paper: #ffffff;
  --ink: #17191e;
  --ink-2: #4b515c;
  --ink-3: #7a808a;
  --line: #e7e0d3;
  --navy: #14213d;
  --navy-2: #1d2f55;
  --blue: #1f4e9c;
  --gold: #ffd202;
  --gold-2: #f2b705;
  --gold-ink: #7a5a00;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, .06), 0 2px 8px rgba(20, 33, 61, .05);
  --shadow: 0 2px 6px rgba(20, 33, 61, .06), 0 12px 32px rgba(20, 33, 61, .09);
  --shadow-lg: 0 24px 60px rgba(20, 33, 61, .18);
  --wrap: 1180px;
  --head-h: 72px;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 17px;
}
html[data-fs="1"] { font-size: 19px; }
html[data-fs="2"] { font-size: 21px; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans);
  line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
.serif { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 1rem; top: 1rem; width: auto; height: auto; clip: auto; background: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 8px; }
.ico { flex: none; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 48px; padding: .6em 1.5em; border: 0; border-radius: 999px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--navy-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: rgba(255, 255, 255, .7); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn.ghost:hover { background: #fff; }
.btn.light { background: var(--gold); color: var(--navy); }
.btn.light:hover { background: #ffe14d; }
.btn.small { min-height: 38px; padding: .35em 1.1em; font-size: .88rem; }
.btn.danger { background: #b42318; }
.btn.naver { background: #03c75a; }
.btn.kakao { background: #fee500; color: #191600; }
.mini-btn {
  display: inline-flex; align-items: center; gap: .35em; min-height: 38px; padding: .3em .95em;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink);
  font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.mini-btn:hover { border-color: var(--navy); }
.link-arrow { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; color: var(--blue); text-decoration: none; }
.link-arrow:hover .ico { transform: translateX(3px); }
.link-arrow .ico { transition: transform .15s; }
.link { background: none; border: 0; color: #b42318; cursor: pointer; text-decoration: underline; }
.row-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.eyebrow { margin: 0 0 .5rem; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.chip { display: inline-block; padding: .2em .8em; border-radius: 999px; background: #fff4c2; color: var(--gold-ink); font-size: .82rem; font-weight: 700; }

/* ---------- 머리글 ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(20, 33, 61, .07); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(20, 33, 61, .08); }
.bar { display: flex; align-items: center; gap: 1rem; height: var(--head-h); }
.brand { display: flex; align-items: center; flex: none; text-decoration: none; font-weight: 800; }
.brand img { height: 42px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav > ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.site-nav li { position: relative; list-style: none; }
.nav-top { background: none; border: 0; padding: .7rem 1rem; font-weight: 700; font-size: 1rem; cursor: pointer; border-radius: 999px; color: var(--ink); }
.nav-top:hover, .site-nav li.open > .nav-top { background: var(--sand); }
.site-nav li.active > .nav-top { color: var(--blue); }
.drop { position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, 6px); opacity: 0; visibility: hidden; transition: .16s ease; }
.drop ul { list-style: none; margin: 0; padding: .5rem; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.site-nav li:hover > .drop, .site-nav li:focus-within > .drop, .site-nav li.open > .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.drop a { display: block; padding: .55rem .9rem; border-radius: 10px; text-decoration: none; white-space: nowrap; font-weight: 500; }
.drop a:hover { background: var(--sand); }
.drop a[aria-current] { background: #fff4c2; font-weight: 700; }
.tools { display: flex; align-items: center; gap: .35rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .2rem; min-width: 44px; height: 44px; padding: 0 .5rem; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--sand); }
.fs-label { font-size: .78rem; font-weight: 700; }
.live-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem 1rem; border-radius: 999px; background: #d92d20; color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.live-btn .ico circle { animation: pulse 1.6s infinite; transform-origin: center; }
@keyframes pulse { 50% { opacity: .35; } }
.live-btn:hover { background: #b42318; }
.menu-toggle, .mobile-only { display: none; }
.search-bar { border-top: 1px solid var(--line); background: #fff; padding: .9rem 0; }
.search-bar .wrap { display: flex; gap: .5rem; }
.search-bar input { flex: 1; min-height: 48px; padding: 0 1.1rem; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; }
.search-bar input:focus { border-color: var(--navy); outline: none; }
.admin-strip { background: var(--gold); font-size: .88rem; padding: .35rem 0; font-weight: 600; }

@media (max-width: 980px) {
  :root { --head-h: 64px; }
  .brand img { height: 36px; }
  .desktop-only { display: none !important; }
  .menu-toggle { display: inline-flex; }
  .fs-label { display: none; }
  /* 닫힌 메뉴를 화면 밖(translate)으로 두면 휴대폰에서 가로 스크롤이 생기므로 아예 숨긴다 */
  .site-nav { display: none; position: fixed; inset: var(--head-h) 0 0 0; margin: 0; background: #fff; overflow-y: auto; padding: 1rem 24px 3rem; }
  .site-nav.open { display: block; animation: navIn .2s ease; }
  @keyframes navIn { from { opacity: 0; transform: translateY(-8px); } }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .nav-top { width: 100%; text-align: left; padding: 1rem .2rem; border-radius: 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); background: none !important; }
  .drop { position: static; transform: none; opacity: 1; visibility: visible; display: none; }
  .site-nav li.open > .drop, .site-nav li.active > .drop { display: block; }
  .drop ul { border: 0; box-shadow: none; padding: .4rem 0 .8rem; display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
  .drop a { padding: .7rem .8rem; background: var(--ivory); white-space: normal; }
  .mobile-only { display: flex; justify-content: center; margin-top: 1.4rem; padding: .9rem; font-size: 1.05rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- 홈: 첫 화면 ---------- */
.hero { position: relative; min-height: min(80vh, 720px); display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: #ddd center 30%/cover no-repeat; transform: scale(1.03); animation: heroIn 1.6s ease-out forwards; }
@keyframes heroIn { to { transform: scale(1); } }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250, 247, 242, .05) 0%, rgba(250, 247, 242, .35) 55%, var(--ivory) 100%); }
.hero-inner { position: relative; z-index: 1; width: 100%; text-align: center; padding-top: 3rem; padding-bottom: 7rem; }
.slogan { margin: 0; }
.slogan img { width: min(640px, 88vw); filter: drop-shadow(0 2px 10px rgba(255, 255, 255, .6)); }
.hero-verse { max-width: 32em; margin: 1.2rem auto 2rem; font-size: 1.15rem; font-weight: 500; color: var(--navy); text-shadow: 0 0 18px rgba(255, 255, 255, .95), 0 0 4px rgba(255, 255, 255, .9); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }

.quick { position: relative; z-index: 2; margin-top: -5.5rem; }
.quick-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.quick-grid a {
  display: flex; align-items: center; gap: 1rem; height: 100%; padding: 1.3rem 1.3rem; background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--shadow); text-decoration: none; transition: transform .18s, box-shadow .18s;
}
.quick-grid a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.qi { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 16px; background: var(--gold); color: var(--navy); }
.quick-grid b { display: block; font-size: 1.05rem; }
.quick-grid small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font-size: .86rem; }

/* ---------- 홈: 공통 섹션 ---------- */
.section { padding: 6rem 0; }
.section-head { margin-bottom: 2.6rem; }
.section-head h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.3; }
.section-head p:not(.eyebrow) { margin: .6rem 0 0; color: var(--ink-2); }
.section-head.center { text-align: center; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* 환영 */
.welcome { padding-top: 5.5rem; }
.welcome-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4.5rem; align-items: center; }
.pastor { position: relative; margin: 0; max-width: 420px; justify-self: center; }
.pastor::before { content: ''; position: absolute; inset: 1.4rem -1.4rem -1.4rem 1.4rem; border-radius: var(--r-lg); background: var(--gold); z-index: -1; }
.pastor img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pastor figcaption { position: absolute; left: 1rem; bottom: 1rem; padding: .45rem 1rem; border-radius: 999px; background: rgba(20, 33, 61, .85); color: #fff; font-size: .9rem; backdrop-filter: blur(4px); }
.welcome-text h2 { margin: 0 0 1.4rem; font-size: clamp(1.55rem, 2.8vw, 2.15rem); line-height: 1.45; color: var(--navy); }
.welcome-text .lead { font-weight: 700; font-size: 1.12rem; margin: 0 0 .8rem; }
.welcome-text p { color: var(--ink-2); margin: 0 0 1.6rem; }

/* 예배 안내 */
.worship { position: relative; background: radial-gradient(1200px 500px at 85% -10%, rgba(255, 210, 2, .16), transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0d172c 100%); color: #fff; overflow: hidden; }
.worship .section-head p:not(.eyebrow) { color: rgba(255, 255, 255, .7); }
.worship .eyebrow { color: var(--gold); }
.worship-grid { list-style: none; margin: 0 0 2.6rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.worship-grid li { display: flex; flex-direction: column; gap: .2rem; padding: 1.4rem 1.5rem; border-radius: var(--r); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.worship-grid li.main { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.w-name { font-weight: 700; font-size: 1rem; }
.w-time { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.w-time small { font-size: .95rem; font-weight: 600; margin-right: .3rem; opacity: .8; }
.w-meta { font-size: .88rem; opacity: .75; }
.w-time.long { font-size: 1.5rem; }
.worship-grid li.newcomer { background: transparent; border: 1.5px dashed rgba(255, 210, 2, .6); padding: 0; }
.worship-grid li.newcomer a { display: flex; flex-direction: column; justify-content: center; gap: .3rem; height: 100%; padding: 1.4rem 1.5rem; color: #fff; text-decoration: none; }
.worship-grid li.newcomer b { color: var(--gold); font-size: 1.1rem; }
.worship-grid li.newcomer span { font-size: .9rem; opacity: .8; }
.worship-grid li.newcomer a:hover { background: rgba(255, 210, 2, .08); border-radius: var(--r); }

/* 말씀 */
.sermon-feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; margin-bottom: 3rem; }
.yt-lite { position: relative; display: block; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; background: #111; box-shadow: var(--shadow-lg); }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.yt-lite:hover img { transform: scale(1.03); }
.yt-lite iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* 설교 썸네일 가운데엔 제목 글씨가 있어서 재생 버튼은 오른쪽 아래에 둔다 */
.yt-play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 1.4rem; border: 0; background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .18)); cursor: pointer; }
.yt-play span { width: 84px; height: 84px; border-radius: 50%; background: var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); position: relative; transition: transform .18s; }
.yt-play span::after { content: ''; position: absolute; left: 34px; top: 26px; border-left: 26px solid var(--navy); border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.yt-lite:hover .yt-play span { transform: scale(1.08); }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-3); background: linear-gradient(135deg, #efe8da, #e2d9c6); }
.feature-info h3 { margin: .8rem 0 .5rem; font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.35; }
.feature-info h3 a { text-decoration: none; }
.verse { display: inline-block; color: var(--blue); font-weight: 700; font-size: .88rem; }
.verse.big { font-size: 1.05rem; margin: 0; }
.feature-info .meta { color: var(--ink-3); margin: .4rem 0 1.4rem; }
.pill-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.pill-links a { padding: .5rem 1.1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .92rem; }
.pill-links a:hover { border-color: var(--navy); }

/* 설교 카드 */
.s-grid { list-style: none; margin: 0 0 2.4rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.4rem; }
.s-grid.four { grid-template-columns: repeat(4, 1fr); margin: 0; }
.s-card a { display: block; text-decoration: none; }
.thumb { position: relative; aspect-ratio: 1/1; border-radius: var(--r); overflow: hidden; background: var(--sand); box-shadow: var(--shadow-sm); }
.thumb.wide { aspect-ratio: 16/9; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
a:hover .thumb img { transform: scale(1.05); }
.play-mini { position: absolute; right: .7rem; bottom: .7rem; width: 38px; height: 38px; border-radius: 50%; background: rgba(20, 33, 61, .85); }
.play-mini::after { content: ''; position: absolute; left: 15px; top: 11px; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.s-body { display: flex; flex-direction: column; gap: .15rem; padding: .85rem .1rem 0; }
.s-body strong { font-size: 1.05rem; line-height: 1.45; }
.s-card.small .s-body strong { font-size: .98rem; }
a:hover .s-body strong, a:hover > strong { color: var(--blue); }
.s-body time, .p-card time { color: var(--ink-3); font-size: .85rem; }
.kind { font-size: .78rem; font-weight: 700; color: var(--gold-ink); }

/* 주보 */
.jubo-sec { background: var(--sand); }
.jubo-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: center; }
.jubo-text h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.jubo-date { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin: .5rem 0; }
.jubo-text .muted { margin: 0 0 1.6rem; }
.jubo-pages { position: relative; display: flex; justify-content: center; padding: 1rem 0; }
.jubo-pages img { width: 48%; background: #fff; padding: 6px; border-radius: 6px; box-shadow: var(--shadow-lg); transition: transform .25s; }
.jubo-pages img:first-child { transform: rotate(-3deg) translateX(8%); z-index: 1; }
.jubo-pages img:nth-child(2) { transform: rotate(3deg) translate(-8%, 6%); }
.jubo-pages:hover img:first-child { transform: rotate(-4deg) translate(4%, -2%); }
.jubo-pages:hover img:nth-child(2) { transform: rotate(4deg) translate(-4%, 4%); }

/* 훈련 */
.train-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem 1.4rem; }
.train-grid a { display: block; text-decoration: none; }
.t-img { aspect-ratio: 16/10; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.t-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.train-grid a:hover img { transform: scale(1.05); }
.train-grid strong { display: block; margin-top: .8rem; font-size: 1.1rem; }
.train-grid small { color: var(--ink-2); font-size: .9rem; }

/* 사진 카드 */
.news { background: #fff; }
.p-grid { list-style: none; margin: 0 0 2.4rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 1.2rem; }
.news .p-grid { margin: 0; }
.p-card a { display: block; text-decoration: none; }
.p-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .8rem; line-height: 1.45; }

/* 오시는 길 */
.visit-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; }
.map { display: block; border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map img { display: block; width: 100%; }
.visit-info h2 { margin: 0 0 1rem; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.addr { font-size: 1.15rem; font-weight: 700; margin: 0 0 .3rem; }
.visit-info .muted { margin: 0 0 1.4rem; }
.contact-list { list-style: none; margin: 1.8rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: flex; align-items: center; gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-list li > span:nth-child(2) { flex: 1; min-width: 0; }
.contact-list b { display: block; font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.contact-list small { color: var(--ink-3); margin-left: .3rem; }
.ci { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--sand); color: var(--navy); }

/* ---------- 서브 페이지 ---------- */
.page-head { position: relative; padding: 3.6rem 0 3.2rem; background: radial-gradient(900px 300px at 90% 0%, rgba(255, 210, 2, .18), transparent 60%), linear-gradient(160deg, var(--navy), #0d172c); color: #fff; overflow: hidden; }
.page-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.3; }
.crumb { margin: 0 0 .4rem; color: var(--gold); font-weight: 700; font-size: .9rem; letter-spacing: .04em; }
.subnav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: var(--head-h); z-index: 40; }
.subnav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; padding: .95rem 1rem; white-space: nowrap; text-decoration: none; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current] { color: var(--navy); border-bottom-color: var(--gold); }

/* 게시판 */
.board { padding: 2.4rem 24px 4rem; }
.board-tools { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.count { margin: 0; color: var(--ink-2); }
.count b { color: var(--ink); }
.board-search { display: flex; margin-left: auto; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.board-search:focus-within { border-color: var(--navy); }
.board-search input { border: 0; padding: 0 1.1rem; min-height: 44px; width: 14em; font: inherit; background: transparent; outline: none; }
.board-search button { border: 0; background: none; padding: 0 1rem; cursor: pointer; color: var(--navy); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1.8rem; scrollbar-width: thin; }
.chips a { flex: none; padding: .4rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9rem; }
.chips a small { color: var(--ink-3); font-weight: 500; }
.chips a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips a[aria-current] small { color: rgba(255, 255, 255, .7); }
.rows { list-style: none; margin: 0 0 2.4rem; padding: 0; border-top: 2px solid var(--ink); }
.rows a { display: flex; align-items: center; gap: 1rem; padding: .95rem .3rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.rows a:hover { background: #fff; }
.rows a:hover .r-title { color: var(--blue); }
.rows img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.rows img.wide { width: 88px; height: 50px; }
.r-title { flex: 1; min-width: 0; font-weight: 600; }
.rows time { color: var(--ink-3); font-size: .88rem; white-space: nowrap; }
.search-rows .kind { display: block; }
.snip { display: block; font-weight: 400; color: var(--ink-2); font-size: .88rem; margin-top: .2rem; }
mark { background: #fff1a8; color: inherit; padding: 0 .1em; border-radius: 3px; }
.big-search { display: flex; gap: .6rem; margin-bottom: 1.4rem; }
.big-search input { flex: 1; min-width: 0; min-height: 54px; padding: 0 1.3rem; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; font-size: 1.05rem; background: #fff; }
.big-search input:focus { border-color: var(--navy); outline: none; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin: 1rem 0 0; }
.pager a, .pager strong, .pager span { min-width: 2.6em; min-height: 2.6em; display: inline-grid; place-items: center; padding: 0 .7rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.pager a:hover { background: #fff; box-shadow: var(--shadow-sm); }
.pager strong { background: var(--navy); color: #fff; }
.empty { text-align: center; color: var(--ink-2); padding: 4rem 0; }

/* 글 */
.post { padding-top: 2.8rem; padding-bottom: 4rem; }
.post-head { margin-bottom: 2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.post-head h1 { margin: .6rem 0 .5rem; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.4; }
.post-head .meta { color: var(--ink-3); margin: 0; }
.post-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.admin-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.admin-actions form { margin: 0; }
.hint-tap { margin: -1rem 0 1.4rem; color: var(--ink-3); font-size: .9rem; }
.content { font-size: 1.05rem; line-height: 1.85; }
.content img { max-width: 100% !important; height: auto !important; border-radius: 8px; }
.content p { margin: 0 0 .9em; }
.content h2, .content h3 { font-family: var(--serif); line-height: 1.4; }
.content table { max-width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.content td, .content th { padding: .35em .6em; }
.content iframe, .content embed, .content object { max-width: 100%; }
.content blockquote { margin: 1.2em 0; padding: .8em 1.2em; border-left: 4px solid var(--gold); background: #fff; border-radius: 0 10px 10px 0; }
.is-gallery .content img, .page .content img { cursor: zoom-in; }
.video { position: relative; aspect-ratio: 16/9; margin: 0 0 1.8rem; border-radius: var(--r); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* 본문은 흰 종이 카드 위에 (옛 편집기가 넣은 흰 배경 문단과도 자연스럽게 어울림) */
.post .content { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.2rem, 4vw, 2.6rem); box-shadow: var(--shadow-sm); }
.post .content > :last-child { margin-bottom: 0; }
.post .content > .video:first-child, .post .content > .video-out:first-child { margin-top: 0; }
.video-gone { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 1.6rem; padding: 1.4rem 1.6rem; border-radius: var(--r); background: var(--sand); border: 1px dashed #d8ccb4; }
.video-gone span { color: var(--ink-2); font-size: .92rem; }
.video-out { position: relative; display: block; aspect-ratio: 16/9; margin: 0 0 1.8rem; border-radius: var(--r); overflow: hidden; background: #000; box-shadow: var(--shadow); text-decoration: none; }
.video-out img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-out span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .8rem 1.5rem; border-radius: 999px; background: #d92d20; color: #fff; font-weight: 700; white-space: nowrap; }
.word-card { display: flex; flex-direction: column; justify-content: center; gap: .3rem; width: 100%; height: 100%; padding: 1rem 1.3rem; color: #fff; background: radial-gradient(400px 200px at 100% 0%, rgba(255, 210, 2, .25), transparent 60%), linear-gradient(150deg, var(--navy-2), var(--navy)); }
.word-card em { font-style: normal; font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--gold); }
.word-card b { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.word-card small { font-size: .82rem; opacity: .75; }
.s-card.small .word-card b { font-size: 1rem; }
.audio { margin: 0 0 1.6rem; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.audio figcaption { display: flex; align-items: center; gap: .4rem; font-weight: 700; margin-bottom: .6rem; color: var(--navy); }
.audio audio { width: 100%; }
.files, .comments { margin-top: 2.6rem; padding: 1.2rem 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.files h2, .comments h2 { font-size: 1rem; margin: 0 0 .5rem; }
.files ul, .comments ul { list-style: none; padding: 0; margin: 0; }
.files li { padding: .35rem 0; }
.comments li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3rem 0 1.6rem; }
.post-nav a { display: block; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: box-shadow .15s, border-color .15s; }
.post-nav a:hover { border-color: var(--navy); box-shadow: var(--shadow-sm); }
.post-nav a:last-child { text-align: right; }
.post-nav small { display: block; color: var(--ink-3); font-size: .82rem; }
.post-nav span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }

/* ---------- 바닥글 ---------- */
.site-footer { background: #0d172c; color: #c3cad6; padding: 4rem 0 2rem; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 2.4rem; }
.foot-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: #fff; margin: 0 0 .3rem; }
.foot-desc { margin: 0 0 1.2rem; }
.foot-h { color: #fff; font-weight: 700; margin: 0 0 .6rem; }
.site-footer p { margin: 0 0 .35rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-yt { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1rem; }
.copy { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .1); color: #7d879a; font-size: .85rem; }
.admin-link { color: #7d879a !important; margin-left: .6rem; }

/* ---------- 떠 있는 요소 ---------- */
.to-top { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 300; max-width: calc(100vw - 32px); padding: .8rem 1.4rem; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* 사진 크게 보기 */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(8, 12, 22, .95); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); user-select: none; }
.lb-btn { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 56px; height: 56px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 1.6rem; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }
.lb-count { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: #fff; font-weight: 600; background: rgba(255, 255, 255, .12); padding: .3rem 1rem; border-radius: 999px; }
.lb-prev .ico { transform: rotate(180deg); }

/* ---------- 반응형 ---------- */
@media (max-width: 1080px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .s-grid.four, .p-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .section { padding: 4.2rem 0; }
  .welcome-grid, .sermon-feature, .jubo-grid, .visit-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .pastor { max-width: 300px; }
  .s-grid, .train-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .jubo-pages { order: -1; }
}
@media (max-width: 560px) {
  :root { font-size: 16px; }
  html[data-fs="1"] { font-size: 18px; }
  html[data-fs="2"] { font-size: 20px; }
  .wrap { padding: 0 18px; }
  .hero { min-height: min(70vh, 600px); }
  .hero-inner { padding-bottom: 6rem; }
  .hero-verse { font-size: 1rem; }
  .quick-grid { gap: .7rem; }
  .quick-grid a { flex-direction: column; align-items: flex-start; gap: .7rem; padding: 1.1rem; }
  .qi { width: 46px; height: 46px; border-radius: 14px; }
  .worship-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .worship-grid li { padding: 1rem 1.1rem; }
  .w-time { font-size: 1.45rem; }
  .s-grid { grid-template-columns: 1fr; }
  .s-grid.four { grid-template-columns: 1fr 1fr; }
  .train-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem .8rem; }
  .train-grid small { display: none; }
  .p-grid { gap: 1.4rem .8rem; }
  .board-search { width: 100%; margin: 0; }
  .board-search input { width: 100%; flex: 1; }
  .rows time { display: none; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a:last-child { text-align: left; }
  .contact-list li { flex-wrap: wrap; }
  .lb-prev, .lb-next { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 관리자 ---------- */
.admin { padding: 2.4rem 24px 4rem; }
.admin h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
.admin-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
.admin table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--r-sm); overflow: hidden; }
.admin th, .admin td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.admin td.num { text-align: right; }
.admin ul.plain { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.admin ul.plain li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.small-link { font-size: .85rem; color: var(--blue); }
.notice { background: #fff6cc; border-radius: 10px; padding: .9rem 1.1rem; }
.notice.error { background: #fde8e7; color: #8a1c14; }
.notice.ok { background: #e6f4ea; color: #1d5b2e; }
.login { max-width: 380px; margin: 0 auto 4rem; display: grid; gap: 1rem; }
.editor, .settings { display: grid; gap: 1rem; margin-bottom: 4rem; }
.editor label, .settings label { display: grid; gap: .3rem; font-weight: 700; }
.editor label small { font-weight: 400; color: var(--ink-2); }
.editor input[type=text], .editor input[type=url], .editor input[type=datetime-local], .editor select, .settings input, .settings textarea, .login input {
  font: inherit; font-weight: 400; min-height: 46px; padding: .55rem .9rem; border: 1.5px solid #d6cfc1; border-radius: 10px; background: #fff; width: 100%;
}
.editor .row { display: flex; flex-wrap: wrap; gap: 1rem; }
.editor .row > label { flex: 1 1 220px; }
.row.end { justify-content: flex-end; display: flex; gap: .6rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .35rem; position: sticky; top: var(--head-h); background: var(--ivory); padding: .5rem 0; z-index: 5; }
.toolbar button, .toolbar .upload { font-size: .92rem; font-weight: 600; min-height: 40px; padding: .35rem .9rem; border: 1.5px solid #d6cfc1; border-radius: 10px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; }
.toolbar .upload { background: var(--gold); border-color: var(--gold-2); color: var(--navy); }
.editable { min-height: 340px; background: #fff; border: 1.5px solid #d6cfc1; border-radius: 12px; padding: 1.1rem 1.3rem; outline: none; }
.editable:focus { border-color: var(--navy); }
.editable:empty::before { content: attr(data-placeholder); color: var(--ink-3); }
.editable.drag { border-color: var(--gold-2); background: #fffbe6; }
.admin-quick { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.admin-quick a { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.2rem; border-radius: var(--r); background: #fff; box-shadow: var(--shadow-sm); border: 1px solid var(--line); text-decoration: none; transition: .15s; }
.admin-quick a:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
.admin-quick li:first-child a { background: var(--navy); color: #fff; border-color: var(--navy); }
.admin-quick b { font-size: 1.1rem; }
.admin-quick span { font-size: .86rem; opacity: .75; }
@media (max-width: 800px) { .admin-quick { grid-template-columns: 1fr 1fr; } }
.source { width: 100%; min-height: 340px; font: 14px/1.5 ui-monospace, Consolas, monospace; padding: 1rem; border: 1.5px solid #d6cfc1; border-radius: 12px; }
.attach ul { list-style: none; padding: 0; margin: 0; }
.attach li { padding: .3rem 0; }
.check { display: flex !important; align-items: center; gap: .5rem; font-weight: 500 !important; }
.status { min-height: 1.5em; margin: 0; color: var(--gold-ink); font-weight: 700; }
.hint { color: var(--ink-2); font-size: .9rem; }
