/* ============================================================
   Anti-Trafficking Quiz · styles.css
   角色分工:
   - HTML <style> 内联负责糖果段 (data-phase="casual") 的整套视觉
   - 这里负责 dark 段 (data-phase="dark") 原有冷感纪实风
   - 两套互不干扰,用 body[data-phase] 隔离
   ============================================================ */

:root {
  --bg-0:   #0a0a0b;
  --bg-1:   #121214;
  --bg-2:   #1a1a1d;
  --line:   #2a2a2e;
  --line-2: #3a3a3f;
  --ink-1:  #eaeaea;
  --ink-2:  #9a9a9e;
  --ink-3:  #6a6a6e;
  --ink-4:  #4a4a4e;
  --red:    #d32f2f;
  --red-d:  #8a1e1e;
  --red-t:  rgba(211,47,47,.08);

  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', '宋体', serif;
  --mono:  'IBM Plex Mono', 'JetBrains Mono', 'Courier New', ui-monospace, monospace;

  --ease:   cubic-bezier(.22,.61,.36,1);
  --ease-2: cubic-bezier(.77,0,.18,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
}

/* 只在 dark 阶段应用纸质档案底色 */
body[data-phase="dark"] {
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--serif);
  font-weight: 400;
}

button { font-family: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   噪点 + 扫描线 —— 只在 dark 段叠加
   ============================================================ */
body[data-phase="dark"]::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.9'/></svg>");
}
body[data-phase="dark"]::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0px,
    rgba(255,255,255,0) 2px,
    rgba(255,255,255,.015) 3px,
    rgba(255,255,255,0) 4px
  );
}

/* ============================================================
   Header —— 档案编号 / 时间戳 (仅 dark 阶段可见,HTML 内联控制 display:none)
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em;
  color: var(--ink-3);
  text-transform: uppercase;
  background: linear-gradient(to bottom, var(--bg-0) 60%, transparent);
  backdrop-filter: blur(4px);
}
.header .meta { display: flex; gap: 18px; }
.header .meta span { display: inline-flex; align-items: center; gap: 6px; }
.header .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite var(--ease);
}
@keyframes pulse {
  0%, 100% { opacity: .4; }
  50%      { opacity: 1; box-shadow: 0 0 12px var(--red); }
}
.header .rec::before { content: 'REC '; color: var(--red); }

/* ============================================================
   屏幕容器
   ============================================================ */
.screen {
  min-height: 100vh;
  width: 100%;
  display: none;
  flex-direction: column;
  padding: 64px 24px 48px;
  opacity: 0;
  position: relative;
  z-index: 3;
  transition: opacity .5s var(--ease);
}
.screen.active { display: flex; opacity: 1; }

.container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   首屏 (dark 状态从不用,这是 fallback)
   糖果样式全部由 HTML 内联 style 接管
   ============================================================ */
#screen-intro { justify-content: center; }

.intro-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--red);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.intro-tag::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--red);
}

.intro-title {
  font-family: var(--serif);
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink-1);
  margin-bottom: 28px;
  position: relative;
}
.intro-title .quote-mark {
  color: var(--red);
  font-family: var(--serif);
  margin-right: 4px;
}
.intro-title .strike {
  position: relative;
  display: inline-block;
}
.intro-title .strike::after {
  content: '';
  position: absolute;
  left: -2px; right: -2px;
  top: 52%;
  height: 2px;
  background: var(--red);
  transform-origin: left center;
  animation: strike 1.2s .6s var(--ease) forwards;
  transform: scaleX(0);
}
@keyframes strike {
  to { transform: scaleX(1); }
}

.intro-sub {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 38px;
  padding-left: 16px;
  border-left: 2px solid var(--line-2);
}
.intro-sub em {
  font-style: normal;
  color: var(--red);
  font-weight: 500;
}

.intro-tw {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.9;
  color: var(--ink-3);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 44px;
  position: relative;
}
.intro-tw::before {
  content: 'TRIGGER WARNING';
  position: absolute;
  top: -8px; left: 12px;
  background: var(--bg-0);
  padding: 0 8px;
  color: var(--red);
  letter-spacing: .2em;
  font-size: 10px;
}

