/* =========================================================
   PDF_REPORT_V2_1
   안전업무일지 PDF v2.1
   문서형 레이아웃 + 텍스트 정렬 기준 재설계
   ========================================================= */

/* ---------- 페이지 기본 ---------- */
.pdfv2-stage {
    position: fixed;
    left: -12000px;
    top: 0;
    width: 210mm;
    background: #fff;
    pointer-events: none;
    z-index: -99999;
}

.pdfv2-page {
    position: relative;
    width: 210mm;
    height: 297mm;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    color: #111827;
    padding: 10mm 12mm 13mm;
    /* Use the same installed fonts in the measured stage and the print window. */
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

/* ---------- 텍스트 정렬 공통 규칙 ---------- */
.pdfv21-left {
    text-align: left !important;
}

.pdfv21-center {
    text-align: center !important;
}

.pdfv21-right {
    text-align: right !important;
}

.pdfv21-info-table td,
.pdfv21-metric-table td,
.pdfv21-ai-table td,
.pdfv2-checklist-table td {
    vertical-align: middle;
}

.pdfv21-info-table th,
.pdfv21-metric-table th,
.pdfv21-ai-table th,
.pdfv2-checklist-table th {
    text-align: center;
    vertical-align: middle;
}

.pdfv21-paragraph,
.pdfv21-action-text,
.pdfv2-check-content,
.pdfv2-check-detail {
    text-align: left;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* ---------- 상단 제목/결재 ---------- */
.pdfv21-doc-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 57mm;
    align-items: end;
    gap: 8mm;
    padding-bottom: 3.5mm;
    margin-bottom: 3.5mm;
    border-bottom: 2px solid #111827;
}

.pdfv21-title-area {
    min-width: 0;
}

.pdfv21-kicker {
    font-size: 7.2px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .12em;
    color: #64748b;
    text-align: left;
}

.pdfv21-title-area h1 {
    margin: 1.6mm 0 0;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: .10em;
    text-align: left;
}

.pdfv21-subtitle {
    margin-top: 1.2mm;
    font-size: 8px;
    line-height: 1.3;
    font-weight: 700;
    color: #64748b;
    text-align: left;
}

.pdfv21-approval {
    width: 57mm;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 8px;
}

.pdfv21-approval th,
.pdfv21-approval td {
    border: 1px solid #111827;
    text-align: center;
    vertical-align: middle;
    padding: 1mm;
}

.pdfv21-approval th {
    height: 6.2mm;
    background: #f1f5f9;
    font-weight: 900;
}

.pdfv21-approval td {
    height: 8.8mm;
}

/* ---------- 기본정보 표 ---------- */
.pdfv21-info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 3mm;
    font-size: 8.2px;
}

.pdfv21-info-table col.pdfv21-label-col {
    width: 18mm;
}

.pdfv21-info-table th,
.pdfv21-info-table td {
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
    min-height: 7mm;
    padding: 2mm 2.3mm;
    line-height: 1.3;
}

.pdfv21-info-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 900;
}

.pdfv21-info-table td {
    color: #111827;
}

/* ---------- 섹션 공통 ---------- */
.pdfv21-section {
    margin: 0 0 2.7mm;
    border: 1px solid #cbd5e1;
    break-inside: avoid;
}

.pdfv21-section-head {
    min-height: 7mm;
    box-sizing: border-box;
    padding: 1.7mm 2.5mm;
    border-bottom: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 8.5px;
    line-height: 1.25;
    font-weight: 900;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4mm;
}

.pdfv21-section-note {
    font-size: 6.8px;
    font-weight: 700;
    color: #9a3412;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pdfv21-paragraph {
    padding: 2.5mm 3mm;
    font-size: 8.2px;
    line-height: 1.55;
    color: #334155;
}

/* ---------- 기상 표 ---------- */
.pdfv21-metric-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 8px;
}

