:root {
  color-scheme: light;
  --ink: #171714;
  --muted: #6d6d64;
  --line: #deded5;
  --paper: #f7f7f2;
  --white: #fff;
  --orange: #ff6738;
  --orange-dark: #e94e1f;
  --lime: #d9ff58;
  font-family: "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 80px; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 800 16px/1 Inter, sans-serif; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: var(--ink); border-radius: 10px; font-size: 13px; }
.exam-badge { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.exam-badge span { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 5px #ff67381a; }

.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 72px; align-items: end; padding: 72px 0 58px; }
.eyebrow, .section-label { margin: 0 0 13px; color: var(--orange-dark); font: 800 11px/1.2 Inter, sans-serif; letter-spacing: .16em; }
h1 { margin: 0; max-width: 720px; font-size: clamp(44px, 6.2vw, 78px); line-height: 1.06; letter-spacing: -.055em; }
h1 em { color: var(--orange); font-style: normal; }
.hero-copy { max-width: 600px; margin: 25px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.setup-card { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px #2929160b; }
.setup-card label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 800; }
.setup-row { display: grid; grid-template-columns: 100px 1fr; gap: 10px; }
select { width: 100%; padding: 0 14px; color: var(--ink); background: #f4f4ef; border: 1px solid var(--line); border-radius: 11px; font-weight: 700; }
.primary { min-height: 50px; padding: 0 24px; color: white; background: var(--ink); border: 0; border-radius: 11px; font-weight: 800; transition: transform .18s, background .18s; }
.primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.setup-card > p { margin: 13px 0 0; color: var(--muted); font-size: 12px; }

.exam-card, .result-card { scroll-margin-top: 24px; padding: 32px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 20px 70px #2929160d; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.progress-head strong { font: 700 20px/1 Inter, sans-serif; }
.progress-track { flex: 1; max-width: 480px; height: 7px; overflow: hidden; background: #ecece5; border-radius: 99px; }
.progress-track span { display: block; width: 6.67%; height: 100%; background: var(--orange); border-radius: inherit; transition: width .3s ease; }
.question-grid { display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; margin: 27px 0 32px; }
.question-grid button { aspect-ratio: 1; padding: 0; color: #99998f; background: #f4f4ef; border: 0; border-radius: 8px; font: 700 11px/1 Inter, sans-serif; }
.question-grid button.current { color: white; background: var(--orange); }
.question-grid button.done { color: var(--ink); background: var(--lime); }
.result-card .question-grid button { cursor: pointer; }

.stage { display: grid; grid-template-columns: 260px 1fr; overflow: hidden; min-height: 330px; border: 1px solid var(--line); border-radius: 18px; }
.examiner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; background: #efefe8; }
.portrait-wrap { position: relative; width: 150px; height: 180px; overflow: hidden; background: white; border-radius: 80px 80px 18px 18px; }
.portrait-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.status-dot { position: absolute; right: 14px; bottom: 15px; width: 14px; height: 14px; background: #5bc66b; border: 3px solid white; border-radius: 50%; }
.examiner p { margin: 17px 0 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.examiner strong { font: 800 18px/1 Inter, sans-serif; }
.audio-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 68px); }
.audio-panel h2 { margin: 0; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.035em; }
.wave { display: flex; align-items: center; gap: 5px; height: 48px; margin: 28px 0; }
.wave i { width: 4px; height: 8px; background: #cecec5; border-radius: 4px; }
.wave i:nth-child(3n) { height: 22px; }.wave i:nth-child(2n) { height: 14px; }
.wave.playing i { background: var(--orange); animation: pulse .8s ease-in-out infinite alternate; }
.wave.playing i:nth-child(2n) { animation-delay: -.3s; }.wave.playing i:nth-child(3n) { animation-delay: -.55s; }
@keyframes pulse { to { height: 36px; } }
.actions { display: flex; gap: 10px; }
.play, .next { min-height: 50px; padding: 0 20px; border-radius: 11px; font-weight: 800; }
.play { color: white; background: var(--orange); border: 0; }.play:hover { background: var(--orange-dark); }
.play span { margin-right: 8px; }
.next { color: var(--ink); background: white; border: 1px solid var(--line); }.next span { margin-left: 18px; }
.next:disabled { color: #aaa; background: #f3f3ee; }
.audio-help { margin: 14px 0 0; color: var(--muted); font-size: 12px; }

.result-card { max-width: 860px; margin: 0 auto; text-align: center; }
.result-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 25px; background: var(--lime); border-radius: 50%; font-size: 28px; font-weight: 800; }
.result-card h2 { margin: 0; font-size: 38px; letter-spacing: -.04em; }.result-card > p:not(.eyebrow) { color: var(--muted); }
.result-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 28px 0 10px; }
.result-meta div, .subjects div { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; background: #f4f4ef; border-radius: 12px; text-align: left; }
.result-meta span, .subjects span { color: var(--muted); font-size: 12px; }.result-meta strong { font: 800 18px/1 Inter, sans-serif; }
.subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.subjects strong { font-size: 13px; }
.result-actions { margin-top: 24px; }

@media (max-width: 800px) {
  .shell { width: min(100% - 24px, 680px); }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .stage { grid-template-columns: 1fr; }.examiner { display: none; }
  .question-grid { grid-template-columns: repeat(8, 1fr); }
  .progress-head { align-items: flex-start; flex-direction: column; gap: 18px; }.progress-track { width: 100%; max-width: none; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 16px, 480px); }.topbar { height: 68px; }.exam-badge { display: none; }
  .hero { padding: 38px 0; }.hero-copy { font-size: 14px; }.setup-card, .exam-card, .result-card { padding: 20px; border-radius: 17px; }
  .setup-row, .result-meta, .subjects { grid-template-columns: 1fr; }
  select { height: 50px; }.audio-panel { padding: 35px 24px; }.actions { flex-direction: column; }
  .question-grid { grid-template-columns: repeat(5, 1fr); }.result-card h2 { font-size: 30px; }
}
