:root {
  --bg: #f2f4f3;
  --panel: #ffffff;
  --ink: #16201b;
  --ink-2: #4a5751;
  --ink-3: #7b8781;
  --line: #e2e7e4;
  --line-2: #eef1ef;
  --accent: #147a4e;
  --accent-soft: #e6f3ec;
  --up: #147a4e;
  --down: #c0392b;
  --warn: #b26a00;
  --warn-soft: #fdf3e3;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --r: 10px;
  --r-lg: 14px;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", ui-monospace, Menlo, Consolas, monospace;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

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

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

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--accent); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1240px; margin: 0 auto; padding: 0 20px;
  height: 54px; display: flex; align-items: center; gap: 20px;
}
.brand { font-weight: 700; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--accent); font-weight: 600; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 7px 13px; border-radius: 8px; color: var(--ink-2); font-size: 13px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.tab:hover { background: var(--line-2); color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; font-weight: 600; }
.topbar-meta { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ---------------- 布局 ---------------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
.view { display: none; }
.view.active { display: block; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 26px 0 12px; flex-wrap: wrap; }
.sec-head:first-child { margin-top: 0; }
.sec-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.sec-head .sub { font-size: 12.5px; color: var(--ink-3); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px;
}

/* ---------------- KPI ---------------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px 16px; }
.kpi .k { font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .h { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.kpi.a .v { color: var(--accent); }
.kpi.b .v { color: var(--warn); }
.kpi.c .v { color: var(--ink); }

/* ---------------- 洞察 ---------------- */
.insights { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: repeat(2, 1fr); }
.insight {
  display: grid; grid-template-columns: 4px 1fr; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 16px 13px 0; overflow: hidden;
}
.insight::before { content: ''; background: var(--ink-3); border-radius: 4px; }
.insight.warn::before { background: var(--warn); }
.insight.good::before { background: var(--accent); }
.insight.info::before { background: #5b7d8c; }
.insight h4 { font-size: 13.5px; font-weight: 650; }
.insight p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }

/* ---------------- 双栏 ---------------- */
.cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; margin-top: 12px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-h h3 { font-size: 13.5px; font-weight: 650; }
.panel-h .hint { font-size: 11.5px; color: var(--ink-3); }

.movers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.movers h5 { font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 7px; font-weight: 600; }
.mover { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line-2); }
.mover:last-child { border-bottom: none; }
.mover .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mover .nm:hover { color: var(--accent); }
.mover .dg { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.dg.up { color: var(--up); font-weight: 600; }
.dg.down { color: var(--down); font-weight: 600; }

/* 涨跌榜 / TOP200 涨幅列 */
.d-up { color: var(--up); font-weight: 600; }
.d-dn { color: var(--down); font-weight: 600; }
.d-out { color: var(--ink-3); }
.d-flat { color: var(--ink-3); }

/* 价格带 */
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 62px 1fr 88px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row .lb { color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; }
.bar-track { display: block; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); opacity: .72; }
.bar-row .vl { text-align: right; color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }

