:root {
  color-scheme: light;
  --a: oklch(0.58 0.17 258);
  --a-soft: oklch(0.95 0.025 258);
  --b: oklch(0.61 0.14 145);
  --b-soft: oklch(0.95 0.025 145);
  --c: oklch(0.67 0.16 38);
  --c-soft: oklch(0.95 0.03 38);
  --d: oklch(0.79 0.16 83);
  --d-ink: oklch(0.42 0.10 76);
  --d-soft: oklch(0.96 0.035 83);
  --ink: oklch(0.24 0.02 255);
  --ink-soft: oklch(0.43 0.02 255);
  --muted: oklch(0.51 0.018 255);
  --bg: oklch(0.985 0.004 85);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.965 0.006 85);
  --line: oklch(0.89 0.008 85);
  --line-strong: oklch(0.75 0.012 85);
  --success: oklch(0.54 0.13 148);
  --danger: oklch(0.56 0.16 28);
  --focus: oklch(0.62 0.15 248);
  --shadow-small: 0 2px 8px oklch(0.24 0.02 255 / 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --z-sticky: 20;
  --z-toast: 60;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, oklch(0.94 0.04 258 / 0.55), transparent 28rem),
    radial-gradient(circle at 90% 5%, oklch(0.96 0.05 83 / 0.55), transparent 24rem),
    var(--bg);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px
    max(40px, calc(env(safe-area-inset-bottom) + 24px));
}

.landing-shell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: max(28px, env(safe-area-inset-top));
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.brand-flower {
  position: relative;
  width: 24px;
  height: 24px;
}

.brand-flower i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 10px 2px 10px 2px;
  transform-origin: 12px 12px;
}

.brand-flower i:nth-child(1) {
  background: var(--a);
  transform: rotate(0deg);
}

.brand-flower i:nth-child(2) {
  background: var(--b);
  transform: rotate(90deg);
}

.brand-flower i:nth-child(3) {
  background: var(--d);
  transform: rotate(180deg);
}

.brand-flower i:nth-child(4) {
  background: var(--c);
  transform: rotate(270deg);
}

.hero {
  padding: 48px 0 28px;
}

.hero-visual {
  position: relative;
  width: min(76vw, 300px);
  aspect-ratio: 1;
  margin: 0 auto 34px;
}

.hero-orbit {
  position: absolute;
  inset: 8%;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 16%;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero-orbit::after {
  inset: 36%;
  border-color: var(--line-strong);
}

.hero-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  font-weight: 750;
  box-shadow: var(--shadow-small);
}

.hero-node small {
  display: block;
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
}

.hero-node.a {
  left: 4%;
  top: 15%;
  background: var(--a);
}

.hero-node.b {
  right: 4%;
  top: 15%;
  background: var(--b);
}

.hero-node.c {
  left: 4%;
  bottom: 15%;
  background: var(--c);
}

.hero-node.d {
  right: 4%;
  bottom: 15%;
  color: var(--ink);
  background: var(--d);
}

.hero-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 4px 8px oklch(0.24 0.02 255 / 0.12);
  transform: translate(-50%, -50%);
}

.hero-core::before,
.hero-core::after {
  content: "";
  position: absolute;
  top: 38px;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.hero-core::before {
  left: 28px;
}

.hero-core::after {
  right: 28px;
}

.hero-smile {
  position: absolute;
  left: 34px;
  top: 54px;
  width: 20px;
  height: 9px;
  border-bottom: 3px solid var(--ink);
  border-radius: 0 0 16px 16px;
}

.hero h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(34px, 10vw, 52px);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.hero-lead {
  max-width: 32rem;
  margin-bottom: 26px;
  color: var(--ink-soft);
  font-size: 18px;
}

.fact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}

.fact-line li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fact-line li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
}

.landing-actions {
  display: grid;
  gap: 10px;
  padding: 20px 0 8px;
}

.privacy-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.primary-btn,
.secondary-btn,
.text-btn {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 680;
  transition:
    transform 180ms var(--ease),
    background-color 180ms var(--ease),
    color 180ms var(--ease),
    opacity 180ms var(--ease);
}

