:root {
  color-scheme: light;
  --ink: #492a1e;
  --muted: #825f50;
  --orange: #ef6a2c;
  --orange-deep: #c94a19;
  --gold: #ffb83e;
  --cream: #fff9ec;
  --paper: #fffdf7;
  --line: rgba(113, 60, 33, .14);
  --green: #56834b;
  --shadow: 0 20px 55px rgba(126, 62, 27, .16);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #f8edcf; }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 11% 8%, rgba(255, 183, 64, .35) 0 8%, transparent 9%),
    radial-gradient(circle at 91% 20%, rgba(239, 106, 44, .16) 0 10%, transparent 11%),
    linear-gradient(160deg, #fff5cf 0%, #f9e2b9 45%, #f3cfa9 100%);
}

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

.shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.24) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--cream);
  box-shadow: var(--shadow);
}

.screen { display: none; min-height: 100vh; min-height: 100svh; padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); }
.screen--active { display: flex; }

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 7px 11px;
  border: 1px solid rgba(121, 61, 31, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: #6f4a3a;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(239,106,44,.12); }

.start-screen { position: relative; flex-direction: column; align-items: center; text-align: center; }
.sun { position: absolute; top: -85px; right: -80px; width: 230px; height: 230px; border-radius: 50%; background: rgba(255, 184, 62, .2); }

.mascot-wrap { position: relative; width: min(67vw, 290px); aspect-ratio: 1; margin: 26px 0 -8px; }
.mascot { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 18px rgba(157, 65, 22, .18)); animation: float 3.2s ease-in-out infinite; }
.spark { position: absolute; color: var(--gold); font-size: 1.8rem; animation: twinkle 1.7s ease-in-out infinite; }
.spark--one { top: 22%; left: -2%; }
.spark--two { top: 9%; right: 3%; animation-delay: .45s; }

