/* ===== CBT 모의고사 페이지 ===== */
.cbt-main {
  background: var(--bg);
  min-height: calc(100vh - 78px);
  padding: 40px 0 80px;
}

.cbt-hero {
  text-align: center;
  margin-bottom: 32px;
}
.cbt-hero .eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.cbt-h1 {
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}
.cbt-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.cbt-section-head { margin: 24px 0 16px; }
.cbt-section-head h2 { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.cbt-section-desc { color: var(--muted); font-size: 14px; }

.cbt-h3 {
  font-size: 17px; font-weight: 800; color: var(--text);
  margin: 32px 0 12px;
}

.cbt-view { display: none; }
.cbt-view.active { display: block; }

/* ===== 시험 카드 그리드 ===== */
.cbt-exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.cbt-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
}
.cbt-exam-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  position: relative;
  overflow: hidden;
}
.cbt-exam-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(11, 28, 56, 0.1);
}
.cbt-exam-card .accent {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--primary);
}
.cbt-exam-card .badge-new {
  position: absolute; top: 14px; right: 14px;
  background: #FF4D4D; color: #fff;
  padding: 3px 9px; border-radius: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
}
.cbt-exam-card .card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 6px;
}
.cbt-exam-card .exam-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, #0b4a9e) 14%, #fff);
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.cbt-exam-card .code {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.cbt-exam-card .title {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  margin: 4px 0 8px;
  line-height: 1.35;
}
.cbt-exam-card .summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
  min-height: 40px;
}
.cbt-exam-card .meta {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.cbt-disclaimer {
  background: #FFF7E0;
  border: 1px solid #F5DBA0;
  color: #8A5A00;
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
}

/* ===== 벤더 선택 카드 ===== */
.cbt-vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.cbt-vendor-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 22px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cbt-vendor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(11, 28, 56, 0.12);
  border-color: rgba(11, 74, 158, 0.25);
}
.cbt-vendor-card .accent {
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
}
.cbt-vendor-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
}
.cbt-vendor-full {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
  margin-bottom: 12px;
}
.cbt-vendor-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
  min-height: 40px;
}
.cbt-vendor-stats {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.cbt-vendor-stat {
  flex: 1;
  text-align: center;
}
.cbt-vendor-stat .v {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}
.cbt-vendor-stat .l {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-top: 2px;
  font-weight: 700;
}
.cbt-vendor-codes {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.cbt-vendor-cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

/* ===== 시험 상세 ===== */
.cbt-back-row { margin-bottom: 16px; }
.cbt-back {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}
.cbt-back:hover { text-decoration: underline; }

.cbt-detail-head {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.cbt-detail-head .code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.cbt-detail-head h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0 8px;
}
.cbt-detail-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.cbt-detail-stats {
  display: flex; gap: 12px;
  margin-top: 16px;
}
.cbt-detail-stat {
  flex: 1;
  background: #EEF3FF;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.cbt-detail-stat .v { font-weight: 800; font-size: 17px; color: var(--primary-dark); }
.cbt-detail-stat .l { font-size: 11px; color: var(--muted); margin-top: 2px; }

.cbt-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.cbt-mode-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  font-family: inherit;
}
.cbt-mode-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 74, 158, 0.08);
}
.cbt-mode-btn .cbt-mode-emoji { font-size: 26px; display: block; margin-bottom: 8px; }
.cbt-mode-btn strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.cbt-mode-btn .cbt-mode-desc { color: var(--muted); font-size: 12px; }

