
:root {
  --navy: #071b2b;
  --teal: #0f8b8d;
  --teal-dark: #086f73;
  --mint: #d9f3ef;
  --gold: #e2af45;
  --ink: #102331;
  --muted: #62737d;
  --line: #d9e2e6;
  --paper: #f4f7f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif; }
button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.site-shell {
  position: relative; min-height: 100vh; overflow: hidden; padding: 0 28px 34px;
  background: linear-gradient(rgba(7,27,43,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(7,27,43,.035) 1px, transparent 1px), var(--paper);
  background-size: 38px 38px;
}
.ambient { position: absolute; border-radius: 999px; filter: blur(2px); pointer-events: none; }
.ambient-one { width: 460px; height: 460px; top: 90px; right: -220px; background: rgba(15,139,141,.10); }
.ambient-two { width: 330px; height: 330px; top: 570px; left: -190px; background: rgba(226,175,69,.09); }

.topbar { position: relative; z-index: 2; max-width: 1100px; height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(16,35,49,.12); }
.brand { display: flex; gap: 11px; align-items: center; color: var(--navy); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; color: white; background: var(--navy); border-radius: 7px 7px 12px 7px; font-family: Georgia, serif; }
.safety-chip { display: inline-flex; align-items: center; gap: 8px; color: #395361; font-size: 13px; font-weight: 700; }
.safety-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(15,139,141,.12); }

.hero { position: relative; z-index: 1; max-width: 900px; margin: 76px auto 42px; text-align: center; }
.eyebrow { margin: 0 0 18px; color: var(--teal-dark); font-size: 12px; font-weight: 900; letter-spacing: .19em; }
.hero h1 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 7vw, 70px); font-weight: 500; line-height: 1.08; letter-spacing: -.045em; }
.hero h1 em { color: var(--teal-dark); font-style: normal; }
.hero-copy { max-width: 640px; margin: 22px auto 0; color: var(--muted); font-size: 17px; line-height: 1.75; word-break: keep-all; }
.topic-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 27px; }
.topic-row span { padding: 7px 11px; color: #41606e; background: rgba(255,255,255,.72); border: 1px solid rgba(16,35,49,.10); border-radius: 6px; font-size: 12px; font-weight: 700; }

.quiz-card, .result-card { position: relative; z-index: 2; max-width: 820px; margin: 0 auto 70px; padding: 34px 40px 30px; background: rgba(255,255,255,.96); border: 1px solid rgba(7,27,43,.11); border-radius: 12px; box-shadow: 0 24px 70px rgba(7,27,43,.10), 0 2px 8px rgba(7,27,43,.05); }
.progress-head { display: flex; justify-content: space-between; align-items: center; }
.mission-tag, .retry-tag { display: inline-block; padding: 6px 10px; border-radius: 5px; font-size: 12px; font-weight: 800; }
.mission-tag { color: white; background: var(--navy); }
.retry-tag { margin-left: 7px; color: var(--teal-dark); background: var(--mint); }
.progress-head > strong { color: var(--navy); font-size: 15px; }
.progress-head > strong span { color: #94a1a8; font-weight: 600; }
.progress-track { height: 4px; margin: 17px 0 36px; overflow: hidden; background: #e8edef; border-radius: 99px; }
.progress-track div { height: 100%; background: linear-gradient(90deg, var(--teal), #56b8ad); border-radius: inherit; transition: width .35s ease; }

.question-number { margin: 0 0 10px; color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.question-block h2 { max-width: 680px; min-height: 70px; margin: 0 0 28px; color: var(--navy); font-size: clamp(22px, 4vw, 30px); line-height: 1.4; letter-spacing: -.035em; word-break: keep-all; }
.options { display: grid; gap: 10px; }
.option { width: 100%; min-height: 58px; padding: 11px 16px; display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 12px; color: #2a414e; text-align: left; background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.option:hover:not(:disabled), .option:focus-visible { transform: translateY(-1px); border-color: var(--teal); box-shadow: 0 7px 20px rgba(15,139,141,.09); outline: none; }
.option:disabled { cursor: default; }
.option-letter { display: grid; place-items: center; width: 32px; height: 32px; color: #647681; background: #f1f4f5; border-radius: 6px; font-size: 12px; font-weight: 900; }
.option b { justify-self: end; font-size: 20px; }
.option.correct { color: #075c54; background: #eefaf7; border-color: #5eb9aa; }
.option.correct .option-letter { color: white; background: var(--teal); }
.option.correct b { color: var(--teal-dark); }
.option.wrong { color: #8c3a3a; background: #fff5f3; border-color: #dc9189; }
.option.wrong .option-letter { color: white; background: #c9635c; }
.option.wrong b { color: #bb4d47; }
.option.muted { opacity: .48; }

.feedback { min-height: 112px; margin-top: 22px; padding: 17px 18px; display: grid; grid-template-columns: 36px 1fr; gap: 14px; background: #f2f7f7; border-left: 3px solid var(--teal); border-radius: 4px 8px 8px 4px; transition: opacity .2s ease; }
.feedback.hidden { visibility: hidden; opacity: 0; }
.feedback-icon { display: grid; place-items: center; width: 32px; height: 32px; color: white; border-radius: 50%; font-weight: 900; }
.feedback-icon.good { background: var(--teal); }
.feedback-icon.bad { background: #c9635c; }
.feedback strong { display: block; margin: 1px 0 5px; color: var(--navy); font-size: 14px; }
.feedback p { margin: 0 0 8px; color: #526873; font-size: 14px; line-height: 1.55; word-break: keep-all; }
.feedback code { color: var(--teal-dark); font-family: inherit; font-size: 12px; font-weight: 800; }

.card-footer { margin-top: 26px; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #e5eaec; }
.card-footer > span { color: #8a989f; font-size: 12px; }
.next-button, .primary-action, .secondary-action { border: 0; border-radius: 7px; font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.next-button { padding: 12px 18px; color: white; background: var(--navy); }
.next-button span { margin-left: 7px; }
.next-button:hover:not(:disabled), .primary-action:hover, .secondary-action:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(7,27,43,.17); }
.next-button:disabled { opacity: .27; cursor: default; }

.result-card { padding-top: 44px; text-align: center; }
.result-kicker { color: var(--teal-dark); font-size: 11px; font-weight: 900; letter-spacing: .17em; }
.score-ring { --score: 0%; position: relative; width: 148px; height: 148px; margin: 25px auto; display: grid; place-items: center; background: conic-gradient(var(--teal) var(--score), #e6ecee 0); border-radius: 50%; }
.score-ring::before { content: ""; position: absolute; width: 120px; height: 120px; background: white; border-radius: 50%; }
.score-ring div { position: relative; display: flex; align-items: baseline; color: var(--navy); }
.score-ring strong { font-family: Georgia, serif; font-size: 56px; font-weight: 500; }
.score-ring span { color: #84949b; font-size: 16px; font-weight: 700; }
.result-card h2 { margin: 0; color: var(--navy); font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.result-card > p { color: var(--muted); }
.result-summary { max-width: 610px; margin: 31px auto 28px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.result-summary div { padding: 17px 10px; background: #f8fafb; }
.result-summary div + div { border-left: 1px solid var(--line); }
.result-summary span, .result-summary strong { display: block; }
.result-summary span { margin-bottom: 6px; color: #86959c; font-size: 11px; }
.result-summary strong { color: var(--navy); font-size: 14px; }
.result-actions { display: flex; justify-content: center; gap: 10px; }
.primary-action { padding: 13px 19px; color: white; background: var(--navy); }
.secondary-action { padding: 13px 19px; color: var(--navy); background: white; border: 1px solid #c9d4d9; }
.result-note { margin: 26px 0 0; font-size: 12px; }
.instructor-card { position: relative; z-index: 1; max-width: 820px; margin: -30px auto 70px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: white; background: var(--navy); border-radius: 10px; box-shadow: 0 18px 45px rgba(7,27,43,.14); }
.instructor-name { display: grid; gap: 5px; }
.instructor-name span { color: #70c8bf; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.instructor-name strong { white-space: nowrap; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.instructor-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.instructor-links a { padding: 9px 11px; color: #dce8ec; text-decoration: none; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; font-size: 12px; font-weight: 800; transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease; }
.instructor-links a:hover, .instructor-links a:focus-visible { color: white; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.38); transform: translateY(-1px); outline: none; }
.instructor-links a span { margin-left: 5px; color: #70c8bf; }
.instructor-links .book-link { color: #ffe0a0; border-color: rgba(226,175,69,.55); }
.instructor-links .book-link span { color: var(--gold); }
footer { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding-top: 22px; display: flex; justify-content: space-between; color: #84939a; border-top: 1px solid rgba(16,35,49,.12); font-size: 11px; }

@media (max-width: 680px) {
  .site-shell { padding: 0 16px 24px; }
  .topbar { height: 66px; }
  .brand { font-size: 14px; }
  .safety-chip { font-size: 11px; }
  .hero { margin: 54px auto 32px; }
  .hero h1 { font-size: 39px; }
  .hero-copy { font-size: 15px; }
  .quiz-card, .result-card { padding: 25px 18px 22px; margin-bottom: 44px; }
  .progress-track { margin-bottom: 29px; }
  .question-block h2 { min-height: 0; margin-bottom: 23px; font-size: 22px; }
  .option { grid-template-columns: 32px 1fr 20px; padding: 10px 11px; font-size: 14px; }
  .feedback { min-height: 130px; padding: 15px 13px; }
  .card-footer > span { display: none; }
  .card-footer { justify-content: flex-end; }
  .result-summary { grid-template-columns: 1fr; }
  .result-summary div + div { border-left: 0; border-top: 1px solid var(--line); }
  .result-actions { flex-direction: column; }
  .instructor-card { margin: -10px auto 44px; padding: 20px 18px; align-items: flex-start; flex-direction: column; }
  .instructor-links { width: 100%; justify-content: flex-start; }
  footer { gap: 12px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
