:root {
  --text: #1d1d1f;
  --muted: #6e6e73;
  --subtle: #86868b;
  --page: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --blue: #0071e3;
  --blue-dark: #005bb5;
  --green: #248a3d;
  --orange: #bf6a02;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

/* History result v3: responsive reading card, separate from the 3:4 download. */
.result-overview-stage {
  width: min(920px, 100%);
  margin: 0 auto;
}

.result-overview-card {
  overflow: hidden;
  border: 1px solid #cbbda7;
  border-radius: 6px;
  background: #f8f3e9;
  box-shadow: 12px 14px 0 #e1d6c4, 0 24px 55px rgba(65, 48, 29, 0.1);
}

.overview-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 38px 0;
}

.overview-card-title h1 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 42px;
  line-height: 1.25;
}

.overview-card-title .overview-match {
  position: static;
  flex: 0 0 auto;
  padding: 0;
  color: var(--history-red);
  background: transparent;
}

.overview-card-title .overview-match span {
  color: #8a7c6e;
}

.overview-card-title .overview-match strong {
  font-size: 30px;
}

.result-overview-head {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  padding: 30px 38px 38px;
}

.overview-portrait-wrap {
  position: relative;
}

.result-overview-card .overview-portrait {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 4px;
  box-shadow: 8px 9px 0 #dfd2be;
}

.overview-match {
  position: absolute;
  right: -12px;
  bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 11px 16px;
  color: #fffaf1;
  background: #263b36;
}

.overview-match span { color: rgba(255,255,255,.68); font-size: 11px; }
.overview-match strong { font-family: Georgia, serif; font-size: 28px; }

.overview-identity {
  align-self: center;
  min-width: 0;
}

.overview-identity h1 { margin: 9px 0 6px; font-family: "Songti SC", serif; font-size: 68px; line-height: 1; }
.overview-identity > p { margin: 0; color: #a06f47; font-size: 22px; font-weight: 600; }
.overview-traits { margin-top: 24px; }
.overview-identity blockquote {
  position: relative;
  margin: 24px 0 0;
  padding: 20px 0 0 28px;
  border-top: 1px solid #d8cbb8;
  font-family: "Songti SC", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.55;
}
.overview-identity blockquote::before { content: "“"; position: absolute; left: 0; color: #c3a276; font-size: 36px; }

.result-overview-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  border-top: 1px solid #d8cbb8;
}

.overview-radar,
.overview-note { min-width: 0; padding: 30px 38px 34px; }
.overview-radar { border-right: 1px solid #d8cbb8; }
.overview-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.overview-section-title span,
.overview-note > span { color: var(--history-red); font-size: 12px; font-weight: 700; }
.overview-section-title strong { color: #75685c; font-family: "Songti SC", serif; font-size: 18px; }
#summary-radar-chart { display: block; width: 100%; height: 280px; margin-top: 6px; }
.overview-note { display: flex; flex-direction: column; justify-content: center; background: rgba(255,253,248,.52); }
.overview-note h2 { margin: 14px 0 12px; font-family: "Songti SC", serif; font-size: 32px; line-height: 1.35; }
.overview-note p { margin: 0; color: #75685c; font-size: 15px; line-height: 1.9; }

.result-overview-stage .summary-primary-actions { width: min(560px,100%); margin: 0 auto; }

.history-cover {
  background: #d7c5aa;
}
.history-cover img {
  height: 430px;
  object-position: center 32%;
}
.history-cover::after { border-color: rgba(255,250,241,.55); }
.history-cover-caption {
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 54px 18px 18px;
  background: linear-gradient(to bottom, transparent, rgba(27,31,29,.78));
  backdrop-filter: none;
}

@media (max-width: 760px) {
  .overview-card-title {
    align-items: flex-end;
    padding: 22px 20px 0;
  }

  .overview-card-title h1 {
    max-width: 250px;
    font-size: 30px;
  }

  .overview-card-title .overview-match span {
    display: none;
  }

  .overview-card-title .overview-match strong {
    font-size: 24px;
  }

  .result-overview-head {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 18px 22px;
  }
  .overview-match { right: -7px; bottom: 7px; gap: 4px; padding: 6px 8px; }
  .overview-match span { font-size: 8px; }
  .overview-match strong { font-size: 18px; }
  .overview-identity > span { font-size: 10px; }
  .overview-identity h1 { margin-top: 5px; font-size: 42px; }
  .overview-identity > p { font-size: 10px; line-height: 1.5; }
  .overview-traits { gap: 5px; margin-top: 12px; }
  .overview-traits span { min-width: 0; padding: 5px 9px; font-size: 10px; }
  .overview-identity blockquote { grid-column: 1 / -1; margin-top: 13px; padding: 12px 0 0 18px; font-size: 15px; line-height: 1.55; }
  .result-overview-body { grid-template-columns: 1fr; }
  .overview-radar { padding: 20px 18px 16px; border-right: 0; border-bottom: 1px solid #d8cbb8; }
  #summary-radar-chart { height: 250px; }
  .overview-note { padding: 22px 20px 24px; }
  .overview-note h2 { margin: 9px 0 7px; font-size: 23px; }
  .overview-note p { font-size: 13px; line-height: 1.75; }
  .share-result-tip { margin-top: 22px; }
  .result-overview-stage .summary-primary-actions { grid-template-columns: 1fr 1fr; }
  .history-cover img { height: 310px; object-position: center 28%; }
  .history-cover-caption { right: 12px; bottom: 12px; left: 12px; padding: 42px 12px 12px; }
  .history-cover-caption strong { font-size: 20px; }
}

@media (max-width: 380px) {
  .result-overview-head { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .overview-identity h1 { font-size: 36px; }
  .overview-identity blockquote { font-size: 14px; }
  .result-overview-stage .summary-primary-actions { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
}

.cosmos-bg,
.star,
.comet {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  background: rgba(245, 245, 247, 0.78);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(22px);
}

.site-header.compact {
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.brand-logo,
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  border-radius: 50%;
  box-shadow: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  background: var(--text);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.nav a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 64px;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  min-height: 620px;
  margin: 0 auto;
  padding: 54px 0 82px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.hero-copy h1,
.quiz-panel h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: 72px;
  font-weight: 700;
  line-height: 1.04;
  text-wrap: balance;
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.68;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

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

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

.button.primary {
  color: #fff;
  background: var(--blue);
}

.button.primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 12px 26px rgba(0, 113, 227, 0.2);
}

.button.subtle {
  color: var(--blue);
  background: transparent;
  border-color: rgba(0, 113, 227, 0.28);
}

.button.subtle:hover {
  background: rgba(0, 113, 227, 0.06);
}

.orbit-card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7f7f9);
  box-shadow: var(--shadow);
}

.orbit-card::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
}

.orbit-ring,
.orbit-ring.outer {
  position: absolute;
  inset: 68px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit-ring.outer {
  inset: 104px;
  border-color: var(--line-soft);
}

.planet-core {
  position: absolute;
  left: 50%;
  top: 47%;
  display: grid;
  place-items: center;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #111827, #3a3a3c);
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.16);
  transform: translate(-50%, -50%);
}

.planet-core span {
  align-self: end;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.68);
}

.planet-core strong {
  align-self: start;
  font-size: 40px;
  font-weight: 700;
}

.signal,
.mini-report,
.axis-card {
  position: absolute;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 600;
}

.signal {
  padding: 9px 12px;
  color: var(--muted);
}

.signal-a {
  left: 38px;
  top: 72px;
}

.signal-b {
  right: 34px;
  top: 178px;
}

.signal-c {
  left: 58px;
  bottom: 112px;
}

.mini-report {
  right: 34px;
  bottom: 34px;
  width: 174px;
  padding: 16px;
}

.mini-report span {
  display: block;
  color: var(--subtle);
  font-size: 12px;
}

.mini-report strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.mini-report i {
  display: block;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0 78%, var(--line-soft) 78%);
}

.axis-card {
  left: 38px;
  top: 172px;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
}

.axis-card b {
  font-size: 28px;
}

.axis-card span {
  color: var(--subtle);
  font-size: 12px;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 96px;
}

.section-heading h2 {
  margin: 0 0 24px;
  font-size: 44px;
  font-weight: 700;
}

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

.test-card,
.report-block,
.quiz-panel,
.question-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
}

.test-card {
  min-height: 270px;
  padding: 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.test-card:hover {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.test-card.muted {
  opacity: 0.58;
}

.test-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
}

.test-number {
  color: #d6d6db;
  font-size: 40px;
  font-weight: 700;
}

.test-card h3 {
  margin: 42px 0 12px;
  font-size: 24px;
  font-weight: 700;
}

.test-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.card-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.card-link.disabled {
  color: var(--subtle);
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 48px;
  border-top: 1px solid var(--line-soft);
  color: var(--subtle);
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0;
}

.quiz-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 72px;
}

/* Test pages stay focused on the active experience. */
.quiz-body > .site-header {
  display: none;
}

.quiz-panel {
  padding: 44px;
}

.hidden {
  display: none !important;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: center;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.intro-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--page);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.report-preview {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #1d1d1f, #3a3a3c);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.18);
}

.preview-kicker,
.report-preview small {
  color: rgba(255, 255, 255, 0.66);
}

.report-preview strong {
  display: block;
  margin: 12px 0 22px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.08;
}

.preview-orbit {
  display: none;
}

.preview-bars {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.preview-bars i {
  display: block;
  width: var(--w);
  height: 8px;
  border-radius: 999px;
  background: #8ec5ff;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.progress-track {
  height: 7px;
  margin: 12px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.25s ease;
}

.question-card {
  padding: 30px;
}

.question-count {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.question-card h2 {
  margin: 0 0 24px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

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

.option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
  transition: border 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.option:hover,
.option.selected {
  border-color: rgba(0, 113, 227, 0.42);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.08);
}

.option-letter {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

.option-text {
  font-size: 16px;
  line-height: 1.45;
}

.quiz-actions {
  justify-content: space-between;
}

.share-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  padding: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 18%, rgba(0, 113, 227, 0.12), transparent 30%),
    linear-gradient(145deg, #fff, #f7f7fa);
  box-shadow: var(--shadow);
}

.share-card::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
}

.share-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.share-card-head #share-score {
  color: var(--blue);
  font-size: 28px;
  font-weight: 700;
}

.share-card-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin-top: 30px;
}

.city-orb {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #1d1d1f, #3a3a3c);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.16);
}

.city-orb span {
  font-size: 56px;
  font-weight: 700;
}

.share-card h1 {
  margin: 0;
  font-size: 88px;
  font-weight: 700;
  line-height: 0.98;
}

.result-tagline {
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 24px;
}

.result-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 24px;
  font-weight: 600;
}

.result-badges span {
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--text);
}

.share-line {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
}