.primary-btn {
  padding: 14px 20px;
  color: white;
  background: var(--ink);
}

.primary-btn:hover:not(:disabled) {
  background: oklch(0.31 0.025 255);
  transform: translateY(-1px);
}

.primary-btn:active:not(:disabled),
.secondary-btn:active:not(:disabled) {
  transform: translateY(1px);
}

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

.secondary-btn {
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  background: transparent;
}

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

.text-btn {
  min-height: 44px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: transparent;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 42px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.back-btn svg {
  width: 20px;
}

.context-intro {
  margin-bottom: 28px;
}

.context-intro h1 {
  margin-bottom: 14px;
  font-size: 30px;
}

.context-intro p {
  color: var(--ink-soft);
}

.context-form {
  display: grid;
  gap: 12px;
}

.radio-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 180ms var(--ease),
    background-color 180ms var(--ease);
}

.radio-option:has(input:checked) {
  border-color: var(--ink);
  background: var(--surface-2);
}

.radio-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
}

.other-input {
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
}

.context-submit {
  width: 100%;
  margin-top: 18px;
}

.instruction-page h1 {
  max-width: 14ch;
  margin-bottom: 14px;
  font-size: 30px;
}

.instruction-lead {
  color: var(--ink-soft);
}

.instruction-picks {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}