/* ===== 학습/모의고사 모드 강조 섹션 ===== */
.cbt-feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 32px 0 24px;
}
.cbt-feature-card {
  position: relative;
  border-radius: 16px;
  padding: 24px;
  margin: 0;
}
.cbt-learn-feature {
  background: linear-gradient(135deg, #EEF4FF 0%, #F5F0FF 100%);
  border: 2px solid #1F3A5F;
  box-shadow: 0 6px 24px rgba(31, 58, 95, 0.12);
}
.cbt-learn-feature::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px;
  height: 4px;
  background: linear-gradient(90deg, #1F3A5F, #4A2C6E, #1F3A5F);
  border-radius: 16px 16px 0 0;
}
.cbt-exam-feature {
  background: linear-gradient(135deg, #FFF4EC 0%, #FFEEE6 100%);
  border: 2px solid #C2410C;
  box-shadow: 0 6px 24px rgba(194, 65, 12, 0.14);
}
.cbt-exam-feature::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px;
  height: 4px;
  background: linear-gradient(90deg, #C2410C, #DC2626, #C2410C);
  border-radius: 16px 16px 0 0;
}
.cbt-exam-feature-badge {
  display: inline-block;
  background: linear-gradient(135deg, #C2410C, #DC2626);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.cbt-exam-feature-title { margin: 0 0 6px !important; color: #C2410C !important; font-size: 20px !important; }
.cbt-exam-feature-desc { font-size: 13px; color: #7C2D12; margin: 0; font-weight: 500; }
.cbt-mode-btn-exam {
  background: #fff;
  border: 2px solid #C2410C;
  border-radius: 12px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.cbt-mode-btn-exam:hover {
  background: linear-gradient(135deg, #C2410C, #DC2626);
  border-color: #DC2626;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(194, 65, 12, 0.28);
}
.cbt-mode-btn-exam:hover .cbt-mode-emoji,
.cbt-mode-btn-exam:hover strong,
.cbt-mode-btn-exam:hover .cbt-mode-desc,
.cbt-mode-btn-exam:hover .cbt-mode-cta-exam { color: #fff; }
.cbt-mode-btn-exam .cbt-mode-emoji { font-size: 32px; margin-bottom: 10px; }
.cbt-mode-btn-exam strong { font-size: 16px; color: #C2410C; margin-bottom: 6px; }
.cbt-mode-btn-exam .cbt-mode-desc { font-size: 13px; color: #555; }
.cbt-mode-cta-exam { color: #C2410C !important; }
.cbt-learn-feature-head { margin-bottom: 16px; }
.cbt-learn-feature-badge {
  display: inline-block;
  background: linear-gradient(135deg, #1F3A5F, #4A2C6E);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.cbt-learn-feature-title {
  margin: 0 0 6px !important;
  color: #1F3A5F !important;
  font-size: 20px !important;
}
.cbt-learn-feature-desc {
  font-size: 13px;
  color: #4A2C6E;
  margin: 0;
  font-weight: 500;
}
.cbt-mode-btn-featured {
  background: #fff;
  border: 2px solid #1F3A5F;
  border-radius: 12px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.cbt-mode-btn-featured:hover {
  background: linear-gradient(135deg, #1F3A5F, #4A2C6E);
  border-color: #4A2C6E;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31, 58, 95, 0.25);
}
.cbt-mode-btn-featured:hover .cbt-mode-emoji,
.cbt-mode-btn-featured:hover strong,
.cbt-mode-btn-featured:hover .cbt-mode-desc,
.cbt-mode-btn-featured:hover .cbt-mode-cta { color: #fff; }
.cbt-mode-btn-featured .cbt-mode-emoji { font-size: 32px; margin-bottom: 10px; }
.cbt-mode-btn-featured strong { font-size: 16px; color: #1F3A5F; margin-bottom: 6px; }
.cbt-mode-btn-featured .cbt-mode-desc { font-size: 13px; color: #555; }
.cbt-mode-btn-featured .cbt-mode-cta {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #1F3A5F;
}

.cbt-domain-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.cbt-domain-row {
  display: flex; align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .15s;
}
.cbt-domain-row:hover { border-color: var(--primary); }
.cbt-domain-row .name { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); }
.cbt-domain-row .count { color: var(--primary); font-size: 12px; font-weight: 800; }

/* ===== 문제 풀이 ===== */
.cbt-run-topbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.cbt-progress-wrap { flex: 1; }
.cbt-progress-label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  margin-bottom: 6px;
}
.cbt-progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.cbt-progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width .25s;
}
.cbt-bookmark {
  background: #fff;
  border: 1px solid var(--line);
  width: 40px; height: 40px;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
}
.cbt-bookmark.active { background: #FFE49A; }

.cbt-lang-tabs {
  display: flex; gap: 8px;
  margin-bottom: 12px;
}
.cbt-lang-tab {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px; font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.cbt-lang-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.cbt-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.cbt-card-head {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted);
  margin-bottom: 12px;
}
.cbt-card-head .domain {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.5px;
}
.cbt-card-fallback {
  background: #FFF7E0;
  color: #8A5A00;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.cbt-card-q {
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 18px;
}
.cbt-options { display: flex; flex-direction: column; gap: 10px; }
.cbt-option {
  display: flex; align-items: flex-start; gap: 12px;
  background: #F5F7FB;
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .15s;
}
.cbt-option:hover { background: #EAEEF8; }
.cbt-option.selected {
  background: #E6EFFF;
  border-color: var(--primary);
}
.cbt-option.correct {
  background: #E5F8EE;
  border-color: #1FAB57;
}
.cbt-option.wrong {
  background: #FBE6E7;
  border-color: #E5484D;
}
.cbt-option.disabled { cursor: default; opacity: 0.95; }
.cbt-option .letter {
  width: 26px; height: 26px;
  background: var(--primary);
  color: #fff;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
  flex-shrink: 0;
}
.cbt-option .text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.cbt-explain {
  background: #FFF7E0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
}
.cbt-explain h5 {
  color: #8A5A00;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}
.cbt-explain p {
  color: #5C3F00;
  font-size: 13px;
  line-height: 1.7;
}

.cbt-run-bottombar {
  display: flex; gap: 8px;
  margin-top: 8px;
}
.cbt-nav-btn {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  border: none;
}
.cbt-nav-prev {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}
.cbt-nav-prev:disabled { opacity: 0.4; cursor: not-allowed; }
.cbt-nav-next {
  background: var(--primary);
  color: #fff;
}
.cbt-nav-submit {
  background: #1FAB57;
  color: #fff;
}
.cbt-nav-confirm {
  background: #FF7A45;
  color: #fff;
}
.cbt-nav-confirm:hover { background: #e8632f; }

.cbt-ad-row {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0;
  text-align: center;
  min-height: 100px;
}

/* ===== 결과 ===== */
.cbt-result-card {
  background: #fff;
  border-radius: 18px;
  padding: 40px 28px;
  text-align: center;
  border: 1px solid var(--line);
}
.cbt-result-icon { font-size: 56px; margin-bottom: 12px; }
.cbt-result-title { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.cbt-result-score {
  font-size: 56px;
  font-weight: 900;
  color: var(--primary);
  margin: 8px 0;
}
.cbt-result-detail { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.cbt-result-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

.cbt-review-list {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.cbt-review-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.cbt-review-item.wrong { border-left: 4px solid #E5484D; }
.cbt-review-item.correct { border-left: 4px solid #1FAB57; }

/* ===== 인터스티셜 ===== */
.cbt-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.cbt-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(11, 28, 56, 0.78);
}
.cbt-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 480px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,0.3);
}
.cbt-modal-head {
  display: flex; justify-content: space-between;
  padding: 14px 20px;
  background: #F1F4FA;
  border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 1px;
}
.cbt-ad-tag { letter-spacing: 1.5px; }
.cbt-ad-timer { letter-spacing: 0.5px; user-select: none; }
.cbt-ad-timer.ready {
  cursor: pointer;
  background: #1F3A5F;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.cbt-ad-timer.ready:hover { background: #4A2C6E; }
.cbt-modal-body { padding: 20px; }
.cbt-modal-foot {
  padding: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.cbt-modal-foot button:disabled { opacity: 0.5; cursor: not-allowed; }
.cbt-sponsor-card {
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 14px;
  text-align: center;
}
.cbt-sponsor-eyebrow {
  color: #FFE49A; font-size: 10px; font-weight: 800;
  letter-spacing: 2px; margin-bottom: 6px;
}
.cbt-sponsor-card h4 { font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.cbt-sponsor-card p { font-size: 12px; color: #D5E2FF; margin-bottom: 12px; line-height: 1.5; }
.cbt-sponsor-card .btn { background: #fff; color: var(--primary); padding: 10px 20px; border-radius: 8px; font-weight: 800; font-size: 13px; display: inline-block; }

@media (max-width: 720px) {
  .cbt-h1 { font-size: 26px; }
  .cbt-mode-grid { grid-template-columns: 1fr; }
  .cbt-detail-stats { flex-direction: column; }
}
