:root {
  color-scheme: light;
  --psych-paper: #fffaf2;
  --psych-page: #f7f0e7;
  --psych-surface: #fffefa;
  --psych-ink: #302c31;
  --psych-muted: #776f73;
  --psych-line: #ded2c5;
  --psych-coral: #df585d;
  --psych-coral-dark: #c8444b;
  --psych-mint: #43977c;
  --psych-yellow: #dca932;
  --psych-blue: #568fb0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--psych-page);
  color: var(--psych-ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { letter-spacing: 0; }
.hidden { display: none !important; }

.psych-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 76px;
}

.psych-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 58px;
  align-items: center;
  min-height: calc(100svh - 60px);
}

.psych-kicker,
.report-number {
  margin: 0;
  color: var(--psych-coral-dark);
  font-size: 12px;
  font-weight: 750;
}

.psych-intro h1 {
  max-width: 620px;
  margin: 16px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 66px;
  font-weight: 800;
  line-height: 1.13;
}

.psych-lead {
  max-width: 570px;
  margin: 22px 0 0;
  color: var(--psych-muted);
  font-size: 17px;
  line-height: 1.8;
}

.age-form { width: min(430px, 100%); margin-top: 34px; }
.age-form > label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.age-input-row { position: relative; }
.age-input-row input {
  width: 100%;
  height: 62px;
  padding: 0 66px 0 18px;
  border: 1px solid #cfc1b3;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--psych-ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  font-weight: 700;
}
.age-input-row input:focus { border-color: var(--psych-coral); box-shadow: 0 0 0 3px rgba(223, 88, 93, .12); }
.age-input-row input[aria-invalid="true"] { border-color: #bd343a; }
.age-input-row span { position: absolute; right: 19px; top: 50%; color: var(--psych-muted); transform: translateY(-50%); }
.age-error { min-height: 21px; margin: 7px 0 0; color: #ae3037; font-size: 13px; }
.age-help { margin: 3px 0 0; color: #888084; font-size: 12px; line-height: 1.6; }

.psych-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.psych-button:disabled { cursor: wait; opacity: .58; }
.psych-button.primary { color: #fff; background: var(--psych-coral); }
.psych-button.primary:hover { background: var(--psych-coral-dark); transform: translateY(-1px); }
.psych-button.secondary { border-color: #cfc1b3; color: var(--psych-ink); background: #fff; }
.psych-button.secondary:hover { border-color: #a9998a; background: #fffdf9; }
.age-form .psych-button { width: 100%; margin-top: 19px; }
.psych-intro-note { max-width: 470px; margin: 18px 0 0; color: #8a8286; font-size: 12px; line-height: 1.7; }

.psych-cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid #d8c8b8;
  border-radius: 6px;
  background: #fff7ea;
}
.psych-cover::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.82); pointer-events: none; }
.psych-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.psych-question {
  width: min(760px, 100%);
  min-height: calc(100svh - 60px);
  margin: 0 auto;
  padding-top: 8px;
}
.psych-progress-head { display: flex; justify-content: space-between; gap: 20px; color: var(--psych-muted); font-size: 12px; font-weight: 700; }
.psych-progress-track { height: 5px; margin-top: 12px; overflow: hidden; background: #e4d8cb; }
.psych-progress-track i { display: block; width: 4.16%; height: 100%; background: var(--psych-coral); transition: width .22s ease; }
.psych-question-card { margin-top: 40px; }
.psych-question-card > p { margin: 0; color: var(--psych-coral-dark); font-size: 12px; font-weight: 750; }
.psych-question-card h2 { min-height: 104px; margin: 14px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 30px; line-height: 1.55; }
.psych-options { display: grid; gap: 11px; margin-top: 27px; }
.psych-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 11px 16px;
  border: 1px solid #d8ccbf;
  border-radius: 6px;
  background: var(--psych-surface);
  color: var(--psych-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.psych-option:hover { border-color: #bfae9d; transform: translateY(-1px); }
.psych-option span { display: grid; width: 34px; height: 34px; place-content: center; border: 1px solid #d2c4b6; border-radius: 50%; color: #766d71; font-family: Georgia, serif; font-size: 15px; }
.psych-option strong { font-size: 15px; font-weight: 560; line-height: 1.6; }
.psych-option.is-selected { border-color: var(--psych-coral); background: #fff3f0; }
.psych-option.is-selected span { border-color: var(--psych-coral); color: #fff; background: var(--psych-coral); }
.psych-question-nav { display: flex; justify-content: center; gap: 16px; min-height: 42px; margin-top: 24px; }
.psych-nav-button { min-width: 74px; height: 40px; border: 0; color: #71686d; background: transparent; cursor: pointer; font-size: 13px; font-weight: 650; }
.psych-nav-button:hover { color: var(--psych-coral-dark); }

.psych-result { width: 100%; }
.psych-download-card { position: fixed; left: -2000px; top: 0; width: 1080px; height: 1440px; pointer-events: none; opacity: 0; }
.psych-result-page { width: min(780px, 100%); margin: 0 auto; overflow: hidden; border: 1px solid #dce4e9; background: #fff; }
.psych-result-section { padding: 52px 54px 58px; border-bottom: 14px solid #f0f4f6; background: #fff; }
.psych-portrait-section { background: #f4f8fb; }
.psych-portrait-title { margin: 0 0 42px; color: #202b3b; font-family: "Songti SC", "STSong", serif; font-size: 46px; font-weight: 700; line-height: 1.2; text-align: center; }
.psych-age-stack { width: min(610px, 100%); margin: 0 auto; }
.psych-age-panel { display: grid; min-height: 230px; place-content: center; border: 1px solid #dce4ea; border-top: 7px solid #5c56e4; border-radius: 8px; background: #fff; text-align: center; box-shadow: 0 8px 18px rgba(31,49,67,.08); }
.psych-age-panel p { margin: 0 0 14px; color: #93a3b5; font-size: 18px; font-weight: 700; }
.psych-age-panel strong { display: flex; align-items: baseline; justify-content: center; color: #5751e0; font-size: 112px; line-height: .95; }
.psych-age-panel strong > span { font-family: "Times New Roman", "Songti SC", serif; font-variant-numeric: lining-nums tabular-nums; }
.psych-age-panel strong small { margin-left: 7px; font-family: "PingFang SC", sans-serif; font-size: 24px; }
.actual-panel { border-top-color: #92a2b4; }
.actual-panel strong { color: #26364a; }
.psych-age-direction { display: grid; min-height: 132px; place-content: center; justify-items: center; color: #e83d94; text-align: center; }
.psych-direction-icon { display: grid; width: 68px; height: 46px; place-items: center; }
.psych-trend-icon { display: none; width: 68px; height: 46px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.trend-close { display: none; font-family: Georgia, serif; font-size: 55px; font-weight: 400; line-height: .8; }
.psych-age-direction strong { margin-top: 10px; font-size: 20px; }
.psych-age-direction small { margin-top: 7px; color: #8794a2; font-size: 13px; }
.psych-age-direction[data-direction="older"] { color: #419879; }
.psych-age-direction[data-direction="older"] .trend-up { display: block; }
.psych-age-direction[data-direction="younger"] { color: #d94e91; }
.psych-age-direction[data-direction="younger"] .trend-down { display: block; }
.psych-age-direction[data-direction="close"] { color: #4d9d80; }
.psych-age-direction[data-direction="close"] .trend-close { display: block; }
.psych-verdict-panel { width: min(610px, 100%); margin: 34px auto 0; padding: 24px 26px; border-left: 5px solid #ed6269; background: #fff; }
.psych-verdict-panel p { margin: 0; color: #273345; font-family: "Songti SC", "STSong", serif; font-size: 25px; font-weight: 700; line-height: 1.65; }
.psych-verdict-panel small { display: block; margin-top: 10px; color: #788594; font-size: 13px; line-height: 1.75; }
.psych-keyword-section h2 { margin: 0; color: #172439; font-size: 28px; }
.psych-keywords { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.psych-keywords span { padding: 10px 15px; border-radius: 6px; background: #f0f4f7; color: #5f6d7c; font-size: 14px; font-weight: 650; }
.psych-section-title { display: flex; align-items: center; gap: 14px; margin: 0 0 34px; color: #18263b; font-size: 31px; line-height: 1.3; }
.psych-section-title > span { color: #5c56e4; font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.psych-radar-section { background: #f8fbfd; }
.psych-radar-panel { width: min(660px, 100%); margin: 0 auto; overflow: hidden; border: 1px solid #e1e8ed; border-radius: 8px; background: #f8fbfd; }
#psychological-age-radar { display: block; width: 100%; height: auto; aspect-ratio: 36 / 31; }
.psych-radar-note { width: min(660px, 100%); margin: 19px auto 0; color: #7d8997; font-size: 13px; line-height: 1.75; }
.psych-match-grid { display: grid; gap: 24px; width: min(650px, 100%); margin: 0 auto; }
.psych-match-card { display: grid; min-height: 250px; place-content: center; justify-items: center; padding: 32px; border-radius: 8px; text-align: center; }
.archetype-card { background: #f3efff; color: #5c2bb3; }
.companion-card { background: #fff0f2; color: #b6254a; }
.psych-match-icon { display: grid; width: 70px; height: 70px; place-content: center; border-radius: 50%; background: rgba(255,255,255,.55); font-family: Georgia, serif; font-size: 36px; }
.psych-match-card p { margin: 17px 0 0; color: #718092; font-size: 15px; font-weight: 650; }
.psych-match-card h3 { margin: 9px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 31px; line-height: 1.35; }
.psych-match-card small { max-width: 480px; margin-top: 13px; color: currentColor; font-size: 14px; line-height: 1.75; opacity: .75; }
.psych-report { background: #f7fafc; }
.psych-analysis-stack { display: grid; gap: 26px; }
.psych-analysis-card { padding: 32px 34px; border: 1px solid #e1e8ed; border-radius: 8px; background: #fff; }
.psych-analysis-card h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 24px; }
.psych-analysis-card h3 span { display: grid; width: 31px; height: 31px; place-content: center; border: 2px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 18px; }
.psych-analysis-card ul { display: grid; gap: 15px; margin: 22px 0 0; padding: 0; list-style: none; }
.psych-analysis-card li { position: relative; padding-left: 25px; color: #596879; font-size: 15px; line-height: 1.75; }
.psych-analysis-card li::before { content: "•"; position: absolute; left: 2px; top: 0; color: currentColor; font-size: 22px; }
.strength-card { border-color: #d7ede2; }
.strength-card h3, .strength-card li::before { color: #19975d; }
.blind-card { border-color: #f0e3bd; }
.blind-card h3, .blind-card li::before { color: #bc710f; }
.interpretation-card h3 { color: #554fcf; }
.interpretation-card p { margin: 18px 0 0; color: #5d6b7b; font-size: 15px; line-height: 1.9; }
.psych-life-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 28px; border-top: 1px solid #dce5eb; border-left: 1px solid #dce5eb; }
.psych-life-grid article { min-width: 0; padding: 28px; border-right: 1px solid #dce5eb; border-bottom: 1px solid #dce5eb; background: #fff; }
.psych-life-grid article > p:first-child { margin: 0; color: #ed6269; font-size: 12px; font-weight: 750; }
.psych-life-grid h3 { margin: 9px 0 10px; font-family: "Songti SC", "STSong", serif; font-size: 21px; line-height: 1.5; }
.psych-life-grid article > p:last-child { margin: 0; color: #667382; font-size: 13px; line-height: 1.85; }
.psych-advice-section { margin-top: 28px; padding: 32px 34px; border: 1px solid #dce5eb; background: #fff; }
.psych-advice-section h3 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 24px; }
.psych-advice-section ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 23px 0 0; padding: 0; counter-reset: advice; list-style: none; }
.psych-advice-section li { min-width: 0; padding: 18px; border: 1px solid #e1e8ed; color: #5d6b7b; font-size: 13px; line-height: 1.75; }
.psych-advice-section li::before { counter-increment: advice; content: "0" counter(advice); display: block; margin-bottom: 12px; color: #ed6269; font-family: Georgia, serif; font-size: 20px; font-weight: 700; }
.psych-result-disclaimer { width: min(680px, calc(100% - 48px)); margin: 26px auto 0; color: #8b929a; font-size: 11px; line-height: 1.7; text-align: center; }
.psych-result-actions {
  display: grid;
  grid-template-columns: 150px minmax(260px, 1fr);
  gap: 12px;
  width: min(660px, calc(100% - 32px));
  margin: 28px auto 0;
}
.psych-result-actions .psych-button { width: 100%; }
.psych-button.text { color: var(--psych-muted); background: transparent; }
.psych-button.text:hover { color: var(--psych-coral-dark); }

html.psych-preview-requested .psych-shell { visibility: hidden; }
html.psych-preview-requested.psych-preview-authorized .psych-shell { visibility: visible; }
#psych-preview-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--psych-paper); color: var(--psych-muted); }
#psych-preview-gate span { width: 28px; height: 28px; border: 2px solid #d9cec2; border-top-color: var(--psych-coral); border-radius: 50%; animation: psych-spin .8s linear infinite; }
#psych-preview-gate p { margin: 0; font-size: 14px; }
#psych-preview-gate.is-failed span { display: none; }
@keyframes psych-spin { to { transform: rotate(360deg); } }
.psych-preview-active .psych-shell { padding-top: 10px; }
.psych-preview-active .psych-result-actions { display: none; }
.psych-preview-active .psych-report { margin-bottom: 40px; }
.psych-preview-controls { position: fixed; right: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 60; display: grid; grid-template-columns: 44px minmax(132px, auto) 44px; align-items: center; min-height: 50px; overflow: hidden; border: 1px solid rgba(73,58,48,.16); border-radius: 999px; background: rgba(255,253,248,.95); box-shadow: 0 10px 28px rgba(58,42,32,.16); backdrop-filter: blur(14px); transform: translateX(50%); transition: opacity .2s ease, transform .2s ease; }
.psych-preview-controls.is-hidden { pointer-events: none; opacity: 0; transform: translate(50%, 8px); }
.psych-preview-controls button { width: 44px; height: 50px; padding: 0; border: 0; color: var(--psych-coral-dark); background: transparent; cursor: pointer; font-family: Georgia, serif; font-size: 34px; }
.psych-preview-controls .psych-preview-summary { display: grid; width: auto; min-width: 152px; padding: 5px 10px; color: var(--psych-ink); font-family: inherit; font-size: inherit; text-align: center; }
.psych-preview-controls strong { font-family: "Songti SC", "STSong", serif; font-size: 14px; line-height: 1.25; }
.psych-preview-controls span { color: var(--psych-muted); font-size: 10px; line-height: 1.3; }
.psych-preview-editor { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; padding: 16px; background: rgba(35,31,32,.3); }
.psych-preview-editor.is-hidden { display: none; }
.psych-preview-editor form { width: min(440px, 100%); margin: 0 auto; padding: 22px; border: 1px solid #ddd3c8; border-radius: 8px; background: #fffdf9; box-shadow: 0 18px 48px rgba(48,36,31,.2); }
.psych-preview-editor header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.psych-preview-editor h2 { margin: 0; color: var(--psych-ink); font-family: "Songti SC", "STSong", serif; font-size: 23px; }
.psych-preview-editor header button { width: 36px; height: 36px; padding: 0; border: 0; color: #776f73; background: transparent; cursor: pointer; font-size: 27px; line-height: 1; }
.psych-preview-editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.psych-preview-editor label { color: #6f686c; font-size: 12px; font-weight: 700; }
.psych-preview-editor input { width: 100%; height: 50px; margin-top: 7px; padding: 0 12px; border: 1px solid #d5c9bd; border-radius: 5px; outline: 0; background: #fff; color: var(--psych-ink); font-family: Georgia, serif; font-size: 24px; }
.psych-preview-editor input:focus { border-color: var(--psych-coral); box-shadow: 0 0 0 3px rgba(223,88,93,.12); }
.psych-preview-editor-hint { margin: 14px 0 0; color: #8a8286; font-size: 11px; line-height: 1.6; }
.psych-preview-editor-error { min-height: 19px; margin: 5px 0 0; color: #ae3037; font-size: 11px; }
.psych-preview-apply { width: 100%; min-height: 48px; border: 0; border-radius: 5px; color: #fff; background: var(--psych-coral); cursor: pointer; font-size: 14px; font-weight: 750; }

@media (max-width: 760px) {
  .psych-shell { width: min(100% - 24px, 620px); padding: 16px 0 48px; }
  .psych-intro { grid-template-columns: 1fr; gap: 22px; min-height: 0; }
  .psych-intro-copy { display: contents; }
  .psych-kicker { order: 1; margin-top: 4px; }
  .psych-intro h1 { order: 2; margin-top: -3px; font-size: 43px; line-height: 1.13; }
  .psych-lead { order: 3; margin-top: -8px; font-size: 14px; line-height: 1.75; }
  .psych-cover { order: 4; width: 100%; max-height: 310px; aspect-ratio: 16 / 10; }
  .psych-cover img { object-position: center 37%; }
  .age-form { order: 5; margin-top: 0; }
  .psych-intro-note { order: 6; margin-top: -6px; }
  .age-input-row input { height: 56px; font-size: 25px; }
  .age-form .psych-button { min-height: 50px; margin-top: 13px; }

  .psych-question { min-height: calc(100svh - 32px); padding: 1px 2px 18px; }
  .psych-question-card { margin-top: 25px; }
  .psych-question-card h2 { min-height: 82px; margin-top: 9px; font-size: 21px; line-height: 1.5; }
  .psych-options { gap: 8px; margin-top: 17px; }
  .psych-option { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; min-height: 58px; padding: 8px 11px; }
  .psych-option span { width: 30px; height: 30px; font-size: 13px; }
  .psych-option strong { font-size: 13px; line-height: 1.5; }
  .psych-question-nav { margin-top: 10px; }

  .psych-result-section { padding: 32px 20px 37px; border-bottom-width: 10px; }
  .psych-portrait-title { margin-bottom: 30px; font-size: 34px; }
  .psych-age-panel { min-height: 190px; border-top-width: 6px; }
  .psych-age-panel p { margin-bottom: 12px; font-size: 15px; }
  .psych-age-panel strong { font-size: 88px; }
  .psych-age-panel strong small { font-size: 19px; }
  .psych-age-direction { min-height: 108px; }
  .psych-direction-icon { width: 58px; height: 40px; }
  .psych-trend-icon { width: 58px; height: 40px; }
  .trend-close { font-size: 44px; }
  .psych-age-direction strong { margin-top: 7px; font-size: 17px; }
  .psych-age-direction small { margin-top: 5px; font-size: 11px; }
  .psych-verdict-panel { margin-top: 25px; padding: 20px 18px; }
  .psych-verdict-panel p { font-size: 20px; line-height: 1.65; }
  .psych-verdict-panel small { font-size: 12px; }
  .psych-keyword-section h2 { font-size: 24px; }
  .psych-keywords { gap: 9px; margin-top: 19px; }
  .psych-keywords span { padding: 8px 11px; font-size: 12px; }
  .psych-section-title { gap: 10px; margin-bottom: 26px; font-size: 25px; }
  .psych-section-title > span { font-size: 28px; }
  .psych-radar-note { margin-top: 14px; font-size: 11px; }
  .psych-match-grid { gap: 18px; }
  .psych-match-card { min-height: 215px; padding: 25px 20px; }
  .psych-match-icon { width: 58px; height: 58px; font-size: 29px; }
  .psych-match-card p { margin-top: 13px; font-size: 13px; }
  .psych-match-card h3 { font-size: 27px; }
  .psych-match-card small { margin-top: 10px; font-size: 12px; }
  .psych-analysis-stack { gap: 18px; }
  .psych-analysis-card { padding: 25px 20px; }
  .psych-analysis-card h3 { font-size: 20px; }
  .psych-analysis-card h3 span { width: 27px; height: 27px; font-size: 15px; }
  .psych-analysis-card ul { gap: 12px; margin-top: 18px; }
  .psych-analysis-card li,
  .interpretation-card p { font-size: 13px; }
  .psych-life-grid { grid-template-columns: 1fr; margin-top: 20px; }
  .psych-life-grid article { padding: 24px 20px; }
  .psych-life-grid h3 { font-size: 19px; }
  .psych-advice-section { margin-top: 20px; padding: 25px 20px; }
  .psych-advice-section h3 { font-size: 21px; }
  .psych-advice-section ol { grid-template-columns: 1fr; gap: 9px; margin-top: 18px; }
  .psych-advice-section li { padding: 16px; }
  .psych-result-disclaimer { width: calc(100% - 36px); }
  .psych-result-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    width: calc(100% - 32px);
  }
  .psych-result-actions .psych-button { min-height: 48px; }
}

@media (max-width: 380px) {
  .psych-shell { width: calc(100% - 20px); }
  .psych-intro h1 { font-size: 38px; }
  .psych-cover { max-height: 245px; }
  .psych-question-card h2 { min-height: 74px; font-size: 19px; }
  .psych-option { min-height: 54px; }
  .psych-option strong { font-size: 12px; }
  .psych-result-section { padding-right: 16px; padding-left: 16px; }
  .psych-portrait-title { font-size: 31px; }
  .psych-age-panel strong { font-size: 82px; }
}

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

.regulatory-footer {
  padding: 18px 20px 28px;
  color: #958b86;
  text-align: center;
  font-size: 12px;
}

.regulatory-footer a {
  color: inherit;
  text-decoration: none;
}

.regulatory-footer a:hover {
  color: var(--psych-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

html.psych-preview-requested .regulatory-footer {
  display: none;
}