.intro-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: 1px solid var(--ink-1);
  color: var(--ink-1);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .1em;
  transition: all .3s var(--ease);
  position: relative;
  overflow: hidden;
}
.intro-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink-1);
  transform: translateX(-101%);
  transition: transform .4s var(--ease-2);
  z-index: 0;
}
.intro-cta:hover::before { transform: translateX(0); }
.intro-cta:hover { color: var(--bg-0); }
.intro-cta span, .intro-cta i { position: relative; z-index: 1; }
.intro-cta i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .15em;
}

.intro-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* ============================================================
   进度条 (dark 段样式,糖果段由 HTML 内联覆盖)
   ============================================================ */
.progress-wrap {
  position: fixed;
  top: 44px; left: 0; right: 0;
  padding: 0 20px;
  z-index: 40;
  transform: translateY(-8px);
  opacity: 0;
  transition: all .4s var(--ease);
  pointer-events: none;
}
.progress-wrap.visible { transform: translateY(0); opacity: 1; }
.progress-bar {
  height: 1px;
  background: var(--line);
  position: relative;
}
.progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--ink-1);
  width: 0%;
  transition: width .5s var(--ease-2);
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: -2px; top: -1px;
  width: 2px; height: 3px;
  background: var(--red);
}
.progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .1em;
}
.progress-info .percent { color: var(--red); }

/* ============================================================
   测试题页 (dark 段样式,糖果段由 HTML 内联覆盖)
   ============================================================ */
#screen-quiz { justify-content: center; padding-top: 100px; }

.q-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--red);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp .5s .1s var(--ease) forwards;
}
.q-label .category { color: var(--ink-3); }
.q-label .sep { width: 24px; height: 1px; background: var(--line-2); }

.q-text {
  font-family: var(--serif);
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink-1);
  margin-bottom: 10px;
  letter-spacing: .02em;
  opacity: 0;
  animation: fadeUp .6s .18s var(--ease) forwards;
}
.q-sub {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 32px;
  font-style: italic;
  opacity: 0;
  animation: fadeUp .6s .24s var(--ease) forwards;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.q-option {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--ink-1);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all .25s var(--ease);
  opacity: 0;
  animation: fadeUp .5s var(--ease) forwards;
}
.q-option:nth-child(1) { animation-delay: .3s; }
.q-option:nth-child(2) { animation-delay: .36s; }
.q-option:nth-child(3) { animation-delay: .42s; }
.q-option:nth-child(4) { animation-delay: .48s; }

.q-option:hover {
  border-color: var(--ink-2);
  background: var(--bg-2);
  transform: translateX(4px);
}
.q-option .marker {
  width: 16px; height: 16px;
  border: 1px solid var(--ink-3);
  flex-shrink: 0;
  position: relative;
  transition: all .25s var(--ease);
}
.q-option:hover .marker { border-color: var(--red); }
.q-option.selected {
  border-color: var(--red);
  background: var(--red-t);
}
.q-option.selected .marker {
  border-color: var(--red);
  background: var(--red);
}
.q-option.selected .marker::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--bg-0);
}

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

.q-footer {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.q-footer .hint { color: var(--ink-3); }

/* ============================================================
   色温骤降动画 —— body 上的 filter 驱动
   触发时机: body.draining 类
   ============================================================ */
body.draining {
  animation: drainColor 2.2s cubic-bezier(.55,0,.85,.2) forwards;
}
@keyframes drainColor {
  0%   { filter: saturate(1)    brightness(1)    contrast(1);    }
  30%  { filter: saturate(.6)   brightness(.9)   contrast(1.05); }
  60%  { filter: saturate(.2)   brightness(.55)  contrast(1.1);  }
  100% { filter: saturate(0)    brightness(.05)  contrast(1.3);  }
}

/* ============================================================
   反转页 —— 核心屏幕
   ============================================================ */
#screen-reveal {
  background: #000;
  position: relative;
  justify-content: flex-start;
  padding-top: 100px;
  overflow: hidden;
}
#screen-reveal .container { max-width: 640px; }

