/* 专注力测评模块样式（极简、无干扰，与主站紫色+金色基调一致） */
#assess-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: #faf8ff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
}
#assess-overlay[hidden] { display: none; }

.as-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #ece5f7;
  flex-shrink: 0;
}
.as-topbar-title { font-size: 15px; font-weight: 700; color: #4a3a6b; }
.as-exit {
  border: none;
  background: none;
  color: #9a8fb5;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
}
.as-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 18px 32px;
  -webkit-overflow-scrolling: touch;
}
.as-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 4px 24px rgba(124, 92, 191, 0.08);
  margin-bottom: 14px;
}
.as-h1 { font-size: 20px; font-weight: 800; color: #3d2d5c; margin: 0 0 8px; text-align: center; }
.as-h2 { font-size: 16px; font-weight: 700; color: #4a3a6b; margin: 0 0 10px; }
.as-p { font-size: 14px; color: #6b5f85; line-height: 1.7; margin: 6px 0; }
.as-p-small { font-size: 12px; color: #9a8fb5; line-height: 1.6; margin: 8px 0; }

/* 每关开始前的图文说明 */
.as-brief-demo {
  width: min(100%, 340px);
  margin: 10px auto 12px;
}
.as-brief-demo svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--as-line);
  border-radius: 14px;
  background: var(--as-bg-soft);
}
.as-brief-steps {
  max-width: 340px;
  margin: 2px auto 10px;
  padding: 0;
  list-style: none;
  counter-reset: asStep;
  text-align: left;
}
.as-brief-steps li {
  counter-increment: asStep;
  display: flex;
  gap: 9px;
  margin: 7px 0;
  font-size: 13px;
  color: var(--as-text);
  line-height: 1.55;
}
.as-brief-steps li::before {
  content: counter(asStep);
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--as-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.as-center { text-align: center; }

/* 测评说明页 */
.as-h2-tight { margin-top: 18px; margin-bottom: 8px; }
.as-list {
  margin: 8px 0 8px 4px;
  padding-left: 18px;
}
.as-list li {
  font-size: 14px;
  color: #6b5f85;
  line-height: 1.75;
  margin-bottom: 6px;
}
.as-notice {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(124, 92, 191, 0.08), rgba(127, 216, 192, 0.10));
  border: 1px solid rgba(124, 92, 191, 0.18);
}
.as-notice .as-p { margin: 8px 0; }

/* 年龄选择 */
.as-age-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.as-age-btn {
  border: 2px solid #e3daf2;
  background: #fbfaff;
  border-radius: 12px;
  padding: 14px 8px;
  font-size: 15px;
  font-weight: 700;
  color: #5a4a7d;
  cursor: pointer;
  transition: all 0.15s;
}
.as-age-btn.selected {
  border-color: #7c5cbf;
  background: #f0eafa;
  color: #5a3fa0;
}

/* 准备清单 */
.as-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid #ece5f7;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.as-check-item.checked { border-color: #7fd8c0; background: #f2fbf8; }
.as-check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #cbbfe0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  margin-top: 1px;
}
.as-check-item.checked .as-check-box { background: #5ec4a8; border-color: #5ec4a8; }
.as-check-text { font-size: 14px; color: #4a3a6b; line-height: 1.5; }
.as-check-text strong { color: #3d2d5c; }

/* 按钮 */
.as-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.as-btn-primary { background: #7c5cbf; color: #fff; }
.as-btn-primary:disabled { background: #d6cdee; cursor: not-allowed; }
.as-btn-ghost { background: #f3effa; color: #6b5f85; margin-top: 10px; }
.as-btn-row { display: flex; gap: 10px; }
.as-btn-row .as-btn { margin-top: 0; }

/* 任务舞台：统一三段式骨架（顶部提示条 → 刺激区 → 底部操作/提示区） */
.as-stage {
  width: 100%;
  max-width: 560px;
  flex: 0 1 auto;
  min-height: 320px;
  margin-block: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(124, 92, 191, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 34px 14px 14px;
  position: relative;
  user-select: none;
  touch-action: manipulation;
}
/* 顶部：规则标签 / 目标提示（固定高度，各关位置一致） */
.as-task-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}
/* 中部：刺激呈现区（吃掉剩余空间并居中内容） */
.as-task-arena {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: manipulation;
}
/* 色字拦截：规则标签紧贴色字上方，舞台高度随内容，不写死 */
.as-stage-stroop {
  padding-top: 22px;
  padding-bottom: 22px;
}
.as-stroop-arena {
  flex: 0 1 auto;
  flex-direction: column;
  gap: 24px;
  padding: 18px 0;
}
.as-stroop-arena .as-rule-tag {
  flex-shrink: 0;
}
/* 底部：操作按钮 / 轻提示（固定高度，各关位置一致） */
.as-task-foot {
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.as-stim-dot {
  border-radius: 50%;
  background: #7c5cbf;
  transition: none;
}
.as-tap-ring {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid rgba(124, 92, 191, 0.45);
  border-radius: 50%;
  pointer-events: none;
  animation: as-tap-ring 0.42s ease-out forwards;
}
@keyframes as-tap-ring {
  from { opacity: 0.9; transform: scale(0.5); }
  to { opacity: 0; transform: scale(1.7); }
}
.as-stim-word {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 4px;
}
.as-stim-digit {
  font-size: 72px;
  font-weight: 800;
  color: #4a3a6b;
}
.as-color-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 0;
  flex-wrap: wrap;
}
.as-color-btn {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  border: 3px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  transition: transform 0.1s;
}
.as-color-btn:active { transform: scale(0.94); }

/* Stroop 规则提示标签 */
.as-rule-tag {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: #7c5cbf;
  letter-spacing: 2px;
}
.as-rule-tag.as-rule-word {
  background: #e08a3a;
}

/* 多球追踪（MOT） */
.as-mot-hint {
  font-size: 15px;
  font-weight: 700;
  color: #4b3a68;
  text-align: center;
}
.as-mot-canvas {
  width: 100%;
  height: clamp(320px, 52vh, 560px);
  min-height: 260px;
  background: #f6f2fc;
  border-radius: 16px;
  border: 2px solid #e4dbf2;
  touch-action: none;
  cursor: pointer;
}

/* 细节猎人（限时视觉搜索） */
.as-search-target {
  font-size: 17px;
  font-weight: 800;
  color: #4b3a68;
  text-align: center;
}
.as-search-target b {
  color: #7c5cbf;
  font-size: 24px;
  margin: 0 2px;
}
.as-search-grid {
  display: grid;
  gap: 7px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.as-search-cell {
  aspect-ratio: 1 / 1;
  font-size: clamp(17px, 4.5vw, 24px);
  font-weight: 800;
  background: #fff;
  border: 2px solid #d9cdee;
  border-radius: 10px;
  color: #2a2333;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.1s ease;
}
.as-search-cell:active { transform: scale(0.92); }
.as-search-cell.found {
  background: rgba(63, 174, 106, 0.15);
  border-color: #3fae6a;
  color: #3fae6a;
  pointer-events: none;
}
.as-search-cell.wrong {
  border-color: #e05a5a;
  color: #e05a5a;
  animation: asSearchShake 0.25s ease;
}
@keyframes asSearchShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 积木回忆（Corsi） */
.as-corsi-grid {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}
.as-corsi-block {
  aspect-ratio: 1 / 1;
  border: 4px solid;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.12s ease;
  padding: 0;
}
.as-corsi-block:active { transform: scale(0.92); }
.as-corsi-block.as-corsi-active {
  background: var(--corsi-c) !important;
  border-color: #fff;
  filter: brightness(1.02) saturate(1.55);
  transform: scale(1.12);
  box-shadow: 0 0 0 4px #fff, 0 0 30px var(--corsi-c);
}
.as-corsi-show .as-corsi-block {
  pointer-events: none; /* 演示阶段禁止点击 */
}

.as-task-progress {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  height: 5px;
  border-radius: 3px;
  background: #ece5f7;
  overflow: hidden;
}
.as-task-progress i {
  display: block;
  height: 100%;
  background: #7fd8c0;
  border-radius: 3px;
  transition: width 0.2s linear;
}
.as-tap-hint {
  text-align: center;
  font-size: 13px;
  color: #b3a7cc;
  pointer-events: none;
}

/* 指标明细 */
.as-ind-group { margin-top: 12px; }
.as-ind-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  color: #7c5cbf;
}
.as-ind-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.as-ind-table td {
  padding: 7px 2px;
  border-bottom: 1px dashed #efe6fa;
  color: #4b3a68;
  vertical-align: top;
}
.as-ind-table tr:last-child td { border-bottom: none; }
.as-ind-table td:last-child {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  padding-left: 10px;
}
.as-ind-unit {
  font-size: 11px;
  font-weight: 400;
  color: #b3a7cc;
  margin-left: 2px;
}
.as-ind-note {
  display: block;
  font-size: 11px;
  color: #b3a7cc;
  font-weight: 400;
  margin-top: 1px;
}

/* 智能分析报告 */
.as-ai-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0e9fb;
  color: #7c5cbf;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 2px;
}
.as-ai-body .as-ai-p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.9;
  color: #4b3a68;
}
.as-ai-body .as-ai-p:last-child { margin-bottom: 0; }
.as-ai-loading {
  text-align: center;
  color: #b3a7cc;
  font-size: 13px;
  padding: 18px 0;
  animation: as-ai-breathe 1.6s ease-in-out infinite;
}
@keyframes as-ai-breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* ============ 报告页：专业层级样式 ============ */
:root {
  --as-primary: #7c5cbf;
  --as-accent: #c9a962;
  --as-text: #3d2d5c;
  --as-muted: #9a8fb5;
  --as-line: #efe8fb;
  --as-ok: #3fae6a;
  --as-warn: #e05a5a;
  --as-bg-soft: #f8f5ff;
}

/* 卡片统一骨架（顶部标签 + 标题 = 清晰层级） */
.as-card-pro {
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 2px 12px rgba(124, 92, 191, 0.06);
  border: 1px solid #f1ebfa;
  position: relative;
}
.as-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--as-line);
}
.as-card-head-center {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.as-card-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--as-primary);
  background: #f0e9fb;
  border-radius: 4px;
  padding: 2px 8px;
  flex-shrink: 0;
}
.as-card-tag-hero {
  font-size: 11px;
  background: var(--as-primary);
  color: #fff;
  padding: 3px 10px;
  margin-bottom: 4px;
}
.as-card-tag-ai {
  background: linear-gradient(135deg, #7c5cbf, #c9a962);
  color: #fff;
}

/* 警示横幅 */
.as-report-alert {
  background: #fff9ec;
  border-left: 3px solid var(--as-accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: #7a6532;
  margin-bottom: 14px;
}
.as-report-alert strong { color: #5a4820; }

/* Hero 卡 */
.as-card-hero {
  padding-top: 22px;
}
.as-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--as-line);
}
.as-hero-score { flex: 1; text-align: center; }
.as-hero-num {
  font-size: 64px;
  font-weight: 800;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--as-primary);
  line-height: 1;
  letter-spacing: -2px;
}
.as-hero-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--as-muted);
  letter-spacing: 3px;
  margin-top: 6px;
}
.as-hero-band {
  text-align: center;
  min-width: 92px;
}
.as-band-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.as-band-a { background: linear-gradient(135deg, #3fae6a, #5fc488); }
.as-band-b { background: linear-gradient(135deg, #7c5cbf, #9d7fd8); }
.as-band-c { background: linear-gradient(135deg, #e08a3a, #f0a862); }
.as-band-d { background: linear-gradient(135deg, #e05a5a, #f07a7a); }
.as-band-label { font-size: 12px; font-weight: 700; color: var(--as-text); margin-top: 6px; }
.as-band-ref { font-size: 11px; color: var(--as-muted); margin-top: 2px; }

/* 五维得分（进度条按分数分档着色，tabular-nums 对齐） */
.as-dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
}
.as-dim-label {
  width: 66px;
  font-size: 13px;
  color: #5a4a7d;
  font-weight: 700;
  flex-shrink: 0;
}
.as-dim-bar {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: #f1ebfa;
  overflow: hidden;
  position: relative;
}
.as-dim-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  min-width: 2px;
  transition: width 0.6s ease;
}
.as-dim-val {
  width: 34px;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 复测变化（对比式排版） */
.as-rci-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
}
.as-rci-side {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  background: var(--as-bg-soft);
  border-radius: 10px;
  border: 1px solid var(--as-line);
}
.as-rci-date {
  display: block;
  font-size: 11px;
  color: var(--as-muted);
  margin-bottom: 4px;
}
.as-rci-score {
  display: block;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--as-primary);
  line-height: 1.1;
}
.as-rci-arrow {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.as-rci-arrow.up {
  color: var(--as-ok);
  background: rgba(63, 174, 106, 0.1);
}
.as-rci-arrow.down {
  color: var(--as-warn);
  background: rgba(224, 90, 90, 0.1);
}

/* 智能分析卡 */
.as-ai-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0e9fb;
  color: var(--as-primary);
  font-size: 11px;
  font-weight: 700;
}

/* 指标明细表（紧凑，专业感） */
.as-ind-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--as-line);
}
.as-ind-group:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.as-ind-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--as-primary);
  letter-spacing: 1px;
}
.as-ind-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.as-ind-table td {
  padding: 5px 2px;
  border-bottom: 1px dashed #f3edfc;
  color: #4b3a68;
  vertical-align: top;
}
.as-ind-table tr:last-child td { border-bottom: none; }
.as-ind-table td:last-child {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 10px;
  color: var(--as-text);
}
.as-ind-unit {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--as-muted);
  margin-left: 2px;
}
.as-ind-note {
  display: block;
  font-size: 10.5px;
  color: var(--as-muted);
  font-weight: 400;
  margin-top: 1px;
  line-height: 1.4;
}

