/* ============================================================
   SCL-90 症状自评量表 — 亮色主题
   主色: 蓝绿渐变（健康/医疗感）
   ============================================================ */

:root {
  --primary: #00B894;
  --primary-light: #55EFC4;
  --primary-dark: #00A381;
  --bg: #F0F9F6;
  --card: #FFFFFF;
  --text: #2D3436;
  --text-light: #636E72;
  --border: #E0EDE8;
  --success: #00B894;
  --warning: #FDCB6E;
  --danger: #E74C3C;
  --shadow: 0 4px 24px rgba(0,184,148,0.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --radius: 16px;
  --radius-sm: 10px;
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.page-hidden { display: none !important; }

/* ======== 首页 ======== */
#page-home { min-height: 100vh; display: flex; flex-direction: column; }
.hero {
  text-align: center; padding: 48px 20px 32px;
  background: linear-gradient(135deg, #00B894 0%, #55EFC4 100%);
  color: #fff; border-radius: 0 0 32px 32px;
  position: relative;
}
.hero h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.hero p { font-size: 14px; opacity: 0.9; max-width: 400px; margin: 0 auto; }
.back-home { position:absolute; top:16px; left:16px; color:rgba(255,255,255,.85); text-decoration:none; font-size:14px; font-weight:500; z-index:10; padding:4px 12px; border-radius:20px; background:rgba(255,255,255,.15); backdrop-filter:blur(4px); transition:all .2s; }
.back-home:hover { background:rgba(255,255,255,.25); }
.intro-section { padding: 24px 16px; }
.intro-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.intro-card h3 { font-size: 16px; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.intro-card h3 .icon { font-size: 20px; }
.intro-card p, .intro-card li { font-size: 13px; color: var(--text-light); line-height: 1.8; }
.intro-card ul { padding-left: 16px; }
.intro-card li { margin-bottom: 4px; }

.dim-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.dim-tag {
  padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 500;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--c);
}

.btn-start {
  display: block; width: calc(100% - 32px); max-width: 400px;
  margin: 8px auto 40px; padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border: none; border-radius: 50px;
  font-size: 18px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,184,148,0.35);
  transition: transform 0.2s; letter-spacing: 2px;
}
.btn-start:active { transform: scale(0.97); }

/* ======== 查看历史报告 ======== */
.report-banner {
  margin: 0 16px 12px; max-width: 400px; margin-left: auto; margin-right: auto;
  background: linear-gradient(135deg, #EDFFED, #E5FFE8);
  border: 1px solid #00B89466; border-radius: var(--radius);
  padding: 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  animation: fadeSlideIn .4s ease;
}
.report-banner-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

/* ======== 恢复进度提示 ======== */
.resume-banner {
  margin: 0 16px 12px; max-width: 400px; margin-left: auto; margin-right: auto;
  background: linear-gradient(135deg, #E8FFF0, #E5FFF5);
  border: 1px solid var(--primary-light); border-radius: var(--radius);
  padding: 16px; animation: fadeSlideIn .4s ease;
}
@keyframes fadeSlideIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:none} }
.resume-info { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.resume-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.resume-text { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.resume-text strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.resume-btns { display: flex; gap: 10px; }
.btn-resume {
  flex: 1; padding: 10px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform .2s;
}
.btn-resume:active { transform: scale(.97); }
.btn-resume-discard {
  flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text-light); font-size: 14px; cursor: pointer;
}

/* ======== 答题页 ======== */
#page-test { min-height: 100vh; padding-bottom: 100px; }
.test-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--card); padding: 12px 16px 8px; box-shadow: var(--shadow-sm);
}
.progress-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 13px; color: var(--text-light);
}
.progress-info strong { color: var(--primary); font-size: 15px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px; transition: width 0.4s ease;
}