.pdfv21-metric-table th,
.pdfv21-metric-table td {
    border-right: 1px solid #dbe3ed;
    padding: 1.8mm 1.5mm;
}

.pdfv21-metric-table th:last-child,
.pdfv21-metric-table td:last-child {
    border-right: 0;
}

.pdfv21-metric-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 7px;
    font-weight: 800;
}

.pdfv21-metric-table td {
    color: #0f172a;
    font-size: 8.6px;
    font-weight: 800;
    text-align: center;
}

/* ---------- AI 종합판단 표 ---------- */
.pdfv21-ai-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 8px;
}

.pdfv21-ai-table th,
.pdfv21-ai-table td {
    border-right: 1px solid #dbe3ed;
    padding: 2mm 2.2mm;
    line-height: 1.35;
}

.pdfv21-ai-table th:last-child,
.pdfv21-ai-table td:last-child {
    border-right: 0;
}

.pdfv21-ai-table th {
    width: 30%;
    background: #f8fafc;
    color: #64748b;
    font-size: 7px;
    font-weight: 800;
}

.pdfv21-ai-table th:nth-child(3),
.pdfv21-ai-table td:nth-child(3) {
    width: 40%;
}

.pdfv21-emphasis {
    font-size: 9.5px;
    font-weight: 900;
    color: #312e81;
}

/* ---------- 작업판정 색상 ---------- */
.pdfv21-decision-safe {
    color: #166534 !important;
    background: #f0fdf4;
    font-weight: 900;
}

.pdfv21-decision-caution {
    color: #92400e !important;
    background: #fffbeb;
    font-weight: 900;
}

.pdfv21-decision-warn {
    color: #9a3412 !important;
    background: #fff7ed;
    font-weight: 900;
}

.pdfv21-decision-danger {
    color: #991b1b !important;
    background: #fef2f2;
    font-weight: 900;
}

/* ---------- 핵심 안전조치 ---------- */
.pdfv21-action-grid {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    min-height: 28mm;
}

.pdfv21-action-column {
    padding: 2.4mm 3mm;
}

.pdfv21-action-column-side {
    border-left: 1px solid #dbe3ed;
    background: #fbfcfe;
}

.pdfv21-mini-head {
    margin-bottom: 1.6mm;
    font-size: 7.4px;
    font-weight: 900;
    color: #475569;
    text-align: left;
}

.pdfv21-action-body {
    display: flex;
    flex-direction: column;
    gap: 1.2mm;
}

.pdfv21-action-row {
    display: grid;
    grid-template-columns: 5mm 1fr;
    align-items: start;
    gap: 1.2mm;
}

.pdfv21-action-marker {
    font-size: 7.7px;
    line-height: 1.45;
    font-weight: 900;
    color: #475569;
    text-align: right;
}

.pdfv21-action-text {
    font-size: 7.8px;
    line-height: 1.45;
    color: #334155;
}

.pdfv21-empty-line {
    color: #94a3b8;
    font-size: 8px;
    text-align: left;
}

/* ---------- 조건부 작업중지 ---------- */
.pdfv21-stop-section {
    border-color: #fdba74;
}

.pdfv21-stop-section .pdfv21-section-head {
    background: #fff7ed;
    border-bottom-color: #fed7aa;
    color: #9a3412;
}

.pdfv21-stop-body {
    padding: 2.2mm 3mm;
}

/* ---------- TBM ---------- */
.pdfv21-tbm-section {
    background: #fff;
}

.pdfv21-tbm-text {
    min-height: 18mm;
}

/* ---------- 2페이지 이후 체크리스트 ---------- */
.pdfv2-kicker {
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #64748b;
}

.pdfv2-checklist-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 90mm);
    align-items: end;
    gap: 8mm;
    padding-bottom: 3mm;
    margin-bottom: 3mm;
    border-bottom: 2px solid #111827;
}

.pdfv2-checklist-header h2 {
    margin: 1mm 0 0;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: .08em;
    text-align: left;
}

