:root {
  --bg: #fffaf2;
  --text: #1f1f1f;
  --muted: #6c6c74;
  --card: #ffffffcc;
  --line: #e8e1d7;
  --primary: #1f7a8c;
  --primary-strong: #125a68;
  --accent: #ff7f50;
  --accent-soft: #ffe2d6;
  --shadow: 0 16px 42px rgba(24, 24, 24, 0.12);
  --radius-lg: 24px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Serif SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 20%, #ffe9d9 0%, transparent 32%),
    radial-gradient(circle at 85% 10%, #d8f3f8 0%, transparent 30%),
    linear-gradient(180deg, #fffaf2 0%, #fff6ea 60%, #fff8f0 100%);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.4;
  z-index: 0;
}

.ambient-a {
  width: 240px;
  height: 240px;
  background: #ff8f70;
  top: -70px;
  right: -50px;
}

.ambient-b {
  width: 280px;
  height: 280px;
  background: #77d1e5;
  left: -100px;
  bottom: -100px;
}

.app-shell {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #ffb07f);
  color: #fff;
  font-weight: 700;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.4px;
}

.screen {
  display: none;
  animation: fadeUp 280ms ease;
}

.screen.active {
  display: block;
}

@keyframes fadeUp {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero-card,
.quiz-card,
.result-card {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.18;
}

.subline {
  color: var(--muted);
  margin: 12px 0 16px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f7f3ed;
  border: 1px solid #ece3d8;
  font-size: 12px;
  color: #4f4f56;
}

.primary-btn,
.ghost-btn {
  border-radius: 12px;
  font-size: 15px;
  padding: 11px 16px;
  cursor: pointer;
  transition: all 160ms ease;
}

.primary-btn {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #2ea4bc);
}

.primary-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary-strong), #238ea3);
}

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

.ghost-btn {
  background: #fff;
  border: 1px solid #ded7cd;
  color: #44444a;
}

.ghost-btn:hover {
  border-color: #c9c0b5;
  background: #fdfaf5;
}

.quiz-card {
  padding: 24px;
}

.progress-label {
  margin: 0;
  font-size: 14px;
  color: #52525a;
}

.progress-track {
  margin-top: 8px;
  border-radius: 999px;
  background: #ece6dd;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #f49f45);
  transition: width 200ms ease;
}

.question-text {
  margin: 18px 0 8px;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.35;
}

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

.option-btn {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ddd4ca;
  background: #fff;
  cursor: pointer;
  transition: all 140ms ease;
  line-height: 1.5;
  font-size: 15px;
}

.option-btn:hover {
  border-color: #c6b8a9;
  background: #fffaf2;
}

.option-btn.selected {
  border-color: #ff9b66;
  background: var(--accent-soft);
}

.quiz-foot {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.result-card {
  padding: 24px;
}

.result-card h2 {
  margin: 6px 0;
  font-size: clamp(28px, 5vw, 38px);
}

.result-tagline {
  margin: 0;
  color: #4d4d55;
  font-size: 15px;
}

.result-main {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: center;
}

.result-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #eadfce;
  background: #fff;
}

.match-line {
  margin: 0;
  font-size: 16px;
}

.result-desc {
  margin: 8px 0 0;
  line-height: 1.7;
  color: #4f4f55;
}

.radar-wrap {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e8ddcf;
  background: #fff;
  border-radius: 16px;
}

.radar-wrap h3 {
  margin: 0 0 8px;
}

#radarCanvas {
  width: 100%;
  max-width: 460px;
  display: block;
  margin: 0 auto;
}

.result-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.disclaimer {
  margin: 12px 0 0;
  font-size: 12px;
  color: #7a7a82;
}

@media (max-width: 760px) {
  .result-main {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 9;
    background: #fffaf2d8;
    backdrop-filter: blur(8px);
    padding: 8px 0;
  }
}
