/* ============================================================
   古人精神状态档案馆 · H5
   视觉规则：暖纸 / 近黑 / 朱砂 / 低饱和状态色 / 大留白
   ============================================================ */

:root {
  --paper: #F3EDE2;
  --paper-deep: #E8DFD0;
  --ink: #1E1C19;
  --ink-soft: #4A463F;
  --line: rgba(30, 28, 25, 0.16);
  --line-strong: rgba(30, 28, 25, 0.3);
  --seal: #A63A2B;
  --page: #D6CEC0;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

body.modal-open { overflow: hidden; }

button { font: inherit; }

a { color: inherit; }

p { margin: 0; }

/* ---------- 通用 ---------- */

.screen { display: none; }
.screen.is-active { display: block; animation: screenIn 0.35s ease both; }

@keyframes screenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.text-btn {
  -webkit-tap-highlight-color: transparent;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.primary-btn:hover { background: #000; transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 22px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.secondary-btn:hover { background: rgba(30, 28, 25, 0.06); }
.secondary-btn:disabled { opacity: 0.55; cursor: wait; }

.ghost-btn {
  min-height: 38px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.ghost-btn:hover { color: var(--ink); }

.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ============================================================
   落地页
   ============================================================ */

.landing-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 22px 52px;
}

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 42px;
  padding: 54px 0 44px;
}

.hero-copy h1 {
  margin: 18px 0 22px;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-sub {
  font-size: clamp(15px, 3.8vw, 19px);
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-note {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-card-wrap {
  transform: rotate(-3deg);
  filter: drop-shadow(0 24px 42px rgba(30, 28, 25, 0.18));
}

.hero-card-viewport {
  position: relative;
  width: min(78vw, 330px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--paper);
}

.hero-card-scaler {
  position: absolute;
  top: 0;
  left: 0;
  width: 1080px;
  height: 1920px;
  transform-origin: top left;
  pointer-events: none;
}

.hero-caption {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-align: center;
}

.section {
  padding: 52px 0;
  border-top: 1px solid var(--line-strong);
}

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 5.4vw, 34px);
  line-height: 1.4;
  font-weight: 500;
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.figure-chip {
  padding: 15px 14px 13px;
  border: 1px solid var(--line);
  background: rgba(243, 237, 226, 0.45);
}

.figure-chip .figure-name {
  display: block;
  font-size: 17px;
  line-height: 1.3;
}

.figure-chip .figure-label {
  display: block;
  margin-top: 7px;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 30px;
}

.step {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.step > span {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--seal);
}

.step h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  font-weight: 500;
}

.step p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.quote-band {
  margin-top: 8px;
  padding: 42px 8px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  text-align: center;
}

.quote-band p {
  font-size: clamp(20px, 4.6vw, 28px);
  line-height: 1.7;
  color: var(--ink);
}

.site-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 28px;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ============================================================
   答题页
   ============================================================ */

.quiz-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 22px 42px;
}

.quiz-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0 22px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
}

.icon-btn:hover { background: rgba(30, 28, 25, 0.05); }

.quiz-progress {
  flex: 1;
  height: 2px;
  background: rgba(30, 28, 25, 0.12);
  overflow: hidden;
}

.quiz-progress-bar {
  width: 0;
  height: 100%;
  background: var(--seal);
  transition: width 0.35s ease;
}

.quiz-count {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.quiz-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 8vh;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.quiz-main.is-switching {
  opacity: 0;
  transform: translateY(7px);
}

.quiz-question {
  margin: 14px 0 30px;
  font-size: clamp(24px, 6.4vw, 34px);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 16px 16px;
  border: 1px solid var(--line);
  background: rgba(243, 237, 226, 0.52);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.option:hover {
  background: var(--paper);
  border-color: rgba(30, 28, 25, 0.36);
  transform: translateX(2px);
}

.option-key {
  flex: 0 0 18px;
  padding-top: 3px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.option.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.option.is-selected .option-key { color: rgba(243, 237, 226, 0.65); }

.quiz-hint {
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ============================================================
   调档动画
   ============================================================ */

.loading-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 22px;
  text-align: center;
}

.loading-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  margin-bottom: 28px;
  background: var(--seal);
  color: var(--paper);
  font-size: 34px;
  line-height: 1;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 4px rgba(243, 237, 226, 0.22);
  animation: sealPulse 1.6s ease-in-out infinite;
}

@keyframes sealPulse {
  0%, 100% { transform: rotate(-4deg) scale(1); opacity: 1; }
  50% { transform: rotate(-4deg) scale(0.96); opacity: 0.82; }
}

.loading-shell h2 {
  margin: 12px 0 22px;
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 500;
}

.loading-line {
  width: 180px;
  height: 1px;
  background: rgba(30, 28, 25, 0.14);
  overflow: hidden;
}

.loading-line span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--seal);
  animation: loadingLine 1.15s ease-in-out infinite;
}

@keyframes loadingLine {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(350%); }
}