/* Module progress bar with pie chart */
.module-progress-bar {
  display:flex; align-items:center; gap:14px; margin-bottom:6px;
}
.module-pie-wrap {
  position:relative; width:52px; height:52px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.module-pie-wrap canvas { display:block; }
.module-pie-label {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  font-size:11px; font-weight:700; color:var(--primary); pointer-events:none;
}
.module-progress-info { flex:1; min-width:0; }
.module-progress-title {
  display:flex; align-items:center; gap:8px; margin-bottom:2px;
  font-size:13px; color:var(--text-light);
}
.module-current-name {
  font-size:13px; font-weight:600; color:var(--primary);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:140px;
}
.module-q-num { font-size:12px; color:var(--text-light); }
.module-q-num strong { color:var(--primary); font-size:14px; }
.module-progress-sub {
  font-size:12px; color:var(--text-light); margin-bottom:4px;
}
.module-progress-sub strong { color:var(--primary); font-size:13px; }

.question-area { padding: 24px 0; overflow: hidden; }
.question-card {
  background: var(--card); border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow-sm);
  animation: fadeUp 0.3s ease;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
.q-badge {
  display: inline-block; padding: 4px 14px; border-radius: 50px;
  font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.q-text { font-size: 14px; line-height: 1.7; margin-bottom: 8px; color: var(--text-light); }
.q-symptom {
  font-size: 20px; line-height: 1.6; margin-bottom: 20px; font-weight: 600;
  color: var(--text); padding: 12px 16px; background: var(--bg);
  border-radius: var(--radius-sm); border-left: 4px solid var(--primary);
}

/* Option buttons — 5 level */
.options-wrap { display: flex; flex-direction: column; gap: 8px; }
.option-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px;
  background: var(--bg); border: 2px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 15px; color: var(--text); transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.option-btn:active { transform: scale(0.98); }
.option-btn.selected {
  border-color: var(--primary); background: rgba(0,184,148,0.08);
}
.option-circle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-light);
  flex-shrink: 0; transition: all 0.2s;
}
.option-btn.selected .option-circle {
  border-color: var(--primary); background: var(--primary); color: #fff;
}
.option-text { font-weight: 600; min-width: 40px; }
.option-desc { font-size: 12px; color: var(--text-light); }

.test-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card); padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  display: flex; gap: 12px; z-index: 100;
}
.test-nav button {
  flex: 1; padding: 12px; border-radius: 12px; font-size: 15px;
  font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
}
.btn-prev { background: var(--border); color: var(--text-light); }
.btn-next {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff;
  box-shadow: 0 4px 12px rgba(0,184,148,0.3);
}
.btn-prev:disabled, .btn-next:disabled { opacity: 0.5; pointer-events: none; }

/* ======== 答题卡浮标 ======== */
.answer-sheet-fab {
  position: fixed; right: 16px; bottom: 90px;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,184,148,.4); cursor: pointer; z-index: 9000;
  -webkit-tap-highlight-color: transparent; transition: transform .2s;
}
.answer-sheet-fab:active { transform: scale(.9); }
.fab-icon { font-size: 20px; }
.fab-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: #E74C3C; color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.fab-badge.all-done { background: var(--success); }

/* ======== 答题卡面板 ======== */
.answer-sheet-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45); z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
}
.answer-sheet-panel {
  width: 100%; max-width: 520px; max-height: 70vh;
  background: var(--card); border-radius: 20px 20px 0 0;
  padding: 20px 16px; padding-bottom: max(20px, env(safe-area-inset-bottom));
  overflow-y: auto; animation: slideUp .25s ease;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:none} }
