:root {
  --bg: #f6faf6;
  --panel: #ffffff;
  --text: #1e2a22;
  --muted: #6a786f;
  --line: #dbe8dd;
  --soft: #edf6ef;
  --accent: #6c8d71;
  --accent-strong: #4d6a53;
  --accent-light: #a8d5b8;
  --shadow: 0 16px 40px rgba(47, 73, 55, 0.08);
  --shadow-sm: 0 4px 12px rgba(47, 73, 55, 0.06);
  --radius: 22px;
  --radius-sm: 12px;
}

* {
  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 top left, #f8fff8 0, #f6faf6 36%, #f2f7f3 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Layout */
.screen {
  display: none;
  animation: slideIn 0.4s ease-out;
}

.screen.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  padding: 48px 32px;
  margin-top: 20px;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(127, 165, 134, 0.18), rgba(127, 165, 134, 0.02));
  pointer-events: none;
}

.hero h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 24px 0;
  color: var(--text);
  letter-spacing: 0.5px;
}

.hero p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 32px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  margin-bottom: 32px;
}

.hero-actions-single {
  justify-content: center;
}

.hero-info {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 32px;
  pt: 32px;
}

.hero-info span {
  display: block;
}

.hero-info a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.hero-info a:hover {
  color: var(--accent-strong);
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
  box-shadow: var(--shadow-sm);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-secondary {
  background: var(--soft);
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: #e0f0e5;
  border-color: var(--accent-light);
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* Test Section */
.test-wrap {
  padding: 0;
  overflow: hidden;
}

.topbar {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.progress {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.question-list {
  padding: 32px;
}

.question-item {
  margin-bottom: 40px;
  animation: slideIn 0.3s ease-out;
}

.question-item:last-child {
  margin-bottom: 0;
}

.question-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
  display: block;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}

.option input[type="radio"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.option:hover {
  background: var(--soft);
  border-color: var(--accent-light);
}

.option input[type="radio"]:checked + label {
  color: var(--accent-strong);
  font-weight: 500;
}

.option.checked {
  background: #e8f5eb;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 141, 113, 0.1);
}

/* Result Section */
.result-wrap {
  padding: 0;
}

.result-layout {
  padding: 48px 32px;
  text-align: center;
}

.result-type {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.result-name {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.result-title {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.result-description {
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.result-color-indicator {
  width: 4px;
  height: 80px;
  background: var(--accent);
  margin: 24px auto;
  border-radius: 2px;
}

.result-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.trait-group h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.trait-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trait-list li {
  font-size: 14px;
  color: var(--text);
  padding: 8px 12px;
  background: var(--soft);
  border-radius: var(--radius-sm);
  text-align: left;
}

.result-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.result-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.result-section p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.result-section ul {
  font-size: 14px;
  color: var(--text);
  padding-left: 20px;
  margin: 12px 0 0 0;
}

.result-section li {
  margin-bottom: 8px;
}

.actions-bottom {
  padding: 24px 32px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.actions-bottom > div:last-child {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .shell {
    padding: 16px 12px 40px;
  }

  .hero {
    padding: 32px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .question-list {
    padding: 20px 16px;
  }

  .question-item {
    margin-bottom: 28px;
  }

  .result-layout {
    padding: 32px 20px;
  }

  .result-type {
    font-size: 36px;
  }

  .result-name {
    font-size: 20px;
  }

  .result-traits {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .result-description {
    font-size: 14px;
  }

  .option {
    padding: 12px 14px;
    font-size: 13px;
  }

  .btn-primary, .btn-secondary {
    padding: 10px 24px;
    font-size: 14px;
  }

  .actions-bottom > div:last-child {
    flex-direction: column;
  }

  .actions-bottom > div:last-child button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .result-type {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .result-layout {
    padding: 24px 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions button {
    width: 100%;
  }
}
