:root {
  --bg: #f6f6f8;
  --ink: #152443;
  --muted: #9aa1ad;
  --line: #eceef2;
  --deep: #2f3d63;
  --soft: #ffffff;
  --danger: #b65c59;
  --virtue: #1f2937;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "SimSun", "Noto Serif SC", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button {
  font: inherit;
}

.report-link {
  position: fixed;
  top: 14px;
  right: 12px;
  z-index: 20;
  border: 0;
  background: transparent;
  color: #747984;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  cursor: pointer;
}

#app {
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home {
  justify-content: center;
  padding-bottom: 8px;
}

.seal {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(189, 161, 148, 0.045);
  color: var(--ink);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid rgba(183, 116, 109, 0.18);
  box-shadow:
    0 0 0 10px rgba(183, 116, 109, 0.035),
    0 0 0 20px rgba(183, 116, 109, 0.024),
    0 18px 58px rgba(30, 35, 48, 0.14);
  animation: seal-breathe 3.8s ease-in-out infinite;
}

.seal::before,
.seal::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  border: 1px solid rgba(183, 116, 109, 0.14);
}

.seal::after {
  inset: -18px;
  border-color: rgba(183, 116, 109, 0.09);
  animation: ring-breathe 3.8s ease-in-out infinite;
}

@keyframes seal-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 10px rgba(183, 116, 109, 0.035),
      0 0 0 20px rgba(183, 116, 109, 0.024),
      0 18px 58px rgba(30, 35, 48, 0.14);
  }
  50% {
    transform: scale(1.025);
    box-shadow:
      0 0 0 13px rgba(183, 116, 109, 0.045),
      0 0 0 25px rgba(183, 116, 109, 0.028),
      0 22px 70px rgba(30, 35, 48, 0.17);
  }
}

@keyframes ring-breathe {
  0%, 100% {
    opacity: 0.72;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.home h1 {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 1.6px;
  line-height: 1.12;
}

.subtitle,
.caption,
.footer-note {
  margin: 0;
  color: var(--muted);
  font-family: "SimSun", "Noto Serif SC", serif;
  font-size: 13px;
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 112px);
  gap: 12px;
  margin: 46px 0 44px;
}

.stat-card {
  height: 90px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.stat-card strong {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.stat-card span,
.footer-note {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.result-sub,
.tiny {
  font-family: "SimSun", "Noto Serif SC", serif;
}

.stat-card span {
  color: #858b98;
  font-size: 12px;
}

.primary-btn {
  min-width: 184px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(47, 61, 99, 0.18);
}

.card-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 36, 67, 0.18);
  backdrop-filter: blur(4px);
  animation: fadeReveal 0.2s ease both;
}

.card-dialog {
  position: relative;
  width: min(100%, 360px);
  padding: 30px 30px 26px;
  border: 1px solid rgba(213, 202, 196, 0.65);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 70px rgba(30, 35, 48, 0.18);
  text-align: center;
}

.card-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #9aa1ad;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.card-kicker {
  margin: 0 0 8px;
  color: #b47d73;
  font-size: 12px;
  letter-spacing: 2px;
}

.card-dialog h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 600;
}

.card-copy {
  margin: 9px 0 22px;
  color: #8d95a2;
  font-size: 13px;
  line-height: 1.7;
}

.card-label {
  display: block;
  margin-bottom: 8px;
  color: #697384;
  font-size: 12px;
  text-align: left;
}

.card-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  outline: 0;
  background: #fbfbfc;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  text-align: center;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.card-input:focus {
  border-color: rgba(47, 61, 99, 0.5);
  box-shadow: 0 0 0 3px rgba(47, 61, 99, 0.08);
}

.card-error {
  min-height: 20px;
  margin: 8px 0 2px;
  color: #b65c59;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  text-align: left;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-top: 6px;
}

.card-actions button {
  height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.card-cancel {
  border: 1px solid #e2e5e9;
  background: #fff;
  color: #8c94a0;
}

.card-confirm {
  border: 1px solid transparent;
  background: var(--deep);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 61, 99, 0.14);
}

.card-actions button:disabled,
.card-input:disabled {
  cursor: wait;
  opacity: 0.65;
}

.footer-note {
  margin-top: 30px;
  font-size: 12px;
  text-align: center;
}

.filing-link {
  display: inline-block;
  min-width: 190px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  color: #a8aeba;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  text-decoration: none;
}

.filing-link:hover {
  color: #697384;
  text-decoration: underline;
}

.quiz {
  padding-top: 30px;
  padding-bottom: 116px;
}

.progress-row {
  width: 376px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #888f9b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
}

.progress-track {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: #e2e4e8;
  overflow: hidden;
}

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

.question-wrap {
  width: 372px;
  margin-top: 142px;
  animation: questionEnter 0.34s cubic-bezier(0.2, 0.68, 0.22, 1) both;
  will-change: opacity, transform;
}

