/* 心里有答案 · ANSWER IN YOU
   视觉基线：视觉设计稿-方案一（干玫瑰 × 奶白 × 手账杂志风）
   移动端优先，版心 480px */

/* 霞鹜文楷子集：只打包站内用到的字，避免整包 24MB */
@font-face {
  font-family: "LXGW WenKai";
  src: url("fonts/lxgw-wenkai-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FAF6F1;
  --paper: #FAF6F1;
  --paper-2: #F9EFEA;
  --pink: #F9EFEA;
  --pink-2: #F3E3E0;
  --card: #FFFFFF;

  --ink: #4A3A33;
  --ink-2: #8A7A6E;
  --muted: #8A7A6E;
  --muted-soft: #B3A296;

  --rose: #A4586A;
  --rose-deep: #8A4557;
  --rose-soft: #C97C8D;
  --rose-tint: #F9EFEA;
  --gold: #B08D57;
  --gold-ink: #B08D57;

  --line: #EADFD5;
  --line-strong: rgba(164, 88, 106, 0.32);

  --shadow: 0 6px 22px -14px rgba(61, 50, 41, 0.22);
  --shadow-btn: 0 6px 14px rgba(164, 88, 106, 0.30);

  --font-display: "LXGW WenKai", "霞鹜文楷", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.75;
  min-height: 100vh;
}

/* 细噪点纸纹 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}

a { color: var(--rose); text-decoration: none; }

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 18px 40px;
}

/* ---------- 通用元素 ---------- */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--gold-ink);
  text-transform: uppercase;
}

.eyebrow--rose { color: var(--rose); }

.hairline {
  width: 26px;
  height: 1px;
  background: var(--rose);
  opacity: 0.55;
  margin: 14px 0;
}

/* 页头品牌组合：玫瑰方块「答」+ 中文名 + 英文小标 */
.site-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.site-head .mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: var(--rose);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.site-head .cn {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--ink);
}

.site-head .en {
  font-size: 9px;
  letter-spacing: 0.2em;
  line-height: 1.4;
  color: var(--gold);
}

/* 导出长图顶部的品牌页头：页面里不显示，导出克隆文档中展开 */
.rp-head { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
  background: var(--rose);
  color: var(--bg);
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover { background: var(--rose-deep); }
.btn--primary:active { transform: translateY(1px) scale(0.99); }
.btn--primary:disabled { background: var(--muted-soft); cursor: default; box-shadow: none; }

.btn--ghost {
  background: transparent;
  color: var(--rose);
  border: 1px solid var(--rose);
}

.btn--ghost:hover { background: var(--pink); }

.btn--block { width: 100%; }

.footer-note {
  margin-top: 34px;
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.footer-note .dim { color: var(--muted-soft); }

/* ---------- 首页 ---------- */

.hp-slogan {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.main-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--pink) 30%, var(--pink-2));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
  color: inherit;
  transition: transform 0.2s ease;
}

.main-card:active { transform: scale(0.994); }

.main-card .k {
  display: block;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold);
}

.main-card .t {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--rose);
}

.main-card .m {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.btn-start {
  display: block;
  margin-top: 18px;
  padding: 12px 0;
  border-radius: 999px;
  background: var(--rose);
  color: var(--bg);
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  box-shadow: var(--shadow-btn);
}

.section-label {
  margin: 30px 0 12px;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--gold-ink);
}

.about {
  margin-top: 28px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.about .section-label { margin-top: 18px; }

.about p:not(.section-label) {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--muted);
}

.about p:last-child { margin-bottom: 0; }

/* ---------- 答题页 ---------- */

.qp-top {
  padding: 4px 0 16px;
  text-align: center;
}

.qp-top .no {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.qp-top .no b {
  margin: 0 2px;
  font-size: 22px;
  font-weight: 700;
  color: var(--rose);
}

.qp-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 10px;
}

.qp-dots i {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.2s ease;
}

.qp-dots i.on { background: var(--rose); }

.q-card {
  animation: fadeUp 0.2s ease both;
}

.q-text {
  margin: 4px 0 18px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--ink);
}

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

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.option:hover { border-color: var(--line-strong); }
.option:active { transform: scale(0.97); }

.option .key {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--rose);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.option.is-picked {
  border-color: var(--rose);
  background: linear-gradient(150deg, var(--pink), #FFF);
  box-shadow: 0 4px 12px rgba(164, 88, 106, 0.15);
}

.option.is-picked .key {
  background: var(--rose);
  color: var(--bg);
}

.option:focus-visible,
.btn:focus-visible,
.back:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.qp-back {
  text-align: center;
  padding: 18px 0 4px;
}

.back {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 6px 0;
  cursor: pointer;
  font-family: var(--font-body);
}

.back:hover { color: var(--rose); }

/* ---------- 报告 ---------- */

.report-wrap { position: relative; }

.report {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.screen {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.screen:nth-child(2) { animation-delay: 0.05s; }
.screen:nth-child(3) { animation-delay: 0.1s; }

.s-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--gold-ink);
  text-transform: uppercase;
}

.s-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 8px 0 4px;
  line-height: 1.55;
}

.para {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* S1 封面卡 */
.screen--cover {
  background: linear-gradient(165deg, var(--pink-2) 20%, var(--pink));
  border: 1px solid var(--line);
  text-align: center;
  padding: 26px 18px;
}

.screen--cover .k {
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: var(--gold);
}

.screen--cover .t {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-2);
}

