/* 폰트는 우리가 안고 있다 — 구글 CDN 에서 부르면 방문자 IP 가 구글로 넘어가고,
   뮌헨 지방법원이 그것을 GDPR 위반으로 봤다(2022, 3 O 17493/20). 독자가 유럽이라 해당된다.
   덤으로 렌더를 막던 구글 폰트 CSS 250ms 가 사라진다. */
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/karla-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/karla-normal-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/karla-normal-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/karla-normal-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url(fonts/newsreader-italic-300_500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url(fonts/newsreader-italic-300_500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(fonts/newsreader-normal-300_500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(fonts/newsreader-normal-300_500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The Block Corner (국내 이름은 「옆반」) — 편 전체가 쓰는 한 벌. 편마다 복사하지 마라 */

:root {
  --ground: #F6F7F2; --surface: #FFFFFF; --paper: #FFFFFF;
  --ink: #22251F; --ink-soft: #55594E; --ink-faint: #8A8F82;
  --rule: #DDE2D5;
  --leaf: #2E6B49; --leaf-soft: #C9DFCE;
  --ochre: #B07F24;
  --clay: #B9705A;
  --stone: #8E9A90;
  --measure: 33rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #14170F; --surface: #242A20; --paper: #454E39; --paper: #454E39;
    --ink: #E9EBE1; --ink-soft: #B0B5A6; --ink-faint: #7C8274;
    --rule: #3C4435;
    --leaf: #8CC79F; --leaf-soft: #27392C;
    --ochre: #D9AC55; --clay: #D98F76; --stone: #869287;
  }
}
:root[data-theme="dark"] {
  --ground: #14170F; --surface: #242A20; --paper: #454E39;
  --ink: #E9EBE1; --ink-soft: #B0B5A6; --ink-faint: #7C8274;
  --rule: #3C4435;
  --leaf: #8CC79F; --leaf-soft: #27392C;
  --ochre: #D9AC55; --clay: #D98F76; --stone: #869287;
}

* { box-sizing: border-box; }

body {
  background: var(--ground); color: var(--ink);
  font-family: "Karla", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem; line-height: 1.72; margin: 0;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--measure); margin: 0 auto;
  padding: 2.5rem 1.35rem 4rem;
  display: flex; flex-direction: column; gap: 2.25rem;
}

/* 머리 */
.masthead { display: flex; flex-direction: column; gap: 1.1rem; }

.brand {
  font-family: "Karla", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.94rem; letter-spacing: 0.005em; color: var(--ink-soft);
  text-decoration: none; align-self: flex-start;
  margin: 0; font-weight: inherit;          /* 대문은 h1 이라 기본값이 따라온다 */
  display: inline-block; padding: 0.5rem 0;
}
.brand:hover, .brand:focus-visible { color: var(--leaf); }

.whoweare {
  font-size: 0.82rem; line-height: 1.6; color: var(--leaf); font-weight: 500;
  margin: 0; padding-bottom: 0.85rem; border-bottom: 1px solid var(--rule);
}

h1 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400; font-size: 2.9rem; line-height: 1.02;
  letter-spacing: -0.02em; margin: 0; text-wrap: balance;
}

.hero { width: 100%; height: auto; display: block; }

.intro {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic; font-size: 1.22rem; line-height: 1.45; color: var(--leaf);
  margin: 0; padding-left: 0.95rem; border-left: 2px solid var(--leaf-soft);
}

/* 본문 — 장면 */
.moments { display: flex; flex-direction: column; gap: 0; }

.moment {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.75rem 0; border-top: 1px solid var(--rule);
}
.moments .moment:last-child { border-bottom: 1px solid var(--rule); }

.thing {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ochre); margin: 0;
}

.line {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic; font-weight: 300; font-size: 1.62rem; line-height: 1.3;
  margin: 0; text-wrap: pretty;
}
.line.child { color: var(--leaf); }

p.back { margin: 0.4rem 0 0; color: var(--ink-soft); }
p.back + p.back { margin-top: 0.7rem; }

/* 다른 문으로 */
.doors { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.9rem; }
.doors a {
  color: var(--leaf); text-decoration: none;
  border-bottom: 1px solid var(--leaf-soft); align-self: flex-start;
}
.doors a:hover, .doors a:focus-visible { border-bottom-color: var(--leaf); }

footer {
  border-top: 1px solid var(--rule); padding-top: 1.1rem;
  font-size: 0.82rem; line-height: 1.7; color: var(--ink-faint); margin: 0;
}
footer a { color: var(--leaf); }

.stream { display: flex; flex-direction: column; gap: 0; }
.stream a {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1.4rem 0; border-top: 1px solid var(--rule);
  text-decoration: none; color: inherit;
}
.stream a:last-child { border-bottom: 1px solid var(--rule); }
.stream a:hover .said, .stream a:focus-visible .said { color: var(--leaf); }
.said {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic; font-weight: 300; font-size: 1.5rem; line-height: 1.28;
  margin: 0; text-wrap: pretty; transition: color 120ms ease;
}
.whose { font-size: 0.78rem; color: var(--ink-faint); margin: 0; }

