/* ============================================================
 * Ulanzi GTM Command Center v0.1
 * Palette: Tableau Classic 10 + Ulanzi brand red
 * ========================================================== */

:root {
  --c-bg: #F4F4F2;
  --c-surface: #FFFFFF;
  --c-ink: #1A1A1A;
  --c-ink-2: #4A4A4A;
  --c-ink-3: #8A8A8A;
  --c-line: #E2E2DE;

  --c-ulanzi: #C8102E;
  --c-smallrig: #4E79A7;
  --c-peak: #F28E2B;
  --c-neewer: #59A14F;

  --c-bad: #C8102E;
  --c-good: #2E7D32;
  --c-warn: #ED8936;
  --c-blue: #4E79A7;

  --r: 6px;
  --pad: 16px;
  --w-side: 240px;

  --font: -apple-system, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== Hamburger button (hidden on desktop, shown ≤1100px) ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.18s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Nav overlay (behind drawer) ===== */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 59;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #1A1A1A;
  color: #fff;
  border-bottom: 1px solid #000;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  font-size: 28px;
  color: var(--c-ulanzi);
  font-weight: 700;
}
.topbar h1 { font-size: 18px; font-weight: 600; letter-spacing: 0.2px; }
.subtitle { font-size: 12px; color: #B5B5B5; margin-top: 2px; }

.status-block { display: flex; align-items: center; gap: 18px; }
.lang-toggle {
  background: transparent;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-width: 48px;
}
.lang-toggle:hover { background: #2A2A2A; border-color: var(--c-ulanzi); }
.lang-toggle-cur { display: inline-block; }
.status-pill {
  display: flex; align-items: center; gap: 6px;
  background: #2A2A2A; padding: 6px 12px; border-radius: 4px;
  font-size: 11px; letter-spacing: 1px; font-weight: 700;
}
.status-pill.live .dot {
  width: 8px; height: 8px; background: #4CAF50; border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.ts { display: flex; gap: 28px; font-size: 11px; }
.ts label { display: block; color: #888; text-transform: uppercase; font-size: 10px; letter-spacing: 1px; }
.ts span { color: #fff; font-weight: 500; }

/* ===== KPI bar ===== */
.kpibar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.kpi {
  background: var(--c-surface);
  padding: 16px 20px;
  border-bottom: 3px solid transparent;
}
.kpi label { font-size: 11px; color: var(--c-ink-3); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi .value { font-size: 26px; font-weight: 700; margin: 4px 0; font-feature-settings: "tnum"; }
.kpi .value.bad { color: var(--c-bad); }
.kpi .value.good { color: var(--c-good); }
.kpi .ctx { font-size: 11px; color: var(--c-ink-2); }
.kpi.positive { border-bottom-color: var(--c-good); }

/* ===== Layout ===== */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--w-side) 1fr;
  min-height: calc(100vh - 200px);
}
.sidebar {
  border-right: 1px solid var(--c-line);
  padding: 16px 0;
  background: var(--c-surface);
  position: sticky;
  top: 158px;
  align-self: start;
  height: calc(100vh - 158px);
  overflow-y: auto;
}
.navbtn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  padding: 14px 18px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--c-ink-2);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.navbtn:hover { background: var(--c-bg); }
.navbtn.active {
  border-left-color: var(--c-ulanzi);
  background: #FAF7F7;
  color: var(--c-ink);
}
.navnum { font-size: 10px; color: var(--c-ink-3); display: block; letter-spacing: 1px; }
.navtitle { font-size: 14px; font-weight: 600; display: block; margin: 2px 0; }
.navmeta { font-size: 11px; color: var(--c-ink-3); display: block; }
.nav-foot { padding: 16px 18px; border-top: 1px solid var(--c-line); margin-top: 12px; font-size: 10px; color: var(--c-ink-3); }
.nav-foot p { margin-bottom: 4px; }

/* ===== Content ===== */
.content { padding: 24px 32px 80px; min-width: 0; overflow-x: hidden; }
.tab { display: none; animation: fadein 0.25s ease; }
.tab.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tab-head { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--c-line); }
.tab-head h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.tab-head p { color: var(--c-ink-2); max-width: 800px; }
.data-stamp {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--c-ink-3);
  background: var(--c-bg);
  padding: 4px 8px;
  border-radius: 3px;
}

/* ===== Cards & grids ===== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}
.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--c-ink); }
.card .footnote { font-size: 11px; color: var(--c-ink-3); margin-top: 8px; font-style: italic; }
.card.highlight-blue { border-left: 3px solid var(--c-blue); }
.card.highlight-orange { border-left: 3px solid var(--c-warn); }
.card.pending { background: repeating-linear-gradient(45deg, #fff, #fff 10px, #FAFAFA 10px, #FAFAFA 20px); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2 .card { margin-bottom: 0; }

.chart-wrap { position: relative; height: 240px; }
.chart-wrap.tall { height: 320px; }
.chart-scroller { /* mobile scroll container for charts — see media query below */ }

/* ===== Bullets ===== */
.bullets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bullet { padding: 14px; border-radius: var(--r); background: var(--c-bg); }
.bullet.good { border-left: 3px solid var(--c-good); }
.bullet.bad { border-left: 3px solid var(--c-bad); }
.bullet-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 6px;
}
.bullet.good .bullet-tag { background: var(--c-good); color: #fff; }
.bullet.bad .bullet-tag { background: var(--c-bad); color: #fff; }
.bullet p { color: var(--c-ink-2); }
.bullet strong { color: var(--c-ink); }

/* ===== Pending grid ===== */
.pending-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pending-cell {
  display: flex; align-items: center; gap: 8px;
  background: var(--c-bg); padding: 12px; border-radius: var(--r);
  font-size: 12px;
}
.pending-cell label { font-weight: 600; min-width: 110px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.pending { background: var(--c-warn); }
.status-dot.ready { background: var(--c-good); }
.status-dot.live { background: #4CAF50; animation: pulse 1.5s ease-in-out infinite; }

/* ===== Why grid ===== */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.why-cell { background: var(--c-bg); padding: 14px; border-radius: var(--r); }
.why-cell h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--c-warn); }
.why-cell p { font-size: 12px; color: var(--c-ink-2); }

/* ===== Keywords ===== */
.kw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kw-col h4 { font-size: 12px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--c-line); }
.kw-col table { width: 100%; font-size: 11px; }
.kw-col td { padding: 4px 0; border-bottom: 1px dashed var(--c-line); }
.kw-col td:nth-child(2) { text-align: right; color: var(--c-ink-3); font-feature-settings: "tnum"; }
.kw-col td:last-child { text-align: right; color: var(--c-ulanzi); font-weight: 600; padding-left: 6px; }

/* ===== Top pages ===== */
.pages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pages-col h4 { font-size: 12px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--c-line); }
.pages-col .page-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 0; border-bottom: 1px dashed var(--c-line);
}
.pages-col .url { font-size: 10px; color: var(--c-ink-3); word-break: break-all; }
.pages-col .traffic { font-size: 11px; font-weight: 600; }