.share-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.share-metrics span {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.share-metrics b {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.share-metrics i {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-size: 28px;
  font-style: normal;
  font-weight: 700;
}

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

.report-block {
  padding: 24px;
}

.report-block.wide {
  grid-column: 1 / -1;
}

.report-block h2 {
  margin: 0 0 14px;
  font-size: 23px;
  font-weight: 700;
}

.report-block p,
.suggestion-list,
.alt-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.78;
}

.dimension-chart {
  display: grid;
  gap: 13px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}

.dimension-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.dimension-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.suggestion-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

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

.alt-card {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.alt-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
}

.alt-card p {
  margin: 0;
}

.result-actions {
  justify-content: center;
}

@media (max-width: 880px) {
  .home-hero,
  .intro-layout,
  .test-grid,
  .report-grid,
  .alt-cities {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
    gap: 36px;
    padding: 36px 0 64px;
  }

  .hero-copy h1,
  .quiz-panel h1 {
    font-size: 48px;
  }

  .orbit-card {
    min-height: 360px;
  }

  .planet-core {
    width: 144px;
    height: 144px;
  }

  .planet-core strong {
    font-size: 32px;
  }

  .axis-card {
    left: 24px;
    top: 132px;
  }

  .mini-report {
    right: 22px;
    bottom: 22px;
  }

  .hero-actions,
  .result-actions,
  .quiz-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .quiz-body .site-header {
    position: sticky;
    width: 100%;
    padding: 10px 14px;
  }

  .quiz-body .brand-logo,
  .quiz-body .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .quiz-body .brand {
    font-size: 15px;
  }

  .quiz-shell {
    width: 100%;
    padding: 12px 12px 24px;
  }

  .quiz-panel {
    padding: 14px;
    border-radius: 8px;
  }

  #question-screen {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #question-screen.hidden {
    display: none !important;
  }

  .progress-label {
    font-size: 12px;
  }

  .progress-track {
    height: 6px;
    margin: 0 0 4px;
  }

  .question-card {
    padding: 14px;
  }

  .question-count {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .question-card h2 {
    margin-bottom: 12px;
    font-size: 22px;
    line-height: 1.18;
  }

  .option-list {
    gap: 8px;
  }

  .option {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    min-height: 48px;
    padding: 8px 10px;
  }

  .option-letter {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .option-text {
    font-size: 14px;
    line-height: 1.34;
  }

  .quiz-actions {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    margin-top: 0;
  }

  .quiz-actions .button {
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
  }

  .quiz-panel h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 17px;
  }

  .intro-meta {
    gap: 6px;
  }

  .intro-meta span {
    padding: 7px 9px;
    font-size: 12px;
  }

  .report-preview {
    padding: 20px;
  }

  .share-card {
    padding: 18px;
  }

  .share-card-main {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    margin-top: 20px;
  }

  .city-orb {
    width: 72px;
    height: 72px;
  }

  .city-orb span {
    font-size: 34px;
  }

  .share-card h1 {
    font-size: 52px;
  }

  .result-tagline {
    font-size: 17px;
  }

  .result-badges {
    margin-top: 16px;
  }

  .result-badges span {
    padding: 7px 10px;
    font-size: 13px;
  }

  .share-line {
    margin-top: 18px;
    font-size: 19px;
  }

  .share-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .share-metrics span {
    padding: 10px 8px;
  }

  .share-metrics b {
    font-size: 11px;
  }

  .share-metrics i {
    font-size: 21px;
  }

  .report-block {
    padding: 18px;
  }

  .site-footer {
    width: calc(100% - 32px);
    padding: 20px 0 36px;
  }
}

/* Keep the share poster independent from legacy portrait layout rules. */
.result-share-poster .poster-portrait {
  position: absolute;
  top: 62px;
  right: 28px;
  width: 185px;
  min-height: 0;
  aspect-ratio: 1;
}

@media (max-width: 760px) {
  .result-share-poster .poster-portrait {
    top: 48px;
    right: 18px;
    width: 36%;
  }
}

/* Two-stage history result summary */
.share-result-stage {
  width: min(560px, 100%);
  margin: 0 auto;
}

.result-share-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 28px;
  border: 1px solid #cbbda7;
  border-radius: 6px;
  color: #211d18;
  background: #f8f3e9;
  box-shadow: 14px 16px 0 #e1d6c4, 0 24px 55px rgba(65, 48, 29, 0.12);
}

.result-share-poster::before {
  content: "史";
  position: absolute;
  right: -34px;
  bottom: -74px;
  color: rgba(157, 56, 45, 0.045);
  font-family: "Songti SC", serif;
  font-size: 320px;
  line-height: 1;
}

.poster-topline,
.poster-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: #776a5d;
  font-size: 11px;
}

.poster-topline b,
.poster-footer b {
  color: var(--history-red);
}

.poster-portrait {
  position: absolute;
  top: 62px;
  right: 28px;
  width: 185px;
  aspect-ratio: 1;
  border-radius: 3px;
  box-shadow: 8px 9px 0 #dfd2be;
}

.poster-match {
  position: absolute;
  z-index: 3;
  top: 222px;
  right: 18px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 14px;
  color: #fffaf1;
  background: #263b36;
}

.poster-match span { font-size: 10px; opacity: .72; }
.poster-match strong { font-family: Georgia, serif; font-size: 25px; }

.poster-identity {
  position: relative;
  z-index: 2;
  width: calc(100% - 205px);
  margin-top: 62px;
}

.poster-identity > span {
  color: #7b6e61;
  font-size: 12px;
}

.poster-identity h1 {
  margin: 8px 0 8px;
  font-family: "Songti SC", serif;
  font-size: 58px;
  line-height: 1;
}

.poster-identity p {
  margin: 0;
  color: #a06f47;
  font-size: 12px;
}

.poster-traits {
  position: relative;
  z-index: 2;
  margin-top: 52px;
}

.result-share-poster blockquote {
  position: relative;
  z-index: 2;
  min-height: 92px;
  margin: 22px 0 0;
  padding: 18px 0 16px 26px;
  border-top: 1px solid #d8cbb8;
  border-bottom: 1px solid #d8cbb8;
  font-family: "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.55;
}

.result-share-poster blockquote::before {
  content: "“";
  position: absolute;
  left: 0;
  color: #c3a276;
  font-size: 32px;
}

.poster-insight {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 1px auto minmax(0, 1.35fr);
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.poster-insight span { color: #8a7c6e; font-size: 10px; }
.poster-insight strong { font-family: "Songti SC", serif; font-size: 15px; }
.poster-insight i { width: 1px; height: 28px; background: #d8cbb8; }

.poster-dimensions {
  margin-top: 22px;
  padding: 14px 12px;
  gap: 12px;
  background: rgba(255, 253, 248, .72);
}

.poster-note {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--history-red);
}

.poster-note span { color: var(--history-red); font-size: 10px; font-weight: 700; }
.poster-note p { margin: 5px 0 0; color: #665b50; font-family: "Songti SC", serif; font-size: 13px; line-height: 1.65; }

.poster-footer {
  position: absolute;
  right: 28px;
  bottom: 25px;
  left: 28px;
}

.share-result-tip {
  margin: 26px 0 12px;
  color: #8b8076;
  font-size: 12px;
  text-align: center;
}

.summary-primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.summary-primary-actions .button,
.summary-primary-actions .button.history-primary,
.summary-primary-actions .full-analysis-button {
  width: 100%;
  min-height: 52px;
  margin: 0 !important;
  border-radius: 6px;
  font-size: 15px;
}

.history-result-card {
  padding: 38px 42px 32px;
}

.result-card-heading {
  position: relative;
  z-index: 1;
  padding: 8px 4px 28px;
}

.result-card-heading .history-kicker {
  margin-bottom: 11px;
}

.result-card-heading h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 42px;
  line-height: 1.25;
}

.result-card-heading > p:last-child {
  margin: 10px 0 0;
  color: var(--history-muted);
  font-size: 14px;
}

.result-summary-box {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  overflow: hidden;
  border: 1px solid rgba(113, 89, 59, 0.15);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 16px 35px rgba(65, 48, 29, 0.06);
}

.summary-identity {
  padding: 30px;
  border-right: 1px solid var(--history-line);
}

.summary-identity-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 22px;
  align-items: start;
}

.summary-label {
  color: var(--history-muted);
  font-size: 13px;
  font-weight: 600;
}

.summary-identity h2 {
  margin: 8px 0 4px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 62px;
  font-weight: 700;
  line-height: 1;
}

.summary-identity-top p {
  margin: 12px 0 0;
  color: #9d7653;
  font-size: 14px;
}

.summary-identity-top p strong {
  font-weight: 700;
}

.summary-identity .figure-portrait {
  width: 150px;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 4px;
  box-shadow: 7px 8px 0 #e7dccb;
}

.summary-identity .trait-tags {
  margin-top: 24px;
}

.summary-identity blockquote {
  margin: 28px 0 0;
  color: var(--history-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.65;
}

.summary-identity blockquote::before {
  content: "“";
  margin-right: 6px;
  color: #c5a77e;
  font-size: 36px;
  line-height: 0;
  vertical-align: -8px;
}

.summary-metrics {
  display: grid;
  padding: 18px 28px;
}

.summary-metric {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 93px;
  border-bottom: 1px solid rgba(113, 89, 59, 0.13);
}

.summary-metric:last-child {
  border-bottom: 0;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #f5e8d5;
  background: #263b36;
  font-family: Georgia, serif;
  font-size: 23px;
}

.summary-metric small,
.summary-metric strong,
.summary-metric p {
  display: block;
}

.summary-metric small {
  color: var(--history-muted);
  font-size: 11px;
}

.summary-metric strong {
  margin-top: 2px;
  color: var(--history-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 22px;
  line-height: 1.3;
}

.summary-metric p {
  margin: 2px 0 0;
  color: #8c8176;
  font-size: 11px;
  line-height: 1.45;
}

.summary-quote {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  padding: 13px 20px;
  border-top: 1px solid var(--history-line);
  border-bottom: 1px solid var(--history-line);
  color: #394844;
  background: rgba(249, 245, 236, 0.8);
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.summary-dimensions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--history-line);
  border-radius: 5px;
  background: rgba(255, 253, 248, 0.74);
}

.summary-dimension > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #706458;
  font-size: 12px;
}

.summary-dimension strong {
  color: var(--history-red);
  font-family: Georgia, serif;
  font-size: 16px;
}

.summary-dimension i {
  display: block;
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: #e8e0d3;
}

.summary-dimension b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #263b36, #9d382d);
}

.summary-quote span {
  margin: 0 7px;
  color: #c3a276;
  font-size: 25px;
}

.summary-features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--history-line);
  border-radius: 5px;
  background: var(--history-line);
}

.summary-features span {
  padding: 15px 12px;
  color: #665a4f;
  background: #faf7f0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.summary-features b {
  margin-right: 5px;
  color: var(--history-red);
  font-size: 11px;
}

.full-analysis-button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 56px;
  margin: 18px 0 0 !important;
  border-radius: 6px;
  font-size: 17px;
}

.full-analysis-button span {
  margin-left: 9px;
  font-size: 19px;
}

.radar-report-block {
  scroll-margin-top: 82px;
}

.expanded-radar-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  align-items: center;
}

.expanded-radar-layout > div:first-child p {
  color: var(--history-muted);
  font-size: 14px;
  line-height: 1.75;
}

.expanded-radar-layout .radar-wrap {
  width: 100%;
  margin: 0;
}

.history-result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(720px, 100%);
  margin: 24px auto 0;
}

.history-result-actions .button,
.history-result-actions .button.history-primary {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .history-result-panel {
    padding: 16px 12px 22px;
  }

  .result-share-poster {
    padding: 18px;
    box-shadow: 7px 8px 0 #e1d6c4;
  }

  .poster-topline { font-size: 9px; }
  .poster-portrait { top: 48px; right: 18px; width: 36%; }
  .poster-match { top: 33%; right: 10px; padding: 6px 9px; }
  .poster-match strong { font-size: 19px; }
  .poster-identity { width: 59%; margin-top: 40px; }
  .poster-identity > span { font-size: 10px; }
  .poster-identity h1 { margin-top: 5px; font-size: 42px; }
  .poster-identity p { font-size: 10px; }
  .poster-traits { margin-top: 43px; }
  .poster-traits span { padding: 6px 12px; font-size: 11px; }
  .result-share-poster blockquote { min-height: 76px; margin-top: 14px; padding: 12px 0 10px 20px; font-size: 16px; }
  .poster-insight { margin-top: 12px; gap: 6px; }
  .poster-insight span { font-size: 8px; }
  .poster-insight strong { font-size: 12px; }
  .poster-dimensions { margin-top: 12px; padding: 10px 8px; gap: 7px; overflow: visible; }
  .poster-dimensions .summary-dimension > div { font-size: 9px; }
  .poster-dimensions .summary-dimension strong { font-size: 11px; }
  .poster-dimensions .summary-dimension i { margin-top: 5px; }
  .poster-note { margin-top: 12px; padding-left: 9px; }
  .poster-note span { font-size: 8px; }
  .poster-note p { margin-top: 2px; font-size: 10px; line-height: 1.5; }
  .poster-footer { right: 18px; bottom: 15px; left: 18px; font-size: 9px; }

  .history-result-card {
    padding: 22px 16px 18px;
  }

  .result-card-heading {
    padding: 2px 2px 20px;
  }

  .result-card-heading h1 {
    font-size: 30px;
  }

  .result-card-heading > p:last-child {
    font-size: 12px;
    line-height: 1.55;
  }

  .result-summary-box {
    grid-template-columns: 1fr;
  }

  .summary-identity {
    padding: 22px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--history-line);
  }

  .summary-identity-top {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 14px;
  }

  .summary-identity .figure-portrait {
    width: 104px;
    box-shadow: 5px 6px 0 #e7dccb;
  }

  .summary-identity h2 {
    font-size: 44px;
  }

  .summary-identity-top p {
    font-size: 12px;
    line-height: 1.45;
  }

  .summary-identity .trait-tags {
    margin-top: 18px;
  }

  .summary-identity blockquote {
    margin-top: 20px;
    font-size: 19px;
  }

  .summary-metrics {
    padding: 8px 18px;
  }

  .summary-metric {
    min-height: 82px;
  }

  .summary-metric strong {
    font-size: 19px;
  }

  .summary-quote {
    padding: 12px 8px;
    font-size: 16px;
  }

  .summary-dimensions {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding: 14px;
  }

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

  .summary-features span {
    padding: 13px 8px;
    font-size: 12px;
  }

  .full-analysis-button {
    min-height: 52px;
    font-size: 15px;
  }

  .expanded-radar-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

