:root {
  --paper: #f6efe1;
  --paper-deep: #e7dbc7;
  --card: rgba(255, 250, 241, 0.9);
  --card-strong: #fff9ef;
  --ink: #241d17;
  --muted: #6f6458;
  --line: rgba(51, 39, 24, 0.12);
  --sage: #6d8462;
  --sage-soft: #e4ecdb;
  --gold: #c3974a;
  --clay: #b76649;
  --rose: #d9b3b0;
  --shadow: 0 26px 60px rgba(64, 45, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(195, 151, 74, 0.19), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(109, 132, 98, 0.18), transparent 26%),
    radial-gradient(circle at 30% 100%, rgba(183, 102, 73, 0.12), transparent 24%),
    linear-gradient(180deg, #fcf8f1 0%, var(--paper) 46%, var(--paper-deep) 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(36, 29, 23, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 29, 23, 0.34) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 26%, transparent 84%);
}

.page-shell {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 14px 0 60px;
}

.intro-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px 12px 28px;
}

.intro-card {
  width: min(720px, 100%);
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 34px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  background:
    radial-gradient(circle at 16% 18%, rgba(217, 179, 176, 0.18), transparent 24%),
    radial-gradient(circle at 86% 16%, rgba(109, 132, 98, 0.18), transparent 24%),
    linear-gradient(160deg, rgba(255, 249, 239, 0.96), rgba(245, 235, 220, 0.84)),
    var(--card);
}

.intro-card::before,
.intro-card::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 92px;
  height: 92px;
  background: linear-gradient(180deg, rgba(109, 132, 98, 0.18), rgba(195, 151, 74, 0.18));
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.intro-card::before {
  left: 56px;
  transform: rotate(-12deg);
}

.intro-card::after {
  right: 56px;
  transform: rotate(12deg);
}

.intro-card > * {
  position: relative;
  z-index: 1;
}

.hero,
.quiz-layout {
  margin-top: 14px;
}

