@page {
  size: A4;
  margin: 0;
}

html,
body {
  background: #fff !important;
}

.no-print {
  display: none !important;
}

#print-root {
  padding: 0;
  gap: 0;
  align-items: stretch;
}

.a4-page {
  box-shadow: none;
  border: none;
  margin: 0;
  page-break-after: always;
  page-break-inside: avoid;
}

/* 문제지만 인쇄: 정답지 숨김, 문제지 마지막 장 뒤에는 페이지 넘김 없음 */
body.print-mode-worksheet .answer-pages {
  display: none;
}
body.print-mode-worksheet .worksheet-pages .a4-page:last-child {
  page-break-after: auto;
}

/* 정답지만 인쇄: 문제지 숨김, 정답지 마지막 장 뒤에는 페이지 넘김 없음 */
body.print-mode-answer .worksheet-pages {
  display: none;
}
body.print-mode-answer .answer-pages .a4-page:last-child {
  page-break-after: auto;
}

/* 전체 인쇄: 문제지 뒤에 정답지가 이어지고, 정답지 마지막 장 뒤에는 페이지 넘김 없음 */
body.print-mode-all .answer-pages .a4-page:last-child {
  page-break-after: auto;
}
