/* ==========================================================
   WP 협력사 안전관리 - PC 화면용 공용 스타일
   휴대폰(900px 미만)은 각 화면의 인라인 스타일 그대로 두고, 여기서는 건드리지 않는다.
   900px 이상에서만 휴대폰 폭(480px) 고정을 풀고, 위 메뉴(.gnav)와 왼쪽 고정 메뉴(.side)를 붙인다(pc-nav.js).
   이 파일은 각 화면 <head> 맨 끝에서 불러, 인라인 스타일의 max-width: 480px 을 덮는다.
   ========================================================== */

/* 휴대폰에서는 없음 */
.gnav, .side { display: none; }

/* 요약본·상세본 표시 줄(제목 아래 한 줄)과 카드 끝 '상세 보기' 링크. 휴대폰·PC 공통(2026-12-01 요약본/상세본 정리) */
.ver-line { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: #64748b; letter-spacing: -0.2px; word-break: keep-all; }
.ver-line b { color: #475569; font-weight: 800; }
.ver-line a { color: #004b8d; font-weight: 700; text-decoration: none; }
.more-detail { display: block; margin-top: 8px; text-align: right; font-size: 13px; font-weight: 700; color: #004b8d; text-decoration: none; letter-spacing: -0.2px; }
.ver-line a:hover, .more-detail:hover { text-decoration: underline; }

@media (min-width: 900px) {
    .app-container { max-width: none; }

    /* ── 첫 화면(index.html): 위 메뉴(60px, 관리자 단추 포함) + 화면 폭 전체 사진 슬라이드 + 메뉴 카드 3열 ── */
    .home .app-container > .header, .home .admin-btn-container { display: none; } /* 휴대폰 머리글·관리자 단추 대신 위 메뉴 */
    /* 첫 화면 위 메뉴는 안쪽 화면과 같은 높이·여백·글자 크기(60px)라 메뉴를 눌러 들어가도 자리가 그대로다 */
    .home.has-gnav .app-container { min-height: calc(100vh - 60px); }
    .home #homeHero { position: relative; }
    .home .hero-slider { padding: 0; }
    .home .hero { flex: 0 0 100%; margin: 0; height: max(560px, calc(100vh - 60px)); border-radius: 0; box-shadow: none; }
    .home .hero > img { object-position: center 42%; }
    .home .hero-bg-icon { display: none; }
    .home .hero-shade { background:
        linear-gradient(to right, rgba(2,14,32,0.5) 0%, rgba(2,14,32,0.2) 45%, rgba(2,14,32,0) 72%),
        linear-gradient(to top, rgba(2,14,32,0.55) 0%, rgba(2,14,32,0) 42%); }
    .home .hero-top { top: 32px; left: 100px; right: auto; }
    .home .hero-course { font-size: 14px; padding: 7px 14px; }
    .home .hero-body { left: 100px; right: auto; top: 46%; bottom: auto; transform: translateY(-50%); max-width: 860px; }
    .home .hero-title { font-size: 56px; line-height: 1.18; letter-spacing: -1.5px; text-shadow: 0 3px 18px rgba(2,14,32,0.5); }
    .home .hero-meta { font-size: 20px; margin-top: 18px; text-shadow: 0 1px 8px rgba(2,14,32,0.5); }
    .home .hero-dots { position: absolute; left: 100px; bottom: 36px; margin: 0; z-index: 3; }
    .home .hdot { background: rgba(255,255,255,0.55); }
    .home .hdot.active { background: #ffffff; }
    .home .menu-list { width: 100%; max-width: 1200px; box-sizing: border-box; margin: 0 auto; padding: 40px 20px 56px; gap: 16px; }
    .home .menu-item { aspect-ratio: auto; flex-direction: row; justify-content: flex-start; text-align: left; padding: 22px 24px; min-height: 104px; border-radius: 18px; transition: transform 0.2s, box-shadow 0.2s; }
    .home .menu-item .icon-box { width: 58px; height: 58px; font-size: 28px; margin: 0 18px 0 0; flex-shrink: 0; }
    .home .menu-item .menu-title { font-size: 18px; }
    .gnav-ask { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; background: #004b8d; color: #ffffff; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
    .gnav-ask:hover { background: #00366a; }

    /* ── 안쪽 화면: 위 메뉴(60px) + 왼쪽 고정 메뉴(260px) + 본문 ── */
    aside.side { display: flex; }
    .with-side { padding-left: 260px; box-sizing: border-box; min-width: 0; }
    .with-side .header .back-btn { display: none; } /* 왼쪽 메뉴의 ← 첫 화면, 차례가 대신한다 */
    /* 본문은 1100px 안에서 읽히게 가운데. 머리글 띠와 탭 띠는 폭 전체, 그 안의 글자만 본문 줄에 맞춘다 */
    /* ── PC 공통 규격(2026-12-01, 안쪽 화면을 같은 크기로). 화면별 인라인 PC 블록도 이 변수를 쓴다 ── */
    :root {
        --pc-max: 1100px;        /* 본문 최대 폭 */
        --pc-pad: 32px;          /* 본문 좌우 안쪽 여백 */
        --pc-text: 15px;         /* 본문 글자 */
        --pc-small: 13.5px;      /* 작은 설명·표 안 글자(최소) */
        --pc-card-title: 17px;   /* 카드 제목 */
        --pc-section: 20px;      /* 구역 소제목 */
        --pc-box-head: 16px;     /* 아코디언·점검표 머리 글자 */
        --pc-line: 1.55;         /* 줄 간격 */
        --pc-card-h: 72px;       /* 목록형 카드 최소 높이 */
        --pc-icon: 40px;         /* 목록형 카드 아이콘 */
        --pc-box-pad: 20px;      /* 아코디언·표·카드 안쪽 여백 */
        --pc-btn-h: 48px;        /* 단추 높이 */
        --pc-btn-text: 15px;     /* 단추 글자 */
        --pc-gap: 12px;          /* 카드 사이 */
        --pc-radius: 14px;
    }
    /* 본문: 최대 1100px 가운데, 좌우 32px. 모든 안쪽 화면 같게 */
    .with-side > :where(.container, .content, .content-area, .form-container, .qa-section, .progress, #steps, .report-meta) { width: 100%; max-width: calc(var(--pc-max) + 2 * var(--pc-pad)); box-sizing: border-box; margin-left: auto; margin-right: auto; padding-left: var(--pc-pad); padding-right: var(--pc-pad); font-size: var(--pc-text); line-height: var(--pc-line); }
    .with-side > :where(.tabs, .nav-tabs, .nav) { padding-left: max(var(--pc-pad), calc((100% - var(--pc-max)) / 2)); padding-right: max(var(--pc-pad), calc((100% - var(--pc-max)) / 2)); }
    /* 목록형 카드(교안·성과공유·가이드 작업·보건 유해인자·TBM 작업유형): 3열, 최소 높이 72px, 아이콘 40px, 제목 17px, 설명 13.5px */
    .has-gnav .with-side :is(.hw-grid, .factor-grid, .sc-picker) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pc-gap); }
    .has-gnav .with-side :is(.hw-btn, .factor-btn, .sc-btn, .menu-card) { min-height: var(--pc-card-h); box-sizing: border-box; margin: 0; padding: 14px 18px; border-radius: var(--pc-radius); display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; text-align: left; font-size: var(--pc-card-title); font-weight: 800; line-height: 1.35; }
    .has-gnav .with-side :is(.hw-btn .ic, .factor-btn .ico, .menu-card .icon-box) { width: var(--pc-icon); height: var(--pc-icon); flex: 0 0 var(--pc-icon); display: flex; align-items: center; justify-content: center; font-size: 24px; border-radius: 12px; }
    .has-gnav .with-side .sc-btn b { width: var(--pc-icon); height: var(--pc-icon); flex: 0 0 var(--pc-icon); display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #e8f1fb; font-size: var(--pc-text); }
    .has-gnav .with-side .sc-btn.on b { background: rgba(255, 255, 255, 0.16); }
    .has-gnav .with-side .menu-card .title { font-size: var(--pc-card-title); }
    .has-gnav .with-side .menu-card .desc { font-size: var(--pc-small); line-height: 1.45; }
    .has-gnav .with-side .menu-card .chip { font-size: var(--pc-small); }
    .has-gnav .with-side .more-detail, .has-gnav .with-side .ver-line { font-size: var(--pc-small); }
    /* 단추(PDF 저장·Word 저장·진단 시작·시작하기 등): 높이 48px, 글자 15px */
    .has-gnav .with-side :is(.action-btn, .btn-submit, .btn-pdf, .btn, .gov-link, .btn-next, .btn-prev, .sp-link) { min-height: var(--pc-btn-h); box-sizing: border-box; padding-top: 0; padding-bottom: 0; font-size: var(--pc-btn-text); }
    .has-gnav .with-side :is(.btn-submit, .btn-pdf, .btn, .gov-link) { display: flex; align-items: center; justify-content: center; }
    /* 화면 머리글: 남색 띠 대신 흰 제목 줄(견본과 같은 모양). 오른쪽 단추(PDF 등)는 그대로 */
    .has-gnav .with-side { background-color: #f6f8fb; }
    .has-gnav .with-side > .header { height: 60px; min-height: 60px; box-sizing: border-box; padding: 0 32px; display: flex; align-items: center; gap: 12px; background: #ffffff; color: #1e293b; border-bottom: 1px solid #e2e8f0; box-shadow: none; text-align: left; flex-shrink: 0; }
    .has-gnav .with-side > .header h2 { flex: 1; min-width: 0; margin: 0; font-size: 22px; font-weight: 800; color: #1e293b; letter-spacing: -0.6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .has-gnav .with-side > .header + * { margin-top: 0; }
    /* PC: 요약본·상세본 표시 줄은 흰 제목 줄 오른쪽에 */
    .has-gnav .with-side { position: relative; }
    .has-gnav .with-side .ver-line { position: absolute; top: 0; right: 32px; height: 60px; display: flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; z-index: 2; white-space: nowrap; }
    .has-gnav .with-side:has(.ver-line) > .header { padding-right: 320px; }

    div.gnav { display: flex; align-items: center; gap: 12px; position: fixed; top: 0; left: 0; right: 0; height: 60px; padding: 0 32px; background: #ffffff; border-bottom: 1px solid #e2e8f0; z-index: 300; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06); box-sizing: border-box; font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif; }
    .has-gnav { padding-top: 60px; }
    .has-gnav .side { top: 60px; }
    /* 안쪽 화면 머리글 띠는 PC 에서 붙박지 않는다(위 메뉴가 늘 떠 있고, 붙박이 top 값이 띠를 60px 내려 버린다) */
    .has-gnav .with-side > .header { position: relative; top: auto; }
    .has-gnav .app-container { min-height: calc(100vh - 60px); }
    .gnav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #004b8d; flex-shrink: 0; }
    .gnav-brand img { height: 28px; width: auto; }
    .gnav-brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
    .gnav-brand small { display: block; font-size: 11px; font-weight: 700; color: #64748b; letter-spacing: -0.3px; white-space: nowrap; }
    .gnav-menu { display: flex; gap: 0; margin-left: 28px; height: 60px; min-width: 0; }
    .gnav-menu a { display: inline-flex; align-items: center; padding: 0 12px; font-size: 15px; font-weight: 700; color: #334155; text-decoration: none; letter-spacing: -0.4px; border-bottom: 3px solid transparent; white-space: nowrap; box-sizing: border-box; }
    .gnav-menu a:hover, .gnav-menu a.cur { color: #004b8d; border-bottom-color: #004b8d; }
    .gnav-menu:hover a.cur:not(:hover) { color: #334155; border-bottom-color: transparent; } /* 다른 메뉴에 올리면 밑줄이 그쪽으로 옮겨 간다 */
    .gnav-menu a.cur { font-weight: 800; }
    /* 위 메뉴에 올리면 아래로 펼쳐지는 큰 메뉴(견본 jungbuedu). 내용은 pc-nav.js 가 채운다 */
    .gnav .mega { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #0b2d5c; color: #ffffff; box-shadow: 0 18px 40px rgba(2, 14, 32, 0.35); }
    .gnav:has(.gnav-menu a:hover) .mega, .gnav .mega:hover { display: block; }
    .gnav .mega-in { padding: 32px 40px 36px; display: grid; grid-template-columns: 240px 1fr; gap: 0; } /* 왼쪽 칸 폭은 JS 가 위 메뉴 시작 위치에 맞춘다 */
    .gnav .mega-head small { display: block; white-space: nowrap; font-size: 11.5px; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); font-weight: 700; margin-bottom: 10px; }
    .gnav .mega-head b { display: block; padding-right: 24px; font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; word-break: keep-all; }
    .gnav .mega-cols { display: flex; gap: 40px; flex-wrap: wrap; }
    .gnav .mega-col { min-width: 180px; max-width: 260px; }
    .gnav .mega-col h4 { margin: 0 0 10px; padding-bottom: 9px; border-bottom: 2px solid rgba(255,255,255,0.45); font-size: 15px; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; }
    .gnav .mega-col h4 a { color: inherit; text-decoration: none; }
    .gnav .mega-col h4 a:hover { color: #7dd3fc; text-decoration: underline; }
    .gnav .mega-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
    .gnav .mega-col li a, .gnav .mega-col li span { display: inline-block; padding: 4px 0; font-size: 13.5px; word-break: keep-all; color: rgba(255,255,255,0.82); text-decoration: none; letter-spacing: -0.3px; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
    .gnav .mega-col li a:hover { color: #ffffff; border-bottom-color: #7dd3fc; }
    .gnav .mega-col li span { color: rgba(255,255,255,0.4); }
    .gnav .mega-col li.sub { padding-left: 10px; }
    .gnav .mega-col li.sub a { font-size: 12.5px; color: rgba(255,255,255,0.7); }
    .gnav .mega-col.lit h4 { color: #ffffff; border-bottom-color: #7dd3fc; }

    /* 왼쪽 메뉴(pc-nav.js) */
    .side { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; box-sizing: border-box; flex-direction: column; background: #ffffff; border-right: 1px solid #e2e8f0; z-index: 110; overflow-y: auto; padding: 14px 12px 16px; font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif; }
    .side-home { display: inline-flex; align-items: center; gap: 6px; margin: 2px 6px 14px; font-size: 13px; font-weight: 700; color: #64748b; text-decoration: none; }
    .side-home:hover { color: #1e293b; }
    .side-title { display: flex; align-items: center; gap: 8px; padding: 0 8px 14px; font-size: 16px; font-weight: 800; color: #004b8d; letter-spacing: -0.5px; border-bottom: 1px solid #f1f5f9; margin-bottom: 10px; word-break: keep-all; }
    .side-title i { font-size: 22px; }
    .side-nav { display: flex; flex-direction: column; gap: 2px; }
    .side-grp { padding: 14px 12px 4px; font-size: 11.5px; font-weight: 700; color: #94a3b8; letter-spacing: 0.02em; }
    .side-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: #334155; text-decoration: none; letter-spacing: -0.3px; width: 100%; box-sizing: border-box; border: none; background: none; font-family: inherit; text-align: left; cursor: pointer; word-break: keep-all; }
    .side-item i { font-size: 19px; color: #94a3b8; flex-shrink: 0; }
    .side-item:hover { background: #f8fafc; }
    .side-item.cur { font-weight: 800; background: #e8f1fb; color: #004b8d; }
    .side-item.cur i { color: #004b8d; }
    .side-toc { display: flex; flex-direction: column; gap: 1px; margin: 6px 0 6px 20px; padding-left: 12px; border-left: 2px solid #f1f5f9; }
    .side-sub { display: block; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: #64748b; text-decoration: none; letter-spacing: -0.3px; word-break: keep-all; line-height: 1.4; border: none; background: none; font-family: inherit; text-align: left; cursor: pointer; width: 100%; box-sizing: border-box; }
    .side-sub:hover { color: #1e293b; background: #f8fafc; }
    .side-sub.cur { font-weight: 800; background: #e8f1fb; color: #004b8d; }
    .side-foot { margin-top: auto; padding: 14px 0 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; font-weight: 600; color: #94a3b8; border-top: 1px solid #f1f5f9; }
    .side-foot > span { padding: 10px 8px 0; line-height: 1.6; }
}

/* 노트북 반 화면(900~1339px): 위 메뉴 9개가 한 줄에 들어가게 줄인다 */
@media (min-width: 900px) and (max-width: 1339px) {
    .gnav-brand small { display: none; }          /* 이름은 항상 보이고(사용자 지시 2026-12-02), 부제만 숨긴다 */
    .gnav-brand b { font-size: 15px; }
    .gnav-menu { margin-left: 16px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
    .has-gnav .with-side :is(.hw-grid, .factor-grid, .sc-picker) { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 1100px 미만은 2열 */
    div.gnav { padding: 0 16px; }
    .gnav-menu a { padding: 0 7px; font-size: 13.5px; }
}

@media print { .side, .gnav, .ver-line, .more-detail { display: none !important; } .with-side { padding-left: 0 !important; } .has-gnav { padding-top: 0 !important; } }

/* ── 점검표·서식 바로 내려받기(pdfdl.js, 2026-12-01): 제목 줄·카드 머리 오른쪽 「⬇ PDF」「⬇ Word」 작은 단추 ── */
.dlb-btns { margin-left: auto; flex-shrink: 0; display: inline-flex; gap: 4px; vertical-align: middle; }
.dlb { font-family: inherit; font-size: 11.5px; font-weight: 800; line-height: 1.4; color: #084c3e; background: #fff; border: 1px solid #9fd8b8; border-radius: 14px; padding: 3px 8px; cursor: pointer; white-space: nowrap; }
.dlb:hover { background: #ecfdf5; }
.dlb.busy { color: #64748b; border-color: #cbd5e1; background: #f1f5f9; cursor: progress; pointer-events: none; }
.dlb-row { display: flex; align-items: center; gap: 8px; }          /* 제목 + 단추 한 줄(제목은 왼쪽, 단추는 오른쪽) */
.dlb-row > :first-child { flex: 1; min-width: 0; }
.print-link { font-family: inherit; font-size: 13px; font-weight: 700; color: #334155; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; padding: 0 12px; cursor: pointer; white-space: nowrap; }
.print-link:hover { background: #f1f5f9; }
/* PDF 만들기용 복제본(화면 밖). 718px = A4 폭 190mm(여백 10mm 뺀 값) */
.pdfdl-host { position: absolute; left: -10000px; top: 0; width: 718px; }
.pdfdl-sheet { background: #fff; color: #0f172a; font-family: 'Malgun Gothic', sans-serif; }
.pdfdl-head { border-bottom: 2px solid #0f172a; padding: 0 0 10px 0; margin: 0 0 12px 0; }
.pdfdl-title { font-size: 21px; font-weight: 800; color: #000; text-align: center; margin-bottom: 6px; }
.pdfdl-sub { font-size: 12px; color: #334155; text-align: center; }
.pdfdl-meta { font-size: 12px; color: #334155; text-align: right; margin-top: 8px; padding-right: 8px; }
.pdfdl-sheet .print-title, .pdfdl-sheet .print-only { display: block !important; }
.pdfdl-sheet .tbl-wrap { overflow: visible !important; }
.pdfdl-sheet table { min-width: 0 !important; }
.pdfdl-sheet .card, .pdfdl-sheet .acc, .pdfdl-sheet .acc-item, .pdfdl-sheet .sc-card, .pdfdl-sheet #resultArea { box-shadow: none !important; }
.pdfdl-sheet .acc-head::after, .pdfdl-sheet .acc-btn::after { content: none !important; }   /* 접힘 화살표·+ 표시 숨김 */
/* 인쇄 쪽 나눔 공통 규칙: 붙여 두면 그 덩어리는 쪽 경계에서 가르지 않음 / 다음 내용과 같은 쪽에 둠 */
@media print {
    .pb-avoid { break-inside: avoid; page-break-inside: avoid; }
    .pb-after-avoid { break-after: avoid; page-break-after: avoid; }
    .dlb-btns, .print-link { display: none !important; }
}
@media (min-width: 900px) {
    .dlb { font-size: 13px; padding: 4px 11px; }
    .print-link { font-size: var(--pc-small); padding: 0 18px; }
}
