:root {
  color-scheme: light;
  --paper: #f4ede1;
  --card: #fffcf4;
  --ink: #26201d;
  --soft: #65564d;
  --line: #ccbeaa;
  --red: #883727;
  --green: #334d45;
  --serif: "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --sans: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
*, *::after, *::before { box-sizing: border-box; }
body { margin: 0; font: 1rem/1.7 var(--sans); color: var(--ink); background: radial-gradient(ellipse at 19% 0%, #fff8e9, transparent 60%), var(--paper); }
button, a { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #a0412f; outline-offset: 4px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.frame { width: min(72rem, calc(100% - 5rem)); margin: auto; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.topline { border-bottom: 1px solid var(--line); padding: 1.12rem 0; display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.17rem/1.25 var(--serif); letter-spacing: .15em; }
.seal { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; padding-left: .15em; border-radius: .17rem; background: var(--red); color: #fff7e8; font-size: .95rem; }
.top-note, .footer { color: var(--soft); font-size: .875rem; }
.footer { margin-top: auto; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: .7rem; padding: 1rem 0 1.35rem; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.07fr); align-items: center; gap: clamp(1.6rem, 6vw, 6rem); padding: clamp(2rem, 5.5vw, 5.2rem) 0; }
.intro h1 { margin: 0 0 1.3rem; font: 800 clamp(2.85rem, 6.1vw, 5.25rem)/1.12 var(--serif); letter-spacing: .035em; }
.intro-end { font-size: .78em; white-space: nowrap; }
.intro em { color: var(--red); font-style: normal; }
.intro p { color: var(--soft); margin: 0 0 1.3rem; }
.hero-print { position: relative; margin: 0; padding: .6rem; border: 1px solid #9a7762; background: #e5d5b9; }
.hero-print::after { content: ""; position: absolute; pointer-events: none; inset: 1.22rem; border: 1px solid #eee0ba7a; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .63rem 1.35rem; border: 1px solid var(--red); border-radius: .2rem; background: var(--red); color: #fffaf0; font-weight: 700; text-decoration: none; transition: background-color 140ms, border-color 140ms; }
.button:hover:not(:disabled) { background: #6f2b1f; border-color: #6f2b1f; }
.button.quiet { background: transparent; color: var(--red); }
.button.quiet:hover:not(:disabled) { background: #eddfd0; border-color: var(--red); }
.quiz { max-width: 42rem; margin-inline: auto; padding: clamp(1.9rem, 5vw, 3.8rem) 0; }
.prog-label { display: flex; justify-content: space-between; gap: .7rem; color: var(--soft); font-size: .9375rem; margin: 0 0 .4rem; }
progress { display: block; width: 100%; appearance: none; accent-color: var(--red); height: .42rem; border: 0; border-radius: 1rem; overflow: hidden; background: #ddcfbd; }
progress::-webkit-progress-bar { background: #ddcfbd; }
progress::-webkit-progress-value { background: var(--red); }
progress::-moz-progress-bar { background: var(--red); }
.question { font: 700 clamp(1.58rem, 4vw, 2.18rem)/1.45 var(--serif); margin: 1.22rem 0 .9rem; }
.option-list { display: grid; gap: .62rem; border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.option { display: flex; align-items: center; gap: .8rem; min-height: 3.35rem; cursor: pointer; border: 1px solid var(--line); border-radius: .2rem; padding: .62rem .85rem; background: var(--card); transition: background-color 140ms, border-color 140ms; }
.option:hover, .option:has(input:checked) { border-color: var(--red); }
.option:has(input:checked) { background: #f1dfd0; }
.option:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.option input { appearance: none; width: 1.72rem; height: 1.72rem; margin: 0; flex: none; border: 1px solid #9d7664; border-radius: 50%; color: var(--red); display: grid; place-items: center; }
.option input:checked { background: var(--red); color: var(--card); border-color: var(--red); }
.option input::before { content: attr(data-letter); font-size: .8rem; font-weight: 750; }
.controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem; margin-top: 1rem; }
.tie-note, .notice { color: var(--soft); margin: .45rem 0 .9rem; }
.notice { font-size: .9375rem; }
.notice:empty { display: none; }
.result { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; gap: clamp(1.55rem, 4vw, 3.5rem); max-width: 65rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) 0; }
.card-column { width: 100%; max-width: 30rem; margin: 0 auto; }
.poster { width: 100%; height: auto; display: block; box-shadow: 0 .55rem 1.3rem #2b20182a; }
.result-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.fallback img { display: block; width: 100%; height: auto; margin-top: .6rem; }
.result-detail { min-width: 0; }
.result-identity { border: 1px solid var(--line); background: #fff9ec; }
.identity-art { position: relative; isolation: isolate; display: grid; align-items: end; min-height: 10rem; padding: .85rem 1rem 1.25rem; text-align: center; color: #fff8e8; background: #2e453a; }
.identity-background, .identity-art::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.identity-background { z-index: -2; object-fit: cover; object-position: center 47%; }
.identity-art::before { z-index: -1; content: ""; background: radial-gradient(ellipse at 50% 38%, #fed6a758, transparent 54%), linear-gradient(#19292355, #172824f2); }
.identity-art::after { position: absolute; inset: .55rem; border: 1px solid #f4dfb78c; content: ""; pointer-events: none; }
.identity-avatar { display: block; width: clamp(8.6rem, 36vw, 11rem); height: auto; margin: 0 auto .1rem; filter: drop-shadow(0 .25rem .45rem #1a211e85); }
.result-kicker { color: #f5ddba; font-size: .875rem; letter-spacing: .12em; margin: 0 0 .3rem; }
.result-detail h1 { font: 800 clamp(2.05rem, 8vw, 3.45rem)/1.18 var(--serif); margin: 0; }
.identity-copy { padding: .85rem .85rem .9rem; text-align: center; }
.identity-quote { margin: 0; padding: .85rem .95rem 1rem; border: 1px solid #ced5c7; background: #e9ede2; }
.identity-quote figcaption { display: flex; align-items: center; justify-content: center; gap: .55rem; color: #53665a; font-size: .75rem; font-weight: 650; letter-spacing: .12em; }
.identity-quote figcaption::before, .identity-quote figcaption::after { content: ""; width: 1.3rem; height: 1px; background: #9fae9d; }
.role-quote { max-width: 19em; margin: .52rem auto 0; color: #2c483e; font: 700 clamp(1.05rem, 3.9vw, 1.3rem)/1.68 var(--serif); text-wrap: balance; }
.role-quote span { display: inline-block; max-width: 100%; vertical-align: top; }
.prop { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .24rem .6rem; margin: .73rem 0 0; color: var(--soft); font-size: .875rem; }
.prop span { border: 1px solid #bd8b73; padding: 0 .3rem; color: var(--red); font-size: .72rem; letter-spacing: .04em; }
.report-chapter { background: #fffbf0; border: 1px solid var(--line); border-top: 2px solid #b3a18a; padding: 1rem; margin-top: .95rem; }
.report-chapter h2 { color: var(--green); border-left: .25rem solid var(--red); padding-left: .65rem; font: 700 1.27rem/1.35 var(--serif); margin: 0 0 .7rem; }
.chapter-items { display: grid; gap: .5rem; }
.chapter-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chapter-item { background: #f3ebdc; padding: .72rem .78rem; }
.chapter-item h3 { margin: 0 0 .25rem; font-size: .9rem; color: var(--red); }
.chapter-item p { margin: 0; color: #3e332c; }
.report-speech .chapter-item { background: #e2e8db; font: 700 1.12rem/1.7 var(--serif); }
.report-chapter, .result-identity { min-width: 0; }
.enter { animation: enter 200ms ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(.35rem); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) {
  .chapter-pair { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .frame { width: calc(100% - 2rem); }
  .topline { padding: .86rem 0; }
  .intro, .result { grid-template-columns: 1fr; }
  .intro { gap: 1.4rem; padding: 1.65rem 0 1.55rem; }
  .intro h1 { font-size: clamp(2.75rem, 9.2vw, 4rem); margin-bottom: .75rem; }
  .intro p { margin-bottom: .9rem; }
  .result { gap: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
[hidden] { display: none !important; }
.topline { padding-block: 1.25rem; }
.intro-facts { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; padding: 1.05rem 0 0; margin: 1.3rem 0 0; border-top: 1px solid var(--line); max-width: 27rem; }
.intro-facts > div { min-width: 8rem; }
.intro-facts dt { color: var(--green); margin: 0; font: 700 1.2rem/1.5 var(--serif); }
.intro-facts dd { color: var(--soft); font-size: .875rem; margin: .15rem 0 0; }
.share-box { margin-top: 1rem; padding: .9rem 1rem; border: 1px solid var(--line); background: var(--card); }
.share-box label { display: block; color: var(--green); font-weight: 700; }
.share-row { display: flex; gap: .45rem; align-items: stretch; margin-top: .4rem; }
.share-row input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: .2rem; background: #fffdf7; padding: .48rem .55rem; font: .95rem/1.4 var(--sans); }
.share-row .button { flex: none; min-height: 2.65rem; padding-inline: .7rem; }
.share-box p { color: var(--soft); font-size: .875rem; margin: .55rem 0 0; }
.purchase-card { max-width: 42rem; margin: clamp(1.4rem, 6vw, 4rem) auto; padding: clamp(1.25rem, 5vw, 3.15rem); border: 1px solid var(--line); background: var(--card); }
.purchase-card h1 { margin: 0 0 .8rem; font: 800 clamp(2rem, 5vw, 3.3rem)/1.28 var(--serif); }
.purchase-card em { color: var(--red); font-style: normal; }
.purchase-card p { color: var(--soft); }
.purchase-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .7rem; margin: 1rem 0; border-block: 1px solid var(--line); padding: .6rem 0; }
.purchase-price strong { color: var(--red); font-size: 1.8rem; line-height: 1.4; }
.purchase-price span { color: var(--green); font-weight: 650; }
.purchase-steps { padding-left: 1.45rem; margin-block: 1rem 1.25rem; }
.purchase-steps li { margin: .4rem 0; }
.purchase-help { margin: .55rem 0 0; font-size: .9375rem; }
@media (max-width: 760px) { .topline { padding-block: .86rem; } .intro-facts { gap: .8rem 1rem; margin-top: .9rem; padding-top: .8rem; } }

/* Shared editorial layout for the quiz and its result cards. */
body { background: radial-gradient(ellipse at 4% 0%, #fff9eb, transparent 67%), #eee5d6; }
.frame { width: min(76rem, calc(100% - 5rem)); }
.intro { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.55rem, 5.2vw, 5.1rem); }
.intro h1 { display: grid; justify-items: start; grid-template-columns: minmax(0, 1fr); gap: .28rem; font-size: clamp(3.55rem, 7.3vw, 6.2rem); letter-spacing: .045em; line-height: 1.06; }
.intro-lead { font-size: .36em; font-weight: 700; letter-spacing: .12em; margin-bottom: .28em; }
.intro-end { display: block; font-size: .53em; letter-spacing: .045em; white-space: normal; margin-top: .22em; }
.hero-print { padding: .52rem; border-color: #a78465; background: #faefdb; box-shadow: 0 .9rem 2.2rem #21140e24; }
.hero-print::after { inset: 1.28rem; pointer-events: none; }
.hero-print img { display: block; height: auto; width: 100%; aspect-ratio: 1.31; object-fit: cover; object-position: 62% center; background: #2a392f; }
.quiz { margin-block: clamp(1rem, 4vw, 3.4rem); padding: clamp(1.2rem, 4vw, 2.45rem); border: 1px solid var(--line); background: #fff9eb; box-shadow: 0 .5rem 1.35rem #2d21160b; }
.poster { background: #f4e7cd; border: 1px solid var(--line); }
@media (max-width: 760px) {
  .frame { width: calc(100% - 2rem); }
  .intro { grid-template-columns: 1fr; }
  .intro h1 { font-size: clamp(3.5rem, 12vw, 5rem); }
  .hero-print img { aspect-ratio: 1.78; object-position: 57% center; }
  .quiz { margin-block: 1.2rem; padding: 1rem; }
}

/* Compact portrait homepage and readable result summaries. */
body[data-view="home"] .frame { width: min(34rem, calc(100% - 2rem)); }
body[data-view="home"] .topline { padding-block: .95rem; }
.intro { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; padding: clamp(1.4rem, 4vw, 2.8rem) 0 1.55rem; }
.intro h1 { font-size: clamp(3.15rem, 11.8vw, 5.15rem); }
.intro-copy > p { max-width: 26rem; }
.hero-print img { aspect-ratio: 1.86; object-position: 58% 56%; }
.intro-facts { max-width: none; }
@media (max-width: 760px) {
  .intro { padding-top: 1.45rem; }
  .intro h1 { font-size: clamp(3rem, 11.65vw, 4.5rem); }
  .intro-facts { column-gap: 1rem; }
}
