/* ==========================================================================
   热度榜单 / 正在发生 · 2026-10-13
   --------------------------------------------------------------------------
   与 lineage.css 分开而不是并进去：那一套是「一个世界的树」，这一套是
   「很多世界的排序」。两者的视觉语言不同（前者是层级，后者是名次），
   放一起改会互相影响。

   两条约束贯穿全文件：
   1. **名次色只有前三是强调色**。给每一行都上色等于没强调 —— 排行榜的
      全部信息量就在「第 1 名和第 8 名不一样」这件事上。
   2. **热度芯片用等宽数字**。它们是要被横向比较的数，字宽一变
      「12 个开局」和「8 个开局」就不在同一把尺子上。
   ========================================================================== */

/* ---- tab 条 ----
   六个 tab 一行放不下时横向滚动，而不是换行：换行会让「我现在在哪个榜」
   这一眼信息掉到第二屏去。
   类名用 heat-tab 而不是复用 .tab —— .tab 是创建页那套下划线 tab
   （border-bottom + 无背景），两者的视觉语言完全不同；靠
   `.heat-tabs .tab` 的优先级压过去虽然今天能work，但那是把耦合
   藏进层叠顺序里，改 .tab 时就会静默把这里一起改坏。

   尺寸（用户 2026-10-14 反馈后缩小一号）：13px/6px 13px → 12px/4px 10px。
   理由不是审美是算术：窄栏可用宽 452px（480 - wrap 左右各 14），
   13px 那套英文六词（Trending/Endings/Newcomers/Lineage/Relay/Authors）
   连文本带 padding 约 466px，最后一个 tab 被 overflow 裁掉 —— 而
   scrollbar 是隐藏的，用户根本不知道右边还有，只会以为榜少了。
   缩到 12px 后约 363px，三语都放得下；中文两字 tab 更宽松。
   极窄屏（320 一类）仍可能差一点，那时靠下面的横向滚动兜底
   （触屏能横滑），总比裁掉一个榜强。 */
