:root { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.7 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.page-shell { width: 100%; max-width: var(--site-content-width); min-width: 0; margin: 0 auto; padding: 0 0 24px; container-type: inline-size; }
.page-shell .site-header.site-chrome { width: 100%; margin: var(--site-header-top) 0 0; }
/* 榜单保留整页滚动；赞助关闭时不留侧栏占位，中栏与精选页共用宽度上限。 */
.ranking-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; padding: 0 8px; }
.ranking-layout[data-sponsors-enabled="true"] { grid-template-columns: clamp(112px, 12vw, 190px) minmax(0, 1fr) clamp(112px, 12vw, 190px); gap: 16px; padding: 0 8px; }
/* 一侧没有卡片时不占位置，中栏自动变宽。 */
.ranking-layout[data-sponsors-enabled="true"][data-sponsor-left="false"] { grid-template-columns: minmax(0, 1fr) clamp(112px, 12vw, 190px); }
.ranking-layout[data-sponsors-enabled="true"][data-sponsor-right="false"] { grid-template-columns: clamp(112px, 12vw, 190px) minmax(0, 1fr); }
.ranking-layout[data-sponsors-enabled="true"][data-sponsor-left="false"][data-sponsor-right="false"] { grid-template-columns: minmax(0, 1fr); }
.ranking-layout[data-sponsor-left="false"] .ranking-sponsor-rail[data-sponsor-side="left"], .ranking-layout[data-sponsor-right="false"] .ranking-sponsor-rail[data-sponsor-side="right"] { display: none; }
.ranking-layout[data-sponsors-enabled="false"] .ranking-sponsor-rail { display: none; }
.ranking-sponsor-rail { position: sticky; top: 24px; max-height: calc(100dvh - 48px); display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 84px; overflow-y: auto; scrollbar-width: thin; }
.ranking-sponsor-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 143px; padding: 20px 10px; border: 1px solid #dce3ed; border-radius: 10px; background: #fff7e5; color: #172235; text-align: center; overflow-wrap: anywhere; }
.ranking-sponsor-logo { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid #dce3ed; border-radius: 6px; background: #fff; color: #172235; font: 16px var(--mono); overflow: hidden; white-space: nowrap; line-height: 1; }
.ranking-sponsor-card b { font-size: 12px; }
.ranking-sponsor-card p { margin: 0; color: #5b6a80; font-size: 11px; }
.ranking-sponsor-link { display: block; min-height: 32px; color: var(--muted); font-size: 12px; text-align: center; }
.position { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--band-soft); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
/* 奖牌只强调前三名，中央数字仍沿用服务端排名，不改变排序依据。 */
.position.medal { position: relative; width: 40px; height: 40px; background: transparent; }
.medal-gold { --medal-edge: #ad7417; --medal-face: #f8dfa0; --medal-ink: #754706; }
.medal-silver { --medal-edge: #7c8a99; --medal-face: #e5ebf1; --medal-ink: #3b4b5d; }
.medal-bronze { --medal-edge: #ad6a40; --medal-face: #eed0b8; --medal-ink: #754423; }
.medal svg { width: 40px; height: 40px; stroke-width: 1.6; }
.medal-ribbon { stroke: #7590aa; }
.medal-face { fill: var(--medal-face); stroke: var(--medal-edge); }
.medal-number { position: absolute; left: 50%; top: 70.833%; transform: translate(-50%, -50%); color: var(--medal-ink); font-size: 12px; line-height: 1; font-weight: 700; }
html[data-theme="dark"] .medal-gold { --medal-edge: #e9b44c; --medal-face: #a66a0a; --medal-ink: #fff3cf; }
html[data-theme="dark"] .medal-silver { --medal-edge: #b9c7d5; --medal-face: #516271; --medal-ink: #f6f8fa; }
html[data-theme="dark"] .medal-bronze { --medal-edge: #dc986e; --medal-face: #88502f; --medal-ink: #fff0e5; }
html[data-theme="dark"] .medal-ribbon { stroke: #7f9dbb; }
.list-state { margin: 32px 0; color: var(--muted); text-align: center; }
.retry { display: block; margin: 0 auto 32px; padding: 8px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--link); }
@media (max-width: 900px) {
  .ranking-layout { padding: 0; }
  .ranking-layout[data-sponsors-enabled="true"] { display: block; padding: 0; }
  .page-shell { padding: 0 24px 24px; }
  .ranking-sponsor-rail { display: none; }
}
@media (max-width: 650px) {
  .page-shell { padding: 0 12px 24px; }
}
@media (max-width: 480px) { .page-shell { padding-bottom: 18px; } .project { padding: 14px; } }
@media (pointer: coarse) { .language button { min-height: 44px; } }

/* ---- 开源榜改版：前三名、筛选、列表（见 Jev-X 前台设计 · 开源榜）---- */
.icon { display: inline-flex; flex: none; }
.icon svg { width: 14px; height: 14px; }
.icon.star { color: #e8a317; }
.stars { display: inline-flex; align-items: center; gap: 4px; color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--band-soft); color: color-mix(in srgb, var(--fg) 80%, var(--muted)); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.position { display: grid; place-items: center; flex: none; width: 34px; height: 34px; }
.list-section { margin-top: 0; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0 8px; }
.list-head .cats { flex: 1; min-width: 0; margin: 0; }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tool-label { color: var(--muted); font-size: 13px; }
#project-lang { min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font-size: 13px; }
/* 不支持可定制 select 的浏览器（如 iOS Safari）：去掉系统外观，自绘箭头，避免下拉框在手机上变形 */
@supports not (appearance: base-select) {
  #project-lang { -webkit-appearance: none; appearance: none; padding-right: 26px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b98a5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; }
}
/* 语言下拉弹层：支持可定制 select 的浏览器（Chrome / Edge 135+）用站内样式，贴在下拉框正下方；其他浏览器保持系统原生选择器 */
@supports (appearance: base-select) {
  #project-lang, #project-lang::picker(select) { appearance: base-select; }
  #project-lang { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; cursor: pointer; }
  #project-lang::picker-icon { color: var(--muted); }
  #project-lang::picker(select) { margin-top: 4px; padding: 4px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 28px rgb(15 20 25 / .14); }
  #project-lang option { padding: 7px 10px; border-radius: 6px; color: var(--fg); font-size: 13px; white-space: nowrap; }
  #project-lang option::checkmark { display: none; }
  #project-lang option:hover, #project-lang option:focus-visible { background: var(--band-soft); outline: none; }
  #project-lang option:checked { color: var(--link); font-weight: 600; }
}
.sort { display: flex; padding: 3px; border-radius: 10px; background: var(--band-soft); }
.sort button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; }
.sort button[aria-pressed="true"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgb(15 20 25 / .08); }
/* 分类筛选与「精选」页的 .filters 同款：无边框文字按钮，选中为浅底 + 链接色，单行横向滑动。 */
.cats { display: flex; gap: 4px; margin: 14px 0; overflow-x: auto; scrollbar-width: thin; }
.cat { flex: none; white-space: nowrap; font: inherit; font-size: 12px; padding: 5px 8px; border-radius: 7px; cursor: pointer; background: transparent; color: var(--muted); border: 1px solid transparent; }
.cat[aria-pressed="true"] { background: var(--band-soft); color: var(--link); }
/* 触屏上分类标签视觉保持紧凑（不撑成 44px 方块），透明伪元素从 1px 边框内算起上下各扩 7px 补到 44px；滚动容器留出上下 6px 容纳它。 */
@media (pointer: coarse) { .cats { padding-block: 6px; } .cat { position: relative; } .cat::after { content: ""; position: absolute; inset: -7px 0; } }
.project-table { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.project-table:has(.projects:empty) { display: none; }
.project-head, .row-main { display: grid; grid-template-columns: 48px minmax(0, 1fr) 72px 64px 150px 88px 64px 64px 84px 40px; gap: 12px; align-items: center; padding: 10px 16px; }
.project-head { background: var(--band-soft); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.project-head .col-5, .project-head .col-6, .project-head .col-7 { text-align: right; }
.projects { margin: 0; padding: 0; list-style: none; }
.project-row { border-bottom: 1px solid var(--line); }
.project-row:last-child { border-bottom: 0; }
.project-row[data-open="true"] { background: color-mix(in srgb, var(--link) 3%, var(--surface)); }
.row-main { padding: 12px 16px; }
.rank { color: #8a98a5; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.proj { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px; overflow: hidden; background: #e8f4fd; color: #33414e; font-weight: 800; }
.avatar[data-hue="1"] { background: #fef3e2; } .avatar[data-hue="2"] { background: #e7f6ef; } .avatar[data-hue="3"] { background: #f3eefe; } .avatar[data-hue="4"] { background: #fdecef; } .avatar[data-hue="5"] { background: #eef2f5; }
html[data-theme="dark"] .avatar { background: #16303f; color: #e7e9ea; }
html[data-theme="dark"] .avatar[data-hue="1"] { background: #3a2a10; } html[data-theme="dark"] .avatar[data-hue="2"] { background: #12342a; } html[data-theme="dark"] .avatar[data-hue="3"] { background: #2b2440; } html[data-theme="dark"] .avatar[data-hue="4"] { background: #3d1d25; } html[data-theme="dark"] .avatar[data-hue="5"] { background: #22272c; }
.proj-text { min-width: 0; }
.proj-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.proj-title a { color: var(--fg); font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* About 描述优先显示：桌面最多两行，展开后在行里完整显示 */
.project-row[data-open="true"] .proj-desc { display: block; -webkit-line-clamp: unset; }
.proj-desc { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.proj-meta { display: none; }
.cell-cat { justify-self: start; }
.cell-stars { justify-content: flex-end; }
.cell-forks, .cell-watch { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cell-pushed { color: var(--muted); font-size: 13px; white-space: nowrap; }
.cell-pushed { display: inline-flex; align-items: center; gap: 6px; }
.cell-heat, .cell-quality { justify-self: start; }
.stale-dot { width: 6px; height: 6px; border-radius: 50%; background: #d9861a; }
.row-toggle { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.row-toggle:hover { background: var(--band-soft); color: var(--fg); }
.row-toggle svg { width: 16px; height: 16px; }
/* 展开详情：单栏、与项目名左对齐，不再套灰色面板；推文用左侧竖线引用，操作用文字链接。 */
.row-detail { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 2px 16px 18px 76px; }
.row-detail[hidden] { display: none; }
.detail-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.detail-top .detail-actions { margin-left: auto; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.detail-facts b { color: var(--fg); font-weight: 600; }
.detail-facts .archived { color: #8a4b00; }
.detail-stale { margin: 0; color: #8a4b00; font-size: 12px; }
html[data-theme="dark"] .detail-stale, html[data-theme="dark"] .detail-facts .archived { color: #d9a441; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.detail-link { color: var(--link); font-size: 13px; font-weight: 600; }
.basis-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
/* 内容区 ≤ 1120px：去掉 Forks / Watch 两列 */
@container (max-width: 1120px) {
  .project-head, .row-main { grid-template-columns: 40px minmax(0, 1fr) 72px 64px 140px 88px 84px 40px; }
  .project-head .col-6, .project-head .col-7, .cell-forks, .cell-watch { display: none; }
  .row-detail { padding-left: 68px; }
}
@container (max-width: 860px) {
  .project-head, .row-main { grid-template-columns: 36px minmax(0, 1fr) 72px 64px 88px 40px; }
  .project-head .col-4, .project-head .col-8, .cell-cat, .cell-pushed { display: none; }
  .row-detail { padding-left: 64px; }
}
@container (max-width: 720px) {
  /* 手机：工具条两行 —— 分类横滑，排序 + 语言一行；列表变成卡片 */
  .list-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding-top: 8px; }
  .list-tools { width: 100%; flex-wrap: nowrap; gap: 8px; justify-content: space-between; }
  .list-tools .sort { order: 1; } .list-tools #project-lang { order: 2; }
  #project-lang { flex: 0 1 auto; min-width: 0; height: 38px; min-height: 38px; padding-left: 14px; border: 0; border-radius: 999px; background-color: var(--band-soft); }
  .sort { flex: none; padding: 3px; border-radius: 999px; }
  .sort button { min-height: 32px; padding: 0 12px; border-radius: 999px; }
  .tool-label { display: none; }
  .cats { flex-wrap: nowrap; overflow-x: auto; margin: 8px -12px 0; padding: 0 12px 2px; scrollbar-width: none; }
  @media (pointer: coarse) { .cats { padding-block: 6px; } }
  .project-head { display: none; }
  .project-table { border: 0; border-radius: 0; overflow: visible; }
  .projects { display: flex; flex-direction: column; gap: 12px; }
  .project-row, .project-row:last-child { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface); }
  .project-row[data-open="true"] { background: var(--surface); }
  /* 卡片行：排名角标 + 头像 | 仓库名 + 作者 | 质量；描述；Stars · 热度 · 推荐人 · 展开 */
  .row-main { position: relative; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "avatar title quality" "avatar desc desc" "meta meta toggle"; column-gap: 12px; row-gap: 6px; align-items: center; padding: 14px 14px 4px; }
  .proj, .proj-text { display: contents; }
  .avatar { grid-area: avatar; align-self: start; width: 40px; height: 40px; }
  .proj-title { grid-area: title; flex-wrap: wrap; row-gap: 0; }
  .proj-owner { flex-basis: 100%; font-size: 12px; }
  .proj-desc { grid-area: desc; display: -webkit-box; margin-top: 0; font-size: 14px; line-height: 22px; color: var(--fg); -webkit-line-clamp: 2; }
  .project-row[data-open="true"] .proj-desc { display: -webkit-box; -webkit-line-clamp: 2; }
  .proj-meta { grid-area: meta; display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; }
  .meta-rec { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .cell-quality { grid-area: quality; justify-self: end; }
  .row-toggle { grid-area: toggle; justify-self: end; margin: 0 -8px 0 0; }
  .row-main > .rank { position: absolute; z-index: 1; left: 6px; top: 8px; min-width: 18px; padding: 0 4px; border-radius: 9px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 11px; line-height: 18px; text-align: center; }
  .cell-heat, .cell-cat, .cell-stars, .cell-forks, .cell-watch, .cell-pushed { display: none; }
  .row-detail { margin: 0; padding: 4px 14px 14px; max-width: none; border-top: 1px solid var(--line); }
  .podium { display: none; }
}
@media (pointer: coarse) { .row-toggle { min-height: 44px; } .sort button { position: relative; } .sort button::after { content: ""; position: absolute; inset: -7px 0; } /* 排序按钮视觉保持小，点按区补足 */ .row-toggle { width: 44px; } .detail-link { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---- 改版 2：标题行、前三名卡片、热度胶囊、浮层、X 推荐、下滑加载 ---- */
/* 三个主入口使用同一标题行与紧凑间距，长说明保留在文字中并按宽度省略。 */
.ranking-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding: 4px 0 8px; }
.ranking-title h1 { flex: none; margin: 0; font-size: 18px; line-height: 1.4; white-space: nowrap; }
.ranking-sub { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 650px) {
  .ranking-title { gap: 8px; }
  .ranking-title h1 { flex: none; font-size: 16px; white-space: nowrap; }
  /* 与精选页一致：标题和说明同一行，放不下时说明末尾省略，不再另起一行。 */
  .ranking-sub { font-size: 12px; }
}
/* 热度胶囊：配色在 theme.css，与精选 .q.heat-score 共用 */
.heat-badge { display: inline-flex; align-items: center; gap: 3px; min-height: 24px; padding: 0 8px; border: 0; border-radius: 999px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
button.heat-badge { cursor: pointer; }
.heat-badge .icon svg { width: 12px; height: 12px; }
.quality-badge { min-height: 24px; padding: 0 9px; border: 0; border-radius: 999px; background: #1d9bf01f; color: #075985; font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; }
html[data-theme="dark"] .quality-badge { background: #16303f; color: #7cc4f5; }
.proj-owner { display: inline; color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-title a { flex: none; max-width: 100%; }
.rank { font-family: var(--mono); font-size: 13px; font-weight: 400; }
.cell-stars { font-size: 14px; font-weight: 700; }
.cell-forks, .cell-watch { font-size: 14px; }
/* 前三名：沿用精选卡片（20px 圆角 + 细边框） */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; padding: 14px 0 0; }
.podium-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.podium-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.podium-head .avatar { width: 48px; height: 48px; border-radius: 50%; font-size: 19px; }
.podium-title { flex: 1; min-width: 0; }
.podium-name { display: block; color: var(--fg); font-size: 17px; font-weight: 700; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-owner { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.podium-rank { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--band-soft); color: var(--muted); font: 13px var(--mono); }
.podium-head .position.medal { flex: none; }
.podium-desc { margin: 0; min-height: 48px; font-size: 15px; line-height: 24px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.podium-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.podium-chips .heat-badge, .podium-chips .quality-badge { min-height: 24px; }
.podium-rec { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.podium-rec-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.podium-rec-text a { color: var(--fg); font-weight: 500; }
.podium-foot { display: flex; align-items: center; gap: 10px; white-space: nowrap; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.podium-foot .stars { font-weight: 700; }
.podium-link { margin-left: auto; font-weight: 500; }
.mini-av { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #e8f5fe; color: #075985; font-size: 10px; font-weight: 700; }
html[data-theme="dark"] .mini-av { background: #16303f; color: #7cc4f5; }
/* 榜单热度浮层；质量浮层复用全站的 quality-tooltip 样式。 */
.rank-tip { position: fixed; z-index: 50; width: 300px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--fg); box-shadow: 0 4px 14px rgb(0 0 0 / .14); font-size: 12px; line-height: 19px; font-variant-numeric: tabular-nums; text-align: left; }
.tip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.tip-head b { font-size: 13px; font-weight: 500; }
.tip-table { width: 100%; border-collapse: collapse; font: inherit; }
.tip-table th { padding: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 400; text-align: left; }
.tip-table td { padding: 4px 0; border-top: 1px solid var(--line); }
.tip-table th + th, .tip-table td + td { padding-left: 8px; }
.tip-table .num { text-align: right; }
.tip-table .muted { color: var(--muted); white-space: nowrap; }
.tip-table .sum td { font-weight: 500; }
.tip-note { margin: 0; color: var(--muted); }
.tip-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.tip-foot a { flex: none; font-size: 12px; font-weight: 500; }
/* 展开行：X 上的推荐，评论式列表，一条一行 */
.recs { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.recs-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--band-soft); color: var(--muted); font-size: 12px; }
.recs-head b { color: var(--fg); font-weight: 500; }
.recs-sort { margin-left: auto; }
.rec-row { display: grid; grid-template-columns: 20px 128px minmax(0, 1fr) 44px 72px 56px; align-items: center; column-gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); color: var(--fg); font-size: 13px; line-height: 20px; }
.rec-row:hover { background: var(--band-soft); text-decoration: none; }
.rec-who { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-date, .rec-xs { color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-open { color: var(--link); font-weight: 500; text-align: right; }
.recs-more { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 12px 0 42px; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--link); font-size: 13px; font-weight: 500; text-align: left; }
@container (max-width: 720px) {
  .rec-row { grid-template-columns: 20px auto minmax(0, 1fr) auto; min-height: 44px; column-gap: 8px; }
  .rec-who { max-width: 96px; }
  .rec-xs, .rec-open { display: none; }
  .recs-sort { display: none; }
  .recs-more { min-height: 44px; padding-left: 38px; }
  .detail-actions { gap: 8px; }
  .detail-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); }
}
/* 下滑加载状态 */
.list-sentinel { height: 1px; }
.list-more { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 20px 0 8px; color: var(--muted); font-size: 13px; }
.list-more[data-loading="true"]::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--link); border-radius: 50%; animation: rank-spin .8s linear infinite; }
@keyframes rank-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .list-more[data-loading="true"]::before { animation: none; } }

/* 分享按钮：前三名卡片、展开行、手机卡片三处共用 */
.share-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.share-btn svg { width: 15px; height: 15px; flex: none; }
.share-btn:disabled { opacity: .5; cursor: wait; }
.detail-share { min-height: 32px; }
.meta-share { width: 32px; height: 32px; border-radius: 50%; color: var(--muted); }
.share-toast { position: fixed; bottom: 24px; left: 50%; z-index: 120; max-width: calc(100% - 24px); padding: 10px 16px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); font-size: 13px; transform: translateX(-50%); }
.share-toast[hidden] { display: none; }
@media (max-width: 720px) { .detail-share { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); } }
@media (pointer: coarse) { .meta-share { width: 44px; height: 44px; margin: -6px; } }

/* 前三名底部空间有限：更新时间可被截断，其余项不折行 */
.podium-foot > span:nth-child(3) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.podium-foot .podium-link { margin-left: 0; }
