:root {
  color-scheme: light;
  --ink: #2c3e50;
  --muted: #6d6a60;
  --green: #287d70;
  --green-dark: #205d55;
  --green-soft: #d9e9dc;
  --coral: #c0392b;
  --coral-soft: #f0d8c9;
  --gold: #f5d88a;
  --gold-dark: #a8742e;
  --orange: #e8a87c;
  --paper: #f5f0e1;
  --white: #fbf7ea;
  --line: rgba(192, 57, 43, .22);
  --shadow: 0 4px 0 rgba(192, 57, 43, .12), 0 8px 24px rgba(44, 62, 80, .12);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 16px;
  line-height: 1.55;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle 280px at 12% 18%, rgba(232, 168, 124, .10), transparent 72%),
    radial-gradient(circle 340px at 87% 36%, rgba(26, 188, 156, .08), transparent 74%),
    radial-gradient(circle 260px at 62% 91%, rgba(245, 216, 138, .13), transparent 72%),
    repeating-linear-gradient(32deg, rgba(192, 57, 43, .018) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(124deg, rgba(44, 62, 80, .014) 0 1px, transparent 1px 9px);
}

button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; box-shadow: 0 0 0 5px var(--paper); }
img { display: block; max-width: 100%; }

.app { width: min(1120px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.loading-state, .error-state { margin: auto; padding: 48px 0; text-align: center; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 760; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink); background: linear-gradient(145deg, #f8e8b6, #e8a87c); box-shadow: 0 2px 0 rgba(192, 57, 43, .2), 0 4px 10px rgba(232, 168, 124, .18); font-size: 18px; }
.top-note { color: var(--muted); font-size: 13px; }

.intro-layout { flex: 1; min-height: 570px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); align-items: center; gap: 46px; padding: 42px 0 28px; }
.intro-copy { max-width: 590px; padding: 16px 0; }
.eyebrow { width: fit-content; margin: 0 0 14px; padding-bottom: 5px; border-bottom: 3px solid var(--orange); border-radius: 2px; color: var(--green-dark); font-size: 13px; font-weight: 700; letter-spacing: 0; }
h1, h2, p { margin-top: 0; }
.intro-copy h1 { max-width: 570px; margin: 0; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 48px; line-height: 1.22; font-weight: 800; }
.intro-copy h1 span { color: var(--green); }
.intro-lede { max-width: 460px; margin: 21px 0 26px; color: #4c5a63; font-size: 18px; }
.quick-facts { display: flex; gap: 0; max-width: 420px; margin: 0 0 28px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quick-facts div { min-width: 110px; display: grid; gap: 2px; padding: 0 20px; border-right: 1px solid var(--line); }
.quick-facts div:first-child { padding-left: 0; }
.quick-facts div:last-child { border-right: 0; }
.quick-facts strong { color: var(--green-dark); font-size: 22px; line-height: 1.15; }
.quick-facts span { color: var(--muted); font-size: 12px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; border: 1px solid rgba(232, 168, 124, .45); border-radius: 8px; cursor: pointer; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 14px; font-weight: 700; transition: all 300ms ease-in-out; }
.button:active:not(:disabled) { transform: translateY(3px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { color: var(--ink); background: linear-gradient(135deg, #f8e6ac 0%, #f5d88a 48%, #e8a87c 100%); box-shadow: 0 4px 0 #c0392b, 0 7px 16px rgba(232, 168, 124, .3); }
.button-primary:hover:not(:disabled) { filter: brightness(1.1) contrast(1.08); box-shadow: 0 4px 0 #c0392b, 0 10px 25px rgba(44, 62, 80, .16); }
.button-secondary { color: var(--ink); border-color: rgba(232, 168, 124, .45); background: linear-gradient(135deg, #fbf7ea, #ede5d0); box-shadow: 0 4px 0 #1abc9c, 0 6px 16px rgba(44, 62, 80, .14); }
.button-secondary:hover:not(:disabled) { filter: brightness(1.1) contrast(1.08); }
.button-quiet { min-height: 38px; padding: 0 13px; color: var(--ink); background: linear-gradient(135deg, #fbf7ea, #ede5d0); box-shadow: 0 2px 0 rgba(192, 57, 43, .14), 0 4px 12px rgba(232, 168, 124, .14); font-size: 13px; }
.button-quiet:hover { filter: brightness(1.1) contrast(1.08); }
.start-button { min-width: 190px; justify-content: space-between; }
.privacy-note { margin: 12px 0 0; color: var(--green-dark); font-size: 12px; }
.disclaimer { margin: 22px 0 0; color: #665f53; font-size: 12px; }
.intro-art { min-width: 0; min-height: 410px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; margin: 0; }
.intro-art img { width: min(360px, 88%); height: auto; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.intro-art figcaption { color: var(--ink); font-size: 13px; text-align: center; }
.site-footer { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: #5e5b51; font-size: 11px; }

.quiz-wrap { width: min(760px, 100%); margin: 48px auto 70px; }
.quiz-topbar { min-height: 72px; }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.question-count { font-size: 14px; color: var(--muted); }
.question-count strong { color: var(--ink); font-size: 17px; }
.dimension-label { display: inline-block; margin-left: 12px; padding-left: 12px; border-left: 1px solid #cbd3ca; color: var(--green); font-size: 12px; }
.answered-count { color: var(--muted); font-size: 12px; }
.progress-track { height: 7px; overflow: hidden; border: 1px solid rgba(232, 168, 124, .28); border-radius: 8px; background: repeating-linear-gradient(35deg, #ede5d0 0 5px, #f5f0e1 5px 10px); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1abc9c, #f5d88a); transition: width 300ms ease-out; }
.question-panel { margin-top: 24px; padding: 30px 32px 28px; border: 1px solid rgba(232, 168, 124, .35); border-radius: 8px; background-color: var(--paper); background-image: radial-gradient(circle at 12% 15%, rgba(245, 216, 138, .13), transparent 32%), repeating-linear-gradient(35deg, rgba(232, 168, 124, .035) 0 2px, transparent 2px 10px); box-shadow: var(--shadow), 0 0 26px rgba(232, 168, 124, .08); }
.question-topline { display: flex; align-items: center; justify-content: space-between; color: var(--green); font-size: 12px; font-weight: 700; }
.question-index { color: var(--coral); font-size: 13px; }
.question-topline i { color: #a1ada4; font-style: normal; }
.question-panel h1 { min-height: 72px; display: grid; place-items: center; margin: 21px 0 27px; text-align: center; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 26px; line-height: 1.4; font-weight: 700; }
.question-panel h1::after, .result-copy h1::after { content: ""; display: block; width: 64px; height: 3px; margin: 14px auto 0; border-radius: 2px; background: linear-gradient(90deg, #e8a87c, #c0392b); transition: width 500ms ease-out; }
.result-copy h1::after { margin-left: 0; }
.question-panel.group:hover h1::after, .result-hero.group:hover .result-copy h1::after { width: 96px; }
.choice-ends { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 16px; color: var(--ink); font-size: 14px; font-weight: 650; }
.choice-ends span:last-child { text-align: right; }
.scale-row { display: flex; justify-content: center; gap: clamp(9px, 2vw, 18px); }
.scale-button { width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center; border: 1px solid rgba(232, 168, 124, .45); border-radius: 8px; color: var(--ink); background: linear-gradient(145deg, #fbf7ea, #ede5d0); box-shadow: 0 2px 0 rgba(192, 57, 43, .12), 0 4px 10px rgba(232, 168, 124, .14); cursor: pointer; font-size: 17px; font-weight: 760; transition: all 300ms ease-in-out; }
.scale-button:hover { filter: brightness(1.08) contrast(1.06); }
.scale-button:active { transform: translateY(3px); }
.scale-button.is-selected { border-color: var(--coral); color: #fffaf0; background: linear-gradient(145deg, #d8785c, #c0392b); box-shadow: 0 3px 0 #8d2d25, 0 7px 16px rgba(192, 57, 43, .2); }
.scale-hints { display: flex; justify-content: space-between; margin-top: 13px; color: #625e54; font-size: 11px; }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 20px; }
.next-button { min-width: 138px; justify-content: space-between; }
.quiz-footnote { margin: 27px 0 0; color: #625e54; text-align: center; font-size: 12px; }

.result-wrap { width: min(920px, 100%); margin: 36px auto 58px; }
.result-hero { min-height: 300px; display: grid; grid-template-columns: 280px 1fr; align-items: center; gap: 32px; padding: 24px 34px; border: 1px solid rgba(232, 168, 124, .38); border-radius: 8px; background-color: var(--paper); background-image: radial-gradient(circle at 18% 22%, rgba(245, 216, 138, .15), transparent 35%), repeating-linear-gradient(32deg, rgba(232, 168, 124, .035) 0 2px, transparent 2px 11px); box-shadow: var(--shadow), 0 0 26px rgba(232, 168, 124, .08); }
.result-art { width: 244px; height: 244px; display: grid; place-items: center; border-radius: 8px; background: radial-gradient(circle at 45% 38%, rgba(245, 216, 138, .42), rgba(232, 168, 124, .15) 70%); }
.result-art img { width: 220px; height: 220px; object-fit: contain; mix-blend-mode: multiply; }
.result-copy .eyebrow { margin-bottom: 6px; }
.result-copy h1 { margin: 0; color: var(--ink); font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 44px; line-height: 1.12; font-weight: 800; }
.result-type-name { margin: 9px 0 10px; font-size: 19px; font-weight: 740; }
.result-description { max-width: 480px; margin-bottom: 16px; color: #607068; }
.type-code { display: flex; gap: 7px; }
.type-code span { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(26, 120, 102, .3); border-radius: 8px; color: var(--ink); background: linear-gradient(145deg, #e0eee0, #b8d9c9); box-shadow: 0 2px 0 rgba(26, 120, 102, .18); font-size: 13px; font-weight: 780; }
.result-body { padding: 34px 8px 0; }
.score-section { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-heading h2 { margin: 0; font-size: 22px; }
.score-range { color: var(--muted); font-size: 11px; }
.dimension-list { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 28px; }
.dimension-result { min-width: 0; }
.dimension-result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dimension-result-head strong { font-size: 13px; }
.dimension-result-head span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.dimension-result-head b { color: var(--ink); font-size: 11px; }
.dimension-result-head i { margin: 0 3px; color: #abb5ae; font-style: normal; }
.dimension-meter { position: relative; height: 10px; display: flex; overflow: visible; border: 1px solid rgba(232, 168, 124, .28); border-radius: 8px; background: repeating-linear-gradient(35deg, #ede5d0 0 5px, #f5f0e1 5px 10px); }
.dimension-meter span:first-child { border-radius: 8px 0 0 8px; background: linear-gradient(90deg, #c0392b, #e8a87c); }
.dimension-meter span:nth-child(2) { border-radius: 0 8px 8px 0; background: linear-gradient(90deg, #9cc9b2, #1abc9c); }
.dimension-meter i { position: absolute; left: calc(50% - 1px); top: -4px; width: 2px; height: 16px; background: #fffaf0; box-shadow: 0 0 0 1px rgba(44, 62, 80, .24); }
.dimension-result-foot { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); font-size: 10px; }
.traits-section { padding: 28px 0 22px; }
.traits-section > p:not(.eyebrow) { max-width: 680px; margin-bottom: 14px; color: #56675e; }
.trait-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.trait-list li { padding: 6px 10px; border: 1px solid rgba(26, 120, 102, .22); border-radius: 8px; color: var(--ink); background: linear-gradient(135deg, #e8f0dc, #c9e2d1); box-shadow: 0 2px 0 rgba(26, 120, 102, .12); font-size: 12px; }
.balanced-note { margin: 16px 0 0; padding: 11px 13px; border: 1px solid rgba(168, 116, 46, .32); border-radius: 8px; color: #594821; background: linear-gradient(135deg, #fbf3d7, #f5d88a); font-size: 12px; }
.result-actions { display: flex; gap: 10px; padding-top: 12px; }
.result-disclaimer { margin: 16px 0 0; color: #8a918a; font-size: 11px; }
.result-disclaimer a, .credits-content a { color: var(--green-dark); text-underline-offset: 3px; }
.credits-page { min-height: 100vh; }
.credits-content { width: min(720px, 100%); margin: 56px auto; }
.credits-content h1 { margin-bottom: 22px; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 32px; line-height: 1.3; }
.credits-content h2 { margin: 30px 0 10px; font-size: 19px; }
.credits-content p { color: #4c5a63; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 11px 15px; border: 1px solid rgba(232, 168, 124, .42); border-radius: 8px; color: #fffaf0; background: linear-gradient(135deg, #2c3e50, #205d55); box-shadow: 0 4px 0 #c0392b, 0 8px 22px rgba(44, 62, 80, .2); transform: translateX(-50%); font-size: 13px; }

@media (max-width: 760px) {
  .app { width: min(calc(100% - 32px), 560px); }
  .topbar { min-height: 64px; }
  .top-note { display: none; }
  body.intro-screen { height: 100svh; overflow: hidden; }
  .app.is-intro { width: min(calc(100% - 32px), 560px); height: 100svh; min-height: 0; overflow: hidden; }
  .app.is-intro .topbar { flex: 0 0 56px; min-height: 56px; }
  .intro-layout { min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; align-items: stretch; gap: 2px; padding: 10px 0 4px; }
  .intro-copy { order: 0; padding: 0; }
  .intro-copy .eyebrow { margin-bottom: 7px; padding-bottom: 3px; font-size: 11px; }
  .intro-copy h1 { font-size: 32px; line-height: 1.16; }
  .intro-lede { margin: 8px 0 12px; font-size: 14px; line-height: 1.4; }
  .quick-facts { max-width: 100%; margin-bottom: 15px; padding: 8px 0; }
  .quick-facts div { min-width: 0; flex: 1; padding: 0 16px; }
  .quick-facts strong { font-size: 19px; }
  .quick-facts span { font-size: 11px; }
  .start-button { min-height: 42px; }
  .privacy-note { margin-top: 7px; font-size: 11px; }
  .disclaimer { margin-top: 8px; font-size: 11px; }
  .intro-art { order: 1; min-height: 0; gap: 2px; justify-content: center; }
  .intro-art img { width: min(168px, 45vw); height: auto; max-height: 100%; }
  .intro-art figcaption { font-size: 11px; }
  .app.is-intro .site-footer { flex: 0 0 34px; min-height: 34px; padding: 5px 0; font-size: 9px; }
  .quiz-wrap { margin: 30px auto 48px; }
  .question-panel { margin-top: 18px; padding: 24px 18px 20px; }
  .question-panel h1 { min-height: 92px; margin: 16px 0 21px; font-size: 22px; }
  .choice-ends { gap: 14px; font-size: 12px; }
  .scale-button { width: 48px; height: 48px; flex-basis: 48px; font-size: 16px; }
  .scale-row { gap: 10px; }
  .dimension-label { margin-left: 7px; padding-left: 7px; }
  .result-wrap { margin: 24px auto 44px; }
  .result-hero { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding: 23px 20px; text-align: center; }
  .result-art { width: 190px; height: 190px; }
  .result-art img { width: 175px; height: 175px; mix-blend-mode: multiply; }
  .result-copy h1 { font-size: 38px; }
  .type-code { justify-content: center; }
  .result-body { padding: 26px 0 0; }
  .dimension-list { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 390px) {
  .app { width: calc(100% - 24px); }
  .app.is-intro { width: calc(100% - 24px); }
  .brand { gap: 7px; font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .button { gap: 8px; padding: 0 12px; font-size: 13px; }
  .intro-copy h1 { font-size: 30px; }
  .intro-lede { margin-bottom: 9px; }
  .quick-facts { margin-bottom: 12px; }
  .quick-facts div { padding: 0 11px; }
  .intro-art img { width: min(160px, 43vw); height: auto; }
  .scale-row { gap: 7px; }
  .scale-button { width: 44px; height: 44px; flex-basis: 44px; }
  .choice-ends { gap: 10px; font-size: 11px; }
  .answered-count { font-size: 10px; }
  .dimension-result-head span { font-size: 9px; }
}

@media (max-width: 760px) and (max-height: 640px) {
  .intro-layout { padding-top: 6px; }
  .intro-copy .eyebrow { margin-bottom: 4px; }
  .intro-copy h1 { font-size: 29px; }
  .intro-lede { margin: 5px 0 8px; }
  .quick-facts { margin-bottom: 9px; padding: 6px 0; }
  .privacy-note { margin-top: 5px; }
  .disclaimer { margin-top: 5px; }
  .intro-art img { width: min(128px, 34vw); height: auto; }
}

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