.heat-tabs {
  display: flex; gap: 5px; margin-bottom: 10px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.heat-tabs::-webkit-scrollbar { display: none; }
.heat-tab {
  flex: none; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line, #e6e6ec);
  background: var(--panel, #f7f7fa); color: var(--muted, #8a8fa3);
  font-family: inherit; font-size: 12px;
  cursor: pointer; transition: all .12s ease;
}
.heat-tab:hover { border-color: var(--accent, #c9a44a); }
.heat-tab.on {
  background: var(--accent, #c9a44a); border-color: var(--accent, #c9a44a);
  color: #1b1b20; font-weight: 600;
}
/* 真手机（视口 ≤420px，可用宽约 347px 或更小）：再收一档。
   两档都按「最长语言」估算过，不是拍脑袋。 */
@media (max-width: 420px) {
  .heat-tabs { gap: 4px; }
  .heat-tab { padding: 3px 9px; font-size: 11.5px; }
}

/* 口径说明。**必须有** —— 它写着这一榜到底在排什么，
   没有它「第 1 名」会被读成「最好的作品」。 */
.heat-sub {
  margin: 0 0 14px; font-size: 12.5px; line-height: 1.6;
  color: var(--muted, #8a8fa3);
}
.heat-stamp {
  display: block; margin-top: 12px;
  font-size: 11.5px; color: var(--muted, #8a8fa3); opacity: .8;
}
/* 作者榜右侧列：人数/作品数/收益右对齐成列，与「左侧读人」对称。 */
.heat-author-side {
  margin-left: auto; text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
/* 作者榜亮收益：把「创作者能赚多少」直接写在榜上，冷启动作者看到同行已赚
   的 T币，才知道这条路值得走。 */
.heat-earned {
  font-size: 12px; font-weight: 600; color: var(--ok, #059669);
  font-variant-numeric: tabular-nums;
}
/* 作者榜顶部分成口径提示：创作者可得 X% —— 把分成规则摆到榜上而不是藏在
   文档里，是对新作者最直接的诱惑。 */
.heat-share {
  margin: 0 0 12px; padding: 8px 12px; border-radius: 9px;
  background: var(--ok-soft, #ecfdf5); color: var(--ok, #059669);
  font-size: 12.5px; font-weight: 600;
}

/* ---- 榜单行 ---- */
.heat-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.heat-row:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.heat-no {
  width: 30px; flex: none; text-align: center;
  font-size: 19px; font-weight: 700; color: var(--muted, #8a8fa3);
  font-variant-numeric: tabular-nums;
}
.heat-no.top { color: var(--accent, #c9a44a); }
.heat-cover { width: 56px; height: 56px; flex: none; overflow: hidden; border-radius: 8px; }
.heat-cover .plot-cover { width: 100%; height: 100%; border-radius: 8px; }
.heat-body { flex: 1; min-width: 0; }
.heat-title { font-weight: 650; font-size: 15px; }
.heat-sum {
  margin-top: 3px; font-size: 12.5px; color: var(--muted, #8a8fa3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.heat-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 5px; font-size: 12px; color: var(--muted, #8a8fa3);
}
/* 「N 人」是这个产品里最强的社会证明 —— 所以它比其它 meta 更深一点。
   注意后端只给去重人数、不给是谁，这里也就无从展示是谁。 */
.heat-players { color: var(--text, #1b1b20); font-weight: 600; font-variant-numeric: tabular-nums; }
.heat-side { font-variant-numeric: tabular-nums; }

/* 热度芯片：8 类行为。按 WEIGHTS 降序，权重越高的越靠前。 */
.heat-kinds { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.heat-chip {
  padding: 1px 7px; border-radius: 999px;
  background: var(--panel, #f1f1f6); color: var(--muted, #8a8fa3);
  font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---- 结局榜：完读进度条 ----
   进度条是这一榜的**主信息**，名次只是排序结果。所以它比其他榜的
   meta 更宽一点 —— 挤在一行末尾会被读者的视线扫过去。 */
.heat-side .heat-bar,
.ending-progress .ep-bar,
.fn-bar {
  display: inline-block; vertical-align: middle;
  width: 72px; height: 5px; margin: 0 6px; border-radius: 3px;
  background: var(--line, #e6e6ec); overflow: hidden;
}
.ending-progress .ep-bar { width: 96px; }
.fn-bar { display: block; width: 100%; height: 4px; margin: 5px 0 0; }
.heat-bar > i, .ep-bar > i, .fn-bar > i {
  display: block; height: 100%; border-radius: 3px;
  background: var(--accent, #c9a44a);
}

/* ---- 结局图鉴：完读进度 + 每个结局的人数 ---- */
.ending-progress {
  display: flex; align-items: center; gap: 6px;
  margin: -4px 0 10px; font-size: 12.5px; color: var(--muted, #8a8fa3);
}
.ending-progress .ep-players { font-weight: 600; color: var(--text, #1b1b20); }
.ending-chip .e-count, .ending-chip .e-mine {
  display: block; margin-top: 3px; font-size: 11px; color: var(--muted, #8a8fa3);
  font-variant-numeric: tabular-nums;
}
/* 「你走过」是给读者的那一点私有成就，不能和公共人数混成一个颜色。 */
.ending-chip .e-mine { color: var(--accent, #c9a44a); font-weight: 600; }

/* ---- 跨语种榜：语言标签 ----
   三种内容语言是固定的三种，所以可以给固定的三种颜色 —— 颜色在这里
   是识别码而不是装饰，读者看两次就能记住「黄色那条是日文」。
   配色按这套界面的暗底调（--bg #131009 / --panel #1c1812）挑的**深色版**：
   浅底上验证过的那组亮色放到暖暗底上会发灰、发脏，一眼就是外挂的一层。
   这里不用 prefers-color-scheme 分支 —— 本站是**恒定暗色**主题
   （theme.css 里写死了 color-scheme: dark），按系统亮暗分支等于
   让亮色那一组在所有机器上生效。 */
.heat-lang {
  display: inline-block; margin: 0 3px; padding: 1px 7px;
  border-radius: 6px; font-size: 11px;
  background: rgba(217, 164, 65, .13); color: #e0b463;
}
.heat-lang:nth-of-type(2) { background: rgba(109, 163, 240, .13); color: #8ab4f5; }
.heat-lang:nth-of-type(3) { background: rgba(127, 185, 138, .13); color: #93c79c; }

/* ---- 正在发生（发现页顶部的热度流）----
   横向卡片条。它必须是**横条**而不是网格：它要传达的是「与此同时，
   那边正在发生这些」，条状本身就是并置关系。 */
.heat-live { margin: 0 0 16px; }
.heat-live-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 9px; font-size: 13.5px;
}
/* 呼吸点：让「正在发生」真的是正在发生，而不是一个静态标题。 */
.heat-live-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: #e05a4e; animation: heatPulse 1.8s ease-in-out infinite;
}
@keyframes heatPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}
@media (prefers-reduced-motion: reduce) {
  .heat-live-dot { animation: none; }
}
.heat-live-more { margin-left: auto; font-size: 12.5px; color: var(--muted, #8a8fa3); }
.heat-live-strip {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.heat-live-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: 12px; text-decoration: none;
  background: var(--panel, #f7f7fa); color: inherit;
  border: 1px solid transparent; transition: border-color .12s;
}
.heat-live-card:hover { border-color: var(--accent, #c9a44a); }
.hlc-cover { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 16/10; }
.hlc-cover .plot-cover { width: 100%; height: 100%; border-radius: 8px; }
.hlc-title {
  font-size: 12.5px; font-weight: 650; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.hlc-meta {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: 11px; color: var(--muted, #8a8fa3);
}

/* ---- 创作者漏斗（仅作者本人可见）----
   五段横排而不是竖排：漏斗的本质是**收窄**，横排能一眼看出每一段
   砍掉了多少。竖排只能看到一根越来越短的柱，看不出比例。 */
.funnel {
  margin-top: 14px; padding: 14px;
  border-radius: 14px; border: 1px solid var(--line, #e6e6ec);
  background: var(--panel, #f7f7fa);
}
.fn-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.fn-head b { font-size: 13.5px; }
.fn-steps {
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fn-step { min-width: 0; }
.fn-n {
  font-size: 17px; font-weight: 700; color: var(--text, #1b1b20);
  font-variant-numeric: tabular-nums;
}
.fn-l { font-size: 12px; color: var(--muted, #8a8fa3); }
.fn-h { font-size: 11px; color: var(--muted, #8a8fa3); opacity: .85; }
/* 每段的转化率放在自己那段下面，不放到下一段上面：读者是横着读的，
   放在下面才不用回头去找「这个百分比是上一段还是这一段的」。 */
.fn-note { margin-top: 10px; font-size: 12px; color: var(--muted, #8a8fa3); }

@media (max-width: 640px) {
  .fn-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat-live-strip { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
}
/* ---- 账号 ID 短码 ----
   昵称不唯一而 ID 唯一，所以作者榜上必须带短码。视觉上刻意做得
   弱（灰色、小字）—— 它是消歧用的辅助信息，不该和昵称抢注意力，
   但也不能弱到看不见，否则九个同名作者还是分不出来。 */
.heat-idtag {
  margin-left: 7px; padding: 1px 6px; border-radius: 5px;
  font-size: 11px; font-weight: 500; letter-spacing: .02em;
  color: var(--muted, #8a8fa3);
  background: rgba(128, 128, 140, .14);
  font-variant-numeric: tabular-nums;
  cursor: help;
}

/* ---- 作者榜专属布局（用户 2026-10-15 定版）----
   原来的排布是「昵称 + ID 徽章」并排一行、「N 人 N 个作品」跟在昵称
   下面，右侧整块留白。改成：
     · 昵称独占标题行，ID 徽章落到昵称**下方**（与剧情详情页作者条
       的上下结构一致，两页同一个视觉语言）；
     · 人数与作品数合并推到**行尾右侧** —— 这一榜的主体是人，
       左边读人、右边读数，中间留白，长昵称也挤不到数字。
   窄屏兜底：标题行省略号 + 右侧数字 nowrap，375px 也不会重叠。 */
.heat-author .heat-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.heat-author-aid {
  margin-top: 3px; font-size: 12px; line-height: 1.3;
  min-width: 0;
}
/* ID 徽章在标题行内时有个 margin-left:7px 的间距；落到独立行后
   必须清零，否则整块徽章会缩进 —— 用户截图里就是缩进的样子。 */
.heat-author-aid .heat-idtag { margin-left: 0; }
.heat-author-side {
  margin-left: auto; flex: none; white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted, #8a8fa3);
  font-variant-numeric: tabular-nums;
}