.loading-note {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ============================================================
   结果页
   ============================================================ */

.result-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 22px 58px;
}

.result-head { padding-bottom: 24px; }

.result-head h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 6.4vw, 36px);
  font-weight: 500;
}

.result-layout { display: block; }
.result-visual,
.result-detail { display: block; }

.card-viewport {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  filter: drop-shadow(0 18px 30px rgba(30, 28, 25, 0.14));
}

.card-scaler {
  position: absolute;
  top: 0;
  left: 0;
  width: 1080px;
  height: 1920px;
  transform-origin: top left;
}

.result-actions {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 20px auto 0;
}

.result-actions .primary-btn,
.result-actions .secondary-btn {
  flex: 1;
  padding-left: 12px;
  padding-right: 12px;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 420px;
  margin: 24px auto 0;
}

.keyword {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: rgba(243, 237, 226, 0.5);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.evidence-line {
  max-width: 420px;
  margin: 14px auto 0;
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.reading {
  max-width: 420px;
  margin: 38px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.reading-copy {
  margin: 18px 0 30px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink);
}

.reading-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.reading-block h3 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--seal);
}

.reading-block p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.upsell {
  max-width: 420px;
  margin: 38px auto 0;
  padding: 26px 24px;
  border: 1px solid var(--line);
  background: rgba(243, 237, 226, 0.55);
}

.upsell h3 {
  margin: 10px 0;
  font-size: 22px;
  font-weight: 500;
}

.upsell > p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.upsell-list {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 2;
  color: var(--ink-soft);
}

.upsell-list li::before {
  content: "—";
  margin-right: 10px;
  color: var(--seal);
}

.upsell .secondary-btn { width: 100%; }

.upsell-note {
  margin-top: 12px !important;
  font-family: var(--sans);
  font-size: 9px !important;
  line-height: 1.7 !important;
  letter-spacing: 0.04em;
  text-align: center;
}

.result-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 34px;
}

.disclaimer {
  max-width: 420px;
  margin: 34px auto 0;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  opacity: 0.72;
  text-align: center;
}

/* ============================================================
   1080 × 1920 档案卡
   ============================================================ */

.archive-card {
  --accent: #3E5C58;
  position: relative;
  width: 1080px;
  height: 1920px;
  padding: 88px;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
}

.ac-grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.26;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.ac-watermark {
  position: absolute;
  right: -70px;
  bottom: 100px;
  z-index: 0;
  font-size: 640px;
  line-height: 0.8;
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 2px rgba(30, 28, 25, 0.055);
  pointer-events: none;
  user-select: none;
}

.ac-head,
.ac-body,
.ac-foot,
.ac-disclaimer {
  position: relative;
  z-index: 1;
}

.ac-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 26px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.ac-meta {
  font-size: 19px;
  letter-spacing: 0.16em;
  opacity: 0.72;
}

.ac-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  height: 1360px;
  padding-top: 88px;
}

.ac-name-col {
  height: 100%;
  padding-right: 38px;
  border-right: 1px solid var(--line);
}

.ac-dynasty {
  margin-bottom: 46px;
  font-family: var(--sans);
  font-size: 27px;
  letter-spacing: 0.3em;
  color: var(--accent);
}

.ac-name {
  height: 590px;
  font-size: 112px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
}

.ac-name-en {
  margin-top: 36px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  opacity: 0.56;
}

.ac-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.ac-kicker {
  margin-bottom: 34px;
  font-family: var(--sans);
  font-size: 21px;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.ac-state {
  margin: 0 0 44px;
  font-size: 88px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.02em;
}

.ac-quote {
  margin: 0 0 40px;
  padding-left: 28px;
  border-left: 3px solid var(--accent);
  font-size: 35px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-soft);
}

.ac-diagnosis {
  margin: 0 0 44px;
  font-size: 37px;
  font-weight: 500;
  line-height: 1.7;
}

