:root {
  --bg-top: #f7f1e7;
  --bg-bottom: #edf1ea;
  --panel: rgba(255, 250, 243, 0.82);
  --panel-strong: rgba(255, 250, 243, 0.94);
  --text: #1c2a24;
  --muted: #67756d;
  --line: rgba(28, 42, 36, 0.12);
  --line-strong: rgba(28, 42, 36, 0.18);
  --accent: #bb6a44;
  --accent-deep: #264f46;
  --accent-soft: rgba(187, 106, 68, 0.12);
  --shadow: 0 30px 90px rgba(31, 53, 45, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 12% 10%, rgba(244, 196, 126, 0.3), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(87, 138, 122, 0.18), transparent 26%),
    radial-gradient(circle at 20% 82%, rgba(201, 150, 111, 0.16), transparent 22%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(28, 42, 36, 0.08);
  padding: 2px 6px;
  border-radius: 8px;
}

.page-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

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

.brand-link {
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  color: var(--accent-deep);
}

.site-nav-toggle-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.site-nav-toggle-bars {
  display: grid;
  gap: 4px;
}

.site-nav-toggle-bars span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-nav-toggle.is-open .site-nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-nav-toggle.is-open .site-nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.site-nav-toggle.is-open .site-nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  color: var(--accent-deep);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.site-nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 79, 70, 0.24);
}

.site-nav-link.current {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-deep), #1d3d36);
  box-shadow: 0 14px 36px rgba(38, 79, 70, 0.18);
}

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

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: riseIn 0.35s ease;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 196, 126, 0.24) 0%, rgba(244, 196, 126, 0) 70%);
  pointer-events: none;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title,
.page-title,
.result-title,
.section-head h2,
.quiz-top h2 {
  margin: 0;
  font-family: var(--font-serif);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-title {
  font-size: clamp(42px, 7vw, 76px);
  margin-top: 14px;
}

.page-title {
  margin-top: 10px;
  font-size: clamp(38px, 6vw, 64px);
}

.hero-lead,
.side-note,
.overview-card p,
.type-card p,
.hint,
.text-block,
.result-summary,
.result-signature,
.result-tagline {
  margin: 0;
  line-height: 1.8;
  color: var(--muted);
}

.hero-lead {
  margin-top: 18px;
  font-size: 15px;
  width: 100%;
  max-width: none;
}

.hero-actions,
.action-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.page-intro,
.quiz-progress-head,
.type-detail-shell,
.cta-panel {
  padding: 24px;
}

.page-intro,
.quiz-progress-head,
.type-detail-shell,
.cta-panel {
  margin-top: 24px;
}

.page-intro:first-of-type,
.quiz-progress-head:first-of-type {
  margin-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  padding: 13px 20px;
  border-radius: 999px;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-deep), #1d3d36);
  box-shadow: 0 14px 36px rgba(38, 79, 70, 0.24);
}

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

.btn-small {
  padding: 10px 14px;
  font-size: 14px;
}

.btn-mode {
  min-width: 120px;
  font-weight: 700;
}

.btn-mode-quick {
  border-color: rgba(212, 145, 94, 0.34);
  background: rgba(255, 248, 242, 0.92);
}

.btn-mode-full {
  border-color: rgba(38, 79, 70, 0.2);
  background: rgba(244, 249, 246, 0.92);
}

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

.mode-status,
.resume-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

.resume-note:empty {
  display: none;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.metric-card,
.dimension-card,
.overview-card,
.type-card,
.question-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-strong), rgba(255, 255, 255, 0.72));
}

.metric-card {
  padding: 16px 18px;
}

.metric-card strong {
  display: block;
  font-size: 32px;
  color: var(--accent-deep);
  line-height: 1;
}

.metric-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.hero-side {
  padding: 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(244, 196, 126, 0.22), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.52));
  border: 1px solid var(--line);
}

.dimension-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.dimension-card {
  padding: 16px 18px;
}

.dimension-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.dimension-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.side-note {
  margin-top: 16px;
  font-size: 14px;
}

.overview-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.overview-card {
  padding: 18px;
}

.overview-card h3 {
  margin: 8px 0 10px;
  font-size: 20px;
}

.type-wall {
  margin-top: 24px;
  padding: 24px;
}

.type-detail-grid {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.type-detail {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  padding: 18px;
  align-items: center;
}

.type-detail-media {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(244, 196, 126, 0.2), transparent 40%),
    rgba(255, 255, 255, 0.72);
}

.type-detail-media img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  object-position: center top;
}

.type-detail-copy {
  min-width: 0;
}

.type-detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.type-detail-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.type-detail-tagline {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.7;
}

.type-detail-signature {
  margin: 14px 0 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.8;
}

.type-detail-block {
  margin-top: 16px;
}

.type-detail-block strong {
  display: block;
  margin-bottom: 8px;
}

