:root {
  --bg: #f4e9dc;
  --bg-deep: #ecd7c5;
  --panel: rgba(255, 248, 241, 0.84);
  --panel-strong: #fff8f1;
  --ink: #261614;
  --muted: #6d5550;
  --line: rgba(71, 38, 31, 0.12);
  --accent: #bf4b34;
  --accent-strong: #8f2f20;
  --accent-soft: #f5d5c3;
  --gold: #c98843;
  --olive: #687356;
  --shadow: 0 24px 80px rgba(97, 48, 35, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.78), transparent 22%),
    radial-gradient(circle at 86% 8%, rgba(245, 182, 132, 0.28), transparent 26%),
    linear-gradient(180deg, #f8f0e7 0%, #f2e3d4 52%, #ead6c3 100%);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.ambient,
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.ambient-a {
  background:
    radial-gradient(circle at 78% 22%, rgba(201, 136, 67, 0.18), transparent 0 18%),
    radial-gradient(circle at 20% 76%, rgba(191, 75, 52, 0.12), transparent 0 16%);
  filter: blur(12px);
}

.ambient-b {
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(255, 255, 255, 0.18) 44%, transparent 58%),
    linear-gradient(transparent 0 64%, rgba(255, 255, 255, 0.12) 82%, transparent 100%);
}

.grain {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(38, 22, 20, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 22, 20, 0.02) 1px, transparent 1px);
  background-size: 10px 10px;
  mix-blend-mode: multiply;
}

.app-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: rise-in 420ms ease;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 38%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 28%);
  pointer-events: none;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(143, 47, 32, 0.14);
  color: var(--accent-strong);
  background: rgba(255, 236, 226, 0.82);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 74px);
  line-height: 0.98;
  max-width: 8.5em;
}

.hero-lead,
.muted,
.fine-print,
.bullet-card p,
.hero-note p,
.plain-list,
.protocol-item p,
.dimension-copy,
.score-meta p {
  color: var(--muted);
}

.hero-lead {
  max-width: 60ch;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.9;
}

.hero-actions,
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn {
  cursor: pointer;
  border-radius: 16px;
  padding: 13px 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff8f4;
  background: linear-gradient(135deg, var(--accent) 0%, #a63a28 100%);
  box-shadow: 0 14px 28px rgba(166, 58, 40, 0.26);
}

.btn-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.btn-ghost {
  width: 100%;
  color: var(--accent-strong);
  background: rgba(255, 236, 226, 0.8);
}

.hero-side {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.hero-note {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(71, 38, 31, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 246, 239, 0.78));
}

.hero-note.warm {
  background: linear-gradient(180deg, rgba(255, 239, 228, 0.9), rgba(255, 248, 241, 0.78));
}

.hero-note-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-list,
.plain-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

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

.branch-layout {
  display: grid;
  place-items: center;
  min-height: 68vh;
}

.branch-card {
  width: min(760px, 100%);
}

.branch-lead {
  margin-top: 0;
  max-width: none;
}

.branch-options {
  display: grid;
  gap: 14px;
  margin: 22px 0 18px;
}

.branch-option {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 18px;
  text-align: left;
  border-radius: 22px;
  border: 1px solid rgba(71, 38, 31, 0.1);
  background: rgba(255, 252, 248, 0.86);
  color: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.branch-option:hover {
  transform: translateY(-1px);
  border-color: rgba(191, 75, 52, 0.24);
  background: rgba(255, 247, 241, 0.96);
}

.branch-option strong {
  font-size: 20px;
}

.branch-option span {
  color: var(--muted);
  line-height: 1.7;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
}

.model-grid,
.type-atlas,
.dimension-list {
  display: grid;
  gap: 14px;
}

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

.model-card,
.bullet-card,
.type-chip,
.dimension-card,
.detail-card,
.protocol-item,
.score-card,
.quiz-note {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid rgba(71, 38, 31, 0.09);
  background: rgba(255, 252, 248, 0.86);
}

.model-card,
.bullet-card,
.quiz-note,
.score-card {
  padding: 16px;
}

.model-card h3,
.bullet-card h3,
.quiz-note h3,
.score-card h3,
.protocol-item h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.model-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--olive);
  background: rgba(104, 115, 86, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.bullet-stack {
  display: grid;
  gap: 14px;
}

.theory-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theory-panel {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(71, 38, 31, 0.09);
  background: rgba(255, 252, 248, 0.82);
}

.theory-panel h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.type-atlas {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.type-chip {
  display: grid;
  gap: 12px;
  padding: 16px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.type-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(191, 75, 52, 0.18);
  background: rgba(255, 247, 241, 0.96);
}

.type-chip-media {
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 239, 232, 0.9));
  border: 1px solid rgba(71, 38, 31, 0.08);
}

.type-chip-media img {
  display: block;
  width: 100%;
  height: auto;
}

.type-chip-code {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.type-chip h3 {
  margin-top: 8px;
  font-size: 22px;
}

.type-chip p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.quiz-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  align-items: start;
}

.quiz-side {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(71, 38, 31, 0.08);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold) 0%, var(--accent) 100%);
  transition: width 220ms ease;
}

