/*
Theme Name: 시대를 읽다
Theme URI: https://example.com
Author: themoonrise0
Description: 묵상·사회·정치·테크를 기독교인의 관점으로 읽는 블로그를 위한 미니멀 모바일 우선 테마. 최신 글 + 목차형 목록 + 글 읽기, 애드센스/쿠팡 파트너스 슬롯 내장.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: sidae
*/

/* ── 토큰 ─────────────────────────────────────────────── */
:root {
  --bg: #f3f2f2;
  --surface: #eae9e9;
  --text: #201f1d;
  --accent: #b68235;
  --accent-100: #fff3e4;
  --accent-600: #a06f24;
  --accent-700: #7d5411;
  --accent-800: #5a3b0a;
  --n-100: #f8f4f4;
  --n-200: #eae7e7;
  --n-400: #bab6b6;
  --n-600: #7d7979;
  --n-700: #605d5d;
  --n-800: #444141;
  --n-900: #2d2b2b;
  --divider: rgba(32, 31, 29, 0.16);
  --radius: 4px;
  --wrap: 620px;             /* 본문 최대 폭 — 모바일 우선, 데스크톱에선 가운데 정렬 */
  --heading: "Cormorant Garamond", Georgia, serif;
}

@font-face { font-family:'NanumSquareNeo'; src:url('assets/fonts/NanumSquareNeoOTF-Lt.otf') format('opentype'); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'NanumSquareNeo'; src:url('assets/fonts/NanumSquareNeoOTF-Rg.otf') format('opentype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'NanumSquareNeo'; src:url('assets/fonts/NanumSquareNeoOTF-Bd.otf') format('opentype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'NanumSquareNeo'; src:url('assets/fonts/NanumSquareNeoOTF-Eb.otf') format('opentype'); font-weight:800; font-style:normal; font-display:swap; }
@font-face { font-family:'NanumSquareNeo'; src:url('assets/fonts/NanumSquareNeoOTF-Hv.otf') format('opentype'); font-weight:900; font-style:normal; font-display:swap; }

:root { --kr: "NanumSquareNeo", "Noto Sans KR", system-ui, sans-serif; }

/* ── 기본 ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--kr);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-700); text-decoration: none; }
a:hover { color: var(--accent-600); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(182, 130, 53, 0.3); }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.hr { height: 1px; background: var(--divider); border: 0; margin: 0; }

/* 편집기의 구분선 블록 — 브라우저 기본 hr(입체 테두리)이 굵게 보이는 것을 막는다 */
hr, .wp-block-separator {
  height: 1px; border: 0; background: var(--divider);
  margin: 34px auto; opacity: 1; max-width: 100%;
}
.wp-block-separator.is-style-wide { max-width: 100%; }
.wp-block-separator.is-style-dots { background: none; height: auto; text-align: center; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── 헤더 ─────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--divider); }
.site-header .wrap { padding: 26px 20px 20px; }
/* 라틴 세리프에는 한글 글리프가 없어 제목류는 나눔스퀘어로 짠다 */
.site-title {
  font-family: var(--kr); font-weight: 700; font-size: 23px;
  letter-spacing: -0.035em; margin: 0; line-height: 1.35;
}
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent-700); }
.site-desc { font-size: 18px; color: var(--n-700); margin-top: 3px; word-break: keep-all; }

.post-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 14px; }
.post-header .back { font-size: 12.5px; color: var(--n-700); }
.post-header .back:hover { color: var(--accent-700); }
.post-header .mark { font-family: var(--kr); font-weight: 700; font-size: 14px; letter-spacing: -0.03em; color: var(--n-700); }

/* 상단 메뉴 */
.site-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 13px; }
.site-nav a {
  color: var(--n-700); padding-bottom: 3px; border-bottom: 1px solid transparent;
  min-height: 24px; display: inline-flex; align-items: center;
}
.site-nav a:hover { color: var(--accent-700); border-bottom-color: var(--divider); }
.site-nav a.is-active { color: var(--accent-700); border-bottom-color: var(--accent); }

/* ── 최신 글 ──────────────────────────────────────────── */
.featured { display: block; padding: 26px 20px 24px; border-bottom: 1px solid var(--divider); color: var(--text); }
.featured:hover { background: var(--n-100); color: var(--text); }
.featured-meta { display: flex; align-items: center; gap: 9px; }
.kicker {
  font-family: var(--kr); font-weight: 700; font-size: 10.5px;
  letter-spacing: 0.12em; color: var(--accent-700); white-space: nowrap;
}
.rule { flex: 1; height: 1px; background: var(--divider); }
.featured-date { font-size: 11px; color: var(--n-600); }
.featured-title {
  font-size: 21px; font-weight: 700; line-height: 1.5; letter-spacing: -0.03em;
  margin: 14px 0 0; word-break: keep-all; text-wrap: pretty;
}
.featured-excerpt { font-size: 13.5px; line-height: 1.85; color: var(--n-800); margin-top: 11px; word-break: keep-all; }
.featured-more { font-size: 12.5px; color: var(--accent-700); margin-top: 14px; }

