/* =============================================================================
   화재예방 — 비상사태 대응훈련 시나리오 인쇄 문서 (2026-10-20)    js/fire-scenario-print.js 와 한 쌍
   - 공식 사내 문서: A4 세로 · 맑은 고딕 10pt · 검정 실선 · 표 중심. Apple 화면 UI 가 아니다.
   - 접두사 .fscn-doc(문서 안쪽) · .fscn-print-host(화면에 붙이는 인쇄 틀, id #fireScnPrint).
   - 화면에서는 인쇄 틀 전체가 display:none(미리보기 없음). 인쇄할 때만 body.fire-scn-printing 이 켜져 이 문서만 나온다.
   - Apple 테마(css/theme-apple.css 의 토큰·Pretendard 글꼴)는 파일 전체가 @media screen 이라 인쇄에는 닿지 않고, 화면에서는 이 틀이 숨겨져 있어
     theme-apple.css:36~44 의 '출력물 미리보기' 선택자 목록에 더할 필요가 없다. 혹시 화면에 문서를 보여 주는 쪽이 생겨도 글꼴·색은 이 파일에서 직접 정한다.
   - 이름 없는 @page 는 다른 업무 인쇄에 번지므로 이름 붙은 쪽(fireScn)만 쓰고 body.fire-scn-printing 에서만 적용한다.
   - 2026-10-21: '2. 단계별 상황 / 시나리오' 는 표 하나(순번 | 구분 | 시간 | 상황/행동 | 담당조직 | 비고) — 표 클래스 .fscn-ptl, 구분 칸 글자 틀 .fscn-ptp(새 색 없음).
   ========================================================================== */

/* ── 화면: 인쇄 틀은 숨김 ── */
.fscn-print-host { display: none; }

/* ── 쪽: A4 세로 · 여백 위아래 14mm 좌우 12mm · 아래 가운데 쪽번호(지원하지 않는 브라우저는 이 한 줄만 무시) ── */
@page fireScn {
  size: A4 portrait;
  margin: 14mm 12mm;
  @bottom-center { content: counter(page) " / " counter(pages); font-family: "Malgun Gothic", "맑은 고딕", sans-serif; font-size: 8.5pt; color: #000; }
}

/* ── 문서 모양 (화면·인쇄 공통: 글꼴·색을 직접 고정) ── */
.fscn-doc { box-sizing: border-box; width: 100%; margin: 0; padding: 0; background: #fff; color: #000; font-family: "Malgun Gothic", "맑은 고딕", sans-serif; font-size: 10pt; line-height: 1.45; font-weight: 400; letter-spacing: 0; text-align: left; }
.fscn-doc *, .fscn-doc *::before, .fscn-doc *::after { box-sizing: border-box; }
.fscn-doc table, .fscn-doc th, .fscn-doc td { font-family: inherit; color: #000; letter-spacing: 0; }
.fscn-doc-title { margin: 0 0 4mm; padding: 3.2mm 0; border-top: 2px solid #000; border-bottom: 2px solid #000; text-align: center; font-size: 18pt; font-weight: 700; line-height: 1.3; letter-spacing: .06em; }
.fscn-sec { margin: 6mm 0 0; }
.fscn-h { margin: 0 0 1.8mm; font-size: 11.5pt; font-weight: 700; line-height: 1.35; }
.fscn-note { margin: 1.5mm 0 0; font-size: 8.5pt; line-height: 1.4; }
.fscn-foot { margin: 7mm 0 0; text-align: right; font-size: 8.5pt; }

.fscn-tbl { width: calc(100% - 1px); table-layout: fixed; border-collapse: collapse; border: 1px solid #000; font-size: 10pt; }
.fscn-tbl th, .fscn-tbl td { border: 1px solid #000; padding: 1.5mm 2mm; text-align: left; vertical-align: top; word-break: keep-all; overflow-wrap: anywhere; }
.fscn-tbl th { background: #e6e6e6; font-weight: 700; text-align: center; vertical-align: middle; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.fscn-tbl td.fscn-c, .fscn-tbl th.fscn-c { text-align: center; }
.fscn-tbl th.fscn-c { white-space: nowrap; padding-left: 0.5mm; padding-right: 0.5mm; }   /* 좁은 '순번' 머리칸이 두 줄로 꺾이지 않게 */
.fscn-doc .fscn-ptl { font-size: 9pt; }   /* 2. 단계별 상황 / 시나리오 표 (화면 상세의 .fscn-tl 목록과 이름이 겹치지 않게 .fscn-ptl) */
/* 구분 칸: 유형 이름 글자 + 얇은 테두리 — 색에 기대지 않으므로 흑백 인쇄에서도 읽힌다 */
.fscn-doc .fscn-ptp { display: inline-block; padding: .2mm 1.4mm; border: 1px solid #000; border-radius: 1mm; background: #fff; color: #000; font-size: 8.5pt; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.fscn-pre { white-space: pre-wrap; }
.fscn-b { font-weight: 700; }
.fscn-sub { margin-top: .8mm; font-size: 8.5pt; line-height: 1.4; }
.fscn-sub b { font-weight: 700; }
.fscn-empty { text-align: center; }
.fscn-chk { font-size: 11pt; }

/* ── 인쇄: 이 문서만 보이게 ── */
@media print {
  /* 화면 요소(머리글·메뉴·하단바·토스트·팝업)는 화재예방 다른 인쇄(css/fire.css)와 같은 목록으로 숨기고, 그 밖의 body 직속 요소도 모두 숨긴다 */
  body.fire-scn-printing #gate,
  body.fire-scn-printing #appHeader,
  body.fire-scn-printing #app,
  body.fire-scn-printing #bottomNav,
  body.fire-scn-printing #toast,
  body.fire-scn-printing .hd-gnb,
  body.fire-scn-printing .gnb-drawer,
  body.fire-scn-printing .push-ob,
  body.fire-scn-printing #overlayRoot,
  body.fire-scn-printing .fire-noprint,
  body.fire-scn-printing > *:not(.fscn-print-host) { display: none !important; }
  /* 팝업이 열려 있을 때 코어가 거는 스크롤 잠금(html overflow:hidden)이 두 쪽째부터 잘리지 않게 */
  html:has(body.fire-scn-printing) { overflow: visible !important; height: auto !important; }
  body.fire-scn-printing { page: fireScn; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #000 !important; overflow: visible !important; height: auto !important; min-height: 0 !important; position: static !important; }
  body.fire-scn-printing .fscn-print-host { display: block !important; position: static !important; width: auto; margin: 0; padding: 0; background: #fff; }

  /* 쪽 나눔: 행은 쪼개지지 않고, 표 머리줄은 다음 쪽에도 반복되고, 절 제목이 쪽 맨 아래에 혼자 남지 않게 한다 */
  .fscn-doc { overflow: visible; }
  .fscn-head, .fscn-doc-title { break-inside: avoid; page-break-inside: avoid; }
  .fscn-h { break-after: avoid; page-break-after: avoid; }
  .fscn-tbl thead { display: table-header-group; }
  .fscn-tbl tr { break-inside: avoid; page-break-inside: avoid; }
  .fscn-doc .fscn-ptl tr.fscn-long { break-inside: auto; page-break-inside: auto; }   /* 상세내용이 매우 긴 단계(약 900자 초과)는 한 쪽보다 길 수 있어 행 쪼개짐을 허용한다(머리행은 반복, 글자 유실 없음) — 긴 행 하나 때문에 앞 쪽 아래가 크게 비는 것을 막는다 */
  .fscn-note, .fscn-foot { break-inside: avoid; page-break-inside: avoid; }
}