.reveal-lines {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}
.reveal-line {
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink-1);
  opacity: 0;
  letter-spacing: .03em;
}
.reveal-line.shown { opacity: 1; }
.reveal-line.pause {
  font-size: clamp(36px, 7vw, 52px);
  color: var(--red);
  font-weight: 600;
  letter-spacing: .15em;
  padding: 14px 0;
  line-height: 1.2;
}
.reveal-line.punch {
  font-size: clamp(28px, 5.5vw, 40px);
  font-weight: 600;
  color: var(--ink-1);
  border-left: 2px solid var(--red);
  padding-left: 18px;
  letter-spacing: .04em;
}
.reveal-line .hl {
  color: var(--red);
  font-weight: 600;
}

.reveal-caret {
  display: inline-block;
  width: 10px;
  height: 1.1em;
  background: var(--red);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s infinite step-end;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.reveal-scan {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: .7;
  top: 20%;
  animation: scan 3.2s var(--ease-2) infinite;
  pointer-events: none;
}
@keyframes scan {
  0%   { top: 0%;   opacity: 0; }
  5%   { opacity: .85; }
  95%  { opacity: .85; }
  100% { top: 100%; opacity: 0; }
}

.black-flash {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.black-flash.show {
  opacity: 1;
  pointer-events: auto;
}

.reveal-meta {
  position: absolute;
  top: 48%;
  right: 20px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  color: rgba(211,47,47,.5);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-transform: uppercase;
  animation: fadeIn 1s 2s var(--ease) forwards;
  opacity: 0;
}
@keyframes fadeIn { to { opacity: 1; } }

.reveal-continue {
  margin-top: 60px;
  opacity: 0;
  transition: opacity .8s var(--ease);
}
.reveal-continue.visible { opacity: 1; }
.reveal-continue button {
  padding: 16px 28px;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  transition: all .3s var(--ease);
}
.reveal-continue button:hover {
  background: var(--red);
  color: #000;
}

/* ============================================================
   风险画像结果页
   ============================================================ */
#screen-result { padding-top: 90px; }
#screen-result .container { max-width: 640px; }

.result-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.result-head .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--red);
  margin-bottom: 10px;
}
.result-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-1);
  margin-bottom: 14px;
  letter-spacing: .02em;
}
.result-head p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.8;
}

.dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 40px;
}
.dim-cell {
  background: var(--bg-1);
  padding: 14px 12px;
  font-family: var(--mono);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dim-cell .name {
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.dim-cell .val {
  font-size: 20px;
  color: var(--ink-1);
  font-weight: 600;
}
.dim-cell .bar {
  height: 2px;
  background: var(--bg-0);
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}
.dim-cell .bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--pct, 0%);
  background: var(--red);
  transition: width 1.2s .3s var(--ease-2);
}

