/**
 * geo软文生成器 — 全局样式
 * Standard window layout (780×680): left settings + right log
 * Design: Modern Editorial — warm, typographic, terracotta accent
 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-text: #1c1917;
  --color-text-secondary: #6b6560;
  --color-text-tertiary: #a8a29e;
  --color-accent: #e85d3a;
  --color-accent-hover: #d14a28;
  --color-accent-soft: #fef3ee;
  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-border: #e7e5e4;
  --color-border-light: #f0efed;
  --color-log-bg: #1a1d21;
  --color-log-surface: #21252b;
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.2s ease;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 2px 8px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-modal: 0 4px 24px rgba(0,0,0,0.12), 0 8px 40px rgba(0,0,0,0.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  height: 100vh;
  background: var(--color-bg);
  font-size: 13px;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* ====== Page switching ====== */
.page { width: 100%; height: 100%; display: none; flex-direction: column; position: relative; }
.page.active { display: flex; }

/* ====== Tab content switching ====== */
.tab-content { display: none; flex: 1; overflow: hidden; }
.tab-content.active { display: flex; }

/* ====== Topbar ====== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; background: var(--color-surface); border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0; min-height: 40px;
}
.topbar-left { display: flex; align-items: center; }
.topbar-tabs { display: flex; gap: 2px; background: var(--color-bg); border-radius: 7px; padding: 2px; }
.topbar-tab {
  padding: 4px 14px; font-size: 12px; color: var(--color-text-tertiary); cursor: pointer;
  border-radius: 5px; background: transparent; border: none; font-family: inherit;
  transition: all var(--transition-fast); white-space: nowrap; font-weight: 500;
}
.topbar-tab:hover { color: var(--color-text-secondary); }
.topbar-tab.active { color: var(--color-accent); background: var(--color-accent-soft); font-weight: 600; }
.topbar-merchant { font-size: 11px; color: var(--color-text-secondary); font-weight: 500; }
.topbar-balance { font-size: 11px; color: var(--color-accent); font-weight: 600; background: var(--color-accent-soft); padding: 3px 8px; border-radius: 4px; }
.topbar-refresh {
  font-size: 11px; color: var(--color-text-tertiary); cursor: pointer;
  background: none; border: none; font-family: inherit; padding: 3px 8px;
  border-radius: 4px; transition: all var(--transition-fast);
}
.topbar-refresh:hover { color: var(--color-accent); background: var(--color-accent-soft); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-logout {
  font-size: 11px; color: var(--color-text-tertiary); cursor: pointer;
  background: none; border: none; font-family: inherit; padding: 3px 8px;
  border-radius: 4px; transition: all var(--transition-fast);
}
.topbar-logout:hover { color: var(--color-accent); background: var(--color-accent-soft); }

/* ====== Main layout: left-right split ====== */
.main-layout {
  display: flex; flex: 1; overflow: hidden; gap: 0;
}
.main-left {
  flex: 2; min-width: 0; display: flex; flex-direction: column;
}
.main-right {
  width: 340px; flex-shrink: 0; border-left: 1px solid var(--color-border-light);
  display: flex; flex-direction: column;
}

/* ====== Log panel ====== */
.log-panel {
  display: flex; flex-direction: column; height: 100%;
  background: var(--color-log-bg);
}
.log-panel-header {
  display: flex; align-items: center; padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; gap: 8px;
}
.log-panel-title {
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 1.2px; flex-shrink: 0;
}
.log-panel-actions {
  display: flex; align-items: center; gap: 6px; margin-left: auto;
}
.btn-generate {
  padding: 4px 14px; font-size: 11px; font-weight: 600; color: #fff;
  background: var(--color-accent); border: none; border-radius: 5px;
  cursor: pointer; font-family: inherit; transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-generate:hover { background: var(--color-accent-hover); }
.btn-generate:disabled { background: #555; color: #888; cursor: not-allowed; }
.btn-generate.republish { background: var(--color-warning); }
.btn-generate.republish:hover { background: #b65f06; }
.log-panel-body {
  flex: 1; overflow-y: auto; padding: 10px 14px;
  font-family: "Cascadia Code", Consolas, "SF Mono", "Microsoft YaHei", monospace;
  font-size: 11px; line-height: 1.7;
  -webkit-user-select: text;
  user-select: text;
}
.log-panel-body::-webkit-scrollbar { width: 4px; }
.log-panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.log-panel-body::-webkit-scrollbar-track { background: transparent; }

.log-line { color: rgba(255,255,255,0.65); white-space: pre-wrap; word-break: break-all; }
.log-line .log-time { color: rgba(255,255,255,0.22); }
.log-line .log-info { color: #7dd3a9; }
.log-line .log-warn { color: #f0b849; }
.log-line .log-error { color: #f87171; }

/* ====== Settings cards ====== */
.settings-scroll {
  flex: 1; overflow-y: auto; background: var(--color-bg); padding-bottom: 20px;
}
.settings-scroll::-webkit-scrollbar { width: 4px; }
.settings-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.settings-body {
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.settings-group-title {
  font-size: 10px; font-weight: 700; color: var(--color-text-tertiary);
  padding: 10px 0 4px; margin-top: 4px; letter-spacing: 1px;
  text-transform: uppercase;
}
.settings-group-title:first-child { margin-top: 0; }
.settings-card {
  background: var(--color-surface); border-radius: var(--radius-md);
  padding: 14px 16px; border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card);
}
.settings-card-clickable {
  cursor: pointer; transition: all var(--transition-smooth);
}
.settings-card-clickable:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border);
  transform: translateY(-1px);
}
.settings-card-clickable:active { transform: translateY(0); }
.settings-card-header {
  display: flex; align-items: center; gap: 10px;
}
.settings-card-info { flex: 1; min-width: 0; }
.settings-card-info h3 {
  font-size: 13px; font-weight: 600; color: var(--color-text); margin: 0;
}
.settings-card-desc {
  font-size: 11px; color: var(--color-text-tertiary); margin: 3px 0 0;
}

.settings-card-inline { padding: 14px 16px; }
.settings-card-inline .form-group:last-child { margin-bottom: 0; }
.settings-card-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }

/* ====== Settings detail sub-pages ====== */
.settings-detail {
  display: none; position: absolute; top: 40px; left: 0; right: 0; bottom: 0;
  flex-direction: column; background: var(--color-bg); z-index: 10;
}
.settings-detail.active { display: flex; }
.settings-detail-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--color-surface); border-bottom: 1px solid var(--color-border-light); flex-shrink: 0;
}
.settings-back-btn {
  padding: 5px 14px; font-size: 13px; color: var(--color-text-secondary);
  background: var(--color-bg); border: 1px solid var(--color-border-light);
  cursor: pointer; font-family: inherit; border-radius: var(--radius-sm);
  transition: all var(--transition-fast); white-space: nowrap; font-weight: 500;
}
.settings-back-btn:hover { color: var(--color-accent); border-color: var(--color-accent); background: var(--color-accent-soft); }
.settings-detail-header h2 { font-size: 15px; font-weight: 600; color: var(--color-text); margin: 0; }
.settings-detail-body {
  flex: 1; overflow-y: auto; padding: 16px; background: var(--color-bg);
}
.settings-detail-body::-webkit-scrollbar { width: 4px; }
.settings-detail-body::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

/* ====== Forms ====== */
.form-input {
  width: 100%; padding: 9px 12px; font-size: 13px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-family: inherit; outline: none;
  background: var(--color-surface); transition: border-color var(--transition-fast);
  box-sizing: border-box; color: var(--color-text);
}
.form-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(232,93,58,0.08); }
.form-input::placeholder { color: var(--color-text-tertiary); }
.form-textarea {
  width: 100%; padding: 10px 12px; font-size: 13px; line-height: 1.7;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: inherit;
  outline: none; resize: vertical; min-height: 140px;
  background: var(--color-surface); transition: border-color var(--transition-fast);
  box-sizing: border-box; color: var(--color-text);
}
.form-textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(232,93,58,0.08); }
.form-textarea::placeholder { color: var(--color-text-tertiary); }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
.form-row { display: flex; gap: 12px; align-items: center; }
.form-hint { font-size: 11px; color: var(--color-text-tertiary); margin-top: 5px; }
.form-select {
  width: 100%; padding: 9px 12px; font-size: 13px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-family: inherit; outline: none;
  background: var(--color-surface); transition: border-color var(--transition-fast);
  box-sizing: border-box; cursor: pointer; appearance: auto; color: var(--color-text);
}
.form-select:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(232,93,58,0.08); }

