/* 心语测评 · 公共核心库样式 core.css v1.0
 * 所有类名带 psy-core- 前缀，仅作用于新测试页面，不污染旧 JSP。
 */

/* ===== 答题壳 ===== */
.psy-core-question { background:#fff; border-radius:16px; box-shadow:0 4px 20px rgba(0,0,0,.06); padding:24px; margin-bottom:16px; }
.psy-core-qhead { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.psy-core-qnum { font-size:12px; font-weight:600; color:#fff; background:#6366f1; border-radius:999px; padding:2px 10px; }
.psy-core-qdim { font-size:12px; color:#94a3b8; }
.psy-core-qtext { font-size:17px; font-weight:600; color:#1f2937; line-height:1.6; margin-bottom:20px; }

.psy-core-options { display:flex; flex-direction:column; gap:10px; }
.psy-core-option { display:flex; align-items:center; gap:10px; padding:12px 16px; border:2px solid #e2e8f0; border-radius:12px; cursor:pointer; transition:all .15s; background:#fff; touch-action:manipulation; -webkit-tap-highlight-color:rgba(99,102,241,.12); }
.psy-core-option:hover { border-color:#c7d2fe; background:#f8fafc; }
.psy-core-option-sel { border-color:#6366f1; background:#eef2ff; }
.psy-core-radio { width:18px; height:18px; border:2px solid #cbd5e1; border-radius:50%; flex-shrink:0; position:relative; }
.psy-core-option-sel .psy-core-radio { border-color:#6366f1; }
.psy-core-option-sel .psy-core-radio::after { content:''; position:absolute; inset:3px; background:#6366f1; border-radius:50%; }
.psy-core-option-text { font-size:15px; color:#334155; line-height:1.5; }
/* 选项数字角标（键盘 1-9 快速作答提示；品牌可通过 CSS 变量覆盖） */
.psy-core-opt-num { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:7px; background:#eef2ff; color:#6366f1; font-size:12px; font-weight:700; flex-shrink:0; transition:all .15s; }
.psy-core-option-sel .psy-core-opt-num { background:#6366f1; color:#fff; }
/* 提交按钮脉冲（最后一题答完引导：滚动 + 呼吸光晕） */
.psy-core-btn-pulse { animation: psyCorePulse 1.5s ease-in-out infinite; }
@keyframes psyCorePulse {
  0%, 100% { transform:scale(1); box-shadow:0 0 0 0 var(--psy-pulse-color, rgba(99,102,241,.45)); }
  50% { transform:scale(1.045); box-shadow:0 0 0 12px rgba(99,102,241,0); }
}

.psy-core-nav { display:flex; align-items:center; gap:12px; margin-top:16px; }
.psy-core-btn { border:none; border-radius:12px; padding:10px 20px; font-size:14px; font-weight:600; cursor:pointer; transition:all .15s; min-height:44px; touch-action:manipulation; }
.psy-core-btn:disabled { opacity:.4; cursor:not-allowed; }
.psy-core-btn-prev { background:#f1f5f9; color:#64748b; }
.psy-core-btn-prev:not(:disabled):hover { background:#e2e8f0; }
.psy-core-btn-next { background:#6366f1; color:#fff; }
.psy-core-btn-next:hover { background:#4f46e5; }
.psy-core-btn-submit { background:linear-gradient(135deg,#6366f1,#8b5cf6); white-space:nowrap; flex-shrink:0; }
.psy-core-progress { flex:1; height:6px; background:#e2e8f0; border-radius:999px; overflow:hidden; min-width:0; position:relative; }
.psy-core-progress-bar { height:100%; background:linear-gradient(90deg,#6366f1,#8b5cf6); border-radius:999px; transition:width .3s; }
/* 进度分段刻度（1/3、2/3 静态标记——阶段感知内嵌在进度条，替代弹出式提示，零作答干扰；目标梯度效应：让用户看到还剩多少） */
.psy-core-progress::before, .psy-core-progress::after {
  content:''; position:absolute; top:-2px; bottom:-2px; width:1px;
  background:rgba(100,116,139,.45);
  pointer-events:none;
}
.psy-core-progress::before { left:33.333%; }
.psy-core-progress::after { left:66.666%; }

/* ===== 未作答拦截提示（"下一题"被拦：题卡抖动 + 琥珀内联提示条） ===== */
.psy-core-need-answer { animation: psyNeedShake .5s ease 2; }
.psy-core-need-tip { background:#FEF3C7; color:#92400E; font-size:13px; font-weight:600; border:1px solid #FCD34D; border-radius:10px; padding:9px 12px; margin-bottom:12px; text-align:center; }
@keyframes psyNeedShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) { .psy-core-need-answer { animation: none; } }
/* 移动端窄屏：导航行 wrap（进度条独占一行），供未品牌化覆盖的测试通用生效 */
@media (max-width:374px) {
  .psy-core-nav { flex-wrap:wrap; }
  .psy-core-progress { order:3; flex-basis:100%; margin-top:6px; }
}

/* 移动端紧凑：多选项题（如 7 点量表）一屏尽量放下全部选项；
   文本精简 + 角标隐藏后空间充裕 → 选项高度适当调高（padding 10px、文字 14px，行高约 40px），
   兼顾触控目标（接近 44px 标准）与一屏放下（7 选项估算 533px < 568px 可视） */
@media (max-width:640px) {
  .psy-core-question { padding:14px 12px; }
  .psy-core-qhead { margin-bottom:6px; }
  .psy-core-qtext { font-size:15px; line-height:1.5; margin-bottom:10px; }
  .psy-core-options { gap:8px; }
  .psy-core-option { padding:10px 14px; gap:8px; }
  .psy-core-option-text { font-size:14px; }
  /* 数字角标服务于桌面键盘 1-9 快速作答；移动端虚拟键盘无数字键 → 隐藏，为多选项题让出最大空间 */
  .psy-core-opt-num { display:none; }
  .psy-core-nav { margin-top:10px; }
}

/* ===== 结果页骨架 ===== */
.psy-core-hero { text-align:center; background:linear-gradient(135deg,#6366f1,#8b5cf6); border-radius:20px; padding:32px 20px; color:#fff; margin-bottom:16px; }
.psy-core-hero-icon { font-size:52px; margin-bottom:8px; }
.psy-core-hero-title { font-size:26px; font-weight:800; margin-bottom:6px; }
.psy-core-hero-sub { font-size:14px; opacity:.85; margin-bottom:10px; }
.psy-core-hero-desc { font-size:14px; opacity:.9; line-height:1.7; max-width:480px; margin:0 auto; }

.psy-core-card { background:#fff; border-radius:16px; box-shadow:0 2px 12px rgba(0,0,0,.05); padding:20px; margin-bottom:16px; }
.psy-core-card-title { font-size:16px; font-weight:700; color:#1f2937; margin-bottom:14px; display:flex; align-items:center; gap:8px; }

/* ===== 维度条 ===== */
.psy-core-dim { margin-bottom:14px; }
.psy-core-dim-head { display:flex; justify-content:space-between; align-items:center; font-size:14px; font-weight:600; color:#334155; margin-bottom:6px; }
.psy-core-dim-bar { height:8px; background:#f1f5f9; border-radius:999px; overflow:hidden; }
.psy-core-dim-fill { height:100%; border-radius:999px; transition:width .8s ease; }
.psy-core-dim-desc { font-size:12px; color:#94a3b8; margin-top:4px; }

/* ===== 科学依据区 ===== */
.psy-core-sci { background:#f8fafc; border:1px solid #e2e8f0; }
.psy-core-sci-head { display:flex; align-items:center; gap:8px; font-weight:700; color:#475569; margin-bottom:12px; }
.psy-core-sci-head i { color:#6366f1; }
.psy-core-sci-row { display:flex; gap:10px; padding:6px 0; border-bottom:1px dashed #e2e8f0; font-size:13px; }
.psy-core-sci-row:last-child { border-bottom:none; }
.psy-core-sci-label { flex-shrink:0; color:#94a3b8; width:72px; }
.psy-core-sci-value { color:#475569; line-height:1.6; min-width:0; overflow-wrap:anywhere; word-break:break-word; }

/* ===== 危机就医指引卡 ===== */
.psy-core-crisis { background:#fff7ed; border:2px solid #fdba74; border-radius:16px; padding:20px; margin-bottom:16px; }
.psy-core-crisis-head { display:flex; align-items:center; gap:8px; font-weight:800; color:#c2410c; margin-bottom:10px; }
.psy-core-crisis-head i { font-size:20px; }
.psy-core-crisis-msg { color:#9a3412; font-size:14px; margin-bottom:12px; line-height:1.7; }
.psy-core-crisis-list { list-style:none; padding:0; margin:0 0 10px; }
.psy-core-crisis-list li { color:#7c2d12; font-size:14px; line-height:1.8; padding-left:18px; position:relative; }
.psy-core-crisis-list li::before { content:'▸'; position:absolute; left:2px; color:#f97316; }
.psy-core-crisis-note { color:#b45309; font-size:12px; line-height:1.6; }

/* ===== 风险信号温和提示 ===== */
.psy-core-risk-prompt { display:flex; align-items:flex-start; gap:8px; background:#fef3c7; border:1px solid #fcd34d; border-radius:12px; padding:12px 16px; margin-top:12px; font-size:13px; color:#92400e; line-height:1.7; }
.psy-core-risk-prompt i { color:#f59e0b; margin-top:2px; }

/* ===== 免责声明 ===== */
.psy-core-disclaimer { font-size:12px; color:#94a3b8; line-height:1.7; padding:12px 4px; text-align:center; }

/* ===== 分享卡 ===== */
.psy-core-share { text-align:center; }
.psy-core-share-text { font-size:14px; color:#475569; background:#f8fafc; border-radius:10px; padding:12px; margin-bottom:14px; line-height:1.7; }
.psy-core-share-actions { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }
.psy-core-btn-copy, .psy-core-btn-share { background:#6366f1; color:#fff; }
.psy-core-btn-copy:hover, .psy-core-btn-share:hover { background:#4f46e5; }
.psy-core-share-toast { margin-top:10px; color:#10b981; font-size:13px; font-weight:600; }

/* ============================================================
 * Tailwind v3 语法兜底（站点为 v2.2.19 预编译版，以下类在 v2 中不存在）
 * 5 个新测试（love16/boundary/cen/sbti/attachment）全页面加载本文件，一处生效。
 * 作用：恢复 v3 任意值类（text-[10px] 等）与斜杠透明度类（text-white/70 等）的视觉效果。
 * 迁移旧测试时无需改动此块（旧测试不加载 core.css，单独处理）。
 * ============================================================ */
.text-\[10px\] { font-size:10px; }
.text-\[11px\] { font-size:11px; }
.text-white\/90 { color:rgba(255,255,255,.9); }
.text-white\/85 { color:rgba(255,255,255,.85); }
.text-white\/80 { color:rgba(255,255,255,.8); }
.text-white\/70 { color:rgba(255,255,255,.7); }
.text-white\/60 { color:rgba(255,255,255,.6); }
.border-white\/25 { border-color:rgba(255,255,255,.25); }
.w-\[112px\] { width:112px; }
