:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #ecedf1;
  --line-strong: #dcdee4;
  --text: #1f2329;
  --sub: #8a8f99;
  --sub2: #a8adb7;
  --hover: #f4f5f7;
  --xhs: #ff2442;
  --dy: #161823;
  --ok: #12b76a;
  --warn: #f79009;
  --info: #2e90fa;
  --radius: 10px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.app { display: flex; height: 100vh; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.brand {
  height: 56px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand-title { font-size: 14px; font-weight: 600; letter-spacing: .2px; }

.icon-btn {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #4e5560;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--hover); border-color: #c9ccd4; }

.acct-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 4px; }
.acct-scroll::-webkit-scrollbar { width: 8px; }
.acct-scroll::-webkit-scrollbar-thumb { background: #e3e5ea; border-radius: 4px; }

.acct-empty {
  color: var(--sub2);
  font-size: 12px;
  text-align: center;
  padding: 26px 12px;
  line-height: 1.7;
}
.acct-empty.hidden { display: none; }

.acct {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 2px;
}
.acct:hover { background: var(--hover); }
.acct.active { background: #eef1f6; }
.acct.active::before {
  content: "";
  position: absolute; left: 2px; top: 10px; bottom: 10px;
  width: 3px; border-radius: 2px; background: var(--accent, #4e5560);
}

.avatar {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 50%;
  overflow: hidden;
  background: #eceef2;
  color: #6b7280;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.acct-meta { flex: 1; min-width: 0; }
.acct-name {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acct-sub {
  font-size: 11px; color: var(--sub);
  margin-top: 2px;
  display: flex; align-items: center; gap: 5px;
}
.dot-s {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--sub2);
}
.dot-s.ok { background: var(--ok); }
.dot-s.expired { background: var(--warn); }
.dot-s.pending { background: var(--info); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.acct-more {
  width: 20px; height: 20px; border: none; background: transparent;
  color: var(--sub2); cursor: pointer; border-radius: 5px; font-size: 13px;
  opacity: 0; flex: 0 0 20px;
}
.acct:hover .acct-more, .acct.active .acct-more { opacity: 1; }
.acct-more:hover { background: #e3e6ec; color: #4e5560; }

.side-foot {
  padding: 10px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.foot-btn {
  text-align: left;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #3b414b;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.foot-btn:hover { background: var(--hover); }
.foot-btn.active { background: #eef1f6; }
.foot-btn.subtle { color: var(--sub); font-size: 12px; }
.foot-ico { margin-right: 7px; color: var(--sub); }

/* ---------------- 右侧 ---------------- */
.stage-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 44px;
  flex: 0 0 44px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 0 14px;
  gap: 12px;
}
.tb-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-name { font-size: 13px; font-weight: 500; white-space: nowrap; }
.tb-url {
  font-size: 11px; color: var(--sub2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 420px;
}
.chip {
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  color: #fff; white-space: nowrap;
}
.chip.hidden { display: none; }
.tb-right { display: flex; align-items: center; gap: 6px; }
.tb-btn {
  height: 26px; padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: #fff; color: #414751;
  font-size: 12px; cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.tb-btn:hover { background: var(--hover); }
.tb-btn.primary { background: #1f2329; border-color: #1f2329; color: #fff; }
.tb-btn.primary:hover { background: #33383f; }
.tb-btn.ghost { border-color: transparent; background: transparent; font-size: 14px; }
.tb-btn:disabled { opacity: .5; cursor: default; }

.stage { flex: 1; position: relative; overflow: hidden; background: var(--bg); }

.panel {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: 28px 32px 40px;
}
.panel.hidden { display: none; }
.placeholder { position: absolute; inset: 0; background: var(--bg); display: none; }
.placeholder.show { display: block; }

.welcome { text-align: left; max-width: 640px; margin: 0 auto; padding-top: 90px; }
.welcome h2 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.welcome p { color: #5b616b; line-height: 1.85; font-size: 13px; }
.welcome-actions { display: flex; gap: 10px; margin: 22px 0 14px; }
.big-add {
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 13px; font-family: inherit; cursor: pointer; color: #2b3038;
}
.big-add:hover { background: #fafbfc; border-color: #c9ccd4; }
.big-add.xhs { border-color: #ffd2d8; color: #d81b36; }
.big-add.xhs:hover { background: #fff5f6; }
.big-add.dy { border-color: #d6d7dc; }
.hint { color: var(--sub2) !important; font-size: 12px !important; }

.dashboard h2 { font-size: 17px; font-weight: 600; }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dash-tools { display: flex; gap: 8px; align-items: center; }
select {
  height: 26px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12px; padding: 0 6px; color: #414751; font-family: inherit;
}

.cards { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.card {
  flex: 1; min-width: 150px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}
.card .k { font-size: 11px; color: var(--sub); margin-bottom: 8px; }
.card .v { font-size: 21px; font-weight: 600; letter-spacing: -.3px; }
.card .s { font-size: 11px; color: var(--sub2); margin-top: 6px; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 12px; }
table.grid th, table.grid td {
  padding: 9px 10px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.grid th { color: var(--sub); font-weight: 500; font-size: 11px; background: #fafbfc; }
table.grid td { color: #353b44; }
table.grid tr:last-child td { border-bottom: none; }
table.grid th.tl, table.grid td.tl { text-align: left; }
table.grid.small { font-size: 11.5px; }
.wcell { display: flex; align-items: center; gap: 8px; max-width: 340px; }
.wcell img { width: 26px; height: 34px; border-radius: 4px; object-fit: cover; background: #f0f1f4; flex: 0 0 26px; }
.wcell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-row td { text-align: center !important; color: var(--sub2); padding: 26px 0 !important; }
.dash-sub { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 10px; }
.dash-sub h3 { font-size: 13px; font-weight: 600; }

/* 筛选控件 */
.dash-tools { flex-wrap: wrap; }
.daterange { display: flex; align-items: center; gap: 4px; }
.daterange input[type="date"] {
  height: 26px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12px; padding: 0 6px; color: #414751;
  font-family: inherit; width: 128px;
}
.dash-sep { color: var(--sub2); font-size: 12px; }
.mini-btn {
  height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 11.5px; color: #4b515b; cursor: pointer; font-family: inherit;
}
.mini-btn:hover { background: #f3f5f8; }
.mini-btn.on { background: #eef3ff; border-color: #c4d6f7; color: #1f5fd0; }

/* 标签页 */
.tabs { display: flex; gap: 4px; margin: 4px 0 12px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 8px 14px; font-size: 12.5px; color: var(--sub); background: transparent;
  border: none; border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit;
}
.tab:hover { color: #2b3038; }
.tab.active { color: #1f6feb; border-bottom-color: #1f6feb; font-weight: 600; }
.tabpane { animation: fadein .18s ease; }
.tabpane.hidden { display: none; }
@keyframes fadein { from { opacity: .5; } to { opacity: 1; } }

/* 分页器 */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 2px 2px; }
.pager .pinfo { font-size: 11.5px; color: var(--sub2); }
.pager .pbtns { display: flex; align-items: center; gap: 4px; }
.pager button {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: #fff; font-size: 11.5px;
  color: #4b515b; cursor: pointer; font-family: inherit;
}
.pager button:hover:not(:disabled) { background: #f3f5f8; }
.pager button.cur { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.pager button:disabled { opacity: .45; cursor: default; }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: #2b3038; }
th.sortable::after { content: '⇅'; margin-left: 3px; font-size: 9px; color: #c3c7cf; }
th.sortable.asc::after { content: '↑'; color: #1f6feb; }
th.sortable.desc::after { content: '↓'; color: #1f6feb; }

/* ---------------- 弹层 ---------------- */
.popmenu {
  position: fixed;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 8px 24px rgba(20, 24, 32, .12);
  z-index: 999;
}
.popmenu.hidden { display: none; }
.popmenu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 8px 10px; border: none; background: transparent;
  font-size: 12.5px; color: #2f353d; border-radius: 7px; cursor: pointer;
  font-family: inherit;
}
.popmenu button:hover { background: var(--hover); }
.popmenu button.danger { color: #d92d20; }
.popmenu .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.xhs { background: var(--xhs); }
.dot.dy { background: var(--dy); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(31, 35, 41, .94); color: #fff;
  padding: 9px 16px; border-radius: 9px; font-size: 12.5px;
  max-width: 620px; line-height: 1.6;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  z-index: 1000;
}
.toast.hidden { display: none; }

.modal {
  position: fixed; inset: 0;
  background: rgba(22, 26, 33, .28);
  display: flex; align-items: center; justify-content: center;
  z-index: 1200;
}
.modal.hidden { display: none; }
.modal-box {
  width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px 16px;
  box-shadow: 0 18px 48px rgba(16, 20, 28, .18);
}
.modal-box h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.modal-desc { font-size: 12px; color: var(--sub); line-height: 1.7; margin-bottom: 14px; }
.modal-box input {
  width: 100%; height: 34px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0 10px; font-size: 12px; font-family: ui-monospace, Consolas, monospace;
  outline: none; color: #2b3038;
}
.modal-box input:focus { border-color: #9aa3b0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------------- 通用 ---------------- */
.hidden { display: none !important; }

/* ---------------- 归因面板 ---------------- */
.insight-sum { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.insight-line {
  display: flex; align-items: flex-start; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid #1f6feb;
  border-radius: 8px; padding: 10px 13px; font-size: 12.5px; line-height: 1.65; color: #2f353d;
  user-select: text;
}
.insight-line.warn { border-left-color: #f79009; }
.insight-line.bad { border-left-color: #e5484d; }
.insight-line.good { border-left-color: #12b76a; }
.insight-line b { font-weight: 600; color: #14181f; }
.insight-tag { flex: 0 0 auto; font-size: 11px; color: var(--sub); padding-top: 1px; }

.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.icard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; min-width: 0; }
.icard.wide { grid-column: 1 / -1; }
.icard-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.icard-h h3 { font-size: 13px; font-weight: 600; }
.icard-s { font-size: 11px; color: var(--sub2); }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 108px minmax(0, 1fr) 62px; align-items: center; gap: 10px; }
.bar-label { font-size: 12px; color: #2f353d; display: flex; align-items: baseline; gap: 5px; }
.bar-label i { font-style: normal; font-size: 10.5px; color: var(--sub2); }
.bar-track { height: 16px; background: #f2f3f6; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: #1f6feb; min-width: 2px; }
.bar-fill.dim { background: #c3cad6; }
.bar-val { font-size: 11.5px; color: #3d434d; text-align: right; font-variant-numeric: tabular-nums; }
.bar-val small { color: var(--sub2); font-size: 10.5px; }

.feat-list { display: flex; flex-direction: column; gap: 11px; }
.feat-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.feat-name { color: #2f353d; }
.feat-delta { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.feat-delta.up { color: #12b76a; }
.feat-delta.down { color: #e5484d; }
.feat-delta.flat { color: var(--sub2); }
.feat-pair { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--sub2); }

.hours { display: flex; align-items: flex-end; gap: 3px; height: 108px; }
.hour-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.hour-bar { width: 100%; background: #c3cad6; border-radius: 2px 2px 0 0; min-height: 3px; }
.hour-bar.zero { min-height: 1px; background: #e3e5ea; }
.hour-bar.hot { background: #1f6feb; }
.hour-lab { font-size: 9px; color: var(--sub2); }
.hour-col:hover .hour-bar { background: #7b93c4; }

.plat-list, .top-list, .weak-list { display: flex; flex-direction: column; gap: 8px; }
.plat-row { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 8px; font-size: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.plat-row:last-child { border-bottom: none; }
.plat-row .k { color: var(--sub); font-size: 11px; }
.plat-row .v { font-variant-numeric: tabular-nums; }

.mini-work { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.mini-work:last-child { border-bottom: none; }
.mini-work .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2f353d; }
.mini-work .m { flex: 0 0 auto; color: var(--sub); font-size: 11px; font-variant-numeric: tabular-nums; }
.mini-rank { flex: 0 0 18px; color: var(--sub2); font-size: 11px; }

/* ---------------- 趋势 ---------------- */
.trend-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.seg { display: inline-flex; background: #eceef2; border-radius: 8px; padding: 2px; }
.seg button {
  border: none; background: transparent; font-size: 12px; color: #4b515b;
  padding: 5px 12px; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.seg button.on { background: #fff; color: #14181f; font-weight: 500; box-shadow: 0 1px 2px rgba(20,24,32,.08); }
.trend-hint { font-size: 11.5px; color: var(--sub2); }
.trend-chart { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 8px; }
.trend-chart svg { display: block; width: 100%; height: auto; }
.trend-empty { padding: 40px 0; text-align: center; color: var(--sub2); font-size: 12.5px; line-height: 1.9; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 11.5px; color: var(--sub); }
.trend-legend span { display: inline-flex; align-items: center; gap: 5px; }
.trend-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------------- 选题库 / 热点 ---------------- */
.inline-form { display: flex; gap: 8px; margin-bottom: 12px; }
.inline-form input {
  flex: 1; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0 11px; font-size: 12.5px; font-family: inherit; outline: none; color: #2b3038; background: #fff;
}
.inline-form input:focus { border-color: #9aa3b0; }
.topic-filter { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.topic-filter .trend-hint { margin-left: auto; }

.topic-list { display: flex; flex-direction: column; gap: 8px; }
.topic-item {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
.topic-item .tt { flex: 1; min-width: 0; font-size: 12.5px; color: #23282f; line-height: 1.5; user-select: text; }
.topic-item .tmeta { font-size: 11px; color: var(--sub2); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.topic-badge {
  flex: 0 0 auto; font-size: 11px; padding: 2px 8px; border-radius: 20px; cursor: pointer;
  border: 1px solid transparent;
}
.topic-badge.todo { background: #fff4e5; color: #b25e09; border-color: #ffe0b8; }
.topic-badge.draft { background: #eef3ff; color: #1f5fd0; border-color: #d3e0fa; }
.topic-badge.published { background: #e9f8f0; color: #0b7a4b; border-color: #c7ebd8; }
.topic-del {
  flex: 0 0 auto; border: none; background: transparent; color: #c3c7cf;
  font-size: 15px; cursor: pointer; padding: 2px 4px; border-radius: 5px;
}
.topic-del:hover { color: #d92d20; background: #fdf2f2; }
.topic-empty { text-align: center; color: var(--sub2); font-size: 12.5px; padding: 40px 0; line-height: 1.9; }

.hot-tip { font-size: 11.5px; color: var(--sub2); line-height: 1.7; margin-bottom: 14px; }
.hot-body { display: flex; flex-direction: column; gap: 12px; }
.hot-day { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.hot-day-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.hot-day-h h3 { font-size: 13px; font-weight: 600; }
.hot-day-h span { font-size: 11px; color: var(--sub2); }

/* ---------------- 环比徽章 ---------------- */
.dlt {
  font-style: normal; font-size: 11px; font-weight: 500; margin-left: 6px;
  padding: 1px 5px; border-radius: 4px; vertical-align: 3px;
  font-variant-numeric: tabular-nums;
}
.dlt.up { background: #e9f8f0; color: #0b7a4b; }
.dlt.down { background: #fdf2f2; color: #c01017; }
.dlt.flat { background: #f1f3f6; color: var(--sub); }

/* ---------------- 节奏 ---------------- */
.rhythm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.rhythm-grid .icard.wide { grid-column: 1 / -1; }
.empty-note { text-align: center; color: var(--sub2); font-size: 12px; padding: 24px 0; line-height: 1.8; }

.pulse-list { display: flex; flex-direction: column; gap: 13px; }
.pulse-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pulse-name {
  font-size: 12.5px; color: #23282f; max-width: 62%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pulse-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--sub); margin-bottom: 6px;
}
.pulse-meta b { color: #3d434d; font-weight: 500; }
.pulse-meta .idle.ok { color: #0b7a4b; }
.pulse-meta .idle.warn { color: #b25e09; }
.pulse-meta .idle.bad { color: #c01017; }
.pulse-bar { height: 6px; background: #f2f3f6; border-radius: 3px; overflow: hidden; }
.pulse-bar i { display: block; height: 100%; background: #1f6feb; border-radius: 3px; }

.verdict { flex: 0 0 auto; font-size: 10.5px; padding: 1px 7px; border-radius: 10px; }
.verdict.ok { background: #e9f8f0; color: #0b7a4b; }
.verdict.mid { background: #f1f3f6; color: #5b6270; }
.verdict.warn { background: #fff4e5; color: #b25e09; }
.verdict.bad { background: #fdf2f2; color: #c01017; }

.period-body { margin-top: 12px; }
.period-head { font-size: 11.5px; color: var(--sub2); margin-bottom: 10px; }
.period-head span { color: var(--sub); }
.period-row {
  display: grid; grid-template-columns: 68px 1fr auto auto; align-items: baseline; gap: 8px;
  font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--line);
}
.period-row:last-child { border-bottom: none; }
.period-row .pk { color: var(--sub); font-size: 11.5px; }
.period-row b { font-size: 14px; font-weight: 500; color: #1f2329; font-variant-numeric: tabular-nums; }
.period-row .pv { font-size: 11px; color: var(--sub2); font-variant-numeric: tabular-nums; }
.period-row .pd { min-width: 46px; text-align: right; }

.heat-grid { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.heat-col { display: flex; flex-direction: column; gap: 3px; }
.heat-cell {
  display: block; width: 11px; height: 11px; border-radius: 2px;
  background: #f1efe8; flex: 0 0 auto;
}
.heat-cell.blank { background: transparent; }
.heat-cell.l0 { background: #f1efe8; }
.heat-cell.l1 { background: #c0dd97; }
.heat-cell.l2 { background: #97c459; }
.heat-cell.l3 { background: #639922; }
.heat-cell.l4 { background: #3b6d11; }
.heat-legend {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 9px; font-size: 10.5px; color: var(--sub2);
}
.heat-scale { display: inline-flex; align-items: center; gap: 3px; }
.heat-scale .heat-cell { width: 9px; height: 9px; }

/* ---------------- 标题公式 ---------------- */
.formula-list { display: flex; flex-direction: column; gap: 2px; }
.formula-row { padding: 11px 0; border-bottom: 1px solid var(--line); }
.formula-row:last-child { border-bottom: none; }
.formula-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.formula-name { font-size: 13px; font-weight: 500; color: #14181f; }
.formula-desc { font-size: 11.5px; color: var(--sub); }
.formula-stat { margin-left: auto; font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.formula-stat b { color: #3d434d; font-weight: 500; }
.formula-tpl {
  font-size: 12px; color: #2f353d; background: #f7f8fa; border-radius: 6px;
  padding: 7px 10px; margin-bottom: 6px; line-height: 1.5; user-select: text;
}
.formula-tpl em { font-style: normal; color: #1f5fd0; border-bottom: 1px dashed #b5d4f4; }
.formula-ex { display: flex; flex-direction: column; gap: 2px; }
.formula-ex span {
  font-size: 11.5px; color: var(--sub); display: flex; gap: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.formula-ex i { font-style: normal; color: #b25e09; flex: 0 0 auto; }

/* ---------------- 作品详情抽屉 ---------------- */
.wrow { cursor: pointer; }
.drawer-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16, 20, 28, .26);
  display: flex; justify-content: flex-end;
}
.drawer {
  width: 420px; max-width: 94vw; height: 100%; overflow-y: auto;
  background: #fff; padding: 18px 22px 30px;
  box-shadow: -10px 0 28px rgba(20, 24, 32, .13);
  animation: dwIn .18s ease-out;
}
@keyframes dwIn { from { transform: translateX(22px); opacity: 0; } to { transform: none; opacity: 1; } }
.dw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dw-tag { font-size: 11px; color: var(--sub); background: #f2f3f6; padding: 2px 9px; border-radius: 10px; }
.dw-close {
  border: 1px solid var(--line-strong); background: #fff; color: #4b515b;
  font-size: 11.5px; padding: 3px 11px; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.dw-close:hover { background: #f6f7f9; }
.dw-cover { border-radius: 10px; overflow: hidden; background: #f2f3f6; margin-bottom: 12px; }
.dw-cover img { width: 100%; display: block; max-height: 240px; object-fit: cover; }
.dw-title { font-size: 14.5px; font-weight: 500; line-height: 1.55; color: #14181f; margin-bottom: 6px; user-select: text; }
.dw-meta { font-size: 11.5px; color: var(--sub); margin-bottom: 16px; }
.dw-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 18px;
}
.dw-stat { background: #fff; padding: 10px 12px; }
.dw-stat span { display: block; font-size: 11px; color: var(--sub); margin-bottom: 3px; }
.dw-stat b { font-size: 16px; font-weight: 500; color: #14181f; font-variant-numeric: tabular-nums; }
.dw-sec { margin-bottom: 18px; }
.dw-sec h4 { font-size: 12px; font-weight: 500; color: #3d434d; margin-bottom: 8px; }
.dw-sec svg { display: block; width: 100%; height: auto; }
.dw-empty { font-size: 11.5px; color: var(--sub2); line-height: 1.8; padding: 12px 0; }
.dw-growth { font-size: 11.5px; color: var(--sub); margin-top: 6px; }
.dw-growth .up { color: #0b7a4b; font-weight: 500; }
.dw-growth .down { color: #c01017; font-weight: 500; }
.dw-id { font-size: 11.5px; color: var(--sub); font-family: Consolas, monospace; user-select: text; }