#profileBanner {
  margin-top: -6px;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.question-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 236, 226, 0.84);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.question-chip.subtle {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.question-title {
  margin-top: 18px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.14;
  max-width: 14ch;
}

.option-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.option-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(71, 38, 31, 0.1);
  border-radius: 22px;
  background: rgba(255, 252, 248, 0.86);
  color: inherit;
  text-align: left;
}

.option-card.selected {
  border-color: rgba(191, 75, 52, 0.32);
  background: rgba(255, 236, 226, 0.88);
  box-shadow: inset 0 0 0 1px rgba(191, 75, 52, 0.08);
}

.option-index {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: var(--accent-strong);
  background: rgba(255, 244, 237, 0.92);
  font-size: 18px;
  font-weight: 800;
}

.option-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.option-card span:last-child {
  color: var(--muted);
  line-height: 1.75;
}

.quiz-actions {
  justify-content: space-between;
  margin-top: 24px;
}

.result-hero {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  align-items: stretch;
}

.result-copy {
  position: relative;
  z-index: 1;
}

.result-copy h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.96;
  margin-top: 12px;
}

.chip-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-row {
  margin-top: 18px;
}

.axis-chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(71, 38, 31, 0.09);
  background: rgba(255, 252, 248, 0.82);
  font-size: 13px;
}

.poster-shell {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.poster-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 24px;
  border-radius: 28px;
  color: #fffaf6;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(155deg, #532119 0%, #8f2f20 48%, #c4673d 100%);
  box-shadow: 0 26px 80px rgba(120, 42, 30, 0.24);
}

.poster-code {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.poster-name {
  margin-top: 10px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.95;
  font-family: var(--serif);
}

.poster-figure {
  margin-top: 18px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 250, 246, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.poster-image {
  display: block;
  width: 100%;
  height: auto;
}

.poster-summary {
  margin-top: 14px;
  line-height: 1.8;
  color: rgba(255, 246, 241, 0.86);
}

.badge-row {
  margin-top: 18px;
}

.badge {
  color: rgba(255, 246, 241, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.radar-wrap {
  display: flex;
  justify-content: center;
}

#radarChart {
  width: min(100%, 360px);
  height: auto;
}

.score-list,
.detail-list,
.protocol-list {
  display: grid;
  gap: 12px;
}

.score-card {
  display: grid;
  gap: 10px;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-row strong {
  font-size: 16px;
}

.score-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(71, 38, 31, 0.08);
  overflow: hidden;
}

.score-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

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

.detail-card,
.protocol-item,
.dimension-card {
  padding: 15px 16px;
}

.detail-card h4,
.dimension-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.detail-card p,
.protocol-item p,
.dimension-card p {
  margin: 0;
  line-height: 1.75;
  color: var(--muted);
}

.protocol-item {
  display: grid;
  gap: 8px;
}

.protocol-index {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(255, 236, 226, 0.84);
  font-size: 13px;
  font-weight: 800;
}

.dimension-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dimension-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dimension-level {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 236, 226, 0.84);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.dimension-copy {
  font-size: 14px;
}

.fine-print {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .result-hero,
  .quiz-layout,
  .overview-grid,
  .result-grid,
  .theory-grid,
  .insight-columns {
    grid-template-columns: 1fr;
  }

  .quiz-side {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 12px;
  }

  .hero,
  .section-card,
  .quiz-side,
  .quiz-card,
  .result-hero {
    padding: 20px;
  }

  .model-grid,
  .type-atlas,
  .dimension-list {
    grid-template-columns: 1fr;
  }

  .question-title {
    max-width: none;
    font-size: clamp(26px, 7vw, 36px);
  }

  .option-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .option-index {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
}
