:root {
  color-scheme: dark;
  --bg: #0b1113;
  --surface: #11191c;
  --surface-strong: #172125;
  --line: rgba(229, 238, 231, 0.16);
  --line-strong: rgba(229, 238, 231, 0.34);
  --ink: #eef2ea;
  --muted: #9aa7a1;
  --teal: #4cc7b1;
  --gold: #e9bd68;
  --coral: #ec7867;
  --green: #48c98b;
  --red: #f06e6b;
  --blue: #58b8d4;
  --ivory: #dfe7d7;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: rgba(11, 17, 19, 0.72);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

kbd {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 1px 5px;
  border: 1px solid rgba(238, 242, 234, 0.34);
  border-bottom-width: 3px;
  border-radius: 4px;
  background: rgba(5, 9, 10, 0.58);
  color: var(--ivory);
  font-family: Consolas, monospace;
  font-size: 0.56em;
  line-height: 1;
  vertical-align: 0.12em;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

#arenaBackdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 13, 15, 0.95) 0%, rgba(8, 13, 15, 0.72) 48%, rgba(8, 13, 15, 0.5) 100%);
}

.site-header {
  width: min(1180px, calc(100% - 48px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: rgba(11, 17, 19, 0.82);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.unofficial {
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.app-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
}

.screen {
  min-height: calc(100vh - 78px);
}

.screen[hidden] {
  display: none;
}

.intro-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 40px;
  align-items: center;
  padding: 52px 0 86px;
}

.eyebrow,
.section-heading p,
.question-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.intro-copy h1,
.result-heading h1 {
  margin: 20px 0 0;
  max-width: 760px;
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-copy h1 {
  font-size: clamp(44px, 5vw, 64px);
}

.intro-copy h1 span,
.result-heading h1 span {
  color: var(--gold);
}

.intro-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: #bcc7c1;
  font-size: 17px;
  line-height: 1.8;
}

.intro-challenge {
  width: fit-content;
  margin: 18px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--coral);
  color: #ef9184;
  font-size: 13px;
  font-weight: 700;
}

.role-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 650px;
  margin: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.role-strip span {
  min-width: 0;
  padding: 16px 8px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  border-right: 1px solid var(--line);
}

.role-strip span:last-child {
  border-right: 0;
}

.role-strip b {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  border: 1px solid var(--line-strong);
  color: var(--ivory);
  line-height: 26px;
}

.role-strip i {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--ivory);
  font-size: 11px;
  font-style: normal;
}

.primary-command,
.secondary-command,
.next-command {
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 190px;
  padding: 0 22px;
  background: var(--gold);
  color: #121717;
  font-weight: 800;
  text-decoration: none;
}

.primary-command:hover,
.next-command:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #f4cc7c;
}

.primary-command.compact {
  min-width: 154px;
}

.arena-radar {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 460px);
  justify-self: end;
  display: grid;
  place-items: center;
  border: 1px solid rgba(76, 199, 177, 0.2);
  background: rgba(8, 14, 16, 0.48);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.arena-radar::before,
.arena-radar::after {
  content: "";
  position: absolute;
  background: rgba(76, 199, 177, 0.22);
}

.arena-radar::before {
  width: 1px;
  height: 100%;
}

.arena-radar::after {
  width: 100%;
  height: 1px;
}

.radar-orbit {
  position: absolute;
  border: 1px solid rgba(233, 189, 104, 0.32);
  transform: rotate(45deg);
}

.orbit-one {
  width: 62%;
  height: 62%;
}

.orbit-two {
  width: 36%;
  height: 36%;
  border-color: rgba(76, 199, 177, 0.48);
}

.radar-core {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  display: grid;
  place-content: center;
  border: 1px solid var(--gold);
  background: rgba(11, 17, 19, 0.9);
  text-align: center;
  box-shadow: 0 0 42px rgba(233, 189, 104, 0.18);
}

.radar-core span {
  color: var(--gold);
  font-size: 38px;
  font-weight: 800;
}

.radar-core small {
  color: var(--muted);
}