/* ====== Buttons ====== */
.btn-primary {
  padding: 8px 22px; font-size: 13px; color: #fff; background: var(--color-accent);
  border: none; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
  transition: all var(--transition-fast); font-weight: 600;
}
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-primary:disabled { background: var(--color-border); color: var(--color-text-tertiary); cursor: not-allowed; }
.btn-default {
  padding: 8px 22px; font-size: 13px; color: var(--color-text-secondary);
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
  transition: all var(--transition-fast); font-weight: 500;
}
.btn-default:hover { background: var(--color-border-light); }
.btn-sm {
  padding: 4px 12px; font-size: 11px; color: var(--color-accent); background: var(--color-accent-soft);
  border: 1px solid #fcd5cd; border-radius: 5px; cursor: pointer; font-family: inherit;
  transition: all var(--transition-fast); font-weight: 500;
}
.btn-sm:hover { background: var(--color-accent); color: #fff; }
.btn-sm.danger { color: var(--color-text-tertiary); border-color: var(--color-border); background: var(--color-bg); }
.btn-sm.danger:hover { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }

/* ====== Toast ====== */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  padding: 9px 22px; background: var(--color-text); color: #fff; font-size: 12px;
  border-radius: 8px; z-index: 999; opacity: 0; transition: opacity 0.3s; pointer-events: none;
  font-weight: 500; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.toast.show { opacity: 1; }
.toast.error { background: var(--color-danger); }
.toast.success { background: var(--color-success); }

/* ====== Login page ====== */
.login-container {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 24px; background: var(--color-bg);
}
.login-title {
  font-size: 22px; font-weight: 700; color: var(--color-text);
  margin-bottom: 24px; letter-spacing: -0.3px;
}
.login-subtitle { font-size: 13px; color: var(--color-text-tertiary); margin-bottom: 32px; }
.login-form { width: 100%; max-width: 320px; }
.login-form .form-group { margin-bottom: 18px; }
.login-remember-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 16px;
}
.login-remember-row label {
  font-size: 12px; color: var(--color-text-secondary); cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.login-remember-row input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--color-accent);
}
.login-btn {
  width: 100%; padding: 11px; font-size: 14px; font-weight: 600; color: #fff;
  background: var(--color-accent); border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; transition: all var(--transition-fast); margin-top: 10px;
}
.login-btn:hover { background: var(--color-accent-hover); }
.login-btn:disabled { background: var(--color-border); color: var(--color-text-tertiary); cursor: not-allowed; }
.login-error { font-size: 12px; color: var(--color-danger); text-align: center; margin-top: 14px; }

/* ====== Topic list ====== */
.topic-list { display: flex; flex-direction: column; gap: 8px; }
.topic-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--color-surface); border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light); transition: all var(--transition-fast);
}
.topic-item:hover { border-color: var(--color-border); }
.topic-item-info { flex: 1; min-width: 0; }
.topic-item-name { font-size: 14px; font-weight: 500; color: var(--color-text); }
.topic-item-meta { font-size: 11px; color: var(--color-text-tertiary); margin-top: 3px; }
.topic-item-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.topic-item.selected { border-color: var(--color-accent); background: var(--color-accent-soft); }
.topic-item.disabled { opacity: 0.4; }
.topic-empty { text-align: center; padding: 40px 20px; color: var(--color-text-tertiary); font-size: 13px; }
.topic-disable-btn {
  font-size: 10px; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--color-border);
  background: var(--color-bg); color: var(--color-text-tertiary); cursor: pointer;
  font-family: inherit; transition: all var(--transition-fast); white-space: nowrap;
}
.topic-disable-btn:hover { background: #fef2f2; color: var(--color-danger); border-color: #fecaca; }
.topic-disable-btn.is-disabled { background: #fef2f2; color: var(--color-danger); border-color: #fecaca; }

/* ====== Topic image management ====== */
.topic-image-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; min-height: 40px;
}
.topic-image-item {
  position: relative; width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--color-border); background: var(--color-bg); flex-shrink: 0;
}
.topic-image-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.topic-image-item .topic-image-remove {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  background: rgba(0,0,0,0.55); color: #fff; border: none; border-radius: 50%;
  font-size: 11px; line-height: 20px; text-align: center; cursor: pointer;
  opacity: 0; transition: opacity var(--transition-fast);
}
.topic-image-item:hover .topic-image-remove { opacity: 1; }
.topic-image-empty {
  width: 80px; height: 80px; border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; color: var(--color-text-tertiary);
  font-size: 22px; flex-shrink: 0;
}
.topic-image-actions { margin-top: 4px; }
.topic-image-uploading { opacity: 0.5; pointer-events: none; }

/* ====== Modal ====== */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.35); z-index: 100; align-items: center;
  justify-content: center; backdrop-filter: blur(2px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--color-surface); border-radius: var(--radius-lg); width: 90%;
  max-height: 70%; display: flex; flex-direction: column;
  box-shadow: var(--shadow-modal);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--color-border-light);
}
.modal-header h3 { font-size: 15px; font-weight: 600; color: var(--color-text); }
.modal-close {
  font-size: 20px; color: var(--color-text-tertiary); cursor: pointer;
  background: none; border: none; width: 30px; height: 30px; border-radius: 50%;
  transition: all var(--transition-fast); display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--color-bg); color: var(--color-text); }
