:root {
  --ink: #142c2b;
  --ink-deep: #0c2221;
  --ink-soft: #365452;
  --mist: #eaf4f2;
  --paper: #f8fcfb;
  --mint: #b9dfd4;
  --coral: #f36a4f;
  --sun: #f0c24d;
  --line: rgba(20, 44, 43, 0.17);
  --white-line: rgba(248, 252, 251, 0.2);
  --display: "Songti SC", "STSong", "SimSun", serif;
  --body: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --shadow: 0 28px 80px rgba(6, 37, 34, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 12%, rgba(185, 223, 212, 0.52), transparent 25rem),
    var(--mist);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.page-frame {
  width: min(1400px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 78px);
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-mark {
  position: relative;
  width: 31px;
  height: 31px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.brand-mark::after {
  inset: 14px -4px auto;
  width: auto;
  height: 1px;
  border: 0;
  border-top: 1px solid var(--ink);
  border-radius: 0;
  transform: rotate(-34deg);
}

.brand-mark span {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 5px;
  height: 5px;
  background: var(--coral);
  border-radius: 50%;
  z-index: 1;
}

.header-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

main {
  flex: 1;
}

.home-view {
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(370px, 0.78fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding: clamp(54px, 8vh, 104px) 0;
}

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

.hero-intro,
.result-intro {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.intro-dot {
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(243, 106, 79, 0.12);
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 5vw, 76px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-description {
  max-width: 610px;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.95;
}

.hero-action {
  margin-top: 38px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.primary-button {
  min-height: 58px;
  padding: 0 26px;
  border: 1px solid var(--coral);
  border-radius: 2px;
  background: var(--coral);
  color: #fffdf9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 8px 8px 0 rgba(20, 44, 43, 0.12);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-button:hover {
  background: #e45a40;
  transform: translate(-2px, -2px);
  box-shadow: 11px 11px 0 rgba(20, 44, 43, 0.12);
}

.primary-button:active {
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 rgba(20, 44, 43, 0.12);
}

.time-note {
  color: var(--ink-soft);
  font-size: 13px;
}

.hero-facts {
  margin: clamp(42px, 7vh, 76px) 0 0;
  padding: 0;
  max-width: 600px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.hero-facts div {
  padding: 20px 18px 0 0;
}

.hero-facts div + div {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.hero-facts dt {
  font-family: var(--display);
  font-size: 29px;
  line-height: 1;
}

.hero-facts dd {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.orbit-art {
  position: relative;
  width: min(100%, 600px);
  aspect-ratio: 1;
  justify-self: end;
}

.orbit-art::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: rgba(185, 223, 212, 0.2);
  filter: blur(1px);
}

.orbit-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: map-arrive 900ms cubic-bezier(0.21, 0.76, 0.3, 1) both;
}

.orbit-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.3;
}

.orbit-ring-middle {
  stroke-dasharray: 3 9;
}

.orbit-ring-inner {
  stroke: rgba(20, 44, 43, 0.27);
}

.orbit-path {
  fill: none;
  stroke: var(--mit, var(--mint));
  stroke-width: 2;
  stroke-linecap: round;
}

.orbit-path-small {
  stroke: var(--coral);
  stroke-width: 1.5;
  stroke-dasharray: 7 8;
}

.orbit-nodes circle {
  fill: var(--coral);
  stroke: var(--mist);
  stroke-width: 5;
}

.orbit-nodes circle:nth-child(2),
.orbit-nodes circle:nth-child(4) {
  fill: var(--ink);
}

.orbit-nodes circle:nth-child(3) {
  fill: var(--sun);
}

.compass-needle path {
  fill: var(--ink);
}

.compass-needle path + path {
  fill: var(--paper);
}

.compass-needle circle {
  fill: var(--coral);
  stroke: var(--mist);
  stroke-width: 5;
}

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130px;
  height: 130px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(234, 244, 242, 0.86);
  box-shadow: 0 0 0 17px rgba(234, 244, 242, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.orbit-core span {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.orbit-core strong {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 27px;
  letter-spacing: 0.08em;
}

.orbit-caption {
  position: absolute;
  z-index: 1;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.orbit-caption-top {
  left: 50%;
  top: 1%;
  transform: translateX(-50%);
}

.orbit-caption-right {
  right: -1%;
  top: 44%;
}

.orbit-caption-bottom {
  left: 37%;
  bottom: 0;
}

.orbit-caption-left {
  left: 0;
  top: 35%;
}

.site-footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.quiz-view {
  min-height: calc(100vh - 170px);
  padding: clamp(38px, 6vh, 72px) 0;
  display: flex;
  align-items: center;
}

.quiz-card {
  position: relative;
  width: 100%;
  min-height: 630px;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(rgba(248, 252, 251, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 252, 251, 0.03) 1px, transparent 1px),
    var(--ink-deep);
  background-size: 72px 72px;
  color: var(--paper);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
}

.quiz-card::after {
  content: "";
  position: absolute;
  right: -170px;
  bottom: -270px;
  width: 580px;
  height: 580px;
  border: 1px solid rgba(185, 223, 212, 0.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 64px rgba(185, 223, 212, 0.025),
    0 0 0 128px rgba(185, 223, 212, 0.02);
  pointer-events: none;
}

.quiz-rail {
  position: relative;
  z-index: 1;
  padding: 40px 32px;
  border-right: 1px solid var(--white-line);
  display: flex;
  flex-direction: column;
}

.text-button {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(248, 252, 251, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.text-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-button:hover {
  color: var(--paper);
}

.quiz-progress-copy {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.quiz-progress-copy span {
  color: rgba(248, 252, 251, 0.58);
  font-size: 12px;
}

.quiz-progress-copy strong {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
}

.progress-track {
  height: 3px;
  margin-top: 13px;
  background: rgba(248, 252, 251, 0.15);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  background: var(--coral);
  transition: width 300ms ease;
}

.rail-note {
  margin: 17px 0 0;
  color: rgba(248, 252, 251, 0.45);
  font-size: 11px;
  line-height: 1.7;
}

.question-stage {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(54px, 9vh, 100px) clamp(36px, 6vw, 86px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.question-count {
  margin: 0 0 16px;
  color: var(--mint);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.question-text {
  max-width: 700px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 3.7vw, 52px);
  font-weight: 600;
  line-height: 1.36;
  letter-spacing: -0.025em;
}

.question-prompt {
  margin: 18px 0 38px;
  color: rgba(248, 252, 251, 0.55);
  font-size: 13px;
}

.answer-list {
  max-width: 680px;
  border-top: 1px solid var(--white-line);
}

.answer-option {
  width: 100%;
  min-height: 61px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--white-line);
  background: transparent;
  color: var(--paper);
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  text-align: left;
  cursor: pointer;
  transition:
    background 150ms ease,
    padding 150ms ease;
}

.answer-option:hover,
.answer-option[aria-checked="true"] {
  padding-left: 14px;
  padding-right: 14px;
  background: rgba(185, 223, 212, 0.09);
}

.answer-option[aria-checked="true"] {
  background: rgba(243, 106, 79, 0.16);
}

.answer-marker {
  width: 17px;
  height: 17px;
  border: 1px solid rgba(248, 252, 251, 0.48);
  border-radius: 50%;
  position: relative;
}

.answer-option[aria-checked="true"] .answer-marker {
  border-color: var(--coral);
}

.answer-option[aria-checked="true"] .answer-marker::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--coral);
  border-radius: 50%;
}

.answer-label {
  font-size: 16px;
}

.answer-hint {
  color: rgba(248, 252, 251, 0.4);
  font-size: 11px;
}

.quiz-actions {
  margin-top: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.quiz-actions p {
  margin: 0;
  color: rgba(248, 252, 251, 0.4);
  font-size: 11px;
}

.secondary-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(248, 252, 251, 0.25);
  background: transparent;
  color: rgba(248, 252, 251, 0.8);
  font-size: 12px;
  cursor: pointer;
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(248, 252, 251, 0.65);
  color: var(--paper);
}

.secondary-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.result-view {
  padding: clamp(58px, 8vh, 96px) 0;
}

.result-heading {
  max-width: 920px;
}

.result-intro {
  margin-bottom: 16px;
}

.result-pair {
  margin: 0 0 21px;
  color: var(--coral);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.result-heading h1 {
  margin: 0;
  max-width: 900px;
  font-family: var(--display);
  font-size: clamp(47px, 6vw, 84px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.result-summary {
  max-width: 760px;
  margin: 23px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.9;
}

.result-grid {
  margin-top: clamp(42px, 7vh, 72px);
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1.26fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.result-grid > section,
.result-grid > aside {
  padding: clamp(28px, 4vw, 48px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-panel {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 40px);
}

.profile-orbit {
  position: relative;
  flex: 0 0 132px;
  width: 132px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.profile-orbit-ring {
  position: absolute;
  inset: 17px;
  border: 1px dashed rgba(20, 44, 43, 0.35);
  border-radius: 50%;
}

.profile-orbit-dot {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--coral);
  transform: translateX(-50%);
}

.profile-orbit-word {
  font-family: var(--display);
  font-size: 30px;
}

.panel-label {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 12px;
}

.profile-panel h2,
.dimension-panel h2,
.try-panel h2,
.notice-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 700;
}

.profile-panel p:last-child {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.panel-heading > span {
  padding-bottom: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.dimension-list {
  margin-top: 31px;
  display: grid;
  gap: 17px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 15px;
}

.dimension-name {
  font-size: 13px;
}

.dimension-track {
  height: 8px;
  overflow: hidden;
  background: rgba(20, 44, 43, 0.08);
}

.dimension-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--trait-color, var(--ink));
  animation: bar-grow 700ms cubic-bezier(0.22, 0.81, 0.3, 1) forwards;
}

.dimension-score {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 15px;
  text-align: right;
}

.try-panel {
  background: rgba(185, 223, 212, 0.25);
}

.try-panel ol {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: suggestion;
}

.try-panel li {
  position: relative;
  padding: 17px 0 17px 47px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
  counter-increment: suggestion;
}

.try-panel li::before {
  content: counter(suggestion, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  color: var(--coral);
  font-family: var(--display);
  font-size: 15px;
}

.notice-panel {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--paper);
}

.notice-panel > svg {
  flex: 0 0 33px;
  width: 33px;
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.notice-panel h2 {
  font-size: 24px;
}

.notice-panel p {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
}

.result-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.plain-button {
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.result-actions p {
  margin: 0 0 0 auto;
  color: var(--ink-soft);
  font-size: 12px;
}

.noscript-message {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  padding: 16px 20px;
  background: var(--ink);
  color: var(--paper);
  line-height: 1.7;
}

@keyframes map-arrive {
  from {
    opacity: 0;
    transform: rotate(-5deg) scale(0.97);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes bar-grow {
  to {
    width: var(--trait-score);
  }
}

@media (max-width: 1040px) {
  .home-view {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
    gap: 24px;
  }

  .orbit-caption {
    display: none;
  }

  .quiz-card {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .quiz-rail {
    padding: 34px 24px;
  }

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

@media (max-width: 820px) {
  .page-frame {
    padding: 0 20px;
  }

  .site-header {
    min-height: 76px;
  }

  .header-note {
    display: none;
  }

  .home-view {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 48px 0 66px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 12vw, 74px);
  }

  .orbit-art {
    width: min(78vw, 520px);
    margin: 14px auto 0;
    justify-self: center;
  }

  .orbit-caption {
    display: block;
  }

  .site-footer {
    min-height: 88px;
    padding: 20px 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
  }

  .quiz-view {
    min-height: auto;
    padding: 26px 0 42px;
  }

  .quiz-card {
    min-height: 680px;
    grid-template-columns: 1fr;
  }

  .quiz-rail {
    padding: 25px 26px 21px;
    border-right: 0;
    border-bottom: 1px solid var(--white-line);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px 24px;
    align-items: center;
  }

  .quiz-progress-copy {
    margin: 0;
    gap: 10px;
  }

  .quiz-progress-copy span {
    display: none;
  }

  .progress-track {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
  }

  .rail-note {
    display: none;
  }

  .question-stage {
    padding: 45px 26px 42px;
  }

  .question-text {
    font-size: clamp(30px, 7.5vw, 43px);
  }

  .result-view {
    padding: 48px 0 68px;
  }

  .result-heading h1 {
    font-size: clamp(45px, 10vw, 68px);
  }

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

  .profile-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .panel-heading > span {
    padding: 0;
  }

  .result-actions p {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .brand {
    letter-spacing: 0.07em;
  }

  .hero-intro {
    font-size: 12px;
    line-height: 1.7;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 9.3vw, 40px);
  }

  .hero-description {
    margin-top: 23px;
    font-size: 15px;
    line-height: 1.85;
  }

  .hero-action {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .primary-button {
    width: 100%;
    justify-content: space-between;
  }

  .hero-facts div {
    padding-right: 8px;
  }

  .hero-facts div + div {
    padding-left: 12px;
  }

  .hero-facts dt {
    font-size: 24px;
  }

  .hero-facts dd {
    font-size: 11px;
  }

  .orbit-art {
    width: 94vw;
    margin-left: -7vw;
  }

  .orbit-core {
    width: 105px;
    height: 105px;
  }

  .orbit-caption {
    display: none;
  }

  .question-count {
    margin-bottom: 12px;
  }

  .question-text {
    font-size: 30px;
    line-height: 1.42;
  }

  .question-prompt {
    margin-bottom: 26px;
  }

  .answer-option {
    min-height: 59px;
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .answer-hint {
    display: none;
  }

  .quiz-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .result-heading h1 {
    font-size: clamp(37px, 10vw, 43px);
  }

  .result-summary {
    font-size: 15px;
  }

  .result-grid > section,
  .result-grid > aside {
    padding: 28px 22px;
  }

  .dimension-row {
    grid-template-columns: 58px minmax(0, 1fr) 33px;
    gap: 10px;
  }

  .notice-panel {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