.screen--cover .big {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--rose);
}

.screen--cover .d {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.screen--cover .deco,
.screen--cover .deco2 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.screen--cover .deco {
  right: -26px;
  bottom: -26px;
  width: 110px;
  height: 110px;
  border: 2px dashed rgba(164, 88, 106, 0.25);
}

.screen--cover .deco2 {
  left: -30px;
  top: -30px;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(176, 141, 87, 0.3);
}

/* 已购直达条 */
.bought-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--rose), var(--rose-deep));
  color: var(--bg);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bought-bar.is-hide {
  opacity: 0;
  transform: translateY(-4px);
}

.bought-bar.is-gone { display: none; }

.bought-tag {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.1em;
  border: 1px solid rgba(250, 246, 241, 0.55);
  border-radius: 10px;
  padding: 1px 7px;
}

.bought-text {
  font-size: 12px;
  color: #F3DCE2;
}

/* S2 一句话定性 */
.rp-lead {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* S3 雷达 + 五维条 */
.radar {
  display: block;
  width: 100%;
  height: auto;
  margin: 6px 0 14px;
}

.dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  font-size: 12.5px;
}

.dim-row .n {
  width: 58px;
  flex: 0 0 58px;
  text-align: right;
  color: var(--ink-2);
}

.dim-row .bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--pink);
  overflow: hidden;
}

.dim-row .bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--rose-soft), var(--rose));
}

.dim-row .v {
  width: 16px;
  flex: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--rose);
}

/* S4–S8 五维逐项解读：每个维度独立一屏 */
.dim-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dim-big {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.dim-num {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.dim-num b {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--rose);
}

.dim-num span {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.dim-tier {
  margin: 10px 0 2px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-ink);
}

.meter {
  display: flex;
  gap: 4px;
  margin: 12px 0 12px;
}

.meter i {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--pink-2);
}

.meter i.on { background: var(--rose); }
.meter i.on:nth-child(n + 5) { background: var(--rose-deep); }

.dim-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gold-ink);
}

.dim p {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink);
}

.dim p.shadow { color: var(--ink-2); }

/* S9 他的人物侧写 */
.portrait { margin-top: 4px; }

.p-item {
  padding: 16px 0;
  border-top: 1px dashed var(--line);
}

.p-item:first-child { border-top: none; padding-top: 6px; }

.p-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.p-no {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--rose-soft);
}

.p-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.p-text {
  margin: 7px 0 0;
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink);
}

/* S10 金句卡（反白） */
.screen--quote {
  background: linear-gradient(150deg, var(--rose), var(--rose-deep));
  border-color: transparent;
  text-align: center;
  padding: 28px 24px 26px;
}

.quote-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1;
  color: #E8C9D1;
  margin-bottom: 8px;
}

.quote-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--bg);
  margin: 0;
}

.quote-from {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #E8C9D1;
}

/* S11 建议 */
.advice-block {
  margin-top: 14px;
  padding: 15px 16px;
  border-left: 2px solid var(--rose-soft);
  background: var(--pink);
  border-radius: 0 12px 12px 0;
}

.advice-block .k {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--rose);
}

.advice-block p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
}

.warn {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.warn b { color: var(--rose-deep); font-weight: 700; letter-spacing: 0.1em; }

/* S12 答案回顾 */
.ans-row {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px dashed var(--line);
  align-items: flex-start;
}

.ans-row:first-of-type { border-top: none; }

.ans-no {
  flex: 0 0 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--rose-deep);
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.ans-body { flex: 1; min-width: 0; }

.ans-q {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 3px;
}

.ans-a {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--rose-deep);
  background: var(--pink);
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* S13 尾卡 */
.screen--end { text-align: center; padding: 30px 22px 26px; }

.screen--end .s-title { font-size: 21px; margin-top: 6px; }

.end-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.end-brand .lg {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--rose);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.end-brand .n {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.end-sub {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}

.screen--end .btn { margin-top: 18px; }

.end-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted-soft);
  letter-spacing: 0.03em;
}

/* ---------- 导出按钮 ---------- */

.save-float {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 20;
  display: none;
}

@media (max-width: 520px) {
  .save-float { display: inline-flex; }
  .page { padding-bottom: 96px; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translate(-50%, 8px);
  z-index: 30;
  max-width: 300px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(74, 58, 51, 0.92);
  color: var(--bg);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

/* ---------- 错误态 / 404 ---------- */

.empty-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-top: 30px;
}

.empty-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  margin: 8px 0;
}

.empty-card p { font-size: 13px; color: var(--muted); margin: 0 0 22px; line-height: 1.9; }

/* ---------- 动效 ---------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* 桌面端给报告留一点呼吸 */
@media (min-width: 720px) {
  .page { padding-top: 40px; }
}

/* ---------- 导出浮层 ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet[hidden] { display: none; }

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(74, 58, 51, 0.55);
}

.sheet-body {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px 22px;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.3s ease both;
}

.sheet-tip {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sheet-img {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.sheet-img img { display: block; width: 100%; height: auto; }

.sheet-actions { display: flex; gap: 10px; margin-top: 14px; }

.sheet-actions .btn { flex: 1; font-size: 14px; padding: 12px 8px; }
