/* ▶ 모바일 축소 대응용 상위 컨테이너 */
.pdf-scale-wrapper {
  width: 100vw;
  overflow-x: auto;
  display: flex;
  justify-content: center; /* 또는 flex-start */
  padding: 0;
  box-sizing: border-box;
}

/* ▶ A4 페이지 고정 크기 + 축소 대상 */
.pdf-a4-wrapper {
  width: 210mm;
  height: 297mm;
  display: inline-block;
  transform-origin: top left;
  transform: scale(var(--scale-ratio, 1));
}

/* ▶ A4 페이지 기본 스타일 */
.pdf-page {
  width: 210mm;
  height: 297mm;
  max-width: 100%;
  background: white;
  padding: 10mm;
  box-sizing: border-box;
  overflow: hidden;
  page-break-after: always;
}

/* ▶ A4 테두리 on/off 옵션 */
.pdf-page.show-outline {
  outline: 1px solid #ccc;
}
.pdf-page.no-outline {
  outline: none;
}

/* ▶ 배경색 옵션 */
.white  { background: white; }
.yellow { background: #fff9db; }
.blue   { background: #e7f0ff; }
.red    { background: #ffe5e5; }
.pink   { background: #ffeaf5; }
.black  { background: #1a1a1a; color: white; }
.gray   { background: #f2f2f2; }

/* ▶ 상단 문구 */
.pdf-header {
  margin-bottom: 8mm;
  font-size: 10.5px;
  font-family: "Noto Sans KR", sans-serif;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #333;
}
.pdf-header.left   { text-align: left; }
.pdf-header.center { text-align: center; }
.pdf-header.right  { text-align: right; }

/* ▶ 사진 그룹 공통 */
.photo-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5mm;
}
.photo-group img {
  width: 100%;
  max-width: 80mm;
  object-fit: cover;
  aspect-ratio: 2 / 3; /* 기본값 */
  height: auto;
  display: block;
  border: none;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* ▶ 수직 스택 (가로사진 여러 장) */
.photo-group.vertical-stack {
  flex-direction: column;
  align-items: center;
}
.photo-group.vertical-stack img.horizontal {
  max-width: 140mm;
  aspect-ratio: 3 / 2;
}

/* ▶ 수평 3장 정렬 (작은 세로사진) */
.photo-group.horizontal-3 {
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.photo-group.horizontal-3 img.small {
  width: 56mm;
  aspect-ratio: 2 / 3;
}

/* ▶ 좌우 분할 레이아웃용 */
.left-vertical,
.right-vertical,
.left-square-stack,
.right-square-stack {
  display: flex;
  flex-direction: column;
  gap: 2mm;
}
.left-vertical img,
.right-vertical img {
  width: 80mm;
  aspect-ratio: 40 / 81;
}
.left-square-stack img,
.right-square-stack img {
  width: 80mm;
  aspect-ratio: 1 / 1;
}

/* ▶ 글박스 */
.text-box {
  padding: 5mm 6mm;
  margin-top: 10mm;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 11.5px;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.96);
  color: #2a2a2a;
}
.text-box.bordered {
  border: 1px solid #dcdcdc;
  border-radius: 4px;
}
.text-box.left-align   { text-align: left; }
.text-box.center-align { text-align: center; }
.text-box.right-align  { text-align: right; }
.text-box .title {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 4mm;
}
.text-box .body {
  margin-bottom: 2mm;
}
.text-box .desc {
  font-size: 11px;
  color: #666;
}

/* ▶ 페이지 번호 */
.pdf-footer {
  margin-top: 10mm;
  font-size: 11px;
}
.pdf-footer.left   { text-align: left; }
.pdf-footer.center { text-align: center; }
.pdf-footer.right  { text-align: right; }

