:root {
  --bg: #0f1013;
  --bg-deep: #090a0d;
  --panel: rgba(24, 25, 31, 0.92);
  --panel-strong: rgba(17, 18, 23, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.028);
  --line: rgba(227, 197, 125, 0.1);
  --text: #f3f0e8;
  --muted: #a6adb8;
  --gold: #cfaa5f;
  --gold-soft: rgba(207, 170, 95, 0.18);
  --gold-strong: #e3c57d;
  --gold-deep: #b88d3e;
  --success: #d8c38e;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  --body-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display-font: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(207, 170, 95, 0.14), transparent 30%),
    linear-gradient(180deg, #17181d 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--body-font);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-bg {
  position: fixed;
  inset: auto;
  width: 34vw;
  height: 34vw;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.65;
  z-index: 0;
}

.page-bg-left {
  top: 8vh;
  left: -8vw;
  background: radial-gradient(circle, rgba(207, 170, 95, 0.18), transparent 72%);
}

.page-bg-right {
  right: -8vw;
  bottom: 4vh;
  background: radial-gradient(circle, rgba(207, 170, 95, 0.1), transparent 72%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: block;
}

.panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.008)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.view {
  min-height: calc(100vh - 68px);
}

.is-hidden {
  display: none;
}

.hero-panel,
.quiz-panel,
.result-hero {
  min-height: calc(100vh - 68px);
  padding: 48px;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
}

.hero-icon {
  width: 164px;
  height: 164px;
  display: grid;
  place-items: center;
  border-radius: 40px;
  background: linear-gradient(180deg, #dfbf70, var(--gold-deep));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 60px rgba(207, 170, 95, 0.24);
}

.hero-icon-svg {
  width: 94px;
  height: 94px;
}

.hero-icon-svg rect {
  fill: rgba(255, 255, 255, 0.24);
}

.hero-icon-svg .hero-icon-active {
  fill: rgba(255, 255, 255, 0.98);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--display-font);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(4rem, 10vw, 8.5rem);
  line-height: 0.92;
  color: var(--gold);
}

.hero-subtitle {
  font-size: clamp(1.6rem, 2vw, 2.8rem);
  color: #c2c8d1;
}

.hero-copy,
.side-copy,
.detail-copy,
.result-summary,
.question-help {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 720px;
  font-size: 1.08rem;
}

.hero-stats,
.result-meta {
  width: min(100%, 820px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.meta-card {
  padding: 20px;
  border-radius: 24px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.stat-card strong,
.meta-card strong {
  display: block;
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.08;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--gold-strong);
  letter-spacing: 0.04em;
}

.stat-card strong small,
.meta-card strong small {
  font-size: 10px;
  line-height: 1;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.result-meta .meta-card strong {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.stat-card span,
.meta-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.intake-card {
  width: min(100%, 820px);
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}

.intake-card label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.98rem;
  color: var(--gold-strong);
}

.text-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.text-input:focus {
  outline: none;
  border-color: rgba(207, 170, 95, 0.62);
  box-shadow: 0 0 0 4px rgba(207, 170, 95, 0.1);
}

.input-hint {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.input-hint.is-error {
  color: #ffb8a5;
}

.hero-actions,
.result-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.inline-button {
  border-radius: 999px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.inline-button:hover {
  transform: translateY(-1px);
}

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

.primary-button {
  min-width: 240px;
  padding: 18px 30px;
  background: linear-gradient(180deg, #d6b362, var(--gold-deep));
  color: #fff;
  font-size: 1.14rem;
  font-weight: 700;
  box-shadow: 0 18px 45px rgba(207, 170, 95, 0.16);
}

.ghost-button {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.inline-button {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.quiz-topline,
.side-header,
.progress-meta,
.question-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.question-pill {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--display-font);
  font-size: 2rem;
}

.quiz-topline-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.topline-copy,
.question-summary span {
  color: var(--muted);
}

.question-summary {
  justify-content: flex-start;
}

#axis-copy,
.option-letter {
  display: none;
}

.topline-copy {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.question-text {
  max-width: 980px;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.2;
}

.options {
  display: grid;
  gap: 18px;
}

.option-card {
  width: 100%;
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  align-items: center;
  gap: 18px;
  padding: 24px 24px 24px 0;
  border-radius: 26px;
  text-align: left;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(207, 170, 95, 0.65) 0 8px, rgba(255, 255, 255, 0.018) 8px),
    rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.option-card.is-selected {
  border-color: rgba(207, 170, 95, 0.74);
  background:
    linear-gradient(90deg, rgba(207, 170, 95, 0.92) 0 8px, rgba(207, 170, 95, 0.08) 8px),
    rgba(255, 255, 255, 0.024);
  box-shadow: 0 18px 40px rgba(207, 170, 95, 0.1);
}

.option-key {
  width: 50px;
  height: 50px;
  margin-left: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--display-font);
  font-size: 1.5rem;
}

.option-text {
  font-size: clamp(1.12rem, 1.6vw, 1.7rem);
  line-height: 1.55;
}

.progress-card {
  flex: 1;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.progress-track {
  margin-top: 12px;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

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

.quiz-footer,
.nav-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-actions {
  justify-content: flex-end;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(260px, 0.68fr);
  gap: 22px;
  align-items: center;
}

.result-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.result-copy h2 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(2.5rem, 4.6vw, 4.6rem);
  line-height: 1;
  white-space: nowrap;
}

#result-code {
  color: var(--gold);
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  color: #e6cf98;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.portrait-frame {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background:
    radial-gradient(circle at top, rgba(207, 170, 95, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(239, 231, 215, 0.96), rgba(220, 209, 181, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.26),
    0 32px 70px rgba(207, 170, 95, 0.12);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 22px;
  border: 1px solid rgba(109, 78, 24, 0.12);
  pointer-events: none;
}

.portrait-frame img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  image-rendering: auto;
}

.result-description-card {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-description-card h3 {
  margin-bottom: 14px;
  font-family: var(--display-font);
  font-size: 2.1rem;
}

.result-description-card .detail-copy {
  font-size: 1.08rem;
  line-height: 1.9;
}

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

.detail-card {
  padding: 30px;
}

.detail-card h3 {
  margin-bottom: 18px;
  font-family: var(--display-font);
  font-size: 2rem;
}

.dimension-bars {
  display: grid;
  gap: 18px;
}

.dimension-row {
  display: grid;
  gap: 10px;
}

.dimension-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.dimension-track {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}

.dimension-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-strong), var(--gold-deep));
}

.dimension-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

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

  .hero-panel,
  .quiz-panel,
  .result-hero {
    min-height: auto;
    padding: 28px 20px;
  }

  .hero-stats,
  .result-meta,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .result-copy h2 {
    gap: 10px;
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .option-card {
    grid-template-columns: 60px 1fr;
    padding-right: 18px;
  }

  .quiz-footer,
  .nav-actions,
  .result-hero {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions .primary-button,
  .nav-actions .ghost-button,
  .hero-actions .primary-button,
  .result-actions .primary-button,
  .result-actions .ghost-button {
    width: 100%;
    min-width: 0;
  }

  .question-pill {
    width: 62px;
    height: 62px;
    font-size: 1.6rem;
  }

  .quiz-topline {
    align-items: flex-start;
  }
}