/* ── 카테고리 칩 ──────────────────────────────────────── */
.chips {
  display: flex; gap: 7px; padding: 18px 20px; overflow-x: auto;
  border-bottom: 1px solid var(--divider); -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  font-size: 12.5px; padding: 7px 14px; white-space: nowrap; border-radius: 999px;
  border: 1px solid var(--divider); color: var(--n-700); background: transparent;
  min-height: 34px; display: inline-flex; align-items: center;
}
.chip:hover { border-color: var(--accent); color: var(--accent-700); }
.chip.is-active { border-color: var(--accent); background: var(--accent-100); color: var(--accent-800); }

/* ── 목차형 목록 ──────────────────────────────────────── */
.index { padding: 26px 20px 0; }
.index-label {
  font-family: var(--kr); font-weight: 700; font-size: 12px;
  letter-spacing: 0.08em; color: var(--n-700); margin-bottom: 16px;
}
.year { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 6px; }
.year:first-of-type { margin-top: 0; }
.year span { font-family: var(--heading); font-size: 15px; color: var(--n-700); }
.entry {
  display: flex; align-items: baseline; gap: 14px; padding: 15px 0;
  border-bottom: 1px solid var(--divider); color: var(--text); min-height: 44px;
}
.entry:hover { color: var(--accent-700); }
.entry-title { flex: 1; font-size: 15px; line-height: 1.5; letter-spacing: -0.01em; word-break: keep-all; }
.entry-date { font-size: 11.5px; color: var(--n-600); white-space: nowrap; }

/* ── 버튼 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--kr); font-weight: 700; font-size: 13.5px;
  padding: 12px 26px; min-height: 44px; cursor: pointer;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent-700); border-radius: var(--radius);
}
.btn:hover { background: var(--accent-100); color: var(--accent-700); }
.btn:active { border-color: var(--accent-600); color: var(--accent-800); }
.more { display: flex; justify-content: center; gap: 10px; padding: 30px 20px 0; }

/* ── 구독 / 문의 ──────────────────────────────────────── */
.subscribe {
  margin: 36px 20px 0; border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 22px 20px; background: var(--n-100);
}
.subscribe h2 { font-family: var(--kr); font-size: 18px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.subscribe p { font-size: 12.5px; color: var(--n-700); margin: 6px 0 0; line-height: 1.7; word-break: keep-all; }
.subscribe .btn { margin-top: 16px; width: 100%; }
.subscribe .contact {
  font-size: 12px; color: var(--n-700); margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--divider);
}

/* ── 글 ───────────────────────────────────────────────── */
.article { padding: 38px 24px 0; }
.article .cat { font-family: var(--kr); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; color: var(--accent-700); }
.article h1 {
  font-size: 25px; font-weight: 700; line-height: 1.5; letter-spacing: -0.035em;
  margin: 14px 0 0; word-break: keep-all; text-wrap: pretty;
}
.article-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--n-600); margin-top: 16px; }
.article-body { padding: 0 24px; }
.article-body p { font-size: 15.5px; line-height: 2; text-align: justify; word-break: keep-all; margin: 0 0 18px; }
.article-body h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.025em; margin: 34px 0 12px; word-break: keep-all; }
.article-body h3 { font-size: 16.5px; font-weight: 700; margin: 28px 0 10px; }
.article-body ul, .article-body ol { padding-left: 20px; margin: 0 0 18px; }
.article-body li { font-size: 15.5px; line-height: 1.85; letter-spacing: -0.01em; margin-bottom: 6px; word-break: keep-all; }
.article-body p {
  font-size: 15.5px; line-height: 1.85; letter-spacing: -0.01em;
  text-align: left; word-break: keep-all; margin: 0 0 18px;
}
.article-body img, .article-body .wp-block-image img {
  border: 6px solid var(--surface); outline: 1px solid var(--divider);
  filter: sepia(0.22) saturate(0.82) contrast(1.05); margin: 24px 0;
}
.article-body blockquote {
  border-left: 2px solid var(--accent); padding: 2px 0 2px 18px; margin: 26px 0;
  font-family: var(--kr); font-size: 18px; font-weight: 300; letter-spacing: -0.02em;
  line-height: 1.75; color: var(--n-900); word-break: keep-all;
}
.article-body blockquote p { font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; text-align: left; margin: 0; }
.article-body blockquote cite {
  display: block; font-family: var(--kr); font-size: 11.5px; font-style: normal;
  color: var(--n-600); margin-top: 10px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px; margin-top: 20px; }
