:root {
  --ink: #18211d;
  --muted: #66746d;
  --line: #dfe5e1;
  --paper: #f6f7f5;
  --white: #ffffff;
  --green: #177245;
  --green-soft: #dcefe5;
  --orange: #f28c28;
  --gold-soft: #fff2df;
  --red: #c84b4b;
  --slate: #1b2922;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--slate);
  color: #fff;
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--orange);
  border-radius: 6px;
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: #b4c1bb; margin-top: 4px; font-size: 12px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item {
  border: 0;
  background: transparent;
  color: #b7c5be;
  text-align: left;
  padding: 12px 13px;
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
}
.nav-item:hover, .nav-item.active { background: #2b3b33; color: #fff; }
.sidebar-foot { margin-top: auto; color: #a7b5ae; font-size: 12px; padding: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4fc382; margin-right: 6px; }

main { min-width: 0; }
header {
  min-height: 88px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
h1 { font-size: 22px; margin: 0 0 5px; }
header p { margin: 0; color: var(--muted); font-size: 13px; }
.mode-switch {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  height: 38px;
}
.mode-btn {
  border: 0;
  min-width: 82px;
  height: 38px;
  padding: 0 14px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  line-height: 38px;
  white-space: nowrap;
  cursor: pointer;
}
.mode-btn.active { background: var(--green); color: #fff; font-weight: 700; }
.analysis-view .mode-switch { display: none; }
.brandReports-view .mode-switch { display: none; }

#view { padding: 28px 32px; max-width: 1480px; margin: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.quick .comparison-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analysis-comparison-metrics,
.quick .analysis-comparison-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analysis-quick-comparison-metrics,
.quick .analysis-quick-comparison-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  padding: 19px;
  border-radius: 8px;
}
.metric.orange { border-top-color: var(--orange); }
.metric label { font-size: 12px; color: var(--muted); }
.metric strong { display: block; font-size: 30px; margin: 11px 0 3px; }
.metric small { color: var(--muted); }
.metric-keywords {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
}
.metric-keywords li {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  padding-left: 12px;
  position: relative;
}
.metric-keywords li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--green);
}
.metric-empty {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.analysis-hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  border-top: 4px solid var(--orange);
}
.comparison-summary-stack {
  display: grid;
  gap: 22px;
}
.comparison-summary-stack h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--green);
}
.analysis-hero h2 { margin: 6px 0 10px; font-size: 26px; }
.analysis-hero p { margin: 0; color: #3d4a43; line-height: 1.8; max-width: 900px; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 800; }
.analysis-status {
  background: var(--gold-soft);
  border: 1px solid #f3d2a9;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.analysis-status b { color: #8d4b08; }
.analysis-status span { font-size: 26px; font-weight: 800; color: var(--orange); }
.analysis-status small { color: #795a3c; line-height: 1.5; }
.analysis-metrics { margin-top: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  margin-top: 18px;
  border-radius: 8px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 19px;
  border-bottom: 1px solid var(--line);
  min-height: 64px;
  gap: 12px;
}
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-body { padding: 19px; }
.legend { font-size: 12px; color: var(--muted); }
.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}
.pill.off { background: #eef0ef; color: #778078; }

.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.insight-grid div { background: #fbfcfb; border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.insight-grid b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.insight-grid p { margin: 0; line-height: 1.6; }
.conclusion-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.conclusion-grid article {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.conclusion-grid b { display: block; color: var(--green); margin-bottom: 8px; }
.conclusion-grid p { margin: 0; line-height: 1.7; color: #3f4c45; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  display: grid;
  gap: 10px;
}
.timeline b, .timeline small { display: block; }
.timeline small { color: var(--muted); margin-top: 4px; }
.timeline p { margin: 0; line-height: 1.65; color: #3f4c45; }
.timeline strong { color: #8d4b08; line-height: 1.6; font-size: 13px; }
.weekly-report {
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}
.weekly-report b {
  color: var(--green);
  font-size: 12px;
}
.weekly-report ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.weekly-report li {
  position: relative;
  padding-left: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: #3f4c45;
}
.weekly-report li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--green);
}
@media (min-width: 981px) {
  .timeline p { min-height: 118px; }
  .timeline strong { min-height: 48px; }
  .weekly-report ul:first-of-type { min-height: 250px; }
}
.split-layout { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: stretch; }
.analysis-note {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.analysis-note b { display: block; color: var(--green); margin-bottom: 7px; }
.analysis-note p { margin: 0 0 16px; line-height: 1.75; color: #3f4c45; }
.analysis-note p:last-child { margin-bottom: 0; }
.content-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.content-detail-btn {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.content-detail-btn.secondary {
  background: #fff;
  color: var(--green);
}
.content-detail-btn:hover {
  box-shadow: 0 6px 16px #1b29221a;
}
.pie-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfb;
  height: 100%;
}
.pie-wrap { display: grid; place-items: center; }
.pie-chart {
  width: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px #ffffff, 0 8px 20px #1b292214;
}
.pie-chart::after {
  content: "";
  position: absolute;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.pie-chart span {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-weight: 800;
  font-size: 24px;
}
.pie-chart .pie-label {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 36px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.pie-chart .pie-line {
  position: absolute;
  z-index: 1;
  height: 1px;
  transform-origin: left center;
  opacity: .55;
}
.pie-legend { display: grid; gap: 8px; }
.pie-legend article {
  display: grid;
  grid-template-columns: 12px minmax(120px, 1fr) 54px minmax(120px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.pie-legend b { font-size: 13px; }
.pie-legend span { font-size: 12px; color: var(--green); font-weight: 800; }
.pie-legend small { color: var(--muted); }
.mode-analysis { display: grid; gap: 18px; }
.mode-analysis h3 { margin: 0 0 10px; font-size: 15px; }
.tier-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tier-list article { border: 1px solid var(--line); border-radius: 8px; padding: 13px; background: #fbfcfb; }
.tier-list b { display: block; color: var(--green); }
.tier-list small { display: block; color: var(--muted); margin-top: 4px; font-weight: 400; }
.tier-list ul {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: grid;
  gap: 5px;
}
.tier-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.5;
  color: #3f4c45;
}
.tier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.tier-list span { color: #8d4b08; line-height: 1.6; font-size: 12px; }
.quick-mode-note {
  background: var(--green-soft);
  border: 1px solid #b9dcc8;
  border-radius: 8px;
  padding: 16px;
}
.quick-mode-note b { display: block; color: var(--green); margin-bottom: 8px; }
.quick-mode-note p { margin: 0; line-height: 1.75; }
.risk-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 18px;
  align-items: start;
}
.risk-summary,
.risk-detail,
.experience-list,
.next-list {
  display: grid;
  gap: 12px;
}
.risk-summary h3,
.risk-detail h3,
.experience-list h3,
.next-list h3 {
  margin: 0;
  font-size: 14px;
  color: var(--green);
}
.risk-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}
.risk-summary b { display: block; color: var(--muted); }
.risk-summary strong { display: block; font-size: 28px; color: var(--red); margin: 6px 0; }
.risk-summary p, .risk-detail span, .experience-list p, .next-list p { margin: 0; line-height: 1.7; color: #3f4c45; }
.risk-table-wrap {
  display: grid;
  gap: 14px;
}
.risk-brief {
  border: 1px solid #f0d4b7;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff8ef;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}
.risk-brief strong {
  color: var(--ink);
  font-size: 18px;
}
.risk-brief span {
  color: #3f4c45;
  line-height: 1.7;
}
.risk-link-table {
  min-width: 980px;
}
.risk-link-table th:nth-child(1) { width: 90px; }
.risk-link-table th:nth-child(2) { width: 70px; }
.risk-link-table th:nth-child(3) { width: 420px; }
.risk-link-table a {
  color: var(--green);
  word-break: break-all;
}
.risk-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.risk-progress-block {
  border: 1px solid #f0d4b7;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 16px;
  background: #fffaf2;
  display: grid;
  gap: 12px;
}
.risk-progress-block h3 {
  margin: 0;
  color: var(--green);
  font-size: 14px;
}
.risk-progress-block ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.risk-progress-block li {
  display: grid;
  gap: 4px;
}
.risk-progress-block b {
  color: var(--ink);
}
.risk-progress-block span {
  color: #3f4c45;
  line-height: 1.7;
}
.risk-detail ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.risk-detail li {
  border-left: 3px solid var(--orange);
  background: #fffaf2;
  border-radius: 6px;
  padding: 12px 14px;
}
.risk-detail b {
  display: block;
  margin-bottom: 6px;
  color: #8d4b08;
}
.next-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}
.experience-list,
.next-list {
  grid-template-columns: 1fr;
}
.experience-list article {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
}
.experience-list b { display: block; color: var(--green); margin-bottom: 6px; }
.next-list article {
  border-left: 3px solid var(--orange);
  background: #fffaf2;
  border-radius: 6px;
  padding: 14px;
}
.next-list b { display: block; margin-bottom: 8px; color: #8d4b08; }
.direction-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.direction-points li {
  position: relative;
  padding-left: 14px;
  color: #3f4c45;
  line-height: 1.65;
  font-weight: 800;
}
.direction-points li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #8d4b08;
}
.action-callout {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f1d5b4;
  border-radius: 6px;
  background: #fff;
  display: grid;
  gap: 6px;
}
.action-callout span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.action-callout ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.action-callout li {
  position: relative;
  padding-left: 14px;
  color: #3f4c45;
  line-height: 1.65;
}
.action-callout li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #8d4b08;
}
.action-callout p {
  color: #3f4c45;
}
.report-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.report-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 8px;
  padding: 16px;
}
.report-summary.orange { border-top-color: var(--orange); }
.report-switch b { display: block; font-size: 16px; color: var(--ink); }
.report-switch span { display: block; margin-top: 6px; color: var(--green); font-size: 12px; font-weight: 800; }
.report-switch small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.6; }
.link-button { display: inline-block; text-decoration: none; }
.brand-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.report-column {
  min-width: 0;
  overflow: hidden;
}
.report-column .panel-head {
  align-items: flex-start;
  gap: 12px;
}
.report-column .toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.report-pages {
  background: #eef2ef;
  padding: 14px;
  display: grid;
  gap: 14px;
}
.report-page {
  max-width: none;
  margin: 0 auto;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px #1b292212;
}
.report-page-head {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}
.report-page img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
}

.chart {
  height: 240px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 28px 5px 0;
  overflow-x: auto;
}
.bar-wrap { min-width: 36px; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar { width: 70%; max-width: 36px; background: var(--green); position: relative; min-height: 0; border-radius: 4px 4px 0 0; }
.bar b { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--green); font-weight: 700; white-space: nowrap; }
.bar:hover { background: var(--orange); }
.bar.pending { height: 2px !important; background: #d8ded9; }
.bar.pending b { color: #8b9690; }
.bar-wrap small { font-size: 10px; color: var(--muted); white-space: nowrap; }

.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; background: #fafbfa; }
tbody tr:hover { background: #fafcfb; }
.analysis-view table { table-layout: fixed; }
.analysis-view th,
.analysis-view td {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
}
.analysis-view th { font-size: 11px; }
.analysis-view .table-scroll {
  max-height: 320px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.analysis-view .table-scroll table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.progress { height: 7px; background: #edf0ee; min-width: 120px; margin-bottom: 4px; }
.progress i { display: block; height: 100%; background: var(--green); }
.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px;
}
.ranking-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px 12px;
}
.rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf0ee;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.rank.top { background: var(--gold-soft); color: #a85d0a; }
.rank-main { min-width: 0; }
.rank-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.rank-main small { display: block; color: var(--muted); margin-top: 4px; }
.rank-progress {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 46px;
  gap: 8px;
  align-items: center;
}
.rank-progress .progress { min-width: 0; margin-bottom: 0; }
.rank-progress b { color: var(--green); text-align: right; font-size: 13px; }
.content-compare-table { min-width: 1040px; table-layout: fixed; }
.content-compare-table th:nth-child(1) { width: 23%; }
.content-compare-table th:nth-child(2), .content-compare-table th:nth-child(3) { width: 31%; }
.content-compare-table th:nth-child(4) { width: 100px; }
.content-compare-table td:nth-child(2), .content-compare-table td:nth-child(3) {
  white-space: pre-wrap;
  line-height: 1.6;
  max-height: 120px;
  overflow: auto;
}
.daily-exposure-table { min-width: 980px; table-layout: fixed; }
.daily-exposure-table th:nth-child(1) { width: 120px; }
.daily-exposure-table th:nth-child(2),
.daily-exposure-table th:nth-child(3) { width: 90px; }
.daily-exposure-table th:nth-child(4) { width: 150px; }
.exposure-num { color: var(--green); font-size: 16px; }
.missing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.missing-tags span {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff4ec;
  color: #9a4f07;
  font-size: 11px;
  line-height: 1.2;
}

.quick .expert-only { display: none; }
.compare-list { display: grid; gap: 16px; }
.compare-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.state-list { display: grid; gap: 16px; padding: 18px; }
.state-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.state-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.state-card-head > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.state-card-head strong { min-width: 0; font-size: 15px; }
.change-pill, .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.change-pill { padding: 5px 9px; }
.change-pill.up, .change-pill.stable { color: var(--green); background: var(--green-soft); }
.change-pill.down { color: var(--red); background: #fff0ee; }
.change-pill.flat { color: var(--muted); background: #f0f2f1; }
.state-change {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 0;
}
.state-change > div { display: flex; align-items: center; gap: 8px; }
.state-change b { font-size: 13px; color: var(--muted); }
.state-change > i { color: var(--muted); font-style: normal; }
.status-badge { padding: 4px 8px; }
.status-badge.on { color: var(--green); background: var(--green-soft); }
.status-badge.off { color: var(--red); background: #fff0ee; }
.difference-copy { margin: 10px 16px 16px; color: var(--muted); line-height: 1.65; }
.analysis-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: -4px 16px 16px;
}
.analysis-evidence b {
  color: var(--ink);
  font-size: 12px;
  margin-right: 2px;
}
.analysis-evidence span {
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f4f7f5;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.state-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.state-shots figure { margin: 0; min-width: 0; }
.state-shots figure + figure { border-left: 1px solid var(--line); }
.state-shots figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.image-button {
  display: block;
  width: 100%;
  border: 0;
  background: #f5f7f6;
  padding: 0;
  cursor: zoom-in;
  max-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
}
.image-button img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: initial;
  background: #fff;
}
.shot-empty {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  background: #f5f7f6;
  font-size: 13px;
}
.compare-title {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}
.compare-title strong { line-height: 1.5; }
.compare-title i { font-style: normal; color: var(--muted); }
.compare-title i.up { color: var(--green); font-weight: 700; }
.compare-images { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.compare-images figure { margin: 0; border-right: 1px solid var(--line); }
.compare-images figure:last-child { border-right: 0; }
.compare-images figcaption { padding: 9px 12px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.compare-images img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; cursor: zoom-in; background: #edf0ee; }
.compare-images span {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  color: var(--muted);
  background: #f2f4f2;
}
.compare-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.compare-meta p { margin: 0; padding: 12px; white-space: pre-wrap; line-height: 1.65; color: #334039; max-height: 180px; overflow: auto; }
.compare-meta p + p { border-left: 1px solid var(--line); }
.compare-meta b { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.shot-actions { padding: 10px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.shot-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  border-radius: 5px;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.upload-zone {
  display: block;
  border: 2px dashed #b9c7bf;
  padding: 46px 20px;
  text-align: center;
  background: #fbfcfb;
  cursor: pointer;
  border-radius: 8px;
}
.upload-zone.drag { border-color: var(--green); background: #f0f8f3; }
.upload-zone strong { display: block; margin-bottom: 10px; }
.upload-zone p { max-width: 680px; margin: 0 auto; color: var(--muted); line-height: 1.7; }

.empty { text-align: center; padding: 44px 18px; color: var(--muted); }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 8;
  background: #18221d;
  color: #fff;
  padding: 11px 16px;
  border-radius: 5px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.modal { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; padding: 30px; z-index: 9; }
.modal img { max-width: 95vw; max-height: 90vh; }
.modal button { position: absolute; right: 25px; top: 20px; color: #fff; background: transparent; border: 0; font-size: 30px; cursor: pointer; }
.publish-modal {
  align-items: stretch;
  justify-items: stretch;
}
.publish-modal-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(1280px, 94vw);
  max-height: 88vh;
  margin: auto;
  box-shadow: 0 18px 60px #0005;
}
.publish-modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.publish-modal-head h2 {
  margin: 0;
  font-size: 22px;
}
.publish-modal-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.publish-modal-body {
  overflow: auto;
  padding: 18px;
  background: #f6f8f7;
  display: grid;
  gap: 16px;
}
.publish-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.publish-sheet h3 {
  margin: 0;
  padding: 12px 14px;
  color: var(--green);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.publish-link-table {
  min-width: 980px;
}
.publish-link-table th:nth-child(1) { width: 70px; }
.publish-link-table th:nth-child(2) { width: 360px; }
.publish-link-table th:nth-child(3) { width: 120px; }
.publish-link-table th:nth-child(4) { width: 360px; }
.publish-link-table a {
  color: var(--green);
  word-break: break-all;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 86px 1fr; }
  .brand div, .sidebar-foot { display: none; }
  .brand { justify-content: center; padding: 0 0 24px; }
  .nav-item { text-align: center; font-size: 12px; padding: 10px 8px; }
  .quick .comparison-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-comparison-metrics,
  .quick .analysis-comparison-metrics,
  .analysis-quick-comparison-metrics,
  .quick .analysis-quick-comparison-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-compare { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .ranking-list { grid-template-columns: 1fr; }
  .state-shots { grid-template-columns: 1fr; }
  .state-shots figure + figure { border-left: 0; border-top: 1px solid var(--line); }
  .analysis-hero, .insight-grid, .compare-meta, .split-layout, .pie-card, .risk-layout, .next-layout { grid-template-columns: 1fr; }
  .analysis-metrics { grid-template-columns: repeat(2, 1fr); }
  .conclusion-grid, .timeline { grid-template-columns: repeat(2, 1fr); }
  .compare-meta p + p { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { height: auto; position: fixed; inset: auto 0 0; z-index: 4; padding: 7px; }
  .brand, .sidebar-foot { display: none; }
  .sidebar nav { grid-template-columns: repeat(6, 1fr); width: 100%; }
  .nav-item { font-size: 10px; padding: 8px 3px; text-align: center; }
  header { padding: 16px; display: grid; }
  #view { padding: 16px 16px 82px; }
  .metric-grid, .analysis-metrics, .conclusion-grid, .timeline, .tier-list, .next-list, .compare-images, .report-switch, .brand-compare { grid-template-columns: 1fr; }
  .quick .comparison-metrics { grid-template-columns: 1fr; }
  .analysis-comparison-metrics,
  .quick .analysis-comparison-metrics,
  .analysis-quick-comparison-metrics,
  .quick .analysis-quick-comparison-metrics { grid-template-columns: 1fr; }
  .ranking-item { grid-template-columns: 32px minmax(0, 1fr); }
  .rank-progress { grid-column: 2; grid-template-columns: minmax(80px, 1fr) 44px; }
  .state-card-head, .state-change { align-items: flex-start; flex-direction: column; }
  .image-button { max-height: 420px; }
  .shot-empty { min-height: 420px; }
  .pie-chart { width: 190px; }
  .pie-chart .pie-label { font-size: 10px; min-width: 32px; }
  .pie-legend article { grid-template-columns: 12px 1fr 48px; }
  .pie-legend small { grid-column: 2 / -1; }
  .analysis-hero { padding: 18px; }
  .analysis-hero h2 { font-size: 22px; }
  .panel-head { align-items: flex-start; }
}
