:root {
  --bg: #fbfbf8;
  --panel: #ffffff;
  --panel-soft: #f4f7f1;
  --ink: #243447;
  --muted: #697481;
  --line: #d9e0da;
  --green: #2f8c68;
  --coral: #d56a3d;
  --blue: #4c78a8;
  --yellow: #e1b64b;
  --shadow: 0 18px 50px rgba(36, 52, 71, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(36, 52, 71, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(36, 52, 71, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 10%, rgba(47, 140, 104, 0.12), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(213, 106, 61, 0.1), transparent 32%),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.app-root {
  min-height: 100vh;
}

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

.phone-shell {
  width: min(100%, 520px);
  min-height: calc(100vh - 36px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.home {
  padding: 28px 22px 18px;
}

.center {
  text-align: center;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--green);
}

.hero-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 800;
}

.lead {
  margin: 14px auto 22px;
  max-width: 390px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.path-image {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  margin: 0 0 22px;
  background: var(--panel-soft);
}

.copy {
  display: grid;
  gap: 12px;
  margin: 0 auto 24px;
  max-width: 430px;
}

.copy p {
  margin: 0;
  color: rgba(36, 52, 71, 0.82);
  line-height: 1.82;
  font-size: 14px;
}

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

.dimension {
  border: 1px solid var(--line);
  background: rgba(244, 247, 241, 0.72);
  padding: 10px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.ghost-button,
.option-button {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  min-height: 48px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.primary-button {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

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

.ghost-button {
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.ghost-button:hover {
  background: var(--panel-soft);
}

.footnote,
.footer-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.footnote {
  margin: 18px auto 0;
  max-width: 360px;
  text-align: center;
}

.footer-line {
  margin: 20px -22px -18px;
  padding: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.quiz-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mono {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.progress {
  height: 6px;
  background: #e8ede7;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--coral));
  transition: width 0.24s ease;
}

.quiz-body {
  padding: 30px 22px 18px;
}

.question-number {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}

.question-number strong {
  color: rgba(36, 52, 71, 0.22);
  font-size: 42px;
  line-height: 1;
}

.rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.question-title {
  margin: 0 0 28px;
  font-size: 20px;
  line-height: 1.65;
  font-weight: 700;
}

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

.option-button {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 62px;
  padding: 15px;
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  text-align: left;
}

.option-button:hover {
  border-color: var(--green);
  background: #f8fbf7;
}

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

.option-button.dimmed {
  opacity: 0.52;
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1;
}

.option-text {
  line-height: 1.65;
  font-size: 14px;
}

.quiz-tip {
  padding: 16px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.loading-page {
  min-height: calc(100vh - 36px);
  display: grid;
  place-items: center;
  padding: 28px;
}

.loader {
  width: 54px;
  height: 54px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-right-color: var(--coral);
  animation: spin 1s linear infinite;
  margin: 0 auto 28px;
}

.loading-text {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}

.loading-bars {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.loading-bar {
  height: 5px;
  background: #e7ece6;
  overflow: hidden;
}

.loading-bar span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 0.32s ease;
}

.report {
  padding: 0 0 22px;
}

.top-strip {
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--coral));
}

.report-content {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
}

.result-hero {
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.result-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.gauge-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
}

.gauge text {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.phase {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.bar-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.metric {
  display: grid;
  grid-template-columns: 118px 1fr 38px;
  gap: 10px;
  align-items: center;
}

.metric-label {
  color: var(--ink);
  text-align: right;
  font-size: 12px;
}

.metric-track {
  height: 8px;
  background: #e6ebe5;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: var(--green);
}

.metric-value {
  font-size: 12px;
}

.quote {
  margin-top: 16px;
  border-left: 3px solid var(--green);
  background: var(--panel-soft);
  padding: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
}

.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.text-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.text-list li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  align-items: start;
  color: rgba(36, 52, 71, 0.86);
  line-height: 1.75;
  font-size: 14px;
}

.text-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 9px;
  background: var(--coral);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 7px 9px;
  font-size: 12px;
  color: var(--ink);
}

.radar-wrap {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.radar text {
  font-size: 10px;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.split-box {
  border: 1px solid var(--line);
  padding: 12px;
  background: #fff;
}

.split-box h4 {
  margin: 0 0 10px;
  font-size: 13px;
}

.split-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.secondary-note {
  border-color: rgba(76, 120, 168, 0.4);
  background: rgba(76, 120, 168, 0.08);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.action-item {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(36, 52, 71, 0.36);
}

.modal {
  width: min(100%, 520px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.share-text {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 12px;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
}

.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 860px) {
  .page {
    padding: 28px;
  }

  .phone-shell {
    min-height: calc(100vh - 56px);
  }
}

@media (max-width: 430px) {
  .page {
    padding: 0;
  }

  .phone-shell {
    min-height: 100vh;
    border-left: 0;
    border-right: 0;
  }

  .hero-title {
    font-size: 26px;
  }

  .metric {
    grid-template-columns: 100px 1fr 36px;
  }

  .split-grid,
  .action-grid,
  .button-row {
    grid-template-columns: 1fr;
  }
}