/* Xiaohongshu-friendly discovery home */
.xhs-home {
  --home-red: #ff4d5f;
  --home-red-dark: #e5374b;
  --home-pink: #ffe4e8;
  --home-mint: #dff5ea;
  --home-yellow: #fff1a8;
  --home-ink: #242326;
  background: #fffdfb;
}

.xhs-home .site-header {
  background: rgba(255, 253, 251, 0.88);
}

.discovery-home {
  overflow: hidden;
}

.xhs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 56px;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  min-height: 610px;
  margin: 0 auto;
  padding: 56px 0 76px;
}

.xhs-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #7c7471;
  font-size: 13px;
  font-weight: 700;
}

.xhs-kicker span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--home-red);
  box-shadow: 13px 0 0 #66caa0, 26px 0 0 #f4cc44;
  margin-right: 25px;
}

.xhs-hero h1 {
  margin: 0;
  color: var(--home-ink);
  font-size: 64px;
  font-weight: 760;
  line-height: 1.08;
}

.xhs-hero .hero-text {
  max-width: 560px;
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.7;
}

.button.xhs-primary {
  color: #fff;
  background: var(--home-red);
}

.button.xhs-primary:hover {
  background: var(--home-red-dark);
  box-shadow: 0 12px 28px rgba(255, 77, 95, 0.22);
}

.button.xhs-ghost {
  border-color: #ded8d5;
  color: var(--home-ink);
  background: #fff;
}

.home-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  color: #8a8380;
  font-size: 12px;
}

.home-promises span::before {
  content: "✓";
  margin-right: 5px;
  color: #54ae84;
  font-weight: 800;
}

.xhs-collage {
  position: relative;
  min-height: 470px;
}

.collage-note {
  position: absolute;
  overflow: hidden;
  border: 7px solid #fff;
  border-radius: 8px;
  box-shadow: 0 24px 55px rgba(53, 46, 43, 0.15);
}

.note-history {
  left: 16px;
  top: 18px;
  z-index: 2;
  width: 270px;
  height: 390px;
  padding: 22px;
  color: #fff;
  background: #9e3c34;
  transform: rotate(-4deg);
}

.collage-portrait,
.cover-person,
.figure-portrait,
.runner-up-portrait {
  background-image: var(--portrait-image, url("./history-portraits.jpg"));
  background-repeat: no-repeat;
  background-size: 400% 300%;
  background-position: var(--portrait-x, 0%) var(--portrait-y, 0%);
}

.collage-portrait {
  height: 238px;
  margin: -22px -22px 18px;
  background-position: 0 0;
}

.note-history strong,
.note-city strong {
  display: block;
  font-size: 24px;
  line-height: 1.25;
}

.note-history span,
.note-city small {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.note-city {
  right: 6px;
  bottom: 18px;
  width: 270px;
  height: 300px;
  padding: 24px;
  color: #243f38;
  background: var(--home-mint);
  transform: rotate(5deg);
}

.note-city .tiny-label {
  font-size: 12px;
  font-weight: 700;
}

.city-sun {
  width: 112px;
  height: 112px;
  margin: 28px 0 22px;
  border: 18px solid #fff7cb;
  border-radius: 50%;
  background: #ff7d70;
  box-shadow: 88px -24px 0 -38px #5cb98e;
}

.note-city small {
  color: #628078;
}

.collage-sticker {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.sticker-one {
  right: 28px;
  top: 24px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #6b5712;
  background: var(--home-yellow);
  transform: rotate(11deg);
}

.sticker-two {
  left: 236px;
  top: 310px;
  width: 84px;
  height: 64px;
  border: 2px solid #222;
  border-radius: 50%;
  background: #fff;
  transform: rotate(-8deg);
}

.xhs-home .section {
  padding-top: 48px;
}

.xhs-home .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.xhs-home .section-heading h2 {
  margin: 0;
  font-size: 42px;
}

.category-chips {
  display: flex;
  gap: 8px;
}

.category-chips span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #77706d;
  background: #f3f1ef;
  font-size: 12px;
  font-weight: 600;
}

.category-chips .active {
  color: #fff;
  background: var(--home-ink);
}

.xhs-test-grid {
  align-items: start;
  gap: 20px;
}

.xhs-test-card {
  padding: 10px 10px 22px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(54, 46, 42, 0.08);
}

.test-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: 22px;
  border-radius: 6px;
  text-decoration: none;
}

.test-cover strong {
  position: absolute;
  left: 22px;
  bottom: 50px;
  z-index: 2;
  font-size: 29px;
  line-height: 1.2;
}

.test-cover small {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  font-size: 11px;
}

.cover-badge {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 3;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.history-test-cover {
  color: #fff;
  background: #273b36;
}

.history-test-cover::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(20, 34, 30, 0.95));
}

.history-test-cover .cover-badge {
  color: #273b36;
  background: #fff3ba;
}

.cover-person {
  position: absolute;
  inset: 0;
  background-position: 0 0;
  transform: scale(1.04);
}

.history-test-cover small {
  color: rgba(255, 255, 255, 0.72);
}

.city-test-cover {
  color: #213933;
  background: #dff5ea;
}

.city-test-cover .cover-badge {
  color: #fff;
  background: #ff6473;
}

.city-cover-orbit {
  position: absolute;
  right: -25px;
  top: 54px;
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  border: 35px solid #fff7c8;
  border-radius: 50%;
  color: #fff;
  background: #ff796e;
  box-shadow: -120px 12px 0 -77px #55b68c;
}

.city-cover-orbit b {
  font-size: 68px;
}

.city-test-cover small {
  color: #66847c;
}

.cp-test-cover {
  color: #573b5e;
  background: #f3e2f5;
}

.cp-test-cover .cover-badge {
  color: #745b25;
  background: #fff1ad;
}

.cp-symbol {
  position: absolute;
  right: 30px;
  top: 76px;
  width: 180px;
  height: 160px;
}

.cp-symbol i {
  position: absolute;
  width: 110px;
  height: 110px;
  border: 24px solid #fff;
  border-radius: 50%;
}

.cp-symbol i:last-child {
  right: 0;
  bottom: 0;
  border-color: #ff8391;
}

.cp-test-cover small {
  color: #987c9d;
}

.xhs-test-card .test-card-top {
  padding: 16px 10px 0;
}

.xhs-test-card .test-number {
  font-size: 28px;
}

.xhs-test-card h3,
.xhs-test-card p,
.xhs-test-card .card-link {
  margin-left: 10px;
  margin-right: 10px;
}

.xhs-test-card h3 {
  margin-top: 20px;
  font-size: 21px;
}

.xhs-test-card p {
  min-height: 50px;
  line-height: 1.65;
}

.xhs-test-card .card-link span {
  display: inline-block;
  transition: transform 0.18s ease;
}

.xhs-test-card:hover .card-link span {
  transform: translateX(3px);
}

.coming-test {
  opacity: 0.76;
}

.more-tests-note {
  margin: 30px 0 0;
  color: #9a9290;
  font-size: 13px;
  text-align: center;
}

/* Portrait-led history result */
.history-result-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  margin-top: 30px;
}

.figure-portrait {
  position: relative;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 4px;
  box-shadow: 12px 14px 0 #e7dccb;
}

.portrait-seal {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid #f6e8dc;
  color: #fff8ef;
  background: var(--history-red);
  box-shadow: inset 0 0 0 4px var(--history-red), inset 0 0 0 5px #f6e8dc;
}

.figure-portrait .portrait-seal,
.runner-up-portrait .portrait-seal {
  display: none !important;
}

.portrait-seal span {
  font-family: "Songti SC", serif;
  font-size: 34px;
  font-weight: 700;
}

.history-result-content .figure-heading h1 {
  font-size: 88px;
}

.history-result-content .trait-tags {
  margin-top: 24px;
}

.history-result-content .figure-verdict {
  margin-top: 24px;
  font-size: 27px;
}

.history-result-insights {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--history-line);
}

.result-identity-line {
  padding: 18px;
  border-left: 3px solid var(--history-red);
  background: #f1e8da;
}

.result-identity-line span {
  display: block;
  color: var(--history-muted);
  font-size: 12px;
}

.result-identity-line strong {
  display: block;
  margin-top: 7px;
  font-family: "Songti SC", serif;
  font-size: 34px;
}

.history-result-insights .radar-wrap {
  width: 100%;
  margin: 0;
}

.history-result-insights #radar-chart {
  height: 330px;
}

.runner-up {
  position: relative;
  min-height: 116px;
  padding-left: 136px;
}

.runner-up-portrait {
  position: absolute;
  left: 0;
  top: 0;
  width: 108px;
  height: 108px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .xhs-hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .xhs-collage {
    width: min(500px, 100%);
    margin: 0 auto;
  }

  .history-result-layout {
    grid-template-columns: 290px minmax(0, 1fr);
  }

  .figure-portrait {
    min-height: 0;
  }

  .history-result-content .figure-heading h1 {
    font-size: 66px;
  }
}

@media (max-width: 620px) {
  .xhs-home .site-header {
    width: calc(100% - 28px);
    padding: 13px 0;
  }

  .xhs-hero {
    width: calc(100% - 32px);
    gap: 30px;
    min-height: auto;
    padding: 34px 0 52px;
  }

  .xhs-hero h1 {
    font-size: 44px;
  }

  .xhs-hero .hero-text {
    font-size: 16px;
  }

  .home-promises {
    gap: 10px 14px;
  }

  .xhs-collage {
    min-height: 350px;
  }

  .note-history {
    left: 2px;
    width: 210px;
    height: 310px;
    padding: 17px;
  }

  .collage-portrait {
    height: 185px;
    margin: -17px -17px 14px;
  }

  .note-history strong,
  .note-city strong {
    font-size: 19px;
  }

  .note-city {
    right: 0;
    width: 192px;
    height: 236px;
    padding: 18px;
  }

  .city-sun {
    width: 76px;
    height: 76px;
    margin: 20px 0 16px;
    border-width: 12px;
  }

  .sticker-one {
    right: 12px;
    width: 58px;
    height: 58px;
  }

  .sticker-two {
    left: 174px;
    top: 250px;
    width: 70px;
    height: 54px;
    font-size: 10px;
  }

  .xhs-home .section {
    width: calc(100% - 28px);
    padding-top: 28px;
  }

  .xhs-home .section-heading {
    display: block;
  }

  .xhs-home .section-heading h2 {
    font-size: 34px;
  }

  .category-chips {
    margin-top: 18px;
    overflow-x: auto;
  }

  .xhs-test-card {
    min-height: auto;
  }

  .test-cover {
    aspect-ratio: 1 / 1.08;
  }

  .xhs-test-card p {
    min-height: 0;
  }

  .history-result-layout {
    display: block;
    margin-top: 22px;
  }

  .figure-portrait {
    min-height: 0;
    margin-bottom: 30px;
    box-shadow: 8px 9px 0 #e7dccb;
  }

  .history-result-content .figure-heading h1 {
    font-size: 54px;
  }

  .history-result-content .figure-verdict {
    font-size: 21px;
  }

  .history-result-insights {
    display: block;
  }

  .result-identity-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .result-identity-line strong {
    margin: 0;
    font-size: 28px;
  }

  .history-result-insights #radar-chart {
    height: 275px;
  }

  .runner-up {
    min-height: 92px;
    padding-left: 106px;
  }

  .runner-up-portrait {
    width: 82px;
    height: 82px;
  }
}