.tag { font-size: 11.5px; padding: 6px 11px; border: 1px solid var(--divider); border-radius: var(--radius); color: var(--n-700); }
.tag:hover { border-color: var(--accent); color: var(--accent-700); }

/* ── 소개 페이지 ────────────────────────────────────── */
.about-kicker { font-family: var(--heading); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-700); }
.about-lede {
  font-size: 26px; line-height: 1.45; font-weight: 300; margin: 12px 0 0;
  letter-spacing: -0.03em; word-break: keep-all; text-wrap: pretty;
}
/* 본문에 직접 쓴 큰 글씨(리드 문장)도 같은 조판으로 */
.page .article-body p.has-large-font-size,
.page .article-body p.has-x-large-font-size,
.page .article-body h2:first-child {
  font-size: 26px; line-height: 1.45; font-weight: 300;
  letter-spacing: -0.03em; margin: 0 0 24px; text-align: left; word-break: keep-all;
}
.page .article-body > *:first-child { margin-top: 0; }
.topics { padding: 0 24px; margin-top: 30px; }
.topics .index-label { margin-bottom: 6px; }
.topic {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--divider); color: var(--text);
}
.topic:hover { color: var(--accent-700); }
.topic .name { font-size: 15px; }
.topic .note { font-size: 12px; color: var(--n-600); word-break: keep-all; text-align: right; }

/* ── 서재 ─────────────────────────────────────────────── */
.library-intro { padding: 30px 20px 22px; }
.library-title { font-size: 25px; font-weight: 700; letter-spacing: -0.035em; margin: 12px 0 0; }
.library-desc { font-size: 13px; color: var(--n-700); line-height: 1.8; margin: 10px 0 0; word-break: keep-all; }

.books { padding: 26px 20px 0; }
.book {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 0;
  border-bottom: 1px solid var(--divider); color: var(--text);
}
.book:hover { color: var(--accent-700); }
.book-cover {
  width: 54px; flex: none; aspect-ratio: 2 / 3; overflow: hidden;
  border: 4px solid var(--surface); outline: 1px solid var(--divider); background: var(--n-200);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.22) saturate(0.82) contrast(1.05); }
.book-text { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.book-title { font-size: 15px; font-weight: 700; line-height: 1.5; letter-spacing: -0.025em; word-break: keep-all; }
.book-byline { font-size: 12px; color: var(--n-600); }
.book-pull { font-size: 12.5px; color: var(--n-800); line-height: 1.75; word-break: keep-all; }
.book-year { font-size: 11.5px; color: var(--n-600); flex: none; }

.book-plate { padding: 26px 24px 0; }
.book-plate .plate { display: block; max-width: 200px; }
.book-plate img { width: 100%; height: auto; }
.book-pull-lg {
  padding: 0 24px; margin: 26px 0 0; font-size: 17px; font-weight: 300;
  line-height: 1.8; letter-spacing: -0.02em; color: var(--n-900); word-break: keep-all;
}
.book-buy { padding: 30px 20px 0; }
.book-buy .btn { width: 100%; }

/* ── 광고 ─────────────────────────────────────────────── */
.ads { padding: 28px 20px 0; }
.ads-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--n-600); text-align: center; margin-bottom: 10px; }
.ad-slot { overflow: hidden; }
.ad-slot + .ad-slot { margin-top: 14px; }
.ad-placeholder {
  border: 1px dashed var(--n-400); border-radius: var(--radius); background: var(--n-100);
  min-height: 250px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; text-align: center; padding: 16px;
}
.ad-placeholder span { font-size: 12px; color: var(--n-700); }
.ad-placeholder small { font-size: 11px; color: var(--n-600); }
.coupang-notice {
  font-size: 10.5px; color: var(--n-600); line-height: 1.6;
  margin-top: 10px; word-break: keep-all;
}

