/* ───────────────────────────────────────────
   이유잇는 동반 성장 가이드북 · e-book styles
   따뜻한 종이책 느낌, 모바일 퍼스트
─────────────────────────────────────────── */
:root {
  --paper: #FBF7F1;
  --surface: #FFFFFF;
  --ink: #37322B;
  --ink-soft: #5C544A;
  --muted: #998F83;
  --line: #EAE2D7;
  --accent: #D97A3E;
  --accent-deep: #B85F28;
  --accent-soft: #FBEEE3;
  --green: #6F9460;
  --green-soft: #EEF3EA;
  --rose: #C96B7D;
  --rose-soft: #F9ECEF;
  --radius: 16px;
  --serif: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-decoration: none; }

/* ── 상단 바 & 진행 바 ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 241, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  font-size: 13px; color: var(--muted);
}
.topbar-inner .home-link { color: var(--ink-soft); font-weight: 600; }
.topbar-inner .home-link span { margin-right: 4px; }
.progress-track { height: 3px; background: transparent; }
.progress-bar { height: 3px; width: 0; background: var(--accent); transition: width .1s linear; }

/* ── 본문 컨테이너 ── */
.wrap { max-width: 680px; margin: 0 auto; padding: 0 22px 64px; }

/* ── 챕터 헤더 ── */
.chapter-head { padding: 44px 0 16px; text-align: center; }
.chapter-head .part-chip {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.06em; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 999px;
  padding: 5px 14px; margin-bottom: 18px;
}
.chapter-head .part-chip.p2 { color: var(--green); background: var(--green-soft); }
.chapter-head .part-chip.p3 { color: var(--rose); background: var(--rose-soft); }
.chapter-head .emoji { font-size: 44px; line-height: 1; margin-bottom: 14px; }
.chapter-head h1 {
  font-family: var(--serif); font-size: 27px; line-height: 1.45;
  font-weight: 700; margin-bottom: 10px;
}
.chapter-head .chapter-sub { color: var(--muted); font-size: 15px; }
.meta-card {
  margin: 26px auto 0; max-width: 520px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px;
  font-size: 14px; color: var(--ink-soft);
  display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.meta-card .row { display: flex; gap: 10px; }
.meta-card .k { flex: none; color: var(--muted); font-weight: 600; }

/* ── 아티클 공통 ── */
article { padding-top: 18px; }
article > p, section.point > p { margin: 1.15em 0; }
article p.lead-in { margin-top: 2em; }
mark { background: linear-gradient(transparent 62%, #F6D8A8 0); color: inherit; padding: 0 2px; }

/* 큰 인용 */
blockquote.pull {
  font-family: var(--serif); font-size: 18.5px; line-height: 2;
  text-align: center; color: var(--ink);
  margin: 2.4em auto; padding: 0 8px;
  position: relative;
}
blockquote.pull::before {
  content: "❝"; display: block; color: var(--accent);
  font-size: 22px; margin-bottom: 6px;
}
blockquote.pull.accent {
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 30px 24px; font-size: 18px;
}
blockquote.pull.accent::before { content: ""; margin: 0; }
blockquote.pull .quote-sub { font-family: var(--sans); font-size: 14.5px; color: var(--ink-soft); }

/* 챕터 서두 테제 */
h2.chapter-thesis {
  font-family: var(--serif); font-size: 22px; line-height: 1.7;
  text-align: center; margin: 2.2em 0 1em;
}
blockquote.thesis-sub {
  text-align: center; color: var(--ink-soft); font-size: 15.5px;
  line-height: 2; margin-bottom: 2.4em;
}
h2.finale-title {
  font-family: var(--serif); font-size: 21px; line-height: 1.75;
  text-align: center; margin: 2.6em 0 0.6em;
}

/* 유주맘의 노력들 */
.efforts {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 22px 24px; margin: 2.2em 0;
}
.efforts h3 { font-size: 16px; margin-bottom: 12px; }
.efforts ul { list-style: none; }
.efforts li { position: relative; padding-left: 20px; margin: 9px 0; font-size: 15.5px; color: var(--ink-soft); }
.efforts li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); font-weight: 900; }

/* POINT 섹션 */
section.point { margin-top: 3.4em; padding-top: 2.6em; border-top: 1px dashed var(--line); }
.point-label {
  display: inline-block; font-size: 12.5px; font-weight: 800;
  letter-spacing: 0.08em; color: var(--accent-deep);
  background: var(--accent-soft); padding: 5px 12px; border-radius: 6px;
  margin-bottom: 14px;
}
section.point h2 { font-family: var(--serif); font-size: 22px; line-height: 1.5; margin-bottom: 6px; }
p.point-sub { color: var(--muted); font-size: 14px; margin-bottom: 1.6em; }

/* 대화 블록 */
p.dialog-block, p.dialog {
  font-family: var(--serif); color: var(--ink-soft);
  background: var(--surface); border-left: 3px solid var(--line);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px; margin: 1.4em 0; font-size: 16px; line-height: 2;
}
p.emphasis { text-align: center; font-size: 18px; margin: 1.8em 0; }

/* 이렇게 해보세요 */
.try {
  background: #FFFDF9; border: 1.5px dashed #E4CDB2;
  border-radius: var(--radius); padding: 24px; margin: 2.2em 0;
}
.try > h3 { font-size: 17px; margin-bottom: 16px; }
.try-item { margin: 20px 0 0; }
.try-item:first-of-type { margin-top: 0; }
.try-item h4 { font-size: 15.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.try-item .num {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.try-item p { font-size: 15px; color: var(--ink-soft); margin: 0.7em 0; }
.try-item p.dont { color: #A8584F; }
.try-item p.do { color: var(--green); }
.try ul.talk-list { list-style: none; }
.try ul.talk-list li { position: relative; padding-left: 18px; margin: 10px 0; font-size: 15px; color: var(--ink-soft); }
.try ul.talk-list li::before { content: "💬"; position: absolute; left: -4px; top: 1px; font-size: 11px; }

/* 콜아웃 / 팁 */
.callout {
  display: flex; gap: 14px; background: #EFF4F9;
  border-radius: var(--radius); padding: 20px; margin: 2em 0;
}
.callout::before { content: attr(data-icon); font-size: 22px; line-height: 1.4; }
.callout h4 { font-size: 15.5px; margin-bottom: 4px; }
.callout p { font-size: 14.5px; color: var(--ink-soft); }
.tip {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; margin: 1.6em 0;
}
.tip-badge {
  flex: none; font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  color: #fff; background: var(--green); border-radius: 6px;
  padding: 3px 8px; margin-top: 5px;
}
.tip p { font-size: 14.5px; color: var(--ink-soft); }

/* 이미지 */
figure { margin: 2em 0; }
figure img { border-radius: var(--radius); border: 1px solid var(--line); }
figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* 핵심 요약 */
section.summary { margin-top: 3.4em; padding-top: 2.6em; border-top: 1px dashed var(--line); }
section.summary > h2 { font-family: var(--serif); font-size: 21px; text-align: center; margin-bottom: 1.2em; }
.summary-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin: 14px 0;
  text-align: center;
}
.summary-card::before { content: attr(data-icon); display: block; font-size: 26px; margin-bottom: 10px; }
.summary-card h3 { font-size: 16px; line-height: 1.6; margin-bottom: 8px; }
.summary-card p { font-size: 14.5px; color: var(--ink-soft); }

/* 마무리 */
section.finale { margin-top: 3em; }
section.finale h2 { font-family: var(--serif); font-size: 21px; text-align: center; margin-bottom: 0.4em; }
section.finale h3 { font-size: 16px; text-align: center; margin-top: 2.4em; }
.signature {
  text-align: right; font-family: var(--serif); font-style: italic;
  color: var(--accent-deep); font-size: 16px; margin: 3em 0 0;
}

/* 저작권 */
.copyright {
  display: flex; gap: 10px; align-items: flex-start;
  background: #F3EEE6; border-radius: 12px;
  padding: 14px 18px; margin-top: 3.5em;
  font-size: 13px; color: var(--muted); line-height: 1.7;
}
.copyright::before { content: "☝️"; }
.copyright a { font-weight: 700; color: var(--ink-soft); text-decoration: underline; }

/* 이전/다음 네비 */
.chapter-nav { margin-top: 2.6em; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chapter-nav a {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; min-height: 74px;
}
.chapter-nav a:active { background: var(--accent-soft); }
.chapter-nav .dir { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }
.chapter-nav .t { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; margin-top: 4px; display: block; }
.chapter-nav a.next { text-align: right; }
.chapter-nav a.disabled { visibility: hidden; }
.toc-return { display: block; text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ───────── 표지(index) ───────── */
.cover { text-align: center; padding: 72px 0 48px; }
.cover .brand-chip {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  color: var(--green); background: var(--green-soft);
  border-radius: 999px; padding: 6px 16px; margin-bottom: 30px;
  letter-spacing: 0.04em;
}
.cover .emoji { font-size: 56px; margin-bottom: 20px; }
.cover h1 {
  font-family: var(--serif); font-size: 33px; line-height: 1.5;
  font-weight: 900; letter-spacing: -0.01em;
}
.cover .subtitle { color: var(--ink-soft); font-size: 16px; margin-top: 14px; }
.cover .faces { font-size: 24px; margin-top: 10px; }
.cover .start-btn {
  display: inline-block; margin-top: 36px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
  border-radius: 999px; padding: 15px 44px;
  box-shadow: 0 6px 18px rgba(217, 122, 62, 0.35);
}
.cover .start-btn:active { background: var(--accent-deep); }
.cover .byline { margin-top: 26px; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 14px; }

/* 목차 */
.toc { padding-bottom: 40px; }
.toc-part { margin-top: 44px; }
.toc-part .part-title {
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--accent-deep); margin-bottom: 6px;
}
.toc-part.p2 .part-title { color: var(--green); }
.toc-part.p3 .part-title { color: var(--rose); }
.toc-part .part-intro {
  font-family: var(--serif); font-size: 14.5px; color: var(--muted);
  line-height: 1.9; margin-bottom: 16px; white-space: pre-line;
}
.toc-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin: 10px 0;
  color: var(--ink);
}
.toc-item:active { background: var(--accent-soft); }
.toc-item .t-emoji { font-size: 22px; flex: none; }
.toc-item .t-body { flex: 1; min-width: 0; }
.toc-item .t-title { font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.toc-item .t-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.toc-item .t-arrow { flex: none; color: var(--muted); font-size: 14px; }
.toc-item.pending { background: transparent; border-style: dashed; opacity: 0.75; }
.toc-item.pending .t-title { color: var(--muted); font-weight: 600; }
.pending-badge {
  flex: none; font-size: 11px; font-weight: 700; color: var(--muted);
  background: #EFE9DF; border-radius: 999px; padding: 3px 10px;
}
.pending-badge.draft { color: #8A6D1F; background: #F7ECCB; }

/* 초안 상태 표시 (완성 시 제거) */
.draft-banner {
  margin: 22px auto 0; max-width: 520px;
  background: #FDF6DF; border: 1px dashed #E0C878;
  border-radius: 12px; padding: 12px 16px;
  font-size: 13.5px; color: #8A6D1F; text-align: center;
}
.draft-note {
  background: #FDF6DF; border: 1px dashed #E0C878;
  border-radius: 10px; padding: 12px 16px; margin: 1.4em 0;
  font-size: 14px; color: #8A6D1F; line-height: 1.7;
}

/* ───────── 파트 간지(브릿지) ───────── */
.part-cover { text-align: center; padding: 76px 0 30px; }
.part-cover .part-chip {
  display: inline-block; font-size: 13px; font-weight: 800;
  letter-spacing: 0.08em; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 999px;
  padding: 6px 16px; margin-bottom: 26px;
}
.part-cover .part-chip.p2 { color: var(--green); background: var(--green-soft); }
.part-cover .part-chip.p3 { color: var(--rose); background: var(--rose-soft); }
.part-cover .cover-emoji { font-size: 48px; margin-bottom: 26px; }
.part-quote {
  font-family: var(--serif); font-size: 20px; line-height: 2;
  font-weight: 700; color: var(--ink); margin-bottom: 30px;
  position: relative;
}
.part-quote::before { content: "❝"; display: block; color: var(--accent); font-size: 22px; margin-bottom: 8px; }
.part-cover .bridge { text-align: left; max-width: 560px; margin: 0 auto; }
.part-cover .bridge p { margin: 1.2em 0; color: var(--ink-soft); font-size: 16px; }
.part-toc-mini {
  list-style: none; max-width: 420px; margin: 34px auto 0;
  text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 24px;
}
.part-toc-mini li {
  font-size: 14.5px; color: var(--ink-soft); padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.part-toc-mini li:last-child { border-bottom: none; }
.part-toc-mini .m-emoji { margin-right: 10px; }
.start-btn.small {
  display: inline-block; margin-top: 34px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  border-radius: 999px; padding: 13px 34px;
  box-shadow: 0 6px 18px rgba(217, 122, 62, 0.3);
}
.start-btn.small:active { background: var(--accent-deep); }

/* 푸터 */
.site-footer {
  text-align: center; color: var(--muted); font-size: 12.5px;
  padding: 30px 20px 50px; line-height: 1.8;
}
.site-footer a { color: var(--ink-soft); font-weight: 600; }

@media (min-width: 560px) {
  body { font-size: 17.5px; }
  .chapter-head h1 { font-size: 31px; }
  .cover h1 { font-size: 40px; }
  blockquote.pull { font-size: 20px; }
}