@media (max-width: 380px) {
  .question-card h2 {
    font-size: 20px;
  }

  .option {
    min-height: 44px;
    padding: 7px 9px;
  }

  .option-text {
    font-size: 13px;
    line-height: 1.28;
  }

  .option-letter {
    width: 28px;
    height: 28px;
  }
}

/* History persona test */
.history-body {
  --history-paper: #f4f0e8;
  --history-ink: #211d18;
  --history-muted: #75685c;
  --history-line: #d7cbb9;
  --history-red: #9d382d;
  --history-red-dark: #78271f;
  background:
    linear-gradient(rgba(112, 89, 61, 0.035) 1px, transparent 1px),
    var(--history-paper);
  background-size: 100% 28px;
  color: var(--history-ink);
}

.history-body .site-header {
  background: rgba(244, 240, 232, 0.88);
  border-color: rgba(83, 65, 45, 0.12);
}

.history-shell {
  width: min(1040px, calc(100% - 32px));
}

.history-body .quiz-panel,
.history-body .question-card,
.history-body .report-block {
  border-color: var(--history-line);
  background: rgba(251, 248, 241, 0.94);
  box-shadow: 0 18px 42px rgba(74, 55, 35, 0.07);
}

.history-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
  min-height: 600px;
  overflow: hidden;
}

.history-intro::before {
  content: "史";
  position: absolute;
  right: -36px;
  top: -100px;
  color: rgba(89, 66, 43, 0.035);
  font-family: "Songti SC", "STSong", serif;
  font-size: 520px;
  line-height: 1;
  pointer-events: none;
}

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

.history-kicker,
.report-index {
  margin: 0 0 16px;
  color: var(--history-red);
  font-size: 13px;
  font-weight: 700;
}

.history-kicker {
  letter-spacing: 0.16em;
}

.history-intro h1 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 72px;
  font-weight: 700;
  line-height: 1.08;
}

.history-intro .hero-text {
  max-width: 560px;
  color: var(--history-muted);
  font-size: 18px;
}

.history-body .intro-meta span {
  border: 1px solid rgba(112, 89, 61, 0.14);
  background: rgba(255, 255, 255, 0.4);
  color: var(--history-muted);
}

.button.history-primary {
  margin-top: 30px;
  color: #fffaf1;
  background: var(--history-red);
}

.button.history-primary:hover {
  background: var(--history-red-dark);
  box-shadow: 0 12px 24px rgba(157, 56, 45, 0.2);
}

.history-cover {
  position: relative;
  z-index: 1;
  min-height: 430px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbbda7;
  border-radius: 6px;
  background: #263a35;
  box-shadow: 18px 22px 0 #dfd5c4, 0 34px 60px rgba(44, 40, 30, 0.18);
}

.history-cover::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 250, 241, 0.42);
  pointer-events: none;
}

.history-cover img {
  width: 100%;
  height: 430px;
  display: block;
  object-fit: cover;
}

.history-cover-caption {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  color: #fffaf1;
  background: rgba(27, 35, 32, 0.88);
  backdrop-filter: blur(8px);
}

.history-cover-caption span {
  color: rgba(255, 250, 241, 0.7);
  font-size: 12px;
}

.history-cover-caption strong {
  font-family: "Songti SC", serif;
  font-size: 24px;
  line-height: 1.2;
}

.history-body .progress-fill {
  background: var(--history-red);
}

.history-body .progress-label,
.history-body .question-count {
  color: var(--history-muted);
}

.history-question-card {
  position: relative;
  overflow: hidden;
}

.history-question-card::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(157, 56, 45, 0.12);
  border-radius: 50%;
}

.history-question-card h2 {
  max-width: 760px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 32px;
  line-height: 1.38;
}

.history-option {
  position: relative;
  z-index: 1;
  background: rgba(255, 253, 248, 0.72);
  border-color: rgba(112, 89, 61, 0.16);
}

.history-option:hover,
.history-option.selected {
  border-color: rgba(157, 56, 45, 0.58);
  box-shadow: 0 9px 22px rgba(104, 63, 42, 0.08);
}

.history-option .option-letter {
  color: var(--history-red);
  background: #eee4d5;
  font-family: "Songti SC", serif;
}

.history-option.selected .option-letter {
  color: #fff8ef;
  background: var(--history-red);
}

.history-result-panel {
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.history-result-card {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border: 1px solid var(--history-line);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(104, 80, 52, 0.04) 50%, transparent 50.2%),
    #faf6ed;
  box-shadow: 0 24px 56px rgba(74, 55, 35, 0.1);
}

.history-result-card::after {
  content: "";
  position: absolute;
  right: -100px;
  top: 70px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(157, 56, 45, 0.08);
  border-radius: 50%;
}

.history-card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--history-muted);
  font-size: 13px;
}

.history-card-topline span:last-child {
  color: var(--history-red);
  font-weight: 700;
}

.history-result-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 34px;
}

.figure-stamp {
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border: 2px solid var(--history-red);
  color: #fff8ef;
  background: var(--history-red);
  box-shadow: inset 0 0 0 7px #f3ded0, inset 0 0 0 9px var(--history-red);
}

.figure-stamp span {
  font-family: "Songti SC", serif;
  font-size: 72px;
  font-weight: 700;
}

.figure-heading p {
  margin: 0;
  color: var(--history-muted);
  font-size: 15px;
}

.figure-heading h1 {
  margin: 4px 0 8px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 82px;
  line-height: 1;
}

.figure-heading #figure-title {
  color: var(--history-red);
  font-size: 20px;
  font-weight: 700;
}

.trait-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trait-tags span {
  min-width: 82px;
  padding: 8px 14px;
  border: 1px solid #d7c9b3;
  border-radius: 999px;
  color: #574a3e;
  background: #eee5d6;
  font-size: 14px;
  text-align: center;
}

.figure-verdict {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 30px 0 0;
  color: var(--history-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.55;
}

.radar-wrap {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 12px auto 0;
}

#radar-chart {
  display: block;
  width: 100%;
  height: 380px;
}

.history-card-foot {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--history-line);
  color: var(--history-muted);
  font-size: 13px;
  text-align: center;
}

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

.history-report-grid .report-block {
  padding: 28px;
}

.history-report-lead,
.history-report-grid .wide {
  grid-column: 1 / -1;
}

.history-report-grid h2 {
  font-family: "Songti SC", serif;
  font-size: 25px;
  line-height: 1.35;
}

.history-report-grid h2 span {
  color: var(--history-red);
}

.history-report-grid .report-block > p:last-child {
  margin-bottom: 0;
  color: var(--history-muted);
  line-height: 1.88;
}

.history-advice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: advice;
}

.history-advice-list li {
  min-height: 138px;
  padding: 18px;
  border-left: 3px solid var(--history-red);
  background: #f1e9dc;
  color: #5e5044;
  font-size: 14px;
  line-height: 1.72;
  counter-increment: advice;
}

.history-advice-list li::before {
  content: "0" counter(advice);
  display: block;
  margin-bottom: 12px;
  color: var(--history-red);
  font-weight: 700;
}

.runner-up {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.runner-up div span {
  display: block;
  color: var(--history-muted);
  font-size: 13px;
}

.runner-up strong {
  display: block;
  margin-top: 4px;
  font-family: "Songti SC", serif;
  font-size: 36px;
}

.runner-up p {
  max-width: 540px;
  margin: 0;
  color: var(--history-muted);
}

@media (max-width: 760px) {
  .history-intro,
  .history-report-grid {
    grid-template-columns: 1fr;
  }

  .history-intro {
    gap: 36px;
    min-height: auto;
  }

  .history-intro h1 {
    font-size: 52px;
  }

  .history-cover {
    min-height: 340px;
  }

  .history-report-lead,
  .history-report-grid .wide {
    grid-column: auto;
  }

  .history-advice-list {
    grid-template-columns: 1fr;
  }

  .history-advice-list li {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .history-shell {
    padding-top: 8px;
  }

  .history-intro {
    padding: 22px 18px 24px;
  }

  .history-intro::before {
    display: none;
  }

  .history-kicker {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .history-intro h1 {
    font-size: 44px;
  }

  .history-intro .hero-text {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.65;
  }

  .history-intro .button {
    margin-top: 22px;
  }

  .history-cover {
    min-height: 280px;
    box-shadow: 8px 10px 0 #dfd5c4;
  }

  .history-cover img {
    height: 300px;
  }

  .history-cover-caption {
    right: 14px;
    bottom: 14px;
    left: 14px;
    padding: 14px;
  }

  .history-cover-caption strong {
    font-size: 20px;
  }

  .history-question-card {
    padding: 14px;
  }

  .history-question-card h2 {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.35;
  }

  .history-option {
    min-height: 58px;
    padding: 9px 10px;
  }

  .history-option .option-text {
    font-size: 13px;
    line-height: 1.38;
  }

  .history-result-card {
    padding: 20px 16px;
  }

  .history-result-hero {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    margin-top: 24px;
  }

  .figure-stamp {
    width: 76px;
    height: 76px;
    box-shadow: inset 0 0 0 4px #f3ded0, inset 0 0 0 6px var(--history-red);
  }

  .figure-stamp span {
    font-size: 42px;
  }

  .figure-heading p {
    font-size: 12px;
  }

  .figure-heading h1 {
    margin: 3px 0 5px;
    font-size: 48px;
  }

  .figure-heading #figure-title {
    font-size: 15px;
  }

  .trait-tags {
    gap: 7px;
    margin-top: 20px;
  }

  .trait-tags span {
    min-width: 68px;
    padding: 6px 11px;
    font-size: 12px;
  }

  .figure-verdict {
    margin-top: 20px;
    font-size: 21px;
  }

  #radar-chart {
    height: 270px;
  }

  .history-report-grid .report-block {
    padding: 20px;
  }

  .history-report-grid h2 {
    font-size: 22px;
  }

  .runner-up {
    display: block;
  }

  .runner-up p {
    margin-top: 12px;
  }
}

/* Final overrides for the unified group cover and mobile result reading order. */
.history-intro .history-cover {
  padding: 0;
  background: #d7c5aa;
}

.history-intro .history-cover img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  object-position: center 32%;
}

.history-intro .history-cover-caption {
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 54px 18px 18px;
  background: linear-gradient(to bottom, transparent, rgba(27,31,29,.8));
  backdrop-filter: none;
}

.history-intro .history-cover::after {
  display: none;
}

.history-intro .history-cover img {
  border-radius: 5px;
}

.history-question-card + .quiz-actions {
  grid-template-columns: 1fr;
  justify-content: center;
}

.history-question-card + .quiz-actions #prev-btn {
  width: max-content;
  min-width: 112px;
  margin-right: auto;
  margin-left: auto;
  justify-self: center;
}

@media (max-width: 760px) {
  .result-overview-head {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px 20px 24px;
  }

  .overview-portrait-wrap {
    width: 178px;
    margin: 0 auto;
  }

  .overview-identity {
    text-align: center;
  }

  .overview-identity h1 {
    font-size: 48px;
  }

  .overview-traits {
    justify-content: center;
  }

  .overview-identity blockquote {
    padding: 16px 8px 0 28px;
    font-size: 18px;
    text-align: left;
  }

  .history-intro .history-cover img {
    height: 310px;
    object-position: center 28%;
  }

  .history-intro .history-cover-caption {
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 42px 12px 12px;
  }
}

/* The on-page result uses the same 3:4 composition as the saved image. */
.result-overview-stage {
  width: min(680px, 100%);
}

.result-overview-card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  aspect-ratio: 3 / 4;
  padding: 5.5cqw;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
}

.overview-card-title {
  align-items: baseline;
  gap: 3cqw;
  padding: 0;
}

.overview-card-title h1 {
  max-width: none;
  font-size: 5.4cqw;
  line-height: 1.15;
  white-space: nowrap;
}

.overview-card-title .overview-match {
  display: flex;
  gap: 1cqw;
}

.overview-card-title .overview-match span {
  display: inline;
  font-size: 2.2cqw;
}

