:root {
  --bg: #f6faf6;
  --panel: #ffffff;
  --text: #1e2a22;
  --muted: #6a786f;
  --line: #dbe8dd;
  --soft: #edf6ef;
  --accent: #6c8d71;
  --accent-strong: #4d6a53;
  --shadow: 0 16px 40px rgba(47, 73, 55, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at left top, #f8fff8 0, #f6faf6 36%, #f2f7f3 100%);
  color: var(--text);
  min-height: 100vh;
}
button, input { font: inherit; }
button {
  border: 0;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, opacity .16s;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.hidden { display: none !important; }

.shell { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.screen { display: none; }
.screen.active { display: block; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 16px;
}
.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 24px;
  min-height: 48vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 24px;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(rgba(127, 165, 134, .18), rgba(127, 165, 134, .02));
}
.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -.03em;
  max-width: 760px;
  position: relative;
  z-index: 1;
}
.hero .sub {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  position: relative;
  z-index: 1;
}
.hero-actions { margin-top: 28px; position: relative; z-index: 1; }
.btn-primary {
  background: var(--accent-strong);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: rgba(77, 106, 83, 0.18) 0 12px 30px;
  font-weight: 700;
}
.btn-secondary {
  background: #fff;
  color: var(--accent-strong);
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-weight: 700;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 24px;
}
.test-wrap, .result-wrap { margin-top: 22px; padding: 22px; }
.topbar, .actions-bottom, .result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.progress {
  flex: 1 1 0;
  min-width: 240px;
  height: 10px;
  background: #edf3ee;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #97b59c, #5b7a62);
  transition: width .22s;
}
.progress-text, .hint { color: var(--muted); font-size: 13px; }
.question-list, .dim-list, .report-sections { display: grid; gap: 16px; }
.question, .type-box, .analysis-box, .dim-box, .note-box, .poster-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(#fff, #fbfdfb);
}
.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 6px 10px;
}
.question-title {
  font-size: 16px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.options { display: grid; gap: 10px; margin-top: 14px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .16s, background .16s;
}
.option:hover { border-color: #bcd0c1; background: #f8fcf9; }
.option input { margin-top: 3px; accent-color: var(--accent-strong); }
.option-code { font-weight: 800; color: var(--accent-strong); min-width: 22px; }
.result-layout { display: grid; gap: 18px; }
.result-top {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
}
.poster-box {
  min-height: 280px;
  background: radial-gradient(circle at right top, rgba(127, 165, 134, .16), rgba(127, 165, 134, 0) 40%), linear-gradient(#fff, #f7fbf8);
}
.poster-inner {
  height: 100%;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(160deg, rgba(77,106,83,.9), rgba(108,141,113,.66));
  color: #fff;
}
.poster-kicker { font-size: 14px; letter-spacing: .12em; opacity: .8; }
.poster-title { font-size: clamp(32px, 6vw, 56px); font-weight: 800; line-height: 1.05; margin-top: 10px; }
.poster-caption { margin-top: 12px; line-height: 1.8; color: rgba(255,255,255,.92); }
.type-kicker { font-size: 12px; color: var(--accent-strong); letter-spacing: .06em; }
.type-name { font-size: clamp(30px, 5vw, 48px); line-height: 1.08; margin-top: 8px; }
.match {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 700;
}
.type-subname { margin-top: 10px; color: var(--muted); line-height: 1.8; }
.analysis-box h3, .dim-box h3, .note-box h3 { margin: 0 0 12px; font-size: 16px; }
.analysis-box p, .note-box p, .report-sections p {
  margin: 0;
  line-height: 1.9;
  color: #304034;
}
.blurred-cards {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.blur-card {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  background: repeating-linear-gradient(-45deg, #f3f7f4, #f3f7f4 10px, #eef4ef 10px, #eef4ef 20px);
}
.blur-card strong { display: block; margin-bottom: 6px; }
.blur-card span { color: var(--muted); font-size: 13px; }
.report-sections section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.report-sections section:first-child { border-top: 0; padding-top: 0; }
.report-sections h4 { margin: 0 0 8px; font-size: 15px; }
.dim-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.dim-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dim-item-name { font-weight: 700; }
.dim-item-score { color: var(--accent-strong); font-weight: 800; }
.dim-item p { margin: 0; color: var(--muted); line-height: 1.8; font-size: 13px; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 27, 21, .45);
  backdrop-filter: blur(2px);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 480px);
  padding: 22px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.modal-header h3 { margin: 6px 0 0; font-size: 24px; }
.price {
  font-size: 42px;
  font-weight: 800;
  color: var(--accent-strong);
  margin: 16px 0 10px;
}
.benefit-list {
  margin: 0;
  padding-left: 18px;
  color: #304034;
  line-height: 1.9;
}
.pay-image-box {
  margin: 10px 0 14px;
}
.pay-image {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}
.pay-image-placeholder {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 18px;
  background: repeating-linear-gradient(-45deg, #f3f7f4, #f3f7f4 10px, #eef4ef 10px, #eef4ef 20px);
  text-align: center;
  color: var(--muted);
}
.pay-image-placeholder strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}
.pay-image-placeholder code {
  background: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.modal-note { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.pay-status, .pay-order-no {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.pay-status.is-error {
  color: #b42318;
}
.pay-order-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.modal-actions { margin-top: 16px; }

@media (max-width: 860px) {
  .result-top { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { padding: 14px 12px 42px; }
  .hero, .test-wrap, .result-wrap, .modal-panel { padding: 16px; }
  .hero h1 { font-size: 32px; }
  .question-title { font-size: 15px; }
}