.risk-cards {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 48px;
}
.risk-card {
  border-left: 2px solid var(--red);
  padding: 4px 0 4px 24px;
  position: relative;
}
.risk-card::before {
  content: '';
  position: absolute;
  left: -5px; top: 0;
  width: 8px; height: 8px;
  background: var(--red);
  border: 2px solid var(--bg-0);
}
.risk-card .code {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--red);
  margin-bottom: 8px;
}
.risk-card h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-1);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.risk-card .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .1em;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.risk-card .intro {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 22px;
  font-style: italic;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin-bottom: 18px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  align-items: start;
}
.timeline-row .day {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--red);
  padding-top: 4px;
}
.timeline-row .txt {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* ============================================================
   ★ death_timeline 4 种格式 · 风险卡片里版本
   ============================================================ */

/* 1) notif · 聊天通知整行式 */
.timeline-row-notif {
  display: block;
  grid-template-columns: none;
  padding: 9px 12px;
  margin-bottom: 6px;
  background: rgba(20, 20, 24, 0.04);
  border-left: 2px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.timeline-row-notif .txt {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* 2) cctv · 监控记录式 */
.timeline-row-cctv {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  padding: 5px 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: #6f8a70;
}
.timeline-row-cctv .day {
  color: #d32f2f;
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  padding-top: 2px;
}
.timeline-row-cctv .txt {
  color: #8aa88b;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* 3) countdown · 倒计时式 */
.timeline-row-countdown {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(211, 47, 47, 0.12);
}
.timeline-row-countdown:last-child {
  border-bottom: none;
}
.timeline-row-countdown .day {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--red);
  white-space: nowrap;
}
.timeline-row-countdown .txt {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* 4) compare · 双栏对比式 */
.timeline-row-compare {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 14px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(211, 47, 47, 0.1);
}
.timeline-row-compare:last-child {
  border-bottom: none;
}
.timeline-row-compare .tl-sep {
  display: block;
  width: 1px;
  align-self: stretch;
  background: rgba(211, 47, 47, 0.35);
}
.timeline-row-compare .tl-you {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}
.timeline-row-compare .tl-them {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--red);
  letter-spacing: 0.01em;
  opacity: 0.92;
}

/* 手机端适配 */
@media (max-width: 640px) {
  .timeline-row-notif { font-size: 12px; padding: 8px 10px; }
  .timeline-row-cctv { grid-template-columns: 96px 1fr; gap: 8px; }
  .timeline-row-cctv .day { font-size: 9.5px; }
  .timeline-row-cctv .txt { font-size: 11.5px; line-height: 1.65; }
  .timeline-row-countdown { grid-template-columns: 102px 1fr; gap: 10px; }
  .timeline-row-countdown .day { font-size: 11.5px; }
  .timeline-row-countdown .txt { font-size: 12.5px; line-height: 1.65; }
  .timeline-row-compare { grid-template-columns: 1fr 1px 1fr; gap: 10px; }
  .timeline-row-compare .tl-you,
  .timeline-row-compare .tl-them { font-size: 11.5px; line-height: 1.65; }
}
@media (max-width: 380px) {
  /* 超小屏 · compare 改为两行堆叠 · 但保留"你/他"的颜色区分 */
  .timeline-row-compare {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }
  .timeline-row-compare .tl-sep {
    display: none;
  }
  .timeline-row-compare .tl-them {
    padding-left: 10px;
    border-left: 2px solid rgba(211, 47, 47, 0.5);
  }
}

.tactics {
  margin-top: 14px;
}
.tactics .title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.tactics ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tactics li {
  font-size: 13.5px;
  color: var(--ink-2);
  padding-left: 14px;
  position: relative;
  line-height: 1.7;
}
.tactics li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 1px;
  background: var(--red);
}

/* ============================================================
   行动清单
   ============================================================ */
#screen-action { padding-top: 90px; padding-bottom: 100px; }

.action-head {
  margin-bottom: 42px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.action-head .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--red);
  margin-bottom: 12px;
}
.action-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 5.5vw, 38px);
  font-weight: 500;
  color: var(--ink-1);
  line-height: 1.35;
  letter-spacing: .02em;
}
.action-head h2 em {
  font-style: normal;
  color: var(--red);
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 52px;
}
.action-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.action-item:last-child { border-bottom: none; }
.action-item .num {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--red);
  padding-top: 2px;
  font-weight: 600;
}
.action-item .body h4 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-1);
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.action-item .body p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.hotlines {
  margin-bottom: 48px;
}
.hotlines-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink-3);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.hotlines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.hotline {
  background: var(--bg-1);
  padding: 18px 16px;
  transition: background .25s var(--ease);
}
.hotline:hover { background: var(--bg-2); }
.hotline .num {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--red);
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.hotline .name {
  font-size: 14px;
  color: var(--ink-1);
  margin-bottom: 2px;
}
.hotline .note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .1em;
  line-height: 1.6;
}