.answer-sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.answer-sheet-title { font-size: 16px; font-weight: 700; }
.answer-sheet-stats { font-size: 12px; color: var(--text-light); }
.answer-sheet-close { background: none; border: none; font-size: 22px; color: var(--text-light); cursor: pointer; }
.answer-sheet-legend { display: flex; gap: 16px; margin-bottom: 12px; font-size: 12px; color: var(--text-light); }
.legend-item { display: flex; align-items: center; gap: 4px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-done { background: var(--primary); }
.legend-undone { background: var(--border); }
.answer-sheet-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-bottom: 16px; }
.sheet-cell {
  width: 100%; aspect-ratio: 1; border-radius: 6px; border: none;
  font-size: 11px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s; -webkit-tap-highlight-color: transparent;
}
.sheet-cell:active { transform: scale(.88); }
.sheet-cell.cell-done { background: var(--primary); color: #fff; }
.sheet-cell.cell-undone { background: var(--border); color: var(--text-light); }
.sheet-cell.cell-current { box-shadow: 0 0 0 2px var(--primary); }
.answer-sheet-jump-btn {
  width: 100%; padding: 12px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.answer-sheet-jump-btn:disabled { opacity: .5; pointer-events: none; }

/* ======== 确认提交弹窗 ======== */
.confirm-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.confirm-modal {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  max-width: 360px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: modalIn .25s ease;
}
@keyframes modalIn { from{opacity:0;transform:translateY(20px)scale(.95)} to{opacity:1;transform:none} }
.confirm-modal h3 { font-size: 18px; margin-bottom: 12px; }
.confirm-modal p { font-size: 14px; color: var(--text-light); margin-bottom: 20px; line-height: 1.6; }
.confirm-btns { display: flex; gap: 10px; }
.btn-confirm-cancel {
  flex: 1; padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--card); color: var(--text-light);
  font-size: 14px; cursor: pointer;
}
.btn-confirm-ok {
  flex: 1; padding: 12px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* ======== 报告页 ======== */
#page-report { min-height: 100vh; padding-bottom: 40px; }
.report-hero {
  text-align: center; padding: 52px 20px 36px;
  background: linear-gradient(135deg, #00A381 0%, #00B894 35%, #55EFC4 70%, #81ECEC 100%);
  color: #fff; border-radius: 0 0 36px 36px;
  position: relative; overflow: hidden;
}
.report-hero::before { content:''; position:absolute; top:-80px; right:-60px; width:240px; height:240px; background:rgba(255,255,255,.08); border-radius:50%; animation: heroFloat 6s ease-in-out infinite; }
.report-hero::after { content:''; position:absolute; bottom:-50px; left:-40px; width:180px; height:180px; background:rgba(255,255,255,.05); border-radius:50%; animation: heroFloat 8s ease-in-out infinite reverse; }
@keyframes heroFloat { 0%,100%{transform:translate(0,0)} 50%{transform:translate(10px,-15px)} }
.report-hero h2 { font-size: 26px; margin-bottom: 8px; position:relative; z-index:1; font-weight:800; letter-spacing:1px; }
.report-hero p { font-size: 13px; opacity: 0.85; position:relative; z-index:1; }
.report-section {
  margin: 16px; background: var(--card); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.report-section::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:linear-gradient(90deg, var(--primary), var(--primary-light), #81ECEC); opacity:0; transition:opacity .3s; }
.report-section:hover { box-shadow: 0 4px 20px rgba(0,184,148,.1); transform: translateY(-1px); }
.report-section:hover::before { opacity: 1; }
.report-section h3 {
  font-size: 17px; margin-bottom: 8px; display: flex;
  align-items: center; gap: 8px; color: var(--text); font-weight: 700;
}
.report-section h3 .icon { font-size: 20px; }
.section-subtitle { font-size: 12px; color: var(--text-light); margin-bottom: 16px; line-height: 1.6; }

/* ======== 信息徽章栏 ======== */
.report-info-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-top: 14px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(0,184,148,.08), rgba(85,239,196,.08));
  border-radius: 12px;
  border: 1px solid rgba(0,184,148,.12);
}
.report-info-badges::-webkit-scrollbar { display: none; }
.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(0,184,148,.85);
  white-space: nowrap;
}
.info-badge-icon { font-size: 12px; opacity: .85; }
.info-badge-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(0,184,148,.3); flex-shrink: 0;
  font-size: 0; color: transparent; overflow: hidden;
}

/* ======== 模块覆盖卡片 ======== */
.report-module-card {
  margin-top: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(0,184,148,.05), rgba(85,239,196,.05));
  border-radius: 14px;
  border: 1px solid rgba(0,184,148,.1);
  display: flex;
  align-items: center;
  gap: 16px;
}
.module-card-left { flex-shrink: 0; }
.module-card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(0,184,148,.12), rgba(85,239,196,.08));
  border-radius: 50%;
}
.module-card-right { flex: 1; min-width: 0; }
.module-card-title {
  font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.module-card-title strong { color: var(--primary); font-size: 16px; }
.module-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.module-tag {
  display: inline-flex; align-items: center;
  font-size: 11px; color: var(--text-light);
  background: rgba(0,184,148,.06);
  padding: 3px 10px; border-radius: 50px;
  white-space: nowrap;
}

/* ======== 完成时间 ======== */
.report-complete-time {
  margin-top: 12px; margin-bottom: 4px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(0,184,148,.04);
  border: 1px solid rgba(0,184,148,.08);
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: #999; line-height: 1.5;
}
.report-complete-time:empty { display: none; }
.report-complete-time .time-icon { font-size: 13px; flex-shrink: 0; opacity: .7; }


/* Overall card summary */
.overall-summary {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg); text-align: left;
}
.summary-line {
  font-size: 13px; color: var(--text-light); line-height: 2;
}
.summary-line strong { color: var(--text); }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card {
  padding: 16px; border-radius: var(--radius-sm); background: var(--bg);
  border: 1px solid var(--border); text-align: center;
  transition: border-color .3s;
}
.stat-card.stat-flagged { border-color: #E74C3C; background: rgba(231,76,60,0.06); border-left: 3px solid #E74C3C; }
.stat-icon { font-size: 24px; margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat-card.stat-flagged .stat-value { color: #E74C3C; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; }
.stat-sub { font-size: 11px; color: var(--text-light); }

/* Conclusion box */
.conclusion-box {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
}
.conclusion-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.conclusion-item {
  font-size: 13px; color: var(--text-light); line-height: 1.8;
  display: flex; align-items: flex-start; gap: 8px;
}
.conclusion-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 7px;
}

/* Key findings */
.finding-card {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg); border-left: 4px solid var(--primary);
  margin-bottom: 10px;
}
.finding-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.finding-icon { font-size: 20px; flex-shrink: 0; }
.finding-title { font-size: 14px; color: var(--text); }
.finding-desc { font-size: 13px; color: var(--text-light); line-height: 1.8; }

/* Warning box */
.warning-box {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(231,76,60,0.06); border: 1px solid rgba(231,76,60,0.2);
}
.warning-item { font-size: 13px; color: #E74C3C; line-height: 1.8; font-weight: 500; }

/* Factor ranking */
.factor-rank-item {
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.factor-rank-item:last-child { border-bottom: none; }
.factor-rank-item.factor-flagged { padding: 12px; margin: 0 -4px; border-radius: var(--radius-sm); background: rgba(231,76,60,0.03); border-bottom: none; margin-bottom: 4px; }
.factor-rank-left { display: flex; align-items: center; gap: 8px; }
.factor-icon { font-size: 18px; }
.factor-name-wrap { display: flex; flex-direction: column; }
.factor-name { font-size: 14px; font-weight: 600; }
.factor-norm-note { font-size: 11px; }
.factor-rank-right { display: flex; align-items: center; gap: 8px; float: right; margin-top: -32px; }
.factor-level { font-size: 12px; font-weight: 600; }
.factor-score { font-size: 16px; font-weight: 800; color: var(--text); min-width: 44px; text-align: right; }
.factor-bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: visible; margin-top: 6px; position: relative; }
.factor-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.factor-norm-line {
  position: absolute; top: -3px; width: 2px; height: 12px;
  background: #95A5A6; border-radius: 1px;
}
.factor-interpret {
  font-size: 12px; color: var(--text-light); line-height: 1.7;
  margin-top: 6px; padding: 8px 10px; background: rgba(0,0,0,0.02);
  border-radius: 6px;
}

/* Symptom analysis */
.symptom-group { margin-bottom: 16px; }
.symptom-group:last-child { margin-bottom: 0; }
.symptom-group-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 600; padding: 8px 12px;
  border-left: 3px solid var(--primary); background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 8px;
}
.symptom-count { font-size: 12px; color: var(--text-light); font-weight: 500; }
.symptom-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.symptom-item:last-child { border-bottom: none; }
.symptom-q { font-size: 13px; color: var(--text); flex: 1; display: flex; align-items: center; gap: 8px; }
.symptom-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; background: var(--border);
  font-size: 11px; font-weight: 700; color: var(--text-light); flex-shrink: 0;
}
.symptom-sev {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 50px; border: 1px solid; flex-shrink: 0;
}