.pdfv2-checklist-meta {
    min-width: 0;
    max-width: 90mm;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-align: right;
    font-size: 7px;
    line-height: 1.4;
    color: #64748b;
}

.pdfv2-checklist-meta strong,
.pdfv2-checklist-meta span {
    display: block;
}

.pdfv2-checklist-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 7.4px;
}

.pdfv2-checklist-table col.pdfv2-col-badge {
    width: 22mm;
}

.pdfv2-checklist-table col.pdfv2-col-state {
    width: 13mm;
}

.pdfv2-checklist-table thead th {
    border: 1px solid #94a3b8;
    background: #e2e8f0;
    color: #1e293b;
    padding: 1.8mm 1.5mm;
    font-weight: 900;
}

.pdfv2-checklist-table tbody td {
    border: 1px solid #cbd5e1;
    padding: 1.9mm 1.8mm;
    line-height: 1.35;
}

.pdfv2-checklist-table tbody td:first-child,
.pdfv2-checklist-table tbody td:nth-child(3),
.pdfv2-checklist-table tbody td:nth-child(4),
.pdfv2-checklist-table tbody td:nth-child(5) {
    text-align: center;
    vertical-align: middle;
}

.pdfv2-checklist-table tbody td:nth-child(2) {
    text-align: left;
    vertical-align: top;
}

.pdfv2-section-row td {
    background: #f1f5f9;
    color: #334155;
    font-weight: 900;
    font-size: 7.8px;
    text-align: left !important;
    padding: 1.7mm 2mm !important;
}

.pdfv2-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16mm;
    padding: 1mm 1.5mm;
    border-radius: 1.2mm;
    background: #475569;
    color: #fff;
    font-weight: 900;
    font-size: 6.7px;
    line-height: 1;
    text-align: center;
}

.pdfv2-check-content {
    font-weight: 800;
    color: #0f172a;
    font-size: 7.7px;
    line-height: 1.4;
}

.pdfv2-check-detail {
    margin-top: 1mm;
    color: #64748b;
    font-size: 6.5px;
    line-height: 1.35;
}

.pdfv2-state-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5mm;
    height: 5mm;
    border: 1px solid #334155;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 900;
    color: #0f172a;
}

.pdfv2-empty-row {
    height: 28mm;
    text-align: center !important;
    vertical-align: middle !important;
    color: #94a3b8;
    font-size: 8px;
}

/* ---------- 페이지 하단 ---------- */
.pdfv2-page-footer {
    position: absolute;
    left: 12mm;
    right: 12mm;
    bottom: 5mm;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5mm;
    color: #94a3b8;
    font-size: 6.5px;
    font-weight: 700;
}

/* =========================================================
   PDF_REPORT_V2_2
   표 셀 수평·수직 중앙정렬 안정화
   서술형 영역은 기존 좌측 정렬 유지
   ========================================================= */

/* 1페이지의 표 계열은 모든 항목/값을 중앙 정렬 */
.pdfv21-info-table th,
.pdfv21-info-table td,
.pdfv21-metric-table th,
.pdfv21-metric-table td,
.pdfv21-ai-table th,
.pdfv21-ai-table td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* html2canvas에서도 시각적 중앙이 맞도록 위/아래 여백을 대칭화 */
.pdfv21-info-table th,
.pdfv21-info-table td {
    height: 8.4mm;
    min-height: 8.4mm;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 2.3mm !important;
    padding-right: 2.3mm !important;
    line-height: 1.28 !important;
}

/* 공종/작업처럼 긴 한글 텍스트도 중앙 정렬을 유지하면서 자연스럽게 줄바꿈 */
.pdfv22-center-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

.pdfv22-wrap-center {
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
}

/* 기상표 셀의 시각적 중심도 동일 기준 */
.pdfv21-metric-table th,
.pdfv21-metric-table td {
    height: 8mm;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.25 !important;
}