.hero-panel,
.question-card,
.result-card,
.result-notes article {
  position: relative;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-panel {
  overflow: hidden;
  padding: 22px;
  border-radius: 34px;
  background:
    linear-gradient(160deg, rgba(255, 249, 239, 0.96), rgba(245, 235, 220, 0.84)),
    var(--card);
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 94px;
  height: 94px;
  background: linear-gradient(180deg, rgba(109, 132, 98, 0.18), rgba(195, 151, 74, 0.18));
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  opacity: 0.9;
}

.hero-panel::before {
  left: 72px;
  transform: rotate(-14deg);
}

.hero-panel::after {
  right: 72px;
  transform: rotate(14deg);
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.personality-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.personality-strip span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(51, 39, 24, 0.08);
  background: rgba(255, 255, 255, 0.58);
  color: rgba(36, 29, 23, 0.72);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.personality-strip span:nth-child(2n) {
  background: rgba(228, 236, 219, 0.8);
}

.personality-strip span:nth-child(3n) {
  background: rgba(240, 226, 203, 0.82);
}

.personality-strip span:nth-child(5n) {
  background: rgba(235, 218, 215, 0.76);
}

.hero-grid {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.hero-copy,
.hero-card {
  border: 1px solid rgba(51, 39, 24, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-copy {
  padding: 28px;
}

.hero-card {
  padding: 24px;
  background:
    linear-gradient(140deg, rgba(228, 236, 219, 0.86), rgba(255, 249, 239, 0.84)),
    rgba(255, 255, 255, 0.56);
}

.eyebrow,
.question-pill,
.share-label,
.mini-label,
.card-kicker {
  margin: 0;
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

h1 {
  margin-top: 12px;
  font-size: clamp(3rem, 9vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.06;
}

.hero-lead,
.intro-lead,
.hero-note p,
.hero-card-copy,
.result-notes p,
.result-footer {
  color: var(--muted);
  line-height: 1.72;
}

.hero-lead {
  margin: 16px 0 0;
  font-size: 1.12rem;
  max-width: 34rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(51, 39, 24, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(36, 29, 23, 0.78);
  font-size: 0.88rem;
  font-weight: 800;
}

.intro-title {
  margin-top: 12px;
  font-size: clamp(3.1rem, 10vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.intro-lead {
  max-width: 34rem;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

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

.intro-meta article {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(51, 39, 24, 0.08);
  background: rgba(255, 255, 255, 0.58);
}

.intro-meta span {
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-meta strong {
  font-size: 1.12rem;
  line-height: 1.4;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.hero-card-pills span,
.result-tags span,
.dimension-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(109, 132, 98, 0.22);
  background: rgba(228, 236, 219, 0.58);
  font-size: 0.95rem;
}

.hero-note {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(51, 39, 24, 0.08);
  background: rgba(255, 255, 255, 0.58);
}

.hero-note p:last-child {
  margin-top: 8px;
  margin-bottom: 0;
}

.result-code-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

button {
  border: 0;
  border-radius: 18px;
  padding: 15px 22px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

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

.primary-button {
  color: #fff8ef;
  background: linear-gradient(135deg, #271f17, #5f4430);
  box-shadow: 0 16px 30px rgba(39, 31, 23, 0.22);
}

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

.hero-card h2 {
  margin-top: 14px;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.hero-preview-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fffaf1;
  background: linear-gradient(135deg, #2d241b, #6a4d37);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.hero-card-name {
  margin: 12px 0 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 1.58rem;
  font-weight: 700;
  line-height: 1.24;
}

.hero-card-copy {
  margin: 12px 0 0;
  font-size: 1rem;
}

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

.hero-preview-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(109, 132, 98, 0.16);
  background: rgba(255, 255, 255, 0.66);
  color: rgba(36, 29, 23, 0.78);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.quiz-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.quiz-layout.is-result-view {
  display: block;
}

.quiz-layout.is-result-view .result-panel {
  max-width: 500px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.quiz-panel {
  min-height: calc(100svh - 28px);
}

.quiz-stage {
  min-height: calc(100svh - 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.progress-bar {
  margin: 0 4px 14px;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(109, 132, 98, 0.16);
}

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

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.question-card {
  overflow: hidden;
  padding: 24px 20px 20px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(255, 255, 255, 0.84)),
    var(--card-strong);
}

.question-card::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: -58px;
  width: 158px;
  height: 158px;
  border-radius: 999px;
  background: rgba(217, 179, 176, 0.18);
}

.question-card h3 {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: clamp(1.65rem, 6vw, 2.3rem);
  line-height: 1.38;
  letter-spacing: -0.03em;
}

.options {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.option-button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(51, 39, 24, 0.1);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  box-shadow: 0 10px 20px rgba(64, 45, 22, 0.06);
}

.option-button:hover {
  border-color: rgba(109, 132, 98, 0.34);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 28px rgba(64, 45, 22, 0.1);
}

.option-button:hover strong {
  background: rgba(228, 236, 219, 0.96);
}

.option-button:focus-visible {
  outline: 3px solid rgba(109, 132, 98, 0.3);
  outline-offset: 2px;
}

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

.option-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--sage);
  background: var(--sage-soft);
  font-size: 1rem;
}

.option-button span {
  color: var(--ink);
  line-height: 1.62;
}

.result-panel {
  width: 100%;
  max-width: 500px;
  justify-self: center;
}

.result-card {
  --result-bg: #e7ddc8;
  --result-accent: #6b835f;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(circle at 78% 14%, color-mix(in srgb, var(--result-accent) 18%, transparent), transparent 30%),
    linear-gradient(180deg, color-mix(in srgb, var(--result-bg) 74%, white), #fff9ef 58%, #fff3e6),
    var(--card-strong);
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  border: 1px solid rgba(51, 39, 24, 0.07);
  pointer-events: none;
}

.result-card::after {
  content: "";
  position: absolute;
  left: -86px;
  bottom: -96px;
  width: 184px;
  height: 184px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--result-accent) 15%, transparent);
  pointer-events: none;
}

.result-card > * {
  position: relative;
  z-index: 1;
}

.result-card-head {
  text-align: center;
}

.result-label {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 800;
}

.result-portrait {
  width: min(64vw, 230px);
  aspect-ratio: 1;
  margin: 12px auto 14px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(51, 39, 24, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 246, 232, 0.32)),
    repeating-linear-gradient(135deg, rgba(51, 39, 24, 0.035) 0 8px, transparent 8px 16px);
  box-shadow: 0 16px 32px rgba(64, 45, 22, 0.12);
}

.result-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-card h2 {
  margin-top: 6px;
  font-size: clamp(2.1rem, 10vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.result-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.result-code,
.result-match {
  margin: 0;
  border-radius: 999px;
  font-weight: 900;
}

.result-code {
  padding: 8px 14px;
  color: #fffaf1;
  background: var(--ink);
  font-size: 1.16rem;
  letter-spacing: 0.12em;
}

.result-match {
  padding: 8px 12px;
  color: color-mix(in srgb, var(--result-accent) 72%, #201b15);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(51, 39, 24, 0.08);
  font-size: 0.84rem;
}

.result-summary {
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(51, 39, 24, 0.08);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.62;
}

.result-code-note {
  margin: 10px 0 0;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

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

.dimension-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 14px;
  border-radius: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.62);
}

.dimension-label {
  color: rgba(36, 29, 23, 0.52);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dimension-value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
}

.dimension-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.result-footer {
  margin: 14px 0 0;
  font-size: 0.92rem;
}

.result-notes article {
  border-radius: 30px;
  background:
    linear-gradient(160deg, rgba(255, 250, 241, 0.94), rgba(255, 255, 255, 0.82)),
    var(--card);
}

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

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

.result-notes {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.result-notes article {
  padding: 18px;
}

.result-notes h3 {
  font-size: 1.28rem;
}

.result-notes p {
  margin-bottom: 0;
}

@media (min-width: 720px) {
  .intro-actions button,
  .hero-actions button,
  .result-actions button {
    width: auto;
  }
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    align-items: stretch;
  }

  .quiz-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.9fr);
  }

}

@media (max-width: 719px) {
  .page-shell {
    width: min(100vw - 18px, 480px);
  }

  .intro-screen {
    padding: 14px 0 24px;
  }

  .intro-card {
    padding: 22px 18px 20px;
    border-radius: 28px;
  }

  .intro-card::before {
    left: 32px;
    width: 72px;
    height: 72px;
  }

  .intro-card::after {
    right: 32px;
    width: 72px;
    height: 72px;
  }

  .intro-title {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .intro-lead {
    font-size: 0.98rem;
  }

  .intro-meta {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 18px;
    border-radius: 28px;
  }

  .hero-panel::before {
    left: 38px;
    width: 74px;
    height: 74px;
  }

  .hero-panel::after {
    right: 38px;
    width: 74px;
    height: 74px;
  }

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

  .hero-copy,
  .hero-card {
    padding: 18px;
  }

  h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 8px;
  }

  .hero-stats span {
    min-height: 36px;
    font-size: 0.82rem;
  }

  .hero-preview-list {
    grid-template-columns: 1fr;
  }

  .question-card {
    padding: 22px 18px 18px;
  }

  .question-card h3 {
    font-size: clamp(1.52rem, 7vw, 2rem);
  }

  .progress-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .intro-actions button,
  .hero-actions button,
  .result-actions button {
    width: 100%;
  }

  .result-code-note {
    font-size: 0.78rem;
    line-height: 1.45;
  }

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

  .dimension-item {
    padding: 10px 12px;
  }

  .dimension-label {
    font-size: 0.68rem;
  }

  .dimension-value {
    font-size: 0.92rem;
  }

  .dimension-note {
    display: none;
  }

  .result-card,
  .result-notes article {
    border-radius: 26px;
  }

  .result-card {
    padding: 16px;
  }

  .result-portrait {
    width: min(39vw, 150px);
    margin: 10px auto 12px;
    border-radius: 24px;
  }

  .result-card h2 {
    font-size: clamp(1.9rem, 8.6vw, 2.6rem);
  }

  .result-summary {
    margin-top: 10px;
    padding: 12px;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .result-tags {
    gap: 8px;
    margin-top: 12px;
  }

  .result-tags span {
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  .result-footer {
    margin-top: 12px;
    font-size: 0.82rem;
  }

  .result-card-actions {
    margin-top: 14px;
  }

  .result-card-actions button {
    width: 100%;
  }

  .result-notes {
    gap: 10px;
    margin-top: 12px;
  }

  .result-notes article {
    padding: 16px;
  }
}