.modal-body {
  flex: 1; overflow-y: auto; padding: 12px 16px; font-size: 13px;
  line-height: 1.6; color: var(--color-text); white-space: pre-wrap;
}
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--color-border-light);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ====== Toggle ====== */
.toggle-wrapper { display: flex; align-items: center; gap: 10px; }
.toggle-label { font-size: 13px; color: var(--color-text-secondary); font-weight: 500; }
.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--color-border);
  border-radius: 12px; cursor: pointer; transition: all var(--transition-smooth);
}
.toggle-slider::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform var(--transition-smooth);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.toggle input:checked + .toggle-slider { background: var(--color-accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ====== History ====== */
.history-layout {
  display: flex; flex: 1; overflow: hidden;
}
.history-scroll {
  flex: 1; min-width: 0; overflow-y: auto; background: var(--color-bg); padding: 14px 16px;
}
.history-scroll::-webkit-scrollbar { width: 4px; }
.history-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

/* ====== History stats (右侧统计面板) ====== */
.history-stats {
  width: 380px; flex-shrink: 0; border-left: 1px solid var(--color-border-light);
  background: var(--color-bg); overflow-y: auto; padding: 14px 16px;
}
.history-stats::-webkit-scrollbar { width: 4px; }
.history-stats::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.stats-filter { margin-bottom: 14px; }
.stats-filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.stats-filter-tab {
  padding: 4px 10px; font-size: 11px; color: var(--color-text-secondary); cursor: pointer;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 6px; font-family: inherit; transition: all var(--transition-fast);
}
.stats-filter-tab:hover { border-color: var(--color-accent); color: var(--color-accent); }
.stats-filter-tab.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; font-weight: 600; }
.stats-custom-range { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.stats-custom-range .form-input { padding: 4px 6px; font-size: 11px; }
.stats-range-sep { color: var(--color-text-tertiary); font-size: 11px; }

.stats-hero {
  background: var(--color-surface); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.stats-hero-label { font-size: 11px; color: var(--color-text-secondary); font-weight: 500; }
.stats-hero-value { font-size: 44px; font-weight: 700; color: var(--color-text); line-height: 1.15; margin-top: 2px; }
.stats-hero-range { font-size: 10px; color: var(--color-text-tertiary); margin-top: 4px; }

.stats-section { margin-bottom: 18px; }
.stats-section h4 {
  font-size: 11px; font-weight: 700; color: var(--color-text); margin-bottom: 8px;
  padding-bottom: 3px; border-bottom: 1px solid var(--color-border-light);
}
.stats-empty { padding: 18px 0; text-align: center; color: var(--color-text-tertiary); font-size: 12px; }

/* ====== Bar charts ====== */
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label {
  flex: 0 0 96px; font-size: 11px; color: var(--color-text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
}
.bar-track { flex: 1; height: 14px; background: var(--color-border-light); border-radius: 4px; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; transition: width var(--transition-smooth); }
.bar-topic { background: var(--color-accent); }
.bar-daily { background: #9c9a98; }
.bar-count {
  flex: 0 0 24px; font-size: 11px; font-weight: 600; color: var(--color-text);
  text-align: right; font-variant-numeric: tabular-nums;
}

.history-item {
  background: var(--color-surface); border-radius: var(--radius-md);
  padding: 10px 14px; margin-bottom: 6px; border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card); cursor: pointer; transition: all var(--transition-smooth);
}
.history-item:hover {
  box-shadow: var(--shadow-card-hover); border-color: var(--color-border);
}
.history-item-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px;
}
.history-item-title {
  font-size: 12px; font-weight: 600; color: var(--color-text);
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-item-meta {
  font-size: 10px; color: var(--color-text-tertiary); margin-top: 2px;
  display: flex; gap: 10px;
}
.history-empty { text-align: center; padding: 40px; color: var(--color-text-tertiary); font-size: 13px; }

.history-detail-section { margin-bottom: 6px; }
.history-detail-section h4 {
  font-size: 11px; font-weight: 700; color: var(--color-accent); margin-bottom: 4px;
  padding-bottom: 3px; border-bottom: 1px solid var(--color-border-light);
}
.history-detail-section .kv { font-size: 11px; color: var(--color-text-secondary); margin: 1px 0; }
.history-detail-section .kv b { color: var(--color-text); }

/* ====== Scheduler badge ====== */
.scheduler-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600;
  margin-left: 8px; vertical-align: middle;
}
.scheduler-badge.running { background: #ecfdf5; color: var(--color-success); }
.scheduler-badge.stopped { background: var(--color-bg); color: var(--color-text-tertiary); }

/* ====== Global scrollbar ====== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== GEO 曝光检测页（#tab-geo-content 作用域内，避免影响其它页面已有的 class="card"） ========== */
#tab-geo-content { align-items: stretch; }
.geo-wrap { padding: 16px; overflow: auto; height: 100%; box-sizing: border-box; }
.geo-unconfigured {
  max-width: 560px; margin: 48px auto; padding: 20px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 10px; color: var(--color-text); font-size: 13px;
}
.geo-layout { display: flex; gap: 16px; align-items: flex-start; }
.geo-left { flex: 0 0 400px; display: flex; flex-direction: column; gap: 16px; }
.geo-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
#tab-geo-content .card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 10px; padding: 14px 16px;
}
#tab-geo-content .card-title {
  font-size: 13px; font-weight: 600; color: var(--color-text);
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border-light);
}
.geo-engines { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.geo-engine { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-text); cursor: pointer; }
.geo-engine.disabled { color: var(--color-text-tertiary); cursor: not-allowed; }
.geo-row { display: flex; gap: 12px; }
.geo-row .form-group { flex: 1; }
.geo-cost { margin-top: 4px; }
.geo-charge-hint {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--color-accent-soft); color: var(--color-text-secondary); font-size: 12px; line-height: 1.6;
}
.geo-filter-row { display: flex; gap: 8px; margin-bottom: 10px; }
.geo-filter-row .form-input { flex: 1; }
.geo-history { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.geo-history-item {
  padding: 8px 10px; border: 1px solid var(--color-border-light); border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--color-text);
}
.geo-history-item:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.geo-empty { color: var(--color-text-tertiary); font-size: 13px; padding: 12px 0; text-align: center; }
.geo-detail { font-size: 13px; color: var(--color-text); }
.geo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.geo-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px;
  background: var(--color-border-light); color: var(--color-text-secondary);
}
.geo-badge-success { background: #ecfdf5; color: var(--color-success); }
.geo-badge-failed { background: #fef2f2; color: var(--color-danger); }
.geo-badge-partial { background: #fffbeb; color: var(--color-warning); }
.geo-badge-running, .geo-badge-pending { background: var(--color-accent-soft); color: var(--color-accent); }
.geo-meta { color: var(--color-text-secondary); font-size: 12px; margin-top: 4px; line-height: 1.6; }
.geo-progress { height: 6px; border-radius: 999px; background: var(--color-border-light); margin: 10px 0 6px; overflow: hidden; }
.geo-bar { height: 100%; background: var(--color-accent); transition: width .3s ease; }
.geo-charge { margin-top: 8px; font-size: 12px; color: var(--color-text-secondary); }
.geo-charge.is-charged { color: var(--color-warning); font-weight: 600; }
.geo-error { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: var(--color-danger); font-size: 12px; }
.geo-reasoning { margin-top: 8px; font-size: 12px; color: var(--color-text-secondary); }
.geo-reasoning pre { white-space: pre-wrap; word-break: break-word; max-height: 200px; overflow: auto; background: var(--color-bg); padding: 8px; border-radius: 8px; }
.geo-analysis { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--color-border-light); }
.geo-section-title { font-size: 13px; font-weight: 600; margin: 14px 0 8px; color: var(--color-text); }
.geo-metrics { display: flex; gap: 10px; flex-wrap: wrap; }
.geo-metrics > div {
  flex: 1; min-width: 96px; text-align: center; padding: 8px;
  background: var(--color-bg); border-radius: 8px;
}
.geo-metrics b { display: block; font-size: 16px; color: var(--color-text); }
.geo-metrics span { font-size: 11px; color: var(--color-text-tertiary); }
.geo-brands { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.geo-brand-chip { padding: 2px 8px; border-radius: 999px; background: var(--color-bg); color: var(--color-text-secondary); font-size: 12px; }
.geo-summary { margin-top: 8px; line-height: 1.7; }
.geo-q { margin-top: 12px; padding: 10px; border: 1px solid var(--color-border-light); border-radius: 8px; }
.geo-q-title { font-weight: 600; }
.geo-tag { padding: 1px 6px; border-radius: 4px; background: var(--color-border-light); color: var(--color-text-secondary); font-size: 11px; font-weight: 400; }
.geo-tag-hit { background: #ecfdf5; color: var(--color-success); }
.geo-engine-group { margin-top: 8px; }
.geo-engine-name { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 4px; }
.geo-item { padding: 6px 8px; border-left: 2px solid var(--color-border-light); margin-bottom: 6px; }
.geo-item.is-hit { border-left-color: var(--color-success); background: #ecfdf5; border-radius: 0 6px 6px 0; }
.geo-item-title { font-size: 13px; }
.geo-item-snippet { font-size: 12px; color: var(--color-text-secondary); line-height: 1.6; margin-top: 2px; }
.geo-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.geo-table th, .geo-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--color-border-light); }
.geo-table th { color: var(--color-text-tertiary); font-weight: 500; }
.geo-stats { font-size: 13px; }


/* ====== 充值页（ai_pay 充值中心 iframe） ====== */
.recharge-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.recharge-toolbar { display: flex; justify-content: flex-end; padding: 6px 12px; }
.recharge-frame { flex: 1; width: 100%; border: none; background: var(--color-surface); }
.recharge-error {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-text-secondary);
  font-size: 13px;
}

/* ========== GEO 检测 v2（三屏：列表 / 详情 / 弹窗） ==========
   说明：全部用 .geo2- 前缀，与 v1 的 .geo-* 明细样式互不干扰；
   弹窗部分只做作用域微调（.geo-modal），复用应用既有 .modal-* 组件。 */
:root {
  --ink-muted: #78716c;
  --ink-accent: #c2410c;
  --ink-success: #047857;
  /* 来源站点堆叠条的「出现但没提到你」段：对白底 3.42:1，满足 WCAG 1.4.11 图形对比度 3:1；
     不能再复用 --color-border(#e7e5e4)，它与轨道 --color-border-light(#f0efed) 只差 1.09:1，长度会读不出来。 */
  --ink-gap: #8f8a85;
  --ink-warning: #b45309;
  --ink-danger: #b91c1c;
}

.geo2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.geo2-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 页面骨架 ---------- */
.geo2-page { flex: 1; min-width: 0; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; scrollbar-gutter: stable; }
/* 详情屏外壳：返回条固定在上方不参与滚动，报告在里面的 .geo2-page 里滚 —— 这样头部永远贴着顶边，
   不会像 sticky 那样被滚动容器的 padding/gap 顶下去而露出空白带 */
.geo2-screen { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

/* 可见滚动条：全局默认是 4px + 最浅的 --color-border + 透明轨道，在长报告里基本看不见
   （用户反馈「找不到滚动条」）。GEO 屏单独加粗加色，滑块常态就可见、悬停更深、拖动时用品牌色。 */
.geo2-page::-webkit-scrollbar,
.geo2-qlist::-webkit-scrollbar,
.geo-modal .modal-body::-webkit-scrollbar { width: 11px; height: 11px; }
.geo2-page::-webkit-scrollbar-track,
.geo2-qlist::-webkit-scrollbar-track,
.geo-modal .modal-body::-webkit-scrollbar-track { background: var(--color-bg); border-radius: 999px; }
.geo2-page::-webkit-scrollbar-thumb,
.geo2-qlist::-webkit-scrollbar-thumb,
.geo-modal .modal-body::-webkit-scrollbar-thumb { background: #a8a29e; border-radius: 999px; border: 2px solid var(--color-bg); }
.geo2-page::-webkit-scrollbar-thumb:hover,
.geo2-qlist::-webkit-scrollbar-thumb:hover,
.geo-modal .modal-body::-webkit-scrollbar-thumb:hover { background: #78716c; }
.geo2-page::-webkit-scrollbar-thumb:active,
.geo2-qlist::-webkit-scrollbar-thumb:active,
.geo-modal .modal-body::-webkit-scrollbar-thumb:active { background: var(--color-accent); }

/* 逐条明细自己滚（660 条结果时不必让整页无限变长） */
/* 明细区不再自己滚动：外层 #geo-detail-scroll 就是滚动容器，套两层滚动条会互相抢滚轮
   （2026-10-13 实测：内层内容 150484px 塞在 671px 的小窗里）。每个问法现在只先渲染
   GEO_ITEM_PREVIEW 条结果，页面长度可控，交给外层滚动更自然。 */
.geo2-qlist { padding-right: 4px; }
.geo2-unconfigured { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.geo2-unconf-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--color-text); }
/* 报告块间距统一在这里给：#geo-detail 是普通块容器，.geo2-card 之间原本没有 margin，
   卡片首尾相接（2026-10-28 反馈「块之间没有间隔」）。改成 flex 列 + gap，块间距只有一个来源。 */
#geo-detail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.geo2-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 16px 18px; }
.geo2-title { font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border-light); display: flex; align-items: center; gap: 8px; }
.geo2-title-hint { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--ink-muted); }
.geo2-muted { color: var(--ink-muted); font-size: 11px; }
.geo2-sub { color: var(--color-text-secondary); font-size: 12px; line-height: 1.6; }
.geo2-row { display: flex; gap: 12px; }
.geo2-row .geo2-field { flex: 1; }

/* ---------- 按钮 / chip / 状态点 ---------- */
.geo2-btn { padding: 5px 12px; font-size: 12px; font-family: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-secondary); transition: all var(--transition-fast); }
.geo2-btn:hover { border-color: var(--color-accent); color: var(--ink-accent); }
.geo2-btn:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 2px; }
.geo2-btn-primary { padding: 6px 14px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; border-radius: 6px; border: none; background: var(--color-accent); color: #fff; transition: all var(--transition-fast); }
.geo2-btn-primary:hover { background: var(--color-accent-hover); }
.geo2-btn-primary:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 2px; }
.geo2-btn-primary:disabled { background: var(--color-border); color: var(--ink-muted); cursor: not-allowed; }
.geo2-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--color-border-light); color: var(--color-text-secondary); }
.geo2-chip-ok { background: #ecfdf5; color: var(--ink-success); }
.geo2-chip-warn { background: #fffbeb; color: var(--ink-warning); }
.geo2-chip-err { background: #fef2f2; color: var(--ink-danger); }
.geo2-chip-info { background: var(--color-accent-soft); color: var(--ink-accent); }
.geo2-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--color-border); display: inline-block; flex-shrink: 0; }
.geo2-dot.ok { background: var(--ink-success); }
.geo2-dot.run { background: var(--color-accent); }
/* 用 ink 令牌（WCAG 对比度调过的深色）而不是 --color-*，与 chip-err/warn 保持一致 */
.geo2-dot.err { background: var(--ink-danger); }
.geo2-dot.warn { background: var(--ink-warning); }
.geo2-delta { font-size: 12px; font-weight: 600; }
.geo2-delta.up { color: var(--ink-success); }
.geo2-delta.down { color: var(--ink-danger); }
.geo2-delta.flat { color: var(--ink-muted); font-weight: 400; }
.geo2-skel { display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #f0efed 25%, #e7e5e4 37%, #f0efed 63%); background-size: 400% 100%; animation: geo2skel 1.4s ease infinite; }
@keyframes geo2skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.geo2-notice { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 8px; font-size: 12px; line-height: 1.6; background: var(--color-accent-soft); color: var(--color-text-secondary); }
.geo2-notice.warn { background: #fffbeb; color: var(--ink-warning); }
.geo2-inline-error { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: var(--ink-danger); font-size: 12px; }

/* ---------- 列表屏：头 / 筛选 / 概览 ---------- */
.geo2-page-head { display: flex; align-items: center; gap: 10px; }
.geo2-page-head h2 { font-size: 15px; font-weight: 600; color: var(--color-text); }
.geo2-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.geo2-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.geo2-filter { padding: 5px 8px; font-size: 12px; font-family: inherit; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); color: var(--color-text); }
.geo2-filter:focus { border-color: var(--color-accent); outline: none; box-shadow: 0 0 0 3px rgba(232,93,58,0.08); }
.geo2-search { flex: 1; min-width: 130px; padding: 5px 8px; font-size: 12px; font-family: inherit; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); color: var(--color-text); box-sizing: border-box; }
.geo2-search:focus { border-color: var(--color-accent); outline: none; box-shadow: 0 0 0 3px rgba(232,93,58,0.08); }
.geo2-overview { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 9px 12px; border-radius: 8px; background: var(--color-accent-soft); font-size: 12px; color: var(--color-text-secondary); }
.geo2-overview b { color: var(--ink-accent); }

/* ---------- 列表表格（8 列栅格，与 thead/trow 一一对应） ---------- */
.geo2-table { border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); overflow: hidden; }
.geo2-thead, .geo2-trow { display: grid; grid-template-columns: 86px minmax(150px, 1fr) 84px 92px 108px 104px 118px 60px; align-items: center; gap: 8px; padding: 9px 12px; }
.geo2-thead { font-size: 11px; font-weight: 600; color: var(--ink-muted); background: var(--color-bg); border-bottom: 1px solid var(--color-border-light); }
.geo2-trow { font-size: 12px; border-bottom: 1px solid var(--color-border-light); cursor: pointer; color: var(--color-text); }
.geo2-trow:last-child { border-bottom: none; }
.geo2-trow:hover { background: var(--color-accent-soft); }
.geo2-trow:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: -2px; }
.geo2-trow.is-running { background: #fffdf8; }
.geo2-cell-main { min-width: 0; }
.geo2-cell-main .t1 { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo2-cell-main .t2 { display: block; font-size: 11px; color: var(--ink-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo2-rate { font-weight: 700; font-variant-numeric: tabular-nums; }
.geo2-rowlink { font-size: 12px; color: var(--ink-accent); background: none; border: none; cursor: pointer; font-family: inherit; padding: 2px 4px; }
.geo2-empty { max-width: 520px; margin: 20px auto; text-align: center; }
.geo2-empty-icon { font-size: 30px; }
.geo2-empty h3 { font-size: 15px; margin: 10px 0 6px; color: var(--color-text); }
.geo2-empty p { font-size: 13px; color: var(--color-text-secondary); line-height: 1.7; }
.geo2-steps3 { text-align: left; margin: 16px auto 18px; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.geo2-steps3 div { display: flex; gap: 10px; font-size: 13px; align-items: flex-start; }
.geo2-steps3 i { flex-shrink: 0; width: 20px; height: 20px; border-radius: 999px; background: var(--color-accent-soft); color: var(--ink-accent); font-size: 11px; font-style: normal; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- 分页 ---------- */
.geo2-pager { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }
.geo2-pager button { min-width: 26px; padding: 4px 8px; font-size: 12px; font-family: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-secondary); }
.geo2-pager button:hover { border-color: var(--color-accent); color: var(--ink-accent); }
.geo2-pager button[aria-current="page"] { background: var(--color-accent); border-color: var(--color-accent); color: #fff; font-weight: 600; }
.geo2-pager button:disabled { color: var(--ink-muted); cursor: not-allowed; border-color: var(--color-border-light); }
.geo2-pager .geo2-pager-gap { color: var(--ink-muted); padding: 0 2px; }
.geo2-pager .geo2-pager-total { color: var(--ink-muted); margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; }
.geo2-pager select { padding: 2px 4px; font-size: 12px; font-family: inherit; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); }

/* ---------- 详情屏：返回条 ---------- */
.geo2-back { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--color-bg); border-bottom: 1px solid var(--color-border-light); }
.geo2-back > button { font-size: 12px; font-family: inherit; cursor: pointer; border: none; background: none; color: var(--ink-accent); padding: 2px 0; }
.geo2-back > button:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 2px; }
.geo2-crumb { font-size: 12px; color: var(--ink-muted); }

/* ---------- 详情屏：结论条 / 指标 ---------- */
.geo2-verdict { border-left: 3px solid var(--color-accent); }
.geo2-verdict-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.geo2-verdict-brand { font-size: 15px; font-weight: 600; color: var(--color-text); }
.geo2-verdict-body { display: flex; gap: 20px; align-items: flex-end; margin-top: 12px; flex-wrap: wrap; }
.geo2-hero { min-width: 150px; }
.geo2-hero-num { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--color-text); font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.geo2-hero-label { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }
.geo2-hero-conclusion { flex: 1; min-width: 240px; font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--color-text); }
.geo2-hero-conclusion em { font-style: normal; color: var(--ink-accent); }
.geo2-hero-foot { margin-top: 10px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--color-text-secondary); }
/* 统计块：用等宽栅格（flex + min-width 在换行后会把最后一行各自拉宽，同一组数字宽度不齐）。
   auto-fit 会在空轨道上折叠：3 项就是 3 等分，4 项就是 4 等分，行内天然等高。 */
.geo2-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.geo2-stat { min-width: 0; background: var(--color-bg); border-radius: 8px; padding: 10px 12px; }
.geo2-stat b { display: block; font-size: 17px; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.geo2-stat span { display: block; font-size: 11px; color: var(--ink-muted); margin-top: 2px; }
.geo2-stat i { font-style: normal; font-size: 11px; color: var(--color-text-secondary); display: block; margin-top: 4px; }

/* ---------- 详情屏：趋势 / 条形 / 渠道 ---------- */
.geo2-trend { width: 100%; height: 150px; display: block; }
.geo2-hbars { display: flex; flex-direction: column; gap: 8px; }
.geo2-hbar { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 8px; font-size: 12px; }
.geo2-hbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo2-hbar-track { display: block; height: 8px; border-radius: 999px; background: var(--color-border-light); overflow: hidden; }
.geo2-hbar-fill { display: block; height: 100%; border-radius: 999px; background: var(--color-accent); }
.geo2-hbar-fill.self { background: var(--ink-success); }
.geo2-hbar-fill.zero { background: var(--color-border); }
.geo2-hbar-count { text-align: right; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.geo2-hbar.is-self .geo2-hbar-name { font-weight: 600; }

/* 来源站点卡片：部分-整体堆叠条 + 右侧三列数字（出现 / 其中提到你 / 命中率） */
.geo2-hbar-src { grid-template-columns: 128px 1fr 48px 76px 48px; }
.geo2-hbar-src .geo2-hbar-track { position: relative; }
.geo2-hbar-src .geo2-hbar-fill { position: absolute; left: 0; top: 0; }
.geo2-hbar-fill.gap { background: var(--ink-gap); }
.geo2-hbar-fill.hit { background: var(--color-accent); min-width: 4px; }
.geo2-hbar-count.is-hit { color: var(--ink-success); font-weight: 600; }
.geo2-hbar-count.is-hit.is-zero { color: var(--ink-muted); font-weight: 400; }
.geo2-src-head { color: var(--ink-muted); font-size: 11px; font-weight: 600; }
.geo2-src-legend { display: flex; gap: 16px; margin: -4px 0 8px; font-size: 11px; color: var(--ink-muted); }
.geo2-src-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.geo2-src-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.geo2-src-dot.hit { background: var(--color-accent); }
.geo2-src-dot.gap { background: var(--ink-gap); }
.geo2-src-rows { padding-bottom: 4px; }
.geo2-src-tr { display: grid; grid-template-columns: 1fr 52px 76px 52px 60px; gap: 8px; align-items: center;
  padding: 4px 0; font-size: 12px; border-top: 1px solid var(--color-border-light); font-variant-numeric: tabular-nums; }
.geo2-src-tr > span:not(.geo2-src-name) { text-align: right; }
.geo2-src-th { color: var(--ink-muted); font-size: 11px; font-weight: 600; border-top: none; }
.geo2-src-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo2-src-hit { color: var(--ink-success); font-weight: 600; }
.geo2-src-hit.is-zero { color: var(--ink-muted); font-weight: 400; }
.geo2-src-gap { color: var(--color-accent); font-weight: 600; }
.geo2-src-gap.is-zero { color: var(--ink-muted); font-weight: 400; }
.geo2-chans { display: flex; flex-direction: column; gap: 10px; }
.geo2-chan { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 10px; font-size: 12px; }
.geo2-chan-bar { display: block; height: 6px; border-radius: 999px; background: var(--color-border-light); overflow: hidden; }
.geo2-chan-fill { display: block; height: 100%; background: var(--ink-success); border-radius: 999px; }
.geo2-chan-fill.warn { background: var(--color-warning); }
.geo2-chan-meta { color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 详情屏：建议 / 明细 ---------- */
.geo2-suggests { display: flex; flex-direction: column; gap: 10px; }
.geo2-suggest { border-left: 3px solid var(--color-accent); background: var(--color-accent-soft); padding: 10px 12px; border-radius: 0 8px 8px 0; }
.geo2-suggest p { font-size: 13px; line-height: 1.65; color: var(--color-text); }
.geo2-suggest b { color: var(--ink-accent); }
.geo2-suggest summary { font-size: 12px; color: var(--ink-accent); cursor: pointer; margin-top: 6px; }
.geo2-suggest ul { margin: 6px 0 0 18px; font-size: 12px; color: var(--color-text-secondary); line-height: 1.7; }
.geo2-details { border: 1px solid var(--color-border-light); border-radius: 10px; background: var(--color-surface); padding: 0 16px; }
.geo2-details > summary { padding: 12px 0; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--color-text); }
.geo2-details[open] > summary { border-bottom: 1px solid var(--color-border-light); margin-bottom: 10px; }
.geo2-details > div { padding-bottom: 14px; }
.geo2-q { margin-top: 10px; padding: 10px; border: 1px solid var(--color-border-light); border-radius: 8px; }
.geo2-q > summary { font-size: 13px; font-weight: 600; cursor: pointer; color: var(--color-text); }
/* 结果内搜索行（在详情屏静态区，不随报告重渲染） */
.geo2-qsearch { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.geo2-qsearch .form-input { flex: 1; min-width: 0; box-sizing: border-box; }
.geo2-qsearch-count { font-size: 11px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.geo2-qsearch.is-empty { border-color: #fecaca; background: #fffbfb; }
.geo2-qsearch.is-empty .form-input { border-color: var(--color-danger); }
.geo2-qsearch.is-empty .geo2-qsearch-count { color: var(--ink-danger); }

/* ---------- 详情屏：进行中 ---------- */
.geo2-progress { height: 8px; border-radius: 999px; background: var(--color-border-light); overflow: hidden; margin: 12px 0 6px; }
.geo2-progress-fill { display: block; height: 100%; background: var(--color-accent); border-radius: 999px; transition: width .3s ease; }
.geo2-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.geo2-step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.geo2-step-dot { width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; background: var(--color-border-light); color: var(--ink-muted); font-weight: 600; }
.geo2-step.is-done { color: var(--ink-success); }
.geo2-step.is-done .geo2-step-dot { background: #ecfdf5; color: var(--ink-success); }
.geo2-step.is-active { color: var(--ink-accent); font-weight: 600; }
.geo2-step.is-active .geo2-step-dot { background: var(--color-accent-soft); color: var(--ink-accent); }
/* AI 总结失败/跳过：阶段已结束但没产出，不能显示成进行中，也不能打钩 */
.geo2-step.is-err { color: var(--ink-danger); }
.geo2-step.is-err .geo2-step-dot { background: #fef2f2; color: var(--ink-danger); }
.geo2-step-sep { width: 24px; height: 1px; background: var(--color-border); }
.geo2-run-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.geo2-run-timer { margin-left: auto; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-text); }
.geo2-qrows { display: flex; flex-direction: column; gap: 8px; }
.geo2-qrow { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 8px 10px; border: 1px solid var(--color-border-light); border-radius: 8px; color: var(--color-text); }
.geo2-qrow.is-pending { color: var(--ink-muted); }

/* ---------- 弹窗（复用 .modal-*，只做作用域微调） ---------- */
.geo-modal .modal { width: min(520px, 92%); max-height: 84%; }
.geo-modal .modal-body { white-space: normal; padding: 14px 20px; max-height: 62vh; overflow-y: auto; }
.geo-modal .modal-footer { align-items: center; }
.geo2-foot-note { margin-right: auto; font-size: 11px; color: var(--ink-muted); }
.geo2-field { margin-bottom: 12px; }
.geo2-field:last-child { margin-bottom: 0; }
.geo2-field label { display: block; font-size: 12px; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 5px; }
.geo2-field .req { color: var(--color-danger); }
.geo2-field .form-input { width: 100%; box-sizing: border-box; }
.geo2-field .geo2-field-err { font-size: 11px; color: var(--ink-danger); margin-top: 4px; }
.geo2-field.has-err .form-input, .geo2-field.is-err .form-input { border-color: var(--color-danger); }
.geo2-presets { display: flex; gap: 6px; }
.geo2-preset { flex: 1; padding: 7px 6px; font-size: 12px; font-family: inherit; cursor: pointer; text-align: center; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text-secondary); }
.geo2-preset.is-on { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--ink-accent); font-weight: 600; }
.geo2-checks { display: flex; flex-direction: column; }
.geo2-check { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 0; color: var(--color-text); cursor: pointer; }
.geo2-adv summary { font-size: 12px; color: var(--ink-accent); cursor: pointer; padding: 6px 0; font-weight: 600; }
.geo2-adv > div { padding-top: 4px; }
.geo2-costline { margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--color-accent-soft); font-size: 12px; line-height: 1.6; color: var(--color-text-secondary); }
.geo2-costline b { color: var(--ink-accent); }

/* ---------- 新建检测：两步向导（作用域限定 #geo-step-bar / #geo-step-2，
   .geo2-step 在详情屏的进度条里也在用，不要改它的全局规则） ---------- */
#geo-step-bar { margin-bottom: 14px; list-style: none; }
#geo-step-bar .geo2-step b { width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: var(--color-border-light); color: var(--ink-muted); flex: none; }
#geo-step-bar .geo2-step.is-on { color: var(--ink-accent); font-weight: 600; }
#geo-step-bar .geo2-step.is-on b { background: var(--color-accent-soft); color: var(--ink-accent); }
#geo-step-bar .geo2-step-sep { width: 24px; height: 1px; background: var(--color-border); }
#geo-step-2 .geo2-step2-intro { margin-bottom: 8px; }
#geo-step-2 .geo2-notice { margin-bottom: 8px; }
/* 还没开始匹配时状态行是空的：别留一个空的浅色块占位 */
#geo-step-2 .geo2-notice:empty { display: none; }
#geo-step2-evidence { margin: 0 0 10px; }
/* 品牌档案：第 2 步的核对区。原来是可折叠的 <details>，现在要一眼看全，就摊平成卡片 */
#geo-brand-profile { border: 1px solid var(--color-border-light); border-radius: var(--radius-md); background: var(--color-surface); padding: 12px 14px; margin-bottom: 12px; }
#geo-brand-profile .geo2-sub-title { margin-bottom: 8px; }
#geo-step-2 .geo2-field:last-child { margin-bottom: 0; }

/* 第 2 步的「匹配中」遮罩：定位基准放在面板本身，只盖这一块，不碰 .modal-body 自带的
   max-height:62vh / overflow-y:auto（遮罩不改高度，长内容照样能滚）。 */
#geo-step-2 { position: relative; }
#geo-step2-mask { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; min-height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255, 255, 255, .78); border-radius: var(--radius-md); cursor: progress; }
#geo-step2-mask .geo2-spinner { width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--color-border); border-top-color: var(--ink-accent); animation: geoSpin .8s linear infinite; }
.geo2-mask-text { padding: 0 18px; font-size: 12.5px; font-weight: 600; color: var(--color-text-secondary); text-align: center; }
@keyframes geoSpin { to { transform: rotate(360deg); } }
/* 动效敏感的人给慢速旋转，而不是彻底不动（不动就看不出还在跑） */
@media (prefers-reduced-motion: reduce) { #geo-step2-mask .geo2-spinner { animation-duration: 2.4s; } }

/* 列表里的「两行单元格」（结果 / 时间）：主行 + 弱化子行各占一行。
   原来子行用 ' · xxx' 拼在同一行，列宽固定时会被折行，同一列出现 16px / 32px 两种行高。 */
.geo2-col-stack { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.geo2-col-stack > .geo2-muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 逐条明细：每个问法默认只渲染前若干条结果，其余点这里补 */
.geo2-qmore { display: block; width: 100%; margin-top: 10px; padding: 7px 10px; border: 1px dashed var(--color-border);
  border-radius: 8px; background: var(--color-bg); color: var(--ink-accent); font-size: 12px; font-weight: 600; cursor: pointer; }
.geo2-qmore:hover { background: var(--color-accent-soft); border-color: var(--color-accent); }

/* 复制报告两条路都失败时的兜底：把 Markdown 摊在详情页顶部，用户自己 Ctrl+C */
.geo2-copyfallback { border: 1px solid var(--color-danger); border-radius: 10px; background: #fffbfb; padding: 10px 12px; margin-bottom: 10px; }
.geo2-copyfallback-head { font-size: 12px; color: var(--ink-danger); margin-bottom: 8px; }
.geo2-copyfallback-area { width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.6; border: 1px solid var(--color-border); border-radius: 8px; padding: 8px; resize: vertical;
  color: var(--color-text); background: var(--color-surface); }

/* 窄窗口（应用最小 780×600）：隐藏渠道列，压缩其余列，避免横向滚动 */
@media (max-width: 959px) {
  .geo2-col-engine { display: none; }
  .geo2-thead, .geo2-trow { grid-template-columns: 72px minmax(110px, 1fr) 72px 92px 92px 108px 52px; }
  .geo2-verdict-body { gap: 12px; }
  .geo2-hero-num { font-size: 26px; }
}

/* ========== 报告 v1（结论 → 发现 → 行动 → 证据；视觉参考 docs/GEO检测报告-重构样张-v1.html） ==========
   命名沿用现有 .geo2-* 体系；数字/条形复用 .geo2-stats/.geo2-hbar，新增的只有叙事层组件。
   宽度约束：1024/1280 两列不横向溢出，<=900px 的窗口（应用最小 780）全部单列。 */
.geo2-headline { font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -.3px; margin: 14px 0 10px; color: var(--color-text); }
.geo2-headline em { font-style: normal; color: var(--ink-accent); }
.geo2-summary { font-size: 14px; line-height: 1.75; color: var(--color-text-secondary); max-width: 900px; white-space: pre-wrap; }
.geo2-hero-stats { margin-top: 18px; }
.geo2-finding, .geo2-action { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-border-light); }
.geo2-finding:first-of-type, .geo2-action:first-of-type { border-top: none; padding-top: 0; }
.geo2-finding-num { width: 26px; height: 26px; border-radius: 8px; background: var(--color-accent-soft); color: var(--ink-accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; font-variant-numeric: tabular-nums; }
.geo2-finding-body, .geo2-action-body { min-width: 0; flex: 1; }
.geo2-finding h3, .geo2-action h3 { font-size: 13px; line-height: 1.5; margin-bottom: 3px; color: var(--color-text); }
.geo2-finding p, .geo2-action p { font-size: 12px; line-height: 1.7; color: var(--color-text-secondary); }
.geo2-actions { list-style: none; }
.geo2-action-num { width: 22px; height: 22px; border-radius: 999px; background: var(--color-accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; }
.geo2-link { margin-top: 5px; padding: 0; border: none; background: none; color: var(--ink-accent); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.geo2-link:hover { text-decoration: underline; }
.geo2-link:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 2px; }
.geo2-qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.geo2-qcard { border: 1px solid var(--color-border-light); border-radius: var(--radius-md); padding: 12px 14px; background: var(--color-surface); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.geo2-qcard.is-missed { background: #fffdfa; border-color: #f5e6d8; }
.geo2-qcard-head { display: flex; align-items: flex-start; gap: 8px; }
.geo2-qseq { font-size: 11px; font-weight: 700; color: var(--ink-accent); background: var(--color-accent-soft); border-radius: 4px; padding: 1px 5px; flex: none; margin-top: 2px; }
.geo2-qcard-head h3 { font-size: 13px; line-height: 1.45; font-weight: 600; flex: 1; min-width: 0; color: var(--color-text); }
.geo2-qcard-head .geo2-chip { flex: none; font-size: 11px; }
.geo2-qmeta { font-size: 11px; color: var(--ink-muted); }
.geo2-qbrands { display: flex; flex-wrap: wrap; gap: 5px; }
.geo2-chip-brand { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--color-bg); color: var(--color-text-secondary); }
.geo2-chip-brand.is-own { background: #ecfdf5; color: var(--ink-success); font-weight: 600; }
.geo2-qnote { font-size: 12px; line-height: 1.65; color: var(--color-text-secondary); }
/* 并排卡片等高（原来是 align-items: start，两张卡内容长短不一时下边缘参差） */
.geo2-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.geo2-srctype { display: flex; flex-direction: column; gap: 8px; }
/* 竞品/来源类型的右侧数字更长（「21 次 · 出现在 6/10 个问题」），单独加宽计数列 */
.geo2-hbar-rpt { grid-template-columns: 100px 1fr 132px; }
.geo2-hbar-rpt .geo2-hbar-count { white-space: normal; line-height: 1.35; }
.geo2-gap-callout { margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--color-accent-soft); font-size: 12px; line-height: 1.7; color: var(--color-text-secondary); }
.geo2-gap-callout b { color: var(--ink-accent); }
.geo2-gap-callout .geo2-link { margin-top: 0; }
.geo2-src-tr6 { grid-template-columns: minmax(96px, 1fr) 76px 52px 76px 52px 60px; }
/* 无品牌任务站点表只有 3 列（站点 / 类型 / 出现），不提「你」、不显示命中率/缺口 */
.geo2-src-tr3 { grid-template-columns: minmax(140px, 1fr) 120px 72px; }
.geo2-src-type { font-size: 11px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.geo2-comp-more { margin-top: 10px; }
.geo2-comp-more > summary { font-size: 12px; color: var(--ink-accent); cursor: pointer; }
.geo2-comp-more > div { margin-top: 6px; font-size: 12px; line-height: 1.7; }

/* ---------- 报告 v1：诊断概览 / 风险提示 / 执行摘要（report.overview、report.brand） ---------- */
.geo2-exec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.geo2-exec-col { min-width: 0; }
.geo2-exec-col b { display: block; font-size: 12px; font-weight: 600; color: var(--color-text); margin-bottom: 4px; }
.geo2-exec-col ul { margin: 0 0 0 16px; padding: 0; list-style: disc; font-size: 12.5px; line-height: 1.65; color: var(--color-text-secondary); }
.geo2-exec-col li { margin: 2px 0; }
.geo2-risk-list { list-style: none; margin: 8px 0 0; padding: 0; }
.geo2-risk-item { padding: 10px 0; border-top: 1px solid var(--color-border-light); }
.geo2-risk-item:first-child { border-top: none; padding-top: 0; }
.geo2-risk-item h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--color-text); line-height: 1.45; }
.geo2-risk-item p { margin: 0 0 6px; font-size: 12px; line-height: 1.65; color: var(--color-text-secondary); }
.geo2-risk-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 证据跳转高亮：命中后闪一下（geoRevealReportTarget 1.8s 后移除） */
.is-flash { animation: geoFlash 1.8s ease; }
@keyframes geoFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 93, 58, 0); }
  20% { box-shadow: 0 0 0 3px rgba(232, 93, 58, 0.35); }
}

/* ========== 报告 v1：章节版式（2026-10-28 UX 改版） ==========
   章节是 #geo-detail 的直接子元素，块间距仍然只由 #geo-detail 的 flex gap(16px) 提供；
   这里只补「章节 > 卡片」这一层：.geo2-sec + .geo2-sec 追加 14px margin，.geo2-sec-body
   用 12px 的卡片间距 —— 于是 章节间距(16+14=30) > 章节内卡片间距(12)，分组一眼看得出来。 */
.geo2-sec { min-width: 0; }
.geo2-sec + .geo2-sec { margin-top: 14px; }
.geo2-sec-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 10px; border-bottom: 1px solid var(--color-border); margin-bottom: 14px; }
.geo2-sec-num { flex: none; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-accent); background: var(--color-accent-soft); font-variant-numeric: tabular-nums; }
.geo2-sec-heading { flex: 1; min-width: 0; }
.geo2-sec-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -.2px; color: var(--color-text); }
.geo2-sec-sub { margin: 3px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
.geo2-sec-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ========== 报告 v1：悬浮章节导航（2026-10-28 UX 改版） ==========
   视觉参考 docs/嘉兴元一医药-GEO诊断报告.html 的 .dr-side-nav；但那份是整页文档（fixed + 22px 标题），
   这里是 1024×768 默认 / 780×600 最小窗口的应用内屏，所以宽度和间距都按窄窗口收敛：
   绝对定位挂在 #geo-screen-detail（该容器在这里补 position: relative），右侧垂直居中，
   11 项 × 24px ≈ 280px 高，最小窗口（可用高度约 560px）也放得下。
   hidden 必须显式 display:none —— 本块的 display:flex 会盖掉浏览器默认的 [hidden]。 */
#geo-screen-detail { position: relative; }
.geo2-toc { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 6;
  display: flex; flex-direction: column; width: 112px; box-sizing: border-box;
  max-height: calc(100% - 24px); overflow-y: auto; padding: 7px 6px;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg); box-shadow: 0 2px 16px rgba(15, 23, 42, .08);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); user-select: none; }
.geo2-toc[hidden] { display: none; }
.geo2-toc-item { display: flex; align-items: center; gap: 5px; width: 100%; padding: 3px 5px 3px 3px;
  border: none; border-radius: 7px; background: none; font-family: inherit; text-align: left;
  cursor: pointer; white-space: nowrap; color: var(--color-text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast); }
.geo2-toc-item:hover { background: var(--color-accent-soft); }
.geo2-toc-item:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 1px; }
.geo2-toc-num { flex: none; width: 18px; height: 18px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text-tertiary);
  background: var(--color-border-light); transition: background var(--transition-fast), color var(--transition-fast); }