.overview-card-title .overview-match strong {
  font-size: 3.4cqw;
}

.result-overview-head {
  grid-template-columns: 42cqw minmax(0, 1fr);
  gap: 6cqw;
  align-items: center;
  padding: 5.5cqw 0 0;
}

.overview-portrait-wrap {
  width: 100%;
  margin: 0;
}

.result-overview-card .overview-portrait {
  width: 100%;
  box-shadow: none;
}

.overview-identity {
  text-align: left;
}

.overview-identity h1 {
  margin: 0 0 1cqw;
  font-size: 7.2cqw;
}

.overview-identity > p {
  font-size: 3.2cqw;
}

.overview-traits {
  justify-content: flex-start;
  gap: 1cqw;
  margin-top: 4cqw;
}

.overview-traits span {
  min-width: 10cqw;
  padding: 1.1cqw 1.6cqw;
  font-size: 2.4cqw;
}

.overview-identity blockquote {
  margin-top: 2.5cqw;
  padding: 2.5cqw 0 0;
  border-top: 0;
  font-size: 3.4cqw;
  line-height: 1.5;
  text-align: left;
}

.overview-identity blockquote::before {
  display: none;
}

.result-overview-body {
  flex: 1;
  grid-template-columns: 56% 44%;
  align-items: center;
  margin-top: 7cqw;
  border-top: 0;
}

.overview-radar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 3cqw 0 0;
  border: 0;
}

.overview-section-title span,
.overview-note > span {
  font-size: 2.4cqw;
}

.overview-section-title strong {
  display: none;
}

#summary-radar-chart {
  height: 52cqw;
  margin-top: 2cqw;
}

.overview-note {
  display: block;
  padding: 0 0 0 4cqw;
  background: transparent;
}

.overview-note h2 {
  margin: 2.2cqw 0 4.2cqw;
  font-size: 4.8cqw;
  line-height: 1.35;
}

.overview-note p {
  font-size: 2.75cqw;
  line-height: 1.85;
}

.result-card-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 0;
  background: #f4f0e8;
  box-shadow: none;
}

.result-overview-stage .summary-primary-actions {
  margin: 18px auto 0;
}

/* History report v5: mobile-first, short-form reading cards below the share result. */
.result-overview-stage .summary-primary-actions {
  grid-template-columns: 1fr;
  width: 100%;
}

.history-analysis {
  width: min(680px, 100%);
  margin: 52px auto 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.history-analysis-heading {
  padding: 34px 34px 32px;
  border: 1px solid #eadfda;
  border-radius: 8px;
  background: #fffdfb;
}

.history-analysis-heading h2 {
  max-width: 620px;
  margin: 8px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 34px;
  line-height: 1.35;
}

.history-analysis-heading h2 span,
.history-analysis-grid h3 span {
  color: var(--history-red);
}

.history-analysis-heading h2 span {
  display: inline-block;
  white-space: nowrap;
}

.history-analysis-eyebrow {
  margin: 0;
  color: #bf5148;
  font-size: 13px;
  font-weight: 700;
}

.history-analysis-verdict {
  max-width: 620px;
  margin: 16px 0 0;
  color: #5f5751;
  font-size: 16px;
  line-height: 1.85;
}

.history-analysis-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.history-analysis-traits span {
  padding: 7px 13px;
  border-radius: 999px;
  color: #73524d;
  background: #ffe8e5;
  font-size: 13px;
  font-weight: 700;
}

.history-analysis-traits span:nth-child(2) {
  color: #3d6760;
  background: #e5f4ef;
}

.history-analysis-traits span:nth-child(3) {
  color: #745d2c;
  background: #fff0c9;
}

.history-analysis-reason {
  max-width: 620px;
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid #eee4df;
  color: #5e5752;
  font-size: 15px;
  line-height: 1.9;
}

.history-analysis-section {
  --section-accent: #d85f54;
  min-width: 0;
  padding: 27px 28px 30px;
  border: 1px solid #ece4df;
  border-top: 3px solid var(--section-accent);
  border-radius: 8px;
  background: #fff;
}

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

.history-analysis-grid .history-analysis-section:nth-child(3n + 2) {
  --section-accent: #5b9b8f;
}

.history-analysis-grid .history-analysis-section:nth-child(3n) {
  --section-accent: #d39a37;
}

.history-analysis-grid .wide {
  grid-column: 1 / -1;
}

.history-analysis-grid .report-index {
  margin: 0 0 14px;
  color: #26201d;
  font-family: "Songti SC", "STSong", serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.32;
}

.history-analysis-section h3 {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.65;
}

.history-analysis-section .history-highlight-positive {
  color: #c8453c;
}

.history-analysis-section .history-highlight-positive::first-letter {
  font-size: 1.12em;
  font-weight: 800;
}

.history-analysis-section > p:last-child,
.history-analysis-section .expanded-radar-layout p {
  margin: 14px 0 0;
  color: #5e5752;
  font-size: 15px;
  line-height: 1.9;
}

.history-analysis .radar-report-block {
  padding-bottom: 24px;
}

.history-analysis .radar-report-block .radar-wrap {
  width: min(560px, 100%);
  max-width: none;
  margin: 0 auto;
}

.history-analysis .history-advice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  border: 0;
}

.history-analysis .history-advice-list li {
  position: relative;
  min-height: 0;
  padding: 18px 17px 18px 40px;
  border: 1px solid #eadfd9;
  border-radius: 8px;
  background: #fffaf8;
  font-size: 14px;
  line-height: 1.75;
}

.history-analysis .history-advice-list li::before {
  position: absolute;
  top: 18px;
  left: 16px;
  margin: 0;
}

.history-analysis .history-advice-list li + li {
  border: 1px solid #eadfd9;
}

.history-result-actions {
  grid-template-columns: 1fr;
  width: min(320px, 100%);
  margin-top: 20px;
}

@media (max-width: 760px) {
  .history-analysis {
    margin-top: 34px;
  }

  .history-analysis-heading {
    padding: 28px 24px 26px;
  }

  .history-analysis-heading h2 {
    font-size: 30px;
  }

  .history-analysis-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .history-analysis-grid .wide {
    grid-column: auto;
  }

  .history-analysis-section {
    padding: 25px 24px 27px;
  }

  .history-analysis-grid .report-index {
    margin-bottom: 12px;
    font-size: 25px;
  }

  .history-analysis-section h3 {
    font-size: 18px;
  }

  .history-analysis-reason {
    margin-top: 22px;
    padding-top: 20px;
  }

  .history-analysis .history-advice-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .history-analysis .history-advice-list li + li {
    border: 1px solid #eadfd9;
  }
}

@media (max-width: 520px) {
  .history-result-panel {
    width: 100%;
  }

  .history-analysis-heading h2 {
    font-size: 28px;
  }

  .history-analysis-section > p:last-child,
  .history-analysis-section .expanded-radar-layout p,
  .history-analysis-reason {
    font-size: 16px;
    line-height: 1.82;
  }

  .history-analysis #radar-chart {
    height: 286px;
  }

  .history-result-actions {
    grid-template-columns: 1fr;
  }
}

/* City match v2 */
.city-body {
  --city-blue: #4d9fd1;
  --city-green: #36675c;
  --city-coral: #df705f;
  --city-yellow: #f1ca62;
  background: #f4f8f5;
}

.city-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
  min-height: 600px;
  overflow: hidden;
  border-color: #dce5df;
  background: #fbfdfb;
}

.city-intro-copy h1 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 68px;
  line-height: 1.08;
}

.city-kicker {
  margin: 0 0 16px;
  color: var(--city-coral);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
}

.city-body .intro-meta span {
  border: 1px solid #d9e4de;
  color: #617069;
  background: #f8fbf8;
}

.button.city-primary {
  margin-top: 28px;
  color: #fff;
  background: var(--city-green);
}

.button.city-primary:hover { background: #284e46; }

.city-intro-cover {
  height: 430px;
  overflow: hidden;
  border: 1px solid #cfdbd3;
  border-radius: 6px;
  box-shadow: 16px 18px 0 #dce6df;
}

.city-intro-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.city-body .progress-fill { background: var(--city-coral); }
.city-option .option-letter { color: var(--city-green); background: #e8f0eb; }
.city-option.selected { border-color: rgba(54,103,92,.42); background: #f5faf7; }
.city-option.selected .option-letter { color: #fff; background: var(--city-green); }

.city-body #question-screen .quiz-actions {
  justify-content: center;
  grid-template-columns: 1fr;
}

.city-body #question-screen #prev-btn {
  width: max-content;
  min-width: 112px;
  margin-right: auto;
  margin-left: auto;
  justify-self: center;
}

.city-result-panel {
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.city-result-stage {
  width: min(680px, 100%);
  margin: 0 auto;
}

.city-primary-actions {
  grid-template-columns: 1fr;
  width: min(560px, 100%);
  margin: 18px auto 0;
}

.city-primary-actions .button,
.city-primary-actions .button.city-primary {
  width: 100%;
  min-height: 52px;
  margin: 0;
  border-radius: 6px;
}

.city-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(560px, 100%);
  margin: 22px auto 0;
}

.city-result-actions .button,
.city-result-actions .button.city-primary { width: 100%; margin: 0; }

.city-analysis {
  width: min(900px, 100%);
  margin: 52px auto 0;
  overflow: hidden;
  border: 1px solid #cedbd3;
  border-radius: 2px;
  background: #fbfdfb;
  box-shadow: none;
}

.city-analysis-heading {
  padding: 48px 52px 42px;
  border-bottom: 1px solid #d9e4de;
}

.city-analysis-kicker,
.city-analysis-index {
  margin: 0 0 14px;
  color: var(--city-coral);
  font-size: 12px;
  font-weight: 700;
}

.city-analysis-heading h2 {
  max-width: 760px;
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 40px;
  line-height: 1.35;
}

.city-analysis-heading h2 span {
  color: var(--city-green);
}

.city-analysis-heading > p:last-child {
  max-width: 740px;
  margin: 20px 0 0;
  color: #64736b;
  font-size: 16px;
  line-height: 1.9;
}

.city-analysis-section {
  min-width: 0;
  padding: 34px 38px 38px;
  border-top: 1px solid #d9e4de;
}

.city-analysis > .city-analysis-section:first-of-type {
  border-top: 0;
}

.city-analysis-section h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  line-height: 1.45;
}

.city-analysis-section > p:last-child,
.city-analysis-section > div > p:last-child {
  margin: 15px 0 0;
  color: #64736b;
  font-size: 15px;
  line-height: 1.95;
}

.city-dimensions-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(360px, 1.2fr);
  gap: 42px;
  align-items: center;
  padding-top: 42px;
  padding-bottom: 42px;
}

.city-dimensions-section .dimension-chart {
  gap: 16px;
}

.city-dimensions-section .dimension-row {
  grid-template-columns: 86px minmax(0, 1fr) 34px;
}

.city-analysis .dimension-track {
  height: 9px;
  border-radius: 0;
  background: #e4ece7;
}

.city-analysis .dimension-bar {
  border-radius: 0;
  background: var(--city-green);
}

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

.city-analysis-grid .wide {
  grid-column: 1 / -1;
}

.city-analysis-grid > .city-analysis-section:nth-child(even):not(.wide) {
  border-left: 1px solid #d9e4de;
}

.city-day-section {
  background: #f1f6f2;
}

.city-neighborhoods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid #d9e4de;
  border-bottom: 1px solid #d9e4de;
}

.city-neighborhood {
  padding: 22px 24px;
}

.city-neighborhood + .city-neighborhood {
  border-left: 1px solid #d9e4de;
}

.city-neighborhood strong {
  color: var(--city-green);
  font-family: "Songti SC", serif;
  font-size: 19px;
}

.city-neighborhood p {
  margin: 10px 0 0;
  color: #64736b;
  font-size: 14px;
  line-height: 1.8;
}

.city-analysis .suggestion-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 24px;
  padding: 0;
  border-top: 1px solid #d9e4de;
  border-bottom: 1px solid #d9e4de;
  list-style: none;
  counter-reset: city-advice;
}

.city-analysis .suggestion-list li {
  padding: 22px 24px;
  color: #64736b;
  font-size: 14px;
  line-height: 1.8;
  counter-increment: city-advice;
}

