/* 유천서적편집소 l.halv.kr
 * 짜임은 블로그(b.halv.kr)를 따른다: 640px 판면, 가운데 題字와 子持ち罫, 가운데 題目, 點線 目錄, 짧은 줄 꼬리말.
 * 색은 책과 같이 먹 + 별색(마젠타) 하나. 글꼴도 블로그와 같이: 본문 한글 은바탕・漢字 石井明朝 オールド R・라틴 Newsreader,
 * 題目은 石井ゴシック B, 메뉴・날짜는 石井ゴシック R (寫硏은 TypeSquare, 한글은 은돋움으로 떨어진다).
 */
:root {
  color-scheme: light dark;
  --bg: #fdfcf9;
  --text: #1c1b18;
  --muted: #736e65;
  --border: #e9e5db;
  --dots: #bdb6a6;
  --accent: #b5467a;
  --ink-rule: color-mix(in srgb, var(--text) 72%, var(--bg));

  --latin: "Newsreader";
  --mincho: var(--latin), "UnBatang", "IshiiMincho Old R", "Hiragino Mincho ProN", "Zen Old Mincho", serif;
  --gothic: "IshiiGothic R", "UnDotum", "Hiragino Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --gothic-b: "IshiiGothic B", "UnDotum", "Hiragino Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --fs-caption: .8125rem;
  --fs-ui: .82rem;
  --fs-body: .926rem;
  --fs-h2: 1.2175rem;
  --fs-h1: 1.625rem;
  --max-width: 640px;
  --gutter: 1.5rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --text: #e7e5e0;
    --muted: #9b968c;
    --border: #2c2b30;
    --dots: #4a4850;
    --accent: #e486ae;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mincho);
  font-size: var(--fs-body);
  font-weight: 350;
  font-optical-sizing: auto;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--gothic-b); font-weight: 700; font-synthesis: none; margin: 0; line-height: 1.4; }
p { margin: 0; }

/* 題字 + 子持ち罫 */
.mast { max-width: var(--max-width); margin: 0 auto; padding: 2.75rem var(--gutter) 0; text-align: center; }
.mast .name {
  display: inline-block;
  font-family: var(--gothic-b); font-weight: 700; font-synthesis: none;
  font-size: 1.75rem; line-height: 1;
  letter-spacing: .2em; margin-right: -.2em;   /* 마지막 글자 뒤 자간만큼 당겨 가운데를 맞춤 */
}
.mast .name:hover { color: inherit; }
.mast::after {
  content: ""; display: block;
  margin-top: 1.9rem;
  height: 2px;
  border-top: 2.5px solid var(--ink-rule);
  border-bottom: 1px solid var(--ink-rule);
}

main { max-width: var(--max-width); margin: 0 auto; padding: 3rem var(--gutter) 4rem; }

/* 目錄 꼴 題目 (가운데) */
.page-title { font-size: 1.375rem; text-align: center; margin-bottom: 1.75rem; }

/* 간행물 */
.pub + .pub { margin-top: 2.5rem; }
.pub h2 { font-size: var(--fs-h2); }
.han { font-family: var(--mincho); font-weight: 400; font-size: .8em; color: var(--muted); margin-left: .45em; letter-spacing: .05em; }
.desc { font-family: var(--gothic); font-size: var(--fs-ui); color: var(--muted); margin-top: .1rem; }

/* 點線으로 잇는 목록 (호, 정오 항목) */
.toc { list-style: none; margin: .9rem 0 0; padding: 0; }
.toc li { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 0 .7rem; padding: .42rem 0; }
.toc li > .head { flex: 0 1 auto; min-width: 0; }
.toc li::after {
  content: ""; order: 1; flex: 1 1 1.5rem; min-width: 1.5rem;
  border-bottom: 1.5px dotted var(--dots); transform: translateY(-.3em);
}
.toc li > .meta { order: 2; flex: 0 0 auto; }
.vol { font-family: var(--gothic); font-size: var(--fs-caption); color: var(--muted); margin-left: .5em; }
.meta { font-family: var(--gothic); font-size: var(--fs-caption); color: var(--muted); }
.meta .cat { color: var(--accent); margin-right: 1.1em; }
.meta .cat:hover { text-decoration: underline; text-underline-offset: .25em; }
.num { font-variant-numeric: oldstyle-nums tabular-nums; }

/* 글 첫머리 (가운데 題目 + 짧은 줄) */
.head-block { text-align: center; position: relative; margin-bottom: 2.2rem; padding-bottom: 1.5rem; }
.head-block h1 { font-size: var(--fs-h1); margin-bottom: .55rem; }
.head-block .meta a { color: var(--accent); }
.head-block .meta .sep { margin: 0 .55em; color: var(--dots); }
.head-block::after {
  content: ""; position: absolute; bottom: 0; left: 50%;
  width: 2.5rem; margin-left: -1.25rem; border-top: 1px solid var(--ink-rule);
}

/* 정오표 꼭지 */
.part + .part { margin-top: 2.4rem; }
.part h2 { font-size: var(--fs-h2); margin-bottom: .7em; }
.none { color: var(--muted); }
.pg {
  display: inline-block; min-width: 1.6em; margin-right: .6em; padding: 0 .25em;
  font-family: var(--gothic); font-size: var(--fs-caption); line-height: 1.35; text-align: center;
  border: 1px solid var(--ink-rule); transform: translateY(-.08em);
}
.fix del { color: var(--muted); text-decoration-color: var(--accent); }
.fix ins { text-decoration: none; color: var(--text); font-family: var(--gothic-b); font-weight: 700; font-synthesis: none; }
.fix .ar { margin: 0 .4em; }

/* 꼬리말 (奧付) */
footer {
  max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter) 3.5rem;
  text-align: center; font-family: var(--gothic); font-size: var(--fs-caption); color: var(--muted); line-height: 1.9;
}
footer::before { content: ""; display: block; width: 2.5rem; margin: 0 auto 1rem; border-top: 1px solid var(--ink-rule); }
footer a:hover { text-decoration: underline; text-underline-offset: .25em; }

/* 좁은 화면: 點線은 한 줄에 들어갈 때만 */
@media (max-width: 560px) {
  .mast .name { font-size: 1.5rem; letter-spacing: .16em; margin-right: -.16em; }
  .mast::after { margin-top: 1.5rem; }
  main { padding-top: 2.25rem; }
  .toc li { flex-wrap: wrap; row-gap: .15rem; padding: .55rem .5rem; }
  .toc li::after { display: none; }
  .toc li > .head { flex-basis: 100%; }
}