.type-detail-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-head {
  display: grid;
  gap: 14px;
  align-items: start;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.section-head p {
  width: 100%;
  max-width: none;
  color: var(--muted);
  line-height: 1.8;
}

.type-wall-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.type-card {
  padding: 18px;
  min-height: 168px;
  position: relative;
  overflow: hidden;
}

.type-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 196, 126, 0.22), rgba(244, 196, 126, 0));
  pointer-events: none;
}

.type-code {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.type-name {
  margin-top: 12px;
  font-weight: 700;
  font-size: 18px;
}

.type-card p {
  margin-top: 8px;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.quiz-shell,
.result-shell {
  padding: 24px;
}

.quiz-progress-head {
  display: grid;
  gap: 16px;
}

.quiz-top {
  display: grid;
  gap: 16px;
}

.quiz-actions,
.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.quiz-top h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 40px);
}

.quiz-mode-lead {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
  width: 100%;
  max-width: none;
}

.progress-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.progress-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(38, 79, 70, 0.1);
  overflow: hidden;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d48d5e, var(--accent-deep));
  transition: width 0.22s ease;
}

.progress-text {
  margin-top: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-status {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.question-list {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.question-card {
  padding: 18px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.question-card.answered {
  border-color: rgba(38, 79, 70, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(234, 241, 237, 0.72));
}

.question-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.question-index,
.question-dim,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.question-card h3,
.result-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
}

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

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.option:hover {
  border-color: rgba(38, 79, 70, 0.24);
  transform: translateY(-1px);
}

.option.selected {
  border-color: rgba(38, 79, 70, 0.32);
  background: rgba(236, 244, 240, 0.8);
}

.option input {
  margin-top: 4px;
  accent-color: var(--accent-deep);
  transform: scale(1.1);
}

.option-copy {
  display: flex;
  gap: 12px;
  line-height: 1.75;
  color: var(--text);
}

.option-key {
  width: 28px;
  flex: 0 0 28px;
  font-weight: 800;
  color: var(--accent);
}

.quiz-actions {
  margin-top: 22px;
}

.hint {
  font-size: 14px;
  width: 100%;
  max-width: none;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: center;
}

.poster-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(244, 196, 126, 0.22), transparent 40%),
    rgba(255, 255, 255, 0.68);
  min-height: 0;
}

.poster-panel img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  object-position: center top;
}

.result-intro {
  padding: 8px 4px;
}

.result-title {
  margin-top: 10px;
  font-size: clamp(36px, 5vw, 56px);
}

.result-tagline {
  margin-top: 12px;
  font-size: 18px;
}

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

.chip {
  color: var(--accent-deep);
  font-size: 14px;
}

.chip.strong {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #cf8b5d);
  border-color: transparent;
}

.result-summary {
  margin-top: 22px;
  font-size: 16px;
}

.result-signature {
  margin-top: 14px;
  color: var(--text);
  font-weight: 600;
}

.result-mode-hint {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.75;
}

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

.result-card {
  padding: 20px;
}

.result-card.wide {
  grid-column: span 2;
}

.result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.result-card h3 {
  margin-bottom: 14px;
}

.dimension-list,
.match-list,
.result-list {
  display: grid;
  gap: 12px;
}

.dimension-item,
.match-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.dimension-top,
.match-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.dimension-name,
.match-item strong {
  font-size: 15px;
  font-weight: 700;
}

.dimension-score,
.match-score {
  color: var(--accent-deep);
  font-weight: 800;
  white-space: nowrap;
}

.dimension-caption,
.match-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

.bar-track {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(38, 79, 70, 0.12);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d4915e, var(--accent-deep));
}

.text-block {
  font-size: 15px;
}

.review-text {
  color: var(--text);
}

.result-list {
  margin: 0;
  padding-left: 20px;
}

.result-list li {
  color: var(--text);
  line-height: 1.8;
}

.result-actions {
  margin-top: 22px;
}

.cta-panel h2 {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.cta-panel p {
  margin: 18px 0 0;
  width: 100%;
  max-width: none;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

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

@media (max-width: 980px) {
  .hero,
  .type-detail,
  .result-hero,
  .section-head {
    grid-template-columns: 1fr;
  }

  .mode-status-grid,
  .overview-grid,
  .type-wall-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card.wide {
    grid-column: span 2;
  }
}

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

  .site-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .site-nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .site-nav {
    display: none;
    width: 100%;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .hero,
  .page-intro,
  .quiz-progress-head,
  .quiz-shell,
  .result-shell,
  .type-detail-shell,
  .cta-panel,
  .type-wall {
    padding: 18px;
  }

  .hero-title {
    font-size: 42px;
  }

  .page-title,
  .quiz-top h2,
  .section-head h2 {
    font-size: 28px;
  }

  .metric-row,
  .mode-status-grid,
  .overview-grid,
  .type-wall-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .page-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .page-status {
    text-align: center;
  }

  .result-card.wide {
    grid-column: span 1;
  }

  .type-detail-media img,
  .poster-panel img {
    min-height: 0;
  }
}
