:root {
  color-scheme: light;
  --bg: #f1f3ef;
  --surface: rgba(250, 251, 248, 0.82);
  --surface-solid: #fafbf8;
  --surface-strong: #e7eae4;
  --text: #171a17;
  --muted: #666d65;
  --line: rgba(23, 26, 23, 0.13);
  --accent: #b9f227;
  --accent-strong: #91c800;
  --accent-ink: #1a2207;
  --danger: #d4513d;
  --shadow: 0 22px 70px rgba(49, 57, 43, 0.12);
  --radius: 18px;
  --radius-small: 12px;
  --max: 1180px;
  --font:
    "Avenir Next", Avenir, "Helvetica Neue", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111411;
  --surface: rgba(25, 29, 25, 0.82);
  --surface-solid: #191d19;
  --surface-strong: #252b24;
  --text: #eef1eb;
  --muted: #a5ada3;
  --line: rgba(238, 241, 235, 0.13);
  --accent: #b9f227;
  --accent-strong: #c9ff38;
  --accent-ink: #151b06;
  --danger: #ff7a66;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
  opacity: 0.45;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%);
}

.ambient-one {
  top: -24vw;
  right: -10vw;
}

.ambient-two {
  bottom: -30vw;
  left: -20vw;
  opacity: 0.22;
}

.site-header {
  width: min(calc(100% - 40px), var(--max));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 4px;
  border-radius: 9px;
  background: var(--text);
}

.brand-mark span {
  border-radius: 2px;
  background: var(--accent);
}

.brand-mark span:nth-child(2) {
  opacity: 0.45;
}

.brand-mark span:nth-child(3) {
  opacity: 0.7;
}

.theme-toggle,
.icon-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.theme-toggle {
  padding: 0 16px;
}

.theme-toggle:hover,
.icon-button:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 25%, transparent);
}

.theme-toggle:active,
.icon-button:active,
.button:active,
.option:active {
  transform: scale(0.98);
}

.theme-icon {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 5px -4px 0 -3px var(--surface-solid);
}

main {
  width: min(calc(100% - 40px), var(--max));
  min-height: calc(100dvh - 144px);
  margin: 0 auto;
}

main:focus {
  outline: none;
}

.home {
  min-height: calc(100dvh - 144px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
  padding: 44px 0 72px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 7.2vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.065em;
  font-weight: 760;
}

.hero-title strong {
  position: relative;
  display: inline-block;
  color: var(--text);
  font-weight: inherit;
}

.hero-title strong::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.02em;
  right: -0.06em;
  bottom: 0.04em;
  height: 0.23em;
  border-radius: 999px;
  background: var(--accent);
  transform: rotate(-1.5deg);
}

.hero-copy {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 740;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button-primary {
  background: var(--text);
  color: var(--bg);
}

.button-primary:hover {
  background: color-mix(in srgb, var(--text) 88%, var(--accent));
}

.button-secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface);
}

.arrow {
  font-size: 19px;
  line-height: 1;
}

.time-note {
  color: var(--muted);
  font-size: 14px;
}

.dimension-map {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 13px;
  transform: rotate(2deg);
}

.dimension-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition:
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 260ms ease;
}

.dimension-card:nth-child(2),
.dimension-card:nth-child(3) {
  transform: translateY(24px);
}

.dimension-card:hover {
  transform: translateY(-5px) rotate(-1deg);
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
}

.dimension-card:nth-child(2):hover,
.dimension-card:nth-child(3):hover {
  transform: translateY(19px) rotate(-1deg);
}

.dimension-number {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
}

.dimension-card h2 {
  margin: 48px 0 10px;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.dimension-card p {
  max-width: 18ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dimension-card::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  right: -26px;
  bottom: -30px;
  border: 14px solid var(--accent);
  border-radius: 50%;
  opacity: 0.75;
}

.test-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 0 80px;
}

.test-topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 48px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.progress-track {
  position: relative;
  height: 5px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.progress-fill {
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--accent-strong);
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dimension-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 700;
}

