:root {
  --bg: #f5efe6;
  --panel: rgba(255, 251, 245, 0.82);
  --text: #20160f;
  --muted: #6a584b;
  --line: rgba(73, 47, 32, 0.12);
  --accent: #a34824;
  --accent-strong: #7f2f15;
  --accent-soft: rgba(163, 72, 36, 0.12);
  --shadow: 0 24px 80px rgba(49, 26, 12, 0.12);
  --radius: 28px;
  --radius-sm: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(239, 196, 157, 0.42), transparent 26%),
    radial-gradient(circle at right 12% top 18%, rgba(105, 66, 146, 0.16), transparent 22%),
    linear-gradient(180deg, #f7f2ea 0%, #f2e8db 52%, #efe4d6 100%);
  transition: background 320ms ease;
}

body[data-depth="stage-1"] {
  background:
    radial-gradient(circle at top left, rgba(230, 194, 146, 0.42), transparent 30%),
    linear-gradient(180deg, #f8f1e7 0%, #f0e6d8 100%);
}

body[data-depth="stage-2"] {
  background:
    radial-gradient(circle at top right, rgba(160, 106, 60, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(85, 66, 114, 0.14), transparent 28%),
    linear-gradient(180deg, #efe2d3 0%, #e6d6c4 100%);
}

body[data-depth="stage-3"],
body[data-depth="final"] {
  background:
    radial-gradient(circle at top right, rgba(175, 69, 38, 0.2), transparent 18%),
    radial-gradient(circle at bottom left, rgba(55, 34, 91, 0.24), transparent 26%),
    linear-gradient(180deg, #ddd2c8 0%, #cdb8a8 48%, #b59f92 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.brand-chip,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
}

.screen {
  display: none;
}

.screen-active {
  display: block;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  padding: 32px;
  min-height: 74vh;
  align-items: stretch;
}

.hero-copy h1 {
  margin: 18px 0 0;
  font-family: "Georgia", "Songti SC", "STSong", serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 22px 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.hero-actions,
.final-actions,
.stage-result-actions,
.test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-side {
  display: grid;
  gap: 16px;
}

.stage-preview,
.disclaimer-block,
.sidebar-note,
.summary-panel,
.stage-transition-box,
.analysis-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.56);
  padding: 18px;
}

.stage-preview h2,
.disclaimer-block h2,
.stage-sidebar h2,
.summary-panel h3,
.analysis-report h3,
.dimension-report h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.stage-preview ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.stage-preview li {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stage-preview strong {
  font-size: 15px;
}

.stage-preview span,
.disclaimer-block p,
.sidebar-note p,
.sidebar-note ul,
.summary-panel p,
.stage-result-lead,
.analysis-report p,
.analysis-block p,
.dimension-report p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #a3471f 0%, #79341a 100%);
  box-shadow: 0 16px 36px rgba(121, 52, 26, 0.22);
}

.secondary-button {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid var(--line);
}

.test-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.test-single {
  display: block;
  max-width: 860px;
  margin: 0 auto;
}

.stage-sidebar,
.question-panel,
.stage-result-card,
.hero-report,
.analysis-report,
.dimension-report {
  padding: 24px;
}

.stage-badge,
.summary-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

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

.test-stage-strip {
  margin-bottom: 18px;
}

.test-stage-strip .stage-subtitle {
  margin: 12px 0 0;
}

.progress-inline {
  margin-top: 0;
  margin-bottom: 18px;
}

.progress-cluster {
  margin: 20px 0;
}

.progress-label-row,
.question-meta-row,
.dim-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.progress-track {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(79, 52, 34, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #cf865f 0%, #8d3918 100%);
}

#activeDimensions {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

#activeDimensions li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.44);
  font-size: 13px;
  color: var(--muted);
}

.question-panel {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
}

.question-index,
.question-counter,
.question-intent {
  color: var(--accent-strong);
  font-size: 13px;
}

.question-text {
  margin: 18px 0 12px;
  font-family: "Georgia", "Songti SC", "STSong", serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.34;
  letter-spacing: -0.02em;
}

.question-intent {
  min-height: 22px;
}

.options-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.option-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.option-card:hover,
.option-card.is-selected {
  border-color: rgba(127, 47, 21, 0.42);
  background: rgba(255, 247, 242, 0.84);
}

.option-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(163, 72, 36, 0.1);
  color: var(--accent-strong);
  font-weight: 800;
}

.option-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}

.test-actions {
  margin-top: auto;
  padding-top: 24px;
  justify-content: space-between;
}

.stage-result-card {
  display: grid;
  gap: 18px;
}

.stage-result-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.stage-result-header h2,
.hero-report h2 {
  margin: 10px 0 0;
  font-family: "Georgia", "Songti SC", "STSong", serif;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.summary-grid,
.final-report-grid {
  display: grid;
  gap: 18px;
}

.summary-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  color: var(--text);
}

.final-report-grid {
  grid-template-columns: 0.95fr 1.05fr;
  align-items: start;
}

.hero-report,
.analysis-report {
  min-height: 100%;
}

.final-title {
  margin: 10px 0 0;
  font-size: 22px;
  color: var(--accent-strong);
  font-weight: 700;
}

.final-summary {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

.analysis-block {
  margin-top: 16px;
}

.analysis-block h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h3 {
  margin-bottom: 6px;
}

.dimension-report {
  grid-column: 1 / -1;
}

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

.dim-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: 16px;
}

.dim-card-head h4 {
  margin: 0;
  font-size: 15px;
}

.dim-score {
  font-weight: 800;
  color: var(--accent-strong);
}

.dim-bar {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(79, 52, 34, 0.08);
  overflow: hidden;
}

.dim-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d59771 0%, #83341c 100%);
}

.dim-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 13px;
}

@media (max-width: 960px) {
  .hero-card,
  .summary-grid,
  .final-report-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .question-panel {
    min-height: auto;
  }

  .dimension-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .hero-card,
  .stage-sidebar,
  .question-panel,
  .stage-result-card,
  .hero-report,
  .analysis-report,
  .dimension-report {
    padding: 18px;
  }

  .site-header,
  .stage-result-header,
  .test-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .question-text {
    font-size: 28px;
  }
}