/* Norm comparison */
.norm-summary {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg); margin-bottom: 16px;
}
.norm-summary-item { font-size: 13px; line-height: 1.8; color: var(--text-light); }
.norm-summary-item.norm-higher { color: #C0392B; }
.norm-summary-item.norm-lower { color: #27AE60; }
.norm-summary-item.norm-normal { color: var(--success); }
.norm-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.norm-item:last-child { border-bottom: none; }
.norm-item.norm-item-flagged { padding: 10px; margin: 0 -4px; background: rgba(231,76,60,0.03); border-radius: var(--radius-sm); border-bottom: none; margin-bottom: 4px; }
.norm-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.norm-bars { display: flex; flex-direction: column; gap: 4px; }
.norm-bar-row { display: flex; align-items: center; gap: 8px; }
.norm-label { font-size: 11px; color: var(--text-light); min-width: 28px; }
.norm-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.norm-bar-fill { height: 100%; border-radius: 4px; transition: width 1s ease; }
.norm-bar-ref { background: #B0BEC5; }
.norm-val { font-size: 11px; color: var(--text-light); min-width: 32px; text-align: right; }

/* Abnormal detail cards */
.abnormal-card {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 12px; border-left: 4px solid var(--primary);
}
.abnormal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.abnormal-desc { font-size: 13px; color: var(--text-light); line-height: 1.8; margin-bottom: 10px; }
.abnormal-symptom { font-size: 13px; color: var(--text-light); line-height: 1.8; margin-bottom: 10px; padding: 10px; background: rgba(0,0,0,0.02); border-radius: 8px; }
.abnormal-advice { font-size: 13px; color: var(--text-light); line-height: 1.8; }
.abnormal-advice ul { padding-left: 16px; margin-top: 4px; }
.abnormal-advice li { margin-bottom: 4px; }

/* Advice section */
.advice-section { margin-bottom: 16px; }
.advice-section:last-of-type { margin-bottom: 0; }
.advice-section-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.advice-list { list-style: none; padding: 0; }
.advice-list li {
  padding: 10px 0; font-size: 13px; color: var(--text-light);
  border-bottom: 1px solid var(--border); line-height: 1.8;
  padding-left: 16px; position: relative;
}
.advice-list li::before {
  content: ''; position: absolute; left: 0; top: 16px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}
.advice-list li:last-child { border-bottom: none; }
.factor-advice-card {
  padding: 12px 16px; background: var(--bg); border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.factor-advice-header { font-size: 14px; margin-bottom: 6px; }
.factor-advice-text { font-size: 13px; color: var(--text-light); line-height: 1.8; }

/* Disclaimer */
.disclaimer {
  margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(0,184,148,0.06); border: 1px solid rgba(0,184,148,0.2);
  font-size: 12px; color: var(--text-light); line-height: 1.7;
}

/* Hotline box */
.hotline-box {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(52,152,219,0.06); border: 1px solid rgba(52,152,219,0.2);
}
.hotline-title { font-size: 14px; font-weight: 700; color: #2C3E50; margin-bottom: 8px; }
.hotline-item { font-size: 13px; color: var(--text-light); line-height: 1.8; }
.hotline-item strong { color: #3498DB; }

.btn-restart {
  display: block; width: calc(100% - 32px); max-width: 400px;
  margin: 32px auto; padding: 16px; background: var(--card);
  color: var(--primary); border: 2px solid var(--primary);
  border-radius: 50px; font-size: 16px; font-weight: 600; cursor: pointer;
  position: relative; overflow: hidden; transition: all .3s;
}
.btn-restart::before { content:''; position:absolute; top:0; left:-100%; width:100%; height:100%; background:linear-gradient(90deg,transparent,rgba(0,184,148,.06),transparent); transition:left .5s; }
.btn-restart:hover::before { left:100%; }
.btn-restart:hover { border-color:var(--primary-dark); box-shadow:0 4px 16px rgba(0,184,148,.15); }
.btn-restart:active { background: rgba(0,184,148,0.06); transform: scale(0.97); }

/* Canvas card */
#persona-card-wrapper { display: flex; justify-content: center; overflow: hidden; border-radius: var(--radius-sm); margin-bottom: 16px; }
#persona-card-canvas { width: 100%; max-width: 420px; height: auto; border-radius: var(--radius-sm); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.btn-save-card {
  display: block; width: 100%; padding: 14px;
  background: linear-gradient(135deg, #00B894, #55EFC4);
  color: #fff; border: none; border-radius: 50px;
  font-size: 16px; font-weight: 600; cursor: pointer;
}

/* ======== 模块化答题样式 ======== */

/* 模块头部容器 */
.module-header {
  padding: 10px 16px 0;
  max-width: 720px;
  margin: 0 auto;
  min-height: 0;
  overflow: hidden;
}
.module-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.module-header-slide {
  animation: moduleHeaderSlide .35s cubic-bezier(.4,0,.2,1);
}
@keyframes moduleHeaderSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* 模块徽标 */
.module-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1.5px solid;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.module-badge-icon { font-size: 16px; }
.module-badge-name { font-weight: 700; }
.module-badge-count {
  font-size: 11px;
  opacity: 0.6;
  font-weight: 500;
  margin-left: 2px;
}

/* 模块进度点 */
.module-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.module-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E0EDE8;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}
.module-dot.active {
  width: 20px;
  border-radius: 4px;
  transform: scale(1.1);
}
.module-dot.done {
  opacity: 0.7;
}

/* 模块内题号 */
.module-q-num {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 700;
  margin-bottom: 10px;
}
.module-q-num-cur {
  font-size: 28px;
  line-height: 1;
}
.module-q-num-sep {
  font-size: 16px;
  opacity: 0.4;
  margin: 0 2px;
}
.module-q-num-total {
  font-size: 16px;
  opacity: 0.5;
}

/* 题目卡片（模块模式） */
.module-question-card {
  /* 继承 .question-card 样式，额外添加 */
}

/* 滑动动画 */
.question-card {
  transition: none;
}
.slide-out-left {
  animation: slideOutLeft .12s cubic-bezier(.4,0,.2,1) forwards;
}
.slide-out-right {
  animation: slideOutRight .12s cubic-bezier(.4,0,.2,1) forwards;
}
.slide-in-right {
  animation: slideInRight .15s cubic-bezier(.4,0,.2,1) forwards;
}
.slide-in-left {
  animation: slideInLeft .15s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* 答题卡模块标签 */
.sheet-module-label {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 4px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.sheet-module-count {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.6;
}

/* 全局进度提示 */
.progress-global-hint {
  font-size: 11px;
  color: var(--text-light);
  opacity: 0.7;
  margin-left: 8px;
  font-weight: 400;
}

/* ======== 响应式 ======== */
@media (max-width: 374px) {
  .hero h1 { font-size: 22px; }
  .q-symptom { font-size: 17px; }
}
@media (min-width: 768px) {
  .container { padding: 0 24px; }
  .hero { padding: 60px 40px 44px; border-radius: 0 0 48px 48px; }
  .hero h1 { font-size: 32px; }
  .report-hero { padding: 64px 40px 44px; border-radius: 0 0 48px 48px; }
  .report-hero h2 { font-size: 32px; }
  .report-section { padding: 28px; margin: 20px; border-radius: 20px; }
}
