/* SudoCG 全站统一帖子卡片
 * 唯一视觉标准：首页“最新内容”卡片
 * 2026-07-29
 */

.site-post-grid.site-post-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  align-items:start;
}

.site-post-card.site-post-card {
  display:flex;
  flex-direction:column;
  position:relative;
  min-width:0;
  min-height:0;
  height:auto;
  aspect-ratio:auto;
  overflow:hidden;
  border:0;
  border-radius:6px;
  background:#fff;
  color:#18191c;
  text-decoration:none;
  padding:0;
  gap:0;
  box-shadow:none;
  transition:transform .15s ease;
}
.site-post-card.site-post-card:hover {
  transform:translateY(-2px);
  box-shadow:none;
}

.site-post-card.site-post-card > .site-post-card__cover {
  display:block;
  position:relative;
  inset:auto;
  width:100%;
  height:auto;
  min-height:0;
  aspect-ratio:16/9;
  flex:0 0 auto;
  overflow:hidden;
  border-radius:6px;
  background-color:#f1f2f3;
  background-position:center;
  background-repeat:no-repeat;
  background-size:contain;
}
.site-post-card__cover img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  transition:transform .3s ease;
}
.site-post-card:hover .site-post-card__cover img { transform:scale(1.03); }
.site-post-card.site-post-card > .site-post-card__cover.is-placeholder {
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#e8f4fa,#f0f0f8);
  background-image:linear-gradient(135deg,#e8f4fa,#f0f0f8);
}
.site-post-card.site-post-card > .site-post-card__cover.is-placeholder::before {
  content:"S";
  position:static;
  display:block;
  font-size:28px;
  line-height:1;
  font-weight:900;
  color:#bcc4d6;
  background:none;
}
.site-post-card.site-post-card > .site-post-card__cover::after { display:none; }

.site-post-card__badge {
  position:absolute;
  top:6px;
  left:6px;
  z-index:2;
  display:inline-flex;
  padding:2px 6px;
  border-radius:4px;
  background:rgba(0,0,0,.65);
  color:#fff;
  font-size:10px;
  line-height:1.4;
  font-weight:700;
  backdrop-filter:blur(4px);
}
.site-post-card__badge.feed-card-badge--sticky { background:rgba(245,124,0,.92); }
.site-post-card__badge.feed-card-badge--featured { background:rgba(79,70,229,.92); }
.site-post-card__hit {
  position:absolute;
  left:6px;
  right:6px;
  bottom:6px;
  z-index:2;
  overflow:hidden;
  padding:4px 6px;
  border-radius:4px;
  background:rgba(0,0,0,.68);
  color:#fff;
  font-size:10px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
  backdrop-filter:blur(4px);
}
.site-post-card__reward {
  position:absolute;
  top:6px;
  right:6px;
  z-index:2;
  padding:2px 6px;
  border-radius:4px;
  background:linear-gradient(135deg,#f59e0b,#ef4444);
  color:#fff;
  font-size:10px;
  line-height:1.4;
  font-weight:800;
  box-shadow:none;
}

.site-post-card.site-post-card > .site-post-card__body {
  position:static;
  inset:auto;
  z-index:auto;
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:0;
  width:100%;
  height:auto;
  min-height:73px;
  padding:8px 6px;
  box-sizing:border-box;
  background:#fff;
  color:#18191c;
}
.site-post-card__title.site-post-card__title {
  display:-webkit-box;
  min-height:36px;
  margin:0;
  overflow:hidden;
  color:#18191c;
  font-size:13px;
  font-weight:600;
  line-height:1.4;
  text-shadow:none;
  text-decoration:none;
  word-break:break-word;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.site-post-card__excerpt.site-post-card__excerpt { display:none; }
.site-post-card__meta.site-post-card__meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:nowrap;
  gap:6px;
  min-width:0;
  margin-top:6px;
  padding:0;
  overflow:hidden;
  color:#9499a0;
  font-size:11px;
  line-height:1.35;
}
.site-post-card__meta > span {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.site-post-card__meta > span:first-child { flex:1 1 auto; }
.site-post-card__meta > span:not(:first-child) { flex:0 0 auto; }

html.theme-dark .site-post-card.site-post-card { background:#162032; color:#e7eefb; }
html.theme-dark .site-post-card.site-post-card > .site-post-card__cover { background-color:#1a2333; }
html.theme-dark .site-post-card.site-post-card > .site-post-card__cover.is-placeholder {
  background:#1a2333;
  background-image:linear-gradient(135deg,#1a2a45,#1e2335);
}
html.theme-dark .site-post-card.site-post-card > .site-post-card__cover.is-placeholder::before { color:#3a4862; }
html.theme-dark .site-post-card.site-post-card > .site-post-card__body { background:#162032; color:#e7eefb; }
html.theme-dark .site-post-card__title.site-post-card__title { color:#e7eefb; }
html.theme-dark .site-post-card__meta.site-post-card__meta { color:#9ca3af; }

@media (max-width:1280px) {
  .site-post-grid.site-post-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:1024px) {
  .site-post-grid.site-post-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:768px) {
  .site-post-grid.site-post-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
}
@media (max-width:480px) {
  .site-post-grid.site-post-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .site-post-card.site-post-card > .site-post-card__body { min-height:68px; padding:6px 4px; }
  .site-post-card__title.site-post-card__title { min-height:34px; font-size:12px; }
  .site-post-card__meta.site-post-card__meta { font-size:10px; gap:4px; }
}