/* AI 종합판단 표 */
.pdfv21-ai-table th,
.pdfv21-ai-table td {
    height: 9mm;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 2.2mm !important;
    padding-right: 2.2mm !important;
    line-height: 1.3 !important;
}

/* 긴 시간대 설명도 가운데 배치 */
.pdfv21-ai-table td:nth-child(3) {
    text-align: center !important;
    vertical-align: middle !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
}

/* 서술문은 문서 가독성을 위해 좌측정렬 유지 */
.pdfv21-paragraph,
.pdfv21-action-text,
.pdfv21-stop-body,
.pdfv21-tbm-text,
.pdfv2-check-content,
.pdfv2-check-detail {
    text-align: left !important;
}

/* 체크리스트: 구분/상태는 중앙, 본문은 좌측 */
.pdfv2-checklist-table th {
    text-align: center !important;
    vertical-align: middle !important;
}

.pdfv2-checklist-table tbody td:first-child,
.pdfv2-checklist-table tbody td:nth-child(3),
.pdfv2-checklist-table tbody td:nth-child(4),
.pdfv2-checklist-table tbody td:nth-child(5) {
    text-align: center !important;
    vertical-align: middle !important;
}

.pdfv2-checklist-table tbody td:nth-child(2) {
    text-align: left !important;
    vertical-align: middle !important;
}

/* 섹션 제목은 좌측 유지 */
.pdfv21-section-head,
.pdfv21-mini-head,
.pdfv2-section-row td {
    text-align: left !important;
}

/* =========================================================
   PDF_REPORT_V2_3
   html2canvas 표 셀 세로 정렬 안정화
   vertical-align 의존 대신 셀 내부 flex 컨테이너 사용
   ========================================================= */

/*
 * table-cell의 vertical-align: middle은 브라우저 화면에서는 잘 보이지만,
 * html2canvas가 폰트 line box를 rasterize할 때 시각적으로 아래쪽에
 * 치우쳐 보일 수 있다.
 *
 * v2.3에서는 셀 안에 실제 flex wrapper를 생성해
 * align-items:center / justify-content:center 로 정렬한다.
 */

/* 부모 셀은 padding을 없애고 실제 높이만 담당 */
.pdfv21-info-table th,
.pdfv21-info-table td,
.pdfv21-metric-table th,
.pdfv21-metric-table td,
.pdfv21-ai-table th,
.pdfv21-ai-table td {
    padding: 0 !important;
    vertical-align: middle !important;
}

