/* 品牌情报台 v5 — 深色；左栏模块（外壳分法照 CRM，颜色字号沿用 v3/v4）（UI Core 2026-08-31-v2 / Analytics Dashboard；可按的东西最小 44×44） */
:root {
  --bg: #0b0f17;
  --card: #141a25;
  --raise: #1b2231;
  --t1: #e8ecf2;
  --t2: #8c95a5;
  --line: rgba(232, 236, 242, 0.08);
  --ot: #4f9cf9;
  --ff: #f08a24;
  --up: #3fb950;
  --down: #f0605a;
  --star: #f5c451;
  --side: 208px;
  --rail: #0f141d;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--t1);
  font: 13px/1.5 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body.lock { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: 0.35; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ot); outline-offset: 2px; }
.miss { color: var(--t2); opacity: .75; }
[hidden] { display: none !important; }

/* ---------- v5 外壳：左栏固定 208px + 右边一页一个模块（手机：左栏变顶部横向滚动条） ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px; padding: 14px 10px 12px;
  background: var(--rail); border-right: 1px solid var(--line);
  overflow-y: auto; overflow-x: hidden;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; flex: none; }
.side-logo {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; letter-spacing: -.02em; color: #fff;
  background: linear-gradient(135deg, var(--ot), var(--ff));
}
.side-brand b { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.side-brand small { display: block; font-size: 11px; color: var(--t2); white-space: nowrap; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-sec {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--t2); opacity: .75;
  padding: 0 12px; margin: 12px 0 4px; white-space: nowrap;
}
.side-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--t2); text-decoration: none; white-space: nowrap;
}
.side-item .ic { font-size: 16px; width: 20px; text-align: center; flex: none; }
.side-item .tx { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.side-item:hover { color: var(--t1); background: var(--card); }
.side-item.on { color: var(--t1); background: var(--raise); }
.side-item.on .tx { font-weight: 700; }
.side-item.on::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ot);
}
.side-badge {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; text-align: center;
  background: var(--down); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; font-variant-numeric: tabular-nums;
}
.side-foot { margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.side-who-l { font-size: 11px; color: var(--t2); padding: 0 4px; }
.side-foot .who { margin: 0; max-width: none; width: 100%; }

.main { flex: 1 1 0%; min-width: 0; padding: 18px 24px 48px; }
.pagehead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pagehead h1 { font-size: 17px; font-weight: 700; margin: 0; }
.pg-date { font-size: 12.5px; color: var(--t2); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1px 9px; font-variant-numeric: tabular-nums; }
.pg-sub { margin: 2px 0 8px; font-size: 12.5px; color: var(--t2); }
.filters {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  margin: 0 -24px 12px; padding: 6px 24px;
  background: rgba(11, 15, 23, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.empty {
  color: var(--t2); background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 16px; text-align: center; margin: 0 0 12px;
}
p.empty { padding: 12px; }
.note.warn { color: var(--down); }

/* ---------- 今日总览 ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.kpi {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--ot); border-radius: 12px;
  text-decoration: none;
}
.kpi:hover { border-color: rgba(232, 236, 242, 0.2); border-left-color: var(--ot); }
.kpi .k { font-size: 12.5px; color: var(--t2); font-weight: 600; }
.kpi .v { font-size: 19px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; color: var(--t2); font-weight: 600; }
.kpi .d { font-size: 11.5px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.na { border-left-color: var(--line); }
.kpi.na .v { color: var(--t2); }
.ship-link {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 8px 14px; min-height: 44px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none;
}
.ship-link:hover { border-color: rgba(232, 236, 242, 0.2); }
.ship-link .ic { font-size: 18px; flex: none; }
.ship-link .tx { display: flex; flex-direction: column; min-width: 0; }
.ship-link .tx b { font-size: 14px; line-height: 1.3; }
.ship-link .tx small { color: var(--t2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-link .go { margin-left: auto; color: var(--ot); font-size: 12.5px; white-space: nowrap; }

/* 集运：整页嵌 live shipment-tracker，外层不跟内层一起滚 */
body.ship-on { overflow: hidden; }
body.ship-on .app { height: 100vh; height: 100dvh; overflow: hidden; }
body.ship-on .side { height: 100%; }
body.ship-on .main {
  display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; padding-bottom: 12px;
}
body.ship-on #main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ship-embed {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0a0d14;
}
.ship-bar {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  min-height: 44px; background: var(--card); border-bottom: 1px solid var(--line);
  color: var(--t2); font-size: 12.5px;
}
.ship-bar span { min-width: 0; }
.ship-bar a {
  margin-left: auto; color: var(--ot); text-decoration: none; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px;
}
.ship-bar a:hover { text-decoration: underline; }
.ship-stage { position: relative; flex: 1; min-height: 240px; display: flex; }
.ship-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #0a0d14; }
.ship-wait {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center;
  color: var(--t2); background: #0a0d14; pointer-events: none;
}
a.chg { text-decoration: none; }
a.chg:hover { border-color: rgba(232, 236, 242, 0.2); }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.sec-head .more { margin-left: auto; color: var(--ot); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.sec-head .more:hover { text-decoration: underline; }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ---------- 表格（今日总览需求榜前 5 / 待办 / 历史） ---------- */
.tbl-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--t2); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 6px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; height: 44px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.click tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: rgba(232, 236, 242, 0.03); }
.tbl tr.cur td { background: rgba(79, 156, 249, 0.08); }
.tbl .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .strong { font-weight: 600; white-space: nowrap; }
.tbl .need-cell { color: var(--t2); min-width: 200px; }
.tbl a { text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.tbl .t-title { min-width: 220px; }
.tbl .t-title .dtitle { min-height: 0; white-space: normal; text-align: left; font-size: 12.5px; }
.tbl .t-act { text-align: right; width: 1%; }
.tbl .t-act .btn { white-space: nowrap; }
.tbl-wrap + .note { margin-top: 8px; }
.tbl .spark { display: block; }

/* ---------- 资料与反馈 ---------- */
.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.panel-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; min-width: 0; }
.panel-card .favbar { margin-bottom: 8px; }
.panel-card .note { margin: 6px 0 0; }
.kvr { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.kvr b { color: var(--t2); font-weight: 600; }
.kvr span b { font-variant-numeric: tabular-nums; }
.tags em.me { color: var(--t1); border-color: var(--ot); }

.datebox { display: flex; align-items: center; }
.nav { width: 44px; height: 44px; color: var(--t2); border-radius: 10px; font-size: 13px; }
.nav:not(:disabled):hover { color: var(--t1); background: var(--raise); }
.datebox select, #q {
  height: 44px; padding: 0 10px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
}
.chips { display: flex; gap: 6px; }
.chip {
  min-width: 52px; height: 44px; padding: 0 14px; border-radius: 22px;
  border: 1px solid var(--line); color: var(--t2); background: var(--card);
}
.chip:hover { color: var(--t1); }
.chip.on { background: var(--t1); color: var(--bg); border-color: var(--t1); font-weight: 600; }
.chip.c-ot.on { background: var(--ot); border-color: var(--ot); color: #fff; }
.chip.c-ff.on { background: var(--ff); border-color: var(--ff); color: #fff; }
#q { flex: 0 1 300px; min-width: 0; }

.msg { color: var(--t2); margin: 20px 2px; font-size: 14px; }
.note { color: var(--t2); margin: 0 0 12px; font-size: 12.5px; }
.muted { color: var(--t2); }
h2.sec { font-size: 15px; font-weight: 600; margin: 4px 0 10px; display: flex; align-items: baseline; gap: 8px; }
h2.sec small, h3 small, h4 small { font-size: 12px; font-weight: 400; color: var(--t2); }
.gap { height: 22px; }

/* ---------- 决定按钮 ---------- */
.acts { display: flex; gap: 6px; position: relative; z-index: 3; }
.dec {
  height: 44px; min-width: 44px; padding: 0 12px; border-radius: 10px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--raise); color: var(--t1); font-size: 13px;
}
.dec:hover { border-color: rgba(232, 236, 242, 0.3); }
.dec.d-skip { color: var(--t2); background: transparent; }
.dec.on { font-weight: 700; border-color: transparent; }
.dec.d-new_product.on, .dec.d-shoot.on { background: var(--up); color: #06210d; }
.dec.d-ad_keyword.on { background: var(--ot); color: #fff; }
.dec.d-skip.on { background: var(--raise); color: var(--t1); border-color: var(--t2); }
.dec.big { height: 50px; font-size: 15px; flex: 1; }
.decided { opacity: .5; transition: opacity .15s; }
.decided:hover, .decided:focus-within { opacity: .9; }

/* ---------- v4：你是谁 / AI 的话 / 团队看了几条 ---------- */
.who {
  height: 44px; padding: 0 10px; border-radius: 10px; margin-left: auto;
  background: var(--card); border: 1px solid var(--line); max-width: 140px;
}
.who.unset { color: var(--star); border-color: rgba(245, 196, 81, 0.5); }
.ai-note {
  display: flex; gap: 10px; align-items: baseline; margin: 0 0 10px; padding: 9px 12px;
  border-radius: 10px; background: rgba(79, 156, 249, 0.1); border: 1px solid rgba(79, 156, 249, 0.3); font-size: 13.5px;
}
.ai-note b { font-size: 11px; color: var(--ot); letter-spacing: .05em; flex: none; }
.team-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 12px; font-size: 13px; color: var(--t2); }
.team-bar b { color: var(--t1); font-size: 15px; font-variant-numeric: tabular-nums; }
.team-bar .sync { font-size: 11.5px; opacity: .75; }
.team-bar .warn { color: var(--down); }

/* ---------- v4：原因 chip 行 ---------- */
.dec.picking { border-color: var(--star); box-shadow: 0 0 0 1px var(--star) inset; }
.reason {
  position: relative; z-index: 4; margin: 2px 0 10px; padding: 10px 12px;
  background: var(--raise); border: 1px solid rgba(245, 196, 81, 0.35); border-radius: 12px;
  display: grid; gap: 8px; cursor: default;
}
.card > .reason { margin: 0 8px 10px; }
.r-head { font-size: 13px; font-weight: 600; }
.r-head small { font-weight: 400; color: var(--t2); }
.r-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip {
  height: 44px; padding: 0 14px; border-radius: 22px; font-size: 13.5px;
  border: 1px solid var(--line); background: var(--card); color: var(--t1);
}
.rchip:hover { border-color: rgba(232, 236, 242, 0.3); }
.rchip.on { background: var(--star); color: #241a00; border-color: var(--star); font-weight: 700; }
.r-foot { display: flex; gap: 6px; flex-wrap: wrap; }
.r-note {
  flex: 1 1 180px; min-width: 0; height: 44px; padding: 0 10px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line);
}
.btn.ok:not(:disabled) { background: var(--t1); color: var(--bg); border-color: var(--t1); font-weight: 700; }

/* ---------- 页 1：今天变了什么 ---------- */
.changes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.chg { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; min-width: 0; }
.chg i { display: block; font-style: normal; font-size: 12px; color: var(--t2); }
.chg span { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chg b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 页 1：马来西亚 Google Trends（一直展开，跟产品卡分开） ---------- */
.my-trends {
  margin: 22px 0 18px;
  padding: 12px 14px 8px;
  border: 1px solid rgba(79, 156, 249, 0.45);
  border-radius: 14px;
  background: rgba(79, 156, 249, 0.07);
}
.my-trends > h2.sec { margin-top: 0; }
.my-trends .my-empty { margin: 2px 0 10px; }
.kw-t .rise {
  flex: none;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--up);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 6px;
}

/* ---------- 页 1：需求榜 ---------- */
.kwwrap { display: grid; gap: 14px; }
.kw-block { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 2px 14px 4px; min-width: 0; }
.kw-block h3 { font-size: 13px; font-weight: 600; color: var(--t2); margin: 8px 0 2px; }
.kw { list-style: none; margin: 0; padding: 0; }
.kw-item { border-bottom: 1px solid var(--line); }
.kw-item:last-child { border-bottom: 0; }
.kw-row {
  display: grid; align-items: center; column-gap: 12px;
  grid-template-columns: 30px minmax(120px, 240px) minmax(220px, 1.15fr) minmax(0, 1fr) auto;
  grid-template-areas: "rk kw metric need acts";
  min-height: 64px; padding: 8px 0; font-size: 14px; cursor: pointer;
}
.kw-row:hover { background: rgba(232, 236, 242, 0.02); }
.rk { grid-area: rk; color: var(--t2); text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
.rk.hi { color: var(--star); font-size: 18px; font-weight: 700; }
.kw-t {
  grid-area: kw; display: flex; align-items: center; gap: 6px; min-height: 44px; min-width: 0;
  text-align: left; font-weight: 600;
}
.kw-t span { white-space: normal; overflow: visible; line-height: 1.3; }
.kw-t i { font-style: normal; color: var(--t2); font-size: 11px; flex: none; }
.bar { grid-area: bar; position: relative; height: 18px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; background: rgba(79, 156, 249, 0.35); }
.bar b { position: relative; display: block; font-weight: 500; font-size: 11px; padding-left: 6px; line-height: 18px; font-variant-numeric: tabular-nums; }
.sp { grid-area: sp; height: 22px; }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: currentColor; }
.dl { grid-area: dl; font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.kw-metric { grid-area: metric; margin: 0; }
.metric {
  display: flex; flex-direction: column; gap: 2px;
  margin: 4px 0; padding: 7px 8px; border-radius: 8px;
  background: rgba(79, 156, 249, 0.08); border: 1px solid rgba(79, 156, 249, 0.28);
}
.metric b { font-size: 18px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric span { font-size: 12px; line-height: 1.35; color: var(--t1); }
.metric small { font-size: 11px; line-height: 1.35; color: var(--t2); }
.metric .spark { display: inline-block; vertical-align: middle; }
.sheet-body .metric { margin: 8px 0 12px; }
.bury {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; width: 100%; text-align: left;
  min-height: 48px; margin: 18px 0 8px; padding: 10px 12px;
  border-radius: 10px; border: 1px dashed rgba(232, 236, 242, 0.22); background: transparent; color: var(--t2);
}
.bury i { font-style: normal; width: 14px; flex: none; }
.bury b { color: var(--t1); font-weight: 650; font-size: 13px; line-height: 1.4; white-space: normal; }
.bury small { white-space: nowrap; }
.need { grid-area: need; font-size: 13px; color: var(--t2); line-height: 1.4; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kw-row .acts { grid-area: acts; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--t2); }
.kw-more { padding: 4px 0 16px 42px; }
.kw-more h4 { margin: 4px 0 10px; font-size: 13px; font-weight: 600; color: var(--t2); }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }

.folded { margin-top: 26px; }
.folded > summary {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--t2); font-size: 13.5px;
  list-style: none;
}
.folded > summary::-webkit-details-marker { display: none; }
.folded > summary::before { content: "▸"; margin-right: 8px; font-size: 11px; }
.folded[open] > summary::before { content: "▾"; }
.folded[open] > summary { margin-bottom: 12px; }
.folded .grid { margin-top: 12px; }

/* ---------- 卡片墙 ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: border-color .15s, transform .15s, opacity .15s;
}
.card:hover { border-color: rgba(232, 236, 242, 0.2); transform: translateY(-1px); }
.hit { position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
.hit:focus-visible { outline-offset: -2px; }

.cover { position: relative; aspect-ratio: 16 / 9; background: #10151f; overflow: hidden; }
.cover.r43 { aspect-ratio: 4 / 3; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* 占位块：没图、图坏了都显示它（图片盖在上面，失败就拿掉） */
.ph {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: linear-gradient(135deg, rgba(140, 149, 165, 0.16), rgba(16, 21, 31, 0.9) 70%), #10151f;
}
.ph span { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--t2); padding: 0 8px; }
.ph.b-ot { background: linear-gradient(135deg, rgba(79, 156, 249, 0.38), rgba(16, 21, 31, 0.92) 72%), #10151f; }
.ph.b-ot span { color: var(--ot); }
.ph.b-ff { background: linear-gradient(135deg, rgba(240, 138, 36, 0.38), rgba(16, 21, 31, 0.92) 72%), #10151f; }
.ph.b-ff span { color: var(--ff); }
.ph.b-both { background: linear-gradient(135deg, rgba(79, 156, 249, 0.32), rgba(16, 21, 31, 0.9) 55%, rgba(240, 138, 36, 0.32)), #10151f; }
.ph.b-both span { color: var(--t1); }

.tl { position: absolute; top: 8px; left: 8px; right: 52px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; z-index: 2; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 700; line-height: 18px; padding: 0 7px;
  border-radius: 9px; white-space: nowrap; color: #fff; background: rgba(11, 15, 23, 0.72);
}
.pill.b-ot { background: var(--ot); }
.pill.b-ff { background: var(--ff); }
.pill.b-both { background: linear-gradient(90deg, var(--ot), var(--ff)); }
.st {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; line-height: 18px;
  padding: 0 6px; border-radius: 9px; background: rgba(11, 15, 23, 0.72); color: var(--t1);
}
.st:empty { display: none; }
.st-new { background: var(--up); color: #06210d; }
.st-rising { color: var(--up); }
.st-watch, .st-keep { color: #c3cad6; }
.sample, .badge {
  position: absolute; top: 8px; right: 8px; z-index: 2; pointer-events: none;
  font-size: 10.5px; line-height: 18px; padding: 0 6px; border-radius: 9px;
}
.sample { background: rgba(245, 196, 81, 0.18); color: var(--star); border: 1px solid rgba(245, 196, 81, 0.45); }
.badge { background: rgba(11, 15, 23, 0.8); color: var(--t1); font-weight: 700; }
.badge.on { background: var(--up); color: #06210d; }
.tr-badges { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 4px; pointer-events: none; }
.tr-badges .badge { position: static; }
.badge.seen { background: rgba(11, 15, 23, 0.8); color: var(--up); }
.two { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.dtitle small { color: var(--t2); font-size: 11.5px; margin-left: 4px; }
.views {
  position: absolute; right: 8px; bottom: 8px; z-index: 2; pointer-events: none;
  font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 6px; border-radius: 5px;
  background: rgba(0, 0, 0, 0.72); font-variant-numeric: tabular-nums;
}

.body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.t {
  margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; min-height: 2.8em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.why { font-size: 12.5px; }
.why i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--up); margin-right: 6px; }
.hook { font-size: 12.5px; color: var(--t2); }
.src { font-size: 11.5px; color: var(--t2); opacity: .8; }
.price { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price:empty { display: none; }
.sum, .idea { font-size: 12.5px; color: var(--t2); }
.card > .acts { padding: 0 11px 11px; }
.card > .acts .dec { flex: 1; }
.src-link {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: center;
  height: 44px; margin: 0 11px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--raise); text-decoration: none; font-weight: 600;
}
.src-link:hover { border-color: rgba(232, 236, 242, 0.3); }

/* ---------- 页 3：已决定 ---------- */
.favbar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.favbar > span:first-child { margin-right: auto; font-size: 13px; }
.favbar.confirm > span:first-child { color: var(--down); }
.btn {
  height: 44px; min-width: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
}
.btn:not(:disabled):hover { border-color: var(--t2); }
.btn.danger { color: #fff; background: var(--down); border-color: var(--down); }
.btn.ghost { background: transparent; color: var(--t2); padding: 0 12px; }
.todo-groups { display: grid; gap: 14px; }
.done { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.dlist { list-style: none; margin: 0; padding: 0; }
.drow {
  display: grid; align-items: center; column-gap: 8px;
  grid-template-columns: 82px 46px minmax(0, 1fr) auto; min-height: 48px;
  border-top: 1px solid var(--line);
}
.ddate { color: var(--t2); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.dtitle { text-align: left; min-height: 44px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.dtitle:hover { text-decoration: underline; text-underline-offset: 2px; }
.empty { color: var(--t2); margin: 6px 0 8px; }

/* ---------- 详情：桌面右侧抽屉 / 手机底部 sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet[hidden] { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); animation: fade .18s ease-out; }
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 94vw);
  display: flex; flex-direction: column;
  background: #111723; border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  animation: slide-l .2s ease-out;
}
.grip { display: none; }
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 16px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-kind { font-size: 13px; font-weight: 600; color: var(--t2); margin-right: auto; }
.x { width: 44px; height: 44px; border-radius: 10px; color: var(--t2); font-size: 16px; }
.x:hover { color: var(--t1); background: var(--raise); }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 16px 18px; }
.sheet-foot { flex: none; padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.sheet-foot[hidden] { display: none; }
.sheet-foot .acts { gap: 8px; }
.bigbtn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 50px; width: 100%; border-radius: 12px; text-decoration: none;
  background: var(--t1); color: var(--bg); font-size: 15px; font-weight: 700;
}
.bigbtn:hover { background: #fff; }
.bigbtn.off { background: var(--raise); color: var(--t2); }

.d-cover { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #10151f; }
.d-cover.r43 { aspect-ratio: 4 / 3; }
.d-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-cover .ph span { font-size: 16px; }
.d-meta { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; flex-wrap: wrap; }
.d-meta .pill, .d-meta .st { font-size: 11.5px; }
.d-meta .st { background: var(--raise); }
.d-meta .st-new { background: var(--up); }
.d-src { font-size: 12.5px; color: var(--t2); margin-left: 2px; }
.d-title { font-size: 18px; font-weight: 700; line-height: 1.4; margin: 0 0 4px; }
.d-sum { font-size: 13.5px; color: var(--t2); margin: 0; line-height: 1.6; }
.d-price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0; }
.d-sec { margin-top: 16px; }
.d-sec h4 {
  margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--t1);
  padding-left: 8px; border-left: 3px solid var(--up); line-height: 1.2;
}
.d-sec p { margin: 0; font-size: 14px; line-height: 1.6; }
.d-sec p.sub { font-size: 12.5px; color: var(--t2); margin-bottom: 2px; }
.d-sec ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.d-sec li + li { margin-top: 4px; }
.d-sec li b, .kv b { color: var(--t2); font-weight: 600; margin-right: 4px; }
.kv { display: grid; grid-template-columns: 34px 1fr; gap: 8px; font-size: 14px; line-height: 1.6; }
.kv + .kv { margin-top: 4px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stats span { font-size: 12.5px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.stats i { font-style: normal; color: var(--t2); margin-right: 5px; }
.comp { margin-top: 10px !important; font-size: 13px !important; color: var(--t2); }
.comp i { font-style: normal; font-weight: 600; color: var(--t1); margin-right: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags em {
  font-style: normal; font-size: 12px; color: var(--t2); line-height: 24px;
  border: 1px solid var(--line); border-radius: 12px; padding: 0 9px; background: var(--card);
}

/* ---------- v4：简报详情 ---------- */
.d-cover.hero { margin: -14px -16px 0; border-radius: 0; }
.d-cover.hero .tl { top: 12px; left: 12px; }
.hero-views {
  position: absolute; left: 12px; bottom: 10px; z-index: 2; pointer-events: none;
  display: flex; align-items: baseline; gap: 4px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.hero-views b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.hero-views span { font-size: 12.5px; color: #dfe4ec; }
.d-cover.hero::after {
  content: ""; position: absolute; inset: 50% 0 0 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
}
.d-sub { font-size: 12.5px; color: var(--t2); margin: 0 0 2px; }
.d-cover.hero + .d-title { margin-top: 12px; }
.kp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kp-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 9px; min-width: 0; }
.kp-n {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--up); color: #06210d; font-size: 11px; font-weight: 800; margin-bottom: 4px;
}
.kp-card b { display: block; font-size: 14px; line-height: 1.35; }
.kp-card p { margin: 3px 0 0 !important; font-size: 12.5px !important; color: var(--t2); line-height: 1.45 !important; }
.bignums { display: flex; gap: 22px; margin-bottom: 6px; }
.bignums div { display: flex; flex-direction: column; }
.bignums b { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bignums span { font-size: 12px; color: var(--t2); }
.trend-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ttag {
  font-size: 12.5px; font-weight: 700; line-height: 26px; padding: 0 10px; border-radius: 13px;
  background: rgba(245, 196, 81, 0.16); color: var(--star); border: 1px solid rgba(245, 196, 81, 0.4);
}
.hook-table { display: grid; gap: 6px; margin-top: 6px; }
.ht-row { display: grid; grid-template-columns: minmax(64px, auto) 14px minmax(0, 1fr); gap: 6px; align-items: baseline; font-size: 14px; }
.ht-type { font-size: 12px; font-weight: 700; color: var(--t2); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; justify-self: start; }
.ht-arrow { color: var(--t2); }
.bubble-row { display: flex; gap: 8px; align-items: flex-start; }
.bubble-row + .bubble-row { margin-top: 10px; }
.avatar {
  flex: none; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 17px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; background: var(--raise); color: var(--t1);
}
.avatar.b-ot { background: var(--ot); color: #fff; }
.avatar.b-ff { background: var(--ff); color: #fff; }
.bubble-wrap { min-width: 0; flex: 1; }
.bubble {
  position: relative; display: inline-block; max-width: 100%; padding: 9px 12px; border-radius: 4px 14px 14px 14px;
  background: var(--raise); font-size: 15px; font-weight: 600; line-height: 1.45;
}
.bubble.b-ot { background: rgba(79, 156, 249, 0.2); border: 1px solid rgba(79, 156, 249, 0.45); }
.bubble.b-ff { background: rgba(240, 138, 36, 0.18); border: 1px solid rgba(240, 138, 36, 0.45); }
.how { margin-top: 5px; font-size: 13px; color: var(--t2); }
.how i { font-style: normal; font-weight: 700; color: var(--t1); margin-right: 6px; }
.foot-row { display: flex; gap: 8px; }
.foot-row .acts { flex: 2; }
.bigbtn.half { flex: 1.2; width: auto; font-size: 14.5px; }
.sheet-foot .reason { margin: 0 0 10px; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide-l { from { transform: translateX(40px); opacity: .4; } }
@keyframes slide-u { from { transform: translateY(60%); } }

/* ---------- 平板：3 列（左栏占掉 208px，需求榜一行放不下就分三行） ---------- */
@media (max-width: 1239px) {
  .kw-row {
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-areas: "rk kw" "metric metric" "need need" "acts acts";
    row-gap: 4px;
  }
  .bury { flex-wrap: wrap; }
  .bury small { margin-left: 22px; }
}
@media (max-width: 1099px) {
  .grid, .grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 手机 ≤760：左栏变顶部横向滚动菜单条（照 CRM 的分法），底部 tab bar 不要了 ---------- */
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .side {
    width: 100%; height: auto; position: static; flex-direction: row; align-items: center;
    gap: 4px; padding: 6px 10px; overflow-x: auto; overflow-y: hidden;
    border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .side::-webkit-scrollbar { display: none; }
  .side-brand { padding: 0 6px 0 0; }
  .side-logo { width: 32px; height: 32px; font-size: 12px; }
  .side-brand b { font-size: 13.5px; }
  .side-brand small { display: none; }
  .side-nav { flex-direction: row; align-items: center; gap: 2px; flex: none; }
  .side-sec {
    align-self: stretch; display: flex; align-items: center; margin: 0 2px; padding: 0 8px;
    font-size: 10px; letter-spacing: 0; border-left: 1px solid var(--line);
  }
  .side-item { flex: none; gap: 6px; padding: 0 10px; }
  .side-item .tx { font-size: 13px; }
  .side-item.on::before { left: 10px; right: 10px; top: auto; bottom: 3px; width: auto; height: 2px; border-radius: 2px; }
  .side-badge { margin-left: 2px; }
  .side-foot { margin: 0 0 0 4px; padding: 0 0 0 8px; border-top: 0; border-left: 1px solid var(--line); flex: none; display: flex; align-items: center; gap: 6px; }
  .side-who-l { display: none; }
  .side-foot .who { width: auto; max-width: 110px; padding: 0 6px; }
  body.ship-on .side { height: auto; }
  body.ship-on .main { height: auto; flex: 1; min-height: 0; padding-bottom: 10px; }
  .ship-bar { align-items: flex-start; flex-wrap: wrap; padding: 4px 10px; }
  .ship-bar a { margin-left: 0; }
  .main { padding: 10px 14px 32px; }
  .filters { margin: 0 -14px 10px; padding: 6px 14px; }
}

/* ---------- 手机：2 列、底部 sheet ---------- */
@media (max-width: 699px) {
  .grid, .grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis { gap: 8px; }
  .kpi { padding: 8px 10px; }
  .kpi .d { white-space: normal; }
  .chips { gap: 4px; flex: none; }
  .chip { min-width: 44px; padding: 0 11px; }
  #q { flex: 1 1 140px; width: 0; font-size: 15px; }
  .datebox select { padding: 0 6px; }
  .body { padding: 8px 9px 10px; }
  .card > .acts { padding: 0 8px 8px; gap: 4px; }
  .card > .acts .dec { padding: 0 6px; }
  .changes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .chg { padding: 6px 10px; }

  /* 手机上关键字一张卡 */
  .kw-block { padding: 2px 10px 4px; }
  .kw-row {
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-areas: "rk kw" "metric metric" "need need" "acts acts";
    row-gap: 6px; padding: 8px 0 10px;
  }
  .kw-row .acts { display: grid; grid-template-columns: repeat(3, 1fr); }
  .need { -webkit-line-clamp: 3; }
  .kw-more { padding: 0 0 12px; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .drow { grid-template-columns: 76px 40px minmax(0, 1fr) auto; }
  .kp { grid-template-columns: minmax(0, 1fr); }
  .foot-row { gap: 6px; }
  .foot-row .dec.big, .bigbtn.half { font-size: 14px; padding: 0 6px; }
  .card > .reason { margin: 0 6px 8px; padding: 8px; }
  .card > .reason .rchip { padding: 0 10px; font-size: 12.5px; }

  .panel {
    top: auto; left: 0; right: 0; width: auto; height: 85vh; height: 85dvh;
    border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
    animation: slide-u .22s ease-out;
  }
  .panel.drag { transition: none; }
  .panel.snap { transition: transform .18s ease-out; }
  .grip { display: flex; justify-content: center; align-items: center; height: 18px; flex: none; touch-action: none; }
  .grip span { width: 40px; height: 4px; border-radius: 2px; background: rgba(232, 236, 242, 0.25); }
  .ph-bar { padding-top: 0; touch-action: none; }
}

/* 存储失败 / 日期不对等一行提示（底部，几秒后消失） */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); z-index: 60;
  max-width: calc(100vw - 32px); padding: 8px 14px; border-radius: 8px;
  background: var(--raise); color: var(--t1); border: 1px solid var(--line); font-size: 13px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.kw-note { margin: 6px 2px 0; }
