:root {
  --paper: #f4f0e7;
  --paper-deep: #ebe5d9;
  --ink: #242824;
  --muted: #70776e;
  --green: #677664;
  --green-soft: #aab3a4;
  --line: rgba(36, 40, 36, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  background: #d8d6ce;
}

body {
  margin: 0;
  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 20% 10%, rgba(255, 255, 255, 0.58), transparent 34%),
    linear-gradient(145deg, var(--paper), #f0ece3);
  box-shadow: 0 0 70px rgba(40, 44, 39, 0.12);
}

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

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

.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: 0.15em;
}

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

.edition {
  color: var(--muted);
}

.home-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  padding: max(22px, env(safe-area-inset-top)) 24px max(22px, env(safe-area-inset-bottom));
}

.home-screen .edition {
  opacity: 0.66;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hero {
  position: relative;
  padding-top: clamp(50px, 9svh, 82px);
}

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

.hero h1 {
  margin: 20px 0 10px;
  font-size: clamp(58px, 17vw, 86px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-subtitle {
  margin: 0 0 22px;
  color: var(--green);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.intro {
  margin: 0;
  color: #535a52;
  font-size: 16px;
  line-height: 2;
}

.sun-sketch {
  position: absolute;
  top: 56px;
  right: -4px;
  width: 88px;
  height: 88px;
  border: 1.5px solid var(--green);
  border-radius: 50% 49% 48% 52%;
  transform: rotate(-7deg);
}

.sun-sketch::before,
.sun-sketch::after {
  position: absolute;
  content: "";
  background: var(--green);
  opacity: 0.65;
}

.sun-sketch::before {
  top: -19px;
  left: 43px;
  width: 1px;
  height: 14px;
}

.sun-sketch::after {
  top: 43px;
  right: -19px;
  width: 14px;
  height: 1px;
}

.sun-sketch i {
  position: absolute;
  inset: 14px;
  border: 1px dashed var(--green-soft);
  border-radius: 50%;
}

.home-actions {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: clamp(30px, 7svh, 58px);
}

.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: 0.12em;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: #f8f5ed;
  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: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.mountain-lines {
  position: absolute;
  right: -36px;
  bottom: 6px;
  left: -20px;
  height: 52px;
  opacity: 0.16;
}

.mountain-lines span {
  position: absolute;
  bottom: 0;
  width: 52%;
  height: 46px;
  border-top: 1px solid var(--green);
  border-radius: 50% 50% 0 0;
  transform: rotate(-5deg);
}

.mountain-lines span:nth-child(2) {
  right: 0;
  height: 36px;
  transform: rotate(7deg);
}

.mountain-lines span:nth-child(3) {
  right: 24%;
  bottom: -16px;
  width: 44%;
  transform: rotate(2deg);
}

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

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

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

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

.question-card {
  padding-top: clamp(54px, 9svh, 92px);
  animation: question-in 320ms ease both;
}

.question-card h2 {
  min-height: 104px;
  margin: 18px 0 12px;
  font-size: clamp(27px, 7.4vw, 36px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.025em;
}

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

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

.answer {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 59px;
  padding: 0 8px;
  gap: 15px;
  border: 0;
  border-bottom: 1px solid rgba(36, 40, 36, 0.28);
  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(103, 118, 100, 0.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: 28px;
}

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

.result-hero {
  padding: 56px 0 42px;
}

.percent {
  display: flex;
  align-items: flex-end;
  margin: 16px 0 10px;
  line-height: 0.9;
}

.percent strong {
  font-size: clamp(112px, 34vw, 166px);
  font-weight: 400;
  letter-spacing: -0.09em;
}

.percent span {
  padding: 0 0 12px 8px;
  color: var(--green);
  font-family: Arial, sans-serif;
  font-size: 28px;
}

.battery-line {
  height: 11px;
  padding: 2px;
  border: 1px solid var(--ink);
}

.battery-line span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.result-range {
  margin: 10px 0 46px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
}

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

.result-title-row h1 {
  margin: 0;
  font-size: clamp(37px, 10vw, 52px);
  font-weight: 500;
}

.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: 26px;
}

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

.advice-card {
  padding: 28px 20px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 5px 5px 0 rgba(103, 118, 100, 0.18);
}

.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: 15px 0;
  border-top: 1px solid rgba(36, 40, 36, 0.24);
}

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

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

.secondary-button {
  background: transparent;
}

.secondary-button:active {
  background: rgba(103, 118, 100, 0.1);
}

.disclaimer {
  margin-top: 30px;
}

.page-enter {
  animation: page-in 420ms 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 (min-width: 700px) {
  .site-shell {
    min-height: 920px;
  }

  .home-screen,
  .quiz-screen,
  .result-screen {
    padding-right: 38px;
    padding-left: 38px;
  }
}

@media (max-height: 700px) {
  .home-screen {
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .hero {
    padding-top: 38px;
  }

  .hero h1 {
    margin-top: 16px;
    font-size: clamp(52px, 15vw, 68px);
  }

  .hero-subtitle {
    margin-bottom: 16px;
  }

  .intro {
    font-size: 14px;
    line-height: 1.75;
  }

  .home-actions {
    padding-top: 22px;
  }

  .home-actions p {
    margin-top: 12px;
  }
}

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