.geo2-toc-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 500; line-height: 1.2; }
.geo2-toc-item:hover .geo2-toc-num { color: var(--ink-accent); }
.geo2-toc-item[aria-current="true"] { background: var(--color-accent-soft); }
.geo2-toc-item[aria-current="true"] .geo2-toc-num { background: var(--color-accent); color: #fff; }
.geo2-toc-item[aria-current="true"] .geo2-toc-label { color: var(--ink-accent); font-weight: 700; }

/* 导航占位：正文右侧让出「导航宽 112 + 右边距 12 + 间隙」，另加 .geo2-page 自带的 16px padding
   与 11px 滚动条槽（scrollbar-gutter: stable），否则导航会压住正文最后那一列。 */
#geo-detail-scroll.geo2-has-toc { padding-right: 136px; }

@media (max-width: 900px) {
  .geo2-qgrid, .geo2-grid2 { grid-template-columns: 1fr; }
  .geo2-infra-checks.is-grid, .geo2-media-grid { grid-template-columns: 1fr; }
  .geo2-headline { font-size: 22px; }
  .geo2-exec-grid { grid-template-columns: 1fr; }
  .geo2-hbar-rpt { grid-template-columns: 90px 1fr 120px; }
  .geo2-src-tr6 { grid-template-columns: minmax(80px, 1fr) 64px 44px 64px 44px 52px; gap: 6px; }
  .geo2-src-tr3 { grid-template-columns: minmax(100px, 1fr) 96px 64px; gap: 6px; }
  /* 悬浮导航（<=900 窗口，含 780 最小窗口）：114px 是「标签不被省略号截断」的下限 ——
     标签可用宽 = 114 - 2(边框 1+1) - 10(内边距 5+5) - 8(条目内边距 3+5) - 18(编号徽章) - 5(间距) = 71px，
     最长标签「客户问题表现」6 字 × 11px = 66px，余 5px；原来的 104px 只有 61px，
     实测（800×600）被截成「客户问题…」。
     正文留位同步给够：导航左缘距屏右 8 + 114 = 122，正文右缘 132 + 11(滚动条槽) = 143 → 间隙 21px。 */
  .geo2-toc { right: 8px; width: 114px; padding: 6px 5px; }
  #geo-detail-scroll.geo2-has-toc { padding-right: 132px; }
}

/* ---------- 报告 v1：P1 卡片（品牌与基建合并卡 / AIVO 评分） ----------
   卡片本体由 geo.js 用 DOM 建（textContent），这里只管版式；口径 hint 复用 .geo2-title-hint。
   所有长 URL / 采集标题都允许断行（word-break），否则窄屏会被一条长串顶出横向滚动。 */
.geo2-slot { display: none; }
.geo2-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin-top: 4px; }
.geo2-fact { display: flex; gap: 8px; min-width: 0; font-size: 12.5px; line-height: 1.65; }
.geo2-fact-label { flex: none; color: var(--ink-muted); }
.geo2-fact-value { min-width: 0; color: var(--color-text-secondary); overflow-wrap: anywhere; word-break: break-word; }
.geo2-link { color: var(--ink-accent); text-decoration: none; overflow-wrap: anywhere; word-break: break-word; }
.geo2-link:hover { text-decoration: underline; }
.geo2-link:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 1px; border-radius: 2px; }
/* 证据/官网外链：复用 .geo-open-url 的点击委托（主进程 openExternal），这里只调正文样式 */
.geo2-link-ext { font-weight: 400; padding: 0; border: none; background: none; cursor: pointer; }
.geo2-evidence { list-style: none; margin: 4px 0 0; padding: 0; }
.geo2-evidence li { padding: 7px 0; border-top: 1px solid var(--color-border-light); font-size: 12px; line-height: 1.6; color: var(--color-text-secondary);
  overflow-wrap: anywhere; word-break: break-word; }
