:root {
  --paper: #f4f0e7;
  --paper-deep: #e9e4d9;
  --ink: #252925;
  --muted: #626a62;
  --green: #687766;
  --green-soft: #a9b2a4;
  --line: rgba(37, 41, 37, 0.7);
}

* { box-sizing: border-box; }

html {
  background: #d8d6ce;
  overflow-x: hidden;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #d8d6ce;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

button {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 8%, rgba(255,255,255,.64), transparent 30%),
    linear-gradient(145deg, var(--paper), #efebe2);
  box-shadow: 0 0 70px rgba(40,44,39,.12);
}

.paper-grain {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: .14;
  background-image:
    repeating-radial-gradient(circle at 14% 18%, rgba(45,52,44,.16) 0 .5px, transparent .8px 5px),
    repeating-linear-gradient(92deg, transparent 0 7px, rgba(255,255,255,.16) 7px 8px);
  mix-blend-mode: multiply;
}

.home-screen,
.quiz-screen,
.result-screen {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
}

.home-screen {
  display: flex;
  flex-direction: column;
}

.brand-row,
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: .13em;
}

.brand-mark { font-weight: 700; }

.edition {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
  opacity: .72;
}

.home-hero {
  position: relative;
  padding-top: clamp(48px, 8svh, 78px);
}

.eyebrow,
.question-number {
  margin: 0;
  color: var(--green);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.home-hero h1 {
  max-width: 390px;
  margin: 20px 0 18px;
  font-size: clamp(38px, 10.8vw, 56px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -.045em;
}

.home-subtitle {
  max-width: 340px;
  margin: 0;
  color: #465046;
  font-size: 15px;
  line-height: 1.9;
}

.home-intro {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.moon-sketch {
  position: absolute;
  top: 38px;
  right: 2px;
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  box-shadow: 17px 2px 0 -3px rgba(104,119,102,.42);
  transform: rotate(-9deg);
  opacity: .8;
}

.moon-sketch::after {
  display: none;
}

.home-actions {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: clamp(28px, 6svh, 54px);
  padding-bottom: 24px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: .11em;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: #f9f6ef;
  background: var(--green);
  box-shadow: 4px 4px 0 var(--ink);
}

.primary-button:active {
  transform: translate(3px,3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.primary-button span { font-size: 22px; }

.home-actions > p,
.quiz-footnote,
.disclaimer {
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.65;
}

.water-lines {
  position: absolute;
  right: -14px;
  bottom: 4px;
  left: 42%;
  height: 68px;
  opacity: .14;
  pointer-events: none;
}

.water-lines span {
  position: absolute;
  right: 0;
  height: 1px;
  background: var(--green);
  transform: rotate(-2deg);
}

.water-lines span:nth-child(1) { top: 10px; width: 78%; }
.water-lines span:nth-child(2) { top: 29px; width: 100%; }
.water-lines span:nth-child(3) { top: 50px; width: 60%; }

.quiz-header { color: var(--muted); }

.text-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.progress-track {
  height: 3px;
  margin-top: 19px;
  overflow: hidden;
  background: #d7d5cc;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 280ms ease;
}

.question-card {
  padding-top: clamp(48px, 8svh, 78px);
  animation: question-in 300ms ease both;
}

.question-card h2 {
  min-height: 112px;
  margin: 18px 0 12px;
  font-size: clamp(26px, 7.2vw, 35px);
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: -.025em;
}

.question-note {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.answer-list { border-top: 1px solid var(--line); }

.answer {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 0 8px;
  gap: 15px;
  border: 0;
  border-bottom: 1px solid rgba(37,41,37,.25);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: padding 160ms ease, background 160ms ease;
}

.answer:not(:disabled):active,
.answer.selected {
  padding-left: 15px;
  background: rgba(104,119,102,.11);
}

.answer-dot {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.answer.selected .answer-dot {
  border: 4px solid var(--paper);
  background: var(--green);
  outline: 1px solid var(--green);
}

.quiz-footnote { margin-top: 25px; }

.result-screen { padding-bottom: 46px; }

.result-hero { padding: 48px 0 30px; }

.result-hero > .eyebrow { margin-bottom: 34px; }

.result-type {
  margin: 0 0 10px;
  color: var(--green);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  letter-spacing: .12em;
}

.result-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-title-row h1 {
  margin: 0;
  font-size: clamp(42px, 11vw, 56px);
  font-weight: 500;
  line-height: 1.2;
}

.result-mark {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 50%;
  font-size: 23px;
}

.result-tagline {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.healing-copy {
  margin: 24px 0 0;
  color: #3e443e;
  font-size: 17px;
  line-height: 2;
}

.secondary-result {
  margin-top: 25px;
  padding: 14px 16px;
  border-left: 2px solid var(--green-soft);
  color: #4e574e;
  background: rgba(255,255,255,.18);
  font-size: 13px;
  line-height: 1.7;
}

.advice-card,
.today-card {
  padding: 26px 20px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.15);
  box-shadow: 5px 5px 0 rgba(104,119,102,.16);
}

.advice-card ol {
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.advice-card li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid rgba(37,41,37,.22);
}

.advice-card li > span {
  color: var(--green);
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.advice-card li p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.today-card {
  margin: 0 0 22px;
  padding-bottom: 24px;
  box-shadow: none;
  border-color: rgba(104,119,102,.72);
  background: rgba(104,119,102,.07);
}

.today-card p:last-child {
  margin: 15px 0 0;
  font-size: 17px;
  line-height: 1.8;
}

.result-actions {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.secondary-button { background: transparent; }
.secondary-button:active { background: rgba(104,119,102,.1); }
.disclaimer { margin-top: 28px; }

.page-enter { animation: page-in 400ms ease both; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes question-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-height: 700px) {
  .home-screen {
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .home-hero { padding-top: 34px; }
  .home-hero h1 { margin: 14px 0 12px; font-size: clamp(36px, 9.8vw, 46px); }
  .home-subtitle { font-size: 14px; line-height: 1.7; }
  .home-intro { margin-top: 13px; line-height: 1.65; }
  .home-actions { padding-top: 19px; padding-bottom: 12px; }
  .home-actions > p { margin-top: 11px; }
}

@media (min-width: 700px) {
  .site-shell { min-height: 920px; }
  .home-screen,
  .quiz-screen,
  .result-screen { padding-right: 38px; padding-left: 38px; }
}

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