.instruction-picks > div {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.instruction-picks span {
  display: grid;
}

.instruction-picks strong {
  font-size: 16px;
}

.instruction-picks small {
  color: var(--muted);
  font-size: 13px;
}

.instruction-copy {
  padding: 20px;
  border-radius: 14px;
  background: var(--surface-2);
}

.instruction-copy p {
  margin-bottom: 14px;
  color: var(--ink-soft);
}

.instruction-copy p:last-child {
  margin-bottom: 0;
}

.instruction-copy strong {
  color: var(--ink);
}

.instruction-time {
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.instruction-start {
  width: 100%;
}

.quiz-shell {
  padding-top: 0;
}

.quiz-progress {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  margin: 0 -20px;
  padding: max(16px, env(safe-area-inset-top)) 20px 14px;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.progress-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.progress-track {
  overflow: hidden;
  height: 5px;
  border-radius: 5px;
  background: var(--line);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 260ms var(--ease);
}

.quiz-main {
  padding: 38px 0 20px;
}

.question-type {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.question-scenario {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

.question-scenario span {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}

.question-title {
  margin-bottom: 16px;
  font-size: clamp(23px, 6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.question-hint {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.question-hint span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hint-dot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.hint-dot.best {
  color: white;
  background: var(--success);
}

.hint-dot.worst {
  color: white;
  background: var(--danger);
}

.choice-list {
  display: grid;
  gap: 13px;
}

.choice {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition:
    border-color 180ms var(--ease),
    background-color 180ms var(--ease);
}

.choice.is-best {
  border-color: var(--success);
  background: color-mix(in oklch, var(--b-soft) 62%, white);
}

.choice.is-worst {
  border-color: var(--danger);
  background: color-mix(in oklch, var(--c-soft) 55%, white);
}

.choice-copy {
  padding: 16px 16px 13px;
  color: var(--ink);
  line-height: 1.62;
}

.choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.choice-action {
  min-height: 46px;
  border: 0;
  color: var(--muted);
  background: color-mix(in oklch, var(--surface-2) 70%, white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.choice-action + .choice-action {
  border-left: 1px solid var(--line);
}

.choice-action:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.choice-action.best[aria-pressed="true"] {
  color: white;
  background: var(--success);
}

.choice-action.worst[aria-pressed="true"] {
  color: white;
  background: var(--danger);
}

.quiz-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 24px;
}

.quiz-actions .primary-btn {
  width: 100%;
}

.report-shell {
  width: min(100%, 760px);
  padding-left: 16px;
  padding-right: 16px;
}

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.report-toolbar-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.cover-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 72px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 5%, var(--a-soft), transparent 36%),
    radial-gradient(circle at 90% 92%, var(--d-soft), transparent 42%),
    var(--surface);
}

.cover-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}

.cover-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(22px, 6vw, 44px);
}

.cover-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.cover-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cover-code::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.cover-image-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}

.cover-image {
  width: min(92%, 460px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.cover-copy h1 {
  margin-bottom: 9px;
  font-size: clamp(26px, 7.2vw, 43px);
  letter-spacing: -0.035em;
}

.cover-copy p {
  max-width: 29rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 4.1vw, 19px);
  line-height: 1.55;
}

.report-section {
  margin-bottom: 72px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 25px;
}

.section-title::before {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--section-color, var(--ink));
}

.section-lead {
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 17px;
}

.profile-summary {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 17px;
}

.quadrant-chart {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(230px, 1.1fr);
  align-items: center;
  gap: 28px;
  margin-top: 28px;
}

.radar-wrap {
  max-width: 310px;
  margin: 0 auto;
}

.radar-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.radar-axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.radar-shape {
  fill: oklch(0.43 0.04 255 / 0.13);
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.radar-dot {
  stroke: white;
  stroke-width: 2;
}

.score-list {
  display: grid;
  gap: 17px;
}

.score-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.score-row-head strong {
  font-size: 15px;
}

.score-row-head span {
  color: var(--muted);
  font-size: 12px;
}

.score-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.score-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 6px;
  background: var(--surface-2);
}

.score-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color);
}

.score-bar.avoid i {
  opacity: 0.28;
}

.insight-list {
  display: grid;
  gap: 0;
}

.insight-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.insight-rank {
  display: grid;
  place-items: center;
  align-self: start;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--rank-ink, white);
  background: var(--rank-color);
  font-size: 13px;
  font-weight: 750;
}

.insight-item h3 {
  margin-bottom: 7px;
  font-size: 18px;
}

.insight-item p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.sample-note {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.switch-list {
  display: grid;
  gap: 14px;
}

.switch-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.switch-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.switch-item h3 {
  margin-bottom: 7px;
  font-size: 19px;
}

.switch-item p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.ai-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ai-block {
  padding: 22px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.ai-block img {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.ai-block .ai-role {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.ai-block h3 {
  margin-bottom: 9px;
  font-size: 18px;
}

.ai-block p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.return-block {
  padding: 25px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface-2);
}

.return-block p:last-child {
  margin-bottom: 0;
}

.reflection-list {
  counter-reset: reflection;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reflection-list li {
  position: relative;
  padding: 20px 0 20px 42px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
}

.reflection-list li::before {
  counter-increment: reflection;
  content: counter(reflection);
  position: absolute;
  left: 0;
  top: 20px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.report-end {
  padding: 36px 24px;
  border-radius: 14px;
  color: white;
  background: var(--ink);
  text-align: center;
}

.report-end h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.report-end p {
  margin-bottom: 22px;
  color: oklch(0.88 0.01 255);
}

.report-end .primary-btn {
  width: 100%;
  color: var(--ink);
  background: white;
}

.report-disclaimer {
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.loading-state,
.error-state {
  display: grid;
  min-height: 70vh;
  min-height: 70dvh;
  place-items: center;
  text-align: center;
}

.error-state p {
  color: var(--ink-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: var(--z-toast);
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 9px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow-small);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 180ms var(--ease),
    transform 180ms var(--ease);
}

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

@media (max-width: 620px) {
  .quadrant-chart {
    grid-template-columns: 1fr;
  }

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

  .report-toolbar {
    align-items: flex-start;
  }

  .report-toolbar .brand-mark span:last-child {
    display: none;
  }

  .icon-btn .button-label {
    display: none;
  }

  .cover-card {
    margin-left: -2px;
    margin-right: -2px;
  }
}

@media (min-width: 760px) {
  .landing-shell {
    min-height: 860px;
  }

  .hero {
    padding-top: 64px;
  }
}

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

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