.radar-label {
  position: absolute;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: rgba(11, 17, 19, 0.82);
  color: var(--ivory);
  font-size: 11px;
}

.label-one { top: 11%; left: 45%; }
.label-two { top: 32%; right: 8%; }
.label-three { right: 16%; bottom: 13%; }
.label-four { left: 14%; bottom: 17%; }
.label-five { top: 35%; left: 7%; }

.quiz-screen {
  padding: 36px 0 80px;
}

.quiz-topline {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  max-width: 840px;
  margin: 0 auto;
}

.icon-command {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(17, 25, 28, 0.76);
  cursor: pointer;
}

.icon-command:disabled {
  opacity: 0.32;
  cursor: default;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.progress-track {
  height: 4px;
  background: rgba(238, 242, 234, 0.12);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  background: var(--gold);
  transition: width 260ms ease;
}

.question-stage {
  width: min(840px, 100%);
  margin: 72px auto 0;
}

.question-stage h2 {
  margin: 16px 0 34px;
  max-width: 780px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.3;
  letter-spacing: 0;
}

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

.choice {
  min-height: 108px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(17, 25, 28, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.choice:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(23, 33, 37, 0.94);
}

.choice[aria-checked="true"] {
  border-color: var(--gold);
  background: rgba(51, 47, 31, 0.92);
}

.choice-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.choice-text {
  line-height: 1.65;
}

.next-command {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-top: 18px;
  background: var(--gold);
  color: #111717;
  font-weight: 800;
}

.next-command:disabled {
  background: rgba(238, 242, 234, 0.1);
  color: #64706b;
  cursor: not-allowed;
}

.result-screen {
  padding: 62px 0 50px;
}

.result-heading {
  padding-bottom: 54px;
}

.result-overline {
  margin: 22px 0 0;
  color: var(--teal);
  font-size: 16px;
  font-weight: 800;
}

.result-heading h1 {
  font-size: clamp(42px, 6vw, 72px);
}

.result-heading h1 em {
  font-size: 0.58em;
  font-style: normal;
  vertical-align: 0.1em;
}

.result-heading > p:last-child {
  max-width: 720px;
  margin: 22px 0 0;
  color: #bbc6c0;
  font-size: 16px;
  line-height: 1.8;
}

.result-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: 0;
}

.score-bars,
.trait-list {
  margin-top: 28px;
}

.score-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
}

.score-role {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-role strong {
  white-space: nowrap;
}

.score-role small {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.score-row:first-child {
  margin-top: 0;
}

.score-row strong,
.score-row span {
  font-size: 12px;
}

.score-row > span:last-child {
  color: var(--muted);
  text-align: right;
}

.score-line {
  height: 8px;
  background: rgba(238, 242, 234, 0.1);
  overflow: hidden;
}

.score-line span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.score-row.is-primary .score-line span {
  background: var(--gold);
}

.trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trait-chip {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(17, 25, 28, 0.76);
  color: var(--ivory);
  font-size: 13px;
}

.trait-chip.is-top {
  border-color: var(--teal);
  color: #8ce4d4;
}

.hero-section {
  padding: 56px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.hero-card {
  position: relative;
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--card-accent);
}

.hero-card.tone-green {
  --card-accent: var(--green);
  border-color: rgba(72, 201, 139, 0.38);
  background: #102a21;
}

.hero-card.tone-red {
  --card-accent: var(--red);
  border-color: rgba(240, 110, 107, 0.4);
  background: #30191b;
}

.hero-card.tone-blue {
  --card-accent: var(--blue);
  border-color: rgba(88, 184, 212, 0.4);
  background: #122831;
}

.hero-number {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.hero-card h3 {
  margin: 34px 0 10px;
  font-size: 28px;
}

.hero-card h3 span {
  font-size: 19px;
  vertical-align: 0.1em;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-tag {
  display: inline-block;
  margin-top: 22px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  color: var(--card-accent);
  font-size: 11px;
}

.share-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.share-copy {
  flex: 1;
  max-width: 600px;
}

.share-prompt {
  max-width: 560px;
  margin: 16px 0 0;
  color: #c9d2cd;
  line-height: 1.75;
}

.share-copy label {
  display: block;
  margin: 24px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.share-copy input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(8, 14, 16, 0.82);
  color: var(--ink);
}

.share-copy input::placeholder {
  color: #65716c;
}

.share-actions {
  display: flex;
  gap: 10px;
}

.secondary-command {
  min-width: 140px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 25, 28, 0.82);
}

.secondary-command:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
}

.growth-section {
  padding: 68px 0 54px;
  border-bottom: 1px solid var(--line);
}

.growth-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 60px;
  align-items: end;
}

.growth-lead h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1.18;
  letter-spacing: 0;
}

