﻿:root {
  --ink: #263b34;
  --muted: #746f62;
  --primary: #a04432;
  --accent: #b55a40;
  --bg: #f3efe5;
  --paper: #fffcf5;
  --soft: #f5f0e5;
  --line: #dcd4c4;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --shadow: 0 12px 40px rgba(49, 44, 29, .045);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at 90% 0, #e6e8d9 0, transparent 48%), var(--bg); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .15; z-index: -1; background-image: radial-gradient(#92876c .6px, transparent .6px); background-size: 5px 5px; }
button, input { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin-top: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid #a0443266; outline-offset: 4px; }
.hidden, .app-locked { display: none !important; }
.shell { width: min(100%, 1056px); padding: 0 32px 24px; margin: auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; padding: 26px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.brand { display: flex; align-items: center; gap: 13px; font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: 3px; }
.brand-seal { display: grid; place-items: center; width: 38px; height: 42px; border: 1px solid var(--primary); outline: 1px solid var(--primary); outline-offset: -5px; color: var(--primary); font-size: 24px; letter-spacing: 0; transform: rotate(-4deg); }
.masthead-note { color: var(--muted); font-size: 12px; letter-spacing: 2px; }
.card, .q-body, .top-card, .report-section { background: var(--paper); border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.card { padding: 40px; margin-bottom: 24px; }
.intro { padding: 0; overflow: hidden; }
.intro-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; padding: 48px 42px 38px; }
.intro-copy { align-self: center; }
.hero-sub { font-size: 11px; letter-spacing: 3px; color: var(--primary); font-weight: 600; margin-bottom: 22px; }
.hero-title { font-family: var(--serif); font-size: clamp(36px, 4.8vw, 54px); font-weight: 600; line-height: 1.45; letter-spacing: 2px; margin-bottom: 20px; }
.hero-title em { font-style: normal; color: var(--primary); }
.lead { color: #696b5f; font-size: 14px; line-height: 2; margin-bottom: 26px; }
.intro-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.intro-actions .btn { width: auto; font-size: 14px; padding: 14px 20px; }
.intro-caption { color: var(--muted); font-size: 11px; margin: 16px 0 0; letter-spacing: 1px; }
.folio-art { padding: 10px 0 8px 12px; align-self: center; }
.folio-inner { position: relative; height: 360px; background: #e9e4d2; border: 1px solid #c7bea6; box-shadow: -7px 2px 0 #d0c7af, -10px 4px 0 #e0d8c6, 12px 18px 24px #35423319; transform: rotate(3deg); overflow: hidden; }
.folio-inner::before { content: ""; position: absolute; inset: 14px; border: 1px solid #b8af95; }
.folio-inner::after { content: ""; position: absolute; left: 23px; top: 0; bottom: 0; border-left: 1px solid #b8af95; }
.folio-name { position: absolute; top: 32px; right: 34px; z-index: 1; writing-mode: vertical-rl; font: 40px/1.65 var(--serif); letter-spacing: 10px; padding: 12px 4px; background: #f9f5e9; border: 1px solid #b8af95; }
.folio-side { position: absolute; left: 44px; top: 32px; writing-mode: vertical-rl; color: #6b705e; font-size: 10px; letter-spacing: 3px; }
.folio-stamp { position: absolute; right: 116px; top: 56px; padding: 5px; color: var(--primary); border: 1px solid currentColor; font: 15px/1.4 var(--serif); transform: rotate(-7deg); }
.folio-landscape { position: absolute; inset: 46% 0 0; overflow: hidden; }
.folio-landscape i { position: absolute; width: 230px; height: 160px; background: #50685b25; border: 1px solid #50685b33; transform: rotate(40deg); border-radius: 30% 12% 0 0; top: 62px; left: -50px; }
.folio-landscape i:nth-child(2) { left: 110px; top: 100px; background: #536b5740; }
.folio-landscape i:nth-child(3) { left: -20px; top: 145px; background: #334b4260; width: 360px; }
.folio-bottom { position: absolute; bottom: 24px; right: 30px; font-size: 10px; color: #334c3e; letter-spacing: 2px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 42px; padding: 25px 0; border-top: 1px solid var(--line); }
.stat { text-align: center; font-size: 11px; color: var(--muted); border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat b { display: block; font: 32px/1.4 Georgia, var(--serif); color: var(--ink); }
.stat b span { font: 11px var(--serif); margin-left: 7px; }
.info-box { display: flex; gap: 20px; padding: 20px 42px; background: #f1eee3; font-size: 12px; color: #656958; }
.info-box b { white-space: nowrap; color: var(--ink); }
.btn { border: 1px solid transparent; border-radius: 3px; padding: 15px 22px; cursor: pointer; font-size: 15px; font-weight: 500; transition: background .2s, transform .2s, box-shadow .2s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.primary { width: 100%; background: var(--primary); color: #fffaf0; box-shadow: 0 5px 12px #a0443214; }
.primary:hover:not(:disabled) { background: #893827; box-shadow: 0 7px 16px #a0443229; }
.primary span { margin-left: 20px; }
.ghost { width: 100%; background: transparent; border-color: var(--line); color: var(--ink); }
.ghost:hover:not(:disabled) { background: #eee8d9; }
.btn:disabled, .nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.preference { max-width: 760px; margin: 0 auto 24px; padding: 36px 42px; }
.step-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.step-heading .hero-sub { margin: 0; }
.step-number { font: 24px var(--serif); color: var(--primary); border: 1px solid #bb8d76; padding: 7px 10px; }
.preference h2 { font: 600 28px/1.6 var(--serif); }
.hint { font-size: 13px; line-height: 1.8; color: var(--muted); }
.choices { display: grid; gap: 12px; margin-top: 24px; }
.choice { display: flex; align-items: center; gap: 18px; width: 100%; padding: 19px 20px; text-align: left; background: #fcfaf3; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.choice:hover { background: #f3efe2; border-color: #a79b80; }
.choice.selected { background: #f6eadd; border-color: var(--primary); box-shadow: inset 3px 0 var(--primary); }
.choice strong { display: block; font-size: 15px; font-weight: 500; line-height: 1.6; }
.choice small { display: block; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 5px; }
.gender-mark { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 46px; font: 22px var(--serif); color: var(--ink); background: #ebe7d9; border: 1px solid #d8cfba; }
.selected .gender-mark { color: var(--primary); background: #efddc9; border-color: #c5987f; }
.letter { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border: 1px solid #cfc6b5; color: #847963; font: 15px Georgia, serif; }
.selected .letter { background: var(--primary); color: #fffaf0; border-color: var(--primary); }
.nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.nav .btn { width: auto; }
.q-header { max-width: 760px; margin: 0 auto 18px; background: transparent; padding: 0 3px; }
.q-meta { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; margin-bottom: 12px; }
.q-cat { color: var(--ink); font-size: 12px; }
.q-count, .q-pct { color: var(--muted); font: 13px Georgia, serif; }
.q-pct { color: var(--primary); }
.progress-track { height: 3px; background: var(--line); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s ease; }
.q-body { max-width: 760px; margin: 0 auto 24px; padding: 32px 42px; }
.question-kicker { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: 2px; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.question-kicker span { letter-spacing: 1px; }
.eyebrow { color: var(--primary); font-size: 11px; margin-bottom: 14px; }
.q-text { font: 600 25px/1.8 var(--serif); margin: 0 0 26px; }
.q-nav { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 26px; }
.nav-btn { background: transparent; border: 1px solid var(--line); border-radius: 3px; min-height: 44px; padding: 10px 16px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.nav-btn:hover:not(:disabled) { background: var(--soft); }
.auto-hint { flex: 1; font-size: 11px; color: var(--muted); text-align: center; }
.auto-hint.active { color: var(--primary); }
.result { max-width: 860px; margin: auto; }
.top-card { position: relative; overflow: hidden; text-align: center; padding: 38px 42px 32px; margin-bottom: 24px; border-top: 4px solid var(--ink); }
.top-card::before { content: ""; position: absolute; inset: 12px; border: 1px solid #e7dfce; pointer-events: none; }
.top-sub { color: var(--muted); font-size: 11px; letter-spacing: 3px; padding-bottom: 22px; }
.result-stamp { position: absolute; right: 34px; top: 76px; border: 2px solid var(--primary); outline: 1px solid var(--primary); outline-offset: -5px; color: var(--primary); font: 18px/1.3 var(--serif); padding: 9px; transform: rotate(8deg); }
.match-label { font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.match-pct { color: var(--primary); font: 60px/1.2 Georgia, serif; margin: 4px 0; }
.result-name { font: 600 48px/1.6 var(--serif); letter-spacing: 5px; margin: 5px 0; }
.person-title { color: var(--muted); font-size: 13px; line-height: 1.8; margin-bottom: 20px; }
.tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.tag { padding: 4px 12px; font-size: 12px; border: 1px solid #c3cbbb; background: #edf0e6; color: #3c5847; border-radius: 2px; }
.dominant-chip { display: inline-block; font-size: 12px; color: var(--muted); margin: 15px 0 0; }
.match-reason { text-align: left; background: var(--soft); border-left: 2px solid #b1905b; padding: 20px 24px; margin-top: 28px; }
.reason-title { display: block; color: var(--primary); font-size: 11px; letter-spacing: 2px; margin-bottom: 8px; }
.quote { font: 19px/1.9 var(--serif); margin: 0; }
.report-section { padding: 28px 32px; margin-bottom: 18px; }
.section-title { font: 600 22px/1.6 var(--serif); padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.bio { font-size: 15px; line-height: 2; color: #51594b; }
.dimension-grid { display: grid; gap: 17px; }
.dim-row { display: grid; grid-template-columns: 56px 1fr 30px; align-items: center; gap: 16px; font-size: 13px; color: #52604e; }
.dim-row b { text-align: right; font: 16px Georgia, serif; }
.dim-bar { height: 5px; background: #e9e4d7; }
.dim-bar i { display: block; height: 100%; background: #506950; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.note { padding: 20px; border: 1px solid #e3dccb; background: #f8f5ec; font-size: 13px; color: #606453; line-height: 1.95; }
.note b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0 18px; }
.micro { text-align: center; font-size: 11px; color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; gap: 15px; padding: 25px 0 8px; margin-top: 20px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.site-footer > :first-child { font-family: var(--serif); }
.toast { position: fixed; z-index: 90; bottom: 24px; left: 50%; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; max-width: min(520px, calc(100% - 32px)); width: max-content; background: #263b34; color: #fffaf0; border-radius: 4px; padding: 14px 22px; font-size: 13px; line-height: 1.8; transition: opacity .2s, transform .2s; box-shadow: 0 8px 24px #263b3433; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.save-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 24px; background: #172c26b3; }
.save-panel { width: min(680px, 100%); margin: auto; padding: 22px; background: var(--paper); border: 1px solid #c6bea8; border-radius: 5px; }
.save-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.save-panel-head h2 { font: 600 22px var(--serif); margin: 0; }
.save-close { min-width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 3px; background: var(--soft); font-size: 25px; cursor: pointer; }
.save-tip { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 16px 0; }
.save-preview { display: block; width: 100%; height: auto; border: 1px solid var(--line); -webkit-touch-callout: default; user-select: auto; }
body.locked { overflow: hidden; }
.access-gate { position: fixed; inset: 0; overflow: auto; z-index: 20; background: radial-gradient(ellipse at top left, #e4e5d7, transparent 70%), var(--bg); padding: 48px 24px; display: flex; }
.access-layout { width: min(900px, 100%); margin: auto; display: grid; grid-template-columns: .95fr 1fr; border: 1px solid #d3cbb9; box-shadow: 0 24px 80px #38443514; }
.archive-cover { position: relative; min-height: 570px; background: #263b34; color: #eee7cf; padding: 38px; overflow: hidden; }
.archive-cover::before { content: ""; position: absolute; inset: 16px; border: 1px solid #dbcc9c44; pointer-events: none; }
.cover-edition { font: 12px var(--serif); letter-spacing: 2px; color: #c1c3ac; }
.cover-title { position: relative; font: 56px/1.65 var(--serif); letter-spacing: 10px; margin: 38px 0 16px 14px; }
.cover-seal { display: inline-block; vertical-align: top; margin: 18px 0 0 6px; font: 14px/1.4 var(--serif); letter-spacing: 2px; padding: 7px 5px; border: 1px solid #c17355; color: #da9473; transform: rotate(-7deg); }
.cover-quote { margin: 28px 0 0 16px; color: #c4c7b3; font: 15px/2 var(--serif); letter-spacing: 4px; position: relative; }
.cover-lines { position: absolute; width: 420px; height: 420px; border: 1px solid #b9c0a729; border-radius: 50%; bottom: -250px; right: -150px; box-shadow: 0 0 0 22px #263b34, 0 0 0 23px #b9c0a71a, 0 0 0 45px #263b34, 0 0 0 46px #b9c0a71a, 0 0 0 68px #263b34, 0 0 0 69px #b9c0a71a; }
.cover-index { position: absolute; bottom: 40px; left: 52px; color: #b3baa6; font-size: 10px; letter-spacing: 4px; }
.access-card { background: var(--paper); padding: 48px 44px 30px; }
.lock-mark { width: 36px; height: 40px; display: grid; place-items: center; font: 24px var(--serif); color: var(--primary); border: 1px solid var(--primary); margin-bottom: 24px; }
.access-card .hero-sub { font-size: 10px; letter-spacing: 2px; margin-bottom: 14px; }
.access-card h1 { font: 600 36px/1.5 var(--serif); letter-spacing: 3px; margin-bottom: 18px; }
.access-card p { font-size: 12px; color: var(--muted); line-height: 1.9; }
.access-label { display: flex; justify-content: space-between; font-size: 12px; margin-top: 26px; }
.access-label span { font-size: 10px; color: var(--muted); }
.access-input { display: block; width: 100%; margin: 10px 0 16px; padding: 11px 12px; min-height: 54px; background: #f6f2e7; border: 1px solid var(--line); border-radius: 3px; text-align: center; font: 26px/1.5 Georgia, serif; letter-spacing: 14px; text-indent: 14px; color: var(--ink); }
.access-input::placeholder { color: #b4ad9c; }
.access-input:focus { background: #fffdf8; border-color: var(--primary); }
.access-error { min-height: 22px; margin: 8px 0 0 !important; color: #a04432 !important; opacity: 0; }
.access-error.show { opacity: 1; }
.access-foot { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 20px; font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.access-foot span { padding: 0 8px; }
@media (max-width: 800px) {
  .intro-grid { gap: 24px; padding: 32px; grid-template-columns: 1.2fr .8fr; }
  .hero-title { font-size: 36px; }
  .folio-inner { height: 315px; }
  .folio-name { right: 24px; font-size: 32px; }
  .folio-side { left: 32px; }
  .folio-stamp { right: 95px; }
  .access-card { padding: 36px 28px 26px; }
  .archive-cover { padding: 32px 24px; }
  .cover-title { font-size: 47px; letter-spacing: 7px; margin-left: 6px; }
  .cover-seal { display: block; width: max-content; margin-left: 0; }
}
@media (max-width: 620px) {
  .shell { padding: 0 18px 20px; }
  .masthead { margin-bottom: 22px; padding: 20px 0; flex-wrap: wrap; gap: 8px 12px; }
  .brand { font-size: 19px; flex-shrink: 0; }
  .masthead-note { font-size: 10px; letter-spacing: 0; white-space: nowrap; margin-left: auto; text-align: right; }
  .intro-grid { grid-template-columns: 1fr; padding: 30px 24px 26px; gap: 30px; }
  .hero-title { font-size: 40px; }
  .lead { font-size: 13px; }
  .folio-art { max-width: 280px; width: 100%; justify-self: center; padding-bottom: 16px; }
  .folio-inner { height: 280px; }
  .folio-name { font-size: 29px; padding: 7px 4px; right: 32px; }
  .folio-side { font-size: 9px; }
  .folio-stamp { right: 115px; }
  .stats { margin: 0 24px; padding: 22px 0; }
  .stat { font-size: 10px; }
  .stat b { font-size: 26px; }
  .stat b span { margin-left: 3px; font-size: 10px; }
  .info-box { padding: 18px 24px; gap: 12px; font-size: 11px; }
  .preference, .q-body { padding: 26px 22px; }
  .preference h2 { font-size: 25px; }
  .q-text { font-size: 22px; }
  .choice { padding: 16px 14px; gap: 12px; }
  .choice strong { font-size: 14px; }
  .q-nav { gap: 8px; flex-wrap: wrap; }
  .auto-hint { order: 3; flex-basis: 100%; margin-top: 5px; }
  .q-nav > :last-child { margin-left: auto; }
  .top-card { padding: 30px 24px 28px; }
  .result-stamp { right: 23px; font-size: 13px; padding: 7px; }
  .result-name { font-size: 39px; }
  .match-pct { font-size: 50px; }
  .match-reason { padding: 18px; }
  .report-section { padding: 24px 20px; }
  .section-title { font-size: 20px; }
  .three { grid-template-columns: 1fr; }
  .note { padding: 18px; font-size: 14px; }
  .share-actions { grid-template-columns: 1fr; }
  .access-gate { padding: 24px 18px; }
  .access-layout { grid-template-columns: 1fr; max-width: 430px; }
  .archive-cover { min-height: auto; padding: 23px 28px; }
  .archive-cover::before { inset: 9px; }
  .cover-edition { font-size: 11px; }
  .cover-title { font-size: 30px; margin: 9px 0 0; letter-spacing: 4px; line-height: 1.6; }
  .cover-title > br { display: none; }
  .cover-seal { display: inline-block; margin: 0 0 0 12px; font-size: 10px; padding: 4px; vertical-align: middle; }
  .cover-quote, .cover-index, .cover-lines { display: none; }
  .access-card { padding: 28px 28px 24px; }
  .lock-mark { display: none; }
  .access-card h1 { font-size: 31px; }
  .access-card h1 br { display: none; }
  .access-card .hero-sub { font-size: 9px; }
  .access-label { margin-top: 20px; }
  .site-footer { font-size: 9px; letter-spacing: 0; }
  .save-modal { padding: 16px; }
  .save-panel { padding: 16px; }
  .save-panel-head h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
