/* ==========================================================
   A4 출력 문서 스타일
   .doc 는 화면 미리보기(.print-preview .sheet)와 실제 인쇄(#print-root) 양쪽에서 같이 쓴다.
   흑백 인쇄에서도 구분되도록 색 대신 굵기, 테두리, 들여쓰기로 계층을 나눈다.
   여백, 글자 크기, 쪽 머리글/번호는 print.js 가 @page 규칙을 따로 만들어 넣는다.
   ========================================================== */
.doc {
  font-family: 'Paperlogy', 'Pretendard', 'Noto Sans KR', sans-serif;
  color: #000;
  font-size: var(--doc-size, 11pt);
  line-height: 1.55;
}
.doc h1 { font-size: 1.75em; font-weight: 800; line-height: 1.3; margin: 0 0 4pt; }
.doc h2 { font-size: 1.35em; font-weight: 800; margin: 16pt 0 6pt; padding-bottom: 3pt; border-bottom: 1.5pt solid #000; break-after: avoid; }
.doc h3 { font-size: 1.15em; font-weight: 700; margin: 12pt 0 4pt; break-after: avoid; }
.doc h4 { font-size: 1em; font-weight: 700; margin: 9pt 0 3pt; break-after: avoid; }
.doc p { margin: 0 0 5pt; orphans: 3; widows: 3; }
.doc ul, .doc ol { margin: 2pt 0 6pt; padding-left: 16pt; }
.doc li { margin: 1.5pt 0; break-inside: avoid; }
.doc .doc-meta { font-size: 0.9em; color: #333; margin-bottom: 10pt; }
.doc .doc-meta div { margin: 1pt 0; }
.doc .doc-kind { font-size: 0.85em; font-weight: 700; letter-spacing: 0.04em; border: 1pt solid #000; display: inline-block; padding: 1pt 6pt; margin-bottom: 6pt; }
.doc .box { border: 0.8pt solid #555; padding: 6pt 8pt; margin: 5pt 0 8pt; break-inside: avoid; }
.doc .box-title { font-weight: 700; font-size: 0.9em; margin-bottom: 2pt; }
.doc .speech { border-left: 2.5pt solid #000; padding: 1pt 0 1pt 8pt; margin: 4pt 0 6pt; break-inside: avoid; }
.doc .speech .kind { font-size: 0.82em; font-weight: 700; display: block; }
.doc .ai { border-left: 1pt dashed #555; padding-left: 8pt; color: #222; }
.doc .tag { font-size: 0.78em; border: 0.6pt solid #555; padding: 0 3pt; margin-right: 3pt; white-space: nowrap; }
.doc .src { font-size: 0.8em; color: #333; }
.doc .warn { border: 1pt solid #000; padding: 5pt 8pt; margin: 6pt 0; font-size: 0.92em; break-inside: avoid; }
.doc .sec { break-inside: auto; margin-bottom: 8pt; }
.doc .keep { break-inside: avoid; }
.doc .part-start { break-before: page; }
.doc .doc-start + .doc-start, .doc .doc-break { break-before: page; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.9em; margin: 4pt 0 8pt; }
.doc th, .doc td { border: 0.6pt solid #555; padding: 3pt 5pt; text-align: left; vertical-align: top; }
.doc tr { break-inside: avoid; }
.doc thead { display: table-header-group; }
.doc .src-list li { word-break: break-all; }

/* 인쇄용 요약본(분량 상한이 있는 출력물). 줄거리 모드와 같은 카드 디자인(.sd-*)을 더 촘촘하게 쓴다.
   줄 높이, 카드 여백 값은 public/js/brief.js 의 쪽수 계산(PART_OVERHEAD, CARD_SIDE_MM)과 맞춰 둔 값이다. */
.doc .brief { line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc .brief .b-body { break-before: page; }
.doc .brief h1 { font-size: 1.6em; line-height: 1.3; margin: 4pt 0 2pt; }
.doc .brief h1 .sub { font-size: 0.55em; font-weight: 600; }
.doc .brief .b-glance .doc-kind { display: inline-block; background: #000; color: #fff; border: 0; border-radius: 3pt; padding: 1.5pt 7pt; font-size: 0.82em; font-weight: 800; margin-bottom: 0; }
.doc .brief .b-glance .doc-meta { border-bottom: 2pt solid #000; padding-bottom: 5pt; margin-bottom: 8pt; }
.doc .brief .sd-card { margin: 0 0 6pt; }
.doc .brief .sd-title { padding: 3pt 8pt; font-size: 1.05em; }
.doc .brief .sd-basis { font-size: 0.72em; font-weight: 500; border: 0.7pt solid #fff; border-radius: 2pt; padding: 0 4pt; margin-left: 5pt; white-space: nowrap; }
.doc .brief .sd-block { padding: 4pt 8pt 5pt; }
.doc .brief .sd-story { border-bottom: 0; }
.doc .brief .sd-story + .sd-talk { border-top: 1pt solid #000; }
.doc .brief .bi { margin: 0 0 2pt; padding-left: 1.2em; text-indent: -1.2em; orphans: 2; widows: 2; }
.doc .brief .bi b { font-weight: 800; margin-right: 0.15em; }
.doc .brief ol.bl { margin: 0; padding-left: 1.4em; }
.doc .brief ol.bl li { margin: 0 0 2pt; }
.doc .brief .bsrc ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 10pt; font-size: 0.8em; }
.doc .brief .bsrc li { break-inside: avoid; margin: 0 0 1pt; }
.doc .brief .bsrc .u { display: block; font-size: 0.8em; color: #333; word-break: break-all; }

/* 줄거리 직접 입력으로 만든 파트별 토론 자료: 웹 결과 화면처럼 카드로 나누고, 줄거리 칸과 토론 칸을 구분한다.
   흑백 인쇄에서도 구분되도록 굵은 테두리, 음영, 들여쓰기를 함께 쓴다. */
.doc .story-doc { line-height: 1.55; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc .sd-head { border-bottom: 2pt solid #000; padding-bottom: 6pt; margin-bottom: 10pt; }
.doc .sd-kind { display: inline-block; font-size: 0.82em; font-weight: 800; letter-spacing: 0.03em; background: #000; color: #fff; padding: 1.5pt 7pt; border-radius: 3pt; }
.doc .sd-kind span { font-weight: 500; margin-left: 4pt; }
.doc .story-doc h1 { font-size: 1.7em; font-weight: 800; line-height: 1.3; margin: 5pt 0 2pt; }
.doc .sd-meta { font-size: 0.92em; color: #222; }
.doc .sd-note { font-size: 0.78em; color: #444; margin-top: 3pt; }
.doc .sd-card { border: 1.2pt solid #000; border-radius: 5pt; margin: 0 0 10pt; overflow: hidden; }
.doc .sd-overview { padding: 6pt 9pt; background: #f1f1f1; }
.doc .sd-overview p { margin: 2pt 0; }
.doc .sd-title { background: #000; color: #fff; font-weight: 800; font-size: 1.08em; padding: 4pt 9pt; break-after: avoid; }
.doc .sd-no { display: inline-block; min-width: 1.5em; margin-right: 6pt; padding: 0 4pt; background: #fff; color: #000; border-radius: 2pt; text-align: center; font-weight: 800; }
.doc .sd-block { padding: 6pt 9pt 7pt; }
.doc .sd-story { background: #f4f4f4; border-bottom: 1pt solid #000; }
.doc .sd-story p { margin: 0 0 4pt; }
.doc .sd-label { display: inline-block; font-size: 0.8em; font-weight: 800; border: 0.9pt solid #000; padding: 0 5pt; margin-bottom: 4pt; background: #fff; border-radius: 2pt; break-after: avoid; }
.doc .sd-talk .sd-label { background: #000; color: #fff; }
.doc .sd-pair { margin: 0 0 6pt; break-inside: avoid; }
.doc .sd-op { border-left: 3.5pt solid #000; padding: 2pt 0 2pt 7pt; }
.doc .sd-re { margin: 2pt 0 0 16pt; padding: 3pt 8pt; border: 0.9pt dashed #555; border-radius: 3pt; background: #fafafa; }
.doc .sd-op b, .doc .sd-re b { display: block; font-size: 0.76em; font-weight: 800; color: #333; margin-bottom: 1pt; }
.doc .sd-limit { font-size: 0.8em; color: #333; margin-top: 4pt; }

@media print {
  html, body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  .doc a { color: #000; text-decoration: none; }
}