.geo2-evidence li:first-child { border-top: none; }
.geo2-evidence-meta { color: var(--ink-muted); font-size: 11px; }
.geo2-infra-block { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--color-border-light); }
.geo2-infra-block:first-of-type { margin-top: 4px; padding-top: 0; border-top: none; }
.geo2-sub-title { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.geo2-sub-title-hint { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--ink-muted); }
.geo2-notice-inline { font-size: 12px; line-height: 1.6; color: var(--ink-warning); background: #fffbeb; border-radius: var(--radius-sm); padding: 6px 9px; }
/* 品牌与基建合并卡的官网体检：检查项 2 列平铺（窄屏在 @media 里折回 1 列），媒体阵地同样 2 列 */
.geo2-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.geo2-infra-checks.is-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; }
.geo2-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; }
.geo2-media-block { min-width: 0; }
.geo2-inline-details { margin-top: 6px; }
.geo2-inline-details > summary { cursor: pointer; font-size: 12px; color: var(--ink-accent); padding: 3px 0; list-style: none; }
.geo2-inline-details > summary::-webkit-details-marker { display: none; }
.geo2-inline-details > summary::before { content: '▸ '; color: var(--ink-muted); }
.geo2-inline-details[open] > summary::before { content: '▾ '; }
.geo2-inline-details > .geo2-evidence { margin-top: 2px; }

