:root {
  --bg: #fff7f4;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #2b1a1e;
  --muted: #7c6169;
  --line: rgba(139, 102, 112, 0.18);
  --primary: #ef6b7b;
  --primary-deep: #da4f62;
  --accent: #ffd8dd;
  --shadow: 0 20px 60px rgba(214, 118, 134, 0.16);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 219, 225, 0.9), transparent 28%),
    radial-gradient(circle at right 20%, rgba(255, 236, 218, 0.8), transparent 24%),
    linear-gradient(180deg, #fff8f5 0%, #fff0f2 100%);
}

button {
  font: inherit;
}

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.card {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

.hero-card,
.quiz-card,
.result-card {
  padding: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239, 107, 123, 0.1);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-card h1,
.result-card h2 {
  margin: 18px 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.hero-subtitle,
.result-summary {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-note {
  margin-top: 24px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 247, 249, 0.96));
  border: 1px solid var(--line);
}

.hero-note h2,
.score-breakdown h3,
.result-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.hero-note p,
.result-panel p,
.copy-feedback {
  margin: 0;
  line-height: 1.85;
  color: #4f3e44;
  white-space: pre-line;
}

.hero-points {
  margin: 24px 0 0;
  padding-left: 1.2em;
  color: #5c4951;
  line-height: 1.9;
}

.primary-button,
.secondary-button,
.ghost-button,
.option-button {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.primary-button,
.secondary-button,
.ghost-button {
  padding: 14px 18px;
  font-weight: 700;
}

.primary-button {
  margin-top: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8c84 100%);
  box-shadow: 0 12px 30px rgba(239, 107, 123, 0.28);
}

.secondary-button {
  color: var(--primary-deep);
  background: rgba(239, 107, 123, 0.1);
}

.ghost-button {
  color: #71525b;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.option-button:hover {
  transform: translateY(-1px);
}

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

.progress-text {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.progress-track {
  height: 10px;
  margin: 20px 0 26px;
  border-radius: 999px;
  background: rgba(239, 107, 123, 0.14);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, #ff9f94 100%);
}

.question-block h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.4;
}

.option-list {
  display: grid;
  gap: 14px;
}

.option-button {
  width: 100%;
  padding: 18px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  text-align: left;
  color: inherit;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(139, 102, 112, 0.14);
}

.option-button.selected,
.option-button:hover {
  border-color: rgba(239, 107, 123, 0.45);
  background: rgba(255, 241, 243, 0.98);
  box-shadow: 0 12px 28px rgba(239, 107, 123, 0.1);
}

.option-key {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(239, 107, 123, 0.12);
  color: var(--primary-deep);
  font-weight: 800;
}

.quiz-footer {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.footer-tip {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.secondary-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.result-type-label {
  margin: 18px 0 0;
  color: var(--primary-deep);
  font-size: 16px;
  font-weight: 800;
}

.result-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-panel,
.score-breakdown {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(139, 102, 112, 0.12);
}

.score-breakdown {
  margin-top: 18px;
}

.score-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.score-chip {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 247, 247, 0.95);
}

.score-chip-key {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 107, 123, 0.14);
  color: var(--primary-deep);
  font-weight: 800;
}

.score-chip-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-chip-body span {
  color: var(--muted);
}

.result-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.copy-feedback {
  min-height: 28px;
  margin-top: 12px;
  color: var(--primary-deep);
}

.theme-a {
  --primary: #f2798d;
  --primary-deep: #c74866;
}

.theme-b {
  --primary: #ff8b7f;
  --primary-deep: #e15752;
}

.theme-c {
  --primary: #7d91c7;
  --primary-deep: #4b609a;
}

.theme-d {
  --primary: #8c7bbc;
  --primary-deep: #5f5194;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 20px 12px 40px;
  }

  .hero-card,
  .quiz-card,
  .result-card {
    padding: 20px;
    border-radius: 24px;
  }

  .quiz-topbar,
  .quiz-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-tip {
    text-align: left;
  }

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

  .result-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }
}