/* 공통 내부 중앙정렬 wrapper */
.pdfv23-cell-inner {
    width: 100%;
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* 기본 정보 표 */
.pdfv21-info-table .pdfv23-cell-inner {
    min-height: 8.4mm;
    padding: 0 2.3mm;
    line-height: 1.28;
}

/* 기상 현황 표 */
.pdfv21-metric-table .pdfv23-cell-inner {
    min-height: 8mm;
    padding: 0 1.5mm;
    line-height: 1.22;
}

/* AI 종합 판단 */
.pdfv21-ai-table .pdfv23-cell-inner {
    min-height: 9mm;
    padding: 0 2.2mm;
    line-height: 1.28;
}

/* 색상/강조가 wrapper 안에서도 상속되도록 보장 */
.pdfv21-decision-safe .pdfv23-cell-inner,
.pdfv21-decision-caution .pdfv23-cell-inner,
.pdfv21-decision-warn .pdfv23-cell-inner,
.pdfv21-decision-danger .pdfv23-cell-inner,
.pdfv21-emphasis .pdfv23-cell-inner {
    color: inherit;
    font-weight: inherit;
}

/* 체크리스트 행의 배지/상태칸도 flex로 실제 세로 중앙 배치 */
.pdfv23-check-center {
    width: 100%;
    min-height: 8mm;
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 체크리스트 본문은 좌측 정렬을 유지하면서 행 안에서 세로 중앙 */
.pdfv23-check-text {
    min-height: 8mm;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    justify-content: center !important;
    align-items: stretch;
    text-align: left !important;
    padding: .2mm 0;
}

/* 체크리스트 td는 wrapper가 여백을 담당 */
.pdfv2-checklist-table tbody .pdfv2-check-row td {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
}

/* 긴 문장은 수평 중앙 + 자연스러운 줄바꿈 */
.pdfv22-wrap-center .pdfv23-cell-inner,
.pdfv22-center-cell .pdfv23-cell-inner {
    text-align: center !important;
    justify-content: center !important;
}

/* 서술 영역은 기존 좌측 정렬 그대로 */
.pdfv21-paragraph,
.pdfv21-action-text,
.pdfv21-stop-body,
.pdfv21-tbm-text,
.pdfv2-check-content,
.pdfv2-check-detail {
    text-align: left !important;
}

/* =========================================================
   PDF_REPORT_V3_NATIVE_PRINT
   html2canvas/jsPDF 대신 Chrome/Edge Native Print 사용
   ========================================================= */

.pdfv3-native-print-body {
    margin: 0;
    background: #e5e7eb;
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", Arial, sans-serif;
    color: #111827;
}

.pdfv3-print-toolbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
    padding: 12px 18px;
    border-bottom: 1px solid #cbd5e1;
    background: rgba(255,255,255,.97);
    box-shadow: 0 2px 8px rgba(15,23,42,.08);
    color: #0f172a;
}

.pdfv3-print-toolbar > div { min-width:0; overflow-wrap:anywhere; }
.pdfv3-print-toolbar strong { display:block; font-size:13px; line-height:1.5; }
.pdfv3-print-toolbar span { display:block; margin-top:3px; font-size:11px; color:#64748b; }
.pdfv3-print-toolbar button {
    flex: 0 0 auto;
    min-height: 44px;
    line-height: 1.5;
    border: 0;
    border-radius: 7px;
    padding: 9px 14px;
    background: #4f46e5;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.pdfv3-print-root { padding: 16px 0 36px; }
.pdfv3-print-root .pdfv2-page {
    margin: 0 auto 16px;
    box-shadow: 0 3px 18px rgba(15,23,42,.12);
}

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

@media print {
    html, body {
        width: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .pdfv3-print-toolbar { display: none !important; }

    .pdfv3-print-root {
        width: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pdfv3-print-root .pdfv2-page {
        width: 210mm !important;
        height: 297mm !important;
        min-width: 210mm !important;
        min-height: 297mm !important;
        max-width: 210mm !important;
        max-height: 297mm !important;
        margin: 0 !important;
        box-shadow: none !important;
        page-break-after: always !important;
        break-after: page !important;
        page-break-inside: avoid !important;
        break-inside: avoid-page !important;
    }

    .pdfv3-print-root .pdfv2-page:last-child {
        page-break-after: auto !important;
        break-after: auto !important;
    }

    .pdfv2-check-row,
    .pdfv2-section-row,
    table, tr, td, th {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}

/* =========================================================
   PDF_REPORT_V3_1_TYPOGRAPHY
   Native Print 마감:
   - 본문/표 글자 10~15% 확대
   - 핵심 라벨/판정 bold 강화
   - 세로 여백을 조금 줄여 1페이지 구성 유지
   ========================================================= */

/* 페이지 내부 여백은 약간 압축해 가독성 확대 공간 확보 */
.pdfv2-page {
    padding: 9mm 11.5mm 12mm;
}

/* 제목/결재 */
.pdfv21-doc-header {
    gap: 7mm;
    padding-bottom: 3mm;
    margin-bottom: 3mm;
}

.pdfv21-kicker {
    font-size: 8px;
    font-weight: 900;
}

.pdfv21-title-area h1 {
    font-size: 24px;
    font-weight: 900;
}

.pdfv21-subtitle {
    margin-top: 1mm;
    font-size: 9px;
    font-weight: 800;
}

.pdfv21-approval {
    font-size: 9px;
}

.pdfv21-approval th {
    height: 6mm;
    font-weight: 900;
}

.pdfv21-approval td {
    height: 8.3mm;
    font-weight: 600;
}

/* 기본정보 */
.pdfv21-info-table {
    margin-bottom: 2.5mm;
    font-size: 9.3px;
}

.pdfv21-info-table th {
    font-size: 9px;
    font-weight: 900;
}

.pdfv21-info-table td {
    font-size: 9.3px;
    font-weight: 650;
    color: #0f172a;
}

.pdfv21-info-table .pdfv23-cell-inner {
    min-height: 8.2mm;
    padding: 1.2mm 2.1mm;
}

/* Short values stay together; narrative fields align at their common left edge. */
.pdfv3-nowrap .pdfv23-cell-inner {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.pdfv3-long-cell .pdfv23-cell-inner {
    justify-content: flex-start !important;
    text-align: left !important;
    line-height: 1.4;
}

.pdfv2-checklist-table thead th:nth-child(n+3) {
    white-space: nowrap;
}

/* 섹션 공통 */
.pdfv21-section {
    margin-bottom: 2.2mm;
}

.pdfv21-section-head {
    min-height: 6.6mm;
    padding: 1.45mm 2.4mm;
    font-size: 9.7px;
    font-weight: 900;
}

.pdfv21-section-note {
    font-size: 7.6px;
    font-weight: 800;
}

.pdfv21-paragraph {
    padding: 2.05mm 2.7mm;
    font-size: 9.4px;
    line-height: 1.48;
    font-weight: 600;
    color: #334155;
}

/* 기상 */
.pdfv21-metric-table th {
    font-size: 8.2px;
    font-weight: 900;
}

.pdfv21-metric-table td {
    font-size: 10px;
    font-weight: 900;
}

.pdfv21-metric-table .pdfv23-cell-inner {
    min-height: 7.8mm;
}

/* AI 판단 */
.pdfv21-ai-table th {
    font-size: 8.2px;
    font-weight: 900;
}

.pdfv21-ai-table td {
    font-size: 9.4px;
    font-weight: 700;
}

.pdfv21-ai-table .pdfv23-cell-inner {
    min-height: 8.7mm;
    padding: 0 2mm;
}

.pdfv21-emphasis {
    font-size: 10.8px;
    font-weight: 900;
}

.pdfv21-decision-safe,
.pdfv21-decision-caution,
.pdfv21-decision-warn,
.pdfv21-decision-danger {
    font-size: 10px;
    font-weight: 900;
}

/* 핵심 안전조치 */
.pdfv21-action-grid {
    min-height: 25mm;
}

.pdfv21-action-column {
    padding: 2mm 2.7mm;
}

.pdfv21-mini-head {
    margin-bottom: 1.35mm;
    font-size: 8.5px;
    font-weight: 900;
}

.pdfv21-action-body {
    gap: 1mm;
}

.pdfv21-action-row {
    grid-template-columns: 5mm 1fr;
    gap: 1mm;
}

.pdfv21-action-marker {
    font-size: 8.6px;
    line-height: 1.4;
    font-weight: 900;
}

.pdfv21-action-text {
    font-size: 9px;
    line-height: 1.43;
    font-weight: 600;
    color: #334155;
}

.pdfv21-empty-line {
    font-size: 8.8px;
}

/* 조건부 중지기준 / TBM */
.pdfv21-stop-body {
    padding: 1.8mm 2.7mm;
}

.pdfv21-tbm-text {
    min-height: 14mm;
    font-size: 9.3px;
    line-height: 1.48;
    font-weight: 600;
}

/* 체크리스트 */
.pdfv2-kicker {
    font-size: 8px;
    font-weight: 900;
}

.pdfv2-checklist-header {
    padding-bottom: 2.6mm;
    margin-bottom: 2.6mm;
}

.pdfv2-checklist-header h2 {
    font-size: 19px;
    font-weight: 900;
}

.pdfv2-checklist-meta {
    font-size: 8px;
    line-height: 1.35;
}

.pdfv2-checklist-table {
    font-size: 8.4px;
}

.pdfv2-checklist-table thead th {
    padding: 1.5mm 1.3mm;
    font-size: 8.5px;
    font-weight: 900;
}

.pdfv2-checklist-table tbody td {
    padding-left: 1.6mm;
    padding-right: 1.6mm;
    line-height: 1.35;
}

.pdfv2-section-row td {
    font-size: 8.7px;
    padding: 1.45mm 1.8mm !important;
}

.pdfv2-badge {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: .9mm 1.4mm;
    font-size: 7.5px;
    line-height: 1.35;
    font-weight: 900;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pdfv2-check-content {
    font-size: 8.8px;
    line-height: 1.4;
    font-weight: 800;
}

.pdfv2-check-detail {
    margin-top: .8mm;
    font-size: 7.4px;
    line-height: 1.35;
    font-weight: 500;
}

.pdfv23-check-center,
.pdfv23-check-text {
    min-height: 7.4mm;
}

.pdfv2-state-mark {
    width: 5.2mm;
    height: 5.2mm;
    font-size: 8.5px;
}

.pdfv2-empty-row {
    font-size: 9px;
}

/* 하단 */
.pdfv2-page-footer {
    left: 11.5mm;
    right: 11.5mm;
    bottom: 4.5mm;
    padding-top: 1.3mm;
    font-size: 7.2px;
}

/* 1페이지가 긴 경우 폰트는 유지하고 세로 여백부터 자동 압축 */
.pdfv2-cover.pdfv31-compact .pdfv21-doc-header {
    padding-bottom: 2.4mm;
    margin-bottom: 2.4mm;
}

.pdfv2-cover.pdfv31-compact .pdfv21-info-table {
    margin-bottom: 2mm;
}

.pdfv2-cover.pdfv31-compact .pdfv21-section {
    margin-bottom: 1.7mm;
}

.pdfv2-cover.pdfv31-compact .pdfv21-section-head {
    min-height: 6.1mm;
    padding-top: 1.15mm;
    padding-bottom: 1.15mm;
}

.pdfv2-cover.pdfv31-compact .pdfv21-paragraph {
    padding-top: 1.55mm;
    padding-bottom: 1.55mm;
}

.pdfv2-cover.pdfv31-compact .pdfv21-action-column {
    padding-top: 1.55mm;
    padding-bottom: 1.55mm;
}

.pdfv2-cover.pdfv31-compact .pdfv21-tbm-text {
    min-height: 11mm;
}

/* 여전히 넘칠 때의 2차 보정: 일부 장문만 소폭 축소 */
.pdfv2-cover.pdfv31-tight .pdfv21-paragraph,
.pdfv2-cover.pdfv31-tight .pdfv21-action-text,
.pdfv2-cover.pdfv31-tight .pdfv21-tbm-text {
    font-size: 8.8px;
    line-height: 1.42;
}

.pdfv2-cover.pdfv31-tight .pdfv21-mini-head {
    margin-bottom: 1mm;
}

.pdfv2-cover.pdfv31-tight .pdfv21-action-body {
    gap: .75mm;
}

/* TBM remains readable and continues on measured A4 pages when it is long. */
.pdfv21-tbm-text,
.pdfv2-cover.pdfv31-compact .pdfv21-tbm-text,
.pdfv2-cover.pdfv31-tight .pdfv21-tbm-text {
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: anywhere;
    font-size: 10.5px;
    line-height: 1.65;
    min-height: 0;
}

.pdfv3-tbm-page .pdfv21-tbm-section {
    margin-bottom: 0;
}