/* ---------------- 可抄清单卡片 ---------------- */
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.pick {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; display: grid; gap: 12px; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.pick:hover { border-color: #cfe0d6; box-shadow: 0 6px 20px rgba(20,70,45,.07); transform: translateY(-2px); }
.pick-top { display: flex; gap: 14px; align-items: flex-start; }
.ring {
  --p: 0; --c: var(--accent);
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e9eeeb 0);
  display: grid; place-items: center; position: relative;
}
.ring::after { content: ''; position: absolute; inset: 5px; background: var(--panel); border-radius: 50%; }
.ring b { position: relative; z-index: 1; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-id { flex: 1; min-width: 0; }
.pick-id h3 { font-size: 14.5px; font-weight: 650; line-height: 1.3; cursor: pointer; }
.pick-id h3:hover { color: var(--accent); }
.pick-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag {
  font-size: 11px; padding: 2px 7px; border-radius: 5px;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.tag.t-copy { background: var(--accent-soft); color: #0d5c3a; font-weight: 600; }
.tag.t-bench { background: #eef2f7; color: #3c5871; }
.tag.t-own { background: #f3eefb; color: #5b3d8f; }
.tag.t-warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.tag.t-red { background: var(--danger-soft); color: var(--danger); font-weight: 600; }

.dims { display: grid; gap: 6px; }
.dim { display: grid; grid-template-columns: 52px 1fr 30px; gap: 8px; align-items: center; font-size: 11.5px; }
.dim .dn { color: var(--ink-3); }
.dim .dt { display: block; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.dim .df { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.dim .df.mid { background: #8aa89a; }
.dim .df.low { background: #d2a05a; }
.dim .dv { text-align: right; font-family: var(--mono); color: var(--ink-2); }

.pick-why { font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 10px; }
.pick-why b { color: var(--ink); font-weight: 600; }
.pick-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; }
.pick-meta span { font-family: var(--mono); }

/* ---------------- 表格 ---------------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.field {
  display: flex; align-items: center; gap: 6px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; height: 34px;
}
.field input { border: none; outline: none; font-size: 13px; width: 150px; background: none; color: inherit; }
.field select { border: none; outline: none; background: none; font-size: 13px; color: var(--ink); padding-right: 4px; }
.field .ic { color: var(--ink-3); font-size: 13px; }
.toolbar .grow { flex: 1; }
.check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); padding: 0 4px; }
.check input { accent-color: var(--accent); }
.count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 10px 12px; font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .03em; background: #fafbfa; border-bottom: 1px solid var(--line);
  white-space: nowrap; cursor: pointer; user-select: none;
}
thead th:hover { color: var(--ink); }
thead th.static { cursor: default; }
thead th .so { font-size: 9px; opacity: .5; margin-left: 2px; }
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafcfb; }
tbody tr { cursor: pointer; }
td.rk { font-family: var(--mono); color: var(--ink-3); font-size: 12px; }
td.nm { font-weight: 550; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.mono { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
td.sc { font-family: var(--mono); font-weight: 700; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.g { background: var(--accent); }
.dot.y { background: var(--warn); }
.dot.r { background: var(--danger); }
.dot.n { background: #c3cbc7; }

/* ---------------- 抽屉 ---------------- */
.backdrop {
  position: fixed; inset: 0; background: rgba(16,26,22,.28); z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.backdrop.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 94vw); z-index: 60;
  background: var(--panel); border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer-h {
  padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start;
  flex: 0 0 auto;
}
.drawer-h h2 { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.drawer-h .x { margin-left: auto; font-size: 20px; color: var(--ink-3); line-height: 1; padding: 2px 6px; border-radius: 6px; }
.drawer-h .x:hover { background: var(--line-2); color: var(--ink); }
.drawer-b { padding: 18px 20px 40px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.kv div { background: #fafbfa; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px; }
.kv .k { font-size: 11px; color: var(--ink-3); }
.kv .v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 1px; }
.d-block { margin-bottom: 16px; }
.d-block h3 { font-size: 12px; color: var(--accent); font-weight: 650; letter-spacing: .05em; margin-bottom: 6px; }
.d-block p { font-size: 13px; color: var(--ink-2); }
.d-block p + p { margin-top: 6px; }

/* ---------------- 商品榜空态 ---------------- */
.empty {
  background: var(--panel); border: 1px dashed #cfd8d3; border-radius: var(--r-lg);
  padding: 36px 24px; text-align: center;
}
.empty h3 { font-size: 15px; margin-bottom: 6px; }
.empty p { font-size: 13px; color: var(--ink-2); max-width: 620px; margin: 0 auto 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; margin-top: 20px; }
.step { background: #fafbfa; border: 1px solid var(--line-2); border-radius: 10px; padding: 13px; }
.step b { display: block; font-size: 12.5px; margin-bottom: 4px; }
.step span { font-size: 12px; color: var(--ink-2); }
code { font-family: var(--mono); font-size: 12px; background: #eef2ef; padding: 1px 5px; border-radius: 4px; }

/* ---------------- 报告 ---------------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  font-size: 12.5px; color: var(--ink-2);
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.r-section { margin-bottom: 26px; }
.r-section > h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--accent); }

/* 报告内嵌组件（旧结构兼容） */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.shop-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.shop-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.shop-head h3 { font-size: 14px; font-weight: 650; }
.shop-head .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.chip2 { background: var(--accent-soft); color: #0d5c3a; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; height: fit-content; }
.shop-card .sec { border-top: 1px solid var(--line-2); padding: 9px 0 0; margin-top: 8px; }
.shop-card .sec:first-of-type { border-top: none; }
.shop-card .sec h4 { font-size: 11.5px; color: var(--accent); letter-spacing: .04em; margin-bottom: 3px; }
.shop-card .sec p { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.ana-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ana-grid li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 15px; }
.ana-grid li h4 { font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.ana-grid li p { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.cmp-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.cmp-wrap table { font-size: 12.5px; min-width: 640px; }
.cmp-wrap th { background: #fafbfa; padding: 9px 12px; font-size: 11px; color: var(--ink-3); cursor: default; }
.cmp-wrap td { padding: 9px 12px; border-top: 1px solid var(--line-2); color: var(--ink-2); }
.cmp-wrap td:first-child { font-weight: 600; color: var(--ink); }
.name-link { cursor: pointer; }
.name-link:hover { text-decoration: underline; }

/* ---------------- 手机 ---------------- */
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
  .movers { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, 1fr); }
  .insights { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 16px 12px 50px; }
  .topbar-in { padding: 0 12px; gap: 12px; }
  .topbar-meta { display: none; }
  .tabs {
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }
  .kpi .v { font-size: 22px; }
  .picks { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  thead th { padding: 8px 8px; }
  tbody td { padding: 8px 8px; font-size: 12.5px; }
  td.nm { max-width: 130px; }
}

/* ---------------- TOP200 榜 · 日历 ---------------- */
.cal-wrap { position: relative; display: flex; align-items: center; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.date-jump {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  transition: border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.date-jump:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 2px 10px -4px rgba(20,122,78,.25); }
.dj-ic { opacity: .45; font-size: 14px; }
.dj-car { opacity: .45; font-size: 10px; }
.date-step {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--ink-2); font-size: 14px; line-height: 1;
  transition: border-color .18s ease, color .18s ease;
}
.date-step:hover { border-color: var(--accent); color: var(--accent); }

.cal-panel {
  position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: 312px;
  padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 56px -16px rgba(20,40,30,.22), 0 8px 20px -10px rgba(20,40,30,.14);
  display: none;
}
.cal-panel.open { display: block; animation: calIn .18s cubic-bezier(.2,.7,.3,1) both; }
@keyframes calIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head button { width: 28px; height: 28px; border-radius: 8px; color: var(--ink-2); font-size: 17px; line-height: 1; }
.cal-head button:hover { background: var(--accent-soft); color: var(--accent); }
.cal-title { font-weight: 700; font-size: 13px; letter-spacing: .3px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week { margin-bottom: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.cal-week span { text-align: center; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.cal-day { position: relative; aspect-ratio: 1; border-radius: 9px; font-size: 13px; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.cal-day:disabled { cursor: default; color: var(--ink-3); opacity: .4; }
.cal-day.cal-out { color: #c3cbc7; }
.cal-day.cal-has { font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.cal-day.cal-has:hover { background: #d3ebdf; }
.cal-day.cal-sel { background: var(--accent); color: #fff; box-shadow: 0 4px 12px -4px rgba(20,122,78,.55); }
.cal-dot { position: absolute; bottom: 4px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .65; }
.cal-day.cal-sel .cal-dot { background: #fff; opacity: .9; }
.cal-foot { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.cal-quick { padding: 3px 8px; border-radius: 7px; font-size: 11.5px; color: var(--ink-2); background: var(--bg); font-variant-numeric: tabular-nums; }
.cal-quick:hover { background: var(--accent-soft); color: var(--accent); }
.cal-quick.on { background: var(--accent); color: #fff; }
.date-note { margin-top: 10px; font-size: 12px; color: var(--ink-3); }

#top200Body tr:hover { background: var(--accent-soft); }
#top200Body td.nm .tag { margin-left: 6px; }

@media (max-width: 720px) {
  .cal-panel { width: min(312px, calc(100vw - 32px)); }
  .date-jump { flex: 1 1 auto; justify-content: space-between; }
}

#top200Body td.mono, #top200Head th { white-space: nowrap; }
@media (min-width: 721px) { #top200Body td.nm { min-width: 200px; } }

@media (max-width: 720px) {
  #top200Head th, #top200Body td { padding: 8px 5px; font-size: 12px; }
  #top200Body td.nm, #top200Head th.nm { max-width: 118px; }
}

/* ------- TOP200 · 收敛版：标题/日期同一行，数字两段式 ------- */
.t2head { align-items: center; margin: 0 0 14px; gap: 12px; }
.t2head h2 { font-size: 17px; letter-spacing: -.02em; }
.t2head .t2sub { margin-left: auto; }
.t2head .cal-wrap { margin: 0; }

/* 类目选择器：吃在标题行里，点开是一棵按层级缩进的列表 */
.cat-wrap { position: relative; display: flex; align-items: center; }
.cal-wrap.single .date-step, .cal-wrap.single .dj-car { display: none; }
.cal-wrap.single .date-jump { pointer-events: none; cursor: default; box-shadow: none; }
.cal-wrap.single .date-jump:hover { border-color: var(--line); color: inherit; }
.cat-jump {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; max-width: 190px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  transition: border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.cat-jump > span:not(.dj-car) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-jump:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 2px 10px -4px rgba(20,122,78,.25); }
.cat-panel {
  position: absolute; z-index: 62; top: calc(100% + 8px); left: 0; width: 278px;
  max-height: min(58vh, 430px); overflow-y: auto; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 56px -16px rgba(20,40,30,.22), 0 8px 20px -10px rgba(20,40,30,.14);
  display: none;
}
.cat-panel.open { display: block; animation: calIn .18s cubic-bezier(.2,.7,.3,1) both; }
.cat-panel::-webkit-scrollbar { width: 8px; }
.cat-panel::-webkit-scrollbar-thumb { background: #d5dcd8; border-radius: 8px; }
.cat-panel::-webkit-scrollbar-thumb:hover { background: #bcc7c1; }
.cat-panel::-webkit-scrollbar-track { background: transparent; }
.cat-hd { padding: 9px 10px 4px; font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .05em; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 7px 10px; border-radius: 8px; text-align: left;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.3;
}
.cat-item:hover { background: var(--accent-soft); color: var(--accent); }
.cat-item.on { background: var(--accent); color: #fff; font-weight: 600; }
.cat-item.on .ci-cnt { color: rgba(255,255,255,.85); }
.ci-cnt { font-size: 11px; color: #a2ada7; font-variant-numeric: tabular-nums; }
.t2-empty { padding: 26px 10px; text-align: center; color: var(--ink-3); font-size: 13px; }

@media (max-width: 720px) {
  .t2head { flex-wrap: wrap; row-gap: 9px; }
  .cat-wrap { margin-left: auto; }
  .t2head .cal-wrap { flex: 1 0 100%; width: 100%; }
  .cat-jump { padding: 7px 11px; max-width: 142px; font-size: 12.5px; }
  .cat-panel { left: auto; right: 0; width: min(278px, calc(100vw - 32px)); }
}

#top200Body b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
#top200Body .rng { color: #a2ada7; font-weight: 400; font-size: 11.5px; font-variant-numeric: tabular-nums; }
#top200Body td.rk { font-size: 12.5px; }
#top200Body td.rk.top { color: var(--accent); font-weight: 700; }
#top200Body .sco.hi { color: var(--accent); font-weight: 700; }
#top200Body .sco.md { color: var(--ink); font-weight: 600; }
#top200Body .sco.lo { color: #a2ada7; font-weight: 500; }
#top200Body td { padding-top: 10px; padding-bottom: 10px; }
#top200Body tr:hover td { background: #fbfdfc; }
#top200Body .tag { font-size: 10.5px; padding: 1px 5px; }

/* 固定列宽：# 不再被自动拉宽，数字列等宽 */
@media (min-width: 721px) {
  #view-top200 table { table-layout: fixed; }
  #view-top200 th.rk { width: 62px; }
  #view-top200 th.mono { width: 196px; }
  #view-top200 th.mono.pres { width: 96px; }
  #view-top200 th.sc { width: 96px; }
}

@media (max-width: 720px) {
  .t2head { gap: 10px; margin-bottom: 12px; }
  .t2head .t2sub { display: none; }
  .date-step { width: 32px; height: 32px; }
  .date-jump { padding: 7px 11px; }
}

/* ------- 全量榜单 · 收敛：药丸只在需要处、类目推断改浅灰 ------- */
.tier-txt { color: var(--ink-2); font-size: 12px; letter-spacing: .02em; }
#tbody td.cat-infer { color: #96a29c; }
#tbody b, #top200Body b { font-weight: 600; font-variant-numeric: tabular-nums; }
#tbody .rng { color: #a2ada7; font-weight: 400; font-size: 11.5px; font-variant-numeric: tabular-nums; }
#tbody td.rk.top { color: var(--accent); font-weight: 700; }
#tbody .sco.hi { color: var(--accent); font-weight: 700; }
#tbody .sco.md { color: var(--ink); font-weight: 600; }
#tbody .sco.lo { color: #a2ada7; font-weight: 500; }
#tbody td { padding-top: 10px; padding-bottom: 10px; }
#tbody .tag { font-size: 10.5px; padding: 1px 6px; }

@media (min-width: 721px) {
  #view-all table { table-layout: fixed; }
  #view-all th.rk { width: 72px; }
  #view-all thead th:nth-child(3) { width: 76px; }
  #view-all thead th:nth-child(4) { width: 224px; }
  #view-all thead th:nth-child(5) { width: 140px; }
  #view-all thead th:nth-child(6) { width: 152px; }
  #view-all thead th:nth-child(7) { width: 84px; }
  #view-all thead th:nth-child(8) { width: 92px; }
}

@media (max-width: 720px) {
  #tbody td.mono, #top200Body td.mono { white-space: nowrap; }
  #view-all thead th, #view-all tbody td { padding: 8px 5px; font-size: 12px; }
  #view-all th.rk { width: 54px; }
}

@media (max-width: 720px) {
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar .check { display: none; }
  .toolbar .field { flex: 0 0 auto; }
  .toolbar .grow { display: none; }
  #count { display: none; }
}

/* 洞察卡奇数张时最后一张占满整行，避免半行孤卡 */
.insights > .insight:last-child:nth-child(odd) { grid-column: 1 / -1; }

.foot-note {
  margin-top: 10px; padding: 0 2px; font-size: 12px; line-height: 1.6;
  color: var(--ink-3);
}

/* 抽屉转化漏斗 */
.funnel { display: flex; align-items: stretch; gap: 6px; }
.funnel .fn {
  flex: 1 1 0; min-width: 0; display: grid; gap: 3px;
  background: var(--line-2); border-radius: 8px; padding: 8px 10px;
}
.funnel .fn i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.funnel .fn b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.funnel .fa { align-self: center; color: var(--ink-3); font-size: 13px; }

@media (max-width: 720px) {
  .funnel { gap: 4px; }
  .funnel .fn { padding: 7px 8px; }
  .funnel .fn b { font-size: 11px; }
  .funnel .fn i { font-size: 10.5px; }
  .funnel .fa { display: none; }
}