.city-analysis .suggestion-list li + li {
  border-left: 1px solid #d9e4de;
}

.city-analysis .suggestion-list li::before {
  content: "0" counter(city-advice);
  display: block;
  margin-bottom: 12px;
  color: var(--city-coral);
  font-weight: 700;
}

.city-analysis .alt-cities {
  margin-top: 24px;
}

.city-analysis .alt-card {
  border-color: #d9e4de;
  border-radius: 2px;
  background: #f5f8f5;
}

.city-analysis .alt-card strong {
  color: var(--city-green);
  font-family: "Songti SC", serif;
}

@media (max-width: 760px) {
  .city-intro { grid-template-columns: 1fr; gap: 30px; min-height: auto; padding: 22px 18px 24px; }
  .city-intro-copy h1 { font-size: 46px; }
  .city-intro-copy .hero-text { margin-top: 16px; font-size: 15px; }
  .city-intro-cover { height: 300px; box-shadow: 8px 10px 0 #dce6df; }
  .city-body #question-screen { padding: 14px; }
  .city-body #question-screen .question-card { padding: 14px; }
  .city-body #question-screen .question-card h2 { margin-bottom: 12px; font-size: 20px; line-height: 1.35; }
  .city-option { min-height: 52px; padding: 8px 10px; }
  .city-option .option-text { font-size: 13px; line-height: 1.35; }
  .city-primary-actions { grid-template-columns: 1fr; gap: 12px; }
  .city-analysis { margin-top: 34px; }
  .city-analysis-heading { padding: 30px 22px 28px; }
  .city-analysis-heading h2 { font-size: 29px; }
  .city-analysis-heading > p:last-child { font-size: 15px; line-height: 1.85; }
  .city-dimensions-section { grid-template-columns: 1fr; gap: 24px; }
  .city-analysis-grid { grid-template-columns: 1fr; }
  .city-analysis-grid .wide { grid-column: auto; }
  .city-analysis-grid > .city-analysis-section:nth-child(even):not(.wide) { border-left: 0; }
  .city-analysis-section { padding: 28px 22px 30px; }
  .city-analysis-section h3 { font-size: 23px; }
  .city-neighborhoods { grid-template-columns: 1fr; }
  .city-neighborhood + .city-neighborhood { border-top: 1px solid #d9e4de; border-left: 0; }
  .city-analysis .suggestion-list { grid-template-columns: 1fr; }
  .city-analysis .suggestion-list li + li { border-top: 1px solid #d9e4de; border-left: 0; }
}

@media (max-width: 380px) {
  .city-primary-actions { grid-template-columns: 1fr; }
}

/* CP match */
.cp-body {
  --cp-pink: #ed7184;
  --cp-mint: #58aa93;
  --cp-yellow: #f2c65c;
  background: #fff8f5;
}

.cp-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
  min-height: 600px;
  overflow: hidden;
  border-color: #efdcd6;
  background: #fffcfa;
}

.cp-intro-copy h1 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 68px;
  line-height: 1.08;
}

.cp-kicker,.cp-detail-label { margin: 0 0 14px; color: var(--cp-pink); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.cp-name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 480px; margin-top: 22px; }
.cp-name-fields input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #ead8d2; border-radius: 5px; outline: none; background: #fff; }
.cp-name-fields input:focus { border-color: var(--cp-pink); box-shadow: 0 0 0 3px rgba(237,113,132,.12); }
.button.cp-primary { margin-top: 28px; color: #fff; background: #d95f73; }
.button.cp-primary:hover { background: #c94e64; }
.cp-intro-cover { height: 430px; overflow: hidden; border: 1px solid #ead8d2; border-radius: 6px; box-shadow: 16px 18px 0 #f1ded8; }
.cp-intro-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cp-body .progress-fill { background: var(--cp-pink); }
.cp-option .option-letter { color: #c9576a; background: #f8e4e7; }
.cp-option.selected { border-color: rgba(217,95,115,.42); background: #fff8f8; }
.cp-option.selected .option-letter { color: #fff; background: #d95f73; }
.cp-question-card + .quiz-actions { justify-content: center; grid-template-columns: 1fr; }
.cp-question-card + .quiz-actions #prev-btn { width: max-content; min-width: 112px; margin-right: auto; margin-left: auto; justify-self: center; }

.cp-invite-screen { max-width: 760px; min-height: 500px; margin: 0 auto; text-align: center; }
.invite-step { color: var(--cp-pink); font-size: 12px; font-weight: 700; }
.cp-invite-screen h1 { margin: 20px 0 14px; font-family: "Songti SC", serif; font-size: 52px; }
.cp-invite-screen > p { max-width: 520px; margin: 0 auto; color: #77706c; line-height: 1.8; }
.invite-link-box { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; margin-top: 36px; }
.invite-link-box input { min-width: 0; height: 50px; padding: 0 14px; border: 1px solid #ead8d2; border-radius: 5px; background: #fff; }
.invite-link-box .button { min-height: 50px; margin: 0; }
.handoff-button { margin-top: 14px; }

.cp-result-panel { padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.cp-result-stage { width: min(680px, 100%); margin: 0 auto; }
.cp-primary-actions { width: min(560px,100%); margin: 18px auto 0; }
.cp-primary-actions .button,.cp-primary-actions .button.cp-primary { width: 100%; min-height: 52px; margin: 0; }
.cp-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.cp-detail-grid .wide { grid-column: 1/-1; }
.cp-advice-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: cp-advice; }
.cp-advice-list li { min-height: 120px; padding: 18px; border: 1px solid #ead8d2; background: #fffaf8; line-height: 1.7; counter-increment: cp-advice; }
.cp-advice-list li::before { content: "0" counter(cp-advice); display: block; margin-bottom: 12px; color: var(--cp-pink); font-size: 12px; font-weight: 700; }
.cp-result-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: min(560px,100%); margin: 22px auto 0; }
.cp-result-actions .button,.cp-result-actions .button.cp-primary { width: 100%; margin: 0; }

/* Real-image covers on the discovery page. */
.city-test-cover {
  background: linear-gradient(to top, rgba(24,52,47,.82), rgba(24,52,47,0) 62%), url("./city-cover-v2.jpg") center 62% / cover;
}
.city-test-cover .city-cover-orbit { display: none; }
.city-test-cover strong,.city-test-cover small { position: absolute; z-index: 1; color: #fff; }
.cp-test-cover {
  background: linear-gradient(to top, rgba(48,34,35,.82), rgba(48,34,35,0) 62%), url("./cp-cover-v1.jpg") center 64% / cover;
}
.cp-test-cover strong,.cp-test-cover small { position: absolute; z-index: 1; color: #fff; }
.cp-test-cover .cover-badge { color: #8d3c4a; background: #ffe4ea; }

@media (max-width: 760px) {
  .cp-intro { grid-template-columns: 1fr; gap: 30px; min-height: auto; padding: 22px 18px 24px; }
  .cp-intro-copy h1 { font-size: 46px; }
  .cp-intro-copy .hero-text { margin-top: 16px; font-size: 15px; }
  .cp-name-fields { grid-template-columns: 1fr 1fr; margin-top: 18px; }
  .cp-intro-cover { height: 300px; box-shadow: 8px 10px 0 #f1ded8; }
  .cp-body #question-screen { padding: 14px; }
  .cp-question-card { padding: 14px; }
  .cp-question-card h2 { margin-bottom: 12px; font-size: 20px; line-height: 1.35; }
  .cp-option { min-height: 56px; padding: 9px 10px; }
  .cp-option .option-text { font-size: 13px; }
  .cp-invite-screen { min-height: 460px; padding: 38px 18px; }
  .cp-invite-screen h1 { font-size: 38px; }
  .invite-link-box { grid-template-columns: 1fr; }
  .cp-primary-actions { grid-template-columns: 1fr 1fr; }
  .cp-detail-grid { grid-template-columns: 1fr; }
  .cp-detail-grid .wide { grid-column: auto; }
  .cp-advice-list { grid-template-columns: 1fr; }
  .cp-advice-list li { min-height: auto; }
}

@media (max-width: 380px) {
  .cp-name-fields,.cp-primary-actions { grid-template-columns: 1fr; }
}

/* Authorized result material preview. */
html.history-preview-requested .history-shell,
html.history-preview-requested .site-footer {
  visibility: hidden;
}

html.history-preview-requested.history-preview-authorized .history-shell {
  visibility: visible;
}

#history-preview-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #f4f0e8;
  color: #75685c;
}

#history-preview-gate span {
  width: 28px;
  height: 28px;
  border: 2px solid #d7cbb9;
  border-top-color: #9d382d;
  border-radius: 50%;
  animation: history-preview-spin .8s linear infinite;
}

#history-preview-gate p {
  margin: 0;
  font-size: 14px;
}

#history-preview-gate.is-failed span {
  display: none;
}

@keyframes history-preview-spin {
  to { transform: rotate(360deg); }
}

.history-preview-active .history-shell {
  padding-top: 18px;
}

.history-preview-active .summary-primary-actions,
.history-preview-active .history-result-actions,
.history-preview-active .site-footer {
  display: none;
}

.history-preview-active .history-analysis {
  margin-bottom: 34px;
}

.history-preview-controls {
  position: fixed;
  right: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  grid-template-columns: 42px minmax(96px, auto) 42px;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid rgba(77, 63, 48, .14);
  border-radius: 999px;
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 12px 30px rgba(47, 37, 26, .16);
  backdrop-filter: blur(14px);
  transform: translateX(50%);
  transition: opacity .22s ease, transform .22s ease;
}

.history-preview-controls.is-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translate(50%, 8px);
}

.history-preview-controls button {
  width: 42px;
  height: 48px;
  padding: 0;
  border: 0;
  color: #78271f;
  background: transparent;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.history-preview-controls button:active {
  background: rgba(157, 56, 45, .08);
}

.history-preview-controls div {
  display: grid;
  min-width: 96px;
  padding: 5px 10px;
  text-align: center;
}

.history-preview-controls strong {
  color: #211d18;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  line-height: 1.2;
}

.history-preview-controls span {
  color: #8b7d6e;
  font-size: 10px;
  line-height: 1.3;
}

@media (max-width: 520px) {
  .history-preview-active .history-shell {
    padding-top: 8px;
  }

  .history-preview-active .history-result-panel {
    padding-top: 0;
  }

  .history-preview-active .history-analysis {
    margin-bottom: 20px;
  }
}

/* History quiz v6: purpose-built phone layout instead of nested desktop cards. */
@media (max-width: 520px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  .history-body {
    background: #f6f2ea;
  }

  .history-body[data-history-screen="question"] > .site-footer {
    display: none;
  }

  .history-body[data-history-screen="question"] .history-shell {
    width: 100%;
    min-height: 100svh;
    padding: 0;
  }

  .history-body #question-screen {
    width: 100%;
    max-width: 480px;
    min-height: 100svh;
    margin: 0 auto;
    padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .history-body #question-screen .progress-label {
    margin: 0 2px 10px;
    color: #766b61;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
  }

  .history-body #question-screen .progress-track {
    height: 4px;
    margin: 0;
    background: #e3ddd4;
  }

  .history-body #question-screen .history-question-card {
    overflow: visible;
    padding: 24px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .history-body #question-screen .history-question-card::after {
    display: none;
  }

  .history-body #question-screen .question-count {
    margin: 0 0 8px;
    color: var(--history-red);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
  }

  .history-body #question-screen .history-question-card h2 {
    margin: 0 0 20px;
    color: var(--history-ink);
    font-size: 24px;
    line-height: 1.34;
    text-wrap: pretty;
  }

  .history-body #question-screen .option-list {
    gap: 10px;
  }

  .history-body #question-screen .history-option {
    -webkit-appearance: none;
    appearance: none;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    min-height: 66px;
    padding: 12px 14px;
    border: 1px solid #ded5c8;
    border-radius: 8px;
    color: var(--history-ink);
    background: #fffdf8;
    box-shadow: 0 3px 12px rgba(73, 55, 35, 0.035);
    font: inherit;
    opacity: 1;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-fill-color: currentColor;
  }

  .history-body #question-screen .history-option:active,
  .history-body #question-screen .history-option.selected {
    border-color: rgba(157, 56, 45, 0.62);
    color: var(--history-ink);
    background: #fff8f3;
    box-shadow: 0 4px 14px rgba(104, 63, 42, 0.07);
  }

  .history-body #question-screen .history-option .option-letter {
    width: 34px;
    height: 34px;
    color: var(--history-red);
    background: #f0e7d9;
    font-size: 15px;
  }

  .history-body #question-screen .history-option .option-text {
    color: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.46;
    -webkit-text-fill-color: currentColor;
  }

  .history-body #question-screen .quiz-actions {
    display: flex;
    justify-content: center;
    margin-top: 14px;
  }

  .history-body #question-screen #prev-btn {
    width: 104px;
    min-width: 104px;
    min-height: 40px;
    padding: 0 16px;
    border-color: #d6ccbe;
    border-radius: 999px;
    color: #776c61;
    background: transparent;
    font-size: 14px;
    -webkit-text-fill-color: currentColor;
  }
}