/* 指标红黄绿标注 */
.as-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 8px 10px;
  margin-bottom: 4px;
  background: #fbf9fe;
  border-radius: 8px;
  font-size: 11px;
  color: var(--as-muted);
}
.as-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.as-ind-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
  flex-shrink: 0;
}
.as-legend .as-ind-dot { margin-right: 0; }
.as-dot-ok { background: var(--as-ok); box-shadow: 0 0 0 2px rgba(63, 174, 106, 0.15); }
.as-dot-warn { background: #e8a33a; box-shadow: 0 0 0 2px rgba(232, 163, 58, 0.15); }
.as-dot-bad { background: var(--as-warn); box-shadow: 0 0 0 2px rgba(224, 90, 90, 0.15); }
.as-dot-none { background: #d8d0e8; }
.as-ind-table td.as-ind-val.as-val-ok { color: var(--as-ok); }
.as-ind-table td.as-ind-val.as-val-warn { color: #d18f20; }
.as-ind-table td.as-ind-val.as-val-bad { color: var(--as-warn); }

/* AI 正文 */
.as-ai-body .as-ai-p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.95;
  color: #4b3a68;
}
.as-ai-body .as-ai-p:last-child { margin-bottom: 0; }
.as-ai-loading {
  text-align: center;
  color: var(--as-muted);
  font-size: 13px;
  padding: 18px 0;
  animation: as-ai-breathe 1.6s ease-in-out infinite;
}
@keyframes as-ai-breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* 专业免责声明 */
.as-disclaimer-pro {
  background: #f7f5fb;
  border: 1px solid #ebe3f8;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12px;
  color: #6a5b8a;
  line-height: 1.75;
  margin-top: 8px;
}
.as-disclaimer-pro p { margin: 6px 0; }
.as-disclaimer-pro p:first-of-type { margin-top: 8px; }
.as-disc-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--as-primary);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.as-disclaimer-pro strong { color: var(--as-warn); }

/* 按钮区 */
.as-card-actions {
  padding: 18px 18px 14px;
}

/* 移动端收紧 Hero */
@media (max-width: 420px) {
  .as-hero-num { font-size: 52px; letter-spacing: -1px; }
  .as-band-letter { width: 44px; height: 44px; font-size: 22px; }
  .as-dim-label { width: 56px; font-size: 12px; }
}


@media (max-width: 420px) {
  .as-stim-word { font-size: 52px; }
  .as-stim-digit { font-size: 60px; }
  .as-color-btn { width: 64px; height: 64px; }
}
