:root {
  --bg: #f6f7fb;
  --bg-soft: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --line: #d9e0e8;
  --line-soft: #e5eaf0;
  --text: #111318;
  --text-soft: #2b3037;
  --text-muted: #6f7783;
  --accent: #111318;
  --accent-ink: #ffffff;
  --accent-soft: #eff2f6;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: min(920px, calc(100vw - 32px));
  --font-body: "Segoe UI Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.86), transparent 36%),
    linear-gradient(180deg, #f9fbfd 0%, #f3f5f8 100%);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.page-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.16;
}

.orb-a {
  width: 260px;
  height: 260px;
  top: -60px;
  left: 8%;
  background: rgba(197, 208, 255, 0.6);
}

.orb-b {
  width: 220px;
  height: 220px;
  top: 12%;
  right: 10%;
  background: rgba(232, 221, 255, 0.72);
}

.orb-c {
  width: 260px;
  height: 260px;
  bottom: -100px;
  left: 42%;
  background: rgba(211, 233, 255, 0.68);
}

.noise {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(17, 19, 24, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.016) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.08;
}

.app-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 16px 16px 32px;
}

.view {
  width: var(--container);
  margin: 0 auto;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  position: absolute;
  inset: 16px 0 32px;
  transition:
    opacity 0.34s var(--ease),
    transform 0.34s var(--ease);
}

.view.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
  inset: auto;
}

.view-home.is-active {
  min-height: calc(100vh - 48px);
}

.landing-shell {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.glass-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.98));
  background-color: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  width: min(760px, 100%);
  padding: clamp(32px, 5vw, 64px);
  text-align: center;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-card h1 {
  margin-top: 16px;
  font-size: clamp(56px, 12vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.hero-subtitle {
  width: min(480px, 100%);
  margin: 18px auto 0;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.65;
  color: var(--text-soft);
}

.hero-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-actions,
.result-actions,
.test-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  justify-content: center;
  margin-top: 28px;
}

.hero-meta {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.hero-banner {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f3f6fa;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

.hero-author {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-status {
  width: min(520px, 100%);
  margin: 18px auto 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.btn {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition:
    background-color 0.24s ease,
    border-color 0.24s ease,
    color 0.24s ease,
    transform 0.24s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-secondary,
.btn-ghost {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-secondary:hover:not(:disabled),
.btn-ghost:hover:not(:disabled) {
  background: #f3f6fa;
  border-color: #cfd7e2;
}

.btn-text:hover:not(:disabled) {
  color: var(--text-soft);
  background: rgba(17, 19, 24, 0.04);
}

.is-hidden {
  display: none;
}

.test-layout,
.result-stack {
  display: grid;
  gap: 16px;
}

.test-top {
  position: sticky;
  top: 12px;
  z-index: 5;
  padding: 18px 20px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.progress-count {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.progress-tag {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f6f8fb;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12px;
}

.progress-track {
  width: 100%;
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: #e7ecf2;
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #111318;
  transition: width 0.35s var(--ease);
}

.progress-hint {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}

.question-shell {
  min-height: calc(100vh - 240px);
  display: grid;
  place-items: center;
}

.question-card {
  width: min(760px, 100%);
  min-height: 420px;
  padding: clamp(26px, 4vw, 34px);
  display: grid;
  align-content: start;
  gap: 18px;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.question-card.is-switching {
  opacity: 0;
  transform: translateY(10px);
}

.question-index {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.question-title {
  font-size: clamp(26px, 4.6vw, 36px);
  line-height: 1.48;
  letter-spacing: -0.02em;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.option-button {
  position: relative;
  width: 100%;
  min-height: 82px;
  padding: 18px 18px 18px 72px;
  text-align: left;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.option-button:hover {
  transform: translateY(-1px);
  background: #f7f9fc;
  border-color: #ccd5e0;
}

.option-button:focus-visible,
.btn:focus-visible {
  outline: 2px solid #111318;
  outline-offset: 2px;
}

.option-key {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f2f5f8;
  color: var(--text);
  font-weight: 700;
}

.option-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-soft);
}

.test-bottom {
  justify-content: space-between;
  align-items: center;
}

.result-hero,
.result-section {
  padding: clamp(22px, 4vw, 30px);
}

.result-hero {
  display: grid;
  gap: 18px;
}

.result-page-title {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.result-summary {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 18px;
  align-items: stretch;
}

.summary-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.result-main {
  padding: 18px 20px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
}

#resultName {
  margin-top: 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.result-match-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: #111318;
  color: #ffffff;
  display: grid;
  align-content: space-between;
}

.result-match-card .summary-label {
  color: rgba(255, 255, 255, 0.68);
}

.match-value {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
  font-weight: 700;
}

.result-hit {
  font-size: clamp(18px, 2.8vw, 22px);
  line-height: 1.7;
  color: var(--text-soft);
}

.result-note {
  padding: 16px 18px;
  border-radius: 18px;
  background: #fafbfd;
  border: 1px solid var(--line-soft);
  color: var(--text-muted);
  line-height: 1.75;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-heading h3 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.analysis-grid,
.dimension-grid,
.meta-grid {
  display: grid;
  gap: 14px;
}

.analysis-grid,
.dimension-grid,
.meta-grid {
  grid-template-columns: 1fr 1fr;
}

.analysis-card,
.dimension-card,
.meta-card {
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
}

.analysis-card.is-wide {
  grid-column: 1 / -1;
}

.analysis-label,
.meta-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.analysis-body,
.friendly-note {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.82;
  color: var(--text-soft);
}

.dimension-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.dimension-code {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f4f8;
  color: var(--text);
  font-weight: 700;
}

.dimension-name {
  font-size: 15px;
  color: var(--text);
}

.dimension-score {
  font-size: 13px;
  color: var(--text-muted);
}

.dimension-description {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-muted);
}

.dimension-track {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: #ebf0f5;
  overflow: hidden;
}

.dimension-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #111318;
  transition: width 0.9s var(--ease);
}

.meta-value {
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.4;
  color: var(--text);
}

.similar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5f7fa;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
}

.result-actions {
  justify-content: flex-start;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 14px;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
  z-index: 20;
}

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

@media (max-width: 760px) {
  .analysis-grid,
  .dimension-grid,
  .meta-grid,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .test-bottom,
  .hero-actions,
  .result-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 12px 12px 24px;
  }

  .view {
    width: min(100%, calc(100vw - 24px));
    inset: 12px 0 24px;
  }

  .hero-card,
  .test-top,
  .question-card,
  .result-hero,
  .result-section {
    border-radius: 22px;
  }

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

  .question-title {
    font-size: 24px;
  }

  .option-button {
    min-height: 76px;
    padding: 16px 16px 16px 66px;
  }

  .progress-head {
    align-items: flex-start;
  }
}

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