/**
 * 역할: PC·모바일 수료증 미리보기와 A4 인쇄의 공통 문서 스타일.
 * 수정 이력(2026-10-23): 장식 테두리·배경 양식 이미지를 제거하고 로고/워터마크와 실제 HTML 정보로 구성한다.
 * 수정 이력(2026-10-23): 회사명과 실제 직인을 한 줄 중앙 정렬하고 화면·인쇄에서 같은 비율을 유지한다.
 * 수정 이력(2026-10-23): 안쪽 사각 테두리와 여백을 추가하고 제목 글꼴을 통일하며 직인을 가로·세로 2배 확대한다.
 * 수정 이력(2026-10-23): 테두리를 동일한 실측 여백과 밝은 회색으로 맞추고 직인·회사명의 인쇄 시 글꼴 상속 확대를 방지한다.
 * 수정 이력(2026-10-23): 발급 회사명만 사용자 지정 28px로 맞춘다. 직인과 다른 문구의 크기는 유지한다.
 * 일반 페이지 및 수강확인증 스타일에는 영향을 주지 않도록 수료증 선택자로 한정한다.
 */
#certificated_doc .modal-certificates { width: min(94%, 850px); border-radius: 0; }
#certificated_doc .modal-head { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 16px; }
#certificated_doc .modal-head .close-btn { position: static; width: 24px; height: 24px; border: 0; background: transparent; }
#certificated_doc .modal-head .close-btn img { display: block; width: 24px; height: 24px; }
#certificated_doc .modal-body { padding: 0; }
.completion-certificate, .completion-certificate * { box-sizing: border-box; }
.completion-certificate {
    position: relative; isolation: isolate; display: flex; flex-direction: column;
    width: 100%; max-width: 794px; aspect-ratio: 210 / 297; margin: 0 auto;
    padding: 8% 10% 9%; border: 0; border-radius: 0; background: #fff; color: #222;
    font-family: "Pretendard", "Malgun Gothic", sans-serif; font-size: clamp(11px, 1.9vw, 17px);
    line-height: 1.65; text-align: left;
}
/** %는 가로·세로에서 서로 다른 길이가 되므로 네 방향 모두 9mm로 지정한다. */
.completion-certificate::before {
    content: ""; position: absolute; z-index: -1; inset: 9mm;
    border: 1px solid #d5d5d5; border-radius: 0; box-sizing: border-box; pointer-events: none;
}
.completion-certificate .completion-certificate-watermark {
    position: absolute; z-index: -1; top: 44%; left: 20%; width: 60%; height: auto;
    opacity: .075; pointer-events: none;
}
.completion-certificate .completion-certificate-header { display: block; position: static; z-index: auto; height: auto; border: 0; background: transparent; box-shadow: none; }
.completion-certificate .completion-certificate-logo { display: block; width: 25%; max-width: 180px; height: auto; }
.completion-certificate .completion-certificate-number { margin: 3% 0 0; font-size: .8em; text-align: right; overflow-wrap: anywhere; }
.completion-certificate .completion-certificate-title {
    margin: 10% 0 12%; padding: 0; font-family: inherit;
    font-size: 3em; font-weight: 600; line-height: 1.4; text-align: center; letter-spacing: .18em;
}
.completion-certificate .completion-certificate-details {
    display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: .65em .8em;
    margin: 0; padding: 0 3%; border: 0; line-height: 1.8;
}
.completion-certificate-details dt { position: relative; margin: 0; padding-right: 1em; font-weight: 400; white-space: nowrap; }
.completion-certificate-details dt::after { content: ":"; position: absolute; right: 0; }
.completion-certificate-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; word-break: normal; }
.completion-certificate .completion-certificate-statement { margin: 10% 0 0; text-align: center; font-weight: 600; }
.completion-certificate .completion-certificate-date { margin: 11% 0 10%; text-align: center; }
.completion-certificate .completion-certificate-issuer {
    position: static; display: flex; align-items: center; justify-content: center; gap: .4em;
    margin: auto 0 0; padding: 3% 0 0;
    border: 0; background: transparent; color: #222; font-family: inherit;
    font-size: 1.8em; font-weight: 700; text-align: center;
}
/**
 * 미리보기의 common.css는 img/span에 16px를 지정하지만 인쇄 창에는 해당 CSS가 없다.
 * 직인을 em으로 지정하면 인쇄에서 issuer의 글자 크기를 상속받아 확대되므로 미리보기의 약 90px로 고정한다.
 * 회사명은 사용자 지정 28px를 명시하여 화면·인쇄에서 같은 크기로 출력한다.
 */
.completion-certificate .completion-certificate-issuer > span { font-size: 28px; line-height: 1.6; }
.completion-certificate .completion-certificate-seal { display: block; flex: none; width: 90px; max-width: 30%; height: auto; object-fit: contain; }
/** 인쇄 창은 수료증만 복제하므로 본문 목록·모달 버튼이 같이 출력되지 않는다. */
@media print {
    @page { size: A4 portrait; margin: 0; }
    html.completion-certificate-print, .completion-certificate-print body { margin: 0; padding: 0; background: #fff; }
    .completion-certificate-print .completion-certificate {
        width: 210mm; max-width: none; min-height: 296mm; aspect-ratio: auto;
        padding: 22mm 22mm 26mm; font-size: 12pt; break-inside: avoid; page-break-inside: avoid;
        print-color-adjust: exact; -webkit-print-color-adjust: exact;
    }
}