@media (max-width: 360px) {
  .history-body #question-screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .history-body #question-screen .history-question-card {
    padding-top: 20px;
  }

  .history-body #question-screen .history-question-card h2 {
    margin-bottom: 16px;
    font-size: 22px;
  }

  .history-body #question-screen .history-option {
    min-height: 60px;
    padding: 10px 12px;
  }

  .history-body #question-screen .history-option .option-text {
    font-size: 14px;
  }
}

.site-footer .icp-link {
  color: inherit;
  text-decoration: none;
}

.site-footer .icp-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* History persona v7: world-history museum editorial. */
.history-body {
  --history-paper: #f2eee3;
  --history-paper-light: #fbf8f0;
  --history-ink: #181a17;
  --history-muted: #6d685d;
  --history-line: #b9ad96;
  --history-red: #983a32;
  --history-red-dark: #752a25;
  --history-green: #203c38;
  background: var(--history-paper);
}

.history-body .site-header {
  display: none;
}

.history-shell {
  width: min(1120px, calc(100% - 40px));
  padding-top: 24px;
}

.history-body .quiz-panel {
  border-radius: 0;
}

.history-intro {
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr);
  gap: clamp(42px, 6vw, 88px);
  min-height: calc(100svh - 104px);
  padding: clamp(38px, 5vw, 70px);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.history-intro::before {
  content: "HISTORIA";
  right: auto;
  top: 12px;
  left: 3px;
  color: rgba(32, 60, 56, .055);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(92px, 14vw, 190px);
  font-weight: 700;
  letter-spacing: .04em;
  writing-mode: horizontal-tb;
}

.history-intro-copy {
  max-width: 610px;
}

.history-kicker {
  max-width: 560px;
  margin-bottom: 22px;
  color: var(--history-green);
  font-family: Georgia, "Songti SC", serif;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .12em;
}

.history-intro h1 {
  margin: 0;
  color: var(--history-ink);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(54px, 6vw, 78px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.history-intro .hero-text {
  max-width: 590px;
  margin: 28px 0 0;
  color: #59564e;
  font-size: 17px;
  line-height: 1.85;
}

.history-body .intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
}

.history-body .intro-meta span {
  padding: 0 16px;
  border: 0;
  border-right: 1px solid #c8beab;
  border-radius: 0;
  color: var(--history-muted);
  background: transparent;
  font-size: 13px;
}

.history-body .intro-meta span:first-child {
  padding-left: 0;
}

.history-body .intro-meta span:last-child {
  border-right: 0;
}

.history-intro .button.history-primary {
  width: 200px;
  min-height: 52px;
  margin-top: 34px;
  border: 1px solid var(--history-green);
  border-radius: 2px;
  color: #fffaf0;
  background: var(--history-green);
  box-shadow: inset 0 0 0 3px var(--history-green), inset 0 0 0 4px rgba(232, 215, 176, .62);
  font-size: 16px;
}

.history-intro .button.history-primary:hover {
  background: #172f2c;
  box-shadow: inset 0 0 0 3px #172f2c, inset 0 0 0 4px rgba(232, 215, 176, .7);
}

.history-intro .history-cover {
  align-self: center;
  min-height: 0;
  padding: 12px;
  border: 1px solid #a99a7d;
  border-radius: 0;
  background: #d8d0bd;
  box-shadow: 14px 14px 0 #d8d0bd;
}

.history-intro .history-cover::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 20px;
  border: 1px solid rgba(244, 235, 214, .66);
  pointer-events: none;
}

.history-intro .history-cover img {
  height: min(590px, 67svh);
  border-radius: 0;
  filter: saturate(.88) contrast(1.03);
  object-position: center center;
}

.history-result-panel {
  padding-top: 18px;
}

.result-overview-stage,
.history-analysis {
  width: min(720px, 100%);
}

.result-card-preview {
  border: 1px solid var(--history-line);
  background: #f5f0e5;
}

.result-overview-stage .summary-primary-actions {
  margin-top: 14px;
}

.result-overview-stage .summary-primary-actions .button.history-primary {
  min-height: 54px;
  margin: 0;
  border: 1px solid #9d8964;
  border-radius: 2px;
  color: #f8f1df;
  background: var(--history-green);
  box-shadow: inset 0 0 0 3px var(--history-green), inset 0 0 0 4px #bca87c;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  letter-spacing: 0;
}

.history-analysis {
  margin-top: 46px;
  border: 1px solid var(--history-line);
  color: var(--history-ink);
  background: var(--history-paper-light);
}

.history-analysis::before {
  content: "";
  display: block;
  height: 10px;
  border-bottom: 1px solid #b9ad96;
  background: var(--history-green);
}

.history-analysis-heading {
  padding: 50px 52px 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.history-analysis-eyebrow {
  color: var(--history-green);
  font-family: Georgia, "Songti SC", serif;
  font-size: 12px;
  letter-spacing: .1em;
}

.history-analysis-heading h2 {
  max-width: 100%;
  margin-top: 14px;
  color: var(--history-ink);
  font-size: 38px;
  line-height: 1.35;
}

.history-analysis-heading h2 span {
  color: var(--history-red);
}

.history-analysis-verdict {
  margin-top: 20px;
  color: #262722;
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.7;
}

.history-analysis-traits {
  gap: 9px;
  margin-top: 24px;
}

.history-analysis-traits span,
.history-analysis-traits span:nth-child(2),
.history-analysis-traits span:nth-child(3) {
  min-width: 72px;
  padding: 6px 14px;
  border: 1px solid #b9ad96;
  border-radius: 2px;
  color: #4f493f;
  background: transparent;
  font-size: 13px;
  text-align: center;
}

.history-analysis-traits span:first-child {
  border-color: var(--history-red);
  color: #fff8ec;
  background: var(--history-red);
}

.history-analysis-reason {
  margin-top: 28px;
  padding-top: 24px;
  border-top-color: #d4cab8;
  color: #555249;
  font-size: 16px;
  line-height: 1.95;
}

.history-analysis-grid {
  display: block;
  margin: 0;
}

.history-analysis-section {
  padding: 44px 52px 48px;
  border: 0;
  border-top: 1px solid #cfc4b0;
  border-radius: 0;
  background: transparent;
}

.history-analysis-grid .report-index {
  margin: 0 0 28px;
  color: var(--history-green);
  font-family: "Songti SC", "STSong", serif;
  font-size: 30px;
}

.history-throughline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #d6cbb8;
  border-left: 1px solid #d6cbb8;
}

.history-throughline-grid > section {
  min-width: 0;
  padding: 28px 26px 30px;
  border-right: 1px solid #d6cbb8;
  border-bottom: 1px solid #d6cbb8;
}

.history-throughline-grid > section > span {
  display: block;
  margin-bottom: 12px;
  color: #837969;
  font-size: 12px;
  font-weight: 700;
}

.history-throughline-grid h3,
.history-analysis-section h3 {
  color: var(--history-red);
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  line-height: 1.55;
}

.history-throughline-grid > section > p:not(.history-gentle-note),
.history-analysis-section > p:last-child {
  margin: 13px 0 0;
  color: #59564e;
  font-size: 15px;
  line-height: 1.9;
}

.history-gentle-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #ddd4c5;
  color: #6a645a;
  font-size: 13px;
  line-height: 1.75;
}

.history-gentle-note strong,
.history-gentle-note span {
  display: inline;
}

.history-gentle-note strong {
  color: #4f493f;
}

.history-echo-block {
  background: #e9e4d7;
}

.history-echo-block h3 {
  color: var(--history-ink);
  font-size: 27px;
}

.history-echo-block blockquote {
  margin: 28px 0 0;
  padding: 22px 24px;
  border-left: 3px solid var(--history-red);
  color: #33342f;
  background: rgba(255, 252, 244, .72);
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
}

.history-modern-block,
.history-environment-block {
  display: inline-block;
  width: 50%;
  vertical-align: top;
}

.history-modern-block {
  border-right: 1px solid #cfc4b0;
}

.history-modern-block h3,
.history-environment-block h3 {
  font-size: 22px;
}

.history-analysis .history-advice-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 26px;
  border-top: 1px solid #d4cab8;
}

.history-analysis .history-advice-list li,
.history-analysis .history-advice-list li + li {
  min-height: 0;
  padding: 16px 8px 16px 46px;
  border: 0;
  border-bottom: 1px solid #d4cab8;
  border-radius: 0;
  color: #555148;
  background: transparent;
  font-size: 15px;
}

.history-analysis .history-advice-list li::before {
  top: 16px;
  left: 8px;
  color: var(--history-red);
}

.history-result-actions {
  margin-bottom: 36px;
}

@media (max-width: 760px) {
  .history-shell {
    width: min(100%, 560px);
    padding-top: 0;
  }

  .history-intro {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: 100svh;
    padding: max(16px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  }

  .history-intro::before {
    display: none;
  }

  .history-intro .history-cover {
    order: -1;
    width: 100%;
    min-height: 0;
    padding: 7px;
    box-shadow: 7px 7px 0 #d8d0bd;
  }

  .history-intro .history-cover::before {
    inset: 13px;
  }

  .history-intro .history-cover img {
    width: 100%;
    height: min(35svh, 300px);
    object-position: center 38%;
  }

  .history-intro-copy {
    width: 100%;
  }

  .history-kicker {
    margin-bottom: 10px;
    font-size: 10px;
  }

  .history-intro h1 {
    font-size: clamp(38px, 11vw, 48px);
    line-height: 1.08;
  }

  .history-intro .hero-text {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.68;
  }

  .history-body .intro-meta {
    margin-top: 14px;
  }

  .history-body .intro-meta span {
    padding: 0 10px;
    font-size: 11px;
  }

  .history-intro .button.history-primary {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
  }

  .history-result-panel {
    padding: 0 12px;
  }

  .history-analysis {
    margin-top: 28px;
  }

  .history-analysis-heading,
  .history-analysis-section {
    padding: 32px 24px 34px;
  }

  .history-analysis-heading h2 {
    font-size: 29px;
  }

  .history-analysis-verdict {
    font-size: 20px;
  }

  .history-analysis-reason {
    font-size: 15px;
  }

  .history-analysis-grid .report-index {
    margin-bottom: 22px;
    font-size: 26px;
  }

  .history-throughline-grid {
    grid-template-columns: 1fr;
  }

  .history-throughline-grid > section {
    padding: 23px 20px 25px;
  }

  .history-throughline-grid h3,
  .history-analysis-section h3 {
    font-size: 20px;
  }

  .history-throughline-grid > section > p:not(.history-gentle-note),
  .history-analysis-section > p:last-child {
    font-size: 15px;
  }

  .history-modern-block,
  .history-environment-block {
    display: block;
    width: 100%;
  }

  .history-modern-block {
    border-right: 0;
  }

  .history-echo-block blockquote {
    padding: 19px 18px;
    font-size: 17px;
  }
}

@media (max-width: 390px) and (max-height: 750px) {
  .history-intro {
    gap: 14px;
  }

  .history-intro .history-cover img {
    height: 29svh;
  }

  .history-intro h1 {
    font-size: 36px;
  }

  .history-intro .hero-text {
    margin-top: 10px;
    line-height: 1.55;
  }

  .history-body .intro-meta {
    margin-top: 10px;
  }

  .history-intro .button.history-primary {
    margin-top: 13px;
  }
}

/* History persona v8: contemporary museum poster. */
.history-body {
  --history-paper: #f7f5ef;
  --history-paper-light: #fcfbf7;
  --history-ink: #181816;
  --history-muted: #68655e;
  --history-line: #cbc5b9;
  --history-red: #9a3029;
  --history-red-dark: #78241f;
  --history-green: #181816;
  color: var(--history-ink);
  background: var(--history-paper);
}

.history-shell {
  width: min(1180px, calc(100% - 48px));
  padding-top: 24px;
}

.history-intro {
  display: grid;
  grid-template:
    "title cover" auto
    "details cover" 1fr
    / minmax(0, 1.08fr) minmax(360px, .92fr);
  column-gap: 80px;
  row-gap: 42px;
  min-height: calc(100svh - 104px);
  padding: 54px 44px 50px;
  border-top: 4px solid var(--history-ink);
  border-bottom: 1px solid var(--history-line);
}

.history-intro::before {
  display: none;
  content: none;
}

.history-intro-copy {
  grid-area: title;
  align-self: end;
  max-width: 620px;
}

.history-intro-details {
  grid-area: details;
  align-self: start;
  max-width: 580px;
}

.history-kicker {
  margin: 0 0 22px;
  color: var(--history-red);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
}

.history-intro h1 {
  max-width: 610px;
  font-size: 72px;
  font-weight: 700;
  line-height: 1.08;
}

.history-intro .hero-text {
  max-width: 540px;
  margin: 0;
  color: #4f4c46;
  font-size: 16px;
  line-height: 1.85;
}

.history-body .intro-meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--history-line);
}