/* 类名注意（审计 F-7）：这里用 .geo2-infra-check*。旧名 .geo2-check/.geo2-checks 是弹窗「搜索渠道」
   复选框行在用的既有类（见本文件上方的 .geo2-checks/.geo2-check），重名会连带改掉那处 UI 的对齐与间距。 */
.geo2-infra-checks { display: flex; flex-direction: column; list-style: none; margin: 4px 0 0; padding: 0; }
.geo2-infra-check { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 12px; line-height: 1.6; }
.geo2-infra-check-state { flex: none; font-weight: 600; font-size: 11.5px; }
.geo2-infra-check.is-pass .geo2-infra-check-state { color: var(--ink-success); }
.geo2-infra-check.is-fail .geo2-infra-check-state { color: var(--ink-danger); }
.geo2-infra-check-body { min-width: 0; color: var(--color-text-secondary); overflow-wrap: anywhere; word-break: break-word; }
.geo2-infra-check-body b { color: var(--color-text); font-weight: 600; }
.geo2-infra-check-detail { color: var(--color-text-secondary); }
.geo2-infra-diagnosis { margin-top: 8px; }
.geo2-aivo-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.geo2-aivo-score { display: flex; align-items: baseline; gap: 5px; }
.geo2-aivo-num { font-size: 32px; font-weight: 700; line-height: 1; color: var(--ink-accent); font-variant-numeric: tabular-nums; }
.geo2-aivo-unit { font-size: 12px; color: var(--ink-muted); }
.geo2-aivo-nodata { font-size: 20px; font-weight: 600; line-height: 1.2; color: var(--ink-muted); }
.geo2-aivo-dims { display: grid; gap: 12px; margin-top: 14px; }
.geo2-aivo-dim { min-width: 0; }
.geo2-aivo-dim-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--color-text); }
.geo2-aivo-dim-name { font-weight: 600; }
.geo2-aivo-dim-weight { font-size: 11px; color: var(--ink-muted); }
.geo2-aivo-dim-score { margin-left: auto; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; }
.geo2-aivo-bar { height: 8px; margin: 5px 0 2px; border-radius: 999px; background: var(--color-bg); overflow: hidden; }
.geo2-aivo-bar-fill { height: 100%; width: 0; border-radius: 999px; background: var(--ink-accent); transition: width var(--transition-smooth); }
.geo2-aivo-dim-comment { font-size: 12px; line-height: 1.65; color: var(--color-text-secondary); }
.geo2-aivo-note { margin-top: 12px; }
.geo2-aivo-commentary { margin-top: 6px; }