.question-wrap.leaving {
  opacity: 0;
  transform: translate3d(0, -7px, 0);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.q-index {
  color: #9da4b1;
  font-size: 12px;
  margin-bottom: 14px;
  font-weight: 400;
  animation: fadeReveal 0.3s ease both;
}

.q-title {
  margin: 0 0 38px;
  color: #07183a;
  font-size: 20px;
  line-height: 1.62;
  font-weight: 500;
  letter-spacing: 0;
  animation: fadeReveal 0.34s ease 0.03s both;
}

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

.option {
  width: 100%;
  min-height: 50px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e7e8eb;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  color: #16223b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  animation: fadeReveal 0.3s ease both;
}

.option:nth-child(1) {
  animation-delay: 0.04s;
}

.option:nth-child(2) {
  animation-delay: 0.055s;
}

.option:nth-child(3) {
  animation-delay: 0.07s;
}

.option:nth-child(4) {
  animation-delay: 0.085s;
}

.option:nth-child(5) {
  animation-delay: 0.1s;
}

.option:hover,
.option.selected {
  border-color: rgba(47, 61, 99, 0.26);
  box-shadow: 0 6px 18px rgba(47, 61, 99, 0.08);
}

.option:active {
  transform: scale(0.99);
}

.option:disabled {
  opacity: 1;
  cursor: default;
}

.radio {
  width: 16px;
  height: 16px;
  margin-left: 13px;
  border: 1px solid #e6e7ea;
  border-radius: 50%;
  flex: 0 0 auto;
}

.option.selected .radio {
  border: 4px solid var(--deep);
}

.binary .option {
  min-height: 68px;
  justify-content: center;
  text-align: center;
  line-height: 1.7;
  padding: 14px 24px;
}

.binary .radio {
  display: none;
}

.nav-row {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 182px 182px;
  gap: 12px;
}

.nav-btn {
  height: 49px;
  border: 1px solid #e4e5e8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  color: #9aa0aa;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.nav-btn.next {
  border-color: transparent;
  background: #c8ccd5;
  color: #fff;
}

.nav-btn.ready {
  background: var(--deep);
}

@keyframes questionEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .question-wrap,
  .question-wrap.leaving,
  .q-index,
  .q-title,
  .option {
    animation: none;
  }

  .option,
  .progress-fill {
    transition: none;
  }
}

.loading {
  justify-content: center;
  gap: 20px;
}

.loader {
  position: relative;
  width: 116px;
  height: 116px;
  border: 2px solid #cbd0da;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid #aeb5c3;
  border-radius: 50%;
}

.loader::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--deep);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 1; }
}

.loading p {
  margin: 0;
  color: #768092;
  font-size: 16px;
  letter-spacing: 4px;
}

.results {
  width: 402px;
  margin: 0 auto;
  padding: 15px 0 30px;
  min-height: 100vh;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
}

.result-header {
  text-align: center;
  margin: -15px 0 0;
  padding: 15px 8px 8px;
  background: rgba(250, 248, 245, 0.78);
  border-bottom: 1px solid rgba(213, 202, 196, 0.28);
}

.tiny {
  margin: 0 0 6px;
  color: #a8aeba;
  font-size: 11px;
  letter-spacing: 4.5px;
}

.result-header h2 {
  margin: 0;
  color: #10254b;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 700;
}

.result-sub {
  margin: 6px 0 8px;
  color: #5c6574;
  font-size: 11px;
  font-weight: 500;
}

.pill {
  border: 1px solid #dfe3ea;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 4px 17px;
  color: #263553;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(31, 41, 55, 0.04);
}

.duel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 3px 7px 0 13px;
}

.duel-card {
  min-height: 109px;
  border: 1px solid #dde1e8;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 11px 9px;
  text-align: center;
}

.duel-card.red {
  color: #a64f49;
  border-color: #ecd8d4;
  background: rgba(255, 248, 246, 0.72);
}

.duel-card small {
  display: block;
  font-size: 12px;
  color: #1c2b4b;
  margin-bottom: 4px;
  font-weight: 700;
}

.duel-card.red small {
  color: #a64f49;
}

.duel-card strong {
  display: block;
  color: #10254b;
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 4px;
  font-weight: 700;
}

.duel-card.red strong {
  color: #a64f49;
}

.duel-card span {
  color: #9a9da5;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
}

.balance-strip {
  margin: -1px 5px 3px 15px;
  text-align: center;
}

.balance-line {
  position: relative;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(to right, #252932 0 50%, #bd6c67 50% 100%);
}

.balance-line::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 2px;
  height: 14px;
  background: #f3f4f6;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.axis-note {
  display: flex;
  justify-content: space-between;
  color: #a2a8b2;
  font-size: 11px;
  padding: 2px 0 0;
  line-height: 12px;
}

.balance-strip p {
  margin: 3px 0 0;
  color: #a0a6b1;
  font-family: inherit;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
}

.balance-strip strong {
  color: #263553;
  font-size: 17px;
}

