/* ========================================================
   replay.css — 历史复盘 / 模型校验 / 历史案例详情
   来源：V22 HTML <style> 拆分 — 不改逻辑/不重构
   ======================================================== */

  /* ===== 置信度详情弹窗 ===== */
  .conf-detail-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 600;
    display: none;
    align-items: center;
    justify-content: center;
  }
  .conf-detail-mask.show { display: flex; }
  .conf-detail {
    background: var(--bg-panel);
    border: 1px solid var(--accent-cyan);
    width: 480px;
    max-width: 90vw;
    padding: 22px 24px;
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.2);
  }
  .conf-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 14px;
  }
  .conf-detail-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .conf-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px dashed rgba(122, 147, 184, 0.15);
  }
  .conf-detail-row:last-of-type { border-bottom: none; }
  .conf-detail-label { color: var(--text-secondary); }
  .conf-detail-bar {
    flex: 1;
    height: 6px;
    background: rgba(122, 147, 184, 0.15);
    margin: 0 12px;
    position: relative;
  }
  .conf-detail-bar-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--risk-yellow), var(--risk-green));
  }
  .conf-detail-val {
    color: var(--text-primary);
    font-family: "Roboto Mono", monospace;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
  }
  .conf-detail-summary {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(0, 212, 255, 0.06);
    border-left: 2px solid var(--accent-cyan);
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.65;
  }
  .conf-detail-summary strong { color: var(--accent-cyan); }
  
  /* ===== 历史案例模式 ===== */
  .history-mode {
    height: calc(100vh - 64px);
    display: none;
    grid-template-columns: 320px 1fr;
    gap: 1px;
    background: var(--border);
    overflow: hidden;
  }
  .history-mode.show { display: grid; }
  
  .history-list {
    background: var(--bg-panel-2);
    overflow-y: auto;
  }
  .history-list::-webkit-scrollbar { width: 4px; }
  .history-list::-webkit-scrollbar-thumb { background: var(--border-light); }
  
  .history-list-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
  }
  .history-list-title {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
  }
  .history-list-subtitle {
    font-size: 11px; color: var(--text-tertiary);
    margin-top: 4px;
  }
  
  .history-card {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
  }
  .history-card:hover { background: rgba(0, 212, 255, 0.05); }
  .history-card.active {
    background: rgba(0, 212, 255, 0.1);
    border-left: 3px solid var(--accent-cyan);
    padding-left: 17px;
  }
  .history-card-date {
    font-size: 10px;
    color: var(--accent-cyan);
    font-family: monospace;
    letter-spacing: 1px;
    margin-bottom: 4px;
  }
  .history-card-title {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
  }
  .history-card-meta {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
  }
  .history-card-tags {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-top: 6px;
  }
  .history-card-tag {
    font-size: 10px;
    padding: 1px 6px;
    background: var(--bg-panel);
    color: var(--text-tertiary);
  }
  .history-card-tag.red { background: rgba(231, 76, 60, 0.15); color: var(--risk-red); }
  .history-card-tag.orange { background: rgba(230, 126, 34, 0.15); color: var(--risk-orange); }
  
  .history-detail {
    background: var(--bg-panel);
    overflow-y: auto;
    padding: 0;
  }
  .history-detail::-webkit-scrollbar { width: 4px; }
  .history-detail::-webkit-scrollbar-thumb { background: var(--border-light); }
  
  .history-detail-header {
    padding: 24px 32px;
    background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
    border-bottom: 1px solid var(--border);
  }
  .history-detail-tag {
    display: inline-block;
    background: var(--accent-amber);
    color: #1a1004;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
  }
  .history-detail-title {
    font-size: 22px; font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
  }
  .history-detail-meta {
    font-size: 12px; color: var(--text-secondary);
    display: flex; gap: 16px; flex-wrap: wrap;
  }
  
  .history-detail-body {
    padding: 24px 32px;
  }
  
  /* 三段对比卡片 */
  .compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin: 18px 0;
  }
  .compare-card {
    border: 1px solid var(--border-light);
    padding: 14px;
    background: rgba(15, 28, 48, 0.5);
  }
  .compare-card.actual { border-top: 3px solid var(--risk-red); }
  .compare-card.problem { border-top: 3px solid var(--accent-amber); }
  /* V3.7: "假如有 AI 孪生"作为叙事焦点 — 加渐变浮光 + 加深绿边 */
  .compare-card.if {
    border-top: 3px solid var(--risk-green);
    background: linear-gradient(180deg, rgba(46, 204, 113, 0.08) 0%, rgba(15, 28, 48, 0.5) 35%);
    box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.15), 0 4px 18px rgba(46, 204, 113, 0.08);
  }
  .compare-card.if .compare-card-content strong {
    color: var(--accent-cyan);  /* V3.7: AI 关键能力词高亮成 cyan */
  }
  /* V21: 第三栏圈号染绿（呼应卡片绿边 + 绿色背景 gradient） */
  .compare-card.if .compare-num {
    color: var(--risk-green);
    font-weight: 700;
    font-size: 14px;
    margin-right: 2px;
  }
  .compare-card-title {
    font-size: 12px; font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
  }
  .compare-card.actual .compare-card-title { color: var(--risk-red); }
  .compare-card.problem .compare-card-title { color: var(--accent-amber); }
  .compare-card.if .compare-card-title { color: var(--risk-green); }
  .compare-card-content {
    font-size: 12px; color: #c5d3e8;
    line-height: 1.7;
  }
  
  /* 历史时间线 */
  .timeline-events {
    margin: 16px 0;
    border-left: 2px solid var(--border-light);
    padding-left: 0;
  }
  .timeline-event {
    position: relative;
    padding: 10px 16px 10px 22px;
    margin-bottom: 4px;
  }
  .timeline-event::before {
    content: '';
    position: absolute;
    left: -7px; top: 14px;
    width: 12px; height: 12px;
    background: var(--bg-panel);
    border: 2px solid var(--text-tertiary);
    border-radius: 50%;
  }
  .timeline-event.critical::before {
    background: var(--risk-red);
    border-color: var(--risk-red);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.2);
  }
  .timeline-event.action::before {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
  }
  .timeline-event-time {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: monospace;
    letter-spacing: 0.5px;
  }
  .timeline-event-text {
    font-size: 12.5px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-top: 2px;
  }
  .timeline-event.critical .timeline-event-text { color: var(--risk-red); font-weight: 500; }
  .timeline-event.action .timeline-event-text { color: var(--accent-cyan); }
  
