/* ============================================================
   도서관 테마 (설교자의 서재와 같은 꼴) — K-LOGOS 허브 · We Church 공용
   크림 바탕 · 종이 카드 · 갈색 글자 · 테라코타 강조 · Pretendard · 이모지·그라데이션 없음
   ============================================================ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --bg: #F6EFE5; --paper: #FFFBF5; --paper2: #F1E7DA; --ink: #3A281C; --sub: #6E523C; --mute: #8B7B6C; --line: #E6D8C6;
  --accent: #B5562F; --accent-h: #A04A27; --accent-ink: #FFFFFF; --accent-bg: #F7E3D8;
  --mint: #DDEFE7; --ok: #2F6B4F; --ok-bg: #E6F2EC; --bad: #A33A2A; --bad-bg: #FBEDEA;
  --brand: #6B1328;
  --r: 14px; --r2: 22px;
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body.lib { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); overflow-x: hidden; }
body.lib a { color: inherit; }
body.lib [hidden] { display: none !important; }
.lib img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 위쪽 막대 */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246, 239, 229, .94); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; min-width: 0; }
.brand img { height: 28px; width: auto; display: block; }
.brand .brand-sub { font-weight: 700; color: var(--sub); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.topnav a.plain { text-decoration: none; padding: 8px 10px; border-radius: 10px; color: var(--sub); font-weight: 600; font-size: 15px; white-space: nowrap; }
.topnav a.plain:hover { background: var(--paper); color: var(--ink); }
.topnav a.plain[aria-current="page"] { color: var(--ink); background: var(--paper); }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #D7C3AB; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn[aria-disabled="true"], .btn[disabled] { opacity: .55; cursor: default; }
.btn:focus-visible, .tab:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid rgba(181, 86, 47, .35); outline-offset: 2px; }

/* 글 */
.lib h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
.lib h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 6px; }
.lib h3 { font-size: 18px; margin: 0 0 6px; }
.lead { color: var(--sub); margin: 0 0 22px; font-size: 16px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--accent); margin-bottom: 6px; }
.note { font-size: 14px; color: var(--sub); }
section.sec { padding: 56px 0 8px; }

/* 카드 · 띠 */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card p { margin: 0; color: var(--sub); font-size: 15px; }
.card p + p { margin-top: 8px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--sub); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); border-color: #BFDCCB; color: var(--ok); }
.badge.accent { background: var(--accent-bg); border-color: #E9C1AC; color: var(--accent); }
.badge.mute { background: #F1ECE5; color: var(--mute); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* 그림 히어로 (도서관 홈페이지와 같은 꼴: 둥근 그림 판 + 오른쪽 글) */
.hero { position: relative; margin: 24px auto 0; max-width: 1120px; padding: 0 16px; }
.hero .pic { position: relative; border-radius: var(--r2); overflow: hidden; background: #F5D6B4 center / cover no-repeat; aspect-ratio: 3 / 1; min-height: 300px; border: 1px solid var(--line); }
.hero .txt { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); width: min(42%, 440px); }
.hero .txt p { margin: 0 0 20px; color: var(--sub); font-size: clamp(15px, 1.7vw, 19px); }
.acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* 바닥글 */
.foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--sub); font-size: 14px; }
.foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .topnav a.hide-sm { display: none; }
  .hero .pic { aspect-ratio: auto; min-height: 0; height: 220px; background-position: 18% center; }
  .hero .txt { position: static; transform: none; width: auto; padding: 18px 2px 0; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section.sec { padding-top: 40px; }
}
@media (max-width: 420px) {
  .brand img { height: 24px; }
  .topnav a.plain { padding: 8px 7px; font-size: 14px; }
  .grid4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