.drawers { display: flex; flex-direction: column; gap: 0.9rem; }
.drawer {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1.25rem 1.35rem; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 5px;
  text-decoration: none; color: inherit;
  transition: border-color 120ms ease, transform 120ms ease;
}
.drawer:hover, .drawer:focus-visible { border-color: var(--leaf); transform: translateY(-1px); }
.drawer:hover em, .drawer:focus-visible em { color: var(--leaf); }
.drawer b {
  font-family: "Newsreader", Georgia, serif; font-weight: 400;
  font-size: 1.35rem; line-height: 1.15; color: var(--ink);
}
.drawer span { font-size: 0.88rem; color: var(--ink-soft); }
.drawer em {
  font-style: normal; font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--ochre); font-weight: 700;
  transition: color 120ms ease;
}

a:focus-visible, .drawer:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; }

@media (min-width: 34rem) {
  h1 { font-size: 3rem; }
  .line { font-size: 1.6rem; }
  .page { padding: 3.5rem 2rem 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── 소재 페이지 (DB 생성분) ─────────────────────────── */
.topic-crumb {
  font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-faint); text-decoration: none; align-self: flex-start;
}
.topic-crumb:hover, .topic-crumb:focus-visible { color: var(--leaf); }

.episodes { display: flex; flex-direction: column; gap: 3.6rem; }

.episode { display: flex; flex-direction: column; gap: 0.9rem; }
.episode h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400; font-size: 1.5rem; line-height: 1.2;
  letter-spacing: -0.01em; margin: 0; text-wrap: balance;
}
.episode p { margin: 0; }

.episode p.said {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.16rem; line-height: 1.45; color: var(--leaf);
  padding-left: 1.05rem; border-left: 2px solid var(--leaf-soft);
}

.tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem;
  margin-top: 0.35rem; padding-top: 0.75rem; border-top: 1px solid var(--rule);
  font-size: 0.78rem; color: var(--ink-faint);
}
.tags .age { color: var(--ochre); font-weight: 500; }

/* ── 대문 소재 목록 ─────────────────────────────────── */
.topic-list { display: flex; flex-direction: column; gap: 0.55rem; }
.topic-row {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.8rem 0.95rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 5px;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.topic-row:hover, .topic-row:focus-visible { border-color: var(--leaf-soft); transform: translateY(-1px); }
.topic-row .t { display: flex; flex-direction: column; gap: 0.12rem; flex: 1; min-width: 0; }
.topic-icon {
  width: 58px; height: 48px; flex: none; padding: 3px;
  background: var(--ground); border-radius: 4px;
}
.topic-row .n {
  font-family: "Newsreader", Georgia, serif; font-size: 1.36rem; line-height: 1.2;
  letter-spacing: -0.01em; color: var(--ink);
}
.topic-row .s {
  font-size: 0.86rem; color: var(--ink-faint);
  /* 한 줄로 묶는다 — 두 줄이 되면 그 카드만 키가 커져 목록의 리듬이 깨진다 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topic-row .chev {
  flex: none; font-size: 1.5rem; line-height: 1; color: var(--ink-faint);
  transition: transform 0.12s ease, color 0.12s ease;
}
.topic-row:hover .n, .topic-row:focus-visible .n { color: var(--leaf); }
.topic-row:hover .chev, .topic-row:focus-visible .chev { color: var(--leaf); transform: translateX(2px); }

/* ── 페이지 꼬리 ─────────────────────────────────────── */
.tail {
  display: flex; flex-direction: column; gap: 1.5rem;
  margin-top: 1.2rem; padding-top: 1.9rem; border-top: 1px solid var(--rule);
}
.share {
  align-self: flex-start; font: inherit; font-size: 0.86rem;
  padding: 0.55rem 1rem; border: 1px solid var(--rule); border-radius: 5px;
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
}
.share:hover, .share:focus-visible { border-color: var(--leaf); color: var(--leaf); }

.more { display: flex; flex-direction: column; }
.more-h {
  font-size: 0.76rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 0.65rem;
}
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.more-card {
  display: flex; align-items: center; gap: 0.6rem; min-width: 0;
  padding: 0.5rem 0.65rem; min-height: 3.35rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 5px;
  transition: border-color 0.12s ease;
}
.more-card:hover, .more-card:focus-visible { border-color: var(--leaf-soft); }
.more-card .mi { width: 38px; height: 32px; flex: none; padding: 2px; background: var(--ground); border-radius: 3px; }
.more-card .mn {
  font-family: "Newsreader", Georgia, serif; font-size: 1rem; line-height: 1.18;
  color: var(--ink); min-width: 0;
}
.more-card:hover .mn, .more-card:focus-visible .mn { color: var(--leaf); }

.colophon { font-size: 0.82rem; color: var(--ink-faint); margin: 0; }
.colophon a { color: var(--ink-faint); display: inline-block; padding: 0.62rem 0; }
.colophon a:hover { color: var(--leaf); }

/* ── 광고 자리 ───────────────────────────────────────────
   본문 사이 = In-article(반응형, 모바일 세로에서 전폭) · 꼬리 = Multiplex(관련 콘텐츠형).
   ★ 반응형 광고에는 고정 높이를 주지 않는다 — 광고가 잘린다.
     아래 높이는 :empty 일 때만, 즉 승인 전 자리 표시용이다. */
.ad-slot {
  margin: 0.4rem 0; padding: 1.4rem 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
}
.ad-slot::before {
  content: "Advertisement";
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}
/* 승인 전에는 자리를 통째로 감춘다. 광고가 들어오면 :empty 가 풀려 저절로 되살아난다 */
.ad-slot:empty { display: none; }
.tail-ad { margin: 0; }

/* 광고가 실제로 들어오면 라벨만 남기고 자리 표시는 사라진다 */
.ad-slot:not(:empty) { flex-direction: column; gap: 0.55rem; }
