body {
  margin: 0;
  font-family: serif;
}

/* 1, 2, 3단계 제목 통합 스타일 */
.stage-header h2 {
    /* 폰트 설정: 고딕 계열의 얇은 서체 */
    font-family: serif;
    
    /* 크기: 기존 1.5rem에서 1.1rem 정도로 축소 (작고 정갈하게) */
    font-size: 1.3rem;
    
  
    font-weight: 500;
    
    
    /* 색상: 완전 검정보다는 진한 회색이 얇은 폰트와 잘 어울립니다 */
    color: #444;
    
    margin: 0;
    padding-bottom: 8px;
    
    
    /* 텍스트 정렬 */
    text-transform: uppercase; /* 영문이 섞일 경우 깔끔하게 */
}

/* 헤더 영역 여백 조정 */
.stage-header {
    margin-bottom: 1.5rem;
}

.publishing-process {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.stage {
  padding: 4rem 2rem;
  border-bottom: 1px solid #ccc;
}

.editor {
  min-height: 200px;
  outline: none;
}

.selected-sentences {
  min-height: 100px;
}

.book-container {
  min-height: 200px;
}

/* 에디터가 비어있을 때 placeholder 표시 */
.editor:empty:before {
  content: attr(placeholder);
  color: #aaa;
  font-style: italic;
}

/* 편집 영역 안내 문구 스타일 */
.guide-text {
  color: #888;
  font-size: 0.9rem;
  border: 1px dashed #ccc;
  padding: 1rem;
  text-align: center;
  background: #fafafa;
}

.label{
  font-size: 0.9rem;

}

/* 원고 내에서 밑줄 처리가 된 스타일 */
.underlined {
  background-color: rgba(0, 0, 0, 0.05); /* 아주 연한 배경색으로 강조 */
  padding-bottom: 2px;
}

/* 에디터 기본 포커스 제거 (깔끔하게) */
.editor:focus {
  outline: none;
}

/* --- 화면에 보일 때 (Screen) --- */
.book-preview {
  background: #f0f0f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page {
  background: white;
  width: 210mm; /* A4 가로 */
  min-height: 297mm; /* A4 세로 */
  padding: 25mm; /* 기본 여백 */
  margin-bottom: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
  word-break: break-all;
}

/* --- 인쇄할 때 (Print) --- */
@media print {
  /* 1. 인쇄 안 할 부분 숨기기 */
  .no-print, .stage-write, .stage-print, .stage-header {
    display: none !important;
  }

  /* 2. 배경색, 테두리 등 인쇄에 불필요한 요소 제거 */
  body, .publishing-process, .stage-bind, .book-preview {
    margin: 0;
    padding: 0;
    background: white;
  }

  /* 3. A4 설정 */
  @page {
    size: A4;
    margin: 0; /* JS에서 설정한 여백을 사용하기 위해 0으로 설정 */
  }

  .page {
    width: 210mm;
    height: 297mm;
    margin: 0;
    box-shadow: none;
    page-break-after: always; /* 페이지가 끝나면 다음 장으로 */
  }
}