.ac-manifest {
  margin: 0 0 42px;
  padding: 0;
  list-style: none;
  font-size: 31px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.ac-manifest li {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.ac-manifest li span {
  flex: 0 0 36px;
  width: 36px;
  font-family: var(--sans);
  font-size: 17px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.ac-underestimated {
  margin: 0 0 36px;
  padding: 28px 32px;
  border-left: 3px solid var(--accent);
  background: rgba(30, 28, 25, 0.035);
  font-size: 29px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.ac-underestimated b {
  display: block;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.ac-nearby {
  margin-top: 16px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.ac-nearby-label {
  font-family: var(--sans);
  font-size: 17px;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.ac-nearby-names {
  margin-top: 12px;
  font-size: 30px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.ac-bottom { margin-top: auto; }

.ac-evidence {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: 10px;
  padding-top: 26px;
  border-top: 1px dashed rgba(30, 28, 25, 0.24);
  font-size: 24px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.ac-evidence span {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 17px;
  letter-spacing: 0.18em;
  color: var(--accent);
  white-space: nowrap;
}

.ac-rx {
  display: flex;
  align-items: baseline;
  gap: 28px;
  margin-top: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.ac-rx-label {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 20px;
  letter-spacing: 0.18em;
  color: var(--accent);
  white-space: nowrap;
}

.ac-rx-text {
  font-size: 34px;
  line-height: 1.55;
}

.ac-foot {
  position: absolute;
  right: 88px;
  bottom: 104px;
  left: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.ac-barcode {
  width: 230px;
  height: 72px;
  opacity: 0.62;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 5px,
    var(--ink) 5px 6px,
    transparent 6px 10px
  );
}

.ac-stats {
  display: flex;
  gap: 54px;
  font-family: var(--sans);
  color: var(--ink-soft);
  text-align: right;
}

.ac-stats span {
  display: block;
  font-size: 16px;
  letter-spacing: 0.14em;
}

.ac-stats strong {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.ac-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  border-radius: 4px;
  background: var(--seal);
  color: var(--paper);
  font-size: 34px;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 4px rgba(243, 237, 226, 0.22);
}

.ac-disclaimer {
  position: absolute;
  bottom: 44px;
  left: 88px;
  font-family: var(--sans);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  opacity: 0.6;
}

/* ============================================================
   弹窗 / Toast
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal.is-open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 28, 25, 0.56);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 86vh;
  overflow: auto;
  padding: 32px 26px;
  background: var(--paper);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.26);
  animation: modalIn 0.25s ease both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.modal-card h2 {
  margin: 12px 0 18px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
}

.modal-body p {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.modal-body .upsell-list {
  margin-top: 16px;
}

.modal-card .primary-btn {
  width: 100%;
  margin-top: 22px;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 80;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

#export-host {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  pointer-events: none;
}

.save-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(30, 28, 25, 0.94);
}

.save-sheet img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.save-sheet p {
  margin-top: 18px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.save-sheet .save-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(243, 237, 226, 0.35);
  background: transparent;
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ============================================================
   响应式
   ============================================================ */

@media (min-width: 700px) {
  .figure-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
}

@media (min-width: 900px) {
  .landing-inner { padding: 34px 40px 64px; }
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 64px;
    padding: 78px 0 64px;
  }
  .hero-visual { justify-content: flex-start; }
  .hero-card-viewport { width: 330px; }
  .hero-caption { text-align: left; }
  .section { padding: 64px 0; }

  /* 桌面答题：更宽、更大的阅读节奏 */
  .quiz-shell { max-width: 780px; padding: 30px 32px 60px; }
  .quiz-question { font-size: clamp(34px, 3.4vw, 42px); }
  .option { font-size: 17px; padding: 19px 20px; }

  /* 桌面结果：卡片在左，解读与后端在右 */
  .result-shell { max-width: 1080px; padding: 40px 40px 64px; }
  .result-head h2 { font-size: clamp(34px, 3.2vw, 44px); }
  .result-layout {
    display: grid;
    grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
    gap: clamp(44px, 5vw, 72px);
    align-items: start;
  }
  .result-visual .card-viewport { max-width: 440px; margin: 0; }
  .result-visual .result-actions { max-width: 440px; margin: 16px 0 0; }
  .result-visual .keyword-row { max-width: 440px; margin: 18px 0 0; }
  .result-visual .evidence-line { max-width: 440px; margin: 12px 0 0; }
  .result-detail .reading { max-width: none; margin: 0; padding-top: 0; border-top: 0; }
  .result-detail .reading-copy { margin-top: 14px; }
  .result-detail .upsell { max-width: none; margin: 34px 0 0; }
  .result-detail .result-links { justify-content: flex-start; margin-top: 26px; }
  .result-shell > .disclaimer { max-width: none; margin: 44px 0 0; text-align: left; }
}

@media (max-width: 380px) {
  .landing-inner { padding-left: 18px; padding-right: 18px; }
  .result-shell { padding-left: 18px; padding-right: 18px; }
  .quiz-shell { padding-left: 18px; padding-right: 18px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero-actions .primary-btn { width: 100%; }
  .result-actions { flex-direction: column; }
}

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