.eyebrow { margin: 0 0 7px; color: var(--orange-deep); font-size: .86rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(2.85rem, 14vw, 4.2rem); line-height: 1.05; letter-spacing: .03em; text-shadow: 0 4px 0 #fff; }
.intro { max-width: 310px; margin: 14px auto 18px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.round-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.round-tags span { padding: 7px 11px; border-radius: 9px; background: #fff1d1; color: #7b4d2f; font-size: .8rem; font-weight: 700; }

.primary-btn, .secondary-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 17px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.primary-btn { color: #fff; background: linear-gradient(135deg, var(--orange), #df521d); box-shadow: 0 11px 25px rgba(214, 75, 24, .27), inset 0 1px rgba(255,255,255,.3); }
.primary-btn span { margin-left: 6px; }
.secondary-btn { color: var(--ink); background: #fff3d9; border: 1px solid var(--line); }
.primary-btn:active, .secondary-btn:active, .answer-btn:active { transform: scale(.98); }
.primary-btn:focus-visible, .secondary-btn:focus-visible, .answer-btn:focus-visible, summary:focus-visible, .icon-btn:focus-visible { outline: 3px solid rgba(239,106,44,.28); outline-offset: 3px; }
.tiny-note { margin: 13px 0 0; color: #9a7968; font-size: .75rem; }

.quiz-screen { flex-direction: column; background: radial-gradient(circle at 50% -15%, rgba(255,184,62,.22), transparent 45%); }
.quiz-head { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.icon-btn { flex: 0 0 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); color: var(--ink); font-size: 2rem; line-height: 1; cursor: pointer; }
.progress-wrap { flex: 1; min-width: 0; }
.progress-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); font-size: .78rem; }
.progress-copy b { color: var(--orange-deep); }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #eddcbc; }
.progress-track span { display: block; width: 16.666%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--orange)); transition: width .35s ease; }

.question-card { position: relative; padding: 30px 20px 21px; border: 1px solid rgba(119,66,37,.12); border-radius: 27px; background: rgba(255,255,255,.83); box-shadow: 0 18px 44px rgba(123,68,32,.1); }
.question-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: -5px auto 15px; border-radius: 23px; background: linear-gradient(145deg, #fff5d9, #ffe2ab); font-size: 2.25rem; transform: rotate(-3deg); box-shadow: inset 0 0 0 1px rgba(132,71,36,.1); }
.question-kicker { margin: 0 0 7px; text-align: center; color: var(--orange-deep); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.question-card h2 { margin: 0 auto 23px; max-width: 330px; text-align: center; font-size: 1.34rem; line-height: 1.48; }
.answers { display: grid; gap: 12px; }
.answer-btn { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; width: 100%; min-height: 61px; padding: 10px 13px; border: 1.5px solid rgba(109,60,35,.14); border-radius: 17px; background: #fffaf0; color: var(--ink); text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.answer-btn:hover { border-color: rgba(239,106,44,.46); }
.answer-letter { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #f5e5c7; color: #8f5737; font-size: .85rem; font-weight: 900; }
.answer-copy { font-size: .94rem; font-weight: 700; line-height: 1.45; }
.answer-btn[disabled] { cursor: default; opacity: .62; }
.answer-btn.answer--right { border-color: rgba(86,131,75,.56); background: #edf5e9; opacity: 1; }
.answer-btn.answer--right .answer-letter { background: var(--green); color: white; }
.answer-btn.answer--wrong { border-color: rgba(201,74,25,.38); background: #fff0e7; opacity: 1; }

.feedback { margin-top: 16px; padding: 14px 15px; border-radius: 15px; background: #f8eddb; text-align: left; }
.feedback-title { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--orange-deep); }
.feedback-title span { font-size: 1.1rem; }
.feedback p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.58; }
.primary-btn--next { margin-top: auto; transform: translateY(12px); }

.result-screen { position: relative; flex-direction: column; align-items: stretch; text-align: center; overflow: hidden; }
.result-screen > * { position: relative; z-index: 1; }
.score-orbit { position: relative; width: 215px; height: 190px; margin: 14px auto -2px; }
.score-orbit::before { content: ""; position: absolute; inset: 21px 11px 3px; border: 2px dashed rgba(239,106,44,.21); border-radius: 50%; transform: rotate(-11deg); }
.score-orbit img { position: absolute; width: 155px; height: 155px; left: 0; bottom: 0; object-fit: contain; filter: drop-shadow(0 12px 13px rgba(147,59,21,.16)); }
.score-badge { position: absolute; right: 0; top: 12px; display: flex; align-items: baseline; justify-content: center; width: 91px; height: 91px; padding-top: 19px; border: 5px solid #fff; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); transform: rotate(5deg); box-shadow: 0 12px 25px rgba(200,74,24,.27); }
.score-badge strong { font-size: 2.35rem; line-height: 1; }
.score-badge span { font-size: .78rem; font-weight: 800; }
.result-screen h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 2rem; }
.result-copy { margin: 9px auto 18px; max-width: 320px; color: var(--muted); font-size: .92rem; line-height: 1.6; }

.takeaway, .point-card, .health-note { border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.82); text-align: left; }
.takeaway { padding: 17px; box-shadow: 0 13px 30px rgba(119,66,37,.08); }
.takeaway-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.takeaway-head span { font-size: 1.35rem; }
.takeaway ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: tips; }
.takeaway li { position: relative; padding-left: 37px; counter-increment: tips; }
.takeaway li::before { content: counter(tips); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: #fff; background: var(--orange); font-size: .77rem; font-weight: 900; }
.takeaway li b, .takeaway li span { display: block; }
.takeaway li b { margin-bottom: 3px; font-size: .9rem; }
.takeaway li span { color: var(--muted); font-size: .8rem; line-height: 1.48; }

.point-card { margin-top: 12px; overflow: hidden; }
.point-card summary, .health-note summary { display: flex; align-items: center; gap: 9px; padding: 15px 16px; cursor: pointer; list-style: none; }
.point-card summary::-webkit-details-marker, .health-note summary::-webkit-details-marker { display: none; }
.point-card summary i { margin-left: auto; color: #a16f54; font-size: .74rem; font-style: normal; }
.point-card[open] summary i { font-size: 0; }
.point-card[open] summary i::after { content: "收起"; font-size: .74rem; }
.point-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 13px 14px; }
.point-grid div { padding: 13px; border-radius: 14px; background: #fff3d9; }
.point-grid strong, .point-grid span { display: block; }
.point-grid strong { margin-bottom: 5px; color: var(--orange-deep); }
.point-grid span { color: var(--muted); font-size: .75rem; line-height: 1.5; }

.result-actions { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; margin-top: 15px; }
.share-tip { min-height: 20px; margin: 8px 0 0; color: var(--green); font-size: .78rem; }
.health-note { margin-top: 4px; background: rgba(255,255,255,.5); }
.health-note summary { color: #8a6858; font-size: .78rem; justify-content: center; }
.health-note p { margin: 0; padding: 0 15px 13px; color: #8b6c5c; font-size: .72rem; line-height: 1.55; }
.health-note .source { padding-top: 0; }
.health-note a { color: var(--orange-deep); }

.confetti { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.confetti i { position: absolute; top: -18px; width: 9px; height: 14px; border-radius: 3px; animation: fall 2.8s linear forwards; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes twinkle { 0%,100% { opacity: .35; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@keyframes fall { to { transform: translateY(110vh) rotate(620deg); opacity: .15; } }

@media (min-width: 481px) {
  body { padding: 18px 0; }
  .shell { min-height: calc(100vh - 36px); border-radius: 32px; }
  .screen { min-height: calc(100vh - 36px); }
}

@media (max-height: 730px) {
  .screen { padding-top: 16px; }
  .mascot-wrap { width: 210px; margin-top: 10px; }
  .intro { margin-block: 8px 10px; }
  .round-tags { margin-bottom: 13px; }
  .quiz-head { margin-bottom: 14px; }
  .question-card { padding-top: 20px; }
  .question-icon { width: 58px; height: 58px; font-size: 1.85rem; margin-bottom: 10px; }
}

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