:root {
  color-scheme: light;
  --paper: #faf5ea;
  --paper-soft: #efe5d2;
  --paper-strong: #fff9f0;
  --ink: #2a211b;
  --ink-soft: #65584c;
  --line: rgba(65, 46, 31, 0.12);
  --clay: #8d5b3d;
  --clay-deep: #5b3f2d;
  --moss: #7b7d52;
  --mustard: #c58f45;
  --terracotta: #b56d4b;
  --card: rgba(255, 250, 241, 0.84);
  --shadow: 0 24px 60px rgba(72, 53, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(197, 143, 69, 0.18), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(123, 125, 82, 0.15), transparent 28%),
    linear-gradient(180deg, #fff9ef, #f4ead7 40%, #faf5ea);
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header,
.brand,
.nav-links,
.hero-actions,
.share-actions,
.progress-text,
.form-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 0 5vw;
  background: rgba(250, 245, 234, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  gap: 14px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(4, 8px);
  gap: 4px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(141, 91, 61, 0.12);
}

.brand-mark span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.brand-mark span:nth-child(4n + 1) {
  background: var(--clay-deep);
}

.brand-mark span:nth-child(4n + 2) {
  background: var(--mustard);
}

.brand-mark span:nth-child(4n + 3) {
  background: var(--moss);
}

.brand-mark span:nth-child(4n) {
  background: var(--terracotta);
}

.nav-links {
  gap: 28px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a:hover,
.secondary-link:hover {
  color: var(--clay-deep);
}

.primary-chip,
.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.primary-chip,
.primary-button {
  color: #fffdf8;
  background: var(--clay-deep);
  box-shadow: 0 14px 32px rgba(91, 63, 45, 0.18);
}

.secondary-button,
.ghost-button {
  color: var(--clay-deep);
  background: rgba(91, 63, 45, 0.08);
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 72px 5vw 84px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p,
ul,
blockquote {
  margin-top: 0;
}

h1,
.hero-type,
.type-code {
  font-family: "DM Serif Display", Georgia, serif;
}

h1 {
  max-width: 9ch;
  margin-bottom: 18px;
  font-size: clamp(3.1rem, 7vw, 6.1rem);
  line-height: 0.94;
}

.hero-text,
.section-heading p,
.result-description,
.result-subtitle,
.share-panel p,
.preview-card p,
.info-card p,
.tendency-item p {
  color: var(--ink-soft);
  line-height: 1.82;
}

.hero-actions,
.share-actions,
.form-actions {
  gap: 14px;
}

.secondary-link {
  font-weight: 700;
}

.hero-card-stack {
  position: relative;
  min-height: 520px;
}

.hero-card {
  position: absolute;
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid rgba(91, 63, 45, 0.1);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card.primary {
  top: 18px;
  left: 0;
  transform: rotate(-2deg);
}

.hero-card.accent {
  right: 0;
  bottom: 18px;
  background: linear-gradient(145deg, rgba(255, 252, 246, 0.94), rgba(197, 143, 69, 0.18));
}

.hero-card-label,
.result-kicker {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-type,
.type-code {
  margin: 10px 0 14px;
  color: var(--clay-deep);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1;
}

.hero-card h2,
.result-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
}

.hero-card ul {
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.score-bars {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.score-bars span {
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--bar-color) var(--bar-width), rgba(255, 255, 255, 0) var(--bar-width)),
    rgba(91, 63, 45, 0.08);
}

.stat-ribbon,
.info-grid,
.preview-grid,
.tendency-grid {
  display: grid;
}

.stat-ribbon {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0 5vw 24px;
}

.stat-ribbon div {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 250, 241, 0.68);
}

.stat-ribbon strong {
  display: block;
  margin-bottom: 8px;
  color: var(--clay-deep);
  font-size: 2.4rem;
  font-family: "DM Serif Display", Georgia, serif;
}

.section-heading {
  max-width: 780px;
  margin: 0 auto 38px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
}

.test-shell,
.result-section,
.notes-section,
.preview-section {
  padding: 74px 5vw;
}

.progress-wrap,
.questionnaire,
.result-card {
  max-width: 980px;
  margin: 0 auto;
}

.progress-text {
  justify-content: space-between;
  color: var(--ink-soft);
  font-weight: 800;
}

.progress-track {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(91, 63, 45, 0.12);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--clay-deep), var(--mustard));
  transition: width 0.2s ease;
}

.questionnaire {
  margin-top: 26px;
}

.question-stage,
.result-card,
.info-card,
.preview-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 241, 0.82);
  box-shadow: var(--shadow);
}

.question-stage {
  padding: clamp(24px, 4vw, 34px);
}

.question-shell {
  display: grid;
  gap: 20px;
}

.question-overline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.question-title {
  margin-bottom: 0;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.5;
}

.choice-row {
  display: grid;
  gap: 14px;
}

.choice-row-quad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-row label {
  min-width: 0;
}

.choice-row input {
  position: absolute;
  opacity: 0;
}

.choice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 112px;
  padding: 18px 20px;
  border: 2px solid rgba(91, 63, 45, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.choice strong {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--clay-deep);
  background: rgba(91, 63, 45, 0.08);
  font-size: 0.95rem;
}

.choice span {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.62;
}

.choice:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 63, 45, 0.34);
}

.choice-row input:checked + .choice {
  border-color: var(--clay-deep);
  background: rgba(197, 143, 69, 0.12);
}

.form-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.result-section {
  background: linear-gradient(180deg, rgba(197, 143, 69, 0.08), rgba(255, 255, 255, 0));
}

.result-card {
  padding: clamp(26px, 4vw, 48px);
}

.result-main {
  max-width: 760px;
}

.result-subtitle {
  margin-bottom: 8px;
  font-weight: 700;
}

.result-slogan {
  margin: 0 0 18px;
  padding-left: 16px;
  border-left: 4px solid rgba(91, 63, 45, 0.24);
  color: var(--clay-deep);
  font-size: 1.08rem;
  font-weight: 800;
}

.share-panel {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(91, 63, 45, 0.06);
}

.share-panel p {
  margin-bottom: 14px;
}

.tendency-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.tendency-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.tendency-item small {
  display: block;
  margin-bottom: 10px;
  color: var(--clay-deep);
  font-size: 0.88rem;
  font-weight: 800;
}

.info-grid,
.preview-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.info-card,
.preview-card {
  padding: 24px;
}

.info-card h3,
.preview-card h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.preview-card span {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--clay-deep);
  background: rgba(91, 63, 45, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px 5vw 34px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-card-stack {
    min-height: 560px;
  }

  .info-grid,
  .preview-grid,
  .tendency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 20px;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .test-shell,
  .result-section,
  .notes-section,
  .preview-section {
    padding-inline: 20px;
  }

  .hero-card-stack {
    min-height: auto;
  }

  .hero-card {
    position: relative;
    width: 100%;
  }

  .hero-card.primary,
  .hero-card.accent {
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
  }

  .hero-card.accent {
    margin-top: 16px;
  }

  .stat-ribbon,
  .choice-row-quad,
  .info-grid,
  .preview-grid,
  .tendency-grid {
    grid-template-columns: 1fr;
  }

  .question-overline,
  .progress-text {
    gap: 8px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-name {
    display: none;
  }

  .hero-actions,
  .share-actions,
  .form-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions a,
  .share-actions button,
  .form-actions button {
    width: 100%;
  }

  .primary-chip {
    min-height: 40px;
    padding-inline: 14px;
  }

  .choice {
    min-height: auto;
  }
}