.share-box {
  border: 1px solid var(--line);
  padding: 28px 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  position: relative;
}
.share-box::before, .share-box::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--red);
}
.share-box::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.share-box::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.share-title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-1);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.share-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 0 10px;
}
.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.share-btn {
  padding: 12px 20px;
  border: 1px solid var(--ink-2);
  color: var(--ink-1);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: all .3s var(--ease);
}
.share-btn:hover {
  background: var(--ink-1);
  color: var(--bg-0);
}
.share-btn.primary {
  border-color: var(--red);
  color: var(--red);
}
.share-btn.primary:hover {
  background: var(--red);
  color: #000;
}

.restart {
  margin-top: 40px;
  text-align: center;
}
.restart button {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  transition: all .25s var(--ease);
}
.restart button:hover { color: var(--ink-1); border-bottom-color: var(--ink-1); }

/* ============================================================
   分享海报 canvas 容器
   ============================================================ */
.poster-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.poster-modal.active { display: flex; }
.poster-modal .poster-inner {
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.poster-modal canvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #000;
}
.poster-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.poster-actions button {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--ink-2);
  color: var(--ink-1);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.poster-actions button:hover { background: var(--ink-1); color: var(--bg-0); }

/* ============================================================
   移动端调优 · 手机是主要传播场景
   ============================================================ */

