/*
 * 응시자 화면 공통 스타일(4-6) — 한화인(hanwhain.com) 채용 사이트의 모양을 따른다: 흰 바탕 · 주황 주 버튼 · 4px 모서리 · 회색 선 · 어두운 바닥.
 * 로그인 둘 · 고객사 첫 화면 · 대기실 · 검사 · 안전성향 · SJT 응답 · 컬처핏 평가자 · 점검 안내가 같이 쓴다. 화면마다 따로 적던 큰 <style>을 이것으로 옮겼다.
 * 글꼴은 --app-font 한 곳이다(tokens.css — 관리 화면과 같이) — 한화 전용서체(한화고딕)는 한화의 허락 · 파일을 받으면 거기만 바꾼다.
 * 그 전에는 한화고딕과 가장 비슷한 Spoqa Han Sans Neo(앱 안 ~/lib/spoqa-han-sans-neo@3.3.0, SIL OFL — 4-6 (2), 10-29). 예전에는 Pretendard.
 * 머리의 로고는 Pages/Shared/_ApplicantBrand 한 곳이다 — 관리 화면에서 올린 고객사 로고(Customer.LogoUrl), 없으면 KHAI 로고.
 * 한화 로고는 한화의 사용 승인을 받은 뒤 고객사 로고로 올린다(앱에 한화 로고 파일을 두지 않는다).
 */
/* 색 · 글꼴 · 모서리 값(:root)은 tokens.css 한 곳이다(4-6-3-1) — 관리 · 고객사 화면(admin.css)과 같이 쓴다. 화면은 tokens.css를 먼저 싣는다 */

/* ───── 바탕 — body에만(html에 바탕을 주면 토큰 화면의 회색 body 바탕이 화면 끝까지 퍼지지 않는다) ───── */
body {
    margin: 0;
    background: #fff;
    color: var(--text);
    font-family: var(--app-font), 'Apple SD Gothic Neo', 'Malgun Gothic', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}
body.ha-page { min-height: 100vh; display: flex; flex-direction: column; }
.ha-page a { color: inherit; }
.ha-page *, .ha-page *::before, .ha-page *::after { box-sizing: border-box; }
.ha-page button, .ha-page input, .ha-page select, .ha-page textarea { font-family: inherit; }

/* ───── 머리 ───── */
.ha-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: #fff;
    border-bottom: 1px solid var(--line-soft);
}
.ha-header-inner {
    max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.ha-brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--ink); }
