:root {
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg-page: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #c05a3c;
  --brand-soft: #f6e7df;
  --accent: #2563eb;
  --neutral: #64748b;
  --shadow-panel: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

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

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
p,
button,
a {
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.test-page {
  min-height: 100vh;
  padding: 40px 16px;
  display: flex;
  justify-content: center;
}

.test-shell {
  width: 100%;
  max-width: 860px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.test-hero {
  padding: 24px 28px 18px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.brand-mini {
  width: fit-content;
  min-height: 44px;
  margin: 0 auto 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.brand-mini span {
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.brand-mini small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.test-hero h1 {
  margin-top: 4px;
  color: #0f172a;
  font-size: 30px;
  font-weight: 750;
  line-height: 1.25;
}

.hero-copy {
  max-width: 620px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.tips-grid {
  margin: 16px 32px 0;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: var(--surface-soft);
  border: 1px solid #e5eaf2;
  border-radius: 10px;
}

.tips-grid article {
  min-width: 0;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px dashed #dde4ee;
  border-radius: var(--radius-sm);
}

.tips-grid h2 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tips-grid p {
  margin-top: 4px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.45;
}

.status {
  margin: 20px 32px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  color: #9a3412;
  font-size: 14px;
}

.quiz {
  padding: 0 32px 32px;
}

.progress-block {
  margin-top: 18px;
}

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

#progressText {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

#axisText {
  min-height: 28px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #1e293b;
  transition: width 0.28s ease;
}

.question-card {
  margin-top: 20px;
  padding: 34px 20px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: center;
}

.question-number {
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
}

.question-text {
  min-height: 78px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
}

.picked-text {
  min-height: 22px;
  margin-top: 12px;
  color: var(--faint);
  font-size: 13px;
}

.option-list {
  margin-top: 26px;
  display: grid;
  gap: 12px;
}

.choice-btn {
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.choice-btn:hover,
.choice-btn:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  outline: none;
}

.choice-btn:active {
  transform: translateY(1px);
}

.choice-btn.active {
  border-color: #0f172a;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #0f172a;
}

.choice-key {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef2f7;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.choice-btn[data-choice="A"] .choice-key {
  background: #dcfce7;
  color: #047857;
}

.choice-btn[data-choice="M"] .choice-key {
  background: #f1f5f9;
  color: var(--neutral);
}

.choice-btn[data-choice="B"] .choice-key {
  background: #e0e7ff;
  color: #4f46e5;
}

.choice-text {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
}

.actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
}

.btn {
  min-height: 48px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--muted);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: #1e293b;
}

.outcome {
  margin: 0 32px 32px;
  padding: 18px 20px;
  border: 1px solid #eadfd8;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.outcome h2 {
  color: #7c2d12;
  font-size: 16px;
  font-weight: 800;
}

.outcome p {
  margin-top: 6px;
  color: #7c4a37;
  font-size: 14px;
}

.result-page {
  min-height: 100vh;
  padding: 40px 16px;
  display: flex;
  justify-content: center;
}

.result-shell {
  width: 100%;
  max-width: 860px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.result-hero {
  padding: 28px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.result-hero h1 {
  margin-top: 10px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.25;
}

.result-type {
  margin-top: 14px;
  color: var(--brand);
  font-size: clamp(56px, 11vw, 92px);
  font-weight: 850;
  line-height: 1;
}

.result-subtitle {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.result-content {
  padding: 24px 32px 32px;
}

.axis-list {
  display: grid;
  gap: 12px;
}

.axis-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.axis-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.axis-head h2 {
  color: var(--text);
  font-size: 16px;
}

.axis-head span {
  min-height: 30px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 800;
}

.axis-score {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.axis-meter {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.axis-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.tie-notice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  color: #9a3412;
  font-size: 14px;
}

.result-actions {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .test-page,
  .result-page {
    padding: 0;
  }

  .test-shell,
  .result-shell {
    min-height: 100vh;
    border-radius: 0;
  }

  .test-hero,
  .result-hero {
    padding: 22px 18px 16px;
  }

  .test-hero h1,
  .result-hero h1 {
    font-size: 26px;
  }

  .tips-grid {
    margin: 14px 16px 0;
    grid-template-columns: 1fr;
  }

  .status,
  .quiz,
  .result-content {
    margin-left: 0;
    margin-right: 0;
  }

  .status {
    margin: 16px 16px 0;
  }

  .quiz {
    padding: 0 16px 24px;
  }

  .question-card {
    padding: 28px 14px 22px;
  }

  .question-text {
    min-height: 92px;
    font-size: 22px;
  }

  .actions,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .outcome {
    margin: 0 16px 24px;
  }

  .result-content {
    padding: 20px 16px 28px;
  }

  .axis-head,
  .axis-score {
    align-items: flex-start;
    flex-direction: column;
  }
}