/* ---------- 报告 v1：P2 新卡片（舆情分析 / 收录效果 / 评分模拟） ----------
   同样只管版式，卡片本体由 geo.js 用 DOM 建（textContent）；长检索词/摘要/平台名一律允许断行，
   竞品矩阵放在 overflow-x:auto 的容器里：窄屏横向滚动，而不是把整页顶出横向滚动条。 */
.geo2-sentiment-card > .geo2-chip, .geo2-effect-card > .geo2-chip,
.geo2-forecast-card > .geo2-chip, .geo2-aivo-card > .geo2-chip { margin: 2px 0 8px; }
.geo2-dist { display: grid; gap: 10px; margin-top: 12px; }
.geo2-dist-row { min-width: 0; }
.geo2-dist-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--color-text); }
.geo2-dist-name { font-weight: 600; }
.geo2-dist-count { margin-left: auto; color: var(--ink-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.geo2-dist-bar { height: 8px; margin: 5px 0 2px; border-radius: 999px; background: var(--color-bg); overflow: hidden; }
.geo2-dist-bar-fill { height: 100%; width: 0; border-radius: 999px; background: var(--ink-accent); }
.geo2-dist-bar-fill.is-positive { background: var(--ink-success); }
.geo2-dist-bar-fill.is-neutral { background: var(--ink-muted); }
.geo2-dist-bar-fill.is-negative { background: var(--ink-danger); }
.geo2-claim-chip { margin-right: 6px; font-size: 11.5px; font-weight: 600; }
.geo2-sent-detail-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.geo2-sent-note { margin-top: 12px; }
.geo2-list { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; line-height: 1.65;
  color: var(--color-text-secondary); overflow-wrap: anywhere; word-break: break-word; }
.geo2-list li { padding: 4px 0; border-top: 1px solid var(--color-border-light); }
.geo2-list li:first-child { border-top: none; }

/* 窄屏（<=480px）：新卡片一律单列，评分数字与条形不横向溢出 */
@media (max-width: 480px) {
  .geo2-facts { grid-template-columns: 1fr; gap: 2px; }
  .geo2-fact { flex-direction: column; gap: 0; }
  .geo2-aivo-num { font-size: 26px; }
  .geo2-aivo-dim-score { margin-left: 0; }
  .geo2-infra-check { flex-direction: column; gap: 2px; }
  .geo2-evidence li { padding: 5px 0; }
  /* 窄屏：分布条/明细头一律可换行，不出现页面级横向溢出 */
  .geo2-dist-head, .geo2-sent-detail-head { flex-wrap: wrap; }
  .geo2-dist-count { margin-left: 0; }
  .geo2-title { flex-wrap: wrap; }
  .geo2-title-hint { margin-left: 0; width: 100%; }
}
