/* 패스뱅크 CBT 모의고사 — 실제 CBT 시험 화면 흐름을 따른 전용 스타일 (2026-11-05) */
:root {
  --c-navy: #16365f; --c-navy2: #0f2a4b; --c-blue: #1a56db; --c-bg: #eef2f7; --c-line: #cbd5e1;
  --c-text: #0f172a; --c-mut: #64748b; --c-ok: #059669; --c-bad: #dc2626; --c-warn: #d97706; --c-card: #fff;
  --fs: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.cbt-body {
  font-family: 'Noto Sans KR', system-ui, sans-serif; color: var(--c-text); background: var(--c-bg);
  -webkit-text-size-adjust: 100%; line-height: 1.6;
}
body[data-size="0"] { --fs: 14px; } body[data-size="1"] { --fs: 16px; }
body[data-size="2"] { --fs: 19px; } body[data-size="3"] { --fs: 22px; }
.cbt-hide { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* 공통 화면 */
.cbt-screen { min-height: 100vh; }
.cbt-topbar { background: var(--c-navy); color: #fff; padding: 12px 20px; display: flex; gap: 14px; align-items: baseline; }
.cbt-brand { font-weight: 800; letter-spacing: .02em; }
.cbt-sub { opacity: .8; font-size: 14px; }
.cbt-card { max-width: 760px; margin: 28px auto; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 28px 28px 24px; }
.cbt-card h1 { font-size: 22px; margin: 0 0 6px; }
.cbt-lead { color: var(--c-mut); font-size: 14px; margin: 0 0 18px; }
.cbt-table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 15px; }
.cbt-table th, .cbt-table td { border: 1px solid var(--c-line); padding: 10px 12px; text-align: left; }
.cbt-table th { background: #f1f5f9; width: 30%; font-weight: 600; color: #334155; }
.cbt-check { display: flex; gap: 8px; align-items: center; font-size: 15px; margin: 8px 0 4px; cursor: pointer; }
.cbt-check input { width: 18px; height: 18px; }
.cbt-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 20px; }
.cbt-actions.center { justify-content: center; flex-wrap: wrap; }
.cbt-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; padding: 11px 22px; font-size: 15px; font-weight: 700; text-decoration: none; min-height: 44px; }
.cbt-btn.primary { background: var(--c-blue); color: #fff; }
.cbt-btn.primary:disabled { background: #94a3b8; cursor: not-allowed; }
.cbt-btn.ghost { background: #fff; color: #334155; border-color: var(--c-line); }
.cbt-btn.danger { background: var(--c-bad); color: #fff; }
.cbt-btn.submit { background: #f59e0b; color: #1f2937; padding: 9px 16px; min-height: 40px; }
.cbt-err { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: 14px; }
.cbt-guide { padding-left: 20px; font-size: 15px; } .cbt-guide li { margin: 7px 0; }
.cbt-tools-demo { background: #f8fafc; border: 1px dashed var(--c-line); border-radius: 8px; padding: 12px 14px; font-size: 14px; display: grid; gap: 6px; margin-top: 14px; }
.cbt-chip { display: inline-block; padding: 0 8px; border: 1px solid var(--c-line); border-radius: 5px; background: #fff; font-weight: 700; }

/* 문제풀이 화면 */
.cbt-exam { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--c-bg); }
.cbt-head { background: var(--c-navy); color: #fff; display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 8px 16px; flex-wrap: wrap; }
.cbt-title { font-weight: 800; font-size: 16px; } .cbt-who { font-size: 12px; opacity: .8; }
.cbt-head-m { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cbt-ctl { display: flex; align-items: center; gap: 4px; }
.cbt-ctl-lb { font-size: 12px; opacity: .8; margin-right: 2px; }
.cbt-ctl button { background: #274b7a; color: #fff; border: 1px solid #3b6196; border-radius: 6px; min-width: 36px; height: 34px; font-weight: 700; padding: 0 8px; }
.cbt-ctl button.on { background: #fff; color: var(--c-navy); }
.cbt-ctl .s0 { font-size: 11px; } .cbt-ctl .s1 { font-size: 14px; } .cbt-ctl .s2 { font-size: 17px; } .cbt-ctl .s3 { font-size: 20px; }
.cbt-tool { background: #fff; color: #1e293b; border: 1px solid var(--c-line); border-radius: 6px; height: 34px; padding: 0 12px; font-weight: 600; font-size: 13px; }
.cbt-head .cbt-tool { background: #274b7a; color: #fff; border-color: #3b6196; }
.cbt-head-r { display: flex; align-items: center; gap: 14px; }
.cbt-timer-wrap { text-align: right; line-height: 1.1; }
.cbt-timer-lb { font-size: 11px; opacity: .8; }
.cbt-timer { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cbt-timer.warn { color: #fca5a5; animation: cbtBlink 1s steps(2) infinite; }
@keyframes cbtBlink { 50% { opacity: .55; } }
.cbt-bar { display: flex; justify-content: space-between; align-items: center; background: #dbe5f1; padding: 6px 16px; font-size: 13px; border-bottom: 1px solid var(--c-line); }
.cbt-bar-r { display: flex; gap: 8px; }
#sheetToggle { display: none; }
.cbt-main { flex: 1; min-height: 0; display: flex; }
.cbt-q { flex: 1; min-width: 0; overflow-y: auto; padding: 16px; font-size: var(--fs); }
.cbt-cols { display: grid; grid-template-columns: 1fr; gap: 14px; }
body[data-cols="2"] .cbt-cols { grid-template-columns: 1fr 1fr; }
.cbt-qcard { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 18px 20px; }
.cbt-qcard.cur { border-color: var(--c-blue); box-shadow: 0 0 0 2px rgba(26,86,219,.12); }
.cbt-qh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cbt-qn { font-weight: 800; font-size: 1.15em; color: var(--c-navy); }
.cbt-qs { font-size: .72em; background: #e2e8f0; color: #334155; border-radius: 999px; padding: 1px 10px; }
.cbt-qm { margin-left: auto; font-size: .85em; background: none; border: none; color: #94a3b8; }
.cbt-qm.on { color: #f59e0b; }
.cbt-qt { white-space: normal; word-break: break-word; }
.cbt-qt img { display: block; max-width: 100%; border: 1px solid #e2e8f0; border-radius: 6px; margin: 6px 0; }
.cbt-qt pre.code-block { background: #0f172a; color: #e2e8f0; padding: 10px 12px; border-radius: 8px; overflow-x: auto; font-size: .85em; white-space: pre-wrap; }
.cbt-opts { margin-top: 12px; display: grid; gap: 8px; }
.cbt-opt { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--c-line); border-radius: 9px; padding: 10px 12px; font-size: inherit; color: inherit; min-height: 44px; }
.cbt-opt:hover { border-color: #93b4f0; }
.cbt-opt.sel { border-color: var(--c-blue); background: #eff6ff; }
.cbt-opt .no { min-width: 1.6em; height: 1.6em; border-radius: 50%; border: 1.5px solid #94a3b8; display: inline-flex; align-items: center; justify-content: center; font-size: .85em; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.cbt-opt.sel .no { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.cbt-opt .tx { flex: 1; min-width: 0; word-break: break-word; }
.cbt-opt .tx img { max-width: 100%; }
.cbt-short { width: 100%; padding: 12px 14px; font-size: inherit; border: 1.5px solid var(--c-line); border-radius: 9px; }
.q-tbl-wrap { overflow-x: auto; margin: 8px 0; } .q-tbl { border-collapse: collapse; font-size: .9em; } .q-tbl th, .q-tbl td { border: 1px solid var(--c-line); padding: 5px 9px; } .q-tbl th { background: #f1f5f9; }

/* 답안 표기란 */
.cbt-sheet { width: 250px; flex-shrink: 0; background: #fff; border-left: 1px solid var(--c-line); display: flex; flex-direction: column; min-height: 0; }
.cbt-sheet-h { background: #e8eef7; padding: 9px 12px; font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--c-line); }
.cbt-x { display: none; background: none; border: none; font-size: 18px; color: #475569; }
.cbt-sheet-b { flex: 1; overflow-y: auto; padding: 6px 10px 10px; position: relative; }
.cbt-sg { font-size: 12px; font-weight: 700; color: #475569; background: #f1f5f9; border-radius: 5px; padding: 3px 8px; margin: 10px 0 4px; }
.cbt-sr { display: flex; align-items: center; gap: 4px; padding: 2px 3px; border-radius: 6px; cursor: pointer; }
.cbt-sr.cur { background: #dbeafe; }
.cbt-sr .n { width: 28px; text-align: right; font-size: 12px; font-weight: 700; color: #334155; }
.cbt-sr.un .n { color: #b91c1c; }
.cbt-sr .mk { width: 10px; font-size: 11px; color: #f59e0b; }
.cbt-b { width: 26px; height: 26px; border-radius: 50%; border: 1.3px solid #94a3b8; background: #fff; font-size: 11px; font-weight: 700; color: #475569; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.cbt-b.on { background: #111827; border-color: #111827; color: #fff; }
.cbt-sr.un .cbt-b { opacity: .75; }
.cbt-sshort { font-size: 12px; color: #334155; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbt-legend { padding: 7px 12px; border-top: 1px solid var(--c-line); font-size: 11px; color: var(--c-mut); }
.cbt-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: middle; border: 1px solid #94a3b8; }
.cbt-legend .lg.done { background: #111827; } .cbt-legend .lg.cur { background: #dbeafe; border-color: #3b82f6; } .cbt-legend .lg.mark { background: #f59e0b; border-color: #f59e0b; }

.cbt-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 16px; background: #fff; border-top: 1px solid var(--c-line); }

/* 모달 */
.cbt-modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.cbt-modal-box { background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 440px; max-height: 88vh; overflow: auto; }
.cbt-modal-box h2 { margin: 0 0 14px; font-size: 20px; }
.cbt-cf-rows { border: 1px solid var(--c-line); border-radius: 8px; overflow: hidden; }
.cbt-cf-rows div { display: flex; justify-content: space-between; padding: 9px 12px; font-size: 15px; border-bottom: 1px solid #e2e8f0; }
.cbt-cf-rows div:last-child { border-bottom: none; } .cbt-cf-rows b.warn { color: var(--c-bad); }
.cbt-cf-note { font-size: 13px; color: var(--c-mut); margin: 12px 0 0; }
.cbt-un-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cbt-un-list button { min-width: 44px; height: 40px; border: 1px solid var(--c-line); background: #fff; border-radius: 8px; font-weight: 700; }

/* 계산기 */
.cbt-calc { position: fixed; right: 20px; bottom: 80px; width: 272px; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; box-shadow: 0 14px 40px rgba(15,23,42,.28); z-index: 40; padding: 10px; }
.cbt-calc-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.cbt-calc .cbt-x { display: inline-block; }
.cbt-calc-in { width: 100%; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 8px; font-size: 15px; }
.cbt-calc-out { text-align: right; font-size: 22px; font-weight: 700; padding: 6px 4px; min-height: 40px; word-break: break-all; }
.cbt-calc-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cbt-calc-keys button { height: 36px; border: 1px solid var(--c-line); background: #f8fafc; border-radius: 7px; font-size: 14px; font-weight: 600; }
.cbt-calc-keys button.op { background: #e0e7ff; } .cbt-calc-keys button.eq { background: var(--c-blue); color: #fff; }
.cbt-calc-note { font-size: 10.5px; color: var(--c-mut); margin-top: 6px; }

/* 결과 */
.cbt-result { max-width: 860px; margin: 24px auto 60px; padding: 0 16px; }
.cbt-rs-top { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 26px 20px; text-align: center; }
.cbt-rs-badge { display: inline-block; font-size: 20px; font-weight: 800; padding: 6px 22px; border-radius: 999px; }
.cbt-rs-badge.pass { background: #dcfce7; color: #166534; } .cbt-rs-badge.fail { background: #fee2e2; color: #991b1b; } .cbt-rs-badge.info { background: #e0e7ff; color: #3730a3; }
.cbt-rs-score { margin: 10px 0 2px; } .cbt-rs-score b { font-size: 56px; line-height: 1; } .cbt-rs-score span { font-size: 20px; margin-left: 4px; }
.cbt-rs-sub { color: var(--c-mut); font-size: 14px; }
.cbt-table.rs { background: #fff; margin-top: 14px; }
.cbt-table.rs th { width: auto; text-align: center; } .cbt-table.rs td { text-align: center; }
.cbt-table.rs td:first-child { text-align: left; }
.cbt-table.rs .ok { color: var(--c-ok); font-weight: 700; } .cbt-table.rs .ng { color: var(--c-bad); font-weight: 700; }
.cbt-rs-note { font-size: 13px; color: var(--c-mut); margin: 4px 2px 6px; }
.cbt-rv-h { font-size: 20px; margin: 32px 0 10px; }
.cbt-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.cbt-tabs button { border: 1px solid var(--c-line); background: #fff; border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: 14px; }
.cbt-tabs button.on { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
.cbt-review { display: grid; gap: 12px; font-size: 16px; }
.cbt-rv { background: #fff; border: 1px solid var(--c-line); border-left: 5px solid var(--c-bad); border-radius: 10px; padding: 16px 18px; }
.cbt-rv.ok { border-left-color: var(--c-ok); } .cbt-rv.blank { border-left-color: var(--c-warn); }
.cbt-rv-t { font-weight: 800; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cbt-rv-t em { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: #fee2e2; color: #991b1b; }
.cbt-rv.ok .cbt-rv-t em { background: #dcfce7; color: #166534; } .cbt-rv.blank .cbt-rv-t em { background: #fef3c7; color: #92400e; }
.cbt-rv .cbt-opt { cursor: default; min-height: 0; }
.cbt-rv .cbt-opt.right { border-color: var(--c-ok); background: #f0fdf4; } .cbt-rv .cbt-opt.right .no { background: var(--c-ok); border-color: var(--c-ok); color: #fff; }
.cbt-rv .cbt-opt.mine { border-color: var(--c-bad); background: #fef2f2; } .cbt-rv .cbt-opt.mine .no { background: var(--c-bad); border-color: var(--c-bad); color: #fff; }
.cbt-ans-line { margin-top: 10px; font-size: .92em; }
.cbt-exp { margin-top: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 11px 13px; font-size: .94em; }
.cbt-exp strong { color: var(--c-navy); }
.cbt-empty { text-align: center; color: var(--c-mut); padding: 30px 0; }

/* 좁은 화면 */
@media (max-width: 860px) {
  .cbt-card { margin: 14px 12px; padding: 20px 16px; }
  .cbt-head { padding: 8px 10px; gap: 8px; }
  .cbt-head-m { order: 3; width: 100%; gap: 8px; }
  .cbt-ctl-lb, .cbt-who { display: none; }
  .cbt-ctl button { min-width: 32px; height: 32px; }
  .cbt-timer { font-size: 22px; }
  #sheetToggle { display: inline-block; }
  .cbt-sheet { position: fixed; right: 0; top: 0; bottom: 0; width: min(86vw, 300px); z-index: 30; transform: translateX(100%); transition: transform .2s; box-shadow: -8px 0 28px rgba(15,23,42,.25); }
  .cbt-sheet.open { transform: none; }
  .cbt-sheet .cbt-x { display: inline-block; }
  body[data-cols="2"] .cbt-cols { grid-template-columns: 1fr; }
  .cbt-q { padding: 10px; } .cbt-qcard { padding: 14px 12px; }
}
@media print { .cbt-head, .cbt-foot, .cbt-sheet { display: none; } }
