/* ============================================================
   만세케어 — CBT 모의시험 페이지 전용 스타일
   ============================================================ */

/* 헤더 투명 처리 */
.header { background: transparent; border-bottom: none; backdrop-filter: none; }
.header.scrolled { background: rgba(255,250,235,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.header .btn-primary { background: #ED6F23; color: #fff; box-shadow: 0 6px 16px rgba(237,111,35,.3); }
.header .btn-primary:hover { background: #d85f17; }
.header .btn-ghost { border-color: rgba(58,44,0,.28); color: #3a2c00; }
.header .btn-ghost:hover { background: rgba(255,255,255,.4); }

/* HERO */
.cbt-hero { background: var(--primary); position: relative; overflow: hidden; margin-top: -74px; padding: calc(74px + clamp(40px,6vw,72px)) 0 clamp(100px,12vw,160px); }
.cbt-hero::before { content: ""; position: absolute; width: 46vw; height: 46vw; max-width: 580px; max-height: 580px; border-radius: 50%; background: rgba(255,255,255,.22); top: -18%; right: -8%; }
.cbt-hero::after { content: ""; position: absolute; width: 28vw; height: 28vw; max-width: 360px; max-height: 360px; border-radius: 50%; background: rgba(255,255,255,.16); bottom: -30%; left: -6%; }
.cbt-hero .wrap { position: relative; z-index: 1; text-align: center; }
.cbt-hero .crumb { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #3a2c00; opacity: .7; margin-bottom: 14px; }
.cbt-hero .crumb a { color: inherit; text-decoration: none; }
.cbt-hero h1 { font-size: clamp(36px,5.4vw,64px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: #3a2c00; margin: 6px 0 0; }
.cbt-hero p.sub { font-size: clamp(16px,1.8vw,20px); color: #3a2c00; font-weight: 600; margin: 16px auto 0; max-width: 600px; line-height: 1.6; }
.cbt-hero .stats { display: inline-flex; gap: 0; background: rgba(255,255,255,.55); border: 1px solid rgba(58,44,0,.14); border-radius: 16px; padding: 4px; margin-top: 28px; }
.cbt-hero .stats .st { padding: 14px 28px; text-align: center; border-right: 1px solid rgba(58,44,0,.12); }
.cbt-hero .stats .st:last-child { border-right: none; }
.cbt-hero .stats .v { font-size: 26px; font-weight: 900; color: #3a2c00; line-height: 1; }
.cbt-hero .stats .l { font-size: 13px; color: #5a4500; font-weight: 700; margin-top: 5px; }

/* 본문 */
.cbt-main { margin-top: -64px; padding-bottom: clamp(60px,8vw,100px); position: relative; z-index: 1; }

/* 학습 현황 패널 */
.cbt-summary { background: #fff; border: 1.5px solid var(--primary-soft); border-radius: 20px; padding: 28px 32px; box-shadow: var(--shadow-sm); margin-bottom: 32px; }
.cbt-summary h3 { font-size: 18px; font-weight: 800; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.cbt-summary h3 .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #3a2c00; display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.cbt-summary .s-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.cbt-summary .s-card { background: var(--bg); border-radius: 14px; padding: 18px; text-align: center; }
.cbt-summary .s-card .sv { font-size: 28px; font-weight: 900; color: var(--primary-deep); line-height: 1; }
.cbt-summary .s-card .sl { font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 6px; }

/* CBT 리스트 */
.cbt-list { display: flex; flex-direction: column; gap: 10px; }
.cbt-row { background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 20px 24px; display: grid; grid-template-columns: 80px 1fr 120px 160px; align-items: center; gap: 20px; position: relative; overflow: hidden; transition: box-shadow .2s, transform .15s, border-color .2s; }
.cbt-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 20px 0 0 20px; background: var(--line); transition: background .2s; }
.cbt-row.is-pass::before { background: #2ECC9A; }
.cbt-row.is-fail::before { background: #E57373; }
.cbt-row:hover { box-shadow: 0 8px 28px rgba(32,41,46,.10); transform: translateY(-2px); border-color: var(--primary); }
.cbt-row:hover::before { background: var(--primary-deep); }
.cbt-row.is-pass:hover::before { background: #2ECC9A; }
.cbt-row.is-fail:hover::before { background: #E57373; }

/* 회차 번호 */
.cbt-num { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: none; }
.cbt-num .n-label { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .06em; }
.cbt-num .n-val { font-size: 28px; font-weight: 900; line-height: 1; color: #D0C8B8; letter-spacing: -.04em; }
.is-pass .cbt-num .n-val { color: var(--primary); }
.is-fail .cbt-num .n-val { color: #E57373; }
.cbt-row:hover .cbt-num .n-val { color: var(--primary-deep); }

/* 중간 정보 */
.cbt-info .ci-title { font-size: 19px; font-weight: 800; color: var(--ink); margin: 0 0 8px; letter-spacing: -.02em; }
.cbt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cbt-chip-sm { font-size: 12.5px; font-weight: 700; color: #4a575e; background: var(--surface-2); padding: 4px 10px; border-radius: 7px; }

/* 점수 가로 바 */
.cbt-score-col { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 110px; }
.bar-score-head { display: flex; justify-content: space-between; align-items: baseline; }
.bar-score-head .bsv { font-size: 20px; font-weight: 900; color: var(--ink); line-height: 1; }
.bar-track { height: 8px; background: #EEEBE5; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .75s cubic-bezier(.4,0,.2,1); }
.bar-fill.good { background: linear-gradient(90deg,#2ECC9A,#1aad7f); }
.bar-fill.bad { background: linear-gradient(90deg,#E57373,#c0392b); }

/* 상태 뱃지 */
.sc-badge { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; display: inline-block; }
.sc-badge.pass { background: #E0F7EE; color: #1a7a52; }
.sc-badge.fail { background: #FDECEC; color: #c0392b; }
.sc-badge.before { background: #F2F2F2; color: #999; }

/* 액션 버튼 */
.cbt-acts { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cbt-btn { 
    height: 50px; padding: 0 18px; border-radius: 11px; border: none; font-family: inherit; font-weight: 800; font-size: 16px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: .15s; white-space: nowrap; }
.cbt-btn:active { transform: translateY(1px); }
.cbt-btn.go { background: var(--primary); color: #3a2c00; box-shadow: 0 4px 10px rgba(237,180,35,.32); }
.cbt-btn.go:hover { background: var(--primary-deep); color: #fff; }
.cbt-btn.retry { background: var(--primary); color: #3a2c00; box-shadow: 0 4px 10px rgba(237,180,35,.32); }
.cbt-btn.retry:hover { background: var(--primary-deep); color: #fff; }
.cbt-btn.detail { width: 44px; padding: 0; justify-content: center; background: #fff; border: 1.5px solid var(--line); color: var(--muted); font-size: 16px; }
.cbt-btn.detail:hover { border-color: var(--primary); color: var(--primary-deep); }

/* 로그인 유도 오버레이 */
.login-wall { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45); align-items: center; justify-content: center; }
.login-wall.show { display: flex; }
.login-confirm__box { background: #fff; border-radius: 16px; padding: 28px 24px 0; width: 280px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.18); overflow: hidden; }
.login-confirm__box p { font-size: 15px; color: #222; line-height: 1.65; margin: 0 0 20px; font-weight: 500; }
.login-confirm__btns { display: flex; gap: 0; margin: 0 -24px; }
.login-confirm__no  { flex: 1; height: 48px; background: #e8e8e8; color: #555; border: none; border-radius: 0; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.login-confirm__yes { flex: 1; height: 48px; background: #4caf50; color: #fff; border: none; border-radius: 0; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* 반응형 */
@media (max-width:900px) {
    .cbt-row { grid-template-columns: 60px 1fr auto; }
    .cbt-score-col { display: none; }
}
@media (max-width:560px) {
    .cbt-row { grid-template-columns: 1fr auto; padding: 16px 18px; }
    .cbt-num { display: none; }
    .cbt-hero .stats { flex-direction: column; width: 80%; max-width: 280px; }
    .cbt-hero .stats .st { border-right: none; border-bottom: 1px solid rgba(58,44,0,.12); }
    .cbt-hero .stats .st:last-child { border-bottom: none; }
    .cbt-summary .s-grid { grid-template-columns: repeat(2,1fr); }
}
