:root {
  --paper: #f7f0e7;
  --paper-deep: #eee2d3;
  --ink: #34271f;
  --muted: #76665a;
  --coral: #d95f4c;
  --gold: #d79d35;
  --line: rgba(52, 39, 31, .16);
  --shadow: 0 24px 70px rgba(73, 49, 33, .15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 108, 91, .09), transparent 32rem),
    radial-gradient(circle at 95% 80%, rgba(49, 87, 164, .08), transparent 34rem),
    var(--paper);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button, a { font: inherit; }
button { color: inherit; }

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.brand {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}

.brand-sun {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 20px 0 0 -6px var(--gold);
}

.privacy-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255,255,255,.35);
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.screen { min-height: calc(100vh - 76px); }
.screen[hidden] { display: none !important; }

.intro-screen {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  grid-template-rows: 1fr auto;
  gap: 30px 70px;
  align-items: center;
  padding: 48px 0 34px;
}

.intro-copy { max-width: 620px; }

.eyebrow {
  margin: 0 0 16px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

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

h1 {
  margin-bottom: 26px;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 1.13;
  font-weight: 600;
  letter-spacing: -.035em;
}

h1 em {
  color: var(--coral);
  font-style: normal;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 560px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.meta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.meta-row span {
  padding: 9px 14px;
  border-left: 2px solid var(--gold);
  background: rgba(255,255,255,.4);
  color: var(--muted);
}

.meta-row strong { color: var(--ink); }

.primary-button, .secondary-button {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  border: 1px solid var(--ink);
  color: #fff9ef;
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(52,39,31,.18);
}

.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:hover { box-shadow: 0 16px 34px rgba(52,39,31,.24); }

.secondary-button {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.microcopy {
  margin: 13px 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.intro-visual {
  width: min(100%, 470px);
  justify-self: center;
  position: relative;
  isolation: isolate;
}

.intro-visual img {
  width: 76%;
  display: block;
  margin: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(217,95,76,.28);
  border-radius: 50%;
  z-index: -1;
}
.orbit-one { inset: 8% -2% 12%; transform: rotate(-18deg); }
.orbit-two { inset: 17% 5% 4% -5%; transform: rotate(22deg); border-color: rgba(49,87,164,.2); }

.floating-note {
  position: absolute;
  padding: 9px 13px;
  background: rgba(255,250,242,.87);
  border: 1px solid rgba(52,39,31,.12);
  border-radius: 99px;
  box-shadow: 0 10px 22px rgba(52,39,31,.12);
  font-size: 13px;
  backdrop-filter: blur(8px);
}
.note-one { left: -2%; top: 25%; }
.note-two { right: -2%; bottom: 20%; }

.intro-footer {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.intro-footer p { margin: 0; }

.quiz-screen {
  padding: 30px 0 80px;
  display: flex;
  flex-direction: column;
}

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

.text-button {
  appearance: none;
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.text-button:hover { color: var(--ink); }

.progress-track {
  height: 3px;
  margin-top: 14px;
  border-radius: 99px;
  background: rgba(52,39,31,.10);
  overflow: hidden;
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  transition: width .35s ease;
}

.question-wrap {
  width: min(800px, 100%);
  margin: auto;
  padding: 70px 0 40px;
}

.question-wrap h2 {
  margin-bottom: 36px;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.42;
  font-weight: 600;
}

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

.option-button {
  appearance: none;
  width: 100%;
  min-height: 92px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: center;
  text-align: left;
  color: var(--ink);
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(52,39,31,.14);
  border-radius: 16px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.option-button:hover, .option-button:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(217,95,76,.65);
  background: rgba(255,255,255,.75);
  box-shadow: 0 14px 30px rgba(73,49,33,.09);
}
.option-button.is-selected { border-color: var(--coral); background: rgba(232,108,91,.09); }
.option-letter {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(52,39,31,.2);
  font-size: 12px;
  font-weight: 800;
}
.option-copy { line-height: 1.75; }

.result-screen { padding: 44px 0 100px; }
.result-heading { text-align: center; margin-bottom: 34px; }
.result-heading h2 { margin-bottom: 4px; font-size: 18px; font-weight: 500; color: var(--muted); }
.result-name {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.2;
  font-weight: 600;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(300px, 500px) minmax(300px, 1fr);
  gap: clamp(36px, 7vw, 88px);
  align-items: center;
}

.result-card-wrap { position: relative; }
.result-card-wrap::before {
  content: "";
  position: absolute;
  inset: 7% -5%;
  border: 1px solid rgba(217,95,76,.25);
  border-radius: 50%;
  transform: rotate(-9deg);
  z-index: -1;
}
.result-card-wrap img {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.keyword-list { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 24px; }
.keyword-list span {
  padding: 7px 11px;
  border-radius: 99px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.42);
  font-size: 13px;
}
.result-description { font-size: 18px; line-height: 1.9; color: #55463b; }

.axis-summary {
  margin: 30px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--coral);
  background: rgba(255,255,255,.42);
}
.axis-summary p { margin-bottom: 12px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.axis-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.axis-tags span { font-size: 13px; font-weight: 700; }
.axis-tags span:not(:last-child)::after { content: " · "; color: var(--gold); margin-left: 8px; }

.result-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.restart { padding: 10px; }

.upgrade-section { margin-top: 110px; padding-top: 68px; border-top: 1px solid var(--line); }
.section-heading { max-width: 650px; margin-bottom: 30px; }
.section-heading h3 {
  margin-bottom: 14px;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(30px, 4vw, 46px);
}
.section-heading > p:last-child { color: var(--muted); line-height: 1.75; }

.upgrade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.upgrade-grid article {
  min-height: 230px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.38);
}
.upgrade-grid article.featured { border-color: rgba(217,95,76,.5); background: rgba(232,108,91,.07); }
.upgrade-grid .price { color: var(--coral); font-weight: 800; }
.upgrade-grid h4 { margin: 18px 0 12px; font-size: 20px; }
.upgrade-grid p { min-height: 54px; color: var(--muted); line-height: 1.65; font-size: 14px; }
.soon { display: inline-block; margin-top: 16px; color: var(--muted); font-size: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 30;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 99px;
  color: #fff;
  background: rgba(52,39,31,.93);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-size: 13px;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.error-screen { display: grid; place-content: center; text-align: center; }

@media (max-width: 820px) {
  .site-header, .app-shell { width: min(100% - 28px, 680px); }
  .site-header { height: 66px; }
  .privacy-chip { display: none; }
  .screen { min-height: calc(100vh - 66px); }
  .intro-screen { grid-template-columns: 1fr; grid-template-rows: auto; padding-top: 32px; gap: 44px; }
  .intro-copy { text-align: center; }
  .lead { margin-inline: auto; font-size: 16px; }
  .meta-row { justify-content: center; }
  .intro-visual { max-width: 410px; }
  .intro-footer { text-align: center; }
  .question-wrap { padding-top: 54px; }
  .result-layout { grid-template-columns: 1fr; }
  .result-card-wrap { max-width: 480px; margin: auto; }
  .result-copy { text-align: center; }
  .keyword-list, .axis-tags, .result-actions { justify-content: center; }
  .axis-summary { text-align: left; }
  .upgrade-grid { grid-template-columns: 1fr; }
  .upgrade-grid p { min-height: auto; }
}

@media (max-width: 480px) {
  h1 { font-size: 42px; }
  .intro-screen { padding-top: 20px; }
  .intro-visual img { width: 82%; }
  .orbit { inset: 8% 6% !important; transform: none; }
  .floating-note { font-size: 11px; }
  .note-one { left: 0; }
  .note-two { right: 0; }
  .question-wrap h2 { font-size: 28px; }
  .option-button { min-height: 104px; padding: 18px; grid-template-columns: 32px 1fr; }
  .result-actions .primary-button, .result-actions .secondary-button { width: 100%; }
  .result-name { font-size: 44px; }
  .result-card-wrap::before { inset: 7% 5%; transform: none; }
}

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