:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --text: #18212f;
  --muted: #657080;
  --line: #e6eaf0;
  --primary: #2c63f2;
  --primary-dark: #1845b8;
  --danger: #c33a3a;
  --success: #18794e;
  --shadow: 0 20px 60px rgba(20, 32, 54, 0.09);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    "Pretendard",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at 80% 5%,
      rgba(44, 99, 242, 0.08),
      transparent 28%
    ),
    #fbfcff;
  line-height: 1.6;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.diag-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.diag-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.diag-header-inner {
  width: min(calc(100% - 40px), 1080px);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-ko {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-en {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.diag-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 56px 20px 72px;
}

.register-layout {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 44px;
  align-items: center;
}

.register-copy {
  padding: 14px 0;
}

.kicker {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.register-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.register-copy h1 strong {
  color: var(--primary);
}

.register-copy > p:not(.kicker) {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.quick-points {
  margin-top: 30px;
  display: grid;
  gap: 12px;
}

.quick-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #405065;
  font-size: 14px;
}

.quick-point span {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.register-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.register-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.card-intro {
  margin: 8px 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid #d7dde7;
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: #fff;
  transition: 0.18s ease;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 99, 242, 0.1);
}

.field-help {
  min-height: 21px;
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.field-help.error {
  color: var(--danger);
}

.field-help.success {
  color: var(--success);
}

.primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 26px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(44, 99, 242, 0.2);
  transition: 0.18s ease;
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.privacy-note {
  margin: 16px 0 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--bg-soft);
  color: #566274;
  font-size: 12px;
}

.login-link {
  margin: 20px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.login-link a {
  color: var(--primary);
  font-weight: 800;
}

.form-message {
  display: none;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 13px;
}

.form-message.show {
  display: block;
}

.form-message.error {
  background: #fff1f1;
  color: var(--danger);
}

.diag-footer {
  padding: 24px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 800px) {
  .register-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .register-copy {
    text-align: center;
  }

  .quick-points {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .diag-main {
    padding: 36px 16px 54px;
  }

  .brand-en {
    display: none;
  }

  .register-card {
    padding: 25px 20px;
    border-radius: 20px;
  }

  .register-copy h1 {
    font-size: 36px;
  }
}

/* ===== FREE20 TEST ===== */

.test-main {
  flex: 1;
  padding: 34px 20px 70px;
}

.test-wrap {
  width: min(100%, 920px);
  margin: 0 auto;
}

.test-top {
  margin-bottom: 22px;
}

.test-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.test-progress-row strong {
  font-size: 15px;
}

.test-progress-row span {
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf4;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.25s ease;
}

.test-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.question-number {
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.passage-box {
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 18px;
  background: #f7f9fc;
  border: 1px solid #e7ebf2;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.9;
}

.question-text {
  margin: 0 0 24px;
  font-size: 21px;
  line-height: 1.6;
  letter-spacing: -0.025em;
}

.options {
  display: grid;
  gap: 12px;
}

.option-button {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #dce2eb;
  border-radius: 15px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 0.16s ease;
}

.option-button:hover {
  border-color: #aac0ff;
  background: #f8faff;
}

.option-button.selected {
  border-color: var(--primary);
  background: #f0f4ff;
  box-shadow: 0 0 0 2px rgba(44, 99, 242, 0.08);
}

.option-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.option-no {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2f7;
  font-size: 14px;
  font-weight: 900;
}

.option-button.selected .option-no {
  background: var(--primary);
  color: #fff;
}

.option-text {
  line-height: 1.6;
}

.test-status {
  min-height: 24px;
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.test-status.error {
  color: var(--danger);
}

.test-nav {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.nav-button {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 13px;
  border: 1px solid #dce2eb;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.nav-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.nav-button.primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.question-jump {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}

.question-jump-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 7px;
}

.question-chip {
  aspect-ratio: 1;
  border: 1px solid #dce2eb;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.question-chip.answered {
  border-color: #b8c9f8;
  background: #edf2ff;
  color: var(--primary);
}

.question-chip.current {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(44,99,242,.12);
}

.loading-card {
  padding: 60px 30px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 640px) {
  .test-main {
    padding: 22px 14px 50px;
  }

  .test-card {
    padding: 23px 18px;
    border-radius: 20px;
  }

  .passage-box {
    padding: 19px;
    font-size: 15px;
  }

  .question-text {
    font-size: 19px;
  }

  .option-button {
    grid-template-columns: 34px 1fr;
    padding: 13px;
  }

  .test-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .nav-button {
    padding: 0 12px;
  }

  .question-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== FREE20 RESULT ===== */

.result-main {
  flex: 1;
  padding: 42px 20px 72px;
}

.result-wrap {
  width: min(100%, 980px);
  margin: 0 auto;
}

.result-hero {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.result-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.result-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.score-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 28px;
}

.score-number {
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.05em;
}

.score-total {
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
}

.result-summary {
  margin: 22px 0 0;
  color: #36465c;
  font-size: 17px;
  line-height: 1.75;
}

.result-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-section {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.result-section-head {
  margin-bottom: 20px;
}

.result-section-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.result-section-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.domain-card {
  padding: 18px;
  border: 1px solid #e2e7ef;
  border-radius: 15px;
  background: #fff;
}

.domain-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.domain-name {
  font-size: 15px;
  font-weight: 900;
}

.domain-score {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.signal-badge {
  display: inline-flex;
  margin-top: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f4f8;
  color: #455368;
  font-size: 12px;
  font-weight: 800;
}

.signal-badge.stable {
  background: #eef8f3;
  color: #18794e;
}

.signal-badge.evidence {
  background: #fff7e8;
  color: #8b5d00;
}

.signal-badge.caution {
  background: #fff0f0;
  color: #b43131;
}

.domain-description {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.pattern-list,
.knowhow-list {
  display: grid;
  gap: 12px;
}

.pattern-card,
.knowhow-card {
  padding: 18px;
  border-radius: 15px;
  background: #f8faff;
  border: 1px solid #e4eafa;
}

.pattern-domain,
.knowhow-domain {
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.pattern-text,
.knowhow-text {
  margin: 0;
  color: #334156;
  font-size: 15px;
  line-height: 1.7;
}

.empty-pattern {
  padding: 20px;
  border-radius: 15px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.unmeasured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.unmeasured-card {
  padding: 15px 16px;
  border: 1px solid #e4e8ee;
  border-radius: 13px;
  background: #fafbfc;
}

.unmeasured-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.unmeasured-name {
  font-size: 14px;
  font-weight: 800;
}

.unmeasured-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.unmeasured-desc {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.result-ending {
  margin-top: 30px;
  padding: 34px;
  border-radius: 22px;
  background: #18212f;
  color: #fff;
  text-align: center;
}

.result-ending h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.5;
  letter-spacing: -0.035em;
}

.result-ending p {
  margin: 12px auto 0;
  max-width: 660px;
  color: #cdd5e0;
  font-size: 14px;
  line-height: 1.75;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.result-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 12px;
  background: #fff;
  color: #18212f;
  font-size: 14px;
  font-weight: 900;
}

.result-link.secondary {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}

.result-loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 700px) {
  .result-main {
    padding: 26px 14px 54px;
  }

  .result-hero {
    padding: 26px 21px;
  }

  .result-section {
    padding: 23px 18px;
  }

  .domain-grid,
  .unmeasured-grid {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-link {
    width: 100%;
  }
}

/* ===== TEST PAUSE / EXIT ===== */

.test-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.test-brand-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.pause-exit-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  background: #fff;
  color: #566579;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.16s ease;
}

.pause-exit-button:hover {
  border-color: #b9c5d5;
  background: #f7f9fc;
  color: #27364a;
}

@media (max-width: 640px) {
  .test-header-inner {
    gap: 10px;
  }

  .test-brand-link .brand-en {
    display: none;
  }

  .pause-exit-button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12px;
  }
}
