/* ============================================================
   ARCHIVE AESTHETIC · 档案美学
   羊皮纸米色 / 炭黑 / 衬线标题 / 细线边框 / 克制留白
   ============================================================ */

:root {
  --paper: #F6F5F0;        /* 羊皮纸米色背景 */
  --paper-2: #F0EEE7;      /* 卡片底色 */
  --ink: #2C2C2C;          /* 炭黑主字 */
  --ink-2: #4A4A4A;
  --gray: #8A8A8A;         /* 辅文深灰 */
  --line: #E5E5E5;         /* 细线边框 */
  --blood: #A63A2E;        /* 判词红(档案印) */
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

#app { max-width: 520px; width: 100%; margin: 0 auto; min-height: 100vh; }
.screen { min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }

/* ---------- buttons ----------
   高级感原则：统一高度、克制的描边、内聚高光、微动效、留白 */
.btn {
  -webkit-appearance: none; appearance: none;
  position: relative;
  display: block;
  height: 52px; padding: 0 22px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 3px; line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  transition: background .22s ease, color .22s ease, border-color .22s ease,
              transform .12s ease, box-shadow .22s ease, opacity .2s;
}
.btn:focus { outline: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .3; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* 主行动按钮：炭黑实底 + 顶部金属反光渐变 + 文字微光 + 底部投影 */
.btn-primary {
  background:
    linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.05) 36%, rgba(255,255,255,0) 50%, rgba(0,0,0,.20) 100%),
    linear-gradient(180deg, #3c3c3c 0%, #242424 46%, #1c1c1c 100%);
  color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), inset 0 -1px 0 rgba(0,0,0,.30),
              0 2px 6px rgba(0,0,0,.16);
  text-shadow: 0 0 8px rgba(246,245,240,.24), 0 1px 1px rgba(0,0,0,.35);
}
.btn-primary:active { background: #1d1d1d; text-shadow: none; }

/* 次级描边按钮：米白实底，按压时反转为炭黑 */
.btn-line {
  background: var(--paper); color: var(--ink);
}
.btn-line:active { background: var(--ink); color: var(--paper); }

/* 幽灵按钮：最弱层级，仅描边 */
.btn-ghost { border-color: var(--line); color: var(--gray); }
.btn-ghost:active { border-color: var(--ink); color: var(--ink); }

/* 回到主页按钮：档案红描边，引导探索其他测评 */
.btn-portal {
  border-color: var(--blood); color: var(--blood);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(166,58,46,.04), rgba(166,58,46,0));
  box-shadow: inset 0 1px 0 rgba(166,58,46,.10);
}
.btn-portal:active { background: var(--blood); color: var(--paper); border-color: var(--blood); }

/* 警示/导流按钮：档案红 */
.btn-danger {
  background: var(--blood); border-color: var(--blood); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 0 rgba(0,0,0,.08);
}
.btn-danger:active { background: #8e3126; }

/* 带前进箭头的 CTA，按压时箭头右移 */
.btn-arrow::after {
  content: "→";
  display: inline-block;
  margin-left: 10px;
  font-weight: 400;
  transition: transform .2s ease;
}
.btn-arrow:active::after { transform: translateX(4px); }

.btn-block { display: block; width: 100%; margin-top: 14px; }

/* ---------- cover ---------- */
#screen-cover {
  justify-content: center; align-items: center; text-align: center;
  padding: 40px 30px; position: relative;
  background-color: var(--paper);
  /* 磨砂纸噪点：SVG feTurbulence，灰阶低透明度，压在背景上 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  /* 进场：背景先由暗房色亮起，双线内框随之浮现 */
  animation: coverLight 1.6s ease-out both;
}
@keyframes coverLight {
  0% { background-color: #2a2723; }
  100% { background-color: var(--paper); }
}

/* 四周暗角：径向渐变，把视觉压向中央标题（暗房台灯读卷宗） */
.cover-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(ellipse at 50% 44%, rgba(30,26,20,0) 52%, rgba(30,26,20,.16) 100%);
  animation: coverFade 1.8s ease-out .35s both;
}
@keyframes coverFade { 0% { opacity: 0; } 100% { opacity: 1; } }