.growth-lead h2 span {
  color: var(--coral);
}

.growth-lead > p:last-child {
  margin: 0;
  color: #bcc7c1;
  line-height: 1.8;
}

.growth-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.douyin-block,
.qr-block {
  min-height: 254px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.douyin-block {
  padding: 28px;
  background: #2b171a;
  border-color: rgba(240, 110, 107, 0.42);
}

.douyin-block > p,
.qr-copy > p {
  margin: 0;
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
}

.douyin-block h3,
.qr-copy h3 {
  margin: 10px 0 0;
  font-size: 22px;
}

.douyin-block > strong {
  display: block;
  margin-top: 22px;
  color: #fff0ed;
  font-family: Consolas, monospace;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0;
}

.douyin-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.qr-block {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 26px;
  background: #13272a;
  border-color: rgba(76, 199, 177, 0.38);
}

.qr-frame {
  width: 176px;
  height: 176px;
  padding: 8px;
  border-radius: 4px;
  background: #f4f7f1;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.qr-copy > p {
  color: var(--teal);
}

.qr-copy > span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.qr-copy .text-command {
  margin-top: 18px;
  padding: 0;
  color: var(--ivory);
}

.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  color: var(--muted);
  font-size: 11px;
}

.text-command {
  border: 0;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #152024;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 860px) {
  .intro-screen {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .arena-radar {
    width: min(100%, 380px);
    justify-self: start;
  }

  .result-band {
    grid-template-columns: 1fr;
    gap: 46px;
  }

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

  .hero-card {
    min-height: 0;
  }

  .hero-card h3 {
    margin-top: 22px;
  }

  .share-section {
    align-items: stretch;
    flex-direction: column;
  }

  .growth-lead,
  .growth-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body::before {
    background: rgba(8, 13, 15, 0.78);
  }

  .site-header,
  .app-shell {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    height: 68px;
  }

  .brand strong {
    font-size: 13px;
  }

  .unofficial {
    display: none;
  }

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

  .intro-screen {
    padding: 38px 0 56px;
  }

  .intro-copy h1,
  .result-heading h1 {
    font-size: 38px;
  }

  .intro-lead {
    font-size: 15px;
  }

  .role-strip {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    overflow-x: auto;
  }

  .role-strip span {
    padding-inline: 4px;
    font-size: 10px;
  }

  .role-strip i {
    gap: 3px;
    font-size: 9px;
  }

  .arena-radar {
    width: 100%;
  }

  .quiz-screen {
    padding-top: 22px;
  }

  .question-stage {
    margin-top: 46px;
  }

  .question-stage h2 {
    font-size: 29px;
  }

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

  .choice {
    min-height: 84px;
  }

  .result-screen {
    padding-top: 40px;
  }

  .result-heading {
    padding-bottom: 42px;
  }

  .score-row {
    grid-template-columns: 92px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .score-role {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .score-role small {
    font-size: 9px;
  }

  .share-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .share-actions button {
    width: 100%;
  }

  .result-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .growth-section {
    padding-top: 52px;
  }

  .growth-lead {
    gap: 22px;
  }

  .growth-tools {
    gap: 12px;
  }

  .douyin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .douyin-actions > * {
    width: 100%;
  }

  .qr-block {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }

  .qr-frame {
    width: 132px;
    height: 132px;
  }

  .qr-copy h3 {
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .qr-block {
    grid-template-columns: 1fr;
  }

  .qr-frame {
    width: 150px;
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
