/* 版块页话题列表 */
.thread-toolbar {
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.chip {
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: none;
}
.chip:hover, .chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}
.thread-toolbar .right { margin-left: auto; }

.thread-list { }
.thread-row {
  display: grid;
  grid-template-columns: 40px 1fr 100px 180px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background .15s;
}
.thread-row:hover { background: var(--surface-2); }
.thread-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
/* Gravatar 版头像：具体尺寸由 PHP 侧的 inline style 给出（36 / 28 视场景而定），
   这里只补 <img> 需要的裁剪和占位底色。不要写 width/height:auto——
   那会让渲染尺寸取决于代理返回图片的固有尺寸，头像就会大小不一。 */
img.thread-avatar {
  max-width: none;
  object-fit: cover;
  background: var(--surface-2);
}
.thread-title {
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.thread-title a { color: var(--text); }
.thread-title a:hover { color: var(--primary); text-decoration: none; }
.thread-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.thread-meta a { color: var(--text-muted); }
.thread-stat { text-align: center; }
.thread-stat .r { font-size: 15px; font-weight: 600; color: var(--accent-red); }
.thread-stat .v { font-size: 11px; color: var(--text-muted); }
.thread-last-post {
  font-size: 12px;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
}
.thread-last-post .u { color: var(--primary); }
.thread-last-post .t { display: block; margin-top: 2px; font-size: 11px; }

@media (max-width: 900px) {
  .thread-row { grid-template-columns: 36px 1fr 60px; gap: 10px; padding: 12px; }
  .thread-row .thread-last-post { display: none; }
  .thread-toolbar { padding: 10px 12px; }
  /* 标题过长时先让标题换行，而不是把统计列挤出网格 */
  .thread-title { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .thread-row { grid-template-columns: 32px 1fr 48px; gap: 8px; padding: 12px 10px; }
  .thread-avatar { width: 32px; height: 32px; font-size: 12px; }
  .thread-stat .r { font-size: 14px; }
  .thread-toolbar { padding: 8px 10px; gap: 6px; }
  .chip { padding: 4px 10px; }
  .thread-toolbar .right { margin-left: 0; }
}

/* 全站置顶行：暖色渐变左边框，与本版主题视觉区分 */
.thread-row.is-global-pinned {
  background: linear-gradient(90deg, rgba(239,68,68,.06), rgba(249,115,22,.03) 40%, transparent);
  border-left: 3px solid #ef4444;
}
.jx-global-pinned-card .card-header { color: #ef4444; }

/* 主题列表锁定图标 */
.thread-title .jx-lock-ico {
  display: inline-flex;
  align-items: center;
  color: #94a3b8;
  margin-right: 4px;
  vertical-align: middle;
}

/* 普通文章列表的特色图：圆角方形，区别于圆形的用户头像 */
img.thread-thumb {
  border-radius: var(--radius-sm);
  object-fit: cover;
  max-width: none;
  flex-shrink: 0;
  background: var(--surface-2);
  display: block;
}
/* 没有特色图时的兜底色块，跟上面的特色图保持同一形状 */
.thread-avatar.thread-avatar-square { border-radius: var(--radius-sm); }