/* 进场：内容逐层浮现（标签 → 标题 → 副文案 → 按钮 → 脚注） */
.cover-label,
.cover-title,
.cover-desc,
.cover-actions,
.cover-foot,
.cover-copy {
  opacity: 0;
  animation: coverRise .7s cubic-bezier(.2,.8,.3,1) both;
}
.cover-label   { animation-delay: .85s; }
.cover-title   { animation-delay: 1.05s; }
.cover-desc    { animation-delay: 1.4s; }
.cover-actions { animation-delay: 1.6s; }
.cover-foot    { animation-delay: 1.8s; }
.cover-copy    { animation-delay: 2s; }
@keyframes coverRise {
  0%   { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  #screen-cover,
  .cover-vignette,
  .cover-art,
  .cover-dust i,
  .cover-label, .cover-title, .cover-desc, .cover-actions, .cover-foot, .cover-copy,
  .cover-title span, .cover-title span::after { animation: none; opacity: 1; }
  .cover-art { opacity: .20; }
  .cover-dust i { opacity: 0; }
}
/* 档案双线内框，营造"卷册封页"质感 */
#screen-cover::before {
  content: ""; position: absolute; inset: 16px;
  border: 1px solid rgba(44,44,44,.12); pointer-events: none;
}
#screen-cover::after {
  content: ""; position: absolute; inset: 21px;
  border: 1px solid rgba(44,44,44,.07); pointer-events: none;
}
.cover-frame { width: 100%; position: relative; z-index: 2; }
.cover-label {
  font-family: var(--serif); font-size: 12px; letter-spacing: 4px;
  color: var(--gray); border: 1px solid var(--line);
  display: inline-block; padding: 7px 18px; margin-bottom: 34px;
}
.cover-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(32px, 11vw, 46px);
  letter-spacing: 4px; line-height: 1.35; color: var(--ink);
}
.cover-title span {
  display: inline-block;
  color: var(--blood);
  font-family: var(--serif);
  position: relative;
  /* 印章式盖印：标题浮现后，红色"档案"二字砸下盖章 */
  animation: coverStamp .6s cubic-bezier(.2,.9,.3,1.25) 1.55s both;
}
/* 档案二字背后：极缓呼吸发光底效 */
.cover-title span::after {
  content: "";
  position: absolute; left: 50%; top: 50%; z-index: -1;
  width: 120%; height: 120%; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(166,58,46,.32) 0%, rgba(166,58,46,0) 70%);
  animation: coverGlow 3.6s ease-in-out infinite;
}
@keyframes coverGlow {
  0%, 100% { opacity: .4; transform: translate(-50%, -50%) scale(.92); }
  50%      { opacity: 1;  transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes coverStamp {
  0%   { transform: scale(1.42); opacity: 0; filter: blur(8px); }
  60%  { transform: scale(.9);   opacity: 1; filter: blur(0); }
  80%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.cover-title::after {
  content: ""; display: block; width: 34px; height: 1px;
  background: var(--ink); margin: 22px auto 0;
}
.cover-sub { margin-top: 20px; font-size: 13px; line-height: 1.9; color: var(--gray); }
.cover-desc {
  margin-top: 12px; font-size: 12px; line-height: 1.9; color: #3b3530;
  font-weight: 500;
  /* 底色光晕：撑开极小的保护圈，把背后的底纹线条"推开" */
  text-shadow: 0 0 4px #F6F5F0, 0 0 8px #F6F5F0, 0 0 12px #F6F5F0;
}
.cover-actions {
  margin-top: 44px; width: 100%; max-width: 300px; margin-left: auto; margin-right: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.cover-actions .btn { width: 100%; }

/* 插画级底纹：非写实、唯美精致，低透明垫在标题后方（暗纹而非插图） */
.cover-art {
  position: absolute; left: 50%; top: 50%; z-index: 1; pointer-events: none;
  width: min(88vw, 480px); aspect-ratio: 1 / 1;
  transform: translate(-50%, -52%);
  background-image: url("assets/portraits/cover_background.jpeg");
  background-size: cover; background-position: center;
  opacity: .20;
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 30%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 30%, rgba(0,0,0,0) 100%);
  mix-blend-mode: multiply;
  animation: coverArtIn 1.8s ease-out .3s both;
}
@keyframes coverArtIn { 0% { opacity: 0; } 100% { opacity: .20; } }

/* 微光尘埃粒子：缓缓上浮的荧光微尘 */
.cover-dust {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
}
.cover-dust i {
  position: absolute; bottom: -6px; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(166,58,46,.5);
  box-shadow: 0 0 6px rgba(166,58,46,.55);
  opacity: 0;
  animation: dustFloat linear infinite;
}
.cover-dust i:nth-child(1)  { left: 12%;  animation-duration: 16s; animation-delay: 0s; }
.cover-dust i:nth-child(2)  { left: 24%;  animation-duration: 22s; animation-delay: 3s; }
.cover-dust i:nth-child(3)  { left: 38%;  animation-duration: 19s; animation-delay: 6s; }
.cover-dust i:nth-child(4)  { left: 52%;  animation-duration: 24s; animation-delay: 2s; }
.cover-dust i:nth-child(5)  { left: 63%;  animation-duration: 17s; animation-delay: 8s; }
.cover-dust i:nth-child(6)  { left: 74%;  animation-duration: 21s; animation-delay: 5s; }
.cover-dust i:nth-child(7)  { left: 85%;  animation-duration: 18s; animation-delay: 1s; }
.cover-dust i:nth-child(8)  { left: 91%;  animation-duration: 26s; animation-delay: 9s; }
.cover-dust i:nth-child(9)  { left: 7%;   animation-duration: 20s; animation-delay: 12s; }
.cover-dust i:nth-child(10) { left: 46%;  animation-duration: 15s; animation-delay: 14s; }
@keyframes dustFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  12%  { opacity: .7; }
  60%  { transform: translateY(-55vh) translateX(14px); opacity: .4; }
  100% { transform: translateY(-72vh) translateX(-8px); opacity: 0; }
}

/* 四角精密十字瞄准线：极小的科技感折角点缀 */
.cover-corners { position: absolute; inset: 12px; z-index: 4; pointer-events: none; }
.cover-corners i {
  position: absolute; width: 12px; height: 12px;
}
.cover-corners .cc-tl { top: 0; left: 0; }
.cover-corners .cc-tr { top: 0; right: 0; }
.cover-corners .cc-bl { bottom: 0; left: 0; }
.cover-corners .cc-br { bottom: 0; right: 0; }
.cover-corners i::before, .cover-corners i::after {
  content: ""; position: absolute; background: rgba(166,58,46,.5);
}
/* 水平臂 */
.cover-corners i::before { width: 12px; height: 1px; top: 50%; left: 0; }
/* 垂直臂 */
.cover-corners i::after { height: 12px; width: 1px; left: 50%; top: 0; }
/* 中心点 */
.cover-corners .cc-tl::before, .cover-corners .cc-tl::after { box-shadow: 0 0 4px rgba(166,58,46,.6); }
.cover-corners .cc-tl::before { left: 50%; }
.cover-corners .cc-tl::after  { top: 50%; }

/* 封面主按钮：黑曜石毛玻璃 + 暗红微光细边（水晶铭牌质感） */
.btn-glass {
  background: rgba(40,35,30,.88);
  border: 1px solid rgba(166,58,46,.5);
  color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 14px rgba(166,58,46,.18), 0 2px 8px rgba(0,0,0,.14);
  text-shadow: 0 0 6px rgba(246,245,240,.3);
}
@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .btn-glass {
    background: rgba(40,35,30,.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}
.btn-glass:active { background: rgba(40,35,30,.92); box-shadow: none; }

/* 引言弹窗：温和过渡的阅前协议 */
.intro-modal { text-align: left; }
.intro-rule {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 0; border-top: 1px dashed var(--line);
}
.intro-rule:first-of-type { border-top: none; padding-top: 4px; }
.intro-rule b {
  flex: 0 0 auto; font-family: var(--serif); font-size: 12px;
  letter-spacing: 1px; color: var(--blood); line-height: 1.7;
}
.intro-rule span { font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.intro-rule em {
  display: block; font-style: normal; font-weight: 700;
  font-size: 13px; letter-spacing: 1px; color: var(--ink); margin-bottom: 2px;
}

.cover-foot {
  margin-top: 44px; font-family: var(--serif); font-size: 11px;
  letter-spacing: 3px; color: var(--gray);
}
.cover-copy {
  margin-top: 12px; font-family: var(--serif); font-size: 9px;
  letter-spacing: 2px; color: var(--gray); opacity: .72;
}

/* ---------- modal ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(30, 28, 24, .5);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 24px;
}
.modal {
  background: var(--paper); width: 100%; max-width: 400px;
  border: 1px solid var(--line); padding: 30px 26px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.modal-kicker {
  font-family: var(--serif); font-size: 11px; letter-spacing: 3px;
  color: var(--gray); margin-bottom: 14px;
}
.modal-kicker.light { color: rgba(255,255,255,.7); }
.modal h3 { font-family: var(--serif); font-size: 22px; letter-spacing: 4px; }
.modal-desc { font-size: 12px; color: var(--gray); margin: 12px 0 22px; line-height: 1.8; }

.vol-btn {
  -webkit-appearance: none; appearance: none;
  position: relative;
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--paper);
  border: 1px solid var(--line); padding: 16px 42px 16px 16px; margin-bottom: 12px;
  cursor: pointer; border-radius: 2px;
  transition: border-color .18s ease, background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.vol-btn:active { background: #fff; transform: translateY(1px); }
/* 选中反馈：极弱红色内发光 + 边框泛红 */
.vol-btn.vol-selected {
  border-color: var(--blood);
  box-shadow: inset 0 0 0 1px rgba(166,58,46,.28), inset 0 0 14px rgba(166,58,46,.14);
  background: rgba(166,58,46,.03);
}
/* 图腾印章：斑驳红色圆印 */
.vol-seal {
  flex: 0 0 auto;
  width: 34px; height: 34px; line-height: 32px;
  border: 2px solid var(--blood); border-radius: 50%;
  background: rgba(166,58,46,.06);
  color: var(--blood);
  font-family: var(--serif); font-size: 16px; text-align: center;
  box-shadow: inset 0 0 0 1px rgba(166,58,46,.18), 0 0 0 1px rgba(166,58,46,.1);
}
.vol-btn::after {
  content: "→";
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--gray); font-size: 15px;
  transition: transform .2s ease, color .2s ease;
}
.vol-btn:active::after { transform: translate(4px, -50%); color: var(--ink); }
/* 选中确认感：箭头向右拉伸锐利动画 */
.vol-btn.vol-selected::after {
  animation: volArrow .3s ease-out;
  color: var(--blood);
}
@keyframes volArrow {
  0%   { transform: translateY(-50%) scaleX(.6); }
  55%  { transform: translateY(-50%) translateX(8px) scaleX(1.25); }
  100% { transform: translateY(-50%) scaleX(1); }
}
.vol-btn .vol-txt { flex: 1 1 auto; min-width: 0; }
.vol-txt b {
  font-family: var(--serif); font-size: 18px; letter-spacing: 3px;
  color: var(--ink); display: block; margin-bottom: 4px;
}
.vol-txt > span { font-size: 11px; letter-spacing: 2px; color: var(--gray); }

.code-input {
  width: 100%; font-size: 19px; letter-spacing: 2px; text-align: center;
  padding: 14px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); outline: none;
}
.code-input:focus { border-color: var(--ink); }
.modal-err { color: var(--blood); font-size: 13px; margin-top: 12px; }
.modal-hint { color: var(--gray); font-size: 12px; margin-top: 12px; line-height: 1.7; }
#btn-buy { margin-top: 10px; }

/* ---------- 历史卷宗弹窗 ---------- */
.history-modal { max-width: 430px; }
.history-list { margin-top: 6px; max-height: 340px; overflow-y: auto; text-align: left; }

/* 管理员模板预览弹窗 */
.admin-modal { max-width: 430px; text-align: left; }
.admin-filter { display: flex; gap: 8px; margin: 4px 0 14px; }
.admin-filter-btn {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 36px; font-size: 13px; letter-spacing: 2px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; border-radius: 2px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.admin-filter-btn.active {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
.admin-list { max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.admin-person {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: baseline; gap: 10px;
  width: 100%; text-align: left; background: #fff;
  border: 1px solid var(--line); padding: 12px 14px; cursor: pointer; border-radius: 2px;
  transition: border-color .18s ease, transform .12s ease;
}
.admin-person:active { transform: translateY(1px); border-color: var(--ink); }
.admin-person b {
  font-family: var(--serif); font-size: 17px; letter-spacing: 2px; color: var(--ink);
  flex: 0 0 auto;
}
.admin-person span { font-size: 12px; color: var(--gray); letter-spacing: 1px; }

.history-empty {
  padding: 26px 10px; font-size: 13px; line-height: 1.9; color: var(--gray);
  text-align: center; white-space: pre-line;
}
.history-item {
  border: 1px solid var(--line); background: #fff;
  padding: 14px 16px; margin-bottom: 12px;
}
.history-item-head { display: flex; align-items: baseline; gap: 10px; }
.history-no {
  font-family: var(--serif); font-size: 11px; letter-spacing: 1px;
  color: var(--gray); flex-shrink: 0;
}
.history-item-main { flex: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.history-item-main b { font-family: var(--serif); font-size: 18px; letter-spacing: 2px; color: var(--ink); }
.history-tag {
  font-size: 11px; color: var(--blood); border: 1px solid rgba(166,58,46,.35);
  padding: 1px 8px; letter-spacing: 1px;
}
.history-meta { font-size: 12px; color: var(--gray); margin: 8px 0 12px; }
.history-item .btn-sm {
  display: block; width: 100%; padding: 10px;
  font-size: 13px; letter-spacing: 2px; margin: 0;
}

/* ---------- quiz ---------- */
#screen-quiz {
  justify-content: center; align-items: center;
  padding: 28px 20px 44px;
}
.quiz-top {
  width: 100%; max-width: 470px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.quiz-count {
  font-family: var(--serif); font-size: 12px; letter-spacing: 1px;
  color: var(--ink); white-space: nowrap;
}
.progress { flex: 1; height: 1px; background: var(--line); position: relative; }
.progress i {
  display: block; height: 100%; width: 0; background: var(--ink);
  transition: width .3s;
}

.quiz-frame {
  width: 100%; max-width: 470px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 36px 28px 28px;
  text-align: center;
}
.quiz-kicker {
  font-family: var(--serif); font-size: 11px; letter-spacing: 3px;
  color: var(--gray); margin-bottom: 22px;
}
.quiz-text {
  font-family: var(--serif); font-size: clamp(19px, 5.5vw, 23px); font-weight: 600;
  line-height: 1.7; margin: 4px 0 32px; letter-spacing: 1px; text-align: center;
}
.quiz-options { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.quiz-opt {
  display: flex; align-items: center; gap: 14px;
  -webkit-appearance: none; appearance: none;
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  padding: 15px 16px; font-size: 15px; line-height: 1.6; cursor: pointer;
  text-align: left; border-radius: 2px;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.quiz-opt:active { background: #fff; transform: translateY(1px); }
.quiz-opt.selected { border-color: var(--ink); background: #fff; }
.opt-letter {
  font-family: var(--serif); font-style: normal; font-size: 13px;
  color: var(--gray); flex: 0 0 30px; width: 30px; height: 30px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.quiz-opt.selected .opt-letter {
  border-color: var(--ink); background: var(--ink); color: var(--paper);
}

/* ---------- quiz navigation ---------- */
.quiz-nav {
  margin-top: 34px;
  display: flex; gap: 10px; align-items: stretch;
}
.btn-nav {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 46px; padding: 0 8px;
  font-size: 13px; letter-spacing: 2px; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; border-radius: 2px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease;
}
.btn-nav:active { transform: translateY(1px); }
.quiz-tip {
  margin-top: 18px; font-family: var(--serif); font-size: 12px;
  letter-spacing: 2px; color: var(--gray); text-align: center;
}
.btn-nav:disabled { opacity: .3; cursor: not-allowed; }
.btn-nav:disabled:active { transform: none; }
.btn-nav-next {
  flex: 1.5;
  background: var(--ink); border-color: var(--ink); color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(0,0,0,.07);
}
.btn-nav-next:disabled {
  background: #fff; border-color: var(--line); color: var(--gray);
  box-shadow: none;
}

/* ---------- result ---------- */
#screen-result { padding: 30px 24px 54px; }
.result-head { text-align: center; padding: 10px 0 26px; }
.result-prototype-label {
  font-family: var(--serif); font-size: 12px; letter-spacing: 4px;
  color: var(--gray); margin-bottom: 12px;
}
.result-meta {
  font-family: var(--serif); font-size: 13px; letter-spacing: 3px; color: var(--gray);
}
.result-archetype {
  display: inline-block; margin-top: 16px; font-size: 12px; letter-spacing: 4px;
  color: var(--blood); border: 1px solid var(--blood);
  padding: 6px 16px; font-family: var(--serif);
}
.result-name {
  font-family: var(--serif); font-size: clamp(34px, 11vw, 44px);
  letter-spacing: 6px; margin-top: 16px; font-weight: 700;
}

/* 人物立绘：位于姓名之下、判词之上 */
.result-portrait {
  display: block;
  width: 58%; max-width: 300px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
  margin: 22px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* 判词：置于画像之下，省略号框定的大字金句，居中对齐 */
.verdict {
  text-align: center;
  padding: 14px 10px 20px;
}
.quote-text {
  font-family: var(--serif);
  font-size: 16px; line-height: 1.9;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: .5px;
}

/* 标签：置于判词之后，居中 */
.result-tags {
  margin: 0 0 26px; display: flex; gap: 8px;
  justify-content: center; flex-wrap: wrap;
  text-align: center;
}
.result-tags span {
  font-size: 12px; letter-spacing: 1px; color: var(--gray);
  border: 1px solid var(--line); padding: 4px 12px;
}

/* 数据区：雷达 + 六维 共用细线大外框（体检报告） */
.report-block {
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 24px 26px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.report-sec { padding: 22px 0 2px; }
.report-sec + .report-sec { border-top: 1px dashed var(--line); }
.sec-kicker {
  font-family: var(--serif); font-size: 12px; letter-spacing: 3px;
  color: var(--blood); font-weight: 600; margin-bottom: 12px;
}
.sec-title { font-family: var(--serif); font-size: 16px; letter-spacing: 1px; font-weight: 600; }
.sec-title span { color: var(--blood); }
.sec-note { font-size: 11px; color: var(--gray); margin-top: 6px; letter-spacing: 1px; }
.radar-chart { width: 100%; height: 340px; margin-top: 8px; }

/* 文本区（深度剖析 / 现实指导）：无外框，仅小标题 + 留白 */
.text-sec { padding: 30px 8px 2px; }
.outline-text { font-size: 14px; line-height: 2.05; color: var(--ink-2); }
.outline-hidden {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line);
  color: var(--gray);
}

/* 隐秘底色：极淡红底 + 上下细分割线 + 斜体 */
.text-sec.dual {
  margin-top: 34px;
  padding: 28px 20px;
  background: rgba(166,58,46,.05);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dual-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px; line-height: 1.95;
  color: var(--ink-2);
  font-style: italic;
  letter-spacing: .5px;
}
/* 隐秘底色：表层防御 / 核心引擎 双行卡片 */
.dual-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0 12px; border-bottom: 1px dashed var(--line);
}
.dual-row:last-of-type { border-bottom: none; }
.dual-tag {
  flex: 0 0 auto; margin-top: 1px;
  font-size: 11px; letter-spacing: 1px; font-style: normal;
  padding: 3px 8px; border: 1px solid var(--line); color: var(--gray);
  background: rgba(44,44,44,.03);
}
.dual-surface .dual-tag { color: var(--ink); border-color: var(--ink); }
.dual-engine .dual-tag { color: var(--blood); border-color: var(--blood); background: rgba(166,58,46,.05); }
.dual-row b { font-size: 13px; font-family: var(--serif); color: var(--ink); flex: 0 0 auto; font-style: normal; }
.dual-row em { font-size: 12px; line-height: 1.8; color: var(--ink-2); font-style: normal; }
.dual-body {
  margin-top: 12px; font-family: var(--sans);
  font-size: 13px; line-height: 2.0; color: var(--ink-2);
  font-style: normal;
}

/* 侧写底牌：三段式，底牌揭示句标红加粗（快速滑动也能被刺中） */
.deviation-text {
  font-family: var(--sans);
  font-size: 13px; line-height: 2.0; color: var(--ink-2);
}
.deviation-text p { margin-top: 8px; font-size: 13px; line-height: 2.0; }
.deviation-text .deviation-lead { color: var(--gray); }
.deviation-text .deviation-punch {
  color: var(--blood); font-weight: 600;
  font-family: var(--sans); font-size: 14px; line-height: 1.9;
}
.deviation-text .deviation-tail { color: var(--ink-2); }

/* 核心底色暴击金句：不骂不准，大字号标红收尾 */
.outline-zinger {
  margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--blood);
  color: var(--blood); font-weight: 700;
  font-family: var(--sans); font-size: 17px; line-height: 1.8;
  letter-spacing: .5px;
}

/* 六维解析 2x3 网格 */
.dim-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line);
}
.dim-cell {
  padding: 16px 14px; border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.dim-cell:nth-child(2n) { border-right: none; }
.dim-cell:nth-last-child(-n+2) { border-bottom: none; }
.dim-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.dim-name { font-family: var(--serif); font-size: 15px; letter-spacing: 2px; color: var(--ink); }
.dim-score { font-family: var(--serif); font-size: 22px; color: var(--blood); }
.dim-score i { font-style: normal; font-size: 11px; color: var(--gray); font-family: var(--sans); margin-left: 2px; }
.dim-meaning { font-size: 12px; line-height: 1.75; color: var(--ink-2); }

.reso-item { padding: 14px 0; border-top: 1px dashed var(--line); }
.reso-item:first-child { border-top: none; padding-top: 0; }
.reso-item b { font-family: var(--serif); font-size: 14px; letter-spacing: 1px; display: block; margin-bottom: 6px; }
.reso-item p { font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.reso-no {
  display: inline-block; margin-right: 8px;
  font-size: 10px; letter-spacing: 1px; color: var(--blood);
  border: 1px solid var(--blood); padding: 1px 5px; vertical-align: 2px;
}

.advice-item { padding: 14px 0; border-top: 1px dashed var(--line); }
.advice-item:first-child { border-top: none; padding-top: 0; }
.advice-item b { font-family: var(--serif); font-size: 14px; letter-spacing: 1px; display: block; margin-bottom: 6px; }
.advice-item p { font-size: 13px; line-height: 1.85; color: var(--ink-2); }

/* 生存折射：职场资产 | 情感负债 左右分栏 */
.modern-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line);
}
.modern-block { padding: 18px 16px; }
.modern-block:first-child { border-right: 1px solid var(--line); }
.modern-tag {
  font-family: var(--serif); font-size: 13px; letter-spacing: 2px;
  display: block; margin-bottom: 10px;
}
.modern-tag-asset { color: #5A7A4E; }
.modern-tag-liability { color: var(--blood); }
.modern-block p { font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.modern-block .modern-lead { font-weight: 700; color: var(--ink); }

/* 宜忌：去外框，仅保留彩色标点 */
.rule-list { display: flex; flex-direction: column; gap: 18px; }
.rule-item b {
  font-family: var(--serif); font-size: 14px; letter-spacing: 2px; display: block; margin-bottom: 8px;
}
.rule-item p { font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.rule-do b { color: #5A7A4E; }
.rule-dont b { color: var(--blood); }
.advice-sub { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); }
.advice-sub-kicker { font-family: var(--serif); font-size: 11px; letter-spacing: 3px; color: var(--gray); margin-bottom: 2px; }

/* 行动指南区：宜忌行动 + 相生相克 共用细线浅框（颜色贴近背景） */
.guide-block {
  margin-top: 34px;
  padding: 4px 24px 26px;
  border: 1px solid var(--line);
  background: #FCFBF6;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.guide-block .text-sec { padding: 26px 0 2px; }
.guide-block .text-sec + .text-sec { border-top: 1px dashed var(--line); }

/* 相生相克 */
.match-item { padding: 12px 0; border-top: 1px dashed var(--line); }
.match-item:first-child { border-top: none; padding-top: 0; }
.match-item b {
  display: inline-block; flex-shrink: 0;
  font-family: var(--serif); font-size: 13px; letter-spacing: 2px; margin-right: 12px;
}
.match-item span { font-size: 14px; color: var(--ink-2); }
.match-desc {
  display: block; margin-top: 6px; font-style: normal;
  font-size: 12px; line-height: 1.7; color: var(--gray);
}
.match-best b { color: #5A7A4E; }
.match-worst b { color: var(--blood); }

.result-share-tip { text-align: center; font-size: 12px; color: var(--gray); margin-top: 18px; letter-spacing: 1px; }
.poster-cta-hint { text-align: center; font-size: 12px; color: var(--gray); margin-top: 12px; letter-spacing: 1px; }

/* 7 天有效期：报告页倒计时 */
.expiry-hint {
  text-align: center; font-size: 12px; color: var(--blood);
  margin-top: 14px; letter-spacing: 1px;
}
.expiry-hint b { font-weight: 700; }

/* 历史卷宗：授权剩余时间 */
.history-exp { font-size: 12px; color: var(--gray); margin: 0 0 10px; }
.history-expired { color: var(--blood); }

/* 过期拦截页 */
.expired-modal { border-color: rgba(166,58,46,.4); }
.expired-modal h3 { line-height: 1.6; margin-bottom: 14px; }

/* ---------- poster modal ---------- */
.poster-wrap { text-align: center; width: 100%; max-width: 400px; }
#poster-img { width: auto; max-width: 100%; max-height: 78vh; margin: 0 auto; display: block; border: 1px solid var(--line); box-shadow: 0 16px 48px rgba(0,0,0,.35); }
#modal-poster { overflow-y: auto; align-items: flex-start; }
#modal-poster .poster-wrap { margin: auto; }
.poster-hint { color: #fff; font-size: 14px; margin: 16px 0 6px; letter-spacing: 2px; }

/* ---------- 结果过渡仪式（古法推演伪加载） ---------- */
.ritual {
  position: fixed; inset: 0; z-index: 120;
  background: #F9F6F0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}
.ritual-mark {
  font-family: var(--serif); font-size: 11px; letter-spacing: 5px; color: var(--gray);
}
.ritual-text {
  font-family: var(--serif); font-size: 21px; letter-spacing: 4px; color: var(--blood);
  opacity: 0;
}
.ritual-text.fade-in { animation: ritualFade .75s ease forwards; }
.ritual-line {
  width: 44px; height: 1px; background: var(--line);
}
@keyframes ritualFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- loading ---------- */
.loading {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 28, 24, .78);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.loading p { color: #fff; font-size: 13px; letter-spacing: 3px; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2); border-top-color: #fff;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.screen, .modal { animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- result actions（生成海报 + 好评返现） ---------- */
.result-actions {
  display: flex; gap: 12px; margin-top: 14px;
}
.result-actions .btn { flex: 1; min-width: 0; letter-spacing: 2px; padding: 0 14px; text-align: center; display: flex; align-items: center; justify-content: center; }
.result-actions .btn-ghost { border-color: var(--ink); }
#btn-poster { flex: 1.35; letter-spacing: 3px; }
.btn-cashback {
  background: var(--paper); border-color: var(--blood); color: var(--blood);
  box-shadow: none;
}
.btn-cashback:active { background: var(--blood); color: #fff; }

/* ---------- 好评返现弹窗 ---------- */
.cashback-modal { position: relative; text-align: left; padding: 26px 22px; }
.cashback-modal .modal-kicker, .cashback-modal h3 { text-align: center; }
.cashback-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 24px; line-height: 1;
  color: var(--gray); cursor: pointer; padding: 4px;
}
.cashback-close:active { color: var(--ink); }
.cashback-rules { margin-top: 6px; }
.cb-rule {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px;
}
.rule-num {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px;
  background: rgba(166, 58, 46, .12); color: var(--blood);
  font-family: var(--serif); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.cb-rule p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.text-red { color: var(--blood); }
.bold { font-weight: 700; }
.service-time-box {
  background: var(--paper-2); padding: 14px; border-radius: 2px;
  text-align: center; margin: 18px 0 0;
}
.service-time-box h4 {
  font-family: var(--serif); font-size: 14px; letter-spacing: 2px; margin-bottom: 6px;
}
.service-time-box p { margin: 0; font-size: 12px; color: var(--gray); line-height: 1.8; }