.panel {
  margin-top: 8px;
  padding: 17px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.panel h3 {
  margin: 0 0 10px;
  color: #25304c;
  font-size: 15px;
  font-weight: 700;
}

.chart-box {
  text-align: center;
  margin-left: 7px;
  margin-right: 0;
  margin-top: 3px;
  padding: 11px 7px 13px;
  border: 1px solid #edf0f4;
  border-radius: 12px;
}

.chart-box h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.chart-box .result-sub {
  margin: 5px 0 7px;
  font-size: 13px;
}

#radar {
  width: 358px;
  height: 358px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: #9299a5;
  font-size: 12px;
}

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 5px;
  border: 1px solid currentColor;
}

.prose {
  color: #4b5565;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 13px;
  line-height: 1.78;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #25304c;
  font-weight: 700;
  font-size: 15px;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 2px;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.dark-insight .section-icon { background: #263553; }
.light-insight .section-icon { background: #263553; }
.duel-insight .section-icon { background: #a44f4a; }
.path-panel .section-icon { background: #6b9976; }

.insight-panel .score-title {
  margin-top: 15px;
}

.insight-panel .score-title strong {
  font-size: 21px;
}

.insight-panel .score-title span {
  color: #9299a5;
  font-size: 14px;
}

.insight-label {
  margin: 12px 0 3px;
  color: #68758a;
  font-size: 11px;
  line-height: 1.4;
}

.insight-panel .insight-label + p {
  margin-top: 0;
}

.path-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 12px;
}

.path-step b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #b8d0bb;
  border-radius: 50%;
  background: #e9f1e9;
  color: #6b9976;
  font-size: 14px;
}

.path-step p {
  margin: 0;
}

.path-step strong {
  color: #10254b;
  font-size: 14px;
}

.score-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 12px 0 8px;
}

.score-title strong {
  color: #25304c;
  font-size: 18px;
}

.bar {
  height: 4px;
  background: #eef0f3;
  border-radius: 99px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #697384 0%, #1f2937 100%);
}

.bar i.virtue-bar {
  background: linear-gradient(90deg, #dba19c 0%, #a6534e 100%);
}

.metric {
  padding: 14px 0;
  border-bottom: 1px solid #edf0f3;
}

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

.metric p {
  margin: 7px 0 0;
  color: #6c7482;
  font-size: 13px;
  line-height: 1.6;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 18px;
}

.actions button {
  height: 48px;
  border-radius: 10px;
  border: 1px solid #e6e8ed;
  background: #fff;
  color: #7e8794;
  font-weight: 700;
  cursor: pointer;
}

.actions .primary {
  border-color: transparent;
  background: var(--deep);
  color: #fff;
}

.actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.export-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #6b9976;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  text-align: center;
}

.assistant-bot {
  position: fixed;
  right: 28px;
  bottom: 14px;
  width: 72px;
  height: 86px;
  z-index: 12;
  filter: drop-shadow(0 2px 0 #142c77);
}

.bot-head,
.bot-body,
.bot-arm,
.bot-leg {
  position: absolute;
  background: #4c82f2;
  border: 3px solid #142c77;
}

.bot-head {
  left: 7px;
  top: 2px;
  width: 58px;
  height: 48px;
  border-radius: 20px;
}

.bot-head::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 36px;
  height: 24px;
  border-radius: 8px;
  background: #1f376c;
}

.bot-head span {
  position: absolute;
  top: 20px;
  z-index: 2;
  width: 8px;
  height: 4px;
  border: 2px solid #7ef2ff;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.bot-head span:first-child {
  left: 19px;
}

.bot-head span:last-child {
  right: 19px;
}

.bot-body {
  left: 13px;
  top: 43px;
  width: 47px;
  height: 33px;
  border-radius: 14px;
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 13px/1 monospace;
}

.bot-arm {
  top: 53px;
  width: 10px;
  height: 24px;
  border-radius: 99px;
}

.bot-arm-left {
  left: 4px;
  transform: rotate(22deg);
}

.bot-arm-right {
  right: 4px;
  transform: rotate(-22deg);
}

.bot-leg {
  top: 70px;
  width: 11px;
  height: 18px;
  border-radius: 99px;
}

.bot-leg-left {
  left: 21px;
}

.bot-leg-right {
  right: 21px;
}

@media (max-width: 720px) {
  .assistant-bot {
    transform: scale(0.72);
    transform-origin: right bottom;
  }

  .home {
    padding: 26px 18px 72px;
  }

  .home h1 {
    font-size: 28px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    width: min(100%, 338px);
  }

  .progress-row,
  .question-wrap,
  .results {
    width: min(100% - 32px, 473px);
  }

  .question-wrap {
    margin-top: 118px;
  }

  .q-title {
    font-size: 20px;
  }

  .nav-row {
    width: min(100% - 32px, 376px);
    grid-template-columns: 1fr 1fr;
  }
}