.ha-brand img { height: 28px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.ha-brand-name { font-size: 18px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ha-brand-sub { font-size: 15px; font-weight: 400; color: var(--text-3); white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); }
.ha-brand-sub:first-child { padding-left: 0; border-left: 0; }   /* 로고를 감춘 검사 화면(시험창 로고 끔) — 왼쪽 선만 남지 않게 */
.ha-header-right { display: flex; align-items: center; gap: 18px; font-size: 15px; color: var(--text-2); white-space: nowrap; }
.ha-header-right .ha-user { color: var(--text); font-weight: 500; }
.ha-link-btn {
    border: 0; background: none; padding: 0; cursor: pointer;
    font-size: 15px; color: var(--text-2); text-decoration: none;
}
.ha-link-btn:hover { color: var(--brand); }

/* ───── 본문 ───── */
.ha-main { flex: 1 0 auto; width: 100%; }
.ha-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.ha-narrow { max-width: 430px; margin: 0 auto; padding: 72px 20px 96px; }
.ha-title { margin: 0 0 40px; text-align: center; font-size: 32px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.ha-subtitle { margin: -28px 0 36px; text-align: center; font-size: 15px; color: var(--text-3); }

/* 제목 띠 — 한화인 안쪽 화면(채용공고)의 어두운 띠 */
.ha-band {
    background: linear-gradient(135deg, #24252B 0%, #1B1B1F 55%, #2B2622 100%);
    color: #fff; text-align: center;
    padding: 64px 20px 60px;
}
.ha-band h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.ha-band p { margin: 12px 0 0; font-size: 16px; color: rgba(255, 255, 255, .78); }
.ha-band .ha-band-accent { display: inline-block; width: 28px; height: 3px; background: var(--brand); margin-bottom: 18px; }

/* ───── 입력 칸 — 한화인 로그인처럼 칸 안 왼쪽에 이름 ───── */
.ha-field {
    display: flex; align-items: center;
    min-height: 64px; margin-bottom: 8px;
    border: 1px solid var(--line); border-radius: 0; background: #fff;
    transition: border-color .15s;
}
.ha-field:focus-within { border-color: var(--text); }
.ha-field > label {
    /* 이름 자리 — 가장 긴 한국어 이름(검사 비밀번호 · 로그인 아이디, Spoqa 15px 약 87px)이 오른쪽 선에 닿지 않게(4-6 (2)) */
    flex: 0 0 auto; width: 136px; margin: 0; padding: 0 12px 0 24px;
    font-size: 15px; font-weight: 400; color: var(--text-2); line-height: 1.3;
    position: relative;
}
.ha-field > label::after { content: ""; position: absolute; right: 0; top: 50%; width: 1px; height: 16px; margin-top: -8px; background: var(--line); }
.ha-field > input, .ha-field > select {
    flex: 1 1 auto; min-width: 0; height: 62px; margin: 0; padding: 0 20px 0 24px;
    border: 0; outline: 0; background: transparent; box-shadow: none;
    font-size: 16px; font-weight: 400; color: var(--text);
}
.ha-field > select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23717171' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 20px center; }
.ha-field > input::placeholder { color: var(--text-4); }
.ha-field.is-wide > label { width: 150px; }
.ha-help { margin: 0 0 16px; font-size: 13px; color: var(--text-3); }
.ha-error, .ha-page .field-validation-error, .ha-page .validation-summary-errors { display: block; margin: 0 0 12px; font-size: 13px; color: var(--danger); }
.ha-page .validation-summary-errors ul { margin: 0; padding-left: 18px; }
.ha-page .field-validation-valid, .ha-page .validation-summary-valid { display: none; }

/* 개인정보 동의 */
.ha-consent { margin: 20px 0 8px; }
.ha-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--text); cursor: pointer; }
.ha-check input[type=checkbox] {
    appearance: none; -webkit-appearance: none; flex: 0 0 auto;
    width: 22px; height: 22px; margin: 0; border: 1px solid var(--line); border-radius: 2px; background: #fff; cursor: pointer;
    display: inline-grid; place-content: center;
}
.ha-check input[type=checkbox]:checked { background: var(--brand); border-color: var(--brand); }
.ha-check input[type=checkbox]:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.ha-check a { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; white-space: nowrap; }
.ha-privacy { margin-top: 12px; padding: 18px 20px; background: var(--bg-soft); border-radius: var(--radius); font-size: 14px; line-height: 1.7; color: var(--text-2); }
.ha-privacy p { margin: 0 0 8px; }
.ha-privacy p:last-child { margin-bottom: 0; }
.ha-privacy strong { color: var(--text); font-weight: 600; }

/* 안내 글 — 한화인 로그인 아래 회색 안내처럼 */
.ha-notes { list-style: none; margin: 20px 0 28px; padding: 0; font-size: 14px; color: var(--text-3); line-height: 1.6; }
.ha-notes li { position: relative; padding-left: 12px; margin-bottom: 4px; }
.ha-notes li::before { content: ""; position: absolute; left: 0; top: .68em; width: 4px; height: 4px; border-radius: 50%; background: var(--text-4); }
.ha-notes li.is-strong { color: var(--text); font-weight: 600; }
.ha-notes li.is-strong::before { background: var(--brand); }

/* ───── 버튼 ───── */
.ha-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 64px; padding: 0 24px;
    border: 0; border-radius: var(--radius); background: var(--brand); color: #fff;
    font-size: 19px; font-weight: 700; text-decoration: none; cursor: pointer;
    transition: background-color .15s;
}
.ha-btn:hover { background: var(--brand-hover); color: #fff; }
.ha-btn:disabled, .ha-btn.disabled { background: #D9D9D9; color: #fff; cursor: not-allowed; }
.ha-btn-sm { width: auto; height: 44px; padding: 0 22px; font-size: 15px; }
.ha-btn-line {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.ha-btn-line:hover { border-color: var(--text); color: var(--text); }
.ha-btn-dark { background: var(--text); }
.ha-btn-dark:hover { background: #000; }

.ha-links { display: flex; justify-content: center; gap: 28px; margin-top: 22px; font-size: 15px; color: var(--text-3); }

/* ───── 목록 — 한화인 채용공고 목록처럼(위 굵은 선 · 항목 사이 옅은 선) ───── */
.ha-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.ha-item {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 24px 0; border-bottom: 1px solid var(--line);
}
.ha-item-main { min-width: 0; }
.ha-item-kicker { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 700; color: var(--text-2); }
.ha-item-title { margin: 0 0 8px; font-size: 19px; font-weight: 700; color: var(--text); line-height: 1.45; }
.ha-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--text-2); }
.ha-item-side { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.ha-badge {
    display: inline-flex; align-items: center; height: 22px; padding: 0 7px;
    border-radius: var(--radius); background: var(--badge); color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
}
.ha-badge.is-gray { background: #8C8C8C; }
.ha-badge.is-dark { background: var(--text); }
.ha-badge.is-line { background: #fff; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.ha-state-done { font-size: 15px; font-weight: 700; color: var(--text-3); }

/* 알림 상자 */
.ha-alert { margin: 0 0 24px; padding: 16px 20px; border-radius: var(--radius); background: var(--bg-soft); font-size: 15px; color: var(--text-2); line-height: 1.6; }
.ha-alert.is-brand { background: var(--brand-soft); color: #8A4313; }
.ha-alert strong { color: var(--text); }

/* ───── 바닥 ───── */
.ha-footer { flex-shrink: 0; background: var(--footer); color: #8F8F8F; font-size: 13px; }
.ha-footer-inner { max-width: 1200px; margin: 0 auto; padding: 28px 20px 36px; }
.ha-footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 18px; }
.ha-footer-links a { color: #BDBDBD; text-decoration: none; font-size: 14px; }
.ha-footer-links a:hover { color: #fff; }
.ha-footer-company { line-height: 1.7; }
.ha-footer-copy { margin-top: 10px; color: #6F6F6F; }

/* ───── 공지 팝업(khai-popup-notice.css 위에 한화인 모양으로) ───── */
.ha-page .popup-notice-overlay { background: rgba(0, 0, 0, .55); }
.ha-page .popup-notice-modal { border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .18); font-family: inherit; }
.ha-page .popup-notice-header { background: #fff; border-bottom: 1px solid var(--line-soft); padding: 20px 24px; }
.ha-page .popup-title-main { color: var(--ink); font-size: 19px; font-weight: 700; }
.ha-page .popup-close-btn { color: var(--text-3); }
.ha-page .popup-notice-content { color: var(--text); font-size: 15px; line-height: 1.7; }
.ha-page .popup-notice-footer .btn { min-width: 88px; height: 40px; border: 0; border-radius: var(--radius); background: var(--brand); color: #fff; font-weight: 700; }

/* ───── 창(모달) — 대기실의 언어 · 직무 창 ───── */
.ha-page .modal-content { border: 0; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .18); }
.ha-page .modal-header { padding: 22px 24px; border-bottom: 1px solid var(--line-soft); }
.ha-page .modal-title { font-size: 19px; font-weight: 700; color: var(--ink); }
.ha-page .modal-header .close { margin: -4px -6px -4px auto; padding: 0 6px; border: 0; background: none; font-size: 28px; font-weight: 300; line-height: 1; color: var(--text-3); opacity: 1; text-shadow: none; cursor: pointer; }
.ha-page .modal-header .close:hover { color: var(--ink); }
.ha-page .modal-body { padding: 24px; color: var(--text); }
.ha-page .modal-footer { padding: 16px 24px 22px; border-top: 0; gap: 8px; }
.ha-page .modal-footer .btn-primary, .ha-page .modal-body .btn-primary { background: var(--brand); border-color: var(--brand); border-radius: var(--radius); font-weight: 700; }
.ha-page .modal-footer .btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.ha-page .modal-footer .btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }

/* ───── 대기실 ───── */
.ha-room { padding-top: 48px; padding-bottom: 88px; }
.ha-section-title { margin: 0 0 16px; font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.ha-list + .ha-section-title { margin-top: 56px; }
.ha-caution { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 15px; line-height: 1.8; color: var(--text-2); white-space: pre-line; }

/* 창 안 칸(언어 · 직무) */
.ha-modal-lead { margin: 0 0 18px; font-size: 15px; color: var(--text-2); }
.ha-modal-field { margin-bottom: 16px; }
.ha-modal-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.ha-modal-field input, .ha-modal-field select, .ha-modal-field textarea {
    display: block; width: 100%; height: 52px; padding: 0 16px;
    border: 1px solid var(--line); border-radius: 0; background: #fff; outline: 0;
    font-size: 15px; color: var(--text);
}
.ha-modal-field textarea { height: auto; padding: 12px 16px; resize: vertical; line-height: 1.6; }
.ha-modal-field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23717171' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.ha-modal-field input:focus, .ha-modal-field select:focus, .ha-modal-field textarea:focus { border-color: var(--text); }
.ha-modal-field input::placeholder, .ha-modal-field textarea::placeholder { color: var(--text-4); }
.ha-required { color: var(--brand); }
.ha-optional { font-weight: 400; font-size: 13px; color: var(--text-3); }
.ha-page .modal-body .ha-alert { margin-bottom: 16px; font-size: 13px; }

/* 누른 단추의 도는 표시 */
.ha-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: ha-spin .8s linear infinite; vertical-align: middle; }
@keyframes ha-spin { to { transform: rotate(360deg); } }

/* ───── 검사 화면 ───── */
.ha-exam .ha-header { position: static; }
.ha-exam-intro { background: var(--bg-soft); border-bottom: 1px solid var(--line-soft); }
.ha-exam-intro .ha-container { padding-top: 36px; padding-bottom: 32px; }
.ha-exam-title { margin: 0 0 10px; font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.ha-exam-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0 0 16px; padding: 0; font-size: 15px; color: var(--text-2); }
.ha-exam-facts b { margin: 0 2px 0 6px; color: var(--brand); font-weight: 700; }
.ha-exam-guide { margin: 0 0 6px; font-size: 16px; color: var(--text); line-height: 1.7; }
.ha-exam-scale { margin: 0; font-size: 14px; color: var(--text-3); line-height: 1.7; }

/* 상태 막대 — 위에 붙는다 */
.ha-exam-bar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.ha-exam-bar-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.ha-exam-stat { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.ha-exam-label { font-size: 14px; color: var(--text-3); }
.ha-exam-value { font-size: 16px; font-weight: 700; color: var(--text); }
.ha-exam-stat.is-time .ha-exam-value { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ha-count { color: var(--brand); font-weight: 700; }
.ha-exam-bar .ha-btn { margin-left: auto; }
.ha-progress { height: 3px; background: var(--line-soft); }
.ha-progress span { display: block; height: 100%; background: var(--brand); transition: width .25s; }

/* 문항 표(PC) */
.ha-exam-body { padding-top: 8px; padding-bottom: 72px; }
.q-table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; }
.q-table thead th {
    position: sticky; top: 68px; z-index: 5;
    padding: 14px 6px; background: #fff; border-bottom: 1px solid var(--line-strong);
    font-size: 14px; font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.3;
}
.q-table thead th.q-text { text-align: left; padding-left: 12px; }
.q-table .q-no { width: 64px; }
.q-table.q-choices-5 .q-opt { width: 88px; }
.q-table.q-choices-2 .q-opt { width: 120px; }
.q-table td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.q-table td.q-no { text-align: center; font-size: 15px; font-weight: 600; color: var(--text-3); }
.q-table td.q-text { padding: 18px 12px; font-size: 16px; color: var(--text); line-height: 1.6; }
.q-table td.q-text:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.q-table tr.q-row:hover td { background: #FAFAFA; }
.q-table tr.q-row:has(.q-opt input:checked) td.q-no { color: var(--brand); }
.q-choice { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 60px; margin: 0; cursor: pointer; }
.q-table input[type=radio].radio-button-rectangle {
    appearance: none; -webkit-appearance: none;
    width: 28px; height: 28px; margin: 0;
    border: 1.5px solid #C4C4C4; border-radius: 50%; background: #fff; cursor: pointer;
    transition: border-color .12s, box-shadow .12s, background-color .12s;
}
.q-choice:hover input[type=radio].radio-button-rectangle { border-color: var(--brand); }
.q-table input[type=radio].radio-button-rectangle:checked { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 5px #fff; }
.q-table input[type=radio].radio-button-rectangle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.q-table .option-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* PC는 머리 줄이 보기 이름 */
.ha-exam-submit { display: flex; justify-content: center; margin-top: 48px; }
.ha-exam-submit .ha-btn { max-width: 390px; }

/* 휴대폰(사용자 에이전트 또는 좁은 창 — body.mobile-optimized): 같은 표를 카드로 */
body.mobile-optimized .ha-exam-intro .ha-container { padding-top: 22px; padding-bottom: 20px; }
body.mobile-optimized .ha-exam-title { font-size: 22px; }
body.mobile-optimized .ha-exam-guide { font-size: 14px; }
body.mobile-optimized .ha-exam-scale { font-size: 13px; }
body.mobile-optimized .ha-exam-bar-inner { gap: 14px; min-height: 56px; }
body.mobile-optimized .ha-exam-stat { flex-direction: column; align-items: flex-start; gap: 0; }
body.mobile-optimized .ha-exam-label { font-size: 11px; }
body.mobile-optimized .ha-exam-value { font-size: 13px; }
body.mobile-optimized .ha-exam-stat.is-time .ha-exam-value { font-size: 15px; }
body.mobile-optimized .ha-exam-bar .ha-btn { height: 38px; padding: 0 14px; font-size: 14px; }
body.mobile-optimized .q-table, body.mobile-optimized .q-table tbody { display: block; }
body.mobile-optimized .q-table thead { display: none; }
body.mobile-optimized .q-table tr.q-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line); }
body.mobile-optimized .q-table.q-choices-2 tr.q-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.mobile-optimized .q-table td, body.mobile-optimized .q-table td.q-opt, body.mobile-optimized .q-table td.q-no { display: block; width: auto; min-width: 0; border: 0; }
body.mobile-optimized .q-table td.q-no { grid-column: 1 / -1; text-align: left; font-size: 13px; color: var(--brand); }
body.mobile-optimized .q-table td.q-no::before { content: "Q"; }
body.mobile-optimized .q-table td.q-text { grid-column: 1 / -1; padding: 0 0 10px; font-size: 16px; }
body.mobile-optimized .q-table tr.q-row:hover td { background: none; }
body.mobile-optimized .q-choice { position: relative; display: block; min-height: 0; }
body.mobile-optimized .q-table input[type=radio].radio-button-rectangle { position: absolute; width: 1px; height: 1px; opacity: 0; }
body.mobile-optimized .q-table .option-text {
    position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal;
    display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 6px 2px;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
    font-size: 13px; line-height: 1.3; color: var(--text-2); text-align: center;
}
body.mobile-optimized .q-table input:checked + .option-text { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 700; }
body.mobile-optimized .q-table input:focus-visible + .option-text { outline: 2px solid var(--brand); outline-offset: 2px; }
body.mobile-optimized .q-table tr.q-row.q-missing { padding-left: 10px; padding-right: 10px; background: var(--brand-soft); box-shadow: 0 0 0 2px var(--brand); border-radius: var(--radius); }
body.mobile-optimized .ha-exam-submit .ha-btn { max-width: none; }

/* ───── 안전성향 검사(한 문항씩) ───── */
.ha-spi-wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.ha-spi-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.ha-spi .timer-display {
    display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
    font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
}
.ha-spi .timer-display.warning { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-hover); }
.ha-spi .timer-display.danger { border-color: var(--danger); background: #FDECEC; color: var(--danger); }
.ha-spi-save { font-size: 14px; color: var(--text-3); }
.ha-spi .progress-wrap { margin-bottom: 34px; }
.ha-spi .progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; color: var(--text-3); }
.ha-spi .progress-track { height: 4px; background: var(--line-soft); overflow: hidden; }
.ha-spi .progress-bar { width: 0%; height: 100%; background: var(--brand); transition: width .3s; }
.ha-spi .question-card { padding: 4px 0 20px; }
.ha-spi .question-number { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 700; color: var(--brand); }
.ha-spi .question-text { min-height: 66px; margin-bottom: 28px; font-size: 22px; font-weight: 700; line-height: 1.5; color: var(--ink); letter-spacing: -0.02em; }
.ha-spi .options-container { display: flex; flex-direction: column; gap: 10px; }
.ha-spi .option {
    position: relative; padding: 18px 48px 18px 22px;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
    font-size: 16px; font-weight: 500; color: var(--text); cursor: pointer;
    transition: border-color .15s, background-color .15s, color .15s;
}
@media (hover: hover) { .ha-spi .option:hover { border-color: var(--brand); } }
.ha-spi .option.selected { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 700; }
.ha-spi .option.selected::after { content: '\2713'; position: absolute; right: 22px; font-weight: 700; }
.ha-spi .nav-buttons { display: flex; justify-content: space-between; margin-top: 24px; }
.ha-spi button.secondary {
    height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--text-2); font-size: 15px; font-weight: 600; cursor: pointer;
}
.ha-spi button.secondary:hover { border-color: var(--text); color: var(--text); }
.ha-spi .submit-area { display: none; margin-top: 36px; text-align: center; }
.ha-spi .submit-area p { margin: 0 0 16px; font-size: 15px; color: var(--text-2); }
.ha-spi .submit-btn { flex-direction: column; gap: 2px; height: auto; min-height: 64px; padding: 12px 24px; line-height: 1.3; }
.ha-sub-en { display: block; font-size: 13px; font-weight: 500; opacity: .8; }
@keyframes ha-slide-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.ha-spi .question-card.animate { animation: ha-slide-in .3s ease; }

/* 제출 중 가림막 */
.ha-loading { position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column; justify-content: center; align-items: center; background: rgba(29, 29, 29, .92); }
.ha-loading-box { padding: 32px; text-align: center; }
.ha-loading-spin { width: 48px; height: 48px; margin: 0 auto 24px; border: 4px solid rgba(255, 255, 255, .3); border-top-color: var(--brand); border-radius: 50%; animation: ha-spin 1s linear infinite; }
.ha-loading p { margin: 0 0 16px; color: #fff; font-size: 17px; font-weight: 600; line-height: 1.6; }
.ha-loading-track { width: 280px; max-width: 80vw; height: 6px; margin: 0 auto; background: rgba(255, 255, 255, .2); overflow: hidden; }
#loadingBar { width: 0%; height: 100%; background: var(--brand); transition: width .8s ease; }

/* 응시 완료 안내 */
.ha-done { text-align: center; }
.ha-done-icon { width: 72px; height: 72px; margin: 0 auto 24px; }
.ha-done-icon svg { width: 100%; height: 100%; display: block; }
.ha-done .ha-title { margin-bottom: 16px; }
.ha-done-desc { margin: 0 0 28px; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.ha-done-desc strong { color: var(--ink); }
.ha-done .ha-alert { text-align: left; }
.ha-btn-arrow { width: 8px; height: 8px; margin-left: 4px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }   /* [한화인으로 돌아가기 >] */

/* 대기실 — 모두 마침(4-6-3-1, 시안의 완료 상자 — 감독 안내 · 휴대폰 상자 대신) */
.ha-room-done { margin: 0 0 56px; padding: 40px 32px 30px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.ha-room-done .ha-done-icon { width: 56px; height: 56px; margin-bottom: 20px; }
.ha-room-done-title { margin: 0 0 14px; font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.ha-room-done .ha-done-desc { margin-bottom: 24px; }
.ha-room-done-return { max-width: 440px; margin: 0 auto; }
.ha-room-done-close { margin: 14px 0 0; font-size: 14px; color: var(--text-3); }
.ha-mt-time { margin-top: -24px; font-size: 18px; font-weight: 700; color: var(--brand); }

/* ───── 온라인 감독(5-7) — 대기실 안내 상자 · 사전 점검 ───── */
.ha-proctor { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 36px; padding: 22px 24px; border: 1px solid var(--brand); border-radius: var(--radius); background: var(--brand-soft); }
.ha-proctor.is-done { border-color: var(--line); background: var(--bg-soft); }
.ha-proctor-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--ink); }
.ha-proctor p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.ha-proctor .ha-proctor-state { margin-top: 8px; font-weight: 700; color: var(--brand-hover); }
.ha-proctor.is-done .ha-proctor-state { color: var(--ok); }
.ha-proctor .ha-btn { flex: 0 0 auto; }

.ha-precheck { max-width: 720px; margin: 0 auto; padding: 56px 20px 88px; }
.ha-narrow-box { max-width: 560px; margin: 0 auto; }
.ha-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 32px; padding: 0; counter-reset: ha-step; }
.ha-steps li { flex: 1 1 0; padding: 10px 6px 0; border-top: 3px solid var(--line-soft); font-size: 14px; color: var(--text-4); text-align: center; counter-increment: ha-step; }
.ha-steps li::before { content: counter(ha-step) ". "; }
.ha-steps li.is-done { border-top-color: var(--text-3); color: var(--text-3); }
.ha-steps li.is-now { border-top-color: var(--brand); color: var(--ink); font-weight: 700; }

.ha-check-list { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--line-strong); }
.ha-check-list li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ha-check-list b { display: block; margin-bottom: 2px; color: var(--ink); }
.ha-check-msg { display: block; color: var(--text-2); line-height: 1.6; }
.ha-check-mark { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--line-soft); position: relative; }
.ha-check-list li.is-ok .ha-check-mark { background: var(--ok); }
.ha-check-list li.is-ok .ha-check-mark::after { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); }
.ha-check-list li.is-bad .ha-check-mark { background: var(--danger); }
.ha-check-list li.is-bad .ha-check-mark::after { content: "!"; position: absolute; inset: 0; color: #fff; font-size: 14px; font-weight: 700; line-height: 22px; text-align: center; }
.ha-check-list li.is-bad .ha-check-msg { color: var(--danger); }

.ha-cam { position: relative; width: 100%; max-width: 560px; aspect-ratio: 4 / 3; margin: 0 auto; border-radius: var(--radius); background: #1D1D1D; overflow: hidden; }
.ha-cam video, .ha-cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ha-cam video { transform: scaleX(-1); }   /* 미리보기만 거울처럼 — 찍은 사진은 그대로 */
.ha-cam [hidden] { display: none; }
.ha-cam-guide { position: absolute; left: 50%; top: 50%; width: 42%; height: 72%; transform: translate(-50%, -50%); border: 2px dashed rgba(255, 255, 255, .7); border-radius: 50%; pointer-events: none; }
.ha-cam-help { max-width: 560px; margin: 12px auto 16px; text-align: center; }
.ha-cam-wrap .ha-alert { max-width: 560px; margin: 0 auto 16px; }
.ha-cam-actions { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.ha-cam-actions .ha-btn { flex: 1 1 0; }
.ha-cam-actions .ha-btn-line { height: 64px; font-size: 19px; font-weight: 700; }   /* [다시 찍기] — 옆 단추와 같은 높이(4-6-3-1) */
.ha-cam-actions [hidden] { display: none; }

/* 휴대폰 카메라(5-7-5) — PC 사전 점검의 QR 상자 · 휴대폰 화면(세로 미리보기) */
.ha-phone { max-width: 560px; margin: 24px auto 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: center; }
.ha-phone[hidden], .ha-phone [hidden] { display: none; }
.ha-phone-lead { margin: 0 0 14px; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.ha-phone-lead b { color: var(--ink); }
.ha-phone-qr { margin-top: 18px; }
.ha-phone-qr img { display: block; width: 220px; height: 220px; margin: 0 auto 14px; image-rendering: pixelated; }
.ha-phone-steps { max-width: 420px; margin: 0 auto 12px; padding-left: 20px; text-align: left; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.ha-phone-state { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--text-3); }
.ha-phone-state.is-ok { color: var(--ok); }
.ha-phone-state.is-bad { color: var(--danger); }
.ha-phone-page .ha-phone-linked { max-width: 560px; margin: 0 auto 16px; }
.ha-phone-page .ha-phone-checks { max-width: 560px; margin: 20px auto 0; }
.ha-cam.ha-cam-phone { max-width: 280px; aspect-ratio: 3 / 4; }   /* 휴대폰은 세워 둔다 — 미리보기도 세로로, 단추가 한 화면에 들게 작게 */
.ha-cam.ha-cam-phone .ha-cam-guide { width: 62%; height: 58%; }
/* 휴대폰 대기 화면(5-7-5-2) · 대기실의 휴대폰 카메라 상자 */
.ha-phone-page .ha-phone-state { max-width: 560px; margin: 0 auto 12px; text-align: center; font-size: 15px; }
.ha-room-phone { max-width: none; margin: 0 0 24px; text-align: left; }
.ha-room-phone .ha-phone-qr { text-align: center; }
/* 감독 체험의 휴대폰 화면(5-26-2) — '이 휴대폰 점검'(접어 둔다, 줄은 확인 목록 부품) */
.ha-trial-checks { max-width: 560px; margin: 8px auto 0; font-size: 14px; }
.ha-trial-checks summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--ink); }
.ha-trial-checks .ha-check-list { margin-bottom: 0; }
.ha-trial-checks .ha-check-msg { overflow-wrap: anywhere; }   /* 카메라 이름처럼 띄어쓰기 없는 긴 값도 줄을 바꾼다 */

/* 검사 중 가림막 · 자기 화면(5-7-2) — 가림막은 문항 위(제출 중 가림막 .ha-loading보다는 아래), 자기 화면은 가림막 위 */
.ha-proctor-overlay { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--footer); }   /* 불투명 — 문항이 비쳐 보이지 않게 */
.ha-proctor-overlay[hidden] { display: none; }
.ha-proctor-card { width: 100%; max-width: 520px; padding: 32px 28px; border-radius: var(--radius); background: #fff; text-align: center; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
.ha-proctor-badge { display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-hover); font-size: 13px; font-weight: 700; }
.ha-proctor-card-title { margin: 0 0 12px; font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.ha-proctor-card-text { margin: 0 0 12px; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.ha-proctor-hint { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: #FDECEC; color: var(--danger); font-size: 14px; line-height: 1.6; }
.ha-proctor-hint[hidden], .ha-proctor-card .ha-btn[hidden] { display: none; }
.ha-proctor-time { margin: 0 0 20px; font-size: 14px; color: var(--text-3); }
.ha-proctor-time b { margin-left: 6px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ha-selfview { position: fixed; right: 16px; bottom: 16px; z-index: 9100; width: 168px; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #1D1D1D; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.ha-selfview[hidden] { display: none; }
.ha-selfview video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }   /* 거울처럼 — 찍는 사진은 그대로 */
.ha-selfview-label { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 3px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; font-weight: 600; }
.ha-selfview-label::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--danger); vertical-align: middle; }
/* 얼굴 검출(5-7-3) — 얼굴 없음 · 둘 이상 · 고개 돌림이면 자기 화면에만 알린다(문항은 가리지 않는다) */
.ha-selfview.is-warn { outline: 3px solid var(--brand); outline-offset: 0; }
.ha-selfview.is-warn .ha-selfview-label { right: 6px; background: var(--brand); white-space: normal; line-height: 1.35; }
.ha-selfview.is-warn .ha-selfview-label::before { background: #fff; }
/* 휴대폰 카메라 응시(5-7-5-2) — PC에는 영상 대신 상태 상자, 가림막에는 다시 연결할 QR */
.ha-selfview.is-phone { width: auto; min-width: 168px; max-width: 260px; aspect-ratio: auto; padding: 8px 10px; }
.ha-selfview.is-phone video { display: none; }
.ha-selfview.is-phone .ha-selfview-label { position: static; display: block; padding: 0; background: transparent; }
.ha-selfview.is-phone.is-warn .ha-selfview-label { background: transparent; }
.ha-proctor-qr { margin: 0 0 16px; }
.ha-proctor-qr[hidden] { display: none; }
.ha-proctor-qr img { display: block; width: 200px; height: 200px; margin: 0 auto 10px; image-rendering: pixelated; }
.ha-proctor-qr p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-3); }

/* ───── 문서 — 이용약관 · 개인정보처리방침(Pages/Info, 4-6-3-5). 제목은 어두운 띠(.ha-band), 본문 960px ───── */
/* 응시자는 바닥 링크(새 탭)로, 관리자 · 고객사는 관리 화면 바닥으로 연다. 표는 목록처럼 위 굵은 선 · 머리 줄 옅은 바탕 · 줄 사이 옅은 선 */
.ha-doc { max-width: 960px; margin: 0 auto; padding: 48px 20px 96px; color: var(--text-2); font-size: 15px; line-height: 1.8; }
.ha-doc-intro { margin: 0 0 44px; padding: 20px 24px; border-radius: var(--radius); background: var(--bg-soft); }
.ha-doc-section { margin: 0 0 44px; }
.ha-doc-section h2 {
    display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft);
    color: var(--ink); font-size: 19px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em;
}
.ha-doc-num {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 26px; height: 26px;
    border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.ha-doc p { margin: 0 0 10px; }
.ha-doc ul, .ha-doc ol { margin: 0 0 10px; padding-left: 22px; }
.ha-doc li { margin-bottom: 6px; }
.ha-doc li > ul { margin: 6px 0 0; }
.ha-doc li::marker { color: var(--text-4); }
.ha-doc strong { color: var(--text); font-weight: 600; }
.ha-doc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ha-doc a:hover { color: var(--brand-hover); }
.ha-doc small { color: var(--text-3); font-size: 13px; }
.ha-doc-gap { margin-top: 16px; }
.ha-doc-scroll { margin: 12px 0; overflow-x: auto; }
.ha-doc-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--line-strong); font-size: 14px; line-height: 1.6; }
.ha-doc-table th { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); font-weight: 600; text-align: left; white-space: nowrap; }
.ha-doc-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.ha-doc-table td:first-child { width: 130px; color: var(--text); font-weight: 500; }
.ha-doc-note { margin: 16px 0 0; padding: 16px 20px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: var(--text); font-size: 14px; line-height: 1.7; }
.ha-doc-contact { margin: 16px 0 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.ha-doc-contact-title { margin-bottom: 6px; color: var(--ink); font-size: 15px; font-weight: 700; }
.ha-doc-contact p { margin: 0 0 2px; }
.ha-doc-tag {   /* 대상 표시(B2B · B2C) */
    display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 3px; background: var(--fill);
    color: var(--text-2); font-size: 12px; font-weight: 700; line-height: 20px; vertical-align: 1px;
}
.ha-doc-tag.is-b2c { background: var(--brand-soft); color: var(--brand-ink); }

/* ───── 휴대폰 ───── */
@media (max-width: 767.98px) {
    :root { --header-h: 56px; }
    .ha-header-inner { padding: 0 16px; }
    .ha-brand img { height: 24px; max-width: 120px; }
    .ha-brand-name { font-size: 16px; }
    .ha-brand-sub { display: none; }
    .ha-header-right { gap: 12px; font-size: 14px; }
    .ha-narrow { padding: 44px 16px 64px; }
    .ha-title { font-size: 26px; margin-bottom: 28px; }
    .ha-container { padding: 0 16px; }
    .ha-band { padding: 44px 16px 40px; }
    .ha-band h1 { font-size: 26px; }
    .ha-doc { padding: 32px 16px 64px; font-size: 14px; }
    .ha-doc-intro { padding: 16px 18px; }
    .ha-doc-section h2 { font-size: 17px; }
    .ha-doc-table { font-size: 13px; }
    .ha-doc-table th, .ha-doc-table td { padding: 10px; }
    .ha-doc-table td:first-child { width: auto; }
    .ha-field { min-height: 56px; }
    .ha-field > label { width: 112px; padding: 0 10px 0 16px; font-size: 14px; }   /* 14px 약 81px — 한 줄로 */
    .ha-field.is-wide > label { width: 112px; }
    .ha-field > input, .ha-field > select { height: 54px; padding-left: 16px; font-size: 15px; }
    .ha-btn { height: 56px; font-size: 17px; }
    .ha-cam-actions .ha-btn-line { height: 56px; font-size: 17px; }
    .ha-room-done { margin-bottom: 44px; padding: 30px 18px 24px; }
    .ha-room-done-title { font-size: 22px; }
    .ha-item { flex-direction: column; align-items: stretch; gap: 16px; padding: 22px 0; }
    .ha-item-side .ha-btn { width: 100%; }
    .ha-item-side { justify-content: stretch; }
    .ha-item-side > * { flex: 1 1 auto; }
    .ha-room { padding-top: 32px; padding-bottom: 64px; }
    .ha-section-title { font-size: 19px; }
    .ha-caution { padding: 18px; font-size: 14px; }
    .ha-spi-wrap { padding: 24px 16px 56px; }
    .ha-spi .question-text { font-size: 19px; min-height: 0; margin-bottom: 20px; }
    .ha-spi .option { padding: 16px 44px 16px 18px; font-size: 15px; }
    .ha-proctor { flex-direction: column; align-items: stretch; padding: 18px; }
    .ha-precheck { padding: 36px 16px 64px; }
    .ha-steps li { font-size: 12px; }
}