/* safe-area 适配 (iPhone 刘海 / Home indicator) */
@supports (padding: max(0px)) {
  .screen {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(48px, env(safe-area-inset-bottom));
  }
  .header {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .progress-wrap {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* ---- 标准 mobile (≤ 480px) ---- */
@media (max-width: 480px) {
  /* 基础布局 */
  .screen { padding: 56px 16px 40px; }
  @supports (padding: max(0px)) {
    .screen {
      padding-left: max(16px, env(safe-area-inset-left));
      padding-right: max(16px, env(safe-area-inset-right));
      padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
  }
  .header { padding: 10px 14px; font-size: 10px; }
  .header .meta { gap: 10px; }
  .progress-wrap { padding: 0 14px; top: 38px; }

  /* 题目页 */
  #screen-quiz { padding-top: 72px; }
  .q-text { font-size: 22px; line-height: 1.4; }
  .q-sub { font-size: 13px; margin-bottom: 24px; }
  .q-option {
    padding: 16px 16px;
    font-size: 15px;
    min-height: 56px;    /* ≥ 44px tap target + 舒适 */
    gap: 12px;
  }
  .q-option .marker { width: 18px; height: 18px; }
  .q-footer { font-size: 9px; margin-top: 28px; padding-top: 14px; }

  /* 反转页 */
  #screen-reveal { padding-top: 80px; }
  .reveal-meta { display: none; }
  .reveal-lines { gap: 16px; margin-top: 28px; }
  .reveal-line { font-size: 18px; line-height: 1.55; }
  .reveal-line.pause { font-size: 30px; letter-spacing: .08em; }
  .reveal-line.punch { font-size: 24px; padding-left: 14px; }
  .reveal-continue { margin-top: 40px; }
  .reveal-continue button {
    padding: 14px 20px;
    font-size: 11px;
    min-height: 46px;
    display: block;
    width: 100%;
  }

  /* 结果页 */
  #screen-result { padding-top: 72px; }
  .result-head { padding-bottom: 22px; margin-bottom: 24px; }
  .result-head h2 { font-size: 22px; line-height: 1.4; }
  .result-head p { font-size: 14px; }
  .dim-grid { grid-template-columns: repeat(3, 1fr); }
  .dim-cell { padding: 12px 8px; }
  .dim-cell .name { font-size: 9px; letter-spacing: .1em; }
  .dim-cell .val { font-size: 18px; }
  .risk-cards { gap: 28px; margin-bottom: 36px; }
  .risk-card { padding-left: 18px; }
  .risk-card h3 { font-size: 22px; }
  .risk-card .sub { font-size: 10px; margin-bottom: 12px; padding-bottom: 12px; }
  .risk-card .intro { font-size: 14px; margin-bottom: 18px; }
  .timeline-row { grid-template-columns: 46px 1fr; gap: 10px; }
  .timeline-row .day { font-size: 10px; }
  .timeline-row .txt { font-size: 13.5px; line-height: 1.7; }
  .tactics li { font-size: 12.5px; }

  /* 行动页 */
  #screen-action { padding-top: 72px; padding-bottom: 80px; }
  .action-head { margin-bottom: 32px; padding-bottom: 22px; }
  .action-head h2 { font-size: 24px; line-height: 1.35; }
  .action-item { grid-template-columns: 38px 1fr; gap: 14px; padding-bottom: 20px; }
  .action-list { gap: 22px; margin-bottom: 40px; }
  .action-item .num { font-size: 13px; }
  .action-item .body h4 { font-size: 17px; }
  .action-item .body p { font-size: 13.5px; line-height: 1.75; }

  /* 电话 grid — 单列 + 放大数字 */
  .hotlines-grid { grid-template-columns: 1fr; }
  .hotline { padding: 16px 14px; min-height: 70px; }
  .hotline .num { font-size: 20px; }
  .hotline .name { font-size: 13.5px; }
  .hotline .note { font-size: 10px; }

  /* 分享盒子 */
  .share-box { padding: 24px 18px; }
  .share-title { font-size: 18px; }
  .share-desc { font-size: 12.5px; padding: 0 4px; }
  .share-buttons { gap: 8px; }
  .share-btn {
    padding: 14px 16px;
    font-size: 11px;
    min-height: 48px;    /* ≥ 44px tap target */
    flex: 1 1 auto;
    min-width: 0;
  }

  .restart { margin-top: 28px; }
  .restart button {
    padding: 14px 24px;
    min-height: 44px;
    font-size: 11px;
  }

  /* 海报 modal */
  .poster-modal { padding: 12px; align-items: center; }
  .poster-modal .poster-inner {
    max-width: 95vw;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    width: 100%;
    gap: 12px;
  }
  .poster-modal canvas {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    object-fit: contain;
  }
  .poster-actions { gap: 8px; }
  .poster-actions button {
    padding: 14px 12px;
    min-height: 48px;
    font-size: 11px;
  }
}

/* ---- 极窄屏 (≤ 360px) —— iPhone 13 mini (375) 走标准 mobile ---- */
@media (max-width: 360px) {
  .screen { padding: 52px 14px 36px; }
  .q-text { font-size: 20px; }
  .q-option { padding: 14px 14px; font-size: 14.5px; min-height: 52px; }

  .reveal-line { font-size: 16.5px; }
  .reveal-line.pause { font-size: 26px; letter-spacing: .06em; }
  .reveal-line.punch { font-size: 21px; }

  .result-head h2 { font-size: 20px; }
  .dim-cell { padding: 10px 6px; }
  .dim-cell .name { font-size: 8.5px; letter-spacing: .08em; }
  .dim-cell .val { font-size: 16px; }

  .action-head h2 { font-size: 21px; }
  .action-item { grid-template-columns: 32px 1fr; gap: 10px; }
  .action-item .body h4 { font-size: 16px; }

  .hotline .num { font-size: 18px; }

  .share-buttons { flex-direction: column; }
  .share-btn { min-width: 100%; }
}

/* ---- 矮屏 iPhone SE-style (≤ 670px 高) ---- */
@media (max-height: 670px) and (max-width: 480px) {
  #screen-quiz, #screen-reveal, #screen-result, #screen-action { padding-top: 64px; }
  .poster-modal .poster-inner { max-height: 94vh; }
  .poster-modal canvas { max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); }
}

@media (min-width: 720px) {
  .container { max-width: 640px; }
  #screen-result .container, #screen-reveal .container { max-width: 720px; }
  .intro-title { max-width: 90%; }
}

/* ---- 通用触屏优化 —— touch/hover 探测 ---- */
@media (hover: none) and (pointer: coarse) {
  /* 触屏设备禁用 hover transform,避免点后按钮卡在 hover 状态 */
  .q-option:hover { transform: none; }
  .intro-cta:hover { transform: none; }
  /* 按钮保持最小 44×44 tap target */
  button, .intro-cta, .q-option, .share-btn, .poster-actions button, .restart button {
    touch-action: manipulation;  /* 去掉点击延迟和双击放大 */
  }
}