/* ── 이전/다음 · 관련 글 ──────────────────────────────── */
.adjacent { padding: 32px 20px 0; }
.adjacent .hr { margin-bottom: 4px; }
.adjacent a {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--divider); color: var(--text); min-height: 44px;
}
.adjacent a:hover { color: var(--accent-700); }
.adjacent .dir { font-size: 10.5px; letter-spacing: 0.14em; color: var(--n-600); width: 44px; flex: none; }
.adjacent .t { font-size: 14px; line-height: 1.5; word-break: keep-all; }
.related { padding: 34px 20px 0; }
.related .index-label { margin-bottom: 8px; }
.related a {
  display: flex; align-items: baseline; gap: 14px; padding: 13px 0;
  border-bottom: 1px solid var(--divider); color: var(--text); min-height: 44px;
}
.related a:hover { color: var(--accent-700); }
.related .t { flex: 1; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.related .d { font-size: 11px; color: var(--n-600); white-space: nowrap; }

/* ── 푸터 ─────────────────────────────────────────────── */
.site-footer { margin-top: 34px; border-top: 1px solid var(--divider); }
.site-footer .wrap {
  padding: 32px 24px 30px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
/* 세부 페이지에서는 메뉴를 푸터 왼쪽에 세로로 쌓는다 */
.site-footer.has-nav .wrap { flex-direction: column; align-items: flex-start; gap: 22px; padding: 34px 24px 32px; }
.site-nav--footer { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 0; font-size: 14px; }
.site-nav--footer a { border-bottom: none; }
.site-nav--footer a:hover { border-bottom: none; text-decoration: underline; text-underline-offset: 4px; }
.site-footer.has-nav .copy { color: var(--n-600); }
.site-footer .mark, .site-footer a { font-family: var(--kr); font-size: 13.5px; color: var(--n-700); }
.site-footer a:hover { color: var(--accent-700); }
.site-footer nav { display: flex; gap: 18px; }
.site-footer .copy { font-size: 11px; color: var(--n-600); }

/* ── 데스크톱 ─────────────────────────────────────────── */
@media (min-width: 600px) {
  body { font-size: 16px; }
  .site-header .wrap { padding: 40px 32px 28px; }
  .site-title { font-size: 30px; }
  .site-nav { gap: 24px; font-size: 14px; }
  .featured, .chips, .index, .ads, .adjacent, .related, .article, .article-body { padding-left: 32px; padding-right: 32px; }
  .article-body p { text-align: justify; }
  .featured-title { font-size: 25px; }
  .article h1 { font-size: 32px; }
  .subscribe { margin-left: 32px; margin-right: 32px; }
  .subscribe .btn { width: auto; }

}
/* ── 굵기 보정 ─────────────────────────────────────── */
body { font-weight: 400; }

/* 목록·본문 */
.entry-title        { font-weight: 700; }
.article-body p,
.article-body li    { font-weight: 400; }
.featured-excerpt,
.book-pull,
.site-desc,
.library-desc       { font-weight: 700; color: var(--n-800); }

/* 제목류 한 단계 위로 */
.site-title         { font-weight: 900; }
.featured-title,
.article h1,
.library-title,
.book-title         { font-weight: 800; }
.about-lede,
.book-pull-lg,
.article-body blockquote { font-weight: 400; }

/* 라벨·버튼 */
.index-label,
.kicker,
.article .cat,
.btn,
.chip.is-active     { font-weight: 700; }
.chip               { font-weight: 700; }
/* about 밑에 글*/
.page-template-template-about .article-body p.has-large-font-size,
.page-template-template-about .article-body p.has-x-large-font-size,
.page-template-template-about .article-body h1:first-child,
.page-template-template-about .article-body h2:first-child,
.page-template-template-about .article-body h3:first-child {
  font-size: 20px; line-height: 1.3; font-weight: 800;
  letter-spacing: -0.03em; margin: 0 0 24px; text-align: left; word-break: keep-all;
}
/* 캡션 작게 */
.article-body figcaption,
.article-body .wp-element-caption,
.wp-block-image figcaption,
.wp-block-gallery figcaption,
.wp-block-embed figcaption {
  font-size: 11px; line-height: 1; letter-spacing: 0; font-weight: 300;
  color: var(--n-600); text-align: center; margin: 6px 0 0; word-break: keep-all;
}
.article-body figure { margin: 24px 0; }
.article-body figure img,
.wp-block-image img { margin-bottom: 0; display: block; }
.wp-block-image figure { margin-bottom: 0; }
/* 좌우 스크롤 금지 */
html, body { overflow-x: hidden; max-width: 100%; }
.wrap { width: 100%; overflow-x: clip; }
.article-body iframe,
.article-body video,
.article-body table,
.article-body pre { max-width: 100%; }
.article-body pre { overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.article-body a { overflow-wrap: anywhere; }