/* === 单量王 — warm light product UI === */

:root {
  --primary: #27624d;
  --primary-dark: #173f34;
  --primary-light: #e3eee8;
  --success: #247052;
  --success-light: #e3f1e9;
  --danger: #b8453d;
  --danger-light: #f8e8e5;
  --warning: #a66a19;
  --warning-light: #f7edd9;
  --info: #3c6f75;
  --surface: #fbfaf6;
  --surface-strong: #fffefa;
  --bg: #f2f0e9;
  --text: #17221d;
  --text-primary: #17221d;
  --text-secondary: #46564e;
  --text-muted: #68776f;
  --border: rgba(23, 63, 52, .12);
  --border-light: rgba(23, 63, 52, .07);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-md: 0 8px 24px rgba(31, 56, 46, .07);
  --shadow-lg: 0 24px 64px rgba(31, 56, 46, .14);
  --font-sans: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Monaco", "Courier New", monospace;
  --sidebar-width: 200px;
  --sidebar-bg: #173f34;
  --sidebar-hover: #245647;
  --sidebar-active: var(--primary);
  --topbar-bg: rgba(224, 230, 223, .94);
  --topbar-height: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); min-height: 100vh; font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }

.sidebar {
  width: var(--sidebar-width); height: 100vh;
  position: fixed; left: 0; top: 0;
  background: var(--sidebar-bg); color: #d6e1dc;
  display: flex; flex-direction: column;
  z-index: 100; transition: transform .2s ease;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 20px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.sidebar-brand svg { width: 24px; height: 24px; stroke: #d6ac64; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sidebar-brand span { font-size: 16px; font-weight: 750; color: #f8f7f1; letter-spacing: .02em; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; margin: 2px 8px; border-radius: 8px;
  color: #afc0b8; text-decoration: none; font-size: 13px; font-weight: 550;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--sidebar-hover); color: #f8f7f1; }
.nav-item.active { background: #f3efe2; color: var(--primary-dark); box-shadow: 0 8px 22px rgba(4, 24, 18, .18); }
.nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sidebar-footer { padding: 12px 20px; font-size: 11px; color: #8fa59b; border-top: 1px solid rgba(255,255,255,.08); }

.main-area {
  margin-left: var(--sidebar-width);
  min-height: 100vh; display: flex; flex-direction: column;
}
.topbar {
  height: var(--topbar-height); background: var(--topbar-bg); color: var(--text);
  padding: 0 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border); backdrop-filter: blur(16px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-icon {
  width: 32px; height: 32px; background: var(--primary-light); color: var(--primary-dark);
  border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.topbar-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar h1 { font-size: 16px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 32px; height: 32px; border: none; border-radius: 6px;
  background: var(--primary-light); color: var(--primary-dark); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
}
.icon-btn:hover { background: #d5e6dc; }
.icon-btn:active { transform: scale(.97); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shop-switcher { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.shop-switcher select {
  min-width: 180px; height: 32px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--text); padding: 0 8px;
}
.shop-switcher option { color: #111827; }
.diagnostic-tool-link {
  height: 32px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--primary-dark);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; font-size: 12px; font-weight: 600;
  transition: background .15s, border-color .15s, transform .1s;
}
.diagnostic-tool-link:hover { background: var(--primary-light); border-color: rgba(39,98,77,.28); }
.diagnostic-tool-link:active { transform: scale(.97); }
.diagnostic-tool-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.diagnostic-tool-link svg {
  width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.hamburger {
  display: none; width: 32px; height: 32px; border: none; background: var(--primary-light);
  border-radius: 6px; cursor: pointer; align-items: center; justify-content: center; margin-right: 8px;
}
.hamburger svg { width: 18px; height: 18px; stroke: var(--primary-dark); fill: none; stroke-width: 2; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }
.sidebar-overlay.active { display: block; }

.content-area { flex: 1; padding: 24px; }
.container { max-width: 1440px; margin: 0 auto; }

.filters {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-hidden { display: none; }
.filter-group label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.filter-group input, .filter-group select {
  height: 36px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-family: var(--font-sans);
  min-width: 140px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.filter-group input:focus, .filter-group select:focus, .btn:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39,98,77,.14);
}
.btn {
  height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px;
  font-size: 13px; cursor: pointer; font-weight: 600; font-family: var(--font-sans);
  transition: background .15s, transform .1s, border-color .15s;
  background: var(--surface); color: var(--text-secondary);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fffefa; box-shadow: 0 6px 16px rgba(39,98,77,.16); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 20px; border: 1px solid var(--border); box-shadow: var(--shadow-md);
  position: relative; overflow: hidden; transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card.primary { background: linear-gradient(145deg, var(--surface-strong), #edf4f0); }
.card.success { background: linear-gradient(145deg, var(--surface-strong), #eef5f0); }
.card.warning { background: linear-gradient(145deg, var(--surface-strong), #f8f1e5); }
.card.info { background: linear-gradient(145deg, var(--surface-strong), #edf2f1); }
.card .label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.card .info-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text-muted);
  font-size: 10px; line-height: 1; cursor: help;
}
.card .value { font-size: 22px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card .sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.card .value.c-primary { color: var(--primary); }
.card .value.c-success { color: var(--success); }
.card .value.c-warning { color: var(--warning); }
.card .value.c-info { color: var(--info); }

.table-section {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md);
}
.table-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.table-header h2 { font-size: 14px; font-weight: 700; color: var(--text); }
.table-header .hint { font-size: 12px; color: var(--text-muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 12px; text-align: left; font-weight: 650; color: var(--text-secondary); background: rgba(39,98,77,.045); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); white-space: nowrap; text-align: left; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
tr:hover td { background: rgba(39,98,77,.045); }
.amount { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12px; }
.muted { color: var(--text-muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--primary-light); color: var(--primary-dark); }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal {
  position: relative;
  background: var(--surface); border-radius: 8px; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: min(960px, 96vw); max-height: 88vh; display: flex; flex-direction: column;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border: 1px solid transparent; border-radius: 50%;
  background: transparent; color: var(--text-muted); font-size: 22px; line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--border-light); color: var(--text-primary); }
.modal-close:focus { outline: 2px solid var(--primary-light); }
.modal h3 { font-size: 15px; padding: 18px 20px 8px; }
.modal-meta { color: var(--text-muted); font-size: 12px; padding: 0 20px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { overflow: auto; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.modal-body table { min-width: 980px; }
.modal-body td:last-child { max-width: 520px; white-space: nowrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; }
.raw-modal { width: min(1180px, 96vw); }
.state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.state.error { color: var(--danger); }
.pagination { display: flex; align-items: center; gap: 10px; padding: 16px 0; justify-content: center; }
.page-info { color: var(--text-muted); font-size: 13px; min-width: 160px; text-align: center; }
.page-jumper { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.page-jumper input {
  width: 64px; height: 34px; border: 1px solid var(--border);
  border-radius: 6px; padding: 0 8px; font-size: 13px;
}
.page-jumper input:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }

.analysis-summary {
  background: var(--surface-strong); border: 1px solid rgba(39,98,77,.16);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}
.analysis-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.analysis-title h2 { font-size: 19px; line-height: 1.35; font-weight: 800; }
.analysis-summary-content {
  overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px;
}
.analysis-summary-sentence {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px;
  align-items: start; padding: 13px 16px; border-top: 1px solid var(--border-light);
}
.analysis-summary-sentence:first-child { border-top: 0; }
.analysis-summary-sentence:nth-child(even) { background: rgba(39,98,77,.035); }
.analysis-summary-themes {
  display: flex; flex-wrap: wrap; gap: 5px; padding-top: 2px;
}
.analysis-summary-themes span {
  display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px;
  color: var(--primary-dark); background: var(--primary-light); border: 1px solid rgba(39,98,77,.14);
  border-radius: 999px; font-size: 11px; line-height: 1.35; font-weight: 700;
}
.analysis-summary-sentence p {
  color: var(--text-secondary); font-size: 15px; line-height: 1.72; font-weight: 500;
}
.analysis-summary-empty {
  color: var(--text-muted); padding: 16px; background: rgba(39,98,77,.035);
  border: 1px dashed var(--border); border-radius: 8px; font-size: 14px;
}
.three-rate-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
}
.three-rate-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px; padding: 16px 18px;
}
.target-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; padding: 16px 18px 0;
}
.target-metric {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; background: var(--surface-strong);
}
.target-metric span {
  display: block; color: var(--text-muted); font-size: 12px; margin-bottom: 6px;
}
.target-values {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 10px; min-width: 0;
}
.target-values strong {
  font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.target-values small { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.target-metric.ok strong { color: var(--success); }
.target-metric.warn strong { color: var(--warning); }
.target-metric.unknown strong { color: var(--text-muted); }
.three-rate-card {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; background: var(--surface-strong);
}
.three-rate-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 12px; color: var(--text-muted); font-size: 12px;
}
.three-rate-head strong { color: var(--text); font-size: 14px; }
.three-rate-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.three-rate-metric {
  min-width: 0; border-radius: 8px; border: 1px solid var(--border);
  padding: 10px; background: rgba(39,98,77,.035);
}
.three-rate-metric span,
.three-rate-metric small {
  display: block; color: var(--text-muted); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.three-rate-metric strong {
  display: block; margin: 4px 0 2px; font-size: 18px;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.three-rate-metric.ok strong { color: var(--success); }
.three-rate-metric.warn strong { color: var(--warning); }
.three-rate-metric.unknown strong { color: var(--text-muted); }
.three-rate-volume {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
  color: var(--text-muted); font-size: 12px;
}
.three-rate-volume span {
  padding: 3px 8px; border-radius: 999px; background: var(--border-light);
}
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.low-received-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.low-received-summary { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 10px 0 16px; color: var(--text-muted); font-size: 13px; }
.low-received-summary strong { color: var(--text); font-size: 16px; margin-left: 4px; }
.low-received-summary .danger strong, .low-received-table .danger { color: var(--danger); }
.low-received-summary .success strong { color: var(--success); }
.low-received-summary .warning strong { color: var(--warning); }
.low-received-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.low-received-table th, .low-received-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 13px; }
.low-received-table th { color: var(--text-muted); font-weight: 600; }
.low-received-table small { display: block; margin-top: 4px; color: var(--text-muted); }
.low-received-row.is-prominent { background: var(--danger-light); }
.low-received-row.is-prominent .gap-cell strong { color: var(--danger); font-size: 14px; }
.low-received-row.is-prominent .gap-cell small { color: var(--danger); font-weight: 600; }
.low-received-row.is-slight { opacity: .68; background: #fafafa; }
.low-received-row.is-slight .gap-cell strong { color: var(--text-muted); font-weight: 500; }
.low-received-platform + .low-received-platform { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 18px; }
.low-received-platform h3 { margin: 0; font-size: 15px; }
.source-overview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
}
.source-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.source-overview-card {
  border: 1px solid var(--border-light); border-radius: 8px; background: var(--surface-strong);
  padding: 10px 12px; text-align: left; cursor: pointer; min-width: 0;
}
.source-overview-card:hover { border-color: rgba(39,98,77,.32); background: var(--primary-light); box-shadow: var(--shadow-md); }
.source-overview-card:focus { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.source-overview-card.is-empty { opacity: .68; }
.source-overview-card.is-stale { border-color: rgba(166,106,25,.35); background: var(--warning-light); }
.source-overview-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.source-overview-head strong { font-size: 13px; color: var(--text-primary); }
.source-overview-head span {
  color: var(--primary-dark); background: var(--primary-light);
  border-radius: 999px; padding: 2px 7px; font-size: 11px; font-weight: 700;
}
.source-overview-card.is-empty .source-overview-head span { color: var(--text-muted); background: var(--border-light); }
.source-overview-card.is-stale .source-overview-head span { color: #a16207; background: #fef3c7; }
.source-overview-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  color: var(--text-muted); font-size: 12px;
}
.source-overview-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analysis-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.analysis-list { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.analysis-item {
  border: 1px solid var(--border-light); border-radius: 8px;
  padding: 12px; background: var(--surface-strong);
}
.analysis-item.is-completed { background: rgba(39,98,77,.035); }
.analysis-item-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.analysis-item-head strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-type-icon {
  min-width: 42px; height: 26px; flex: 0 0 auto; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 12px; font-weight: 800;
}
.action-type-online { background: var(--primary-light); color: var(--primary-dark); border: 1px solid rgba(39,98,77,.2); }
.action-type-offline { background: var(--success-light); color: var(--success); border: 1px solid rgba(36,112,82,.2); }
.action-type-deferred { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(166,106,25,.2); }
.analysis-item p { color: var(--text-secondary); margin-top: 8px; font-size: 13px; }
.source-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.source-row-summary { margin-top: 14px; }
.source-chip {
  height: 28px; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-strong); color: var(--text-secondary); padding: 0 9px 0 5px;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.source-chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light); }
.source-chip:focus { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.source-chip.is-empty { opacity: 0.62; }
.source-chip.is-stale { border-color: rgba(166,106,25,.35); background: var(--warning-light); color: var(--warning); }
.source-icon {
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--primary-light); color: var(--primary-dark);
  font-size: 11px; line-height: 1;
}
.source-modal { width: min(720px, 94vw); }
.source-modal-note { color: var(--text-secondary); padding: 0 20px 14px; line-height: 1.6; font-size: 13px; }
.source-modal-body { display: grid; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); max-height: 60vh; overflow: auto; }
.source-detail { border: 1px solid var(--border-light); border-radius: 8px; padding: 12px; background: var(--surface-strong); }
.source-detail-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.source-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.source-detail dl div { min-width: 0; }
.source-detail dt { color: var(--text-muted); font-size: 12px; margin-bottom: 2px; }
.source-detail dd { color: var(--text-primary); font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.analysis-item-meta {
  display: flex; justify-content: space-between; gap: 10px;
  color: var(--text-muted); font-size: 12px; margin-top: 10px;
}
.action-feedback-row { display: flex; justify-content: flex-end; align-items: center; margin-top: 10px; }
.action-feedback-row { gap: 8px; }
.action-item.is-rejected { opacity: .62; background: rgba(39,98,77,.035); }
.action-item.is-rejected .analysis-item-head strong { text-decoration: line-through; }
.action-reject-btn { color: var(--text-muted); background: var(--surface-strong); border: 1px solid var(--border); }
.action-reject-btn:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-light); }
.badge-muted { color: var(--text-muted); background: var(--border-light); }
.action-reject-modal { width: min(520px, 94vw); }
.action-reject-modal h3 { margin: 0; padding: 20px 52px 8px 20px; }
.action-reject-modal p { margin: 0; padding: 0 20px 12px; color: var(--text-secondary); line-height: 1.6; }
.action-reject-modal textarea { width: calc(100% - 40px); margin: 0 20px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; font: inherit; }
.action-reject-modal textarea:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
.action-reject-error { min-height: 20px; padding: 5px 20px 0; color: var(--danger); font-size: 12px; }
.action-confirm-btn {
  background: var(--primary); color: #fffefa; border: 1px solid var(--primary);
  font-weight: 800; box-shadow: 0 6px 14px rgba(39,98,77,.18);
}
.action-confirm-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.priority {
  min-width: 38px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 11px; font-weight: 700;
}
.priority-P0 { background: var(--danger-light); color: var(--danger); }
.priority-P1, .priority-P2 { background: var(--warning-light); color: var(--warning); }
.priority-P3 { background: var(--primary-light); color: var(--primary-dark); }
.priority-INFO { background: #ecfeff; color: var(--info); }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .hamburger { display: flex; }
  .content-area { padding: 12px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .value { font-size: 18px; }
  .filters { gap: 8px; padding: 12px; }
  .filter-group input, .filter-group select { min-width: 110px; }
  .pagination { flex-wrap: wrap; }
  .topbar { padding: 0 12px; }
  .shop-switcher { display: none; }
  .diagnostic-tool-link { width: 32px; padding: 0; }
  .diagnostic-tool-label { display: none; }
  .source-overview-grid { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; gap: 12px; }
  .target-grid { grid-template-columns: 1fr; }
  .analysis-title { align-items: flex-start; flex-direction: column; }
  .analysis-title h2 { font-size: 19px; }
  .analysis-summary { padding: 18px; }
  .analysis-summary-sentence {
    grid-template-columns: 1fr; gap: 8px; padding: 12px;
  }
  .analysis-summary-sentence p { font-size: 15px; line-height: 1.68; }
  .analysis-item-head strong { white-space: normal; }
  .source-detail dl { grid-template-columns: 1fr; }
  .nav-item, .btn, .filter-group input, .filter-group select { min-height: 44px; }
  .hamburger, .icon-btn, .diagnostic-tool-link { width: 44px; height: 44px; }
  .topbar { min-height: 64px; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