.history-body .intro-meta span {
  padding: 0 14px;
  border-right-color: var(--history-line);
  color: var(--history-muted);
  font-size: 12px;
}

.history-intro .button.history-primary {
  position: relative;
  width: 214px;
  min-height: 52px;
  margin-top: 34px;
  border: 1px solid var(--history-ink);
  border-bottom: 4px solid var(--history-red);
  border-radius: 0;
  color: #fff;
  background: var(--history-ink);
  box-shadow: none;
  font-size: 16px;
  letter-spacing: 0;
}

.history-intro .button.history-primary:hover {
  border-color: var(--history-red);
  background: var(--history-red);
  box-shadow: none;
  transform: none;
}

.history-intro .history-cover {
  position: relative;
  grid-area: cover;
  align-self: stretch;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--history-ink);
  border-radius: 0;
  background: #dedbd2;
  box-shadow: none;
}

.history-intro .history-cover::before {
  display: none;
  content: none;
}

.history-intro .history-cover::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38%;
  height: 6px;
  background: var(--history-red);
  pointer-events: none;
}

.history-intro .history-cover img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border-radius: 0;
  filter: saturate(.96) contrast(1.02);
  object-fit: cover;
  object-position: center 42%;
}

.result-overview-stage .summary-primary-actions .button.history-primary {
  border: 1px solid var(--history-ink);
  border-bottom: 4px solid var(--history-red);
  color: #fff;
  background: var(--history-ink);
  box-shadow: none;
}

.history-analysis::before {
  background: var(--history-ink);
}

.history-analysis-eyebrow {
  color: var(--history-red);
  letter-spacing: 0;
}

.history-analysis-grid .report-index {
  color: var(--history-ink);
}

@media (max-width: 900px) {
  .history-intro {
    column-gap: 44px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .history-intro h1 {
    font-size: 60px;
  }
}

@media (max-width: 760px) {
  .history-shell {
    width: min(100%, 560px);
    padding-top: 0;
  }

  .history-intro {
    display: grid;
    grid-template:
      "title" auto
      "cover" minmax(180px, 27svh)
      "details" auto
      / minmax(0, 1fr);
    gap: 14px;
    align-content: start;
    min-height: 100svh;
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    border-top-width: 3px;
  }

  .history-intro-copy,
  .history-intro-details {
    width: 100%;
    max-width: none;
  }

  .history-intro-copy {
    align-self: start;
  }

  .history-kicker {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .history-intro h1 {
    font-size: 42px;
    line-height: 1.06;
  }

  .history-intro .history-cover {
    order: 0;
    width: 100%;
    min-height: 0;
    padding: 0;
    box-shadow: none;
  }

  .history-intro .history-cover img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-position: center 39%;
  }

  .history-intro .hero-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
  }

  .history-body .intro-meta {
    margin-top: 12px;
    padding-top: 11px;
  }

  .history-body .intro-meta span {
    padding: 0 9px;
    font-size: 11px;
  }

  .history-intro .button.history-primary {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
  }
}

@media (max-width: 390px) and (max-height: 750px) {
  .history-intro {
    grid-template-rows: auto minmax(150px, 23svh) auto;
    gap: 10px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .history-intro h1 {
    font-size: 36px;
  }

  .history-intro .hero-text {
    line-height: 1.5;
  }

  .history-body .intro-meta {
    margin-top: 9px;
    padding-top: 8px;
  }

  .history-intro .button.history-primary {
    margin-top: 10px;
  }
}

/* History persona v9: Chinese-only result archive. */
.result-card-preview,
.history-analysis {
  background: #fcfbf7;
}

.result-card-preview {
  border-color: #c7bdad;
}

.history-analysis {
  margin-top: 18px;
}

.history-analysis::before {
  height: 4px;
  border-bottom: 0;
  background: var(--history-red);
}

.history-analysis-traits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(330px, 100%);
}

.history-analysis-traits span,
.history-analysis-traits span:first-child,
.history-analysis-traits span:nth-child(2),
.history-analysis-traits span:nth-child(3) {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #c8aaa6;
  border-radius: 2px;
  color: #71332f;
  background: #f4e9e5;
  font-size: 13px;
}

.history-final-save {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(720px, 100%);
  margin: 18px auto 0;
}

.history-final-save .button.history-primary {
  width: 100%;
  min-height: 56px;
  margin: 0;
  border: 1px solid var(--history-ink);
  border-bottom: 4px solid var(--history-red);
  border-radius: 0;
  color: #fff;
  background: var(--history-ink);
  box-shadow: none;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
}

.history-final-save .button.history-primary:hover {
  border-color: var(--history-red);
  background: var(--history-red);
  box-shadow: none;
}

.history-result-actions {
  width: min(720px, 100%);
  margin: 16px auto 36px;
}

@media (max-width: 760px) {
  .history-analysis {
    margin-top: 12px;
  }

  .history-analysis-traits {
    width: 100%;
  }

  .history-final-save {
    margin-top: 12px;
  }
}

/* History persona v10: concise identity card and responsive archive. */
.history-analysis-heading {
  padding: 44px 52px 42px;
}

.history-analysis-heading h2 {
  margin-top: 12px;
  font-size: 46px;
  line-height: 1.18;
}

.history-analysis-traits {
  margin-top: 22px;
}

.history-analysis-traits span,
.history-analysis-traits span:first-child,
.history-analysis-traits span:nth-child(2),
.history-analysis-traits span:nth-child(3) {
  position: relative;
  padding: 9px 12px 9px 16px;
  border-color: #c9b9a6;
  color: #6f342f;
  background: #f8f2e9;
}

.history-analysis-traits span::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 4px;
  background: var(--history-red);
}

.history-analysis-verdict {
  max-width: 580px;
  margin-top: 30px;
  padding: 2px 0 2px 22px;
  border-left: 4px solid var(--history-red);
  color: #272621;
  font-size: 24px;
  line-height: 1.72;
}

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

.history-analysis-grid .wide {
  grid-column: 1 / -1;
}

.history-modern-block,
.history-environment-block {
  display: block;
  width: auto;
  min-width: 0;
}

.history-final-save .button.history-primary {
  gap: 13px;
  min-height: 62px;
  border: 1px solid var(--history-red);
  border-radius: 0;
  color: var(--history-red);
  background: #f8f2e9;
  box-shadow: inset 0 0 0 4px #fcfbf7;
  font-size: 18px;
}

.history-final-save .button.history-primary::before {
  content: "↓";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1;
}

.history-final-save .button.history-primary:hover {
  border-color: var(--history-red);
  color: #fffaf2;
  background: var(--history-red);
  box-shadow: inset 0 0 0 4px var(--history-red), inset 0 0 0 5px rgba(255, 250, 242, .62);
  transform: none;
}

.history-result-actions .button.subtle {
  min-height: 44px;
  border-color: transparent;
  color: #6b655c;
  background: transparent;
}

.history-result-actions .button.subtle:hover {
  color: var(--history-red);
  background: transparent;
  transform: none;
}

@media (max-width: 760px) {
  .history-analysis-heading {
    padding: 30px 24px 32px;
  }

  .history-analysis-heading h2 {
    font-size: 36px;
  }

  .history-analysis-verdict {
    margin-top: 24px;
    padding-left: 17px;
    font-size: 20px;
    line-height: 1.7;
  }

  .history-analysis-grid {
    grid-template-columns: 1fr;
  }

  .history-analysis-grid .wide {
    grid-column: auto;
  }

  .history-final-save .button.history-primary {
    min-height: 58px;
    font-size: 17px;
  }
}

/* History persona v11: one warm archival palette across the result. */
.history-body[data-history-screen="result"] {
  --history-paper: #f4f0e8;
  --history-paper-light: #f4f0e8;
  --history-ink: #211d18;
  --history-muted: #75685c;
  --history-line: #cfc2ad;
  --history-red: #9d382d;
  --history-red-dark: #78271f;
  background: #ece7de;
}

.history-body[data-history-screen="result"] .result-card-preview,
.history-body[data-history-screen="result"] .history-analysis {
  border-color: var(--history-line);
  background: var(--history-paper);
}

.history-body[data-history-screen="result"] .history-analysis-heading,
.history-body[data-history-screen="result"] .history-analysis-section,
.history-body[data-history-screen="result"] .history-modern-block,
.history-body[data-history-screen="result"] .history-environment-block {
  background: transparent;
}

.history-body[data-history-screen="result"] .history-analysis-section,
.history-body[data-history-screen="result"] .history-throughline-grid,
.history-body[data-history-screen="result"] .history-throughline-grid > section,
.history-body[data-history-screen="result"] .history-modern-block,
.history-body[data-history-screen="result"] .history-analysis .history-advice-list,
.history-body[data-history-screen="result"] .history-analysis .history-advice-list li {
  border-color: var(--history-line);
}

.history-body[data-history-screen="result"] .history-analysis-traits span,
.history-body[data-history-screen="result"] .history-analysis-traits span:first-child,
.history-body[data-history-screen="result"] .history-analysis-traits span:nth-child(2),
.history-body[data-history-screen="result"] .history-analysis-traits span:nth-child(3) {
  border-color: var(--history-line);
  color: #574a3e;
  background: #e9dfcf;
}

.history-body[data-history-screen="result"] .history-analysis-verdict,
.history-body[data-history-screen="result"] .history-throughline-grid h3,
.history-body[data-history-screen="result"] .history-analysis-section h3,
.history-body[data-history-screen="result"] .history-analysis-section .history-highlight-positive {
  color: var(--history-red);
}

.history-body[data-history-screen="result"] .history-throughline-grid > section > p:not(.history-gentle-note),
.history-body[data-history-screen="result"] .history-analysis-section > p:last-child,
.history-body[data-history-screen="result"] .history-analysis .history-advice-list li,
.history-body[data-history-screen="result"] .history-gentle-note {
  color: var(--history-muted);
}

.history-body[data-history-screen="result"] .history-echo-block {
  background: #e9dfcf;
}

.history-body[data-history-screen="result"] .history-echo-block blockquote {
  color: var(--history-ink);
  background: rgba(244, 240, 232, .78);
}

.history-body[data-history-screen="result"] .history-final-save .button.history-primary {
  border-color: var(--history-red);
  color: var(--history-red);
  background: #e9dfcf;
  box-shadow: inset 0 0 0 4px var(--history-paper);
}

.history-body[data-history-screen="result"] .history-final-save .button.history-primary:hover {
  color: #fffaf2;
  background: var(--history-red);
  box-shadow: inset 0 0 0 4px var(--history-red), inset 0 0 0 5px rgba(255, 250, 242, .62);
}
