/* 交互盲评实验室 - 起点预测试 v1
   干净 / 留白 / 克制：这是学习工具，不是炫技页。零外部依赖。 */

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --border: #e4e7ec;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --ok: #16a34a;
  --ok-soft: #f0fdf4;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* ---------- header / tabs ---------- */
.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.app-title {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.01em;
  margin: 14px 0;
}

.tabs { display: flex; gap: 4px; }

.tab {
  border: none;
  background: transparent;
  padding: 12px 14px 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab:hover { color: var(--text); }

.tab.is-active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* ---------- layout ---------- */
.app-main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.view { display: none; }
.view.is-active { display: block; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 8px;
}

.panel-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.level-progress {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ---------- level page ---------- */
.level-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.scenario-card { margin-bottom: 14px; }
.scenario-card p, .question-card p { margin: 0; color: #374151; }
.question-card { margin-bottom: 18px; }

.version-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.version-toggle[hidden] { display: none !important; }

.seg {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.seg.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* ---------- version cards ---------- */
.versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.version-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.version-card:hover { border-color: #c7cdd6; }

.version-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.version-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.version-badge {
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.version-name { font-size: 14px; font-weight: 600; color: #374151; }

.shared-elements {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- phone mock ---------- */
.phone {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fafbfc;
  overflow: hidden;
  max-width: 360px;
  margin: 0 auto;
}

.phone-screen {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  background: #fafbfc;
}

.mock-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.mock-back { font-size: 19px; color: #6b7280; line-height: 1; }
.mock-top-title { flex: 1; text-align: center; }
.mock-top-right { font-size: 12px; color: #6b7280; min-width: 24px; text-align: right; }

.mock-body { flex: 1; display: flex; flex-direction: column; padding: 14px; gap: 12px; }

.mock-centered {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
}

.mock-text-block { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mock-title-text { margin: 0; font-size: 15px; font-weight: 600; color: #1f2937; }
.mock-value-text { margin: 0; font-size: 13px; color: #6b7280; max-width: 230px; }

.mock-heart {
  width: 34px;
  height: 30px;
  position: relative;
}

.mock-heart::before,
.mock-heart::after {
  content: "";
  position: absolute;
  top: 0;
  width: 17px;
  height: 28px;
  border-radius: 17px 17px 0 0;
  background: #d1d5db;
}

.mock-heart::before { left: 17px; transform: rotate(-45deg); transform-origin: 0 100%; }
.mock-heart::after { left: 0; transform: rotate(45deg); transform-origin: 100% 100%; }

.mock-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  color: #fff;
  background: #1f2937;
}

.mock-btn-block { width: 100%; }
.mock-btn-secondary {
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.mock-action-slot { width: 100%; height: 42px; }

.mock-form .mock-field { display: flex; flex-direction: column; gap: 5px; }

.mock-label { font-size: 12px; color: #6b7280; }

.mock-input {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  color: #374151;
}

.mock-input-multi { min-height: 46px; }
.mock-input-error { border-color: #dc2626; }

.mock-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.mock-actions-split { flex-direction: row; gap: 10px; }
.mock-actions-split .mock-btn { flex: 1; }
.mock-link-btn { text-align: center; font-size: 13px; color: #6b7280; padding: 4px; }

.mock-error-banner {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
}

.mock-inline-error { color: #b91c1c; font-size: 12px; }

.mock-list { padding: 0; gap: 0; }

.mock-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #f0f1f3;
}

.mock-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e5e7eb;
  flex: none;
}

.mock-row-main { flex: 1; min-width: 0; }
.mock-row-title { font-size: 13px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row-price { font-size: 12px; color: #6b7280; margin-top: 2px; }

.mock-swipe-btns { display: flex; gap: 4px; flex: none; }

.mock-mini-btn {
  font-size: 11px;
  padding: 5px 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #4b5563;
  white-space: nowrap;
}

.mock-logo { font-size: 17px; color: #2563eb; font-weight: 700; }
.mock-brand-name { flex: 1; font-size: 14px; font-weight: 700; }
.mock-search-pill {
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 3px 10px;
}

.mock-top-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
  overflow-x: auto;
}

.mock-top-tab {
  padding: 5px 10px;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
}

.mock-top-tab.active { background: #1f2937; color: #fff; }

.mock-content { padding: 12px; display: flex; flex-direction: column; gap: 14px; }

.mock-section-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

.mock-card-row { display: flex; gap: 8px; }

.mock-card {
  flex: 1;
  border-radius: 8px;
  background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
  height: 64px;
}

.mock-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.mock-album { text-align: center; }

.mock-album-cover {
  height: 76px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

.mock-album-name { font-size: 11px; color: #4b5563; margin-top: 5px; }

.mock-bottom-tabs {
  margin-top: auto;
  display: flex;
  background: #fff;
  border-top: 1px solid #eef0f3;
}

.mock-bottom-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  color: #6b7280;
}

.mock-bottom-tab.active { color: #1f2937; font-weight: 600; }

/* ---------- rationale panel ---------- */
.rationale-panel label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }

#rationale-input {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--card);
}

#rationale-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

#rationale-input:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

.rationale-hint { min-height: 20px; margin: 6px 0 10px; font-size: 13px; color: var(--bad); }

.scoring-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1d4ed8; }

.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: #c7cdd6; background: #fafbfc; }

.reveal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- reveal area ---------- */
.reveal-area { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }

.judgment { display: flex; align-items: center; gap: 14px; }
.judgment p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.judgment.ok { background: var(--ok-soft); border-color: #bbf7d0; }
.judgment.bad { background: var(--bad-soft); border-color: #fecaca; }
.judgment.ok .judgment-mark { background: var(--ok); }
.judgment.bad .judgment-mark { background: var(--bad); }

.judgment-mark {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.obviousness-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.diff-legend { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }

.diff-legend li { display: flex; gap: 10px; align-items: flex-start; }

.legend-num {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bad);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.diff-legend strong { font-size: 14px; }
.diff-legend p { margin: 2px 0 0; font-size: 13px; color: #374151; }
.diff-cover { margin: 3px 0 0; font-size: 12px; color: var(--muted); }

/* diff highlight on mock regions */
.diff-region { position: relative; }
.diff-active { outline: 2px dashed var(--bad); outline-offset: 2px; border-radius: 6px; }

.diff-badge {
  position: absolute;
  top: -9px;
  left: -9px;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bad);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  z-index: 5;
  pointer-events: none;
}

/* principle card: ① 回看差异 → ② 原理 → ③ 案例 → ④ 迁移 */
.principle-order {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.principle-order span {
  font-size: 12px;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px 9px;
}

.principle-points { margin: 10px 0 14px; padding-left: 22px; }
.principle-points li { margin-bottom: 6px; color: #374151; }

.principle-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef0f3; }
.principle-block h3 { font-size: 13px; font-weight: 600; margin: 0 0 4px; color: #111827; }
.principle-block p { margin: 0; font-size: 14px; color: #374151; }

.ideal-card.emphasis {
  border-color: #fcd34d;
  background: var(--warn-soft);
}

.ideal-card p { margin: 10px 0 0; color: #374151; }

/* match list */
.match-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.match-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  background: #fafbfc;
}

.match-item.hit { border-color: #bbf7d0; background: var(--ok-soft); }
.match-item.miss { border-color: #fecaca; background: var(--bad-soft); }

.match-mark {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 9px;
  color: #fff;
}

.match-item.hit .match-mark { background: var(--ok); }
.match-item.miss .match-mark { background: var(--bad); }

.match-point { flex: 1; }
.match-keys { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

/* rating */
.rating-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.rating-option {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  cursor: pointer;
  background: #fafbfc;
  font-size: 13px;
}

.rating-option.is-active { border-color: var(--accent); background: var(--accent-soft); }

.rating-option input { position: absolute; opacity: 0; pointer-events: none; }

.rating-score { font-weight: 650; }
.rating-desc { font-size: 12px; color: var(--muted); }

.rating-hint { min-height: 20px; font-size: 13px; color: var(--bad); margin-top: 8px; }
.saved-note { font-size: 13px; color: var(--ok); margin: 10px 0 0; }

/* completion */
.completion-card { text-align: center; padding: 40px 24px; }

.completion-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.completion-accuracy { font-size: 17px; font-weight: 650; margin: 0 0 6px; }
.completion-card p { color: var(--muted); }

.track-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 14px;
  margin: 10px 0 14px;
}

.track-badge.fast { background: var(--ok-soft); color: var(--ok); border: 1px solid #bbf7d0; }
.track-badge.standard { background: #f3f4f6; color: #4b5563; border: 1px solid var(--border); }

/* ---------- progress page ---------- */
.page-head { margin-bottom: 16px; }

.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  background: var(--card);
}

.todo-item.done { background: #fafbfc; }

.todo-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.todo-id { font-weight: 650; color: var(--muted); font-size: 12px; }

.todo-status { font-size: 13px; font-weight: 600; white-space: nowrap; }
.todo-status.ok { color: var(--ok); }
.todo-status.bad { color: var(--bad); }
.todo-status.todo { color: #9ca3af; }

.empty-note {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: #fafbfc;
}

.report-card { margin-bottom: 12px; }

.report-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.report-id { font-weight: 650; color: var(--text); }

.report-content { white-space: pre-wrap; font-size: 14px; color: #374151; }

.report-highlights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.chip {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.calibration-rows { display: flex; flex-direction: column; }

.calibration-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f3;
  font-size: 14px;
}

.calibration-row:last-child { border-bottom: none; }
.calibration-row span { color: var(--muted); }
.calibration-row strong { color: var(--text); }

.page-foot { text-align: center; font-size: 12px; color: #9ca3af; margin-top: 20px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(8px);
  background: #111827;
  color: #fff;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  max-width: 88vw;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 719px) {
  .versions { grid-template-columns: 1fr; }
  .version-card { display: none; }
  .version-card.visible { display: block; }
  .rating-options { grid-template-columns: 1fr; }
  .app-header-inner { padding: 0 14px; }
  .app-main { padding: 18px 14px 70px; }
  .version-toggle[hidden] { display: flex !important; }
}

/* ================= v2 三帧 storyboard ================= */

.phone-screen { position: relative; min-height: 320px; }

.storyboard-hint {
  font-size: 13px;
  color: var(--muted);
  background: var(--accent-soft);
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 9px 13px;
  margin: 0 0 14px;
}

.sb-controls { display: flex; gap: 6px; margin-bottom: 10px; }

.sb-btn {
  flex: 1;
  padding: 6px 0;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.sb-btn:hover { border-color: #c7cdd6; }

.sb-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.sb-frame { display: none; flex-direction: column; flex: 1; }

.sb-frame.is-active { display: flex; animation: sbIn .32s ease; }

@keyframes sbIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.sb-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
  min-height: 34px;
}

.sb-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 78%;
}

.sb-skeleton i {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eceef1 25%, #f7f8fa 50%, #eceef1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* 模拟器内提示与 toast */
.mock-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 11px;
  border-radius: 8px;
  text-align: center;
}

.mock-note.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #fde68a; }
.mock-note.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #bbf7d0; }

.mock-toast {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  z-index: 6;
  animation: toastIn .35s ease;
}

.mock-toast.warn { background: #92400e; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 空状态 / 按钮 / 表单模拟器增强 */
.mock-heart.is-accent { background: #2563eb; }
.mock-heart.is-accent::before, .mock-heart.is-accent::after { background: #2563eb; }

.mock-btn-primary { background: var(--accent); }

.mock-btn-go { animation: btnPulse 1.4s ease-in-out infinite; }

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .28); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
}

.mock-back-pulse {
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  animation: backPulse 1s ease-in-out infinite;
}

@keyframes backPulse {
  0%, 100% { transform: translateX(0); opacity: .7; }
  50% { transform: translateX(-4px); opacity: 1; }
}

.mock-success-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  animation: popIn .4s ease;
}

@keyframes popIn {
  0% { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.mock-btn.is-tapped { outline: 2px dashed var(--warn); outline-offset: 2px; }

.mock-field-ok .mock-input-ok { border-color: var(--ok); }
.mock-ok-line { font-size: 12px; color: var(--ok); }

/* 滑动列表三帧 */
.mock-list-row {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.mock-row-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: #fff;
  transition: transform .2s ease;
}

.mock-list-row.is-swiped .mock-row-content { transform: translateX(-96px); }

.mock-row-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  background: #f3f4f6;
  opacity: 0;
  pointer-events: none;
}

.mock-list-row.is-swiped .mock-row-actions { opacity: 1; }

.mock-mini-btn.is-danger { background: #fee2e2; border-color: #fecaca; color: var(--bad); font-weight: 600; }

.mock-swipe-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-left: auto;
  flex: none;
}

.mock-thumb-zone { border-top: 2px solid var(--ok); animation: zoneGlow 1.6s ease-in-out infinite; }

@keyframes zoneGlow {
  0%, 100% { box-shadow: inset 0 0 0 rgba(22, 163, 74, 0); }
  50% { box-shadow: inset 0 0 0 2px rgba(22, 163, 74, .18); }
}

.mock-bottom-tabs:empty { display: none; }

/* 通用文字分镜（l*.json） */
.sb-text-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
  background: #fff;
}

.sb-text-panel p { margin: 0; white-space: pre-line; }

.sb-frame-tag {
  align-self: flex-start;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

.sb-split-desc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sb-ver-desc {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafbfc;
}

.sb-ver-desc strong { font-size: 13px; color: #111827; }
.sb-ver-desc p { margin: 5px 0 0; font-size: 12.5px; color: #4b5563; white-space: pre-line; }

/* ================= 揭示层 v2 ================= */

.reason-panel { margin-top: 14px; }

.reason-panel h2 { margin-bottom: 2px; }

.reason-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}

.reason-mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.reason-mark.ok { background: var(--ok); }
.reason-mark.bad { background: var(--bad); }

.verdict-extra { font-size: 13px; font-weight: 600; margin: 8px 0 0 !important; }
.verdict-extra.is-good { color: var(--ok); }
.verdict-extra.is-warn { color: var(--warn); }
.verdict-extra.is-bad { color: var(--bad); }

@media (max-width: 719px) {
  .sb-caption { min-height: 46px; }
  .sb-split-desc { flex-direction: column; }
}

/* ================= 图鉴视图 v3（只读知识库） ================= */

/* 搜索框 */
.atlas-search {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  margin: 0 0 18px;
  transition: border-color .15s, box-shadow .15s;
}

.atlas-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.atlas-search::placeholder { color: #9ca3af; }

/* 卡片网格 */
.atlas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.atlas-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.atlas-card:hover {
  border-color: #c7cdd6;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.atlas-card:active { transform: none; }

.atlas-card-head,
.atlas-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.atlas-pattern {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.atlas-card-title {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

.atlas-card-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.atlas-lil-ver {
  font-size: 12px;
  color: #4b5563;
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  background: #fafbfc;
}

.atlas-lil-ver.bad { color: var(--bad); border-color: #fecaca; background: var(--bad-soft); }
.atlas-lil-ver.good { color: var(--ok); border-color: #bbf7d0; background: var(--ok-soft); }

/* 详情面板（内联展开，占满整行，随页面滚动可滚） */
.atlas-detail {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: atlasIn .25s ease;
}

@keyframes atlasIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.atlas-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eef0f3;
}

.atlas-close {
  border: 1px solid var(--border);
  background: #fafbfc;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.atlas-close:hover { border-color: var(--bad); color: var(--bad); }

.atlas-section + .atlas-section { margin-top: 20px; }

.atlas-section h4 {
  font-size: 14px;
  font-weight: 650;
  margin: 0 0 10px;
  color: #111827;
}

.atlas-body-text {
  margin: 0;
  font-size: 14px;
  color: #374151;
  white-space: pre-line;
}

/* 三帧场景（三段带箭头） */
.atlas-frames {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.atlas-frame {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.atlas-frame p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.65;
  white-space: pre-line;
}

.atlas-frame-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

.atlas-arrow {
  align-self: center;
  color: #c7cdd6;
  font-size: 20px;
  flex: none;
  padding: 0 2px;
}

/* A/B 对比两栏（bad 红 / good 绿，与盲评揭示层态度色一致） */
.atlas-versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.atlas-version {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: #fafbfc;
  border-top: 3px solid var(--border);
}

.atlas-version.bad {
  border-top-color: var(--bad);
  background: linear-gradient(180deg, var(--bad-soft), #fff 42%);
}

.atlas-version.good {
  border-top-color: var(--ok);
  background: linear-gradient(180deg, var(--ok-soft), #fff 42%);
}

.atlas-ver-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.atlas-ver-head strong { font-size: 14px; color: #111827; }

.atlas-ver-badge {
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
  color: #fff;
}

.atlas-ver-badge.bad { background: var(--bad); }
.atlas-ver-badge.good { background: var(--ok); }

.atlas-ver-desc {
  margin: 0 0 10px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.65;
  white-space: pre-line;
}

.atlas-ver-changes-head {
  font-size: 12px;
  font-weight: 650;
  color: #6b7280;
  margin-bottom: 6px;
}

.atlas-ver-changes {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.atlas-ver-changes li { font-size: 13px; color: #374151; line-height: 1.6; }

.atlas-base-line {
  margin: 0;
  font-size: 12px;
  color: var(--ok);
  display: inline-block;
  background: var(--ok-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

/* 揭示区 + 原理卡 */
.atlas-reveal { display: flex; flex-direction: column; gap: 6px; }

.atlas-reveal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.atlas-reveal-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

.atlas-reveal-block h5 {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 650;
  color: #6b7280;
}

.atlas-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.atlas-list li { font-size: 13px; color: #374151; line-height: 1.6; }

.atlas-principle {
  border: 1px solid #dbeafe;
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 14px;
  margin-top: 4px;
}

.atlas-principle-title { font-size: 14px; color: var(--accent); }

.atlas-principle-summary {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: #1f2937;
  font-weight: 600;
}

.atlas-principle .atlas-list { margin-top: 8px; }

.atlas-anchor {
  margin-top: 12px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.atlas-anchor-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 4px;
}

.atlas-anchor p { margin: 0; font-size: 13px; color: #374151; line-height: 1.65; }

/* 搜索无匹配占位 */
.atlas-grid > .empty-note { grid-column: 1 / -1; }

@media (max-width: 719px) {
  .atlas-frames { flex-direction: column; }
  .atlas-arrow { transform: rotate(90deg); }
  .atlas-versions { grid-template-columns: 1fr; }
  .atlas-detail { padding: 16px; }
}
