:root {
  --ink: #101b2b;
  --ink-2: #182a40;
  --paper: #fff8e8;
  --cream: #f2e4c9;
  --orange: #d86432;
  --orange-dark: #a83d1d;
  --yellow: #f6cf68;
  --blue: #7da7c4;
  --line: rgba(255, 248, 232, .24);
  --shadow: 0 24px 80px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background: var(--ink);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; }
button { color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .055;
  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='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header, footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header { min-height: 90px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--yellow); border-radius: 4px; color: var(--yellow); font: 700 20px/1 Georgia, serif; transform: rotate(-2deg); }
.header-note { color: rgba(255,248,232,.62); font-size: 14px; letter-spacing: .15em; }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.screen { display: none; min-height: calc(100vh - 160px); animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.screen.is-active { display: grid; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.intro { grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(36px, 6vw, 88px); padding: 54px 0 70px; }
.intro-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--yellow); font-size: 14px; font-weight: 650; letter-spacing: .12em; }
.eyebrow i { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 5px rgba(216,100,50,.14); }
h1, h2 { font-family: "Songti SC", STSong, Georgia, serif; font-weight: 700; margin: 0; }
h1 { margin-top: 24px; font-size: clamp(44px, 5.7vw, 82px); line-height: 1.08; letter-spacing: -.045em; }
.intro-copy > p { max-width: 520px; margin: 26px 0 30px; color: rgba(255,248,232,.72); font-size: 17px; line-height: 1.9; }
.primary-button, .secondary-button {
  min-height: 54px;
  border-radius: 999px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-button { border: 1px solid var(--orange); background: var(--orange); color: #fffaf0; font-weight: 700; box-shadow: 0 14px 30px rgba(168,61,29,.25); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(168,61,29,.38); }
.primary-button:focus-visible, .secondary-button:focus-visible, .answer-card:focus-visible, .text-button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.primary-button span { font-size: 22px; line-height: 1; }
.intro-copy .privacy-note { margin: 15px 0 0; color: rgba(255,248,232,.44); font-size: 13px; }

.hero-visual { margin: 0; position: relative; }
.hero-visual::before { content: ""; position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--orange); filter: blur(100px); opacity: .12; right: 8%; top: 8%; }
.hero-visual img { position: relative; width: 100%; display: block; border-radius: 140px 12px 140px 12px; box-shadow: var(--shadow); object-fit: cover; aspect-ratio: 3/2; }
.hero-visual figcaption { position: absolute; right: -12px; bottom: -18px; background: var(--yellow); color: var(--ink); padding: 12px 18px; font-size: 13px; font-weight: 700; transform: rotate(-2deg); }

.quiz { grid-template-rows: auto auto 1fr; padding: 28px 0 70px; }
.quiz-topline { display: flex; justify-content: space-between; align-items: center; min-height: 48px; color: rgba(255,248,232,.66); }
.text-button { border: 0; padding: 10px 0; background: transparent; cursor: pointer; }
.text-button[disabled] { opacity: .25; cursor: default; }
.progress-track { height: 3px; background: rgba(255,255,255,.11); }
.progress-track span { display: block; height: 100%; width: 20%; background: var(--yellow); transition: width .45s ease; }
.question-wrap { width: min(880px, 100%); align-self: center; justify-self: center; padding: 56px 0; }
.question-kicker { color: var(--orange); font-size: 14px; font-weight: 700; letter-spacing: .12em; }
.question-wrap h2 { max-width: 760px; margin: 14px 0 38px; font-size: clamp(32px, 4.2vw, 57px); line-height: 1.25; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.answer-card {
  min-height: 104px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  border-radius: 10px;
  color: var(--paper);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 19px;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.answer-card:hover { border-color: var(--yellow); background: rgba(246,207,104,.08); transform: translateY(-2px); }
.answer-card.selected { border-color: var(--orange); background: rgba(216,100,50,.13); }
.answer-letter { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: var(--yellow); font: 700 16px Georgia, serif; }
.answer-card strong { font-size: 17px; line-height: 1.5; }
.answer-card .arrow { font-size: 20px; color: var(--yellow); opacity: 0; transform: translateX(-8px); transition: .2s; }
.answer-card:hover .arrow { opacity: 1; transform: none; }

.result { grid-template-columns: 1fr 270px; gap: 22px; align-items: stretch; padding: 48px 0 70px; }
.result-card { position: relative; overflow: hidden; display: grid; align-items: center; min-height: 620px; padding: clamp(34px, 6vw, 76px); border-radius: 14px; color: var(--ink); background: var(--paper); }
.result-card::after { content: ""; position: absolute; width: 430px; height: 430px; right: -210px; bottom: -210px; border: 80px solid var(--orange); border-radius: 50%; opacity: .9; }
.result-stamp { position: absolute; right: 44px; top: 38px; border: 2px solid currentColor; border-radius: 50%; padding: 24px 16px; font: 800 22px/1 Georgia, serif; transform: rotate(9deg); letter-spacing: .06em; }
.result-copy { position: relative; z-index: 1; max-width: 650px; }
.result-copy .eyebrow { color: var(--orange-dark); }
.result-copy h2 { margin: 16px 0 10px; font-size: clamp(43px, 6vw, 76px); line-height: 1.12; }
.result-tagline { color: var(--orange-dark); font-size: 20px; font-weight: 700; }
#result-description { max-width: 590px; color: rgba(16,27,43,.73); font-size: 17px; line-height: 1.85; }
.trait-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 30px; }
.trait-list span { border: 1px solid rgba(16,27,43,.22); border-radius: 999px; padding: 8px 13px; font-size: 14px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.secondary-button { border: 1px solid rgba(16,27,43,.22); background: transparent; color: var(--ink); }
.secondary-button:hover { transform: translateY(-2px); background: rgba(16,27,43,.05); }
.handoff-note { margin: 15px 0 0; color: rgba(16,27,43,.45); font-size: 13px; }
.result-side { display: flex; min-height: 620px; flex-direction: column; justify-content: space-between; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); }
.result-side p { margin: 0; color: var(--yellow); font-size: 13px; letter-spacing: .1em; }
.result-side > span { writing-mode: vertical-rl; align-self: flex-end; font: 700 44px/1 Georgia, serif; color: rgba(255,248,232,.15); }
.mini-drawer { height: 150px; padding: 18px; border: 4px solid #6e351f; border-radius: 5px; background: #a84d28; box-shadow: inset 0 0 0 2px rgba(255,255,255,.09), 0 18px 30px rgba(0,0,0,.22); display: grid; place-items: center; position: relative; }
.mini-drawer b { border: 1px solid var(--yellow); border-radius: 999px; padding: 5px 16px; color: var(--yellow); font: 700 24px Georgia, serif; }
.mini-drawer i { position: absolute; bottom: 19px; width: 20px; height: 12px; border-radius: 50%; background: #422118; }

footer { min-height: 70px; border-top: 1px solid var(--line); color: rgba(255,248,232,.42); font-size: 12px; letter-spacing: .08em; }

@media (max-width: 820px) {
  .site-header, main, footer { width: min(100% - 32px, 680px); }
  .site-header { min-height: 72px; }
  .header-note { display: none; }
  .intro { grid-template-columns: 1fr; padding: 36px 0 64px; gap: 38px; }
  .intro-copy { display: flex; flex-direction: column; align-items: flex-start; }
  h1 { font-size: clamp(43px, 12vw, 64px); }
  .hero-visual { order: -1; }
  .hero-visual img { border-radius: 74px 8px 74px 8px; }
  .hero-visual figcaption { right: 4px; }
  .answers { grid-template-columns: 1fr; }
  .answer-card { min-height: 88px; }
  .result { grid-template-columns: 1fr; }
  .result-card { min-height: 650px; padding: 34px 26px; }
  .result-stamp { right: 22px; top: 24px; font-size: 15px; padding: 18px 11px; }
  .result-side { display: none; }
  .result-actions { flex-direction: column; align-items: stretch; }
  .primary-button, .secondary-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
}

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