/* ===== Prompt table ===== */
.prompt-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.prompt-table th, .prompt-table td {
  padding: 8px 10px; text-align: left;
  border-bottom: 1px solid var(--c-line);
}
.prompt-table th { background: var(--c-bg); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.prompt-table td.pending-cell-mini { color: var(--c-ink-3); font-style: italic; }

/* ===== Actions ===== */
.actions-list { display: flex; flex-direction: column; gap: 12px; }
.action-card {
  display: grid;
  grid-template-columns: 50px 90px 1fr 80px 80px 100px;
  gap: 14px;
  align-items: center;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.action-id { font-weight: 700; color: var(--c-ink-3); font-size: 13px; }
.action-priority {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
}
.action-priority.qw { background: #E8F5E9; color: var(--c-good); }
.action-priority.mt { background: #FFF3E0; color: var(--c-warn); }
.action-priority.st { background: #E3F2FD; color: var(--c-blue); }
.action-body h4 { font-size: 14px; margin-bottom: 3px; }
.action-body p { font-size: 12px; color: var(--c-ink-2); }
.action-meta { font-size: 11px; text-align: center; }
.action-meta label { color: var(--c-ink-3); display: block; font-size: 10px; }
.action-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  padding: 4px 8px;
  border-radius: 3px;
}
.action-status.ready { background: #E3F2FD; color: var(--c-blue); }
.action-status.in_progress { background: #FFF3E0; color: var(--c-warn); }

/* ===== Library ===== */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.lib-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lib-img {
  background: #F8F8F6;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--c-line);
  overflow: hidden;
}
.lib-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lib-img-placeholder { color: var(--c-ink-3); font-size: 11px; }
.lib-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lib-brand {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--c-ink-3);
}
.lib-name { font-size: 14px; font-weight: 600; }
.lib-price { font-size: 16px; font-weight: 700; color: var(--c-ulanzi); }
.lib-price.unknown { color: var(--c-ink-3); font-weight: 400; font-style: italic; font-size: 12px; }
.lib-reviews { font-size: 11px; color: var(--c-ink-2); }
.lib-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lib-tag {
  font-size: 10px; padding: 2px 6px; background: var(--c-bg);
  border-radius: 2px; color: var(--c-ink-2);
}
.lib-meta {
  margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--c-line);
  font-size: 10px; color: var(--c-ink-3);
}
.lib-meta div { margin-bottom: 2px; }
.lib-meta strong { color: var(--c-ink-2); }

/* ===== GEO findings ===== */
.geo-findings { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.geo-finding {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--c-bg);
  border-radius: var(--r);
  border-left: 3px solid var(--c-line);
  font-size: 13px;
}
.geo-finding.warning { border-left-color: var(--c-bad); }
.geo-finding.opportunity { border-left-color: var(--c-good); }
.geo-finding-tag {
  flex-shrink: 0;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 2px;
  text-transform: uppercase;
}
.geo-finding.warning .geo-finding-tag { background: var(--c-bad); color: #fff; }
.geo-finding.opportunity .geo-finding-tag { background: var(--c-good); color: #fff; }
.geo-finding p { color: var(--c-ink-2); line-height: 1.5; }

/* ===== KOL Radar v0.8 ===== */
.kol-avatar-cell { width: 50px; padding-right: 0 !important; }
.kol-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-line);
  background: #F0F0F0;
  display: block;
}
.kol-table-wrap { overflow-x: auto; }
.kol-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.kol-table th, .kol-table td {
  padding: 10px 10px; text-align: left;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}
.kol-table th {
  background: var(--c-bg); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
  position: sticky; top: 0; z-index: 1;
}
.kol-table td.kol-name { font-weight: 600; min-width: 160px; }
.kol-table td.kol-name .kol-handle { display: block; font-size: 10px; color: var(--c-ink-3); font-weight: 400; margin-top: 1px; }
.kol-table td.kol-subs { text-align: right; font-feature-settings: "tnum"; font-weight: 600; min-width: 70px; }
.kol-table td.kol-cat { min-width: 100px; }
.kol-cat-tag {
  display: inline-block; padding: 2px 8px; border-radius: 2px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
}
.kol-fit-stars { font-size: 14px; letter-spacing: -1px; color: #F59E0B; }
.kol-fit-stars .empty { color: #D1D5DB; }
.kol-table td.kol-focus { color: var(--c-ink-2); max-width: 220px; }
.kol-table td.kol-angle { color: var(--c-ink-2); max-width: 220px; font-style: italic; }
.kol-table td.kol-us { text-align: right; font-feature-settings: "tnum"; min-width: 50px; }
.kol-status {
  display: inline-block; padding: 4px 8px; border-radius: 2px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  white-space: nowrap;
}
.kol-status.outreach { background: #FFF3E0; color: var(--c-warn); }
.kol-status.in_progress { background: #E8F5E9; color: var(--c-good); }
.kol-status.not_contacted { background: #ECEFF1; color: #607D8B; }
.kol-status.long_shot { background: #FCE4EC; color: #C2185B; }
.kol-status.active { background: var(--c-good); color: #fff; }
.kol-status.rejected { background: #FFCDD2; color: #B71C1C; }

.kol-actions {
  list-style: decimal; padding-left: 24px; margin-top: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.kol-actions li {
  font-size: 13px; color: var(--c-ink-2); line-height: 1.5;
}

/* ===== FCC Radar v1.1 (grouped by product line) ===== */
.fcc-filings { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.fcc-line-block {
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
}
.fcc-line-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line);
}
.fcc-line-icon { font-size: 28px; line-height: 1; }
.fcc-line-title-wrap { flex: 1; }
.fcc-line-title { font-size: 15px; font-weight: 700; }
.fcc-line-count {
  display: inline-block; margin-left: 10px;
  font-size: 11px; font-weight: 600; color: var(--c-ink-3);
  background: #fff; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--c-line);
}
.fcc-line-priority { font-size: 11px; color: var(--c-ink-2); margin-top: 4px; }
.fcc-line-stars { font-size: 13px; color: #F59E0B; letter-spacing: -1px; }
.fcc-line-summary {
  padding: 10px 18px;
  background: #FAFAFA; font-size: 12px; color: var(--c-ink-2); line-height: 1.5;
  border-bottom: 1px dashed var(--c-line);
}
.fcc-brand-block {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
}
.fcc-brand-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: #FAFAFA;
  border-bottom: 1px solid var(--c-line);
}
.fcc-brand-name {
  font-size: 14px; font-weight: 700; letter-spacing: 0.5px;
}
.fcc-brand-meta {
  font-size: 11px; color: var(--c-ink-3);
}
.fcc-brand-status {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px;
}
.fcc-brand-status.live { background: #E8F5E9; color: var(--c-good); }
.fcc-brand-status.pending { background: #FFF3E0; color: var(--c-warn); }
.fcc-brand-status.na { background: #F5F5F5; color: var(--c-ink-3); }

.fcc-filing-list { display: flex; flex-direction: column; }
.fcc-filing-row {
  display: grid;
  grid-template-columns: 130px 1fr 100px 100px;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px dashed var(--c-line);
  font-size: 12px;
  align-items: start;
}
.fcc-filing-row:last-child { border-bottom: 0; }
.fcc-filing-id {
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 11px;
  color: var(--c-ink-3);
  font-feature-settings: "tnum";
}
.fcc-filing-product { font-weight: 600; }
.fcc-filing-cat { font-size: 11px; color: var(--c-ink-3); margin-top: 2px; }
.fcc-filing-implication {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--c-bg);
  border-left: 2px solid var(--c-blue);
  border-radius: 2px;
  color: var(--c-ink-2);
  font-size: 12px; line-height: 1.5;
}
.fcc-filing-implication strong { color: var(--c-ink); }
.fcc-filing-implication.high-alert { border-left-color: var(--c-bad); background: #FFF5F5; }
.fcc-filing-implication.creator-target { border-left-color: var(--c-good); background: #F1F8E9; }
.fcc-filing-date {
  font-size: 11px; color: var(--c-ink-2);
}
.fcc-filing-date label { display: block; color: var(--c-ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.fcc-filing-link {
  font-size: 11px; font-weight: 600; color: var(--c-ulanzi);
  text-decoration: none; align-self: end; margin-top: 4px;
}
.fcc-filing-link:hover { text-decoration: underline; }
.fcc-pending-row {
  padding: 14px 16px; font-size: 12px; color: var(--c-ink-2);
  font-style: italic;
  background: repeating-linear-gradient(45deg, #fff, #fff 8px, #FAFAFA 8px, #FAFAFA 16px);
}

/* ===== Keyword Battlefield v0.5 ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-3 .card { margin-bottom: 0; }

.kw-heatmap-wrap { overflow-x: auto; }
.kw-heatmap { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.kw-heatmap thead th {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  text-align: center; padding: 8px 6px; background: var(--c-bg);
  border-radius: 3px;
}
.kw-heatmap thead th.kw-th-keyword { text-align: left; min-width: 220px; }
.kw-heatmap thead th.kw-th-vol { text-align: right; min-width: 80px; }
.kw-heatmap tbody td {
  padding: 9px 10px; border-radius: 3px; vertical-align: middle;
}
.kw-heatmap tbody td.kw-cell-keyword { background: #fff; font-weight: 500; }
.kw-heatmap tbody td.kw-cell-vol { background: #fff; text-align: right; color: var(--c-ink-2); font-feature-settings: "tnum"; }
.kw-rank-cell {
  text-align: center; font-weight: 700; font-feature-settings: "tnum";
  font-size: 13px;
}
.kw-rank-cell.r-top10 { background: #2E7D32; color: #fff; }
.kw-rank-cell.r-top20 { background: #66BB6A; color: #fff; }
.kw-rank-cell.r-top50 { background: #FFE082; color: #6D4C00; }
.kw-rank-cell.r-50plus { background: #FFCCBC; color: #BF360C; }
.kw-rank-cell.r-none { background: #ECECEC; color: #999; font-weight: 400; font-size: 11px; }
.kw-rank-cell.is-ulanzi { box-shadow: inset 0 0 0 2px var(--c-ulanzi); }

.kw-list-card { display: flex; flex-direction: column; }
.kw-list-card.opp { border-left: 3px solid var(--c-bad); }
.kw-list-card.moat { border-left: 3px solid var(--c-good); }
.kw-list-card.blue { border-left: 3px solid var(--c-blue); }
.kw-opp-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.kw-opp-item {
  background: var(--c-bg); padding: 10px 12px; border-radius: var(--r);
  font-size: 12px;
}
.kw-opp-item .kw-opp-h {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.kw-opp-item .kw-opp-term { font-weight: 700; font-size: 13px; }
.kw-opp-item .kw-opp-vol { font-size: 11px; color: var(--c-ink-3); font-feature-settings: "tnum"; }
.kw-opp-item .kw-opp-rationale { color: var(--c-ink-2); line-height: 1.45; }

/* ===== Benchmark Matrix v0.4 (micro-level cross-brand comparison) ===== */
.benchmark-list {
  display: flex; flex-direction: column; gap: 22px; margin-top: 16px;
}
.benchmark-row {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
  background: #fff;
}
.benchmark-row-head {
  background: linear-gradient(90deg, #1A1A1A 0%, #2a2a2a 100%);
  color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.benchmark-row-head .bm-cat {
  font-size: 14px; font-weight: 700; letter-spacing: 0.5px;
}
.benchmark-row-head .bm-use-label {
  font-size: 10px; color: #999; letter-spacing: 1px; text-transform: uppercase;
  margin-left: 12px;
}
.benchmark-row-head .bm-use {
  font-size: 12px; color: #ddd; margin-left: 6px;
}
.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--c-line);
}
.benchmark-cell {
  background: #fff;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px;
  position: relative;
}
.bm-img-frame {
  width: 100%; aspect-ratio: 1.3 / 1;
  background: #F8F8F6;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--c-line);
}
.bm-img-frame img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  background: #fff;
}
.bm-img-frame .bm-img-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--c-ink-3); font-size: 10px; gap: 4px;
  text-align: center; padding: 8px;
}
.bm-img-frame .bm-img-placeholder strong {
  font-size: 14px; letter-spacing: 1px;
  color: var(--c-ink-2);
}
.bm-img-frame.is-empty {
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 6px, #f0f0f0 6px, #f0f0f0 12px);
}
.benchmark-cell.is-anchor {
  background: linear-gradient(180deg, #FAF5F5 0%, #FFFFFF 80%);
  border-left: 4px solid var(--c-ulanzi);
  padding-left: 12px;
}
.benchmark-cell.is-empty {
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 6px, #f0f0f0 6px, #f0f0f0 12px);
}
.bm-brand {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 4px;
}
.bm-title {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  min-height: 36px;
}
.bm-price {
  font-size: 18px; font-weight: 700; font-feature-settings: "tnum";
  color: var(--c-ink);
}
.bm-sources {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 6px;
  background: #FAFAFA; border-radius: var(--r);
  padding: 6px 8px;
  border: 1px solid var(--c-line);
}
.bm-src {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 6px;
  align-items: baseline;
  font-size: 11px;
  font-feature-settings: "tnum";
  padding: 2px 0;
}
.bm-src-label { font-weight: 600; color: var(--c-ink-2); white-space: nowrap; }
.bm-src-price { font-weight: 700; color: var(--c-ink); font-size: 13px; }
.bm-src-meta { color: var(--c-ink-3); font-size: 10px; white-space: nowrap; }
.bm-src.bm-src-pending .bm-src-price,
.bm-src.bm-src-pending .bm-src-meta { color: #BBB; font-style: italic; font-weight: 400; font-size: 11px; }
.bm-src.bm-src-live .bm-src-price { color: var(--c-ulanzi); }
.bm-price.is-anchor-price { color: var(--c-ulanzi); }
.bm-price.is-pending { color: var(--c-ink-3); font-size: 12px; font-weight: 400; font-style: italic; }
.bm-reviews {
  font-size: 11px; color: var(--c-ink-2);
}
.bm-reviews .star { color: #F59E0B; }
.bm-specs {
  font-size: 11px; color: var(--c-ink-2);
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px dashed var(--c-line); padding-top: 6px; margin-top: 4px;
}
.bm-specs .sp-row { display: flex; justify-content: space-between; gap: 6px; }
.bm-specs .sp-row label { color: var(--c-ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.bm-rank {
  font-size: 10px; color: var(--c-good); font-style: italic; margin-top: 4px;
  background: #E8F5E9; padding: 4px 6px; border-radius: 2px;
  border-left: 2px solid var(--c-good);
}
.bm-cta {
  margin-top: auto; padding-top: 8px;
  font-size: 11px; font-weight: 600;
}
.bm-cta a { color: var(--c-ulanzi); text-decoration: none; }
.bm-cta a:hover { text-decoration: underline; }
.bm-data-tag {
  position: absolute; top: 8px; right: 10px;
  font-size: 9px; color: var(--c-ink-3); letter-spacing: 0.5px;
  background: #fff; padding: 2px 5px; border-radius: 2px; border: 1px solid var(--c-line);
}
.bm-empty-msg {
  font-size: 11px; color: var(--c-ink-3); font-style: italic; margin-top: 8px;
  line-height: 1.5;
}

/* ===== Deliverables tab v0.9 (categorized) ===== */
.deliverables-list { display: flex; flex-direction: column; gap: 24px; }
.del-cat-block {}
.del-cat-h {
  font-size: 14px; font-weight: 700; padding-left: 10px;
  border-left: 3px solid var(--c-line);
  margin-bottom: 12px;
}
.del-cat-h .del-cat-count {
  display: inline-block; margin-left: 8px;
  font-size: 11px; color: var(--c-ink-3); font-weight: 400;
}
.del-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 14px;
}
.deliverables-list-old {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 14px;
}
.del-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  transition: border-color 0.15s, transform 0.15s;
}
.del-card:hover { border-color: var(--c-ulanzi); transform: translateY(-2px); }
.del-card.is-flagship { border-left: 3px solid var(--c-ulanzi); }
.del-meta-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 4px;
}
.del-type-tag, .del-status-tag, .del-date-tag {
  background: var(--c-bg); color: var(--c-ink-2);
  padding: 3px 8px; border-radius: 2px;
  font-weight: 600;
}
.del-type-tag.html { background: #E8F0FE; color: var(--c-blue); }
.del-type-tag.md { background: #F3E8FF; color: #7C3AED; }
.del-status-tag.delivered { background: #E8F5E9; color: var(--c-good); }
.del-status-tag.pending { background: #FFF3E0; color: var(--c-warn); }
.del-status-tag.internal { background: var(--c-bg); color: var(--c-ink-3); }
.del-title {
  font-size: 14px; font-weight: 600; line-height: 1.4;
}
.del-desc {
  font-size: 12px; color: var(--c-ink-2); line-height: 1.5;
}
.del-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px dashed var(--c-line); padding-top: 8px; margin-top: 4px;
  font-size: 11px;
}
.del-audience { color: var(--c-ink-3); }
.del-audience strong { color: var(--c-ink); font-weight: 600; }
.del-actions { display: flex; gap: 10px; }
.del-actions a, .del-actions button {
  background: none; border: 0; padding: 0;
  color: var(--c-ulanzi); font-family: var(--font); font-size: 11px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.del-actions a:hover, .del-actions button:hover { text-decoration: underline; }

/* ===== Library v0.3 — category tabs / summary / table ===== */
.cat-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.cat-chip {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  color: var(--c-ink-2);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-chip:hover { border-color: var(--c-ulanzi); color: var(--c-ulanzi); }
.cat-chip.active {
  background: var(--c-ulanzi); color: #fff; border-color: var(--c-ulanzi);
}
.cat-chip .cat-count {
  display: inline-block; margin-left: 6px; opacity: 0.7;
  font-weight: 400; font-size: 11px;
}

.cat-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.cat-sum-cell {
  background: var(--c-bg);
  padding: 10px 12px;
  border-radius: var(--r);
  border-left: 3px solid var(--c-line);
}
.cat-sum-cell.brand-Ulanzi { border-left-color: var(--c-ulanzi); }
.cat-sum-cell.brand-Neewer { border-left-color: var(--c-neewer); }
.cat-sum-cell.brand-SmallRig { border-left-color: var(--c-smallrig); }
.cat-sum-cell.brand-PeakDesign { border-left-color: var(--c-peak); }
.cat-sum-cell .cs-brand {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--c-ink-3); margin-bottom: 6px;
}
.cat-sum-cell .cs-row {
  display: flex; justify-content: space-between; font-size: 12px; padding: 2px 0;
}
.cat-sum-cell .cs-row label { color: var(--c-ink-3); }
.cat-sum-cell .cs-row span { color: var(--c-ink); font-weight: 600; font-feature-settings: "tnum"; }

/* ===== ShotLib Blueprint + Methodology (v1.5) ===== */
.shotlib-blueprint-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin-top: 12px;
}
.shotlib-bp-step {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--c-bg); padding: 14px;
  border-radius: var(--r);
  border-left: 3px solid var(--c-warn);
}
.shotlib-bp-num {
  font-size: 26px; font-weight: 800;
  color: var(--c-warn); line-height: 1;
  flex-shrink: 0; min-width: 32px;
}
.shotlib-bp-content h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--c-ink); }
.shotlib-bp-content p { font-size: 12px; line-height: 1.5; color: var(--c-ink-2); }

.shotlib-method-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 12px;
}
.shotlib-method-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-blue);
  border-radius: var(--r);
  padding: 14px;
}
.shotlib-method-icon { font-size: 22px; margin-bottom: 6px; }
.shotlib-method-h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--c-ink); }
.shotlib-method-rule { font-size: 11px; color: var(--c-ink-2); line-height: 1.5; margin-bottom: 6px; }
.shotlib-method-evidence {
  font-size: 10px; color: var(--c-ink-3); font-style: italic;
  background: var(--c-bg); padding: 6px 8px; border-radius: 3px; margin-top: 6px;
}

/* ===== Benchmark Cross-brand comparison table (v1.5) ===== */
.bm-compare-wrap {
  border-top: 1px solid var(--c-line);
  padding: 14px 16px;
  background: #FAFAFA;
}
.bm-compare-h {
  font-size: 13px; font-weight: 700;
  margin-bottom: 10px;
  color: var(--c-ink);
}
.bm-compare-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bm-compare-table thead th {
  text-align: left; padding: 8px 10px;
  background: #fff;
  font-size: 11px; font-weight: 700;
  border-bottom: 2px solid var(--c-line);
}
.bm-compare-table thead th.cmp-row-label { width: 130px; color: var(--c-ink-3); font-weight: 600; }
.cmp-anchor-tag {
  display: inline-block; margin-left: 6px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  background: var(--c-ulanzi); color: #fff;
  padding: 2px 5px; border-radius: 2px;
}
.bm-compare-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px dashed var(--c-line);
  vertical-align: top;
}
.bm-compare-table tbody td.cmp-row-label {
  font-weight: 600; color: var(--c-ink-2);
  text-transform: capitalize;
}
.bm-compare-table tbody td.cmp-anchor { background: #FAF5F5; }
.cmp-val { font-weight: 600; color: var(--c-ink); font-feature-settings: "tnum"; }
.cmp-delta { font-size: 10px; margin-top: 2px; font-weight: 600; }
.cmp-good { color: var(--c-good); }
.cmp-bad { color: var(--c-bad); }
.cmp-eq { color: var(--c-ink-3); }

/* ===== Reddit posts grid (v1.4) ===== */
.reddit-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.reddit-posts-col {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  background: var(--c-surface);
  overflow: hidden;
}
.reddit-posts-brand-h {
  font-size: 13px; font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-line);
  background: #FAFAFA;
  display: flex; justify-content: space-between; align-items: center;
}
.reddit-posts-count { font-size: 10px; font-weight: 400; color: var(--c-ink-3); }
.reddit-posts-list { display: flex; flex-direction: column; }
.reddit-post-row {
  display: block; padding: 10px 14px;
  border-bottom: 1px dashed var(--c-line);
  text-decoration: none; color: inherit;
  transition: background 0.1s;
}
.reddit-post-row:last-child { border-bottom: 0; }
.reddit-post-row:hover { background: #FAFAFA; }
.reddit-post-title {
  font-size: 12px; line-height: 1.4; color: var(--c-ink);
  margin-bottom: 4px;
}
.reddit-post-meta {
  display: flex; gap: 12px; font-size: 10px; color: var(--c-ink-3);
}
.reddit-post-sub { color: #FF4500; font-weight: 600; }

.lib-table-wrap { overflow-x: auto; }
.lib-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lib-table th, .lib-table td {
  padding: 9px 10px; text-align: left;
  border-bottom: 1px solid var(--c-line);
}
.lib-table th { background: var(--c-bg); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.lib-table td.lib-sku { max-width: 380px; }
.lib-table td.lib-price { text-align: right; font-feature-settings: "tnum"; font-weight: 600; }
.lib-table td.lib-brand-cell { font-weight: 700; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; }
.lib-table a.lib-pdp { color: var(--c-ulanzi); text-decoration: none; font-size: 11px; font-weight: 600; }
.lib-table a.lib-pdp:hover { text-decoration: underline; }

/* ===== Responsive — Tablet + Mobile (≤1100px) ===== */
@media (max-width: 1100px) {
  /* KPI bar: 2-col */
  .kpibar { grid-template-columns: repeat(2, 1fr); }

  /* Layout: content takes full width (sidebar is a fixed drawer) */
  .layout { grid-template-columns: 1fr; }

  /* Show hamburger button */
  .hamburger { display: flex; }

  /* Sidebar → fixed left drawer, off-screen by default */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh !important;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 60;
    transform: translateX(-270px);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--c-line);
    padding: 16px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    background: var(--c-surface);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
  }

  /* Nav groups: restore normal block layout inside drawer */
  .nav-group {
    display: block !important;
    margin-bottom: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--c-line);
  }
  .nav-group:first-child { border-top: none; padding-top: 0; }
  .nav-group-title { display: flex !important; }
  .nav-foot { display: block !important; }

  /* Nav buttons: original sidebar style restored */
  .navbtn,
  .navbtn.sub {
    flex: none !important;
    width: 100% !important;
    white-space: normal !important;
    padding: 8px 18px 8px 30px !important;
    border-left: 3px solid transparent !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    margin-left: 12px !important;
    font-size: 13px !important;
  }
  .navbtn::before,
  .navbtn.sub::before { display: block !important; }
  .navbtn.active,
  .navbtn.sub.active {
    border-left-color: var(--c-ulanzi) !important;
    border-bottom-color: transparent !important;
    background: #FFF6F7 !important;
  }
  .navbtn.sub.active .navtitle { color: var(--c-ulanzi) !important; }
  .navtitle { font-size: 13px !important; margin: 2px 0 !important; }

  /* Content grids */
  .grid-2 { grid-template-columns: 1fr; }
  .bullets, .why-grid, .pending-grid, .kw-grid, .pages-grid { grid-template-columns: 1fr 1fr; }
  .action-card { grid-template-columns: 1fr; gap: 6px; }
}

/* ===== Topbar — compress at medium widths ===== */
@media (max-width: 900px) {
  .topbar-inner { padding: 10px 16px; gap: 12px; }
  .topbar h1 { font-size: 16px; }
  .subtitle { display: none; }
  .ts { gap: 16px; }
  .ts label { display: none; }
}
@media (max-width: 720px) {
  /* Keep topbar on ONE line — no wrapping */
  .topbar-inner { flex-wrap: nowrap; gap: 8px; align-items: center; }
  .brand-block { flex: 1; min-width: 0; overflow: hidden; gap: 8px; }
  .brand-mark { font-size: 20px; flex-shrink: 0; }
  .topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
  .status-block { flex: 0 0 auto; gap: 8px; flex-wrap: nowrap; }
  .ts { display: none; }
}

/* ============ Tab 08 Shot Library ============ */
.shotlib-section-h {
  margin: 30px 0 14px;
  font-size: 16px;
  color: var(--c-ink, #1A1A1A);
  font-weight: 700;
  padding: 10px 14px;
  background: linear-gradient(90deg, #FFF8E7 0%, transparent 100%);
  border-left: 4px solid #C8102E;
}

.shotlib-statbar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.shotlib-stat {
  background: #FAFAFA;
  border: 1px solid #EEE;
  border-radius: 8px;
  padding: 12px 14px;
}
.shotlib-stat label {
  font-size: 11px;
  color: #888;
  display: block;
  margin-bottom: 4px;
}
.shotlib-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: #1A1A1A;
}
.shotlib-stat.bad .shotlib-stat-val { color: #C8102E; }
.shotlib-stat.good .shotlib-stat-val { color: #4E9F3D; }

/* Inline compact statbar inside tab-head */
.shotlib-statbar-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.shotlib-statbar-inline .shotlib-stat {
  padding: 4px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F5F5F5;
  border: 1px solid #E0E0E0;
}
.shotlib-statbar-inline .shotlib-stat label {
  font-size: 11px;
  color: #888;
  display: inline;
  margin-bottom: 0;
}
.shotlib-statbar-inline .shotlib-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: #1A1A1A;
}
.shotlib-statbar-inline .shotlib-stat-ctx { display: none; }

.shotlib-stat-ctx {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.shotlib-formulas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.shotlib-formula {
  background: #FFF;
  border: 1px solid #E5E5E5;
  border-left: 4px solid #ccc;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shotlib-formula.tier-gold { border-left-color: #D4AF37; background: #FFFCF0; }
.shotlib-formula.tier-silver { border-left-color: #888; background: #FAFAFA; }
.shotlib-formula.tier-bronze { border-left-color: #B57448; }
.shotlib-formula.tier-avoid { border-left-color: #C8102E; background: #FFF7F7; opacity: 0.85; }
.shotlib-formula-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.shotlib-formula-id {
  font-weight: 700;
  font-size: 14px;
  background: #1A1A1A;
  color: #FFF;
  padding: 2px 8px;
  border-radius: 4px;
}
.shotlib-formula-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}
.shotlib-formula-mean {
  font-weight: 700;
  font-size: 13px;
  color: #C8102E;
}
.shotlib-formula-summary {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  margin: 6px 0 10px;
}
.shotlib-formula-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.shotlib-formula-grid > div {
  background: #F0F4F8;
  border-radius: 4px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.shotlib-formula-grid label {
  font-size: 10px;
  color: #6B7280;
}
.shotlib-formula-grid span {
  font-size: 11px;
  font-weight: 700;
  color: #1E293B;
}
.shotlib-formula-tmpl {
  margin-top: 2px;
}
.shotlib-formula-tmpl label {
  font-size: 10px;
  color: #9CA3AF;
  display: block;
  margin-bottom: 2px;
}
.shotlib-formula-tmpl code {
  display: block;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: #374151;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
}
.shotlib-formula-creators label {
  font-size: 11px;
  color: #888;
  margin-right: 6px;
}
.creator-pill {
  display: inline-block;
  background: #EEF2F7;
  color: #2563EB;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-right: 4px;
  margin-bottom: 2px;
}

.shotlib-table-wrap { overflow-x: auto; }
.shotlib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.shotlib-table th {
  background: #F5F5F5;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #DDD;
}
.shotlib-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #EEE;
  vertical-align: top;
}
.shotlib-table tr.row-ulanzi { background: #FFF6F7; }
.rank-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #EEE;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.rank-badge.top3 {
  background: linear-gradient(135deg, #D4AF37, #FFD700);
  color: #1A1A1A;
}
.creator-link {
  color: #2563EB;
  text-decoration: none;
  font-weight: 500;
}
.creator-link:hover { text-decoration: underline; }
.hook-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 11px;
  font-weight: 500;
}
.sku-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #C8102E;
  color: #FFF;
  font-size: 11px;
  font-weight: 600;
  margin-right: 4px;
  margin-bottom: 2px;
}

.shotlib-cat-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.shotlib-cat-tab {
  background: #F5F5F5;
  border: 1px solid #DDD;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #555;
}
.shotlib-cat-tab.active {
  background: #1A1A1A;
  color: #FFF;
  border-color: #1A1A1A;
}
.ex-line {
  display: inline-block;
  background: #F0F8F0;
  color: #2D5A2D;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'SF Mono', 'Menlo', monospace;
  margin: 2px 4px 2px 0;
}

.shotlib-briefs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.shotlib-brief {
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  overflow: hidden;
}
.shotlib-brief-head {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1A1A1A;
  color: #FFF;
  padding: 10px 16px;
}
.brief-id {
  background: #FFD700;
  color: #1A1A1A;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
}
.brief-name { flex: 1; font-weight: 600; font-size: 14px; }
.brief-target { font-size: 12px; color: #FFD700; }
.brief-formula { font-size: 11px; color: #AAA; }
.brief-table { font-size: 12px; }
.brief-table .brief-key {
  width: 22%;
  background: #FAFAFA;
  font-weight: 600;
  color: #555;
}

.shotlib-creators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.shotlib-creator {
  background: #FFF;
  border: 1px solid #E5E5E5;
  border-left: 4px solid #ccc;
  border-radius: 6px;
  padding: 12px 14px;
}
.shotlib-creator.tier-s { border-left-color: #D4AF37; background: linear-gradient(180deg, #FFFCF0 0%, #FFF 60%); }
.shotlib-creator.tier-a { border-left-color: #4E9F3D; }
.shotlib-creator.tier-b { border-left-color: #4E79A7; }
.shotlib-creator.tier-c { border-left-color: #888; }
.shotlib-creator.tier-d { border-left-color: #C8102E; opacity: 0.9; background: #FFF7F7; }
.creator-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.tier-badge {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 12px;
  color: #FFF;
}
.tier-badge.tier-s { background: linear-gradient(135deg, #D4AF37, #FFD700); color: #1A1A1A; }
.tier-badge.tier-a { background: #4E9F3D; }
.tier-badge.tier-b { background: #4E79A7; }
.tier-badge.tier-c { background: #888; }
.tier-badge.tier-d { background: #C8102E; }
.creator-name { flex: 1; font-weight: 600; font-size: 14px; color: #2563EB; }
.creator-fan-tier { font-size: 11px; color: #888; }
.creator-edge {
  font-size: 12px;
  color: #444;
  margin: 6px 0 8px;
  line-height: 1.5;
}
.creator-stats {
  display: flex;
  gap: 14px;
  background: #F8F8F8;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 6px 0;
  font-size: 12px;
}
.creator-stats label {
  font-size: 10px;
  color: #999;
  display: block;
}
.creator-stats span { font-weight: 600; }
.creator-pills { margin-bottom: 6px; }
.creator-videos {
  border-top: 1px dashed #EEE;
  padding-top: 6px;
  margin-top: 6px;
}
.creator-video-row {
  display: flex;
  gap: 10px;
  padding: 3px 0;
  font-size: 11px;
}
.vid-sku {
  display: inline-block;
  width: 50px;
  font-weight: 600;
  color: #C8102E;
}
.vid-likes { font-weight: 600; min-width: 60px; }
.vid-meta { color: #888; }

.gap-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}
.gap-badge.good { background: #D4F4DC; color: #2D5A2D; }
.gap-badge.bad { background: #FCD9D9; color: #8B0000; }
.sku-en { font-size: 10px; color: #888; }

@media (max-width: 1100px) {
  .shotlib-statbar { grid-template-columns: repeat(3, 1fr); }
  .shotlib-formulas, .shotlib-creators { grid-template-columns: 1fr; }
}

/* ============ Tab 08 V2 — Section-grouped samples ============ */
.shotlib-samples-grid { display: flex; flex-direction: column; gap: 32px; }

.shotlib-section {
  border: 1px solid #E5E5E5;
  border-radius: 10px;
  background: #FFF;
  overflow: hidden;
}
.section-header {
  background: linear-gradient(90deg, #1A1A1A 0%, #2A2A2A 100%);
  color: #FFF;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #FFD700;
}
.section-sku-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  background: #C8102E;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}
.section-meta {
  font-size: 12px;
  color: #BBB;
}

.section-samples {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sample-card {
  border: 1px solid #E8E8E8;
  border-left: 4px solid #ccc;
  border-radius: 8px;
  background: #FAFAFA;
  overflow: hidden;
}
.sample-card.tier-gold { border-left-color: #D4AF37; }
.sample-card.tier-silver { border-left-color: #888; }
.sample-card.tier-bronze { border-left-color: #B57448; }

.card-top {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 12px 14px;
  background: #FFF;
  border-bottom: 1px solid #EEE;
}
.card-thumb {
  position: relative;
  background: #000;
  aspect-ratio: 9 / 16;
  border-radius: 4px;
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.78);
  color: #FFD700;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.card-row-1 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card-creator {
  font-size: 14px;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
}
.card-creator:hover { text-decoration: underline; }
.card-likes {
  margin-left: auto;
  font-weight: 700;
  font-size: 14px;
  color: #1A1A1A;
}
.card-row-2 {
  font-size: 11px;
  color: #777;
}
.card-row-2 .card-brand { font-weight: 600; color: #444; }
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0;
}
.sample-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: #F0F0F0;
  color: #555;
}
.sample-tag.ulanzi { background: #C8102E; color: #FFF; font-weight: 700; }
.sample-tag.hook { background: #FEF3C7; color: #92400E; }
.sample-tag.struct { background: #DBEAFE; color: #1E40AF; }
.sample-tag.formula { background: #1A1A1A; color: #FFD700; font-weight: 700; }
.sample-tag.voice { background: #E0F2FE; color: #075985; }

.card-visual-hook {
  background: #FFF8E7;
  border-left: 3px solid #D4AF37;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 4px;
}
.vhook-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #D4AF37;
  margin-right: 6px;
  margin-bottom: 2px;
}
.card-visual-hook p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #444;
}

.card-strip {
  background: #1A1A1A;
  padding: 12px 14px;
  overflow: hidden;
}
.strip-scroller {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}

.shot-tile {
  flex: 0 0 auto;
  width: 110px;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.shot-tile img {
  width: 110px;
  height: 196px;
  object-fit: cover;
  display: block;
}
.shot-tile-meta {
  padding: 4px 6px;
  background: #2A2A2A;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.shot-tile-num {
  font-size: 10px;
  font-weight: 700;
  color: #FFD700;
}
.shot-tile-time {
  font-size: 10px;
  color: #BBB;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.card-script-toggle {
  background: #FAFAFA;
  border-top: 1px solid #EEE;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-script-toggle button {
  background: #FFF;
  border: 1px solid #DDD;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #555;
  font-weight: 500;
}
.card-script-toggle button:hover { background: #F0F0F0; border-color: #BBB; }
.card-video-link {
  margin-left: auto;
  color: #2563EB;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.card-video-link:hover { text-decoration: underline; }

.script-panel {
  display: none;
  background: #FAFAFA;
  border-top: 1px solid #EEE;
  padding: 14px;
}
.script-panel.open { display: block; }
.script-table { font-size: 12px; }
.script-table th { background: #FFF; }
.script-table .shot-num {
  width: 50px;
  font-weight: 700;
  color: #C8102E;
  white-space: nowrap;
}
.script-table .shot-time {
  width: 130px;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 11px;
  color: #555;
  white-space: nowrap;
}
.script-table .shot-asr {
  font-size: 12px;
  line-height: 1.6;
  color: #333;
}
.shot-asr-empty { color: #BBB; font-style: italic; }
.silent-note {
  background: #FFF7E6;
  border-left: 3px solid #F59E0B;
  padding: 8px 12px;
  font-size: 12px;
  color: #92400E;
  margin: 0 0 10px;
  border-radius: 0 4px 4px 0;
}

.section-intersection {
  background: linear-gradient(180deg, #FFF8E7 0%, #FFFCF0 100%);
  border-top: 1px solid #E5C97B;
  padding: 16px 20px 18px;
}
.section-intersection h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #1A1A1A;
}
.intersection-points {
  margin: 0 0 12px;
  padding-left: 20px;
}
.intersection-points li {
  font-size: 13px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 4px;
}
.intersection-points li strong {
  color: #C8102E;
}
.intersection-action {
  background: #C8102E;
  color: #FFF;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}
.action-tag {
  display: inline-block;
  background: #FFD700;
  color: #1A1A1A;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}

@media (max-width: 1100px) {
  .card-top { grid-template-columns: 90px 1fr; }
}
@media (max-width: 800px) {
  .shot-tile { width: 90px; }
  .shot-tile img { width: 90px; height: 160px; }
}

.intersection-points li em,
.intersection-action em,
.card-visual-hook em {
  font-style: normal;
  background: #FFF3CD;
  color: #92400E;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}

/* ============ v0.3 Sidebar groups (一级 + 二级目录) ============ */
.nav-group {
  margin-bottom: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--c-line, #EEE);
}
.nav-group:first-child { border-top: none; padding-top: 0; }
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.nav-group-icon { font-size: 14px; }
.navbtn.sub {
  padding: 8px 18px 8px 30px;
  border-left: 3px solid transparent;
  margin-left: 12px;
  position: relative;
}
.navbtn.sub::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 6px;
  height: 1px;
  background: #BBB;
  transform: translateY(-50%);
}
.navbtn.sub .navtitle { font-size: 13px; font-weight: 500; margin: 0; }
.navbtn.sub.active {
  background: #FFF6F7;
  border-left-color: #C8102E;
}
.navbtn.sub.active::before { background: #C8102E; height: 2px; width: 8px; }
.navbtn.sub.active .navtitle { color: #C8102E; font-weight: 700; }

/* ============ Store teardown grids (placeholder until content) ============ */
/* ===== Store horizontal comparison layout ===== */
.store-grid { display: flex; flex-direction: column; gap: 22px; }

.store-comparison-block {
  background: #FFF;
  border: 1px solid #E0E0E0;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

/* Header row: store name columns */
.cmp-header-row {
  display: flex;
  background: linear-gradient(90deg, #1A1A1A 0%, #2A2A2A 100%);
  position: sticky;
  top: 0;
  z-index: 5;
}
.cmp-dim-spacer {
  width: 130px;
  min-width: 130px;
  flex-shrink: 0;
  border-right: 1px solid #333;
}
.cmp-store-headers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  flex: 1;
  gap: 0;
}
.cmp-store-header {
  padding: 12px 14px;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cmp-store-header:last-child { border-right: none; }
.cmp-store-header.tier-gold { border-top: 3px solid #D4AF37; }
.cmp-store-header.tier-silver { border-top: 3px solid #A8A8A8; }
.cmp-store-header.tier-bronze { border-top: 3px solid #CD7F32; }
.cmp-store-name { font-size: 14px; font-weight: 700; color: #FFF; }
.cmp-store-link {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #AAA;
  text-decoration: none;
  font-size: 13px;
}
.cmp-store-link:hover { color: #FFF; }
.cmp-store-tagline { font-size: 11px; color: #AAA; line-height: 1.4; }
.cmp-store-header { position: relative; }

/* Dimension rows */
.cmp-dim-row {
  display: flex;
  border-bottom: 1px solid #EBEBEB;
}
.cmp-dim-row:last-of-type { border-bottom: none; }
.dim-row-label {
  width: 130px;
  min-width: 130px;
  flex-shrink: 0;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background: #F8F8F8;
  border-right: 1px solid #E5E5E5;
  display: flex;
  align-items: center;
  line-height: 1.4;
}
.dim-cols-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  flex: 1;
}
.dim-col {
  padding: 6px;
  border-right: 1px solid #EBEBEB;
  cursor: pointer;
  transition: background 0.15s;
}
.dim-col:last-child { border-right: none; }
.dim-col:hover { background: #F5F9FF; }
.dim-col img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  display: block;
}
.dim-col-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  color: #CCC;
  font-size: 20px;
}
.dim-note {
  font-size: 11px;
  color: #666;
  margin-top: 5px;
  line-height: 1.4;
  padding: 0 2px;
}

/* Conclusions — always expanded */
.store-concl-expanded {
  border-top: 2px solid #F0F0F0;
  background: #FAFAF8;
}
.store-concl-title {
  padding: 9px 18px;
  font-size: 11px;
  font-weight: 700;
  color: #8A8A8A;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #EBEBEB;
}
.store-concl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
}
.store-concl-card {
  padding: 14px 18px;
  border-right: 1px solid #EBEBEB;
  border-bottom: 1px solid #EBEBEB;
}
.store-concl-card:last-child { border-right: none; }
.store-concl-card-name {
  font-size: 12px;
  font-weight: 700;
  color: #4A4A4A;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #EBEBEB;
}
.store-concl-card ul { margin: 0; padding-left: 16px; }
.store-concl-card li { font-size: 12px; line-height: 1.65; color: #333; margin-bottom: 6px; }
.store-concl-card li:last-child { margin-bottom: 0; }
.store-concl-card strong { color: #C8102E; }

/* Expanded per-store conclusion rows (new layout) */
.store-concl-rows { display: flex; flex-direction: column; }
.store-concl-row {
  padding: 20px 22px;
  border-bottom: 1px solid #EBEBEB;
}
.store-concl-row:last-child { border-bottom: none; }
.concl-row-self {
  background: #FFFDF9;
  border-left: 4px solid #C8102E;
}
.concl-row-comp {
  background: #FAFAFA;
  border-left: 4px solid #E0E0E0;
}
.concl-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.concl-row-name {
  font-size: 14px;
  font-weight: 700;
  color: #1A1A1A;
}
.concl-tag-self {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #FFF;
  background: #C8102E;
  padding: 2px 7px;
  border-radius: 3px;
}
.concl-tag-comp {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #FFF;
  background: #6B6B6B;
  padding: 2px 7px;
  border-radius: 3px;
}
.concl-row-link {
  font-size: 11px;
  color: #888;
  text-decoration: none;
  margin-left: auto;
}
.concl-row-link:hover { color: #333; text-decoration: underline; }
.concl-list {
  margin: 0 0 0 18px;
  padding: 0;
}
.concl-list li {
  font-size: 12.5px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 7px;
}
.concl-list li:last-child { margin-bottom: 0; }
.concl-list strong { color: #C8102E; }
.concl-ulanzi-box {
  margin-top: 14px;
  background: #FFF9E6;
  border: 1px solid #F5D87A;
  border-radius: 7px;
  padding: 12px 16px;
}
.concl-ulanzi-box-title {
  font-size: 11px;
  font-weight: 700;
  color: #92650A;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.concl-ulanzi-box ul {
  margin: 0 0 0 16px;
  padding: 0;
}
.concl-ulanzi-box li {
  font-size: 12px;
  line-height: 1.65;
  color: #6B4A00;
  margin-bottom: 6px;
}
.concl-ulanzi-box li:last-child { margin-bottom: 0; }
.concl-ulanzi-box strong { color: #92650A; }
.concl-self-note {
  margin-top: 12px;
  font-size: 11.5px;
  color: #A0A09A;
  font-style: italic;
  padding-top: 10px;
  border-top: 1px dashed #E0E0E0;
}

/* Platform Insights — consulting conclusions-first card */
.platform-insights-wrap {
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 22px 22px 18px;
}
.pi-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.pi-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C8102E;
}
.pi-sub {
  font-size: 11px;
  color: #A0A09A;
  letter-spacing: 0.02em;
}
.pi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pi-card {
  background: #F7F7F5;
  border: 1px solid #E6E6E2;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.pi-num {
  font-size: 26px;
  font-weight: 800;
  color: #DDDDD8;
  line-height: 1;
  flex-shrink: 0;
  font-feature-settings: "tnum";
  min-width: 34px;
}
.pi-body { flex: 1; min-width: 0; }
.pi-headline {
  font-size: 13px;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.5;
  margin-bottom: 7px;
}
.pi-evidence {
  font-size: 11.5px;
  color: #7A7A74;
  line-height: 1.6;
  margin-bottom: 9px;
}
.pi-action {
  font-size: 11.5px;
  color: #4A4A4A;
  line-height: 1.6;
  border-top: 1px solid #E6E6E2;
  padding-top: 8px;
}
.pi-action-label {
  font-weight: 700;
  color: #C8102E;
  margin-right: 4px;
}
.cmp-section-divider {
  background: #F4F4F2;
  color: #8A8A8A;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-bottom: 1px solid #E0E0E0;
}

/* Lightbox */
.store-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.store-lightbox.open { display: flex; }
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
}
.lb-img-wrap {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
}
.lb-img-wrap img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.lb-close {
  position: absolute;
  top: -14px;
  right: -14px;
  background: #FFF;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Legacy (keep for backward compat) */
.store-card { border: 1px solid #E5E5E5; border-left: 4px solid #2563EB; border-radius: 10px; background: #FFF; overflow: hidden; }
.store-card.tier-gold { border-left-color: #D4AF37; }
.store-empty-note {
  background: #FFF7E6;
  border: 1px dashed #F59E0B;
  border-radius: 6px;
  padding: 16px 20px;
  color: #92400E;
  font-size: 13px;
  line-height: 1.6;
}

/* ============================================================
   Product Lines · Competitor Map
   ============================================================ */

/* Legend bar */
.pl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 24px;
  font-size: 12px;
}
.pl-legend-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pl-legend-label {
  color: #64748B;
  font-weight: 600;
  margin-right: 2px;
}

/* Product line section */
.pl-line {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  margin-bottom: 28px;
  overflow: hidden;
}
.pl-line-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 14px;
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  color: #fff;
}
.pl-line-icon {
  font-size: 32px;
  line-height: 1;
}
.pl-line-name {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.pl-line-desc {
  margin: 0;
  font-size: 12px;
  color: #94A3B8;
}

/* Hero SKU row */
.pl-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #F1F5F9;
  border-bottom: 1px solid #E2E8F0;
}
.pl-hero-label {
  font-size: 11px;
  font-weight: 700;
  color: #C8102E;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}
.pl-hero-sku {
  background: #fff;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
}

/* Sub-categories container */
.pl-subcats {
  padding: 14px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Sub-category block */
.pl-subcat {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
}
.pl-subcat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}
.pl-subcat-name {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}
.pl-tts-opp-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--opp-color, #94A3B8);
  border: 1px solid var(--opp-color, #94A3B8);
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
}
.pl-criteria {
  padding: 6px 14px;
  font-size: 11px;
  color: #64748B;
  background: #FAFAFA;
  border-bottom: 1px solid #E2E8F0;
  font-style: italic;
}

/* Competitor card grid */
.pl-comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 10px;
  padding: 12px 12px 14px;
}
.pl-competitor {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 7px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: box-shadow 0.15s;
}
.pl-competitor:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.pl-competitor.has-tts {
  border-color: #ec4899;
  border-width: 2px;
  background: #FFF0F9;
}
.pl-comp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.pl-comp-name {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-tier-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border-radius: 3px;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pl-comp-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pl-ch-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border-radius: 3px;
  padding: 2px 6px;
}
.pl-comp-price {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}
.pl-tts-confirmed {
  font-size: 10px;
  font-weight: 700;
  color: #ec4899;
  background: #fce7f3;
  border-radius: 3px;
  padding: 2px 6px;
  display: inline-block;
  width: fit-content;
}
.pl-comp-note {
  font-size: 11px;
  color: #64748B;
  line-height: 1.45;
  margin-top: 2px;
}

/* ============================================================
   TTS Naming Analysis Block
   ============================================================ */

.naming-analysis-block {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 22px 24px 18px;
  margin-bottom: 28px;
}
.naming-analysis-title {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 18px;
}
.naming-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .naming-cards-grid { grid-template-columns: 1fr; }
}
.naming-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.naming-card-ulanzi {
  background: #FFF7F0;
  border-color: #C8102E;
  border-width: 2px;
}
.naming-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.naming-store-name {
  font-size: 16px;
  font-weight: 800;
  color: #1E293B;
}
.naming-tag-comp {
  font-size: 10px;
  font-weight: 700;
  background: #E2E8F0;
  color: #475569;
  border-radius: 4px;
  padding: 2px 8px;
}
.naming-tag-us {
  font-size: 10px;
  font-weight: 700;
  background: #C8102E;
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
}
.naming-section-label {
  font-size: 10px;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.naming-logic {
  font-size: 12px;
  color: #334155;
  line-height: 1.55;
}
.naming-pattern {
  font-size: 12px;
  color: #334155;
  line-height: 1.55;
}
.naming-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.naming-strength {
  font-size: 11px;
  color: #15803D;
  line-height: 1.45;
}
.naming-gap {
  font-size: 11px;
  color: #B91C1C;
  line-height: 1.45;
  font-weight: 500;
}
.naming-vs {
  font-size: 11px;
  color: #374151;
  line-height: 1.5;
  background: #F1F5F9;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 4px;
}
.naming-key-insight {
  background: #1E293B;
  color: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.naming-insight-label {
  font-size: 12px;
  font-weight: 700;
  color: #FCD34D;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}
.naming-key-insight p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #E2E8F0;
}

/* ============================================================
   GEO Citation Source Map
   ============================================================ */
.cite-joby-banner {
  margin-top: 10px;
  background: #FEF9C3;
  border: 1px solid #FDE047;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #713F12;
}

.cite-matrix-wrap { overflow-x: auto; }
.cite-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.cite-matrix th,
.cite-matrix td {
  border: 1px solid #E5E7EB;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}
.cite-matrix thead th {
  background: #F9FAFB;
  font-weight: 600;
  font-size: 11px;
  color: #374151;
  white-space: nowrap;
}
.cite-matrix tbody tr:hover { background: #F9FAFB; }
.cite-th-ulanzi { background: #FEF2F2 !important; color: #C8102E !important; }
.cite-ulanzi-col { background: #FFF8F8; }
.cite-domain-name {
  text-align: left !important;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
}
.cite-type {
  text-align: left !important;
  color: #6B7280;
  font-size: 11px;
}
.cite-weight-high { color: #15803D; font-weight: 700; }
.cite-weight-mid  { color: #D97706; font-weight: 600; }
.cite-weight-low  { color: #9CA3AF; }
.cite-high { color: #15803D; }
.cite-mid  { color: #D97706; }
.cite-low  { color: #9CA3AF; }

/* Hover tooltip */
.cite-note {
  display: none;
  position: absolute;
  background: #1E293B;
  color: #F8FAFC;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
}
.cite-matrix td { position: relative; cursor: default; }
.cite-matrix td:hover .cite-note {
  display: block;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
}

/* Gap analysis */
.cite-gaps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cite-gap-card {
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #E5E7EB;
  background: #FAFAFA;
}
.cite-gap-opp  { background: #F0FDF4; border-color: #BBF7D0; }
.cite-gap-bad  { background: #FFF1F2; border-color: #FECDD3; }
.cite-gap-good { background: #EFF6FF; border-color: #BFDBFE; }
.cite-gap-head {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1E293B;
  line-height: 1.4;
}
.cite-gap-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: #475569;
}
@media (max-width: 900px) {
  .cite-gaps-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Creator Breakdown Section (爆款分镜库 · 达人拆解)
   ============================================================ */
.crbd-products-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.crbd-product-card {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.crbd-product-badge {
  display: inline-block;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.crbd-product-model {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}
.crbd-product-cat {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 10px;
}
.crbd-product-price {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 8px;
}
.crbd-product-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #475569;
  margin-bottom: 10px;
}
.crbd-platform {
  background: #E2E8F0;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.crbd-product-desc {
  font-size: 11px;
  color: #64748B;
  line-height: 1.6;
  border-top: 1px solid #E2E8F0;
  padding-top: 8px;
  margin-top: 4px;
}

/* Creator cards grid */
.crbd-creators-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
.crbd-creator-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.crbd-creator-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.crbd-creator-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.crbd-creator-info {
  flex: 1;
  min-width: 0;
}
.crbd-creator-handle {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
}
.crbd-creator-name {
  font-size: 11px;
  color: #64748B;
}
.crbd-creator-niche {
  font-size: 10px;
  color: #94A3B8;
  margin-top: 2px;
}
.crbd-creator-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 10px;
  color: #64748B;
  flex-shrink: 0;
}
.crbd-creator-stats label {
  display: block;
  color: #94A3B8;
}
.crbd-creator-stats strong {
  font-size: 12px;
  color: #0F172A;
}
.crbd-collab {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 2px;
}
.crbd-collab.yes { background: #DCFCE7; color: #166534; }
.crbd-collab.no  { background: #F1F5F9; color: #64748B; }
.crbd-collab-note {
  font-size: 11px;
  color: #475569;
  background: #F8FAFC;
  border-radius: 6px;
  padding: 8px 10px;
  line-height: 1.6;
}
.crbd-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.crbd-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.crbd-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  font-size: 11px;
  line-height: 1.6;
}
.crbd-step-phase {
  font-size: 10px;
  font-weight: 700;
  color: #6366F1;
  background: #EEF2FF;
  border-radius: 4px;
  padding: 2px 6px;
  align-self: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crbd-step-body {
  color: #334155;
}
.crbd-strategy {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: #334155;
  line-height: 1.6;
}

/* Common rules */
.crbd-rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crbd-rule-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
}
.crbd-rule-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}
.crbd-rule-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}
.crbd-rule-body {
  font-size: 12px;
  color: #475569;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .crbd-products-strip  { grid-template-columns: 1fr; }
  .crbd-creators-grid   { grid-template-columns: 1fr; }
}

/* ── Product Decision Matrix ─────────────────────────────────────────────── */
/* Section layout */
.pm-section { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--c-line); }
.pm-section:last-of-type { border-bottom: none; }
.pm-section-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.pm-section-num {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-ink); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pm-section-title { font-size: 15px; font-weight: 700; color: var(--c-ink); margin-bottom: 6px; }
.pm-section-insight {
  font-size: 12px; color: #92400e; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 6px; padding: 8px 12px; line-height: 1.6;
}
.pm-chart-wrap { height: 300px; position: relative; }
.pm-chart-radar { height: 420px; }

/* Image matrix */
.pm-img-matrix { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; margin-top: 4px; }
.pm-img-cell { background: #fff; border: 1px solid var(--c-line); border-radius: 8px; overflow: hidden; }
.pm-img-cell.pm-brand-us { border-color: #C8102E; }
.pm-img-cell.pm-absent-cell { opacity: 0.4; }
.pm-img-cell-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; font-size: 11px; background: var(--c-bg); }
.pm-product-img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; display: block; }
.pm-img-placeholder {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: var(--c-bg); font-size: 10px; color: var(--c-ink-3); text-align: center; padding: 8px; line-height: 1.4;
}
.pm-img-type-label { font-size: 9px; color: var(--c-ink-2); padding: 4px 8px 2px; line-height: 1.4; }
.pm-discount-badge { font-size: 9px; font-weight: 700; background: #fee2e2; color: #991b1b; border-radius: 3px; padding: 1px 4px; }
@media (max-width: 1100px) { .pm-img-matrix { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px)  { .pm-img-matrix { grid-template-columns: repeat(2,1fr); } }

.pm-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.pm-tab {
  padding: 7px 18px;
  border: 1.5px solid var(--c-line);
  border-radius: 20px;
  background: #fff;
  color: var(--c-ink-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
}
.pm-tab:hover { border-color: var(--c-ink-3); color: var(--c-ink); }
.pm-tab.pm-tab-active {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: #fff;
  font-weight: 600;
}
.pm-brands-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  overflow-x: auto;
  min-width: 0;
}
.pm-brand-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 14px 12px;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pm-brand-card.pm-brand-us {
  background: #fff8f8;
  border-color: #C8102E;
}
.pm-brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--c-line);
}
.pm-brand-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--c-ink);
}
.pm-brand-role {
  font-size: 10px;
  background: var(--c-bg);
  color: var(--c-ink-3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--c-line);
}
.pm-brand-role.pm-role-us {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.pm-product-name {
  font-size: 11px;
  color: var(--c-ink);
  font-weight: 600;
  line-height: 1.4;
}
.pm-price {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
}
.pm-price-note {
  font-size: 10px;
  color: var(--c-ink-3);
  margin-left: 4px;
  font-weight: 400;
}
.pm-metric {
  font-size: 10px;
  color: var(--c-ink-3);
}
.pm-section-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-ink-3);
  margin-top: 6px;
  font-weight: 600;
}
.pm-image-type {
  font-size: 11px;
  color: var(--c-ink-2);
  line-height: 1.45;
}
.pm-img-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.pm-img-tag {
  font-size: 9px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
}
.pm-copy-logic {
  font-size: 10px;
  color: var(--c-ink-2);
  line-height: 1.5;
}
.pm-trigger {
  font-size: 10px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 3px 6px;
  margin-top: 4px;
  line-height: 1.4;
  font-weight: 500;
}
.pm-absent {
  font-size: 11px;
  color: var(--c-ink-3);
  text-align: center;
  padding: 24px 8px;
  line-height: 1.6;
}
/* Insights */
.pm-insights-section {
  border-top: 1px solid var(--c-line);
  padding-top: 20px;
}
.pm-insights-h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 14px;
}
.pm-insight {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 8px;
  margin-bottom: 8px;
}
.pm-insight-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.pm-insight-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 4px;
}
.pm-insight-body {
  font-size: 12px;
  color: var(--c-ink-2);
  line-height: 1.6;
}
@media (max-width: 1200px) {
  .pm-brands-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .pm-brands-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
 * Amazon 渠道数据
 * ========================================================== */
.amazon-anchor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.amazon-anchor-table th {
  background: #2A2A2A;
  color: #CCC;
  font-weight: 600;
  padding: 7px 10px;
  text-align: left;
  white-space: nowrap;
}
.amazon-anchor-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #2C2C2C;
  vertical-align: middle;
}
.amazon-anchor-table tr:last-child td { border-bottom: none; }
.amazon-anchor-table tr:hover td { background: #1E1E1E; }

/* ============================================================
 * TikTok Shop 渠道指标
 * ========================================================== */
.tts-metrics-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tts-metric-card {
  flex: 1;
  min-width: 130px;
  background: #1A1A1A;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 14px;
}
.tts-metric-card.tts-metric-warn {
  border-color: #C8102E44;
  background: #1E1515;
}
.tts-metric-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}
.tts-metric-val {
  font-size: 22px;
  font-weight: 700;
  color: #F0F0F0;
  line-height: 1.1;
}
.tts-metric-ctx {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
}
.tts-gap-wrap { margin-top: 4px; }
.tts-gap-track {
  height: 24px;
  background: #1A1A1A;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #333;
}
.tts-gap-fill {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  min-width: 60px;
}
.ulanzi-fill { background: #C8102E; }
.comp-fill   { background: #4E79A7; }

/* ============================================================
 * 竞品情报 — 招聘 / 媒体 / Reddit
 * ========================================================== */
.intel-recruit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.intel-recruit-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.intel-recruit-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.intel-recruit-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}
.intel-job-list {
  list-style: none;
  padding: 0;
  margin: 6px 0;
}
.intel-job-list li {
  font-size: 11px;
  color: var(--c-ink-2);
  padding: 5px 0;
  border-bottom: 1px solid var(--c-line);
}
.intel-job-list li:last-child { border-bottom: none; }
.intel-job-date {
  font-size: 10px;
  color: var(--c-ink-3);
  font-weight: 600;
  margin-left: 4px;
}
.intel-job-desc {
  font-size: 10px;
  color: var(--c-ink-3);
  margin-top: 2px;
  line-height: 1.4;
}
.intel-job-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 1px;
}
.intel-job-platform {
  font-size: 9px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 1px 5px;
  color: var(--c-ink-3);
}
.intel-recruit-insight {
  font-size: 11px;
  color: var(--c-ink-2);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--c-line);
  line-height: 1.5;
}
.intel-reddit-bars { display: flex; flex-direction: column; gap: 8px; }
.intel-reddit-row  { display: flex; align-items: center; gap: 10px; }
.intel-reddit-label {
  width: 110px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.intel-reddit-track {
  flex: 1;
  height: 18px;
  background: var(--c-bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--c-line);
}
.intel-reddit-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.intel-reddit-val {
  width: 34px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-ink-2);
  flex-shrink: 0;
}

/* ============================================================
 * Product Matrix — Naming Analysis (Section 06)
 * ========================================================== */
.pm-naming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.pm-naming-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pm-naming-brand {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.pm-naming-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.pm-naming-platform {
  font-size: 10px;
  font-weight: 600;
  color: var(--c-ink-3);
  white-space: nowrap;
  min-width: 52px;
  padding-top: 1px;
}
.pm-naming-title {
  font-size: 11px;
  color: var(--c-ink);
  line-height: 1.4;
}
.pm-naming-absent {
  color: var(--c-ink-3);
  font-style: italic;
}
.pm-naming-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 0 2px;
}
.pm-naming-formula {
  font-size: 10px;
  color: var(--c-ink-3);
  line-height: 1.4;
  border-left: 2px solid var(--c-line);
  padding-left: 7px;
  margin: 2px 0 4px;
}
.pm-naming-formula em {
  font-style: normal;
  color: var(--c-ink-2);
}
.pm-naming-trigger {
  font-size: 11px;
  color: var(--c-ink-3);
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--c-line);
}
.pm-naming-trigger strong {
  color: var(--c-ink);
}

/* ============================================================
   内部运营数据看板
   ============================================================ */
.ops-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 4px;
}
.ops-kpi-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 20px 18px;
  text-align: center;
}
.ops-kpi-highlight {
  border-color: #C8102E;
  background: #fff8f8;
}
.ops-kpi-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.1;
}
.ops-kpi-highlight .ops-kpi-val {
  color: #C8102E;
}
.ops-kpi-label {
  font-size: 12px;
  color: var(--c-ink-3);
  margin-top: 6px;
}
.ops-chart-wrap {
  height: 300px;
  position: relative;
}
.ops-chart-donut {
  height: 280px;
}
.ops-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ops-insight-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px 18px;
  color: #92400e;
  font-size: 14px;
  line-height: 1.6;
}
.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ops-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--c-bg);
  color: var(--c-ink-2);
  font-weight: 600;
  border-bottom: 2px solid var(--c-line);
}
.ops-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
  vertical-align: top;
}
.ops-table tr:hover td {
  background: #f9f9f8;
}
@media (max-width: 900px) {
  .ops-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .ops-two-col { grid-template-columns: 1fr; }
}

/* ============================================================
 * Mobile — 768px
 * ============================================================ */
@media (max-width: 768px) {

  /* --- Header: reinforce no-wrap at all mobile sizes --- */
  .topbar-inner { padding: 10px 14px; flex-wrap: nowrap !important; }
  .brand-block { flex: 1; min-width: 0; overflow: hidden; gap: 10px; }
  .topbar h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ts { display: none !important; }
  .status-block { flex-shrink: 0; }

  /* --- KPI bar --- */
  .kpibar { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 10px 12px; }
  .kpi label { font-size: 10px; }
  .kpi .value { font-size: 20px; }
  .kpi .ctx { font-size: 10px; }

  /* --- Content area --- */
  .content { padding: 16px 14px 60px; }
  .tab-head h2 { font-size: 18px; }

  /* --- Grid collapses --- */
  .grid-2 { grid-template-columns: 1fr; }
  .bullets { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .kw-grid { grid-template-columns: 1fr 1fr; }
  .pages-grid { grid-template-columns: 1fr 1fr; }
  .pending-grid { grid-template-columns: 1fr 1fr; }
  .shotlib-statbar { grid-template-columns: repeat(3, 1fr); }
  .crbd-products-strip { grid-template-columns: 1fr; }
  .naming-cards-grid { grid-template-columns: 1fr; }

  /* --- Tables: horizontally scrollable --- */
  .prompt-table,
  .lib-table,
  .ops-table,
  .amazon-anchor-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* --- Intel recruit cards --- */
  .intel-recruit-grid { grid-template-columns: 1fr !important; }

  /* --- Product matrix --- */
  .pm-naming-grid { grid-template-columns: 1fr 1fr !important; }

  /* --- Store breakdown: platform insights + image grid --- */
  .pi-grid { grid-template-columns: 1fr; }
  .dim-cols-wrap { grid-template-columns: 1fr; }
  .dim-col { border-right: none; border-bottom: 1px solid #EBEBEB; }
  .dim-col:last-child { border-bottom: none; }
  .platform-insights-wrap { flex-direction: column !important; }
  .card-top { grid-template-columns: 1fr !important; }

  /* --- Shotlib strip --- */
  .strip-scroller { gap: 6px; }
  .shot-tile { width: 80px; }
  .shot-tile img { width: 80px; height: 142px; }

  /* --- Chart heights: taller to accommodate multi-row legend --- */
  .chart-wrap { height: 240px; }
  .chart-wrap.tall { height: 300px; }

  /* --- Chart horizontal scroll: swipe to see all 4 brands --- */
  .chart-scroller {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .chart-scroller .chart-wrap,
  .chart-scroller .chart-wrap.tall { min-width: 460px; }

  /* --- 3-column grid → single column --- */
  .grid-3 { grid-template-columns: 1fr; }

  /* --- Library: product benchmark cards 4-col → 1-col --- */
  .benchmark-grid { grid-template-columns: 1fr; }

  /* --- Library: cross-brand comparison table → horizontal scroll --- */
  .bm-compare-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .bm-compare-table thead th,
  .bm-compare-table tbody td { white-space: normal; min-width: 90px; }
  .bm-compare-table .cmp-row-label { min-width: 90px; white-space: nowrap; }

  /* --- FCC Radar filing rows: 4-col → 2-col stacked --- */
  .fcc-filing-row {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 10px;
    padding: 10px 12px;
  }
  .fcc-filing-id {
    grid-column: 1;
    grid-row: 1 / 4;
  }
  .fcc-filing-row > div:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .fcc-filing-row > div:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  .fcc-filing-row > div:nth-child(4) {
    grid-column: 2;
    grid-row: 3;
  }
}

/* ============================================================
 * Mobile — scroll hint on wide tables + KOL column pruning
 * ============================================================ */

@media (max-width: 768px) {
  /* KOL table: 只保留 头像 · 名字 · 粉丝数 · 美国占比，隐藏其余列 */
  .kol-table .kol-cat,
  .kol-table .kol-focus,
  .kol-table .kol-angle,
  .kol-table thead tr th:nth-child(3),
  .kol-table thead tr th:nth-child(5),
  .kol-table thead tr th:nth-child(6),
  .kol-table thead tr th:nth-child(7),
  .kol-table thead tr th:nth-child(8),
  .kol-table tbody tr td:nth-child(3),
  .kol-table tbody tr td:nth-child(6) { display: none; }

  .kol-table td.kol-name { min-width: 130px; }
  .kol-table td.kol-subs { min-width: 64px; }
  .kol-table td.kol-us  { min-width: 44px; }
}

/* ============================================================
 * Small phones — 480px
 * ============================================================ */
@media (max-width: 480px) {
  /* kpibar stays 2-col even at small phones — saves vertical space */
  .kpi .value { font-size: 18px; }
  .kpi { padding: 8px 10px; }
  .kpi label { font-size: 9px; }

  .kw-grid { grid-template-columns: 1fr; }
  .pages-grid { grid-template-columns: 1fr; }
  .pending-grid { grid-template-columns: 1fr; }
  .shotlib-statbar { grid-template-columns: repeat(2, 1fr); }
  .pm-naming-grid { grid-template-columns: 1fr !important; }

  .tab-head h2 { font-size: 16px; }
  .content { padding: 12px 12px 50px; }
  .topbar h1 { font-size: 14px; }
}
