:root {
  color-scheme: light;
  --ink: #233832;
  --muted: #65736a;
  --accent: #285d51;
  --accent-dark: #19473e;
  --line: #dddcd2;
  --surface: #fffefa;
  --canvas: #f6f4ee;
  --soft: #e9eee7;
  --gold: #bd9a68;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #bd9a68; outline-offset: 3px; }
[hidden] { display: none !important; }
.site-shell { max-width: 1160px; min-height: 100dvh; margin: auto; padding: 0 32px; display: flex; flex-direction: column; }
.site-header { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; letter-spacing: .03em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--accent-dark); background: #eee7d8; font-family: "Songti SC", STSong, serif; font-size: 18px; }
.text-button { border: 0; background: none; color: var(--accent-dark); font-weight: 650; padding: 9px 2px; }
.text-button:hover { text-decoration: underline; }
main { flex: 1; }
.view { animation: appear .28s ease-out; }
@keyframes appear { from { opacity: .6; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { margin: 0 0 22px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .16em; }
.hero { min-height: 510px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; overflow: hidden; border-radius: 22px; background: #1c443b; color: #f8f5ea; }
.hero-content { padding: 70px 20px 72px 72px; position: relative; z-index: 1; }
.hero .eyebrow { color: #d6bc8d; }
.hero h1 { margin: 0; max-width: 9em; font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif; font-size: clamp(43px, 4.7vw, 64px); font-weight: 600; line-height: 1.3; letter-spacing: -.045em; }
.hero-description { max-width: 425px; margin: 26px 0 36px; color: #d6e2d8; font-size: 16px; line-height: 1.95; }
.primary-button, .secondary-button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 23px; border-radius: 9px; font-size: 15px; font-weight: 730; transition: transform .15s, background .15s, border-color .15s; white-space: nowrap; }
.primary-button { border: 1px solid var(--accent); color: #fff; background: var(--accent); }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); }
.secondary-button { border: 1px solid #becbc0; color: var(--ink); background: var(--surface); }
.secondary-button:hover:not(:disabled) { border-color: var(--accent); background: var(--soft); }
.hero .primary-button { border-color: #ede1c8; color: #1c443b; background: #ede1c8; }
.hero .primary-button:hover:not(:disabled) { border-color: #fff4df; background: #fff4df; }
.primary-button:active:not(:disabled), .secondary-button:active:not(:disabled) { transform: translateY(1px); }
.hero-art { height: 510px; position: relative; display: grid; place-items: center; }
.art-ring { position: absolute; border: 1px solid rgba(227, 200, 151, .35); border-radius: 50%; }
.ring-one { width: 410px; height: 410px; }
.ring-two { width: 300px; height: 300px; border-color: rgba(227, 200, 151, .6); }
.art-center { width: 192px; height: 192px; display: grid; place-items: center; border-radius: 50%; background: #e2cd9e; color: #24463d; font-family: "Songti SC", STSong, serif; font-size: 27px; font-weight: 600; line-height: 1.5; text-align: center; letter-spacing: .09em; box-shadow: 0 24px 60px rgba(5, 27, 23, .15); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); padding: 38px 0; border-bottom: 1px solid var(--line); }
.facts > div { display: flex; align-items: baseline; gap: 12px; padding: 0 30px; border-left: 1px solid var(--line); }
.facts > div:first-child { padding-left: 0; border-left: 0; }
.facts strong { color: var(--accent-dark); font-family: Georgia, "Songti SC", serif; font-size: 27px; font-weight: 500; letter-spacing: -.04em; white-space: nowrap; }
.facts span { color: var(--muted); font-size: 13px; }
.intro-section { padding: 66px 0 74px; }
.intro-section h2, .report-section h3 { margin: 0 0 24px; font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif; font-size: 30px; font-weight: 600; letter-spacing: -.025em; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; }
.intro-grid p { max-width: 48ch; margin: 0; color: var(--muted); line-height: 1.9; }
.separated-section { border-top: 1px solid var(--line); }
.intro-section > p, .intro-copy p { max-width: 80ch; color: var(--muted); line-height: 1.9; }
.intro-copy p { margin: 0 0 14px; }
.dimension-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 30px; margin-top: 30px; }
.dimension-card { padding: 21px 5px 12px 0; border-top: 1px solid var(--gold); background: transparent; }
.dimension-card h3, .dimension-card h4 { margin: 0 0 12px; color: var(--accent-dark); font-size: 17px; }
.dimension-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.radar-panel { display: grid; place-items: center; min-height: 360px; margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.radar-panel svg { display: block; width: min(100%, 440px); height: auto; overflow: visible; }
.radar-grid { fill: rgba(40, 93, 81, .025); stroke: #d7dfd5; stroke-width: 1; }
.radar-axis { stroke: #d7dfd5; stroke-width: 1; }
.radar-label { fill: var(--ink); font-size: 11px; font-weight: 650; }
.radar-score { fill: rgba(40, 93, 81, .22); stroke: var(--accent); stroke-width: 2.5; }
.score-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.score-legend span { padding: 13px 10px; border-top: 2px solid #649583; background: #edf2e9; color: var(--accent-dark); font-size: 12px; text-align: center; }
.score-legend span:nth-child(2) { border-color: #a1af6d; background: #f1f2e4; color: #536c27; }
.score-legend span:nth-child(3) { border-color: #c9a263; background: #f8f1e3; color: #8a581e; }
.score-legend span:nth-child(4) { border-color: #bb7b70; background: #f8eae5; color: #9c4f49; }
.site-footer { padding: 25px 0 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #7c887e; font-size: 12px; }
.site-error { margin: 0 0 18px; padding: 14px 17px; border-radius: 12px; color: #8a2f36; background: #fff0f0; }
.form-error { margin: 10px 0 0; color: #ad3b43; line-height: 1.5; font-size: 14px; }
.test-view { max-width: 780px; margin: 22px auto 90px; }
.test-heading, .progress-label, .test-actions, .section-heading, .report-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.test-heading .eyebrow { margin: 0; }
.test-instruction { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.encouragement { margin: 22px 0 -18px; padding: 13px 17px; border-left: 2px solid var(--gold); background: #eeefe6; color: var(--accent-dark); font-size: 14px; }
.progress-label { margin: 42px 0 13px; color: var(--muted); font-size: 13px; }
.progress-label span:first-child { color: var(--ink); font-weight: 700; }
.progress-track { height: 4px; overflow: hidden; border-radius: 8px; background: #d9dfd5; }
.progress-track > div { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s; }
.question-panel { margin: 34px 0 22px; padding: 45px; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); background: var(--surface); box-shadow: 0 14px 38px rgba(42, 62, 47, .04); }
.question-panel h2 { margin: 0 0 20px; color: var(--accent); font-size: 13px; font-weight: 720; letter-spacing: .1em; }
.question-panel > p { min-height: 90px; margin: 0 0 36px; font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif; font-size: clamp(26px, 4vw, 35px); font-weight: 600; line-height: 1.55; letter-spacing: -.025em; }
.choices { display: grid; gap: 11px; }
.choice { min-height: 59px; width: 100%; display: flex; align-items: center; gap: 15px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; font-size: 16px; transition: border-color .15s, background .15s; }
.choice:hover { border-color: #8aa99a; background: #f4f8f1; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); color: var(--accent-dark); font-weight: 720; }
.choice-letter { width: 26px; color: var(--accent); font-size: 13px; font-weight: 730; }
.question-review { padding: 18px 0; border-top: 1px solid var(--line); color: var(--accent-dark); }
.question-review summary { cursor: pointer; font-weight: 650; }
.question-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.question-grid button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); }
.question-grid button.answered { border-color: #aac1ad; background: #eaf0e6; color: var(--accent-dark); }
.question-grid button.current { outline: 2px solid var(--accent); }
.test-actions { position: sticky; bottom: 0; z-index: 2; margin-top: 28px; padding: 16px 0; border-top: 1px solid var(--line); background: var(--canvas); }
.report-view { max-width: 850px; margin: 22px auto 90px; }
.report-heading { margin: 45px 0 32px; }
.report-heading .eyebrow { margin-bottom: 12px; }
.report-heading h2 { margin: 0; font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif; font-size: clamp(38px, 5vw, 56px); font-weight: 600; letter-spacing: -.055em; }
.report-heading > p:last-child { color: var(--muted); }
.score-summary { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.score-summary > div { min-height: 196px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 29px; border-radius: var(--radius); background: #1c443b; color: #f8f5ea; }
.score-summary > div:last-child { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.score-summary span, .score-summary small { color: var(--muted); font-size: 14px; }
.score-summary > div:first-child span { color: #d6e2d8; }
.score-summary strong { font-size: 62px; line-height: 1; letter-spacing: -.065em; }
.score-summary b { color: #e2cd9e; font-size: 15px; }
.report-section { margin-top: 44px; padding-top: 37px; border-top: 1px solid var(--line); }
.section-heading { align-items: baseline; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.factor-row { display: grid; grid-template-columns: 130px 1fr 100px; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.factor-row strong { font-size: 15px; }
.factor-bar { height: 8px; border-radius: 8px; background: #e5e9df; overflow: hidden; }
.factor-bar span { display: block; height: 100%; border-radius: 8px; background: var(--accent); }
.factor-score { text-align: right; font-size: 14px; }
.factor-score small { display: block; color: var(--muted); font-size: 12px; }
.factor-table-wrap { overflow-x: auto; margin: 21px 0 30px; border: 1px solid var(--line); border-radius: 12px; }
.factor-table { width: 100%; min-width: 480px; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.factor-table th, .factor-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.factor-table th { background: var(--soft); font-weight: 700; }
.factor-table tr:last-child td { border-bottom: 0; }
.reference-tip { margin-top: 42px; padding: 22px 25px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: #f0eadc; color: #574c39; font-size: 14px; line-height: 1.9; }
.reference-tip strong { color: var(--accent-dark); }
.report-view .dimension-card { padding: 22px; border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 12px; background: var(--surface); }
.recommendation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.recommendation-card { padding: 24px; border: 1px solid var(--line); border-left: 2px solid var(--gold); border-radius: 0 12px 12px 0; background: var(--surface); }
.recommendation-card h4 { margin: 0 0 10px; font-size: 16px; }
.recommendation-card p, .crisis-help { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.crisis-help { grid-column: 1 / -1; padding: 18px 20px; border-radius: 9px; background: var(--soft); }
.guidance p { max-width: 68ch; color: var(--muted); line-height: 1.9; }
.report-actions { justify-content: flex-start; margin-top: 37px; }
.history-dialog { width: min(440px, calc(100vw - 28px)); max-height: min(78dvh, 700px); padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 26px 80px rgba(15, 56, 54, .18); }
.history-dialog::backdrop { background: rgba(17, 45, 45, .33); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.dialog-heading h2 { margin: 0; font-size: 22px; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #ecf4f2; color: var(--ink); font-size: 24px; line-height: 1; }
.history-list { margin: 24px 0 18px; }
.history-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-align: left; }
.history-item:hover { border-color: var(--accent); }
.history-item strong, .history-item small { display: block; }
.history-item small { margin-top: 6px; color: var(--muted); }
.empty-history { margin: 30px 0; color: var(--muted); line-height: 1.7; }
.danger-button { color: #a04149; }
@media (max-width: 760px) {
  .site-shell { padding: 0 18px; }
  .site-header { height: 70px; }
  .hero { min-height: 0; grid-template-columns: 1fr; border-radius: 20px; }
  .hero-content { padding: 40px 28px 42px; }
  .hero h1 { font-size: clamp(34px, 8vw, 46px); }
  .hero-description { margin: 18px 0 26px; font-size: 15px; }
  .hero-art { display: none; }
  .facts { padding: 22px 0; }
  .facts > div { display: block; padding: 0 10px; }
  .facts strong { display: block; font-size: 17px; }
  .facts span { display: block; margin-top: 5px; font-size: 11px; line-height: 1.4; }
  .intro-section { padding: 42px 0 60px; }
  .intro-grid { grid-template-columns: 1fr; gap: 18px; }
  .dimension-grid, .recommendation-grid { grid-template-columns: 1fr; }
  .score-legend { grid-template-columns: repeat(2, 1fr); }
  .radar-panel { min-height: 300px; padding: 0; }
  .site-footer { gap: 15px; flex-wrap: wrap; }
  .test-view { margin: 8px auto 28px; }
  .test-instruction { margin-top: 9px; font-size: 14px; }
  .encouragement { margin: 13px 0 0; padding: 9px 12px; font-size: 12px; }
  .progress-label { margin: 17px 0 9px; }
  .question-panel { margin: 18px 0 12px; padding: 24px 18px; }
  .question-panel h2 { margin-bottom: 10px; }
  .question-panel > p { min-height: 0; margin-bottom: 24px; font-size: 25px; }
  .choices { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .choice { min-height: 66px; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 2px; text-align: center; font-size: 12px; line-height: 1.25; }
  .choice-letter { width: auto; font-size: 14px; }
  .test-actions { margin-top: 12px; padding: 9px 0; }
  .question-grid { grid-template-columns: repeat(6, 1fr); }
  .score-summary { grid-template-columns: 1fr 1fr; }
  .score-summary > div { min-height: 160px; padding: 20px; }
  .score-summary strong { font-size: 48px; }
  .section-heading { display: block; }
  .section-heading p { margin: -10px 0 8px; }
  .factor-row { grid-template-columns: 100px 1fr 62px; gap: 8px; }
  .factor-row strong { font-size: 13px; }
  .factor-score { font-size: 12px; }
}
@media (max-width: 390px) {
  .site-shell { padding: 0 14px; }
  .brand { gap: 8px; font-size: 14px; }
  .hero-content { padding: 36px 24px 38px; }
  .facts strong { font-size: 15px; }
  .facts span { font-size: 10px; }
  .test-actions .primary-button, .test-actions .secondary-button { padding: 0 17px; }
  .score-summary { grid-template-columns: 1fr; }
  .score-summary > div { min-height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
