/* R106-A5 candidate: 工具结果页浅色模式对比度补丁（只读审查产物，未应用）
   目标模板：templates/qimen_result.html / liuren_result.html / bazi.html
   合并位置建议：static/css/style.css 末尾，或作为独立 CSS 在 base.html 中排在
   style.css 之后、结果模板内联 <style> 之前；本文件选择器带 [data-theme="light"]，
   特异性高于结果模板的 .class 选择器，可覆盖内联样式块。 */

[data-theme="light"] {
  --r106-success: #166534;
  --r106-warning: #8A4B00;
  --r106-danger: #A61B1B;
  --r106-purple: #6A1B9A;
  --r106-blue: #1D4ED8;
  --r106-gray: #4B5563;
}

/* 奇门/六壬：历史结果提示（结果模板内联 background/color，需 !important） */
[data-theme="light"] #historicalNoticeBox {
  background: rgba(217, 119, 6, 0.08) !important;
  border-color: rgba(217, 119, 6, 0.30) !important;
  color: #8A4B00 !important;
}

/* 六壬：降级/信息不完整提示 */
[data-theme="light"] .incomplete-notice {
  background: rgba(217, 119, 6, 0.08) !important;
  border-color: rgba(217, 119, 6, 0.30) !important;
  color: #8A4B00 !important;
}

/* 奇门/六壬：加载失败卡片（inline background，需 !important） */
[data-theme="light"] #loadErrorCard {
  background: #FFFDF8 !important;
  border-color: rgba(143, 111, 61, 0.20) !important;
}

/* 奇门/六壬：置信度标签 */
[data-theme="light"] .conf-high {
  color: #166534 !important;
  background: rgba(22, 163, 74, 0.08) !important;
  border-color: rgba(22, 163, 74, 0.35) !important;
}
[data-theme="light"] .conf-mid {
  color: #8A4B00 !important;
  background: rgba(217, 119, 6, 0.08) !important;
  border-color: rgba(217, 119, 6, 0.35) !important;
}
[data-theme="light"] .conf-low {
  color: #A61B1B !important;
  background: rgba(220, 38, 38, 0.07) !important;
  border-color: rgba(220, 38, 38, 0.30) !important;
}

/* 奇门：盘面标记（值符/值使/日干/时干/空亡/马星） */
[data-theme="light"] .marker-tag.zhifu {
  color: #6A1B9A !important;
  background: rgba(156, 39, 176, 0.10) !important;
}
[data-theme="light"] .marker-tag.zhishi {
  color: #9A3412 !important;
  background: rgba(255, 87, 34, 0.10) !important;
}
[data-theme="light"] .marker-tag.ri-gan {
  color: #1D4ED8 !important;
  background: rgba(33, 150, 243, 0.10) !important;
}
[data-theme="light"] .marker-tag.shi-gan {
  color: #166534 !important;
  background: rgba(76, 175, 80, 0.10) !important;
}
[data-theme="light"] .marker-tag.kongwang {
  color: #4B5563 !important;
  background: rgba(107, 114, 128, 0.10) !important;
}
[data-theme="light"] .marker-tag.maxing {
  color: #8A4B00 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

/* 六壬：追问额度条、反馈成功态 */
[data-theme="light"] .credits-info {
  background: rgba(143, 111, 61, 0.06) !important;
  border-top-color: rgba(143, 111, 61, 0.12) !important;
  color: #5C5347 !important;
}
[data-theme="light"] .fb-done {
  color: #166534 !important;
}

/* 六壬：对话头像在浅底上的弱对比 */
[data-theme="light"] .msg.system-msg .msg-avatar {
  color: #6A1B9A !important;
  background: rgba(156, 39, 176, 0.08) !important;
  border-color: rgba(156, 39, 176, 0.20) !important;
}
[data-theme="light"] .msg.user .msg-avatar {
  color: #1F4F55 !important;
  background: rgba(46, 111, 115, 0.08) !important;
  border-color: rgba(46, 111, 115, 0.22) !important;
}

/* 八字：五行条形图的浅底标签与条内文字 */
[data-theme="light"] .wx-bar-label.wx-jin { color: #8A6A2F !important; }
[data-theme="light"] .wx-bar-label.wx-mu { color: #3F6B1F !important; }
[data-theme="light"] .wx-bar-label.wx-shui { color: #1F4F7A !important; }
[data-theme="light"] .wx-bar-label.wx-huo { color: #A61B1B !important; }
[data-theme="light"] .wx-bar-label.wx-tu { color: #7A4F1D !important; }
[data-theme="light"] .wx-bar-fill { color: #1A1612 !important; }

/* 八字：出生城市选择弹层在浅色模式下变成深色浮层，文字直接落在深底上。
   若短期只改 CSS，至少把弹层与输入恢复成浅色卡片。 */
[data-theme="light"] .city-picker-sheet {
  background: #FFFDF8 !important;
  border-top-color: rgba(143, 111, 61, 0.20) !important;
}
[data-theme="light"] .city-picker-sheet .city-picker-search input {
  background: #FFFFFF !important;
  border-color: rgba(143, 111, 61, 0.22) !important;
  color: #1A1612 !important;
}
[data-theme="light"] .city-picker-sheet .city-picker-search input::placeholder {
  color: #6E6252 !important;
}

/* 说明：八字历史弹层在 bazi.html 的 JS 里使用 inline background:#141c24，
   无法由上面的类选择器稳定覆盖；建议把该 inline 值改为 var(--bg-secondary)
   并补一个 .bazi-history-sheet 类，见 REPORT.md 的模板改法。 */