.question-panel {
  min-height: 530px;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.question-kicker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.question-title {
  max-width: 760px;
  margin: 22px 0 34px;
  font-size: clamp(27px, 4.8vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.045em;
  font-weight: 720;
}

.options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: auto;
}

.option {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.option:hover {
  border-color: color-mix(in srgb, var(--accent-strong) 65%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.option.selected {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: var(--accent-ink);
}

.option-value {
  font-family: var(--mono);
  font-size: 12px;
  opacity: 0.62;
}

.option-label {
  font-size: 15px;
  font-weight: 720;
  line-height: 1.35;
}

.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.question-nav .button {
  min-width: 128px;
}

.button[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.question-hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.result {
  padding: 34px 0 86px;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(42px, 8vw, 110px);
  align-items: center;
  min-height: 580px;
}

.level-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.result-title {
  margin: 22px 0 20px;
  font-size: clamp(56px, 9vw, 112px);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.result-summary {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.score-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 30px;
}

.score-line strong {
  font-family: var(--mono);
  font-size: 44px;
  letter-spacing: -0.05em;
}

.score-line span {
  color: var(--muted);
}

.radar-wrap {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.radar-canvas {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 30px color-mix(in srgb, var(--accent) 12%, transparent));
}

.radar-label {
  position: absolute;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.radar-label strong {
  color: var(--text);
  font-family: var(--mono);
}

.radar-label.top {
  top: 1%;
  left: 50%;
  transform: translateX(-50%);
}

.radar-label.right {
  top: 50%;
  right: -3%;
  transform: translateY(-50%);
}

.radar-label.bottom {
  bottom: 1%;
  left: 50%;
  transform: translateX(-50%);
}

.radar-label.left {
  top: 50%;
  left: -3%;
  transform: translateY(-50%);
}

.result-details {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 38px;
}

.insight {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.insight-accent {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 25%, var(--surface-solid)), var(--surface));
}

.insight h2 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.insight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.insight-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 34px;
  align-items: center;
}

.action-number {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: clamp(62px, 9vw, 100px);
  font-weight: 800;
  letter-spacing: -0.08em;
}

.gate-note {
  margin-top: 18px;
  padding: 15px 17px;
  border-left: 4px solid var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--muted);
  line-height: 1.55;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.site-footer {
  width: min(calc(100% - 40px), var(--max));
  min-height: 72px;
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

.fade-in {
  animation: enter 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (max-width: 900px) {
  .home,
  .result-hero,
  .result-details {
    grid-template-columns: 1fr;
  }

  .home {
    padding-top: 52px;
  }

  .dimension-map {
    min-height: 460px;
    margin-top: 10px;
  }

  .result-hero {
    padding-top: 30px;
  }

  .radar-wrap {
    width: min(92vw, 520px);
    margin: 0 auto;
  }

  .insight-wide {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

  .option {
    min-height: 64px;
    flex-direction: row;
    align-items: center;
  }

  .question-panel {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 28px), var(--max));
  }

  .site-header {
    height: 64px;
  }

  .theme-label {
    display: none;
  }

  .theme-toggle {
    width: 42px;
    padding: 0;
  }

  .home {
    min-height: auto;
    padding: 54px 0 70px;
  }

  .hero-title {
    font-size: clamp(44px, 15vw, 68px);
  }

  .hero-actions,
  .question-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .question-nav .button {
    width: 100%;
  }

  .time-note {
    text-align: center;
  }

  .dimension-map {
    min-height: 520px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    transform: none;
  }

  .dimension-card,
  .dimension-card:nth-child(2),
  .dimension-card:nth-child(3) {
    min-height: 132px;
    transform: none;
  }

  .dimension-card h2 {
    margin-top: 24px;
  }

  .test-shell {
    padding-top: 18px;
  }

  .test-topbar {
    grid-template-columns: 1fr;
    margin-bottom: 24px;
  }

  .dimension-chip {
    justify-self: start;
  }

  .question-panel {
    padding: 24px 20px;
  }

  .question-title {
    margin-bottom: 28px;
  }

  .question-hint {
    order: -1;
  }

  .result-title {
    font-size: clamp(54px, 20vw, 84px);
  }

  .radar-label {
    font-size: 10px;
  }

  .radar-label.right {
    right: -2%;
  }

  .radar-label.left {
    left: -2%;
  }

  .insight {
    padding: 24px;
  }

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

@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;
  }
}

@supports not (backdrop-filter: blur(18px)) {
  .dimension-card,
  .question-panel {
    background: var(--surface-solid);
  }
}
