/* ------------------------------------------------------------------
   你的这一面 · 交付页样式
   Mobile first. Every screen has one job and one obvious next tap.
   ------------------------------------------------------------------ */
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  --display-font: var(--font);
  --canvas: #f4ecee; --paper: #fffafb; --surface: #ffffff; --ink: #32222a; --ink-rgb: 50, 34, 42;
  --muted: #725e67; --accent: #ab254c; --accent-soft: #f8e6eb; --accent-soft-2: #f2d7df; --on-accent: #fff;
  --support: #e7b559; --line: #e4d6db;
  --radius-xl: 28px; --radius-lg: 22px; --radius: 16px; --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(var(--ink-rgb), .05), 0 18px 40px -18px rgba(var(--ink-rgb), .28);
  --shadow-soft: 0 1px 2px rgba(var(--ink-rgb), .04), 0 8px 20px -12px rgba(var(--ink-rgb), .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 20px;
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.theme-fox-theatre { --canvas: #f5e9ed; --paper: #fff9fa; --ink: #3a1c2b; --ink-rgb: 58, 28, 43; --muted: #795562; --accent: #ae2752; --accent-soft: #f8e6eb; --accent-soft-2: #f2d7df; --support: #d6ab63; --line: #ead9df; }
.theme-love-inside { --canvas: #f0e7ed; --paper: #fffafc; --ink: #3d2a3a; --ink-rgb: 61, 42, 58; --muted: #786071; --accent: #ad3e65; --accent-soft: #f8e9ee; --accent-soft-2: #f2dce4; --support: #99b5b5; --line: #eadbe2; --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", var(--font); }
.theme-relationship-lab { --canvas: #e8eff6; --paper: #fbfdff; --ink: #233e57; --ink-rgb: 35, 62, 87; --muted: #526b80; --accent: #245c8c; --accent-soft: #e8eff5; --accent-soft-2: #d9e3ed; --support: #ec9a78; --line: #d8e3ec; }
.theme-social-stage { --canvas: #f4d743; --paper: #fffdf4; --ink: #24231d; --ink-rgb: 36, 35, 29; --muted: #66604b; --accent: #2452ae; --accent-soft: #edf0f5; --accent-soft-2: #dce2e9; --support: #ea6248; --line: #e6e0cb; }
.theme-inner-power { --canvas: #e7ece6; --paper: #fafdf9; --ink: #253a31; --ink-rgb: 37, 58, 49; --muted: #5c6d63; --accent: #346c56; --accent-soft: #e8f0ea; --accent-soft-2: #dae6df; --support: #d7b49d; --line: #d7e2d8; }
.theme-career-money { --canvas: #e2e9df; --paper: #f8fcf5; --ink: #263b30; --ink-rgb: 38, 59, 48; --muted: #566e60; --accent: #276d4e; --accent-soft: #e5efe6; --accent-soft-2: #d7e5da; --support: #c5d575; --line: #d3e0d3; }
.theme-destiny-story { --canvas: #eee8f2; --paper: #fdfaff; --ink: #43394f; --ink-rgb: 67, 57, 79; --muted: #75667f; --accent: #855064; --accent-soft: #f2ebf1; --accent-soft-2: #eadfe6; --support: #92adbb; --line: #e4dae8; --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", var(--font); }
.theme-mind-atlas { --canvas: #e6e9f2; --paper: #fafbff; --ink: #262c45; --ink-rgb: 38, 44, 69; --muted: #5b627d; --accent: #4651a8; --accent-soft: #eceefa; --accent-soft-2: #dde0f3; --support: #e0a96d; --line: #dcdfee; }
.theme-bazi { --canvas: #e2eae6; --paper: #f9fbf6; --ink: #2c4439; --ink-rgb: 44, 68, 57; --muted: #5d7167; --accent: #a24d3e; --accent-soft: #f1ebe5; --accent-soft-2: #ebdfd9; --support: #bca66b; --line: #d6e0d9; --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", var(--font); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-family: var(--display-font); font-weight: 800; letter-spacing: -.01em; }
button, input, select { font: inherit; color: inherit; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.page-shell { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 0 calc(40px + env(safe-area-inset-bottom)); }

.kicker { color: var(--accent); font-size: .8125rem; font-weight: 700; letter-spacing: .02em; }
.subtitle { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.fineprint { color: var(--muted); font-size: .8125rem; line-height: 1.7; }

/* ---------- buttons ---------- */
.primary-button, .secondary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 22px; border-radius: var(--radius); border: 0;
  font-size: 1.0625rem; font-weight: 700; line-height: 1.3; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.primary-button { width: 100%; background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -12px var(--accent); }
.primary-button .button-arrow { transition: transform 200ms var(--ease); }
.primary-button:hover .button-arrow { transform: translateX(3px); }
.secondary-button { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 650; }
.primary-button:active, .secondary-button:active { transform: scale(.98); }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary-button[aria-busy="true"] { opacity: .8; }

/* ---------- inputs ---------- */
input, select {
  width: 100%; min-width: 0; min-height: 56px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  font-size: 1.0625rem; color: var(--ink); -webkit-appearance: none; appearance: none;
  transition: border-color 160ms, box-shadow 160ms;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft-2); }
input::placeholder { color: rgba(var(--ink-rgb), .38); }
.field-hint { margin-top: 8px; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.inline-error { padding: 12px 14px; border-radius: var(--radius-sm); background: #fff0f0; color: #8a1f2b; font-size: .875rem; line-height: 1.6; }
.inline-error::before { content: "! "; font-weight: 800; }
input[aria-invalid="true"] { border-color: #c2414f; }

/* ==================================================================
   1. Landing / unlock
   ================================================================== */
.product-body { background: var(--paper); }
.cover { position: relative; background: var(--paper); }
.cover-art { position: relative; margin: 0; height: 46vh; height: 46svh; min-height: 260px; max-height: 420px; overflow: hidden; background: var(--canvas); }
.cover-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 38%, var(--paper) 86%); }
.world-art { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; animation: settle 1.2s var(--ease) both; }
.cover-sigil { position: absolute; z-index: 1; top: calc(16px + env(safe-area-inset-top)); right: 16px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.88); color: var(--accent); font-family: var(--display-font); font-size: 1.25rem; font-weight: 700; box-shadow: var(--shadow-soft); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cover-body { position: relative; z-index: 1; margin-top: -44px; padding: 0 var(--gutter); }
.cover-body .kicker { margin-bottom: 10px; }
.cover-body h1 { font-size: 2.25rem; line-height: 1.22; }
.cover-body .subtitle { margin-top: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.facts li { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 600; }

.unlock { display: grid; gap: 10px; margin-top: 28px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.unlock-label { font-size: .9375rem; font-weight: 700; }
.code-field { position: relative; }
.code-field input { padding-right: 76px; font-size: 1.125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.code-field input::placeholder { font-size: .9375rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.paste-button { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: .875rem; font-weight: 700; cursor: pointer; }
.unlock .field-hint { margin: 0 0 6px; }
.reassure { color: var(--muted); font-size: .8125rem; line-height: 1.6; text-align: center; }

.promise { margin: 32px 0 8px; }
.promise h2 { font-size: .9375rem; font-weight: 700; }
.promise-list { display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; counter-reset: promise; }
.promise-list li { position: relative; display: grid; gap: 2px; padding: 14px 0 14px 40px; border-bottom: 1px solid var(--line); counter-increment: promise; }
.promise-list li::before { content: counter(promise); position: absolute; left: 0; top: 15px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 800; }
.promise-list b { font-size: .9375rem; }
.promise-list span { color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.teaser { margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); font-family: var(--display-font); font-size: .9375rem; line-height: 1.8; }

/* ==================================================================
   2. Quiz
   ================================================================== */
.quiz-body { background: var(--paper); }
.quiz-experience { position: relative; min-height: 100vh; min-height: 100svh; background: var(--paper); }
.form-level-error { margin: 12px var(--gutter) 0; }
.screen { animation: screen-in 380ms var(--ease) both; }

/* intro */
.intro-art { height: 30vh; height: 30svh; min-height: 180px; max-height: 280px; overflow: hidden; position: relative; }
.intro-art.short { height: 20vh; height: 20svh; min-height: 140px; max-height: 200px; }
.intro-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, var(--paper)); }
.intro-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.intro-body { position: relative; padding: 0 var(--gutter) 32px; margin-top: -28px; }
.unlocked-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-soft); color: var(--ink); font-size: .8125rem; font-weight: 650; }
.unlocked-badge span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .75rem; }
.quiz-intro .kicker { margin-bottom: 8px; }
.quiz-intro h1, .form-fields h1 { font-size: 2rem; line-height: 1.28; }
.quiz-intro .subtitle, .form-fields .subtitle { margin-top: 12px; }
.intro-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.intro-tips li { display: grid; gap: 2px; padding: 12px 8px; border-radius: var(--radius-sm); background: var(--accent-soft); text-align: center; }
.intro-tips b { color: var(--accent); font-size: 1.375rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.intro-tips span { color: var(--muted); font-size: .75rem; }
.intro-hint { margin: 16px 0 22px; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.draft-note { margin: -8px 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-size: .875rem; font-weight: 600; }

/* runner */
.quiz-runner { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.quiz-head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 12px; background: var(--paper); }
.back-button { min-height: 40px; margin-left: -10px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-size: .9375rem; font-weight: 600; cursor: pointer; }
.back-button span { font-size: 1.25rem; line-height: 1; }
.back-button:disabled { opacity: .3; }
.quiz-title { overflow: hidden; color: var(--muted); font-size: .8125rem; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.progress-count { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.progress-track { grid-column: 1 / -1; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--accent-soft-2); overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 420ms var(--ease); }
.question { padding: 20px var(--gutter) 8px; }
.question.is-entering { animation: question-in 320ms var(--ease) both; }
.question.is-entering-back { animation: question-in-back 320ms var(--ease) both; }
.question-number { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.question h2 { margin: 14px 0 22px; font-family: var(--display-font); font-size: 1.375rem; font-weight: 700; line-height: 1.55; outline: none; }
.choices { display: grid; gap: 12px; }
.choice {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 12px; align-items: center;
  min-height: 64px; padding: 16px 16px 16px 18px; border-radius: var(--radius); background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 1px 2px rgba(var(--ink-rgb), .04);
  font-size: 1rem; line-height: 1.55; cursor: pointer;
  transition: box-shadow 160ms, background-color 160ms, transform 160ms var(--ease);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.choice:active { transform: scale(.985); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; pointer-events: none; }
.choice.has-focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice-tick { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); transition: all 180ms var(--ease); }
.choice.is-selected { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.choice.is-selected .choice-tick { background: var(--accent); box-shadow: none; }
.choice.is-selected .choice-tick::after { content: ""; display: block; width: 7px; height: 12px; margin: 4px 0 0 8px; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.choice.just-picked { animation: picked 380ms var(--ease); }
@media (hover: hover) { .choice:hover { box-shadow: inset 0 0 0 1.5px var(--accent); } }
.quiz-controls { display: flex; justify-content: flex-end; gap: 12px; padding: 12px var(--gutter) 24px; }
.quiz-controls .secondary-button { min-height: 48px; font-size: .9375rem; }

/* finish / review */
.quiz-review { display: flex; flex-direction: column; align-items: center; padding: calc(56px + env(safe-area-inset-top)) var(--gutter) 32px; text-align: center; }
.done-mark { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--display-font); font-size: 2.125rem; font-weight: 700; box-shadow: 0 0 0 10px var(--accent-soft), 0 0 0 20px rgba(255,255,255,0); animation: halo 2.4s ease-in-out infinite; }
.quiz-review .kicker { margin-bottom: 10px; }
.quiz-review h1 { font-size: 1.875rem; line-height: 1.35; }
.quiz-review .subtitle { max-width: 360px; margin: 14px auto 28px; font-size: .9375rem; }
.reveal-button { max-width: 420px; }
.review-drawer { width: 100%; margin-top: 22px; text-align: left; }
.review-drawer summary { display: block; padding: 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: .9375rem; text-align: center; cursor: pointer; list-style: none; }
.review-drawer summary::-webkit-details-marker { display: none; }
.review-drawer summary::after { content: " ↓"; }
.review-drawer[open] summary::after { content: " ↑"; }
.answer-review { margin: 8px 0 0; padding: 0; list-style: none; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden; }
.answer-review li + li { border-top: 1px solid var(--line); }
.review-answer { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; width: 100%; padding: 14px 16px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.review-index { color: var(--accent); font-size: .8125rem; font-weight: 800; line-height: 1.7; }
.review-copy strong { display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; line-height: 1.6; }
.review-copy em { display: block; margin-top: 4px; font-size: .9375rem; font-style: normal; font-weight: 650; line-height: 1.5; }
.review-edit { color: var(--accent); font-size: .8125rem; font-weight: 650; line-height: 1.7; }

/* generating */
.generating-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; min-height: 100svh; padding: 32px var(--gutter); text-align: center; }
.generating-mark { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: 32px; }
.generating-mark::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent) 0 25%, var(--accent-soft-2) 25% 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: spin 1.1s linear infinite; }
.generating-mark span { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--display-font); font-size: 2rem; font-weight: 700; animation: develop 2.2s ease-in-out infinite; }
.generating-state h2 { font-family: var(--display-font); font-size: 1.5rem; font-weight: 750; }
.generating-steps { display: grid; gap: 12px; margin: 24px 0 20px; padding: 0; list-style: none; text-align: left; }
.generating-steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9375rem; transition: color 240ms; }
.generating-steps li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.generating-steps li.is-active { color: var(--ink); font-weight: 650; }
.generating-steps li.is-active::before { box-shadow: inset 0 0 0 2px var(--accent); animation: pulse 1s ease-in-out infinite; }
.generating-steps li.is-done { color: var(--ink); }
.generating-steps li.is-done::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; box-shadow: none; }
.generating-note { max-width: 300px; color: var(--muted); font-size: .8125rem; line-height: 1.7; }

/* birth form */
.form-fields .intro-body { display: grid; gap: 0; }
.form-fields .inline-error { margin-top: 16px; }
.field { margin-top: 20px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 8px; padding: 0; font-size: .9375rem; font-weight: 700; }
.field small { margin-left: 6px; color: var(--muted); font-size: .75rem; font-weight: 400; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented legend { grid-column: 1 / -1; }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; min-height: 0; width: 1px; height: 1px; padding: 0; }
.segmented span { display: grid; place-items: center; min-height: 52px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; cursor: pointer; transition: all 160ms; }
.segmented input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-fields .fineprint { margin: 22px 0 18px; }

/* ==================================================================
   3. Result
   ================================================================== */
.result-body .page-shell { padding: calc(16px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom)); }
.result-wrap { max-width: 480px; margin: 0 auto; }
.result-eyebrow { margin: 4px 4px 12px; color: var(--ink); opacity: .7; font-size: .8125rem; font-weight: 600; text-align: center; }
.identity-card { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow-card); }
.card-art { position: relative; height: 172px; overflow: hidden; }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, var(--paper) 90%); }
.identity-art { width: 100%; height: 100%; object-fit: cover; object-position: 70% 45%; }
.card-sigil { position: absolute; z-index: 1; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--display-font); font-size: 1.25rem; font-weight: 700; box-shadow: 0 6px 16px -6px rgba(0,0,0,.45); }
.card-body { position: relative; padding: 0 24px 22px; margin-top: -18px; }
.identity-overline { color: var(--muted); font-size: .875rem; font-weight: 600; }
.identity-title { margin-top: 2px; font-size: 2.375rem; line-height: 1.2; }
.identity-meter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 16px 0 14px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.identity-meter strong { color: var(--accent); font-size: 2.25rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.identity-meter span { color: var(--muted); font-size: .875rem; }
.rarity-badge { margin-left: auto; white-space: nowrap; align-self: center; padding: 4px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .8125rem; font-style: normal; font-weight: 800; letter-spacing: .04em; }
.card-roast { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ink); color: var(--paper); font-family: var(--display-font); font-size: 1.0625rem; font-weight: 800; line-height: 1.5; }
.card-roast::before { content: "主笔毒评 · "; opacity: .7; font-size: .8125rem; font-weight: 600; }
.result-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.result-tags li { padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 650; }
.result-summary { margin: 16px 0 14px; font-size: 1rem; line-height: 1.85; }
.contrast-line { position: relative; padding: 14px 16px; border-radius: var(--radius); background: var(--accent-soft); font-size: .9375rem; font-weight: 650; line-height: 1.7; }
.contrast-label { display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; line-height: 1.6; vertical-align: 1px; }
.dimension-bars { display: grid; gap: 10px; margin-top: 18px; }
.dimension { display: grid; grid-template-columns: var(--label-w, 3.2em) minmax(0, 1fr) 2.2em; gap: 10px; align-items: center; font-size: .875rem; }
.dimension-name { color: var(--muted); font-weight: 600; }
.dimension-track { height: 8px; border-radius: 999px; background: var(--accent-soft-2); overflow: hidden; }
.dimension-track i { display: block; width: var(--value); height: 100%; border-radius: inherit; background: rgba(var(--ink-rgb), .35); transform-origin: left; animation: grow 900ms 500ms var(--ease) both; }
.dimension strong { color: var(--muted); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dimension.is-top .dimension-name, .dimension.is-top strong { color: var(--accent); }
.dimension.is-top .dimension-track i { background: var(--accent); }
.dimension-note { color: var(--muted); font-size: .75rem; line-height: 1.6; }
.dimension-note b { color: var(--accent); }
.signature { margin: 20px 0 0; padding: 18px 8px 0; border-top: 1px dashed var(--line); font-family: var(--display-font); font-size: 1.1875rem; font-weight: 750; line-height: 1.6; text-align: center; }
.card-footer { display: flex; justify-content: space-between; margin-top: 18px; color: var(--muted); font-size: .75rem; letter-spacing: .04em; }

.result-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-top: 18px; }
.result-actions .secondary-button { font-size: .9375rem; }
.result-note { margin-top: 12px; color: var(--ink); opacity: .7; font-size: .8125rem; line-height: 1.6; text-align: center; }

.result-details { display: grid; gap: 12px; margin-top: 28px; }
.insight { padding: 20px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-soft); }
.insight-kicker { margin-bottom: 6px; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.insight h2 { margin-bottom: 8px; font-family: var(--display-font); font-size: 1.0625rem; font-weight: 750; }
.insight p:not(.insight-kicker) { color: var(--ink); font-size: .9375rem; line-height: 1.85; }
.insight.letter { position: relative; background: var(--surface); }
.insight.letter::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.insight-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.insight-pair .insight { padding: 18px 16px; }
.insight-pair .insight p:not(.insight-kicker) { font-size: .875rem; line-height: 1.75; }
.location-letter { display: grid; gap: 12px; }
.elements-title { margin-top: 16px; }
.element-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0 12px; }
.element { display: grid; gap: 2px; padding: 10px 4px; border-radius: var(--radius-sm); background: var(--accent-soft); text-align: center; }
.element b { font-family: var(--display-font); font-size: 1.125rem; }
.element span { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.element.is-missing { background: transparent; border: 1.5px dashed var(--line); }
.element.is-favorable { background: var(--accent); color: var(--on-accent); opacity: 1; }
.element.is-favorable span { color: var(--on-accent); }
.city-list { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.city-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border-radius: var(--radius); background: var(--accent-soft); }
.city-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: .875rem; }
.city-list b { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; }
.city-list em { padding: 1px 8px; border-radius: 999px; background: var(--surface); color: var(--accent); font-size: .75rem; font-style: normal; font-weight: 700; }
.city-list p { margin-top: 4px; color: var(--muted) !important; font-size: .875rem !important; line-height: 1.7 !important; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.pillars div { display: grid; gap: 2px; padding: 12px 4px; border-radius: var(--radius-sm); background: var(--accent-soft); text-align: center; }
.pillars b { font-family: var(--display-font); font-size: 1.25rem; letter-spacing: .08em; }
.pillars span { color: var(--muted); font-size: .75rem; }
.aftertaste { margin: 16px 8px 0; color: var(--ink); opacity: .72; font-family: var(--display-font); font-size: .9375rem; line-height: 1.8; text-align: center; }

.roast { background: var(--surface); }
.roast-headline { margin: 2px 0 14px; font-family: var(--display-font); font-size: 1.375rem !important; font-weight: 800; line-height: 1.45 !important; color: var(--accent) !important; }
.homework { box-shadow: inset 0 0 0 1.5px var(--accent-soft-2), var(--shadow-soft); }
.newer-banner { display: block; margin-bottom: 12px; padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-size: .875rem; text-decoration: none; text-align: center; }
.newer-banner b { color: var(--paper); }
.retake { margin: 8px 4px 0; color: var(--muted); font-size: .875rem; text-align: center; }
.retake summary { padding: 10px; cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.retake summary::-webkit-details-marker { display: none; }
.retake p { margin: 4px 0 12px; line-height: 1.7; }
.retake .secondary-button { min-height: 46px; font-size: .9375rem; }
.legacy-card { padding: 28px 24px; border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow-card); }
.legacy-card h1 { margin: 12px 0 4px; font-size: 2rem; line-height: 1.3; }
.result-grid { display: grid; gap: 16px; margin-top: 12px; line-height: 1.8; }
.result-grid h2, .legacy-card .bazi-strip h2 { font-size: 1rem; }
.share-line { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.8; }
.legacy-card + .result-actions { grid-template-columns: 1fr; }

/* save-image sheet */
.image-sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); background: rgba(12, 10, 12, .94); animation: fade-in 220ms ease both; }
.image-sheet-inner { display: grid; justify-items: center; gap: 14px; width: 100%; max-width: 420px; max-height: 100%; }
.image-sheet-hint { color: #fff; font-size: .9375rem; font-weight: 650; }
.image-sheet img { width: auto; max-width: 100%; max-height: calc(100vh - 180px); max-height: calc(100svh - 180px); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; }
.image-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.image-sheet-actions .secondary-button { background: #2b2a2c; color: #fff; box-shadow: none; }
.image-sheet-actions .primary-button { width: auto; }

/* ---------- error ---------- */
.error-body { background: var(--canvas); }
.error-panel { margin: 12vh 16px 0; padding: 32px 24px; border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow-card); text-align: center; }
.error-panel .done-mark { margin: 0 auto 20px; animation: none; }
.error-panel h1 { font-size: 1.625rem; }
.error-panel .subtitle { margin-top: 10px; }
.error-help { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; text-align: left; }
.error-help li { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: .875rem; line-height: 1.7; }
.noscript-note { margin: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface); }

/* ---------- world accents (kept small; the art carries the world) ---------- */
.theme-social-stage .identity-card { box-shadow: 0 0 0 2.5px var(--ink), 8px 8px 0 var(--ink); }
.theme-social-stage .identity-title { font-weight: 900; }
.theme-social-stage .rarity-badge { background: var(--support); color: #fff; }
.theme-social-stage .result-tags li { background: var(--ink); color: var(--paper); }
.theme-relationship-lab .identity-meter { border-top-style: dashed; border-bottom-style: dashed; }
.theme-relationship-lab .card-footer span:first-child::before { content: "LAB · "; }
.theme-love-inside .signature { font-size: 1.3125rem; }
.theme-career-money .rarity-badge { background: var(--accent); color: var(--on-accent); }
.theme-destiny-story .signature { border-top-style: double; border-top-width: 3px; }
.theme-bazi .identity-card { box-shadow: inset 0 0 0 1px var(--support), var(--shadow-card); }
.theme-bazi .rarity-badge { background: var(--accent); }
.theme-fox-theatre .rarity-badge { background: linear-gradient(135deg, #3a1c2b, #ae2752); }

/* ---------- motion ---------- */
.reveal { animation: rise 700ms var(--ease) both; }
.identity-card.reveal { animation: card-in 900ms var(--ease) both; }
.result-actions.reveal { animation-delay: 380ms; }
.result-note.reveal { animation-delay: 460ms; }
.identity-card .identity-title { animation: rise 700ms 260ms var(--ease) both; }
.identity-card .identity-meter { animation: rise 700ms 360ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes question-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes question-in-back { from { opacity: 0; transform: translateX(-24px); } }
@keyframes picked { 40% { transform: scale(.97); } }
@keyframes settle { from { transform: scale(1.06); } }
@keyframes develop { 50% { opacity: .55; transform: scale(.94); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 5px var(--accent-soft-2); } }
@keyframes halo { 50% { box-shadow: 0 0 0 14px var(--accent-soft), 0 0 0 28px rgba(255,255,255,0); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- small phones ---------- */
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .cover-body h1 { font-size: 1.95rem; }
  .identity-title { font-size: 2rem; }
  .question h2 { font-size: 1.25rem; }
  .insight-pair { grid-template-columns: 1fr; }
  .card-body { padding: 0 18px 20px; }
}

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .product-body .page-shell { max-width: none; padding: 0; }
  .cover { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); min-height: 100vh; }
  .cover-art { position: sticky; top: 0; height: 100vh; max-height: none; }
  .cover-art::after { background: linear-gradient(90deg, rgba(0,0,0,0) 88%, var(--paper)); }
  .cover-body { margin: 0; padding: 72px 64px 56px; max-width: 600px; align-self: center; }
  .cover-body h1 { font-size: 3rem; }
  .quiz-body .page-shell { padding-top: 32px; }
  .quiz-experience { min-height: calc(100vh - 64px); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); overflow: hidden; }
  .quiz-body { background: var(--canvas); }
  .quiz-runner, .generating-state { min-height: calc(100vh - 64px); }
  .quiz-head { top: 0; padding-top: 16px; }
  .result-body .page-shell { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

.detail-list { display: grid; gap: 4px; margin: 12px 0 0; }
.detail-list dt { margin-top: 10px; color: var(--accent); font-weight: 750; }
.detail-list dt b { margin-left: 6px; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.detail-list dd { margin: 0; }
.assessment-credit { margin: 8px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.7; }

/* --- language switch + English typography --- */
.lang-switch { position: fixed; z-index: 20; top: calc(14px + env(safe-area-inset-top)); left: 14px; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--ink); font-size: .8125rem; font-weight: 650; text-decoration: none; box-shadow: var(--shadow-soft); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lang-switch:hover, .lang-switch:focus-visible { background: #fff; color: var(--accent); }
html[lang="en"] body {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --display-font: Georgia, "Iowan Old Style", "Palatino Linotype", "Noto Serif", serif;
  letter-spacing: 0;
}
html[lang="en"] .question h2 { line-height: 1.4; font-size: 1.3125rem; }
html[lang="en"] .identity-title { line-height: 1.12; overflow-wrap: anywhere; }
html[lang="en"] .choice-text, html[lang="en"] p { overflow-wrap: break-word; }

.lang-switch-low { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); }

/* --- personal report --- */
.report { margin-top: 8px; }
.report-title { margin: 4px 0 6px; font-family: var(--display-font); }
.report-lead { margin: 0 0 14px; color: var(--muted); }
.report-section h3 { margin: 4px 0 8px; font-family: var(--display-font); font-size: 1.125rem; }
.report-body { white-space: pre-line; }
.report-actions { margin: 16px 0 4px; }
.report-slot[data-state="loading"] h2::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: report-spin .9s linear infinite; }
@keyframes report-spin { to { transform: rotate(360deg); } }
.report-section { margin-bottom: 12px; }

/* --- evidence chain + collectible cards --- */
.insight.receipts p:not(.insight-kicker) { white-space: pre-line; }
.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.module { padding: 16px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-soft); }
.module p:not(.insight-kicker) { color: var(--ink); font-size: .875rem; line-height: 1.7; }
.module b { font-family: var(--display-font); font-size: 1rem; }
.module-wide { grid-column: 1 / -1; background: var(--accent-soft); box-shadow: none; text-align: center; }
.module-caption { font-family: var(--display-font); font-size: 1.0625rem !important; font-weight: 700; }
.flag-green .insight-kicker::before { content: "▲ "; }
.flag-red .insight-kicker::before { content: "▼ "; }
@media (max-width: 380px) { .modules { grid-template-columns: 1fr; } }
.image-extra { display: grid; gap: 18px; justify-items: center; width: 100%; }
.image-extra figure { display: grid; gap: 8px; justify-items: center; margin: 0; width: 100%; }
.image-extra a { color: #fff; font-size: .8125rem; opacity: .85; }
.image-sheet-inner { overflow-y: auto; align-content: start; }

/* --- Gumroad delivery page --- */
.delivered-card { display: grid; gap: 12px; margin: 14px 0; text-align: center; }
.delivered-code { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.375rem; font-weight: 800; letter-spacing: .04em; word-break: break-all; user-select: all; -webkit-user-select: all; }
