/* =========================================================
   site-ext.css · 子时后台发布时附加的首页样式（v25）
   - 首页工具卡片角标（新 / 热 等）
   - 工具数量为 1–3、8–12 时的网格排布（原样式只覆盖 4–7）
   沿用 style.css 的变量与圆角、字体，不改动原有规则
   ========================================================= */
.feature-card h2 .card-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; min-width: 20px; margin-left: 8px; padding: 0 7px; transform: translateY(-2px);
  border-radius: 999px; vertical-align: middle;
  font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .04em; white-space: nowrap;
  color: #fff; background: linear-gradient(135deg, #ff8a4c, #f2662b);
  box-shadow: 0 4px 12px -4px rgba(242, 102, 43, .6);
}
.on-dark .feature-card h2 .card-badge { box-shadow: 0 4px 14px -4px rgba(242, 102, 43, .8); }
@media (prefers-reduced-motion: no-preference) {
  .feature-card h2 .card-badge { animation: zsBadgeIn .6s cubic-bezier(.16, 1, .3, 1) both .2s; }
  @keyframes zsBadgeIn { from { opacity: 0; transform: translateY(-2px) scale(.6); } to { opacity: 1; transform: translateY(-2px) scale(1); } }
}

/* 其他数量的网格（桌面 12 栅格；平板 / 手机沿用原有 span 6 / 整行规则） */
.feature-grid.n-1 > :nth-child(n) { grid-column: 1 / -1; }
.feature-grid.n-2 > :nth-child(n) { grid-column: span 6; }
.feature-grid.n-3 > :nth-child(n) { grid-column: span 4; }
.feature-grid.n-8 > :nth-child(n) { grid-column: span 3; }
.feature-grid.n-9 > :nth-child(n) { grid-column: span 4; }
.feature-grid.n-10 > :nth-child(n) { grid-column: span 3; }
.feature-grid.n-10 > :nth-child(n+9) { grid-column: span 6; }
.feature-grid.n-11 > :nth-child(n) { grid-column: span 3; }
.feature-grid.n-11 > :nth-child(n+9) { grid-column: span 4; }
.feature-grid.n-12 > :nth-child(n) { grid-column: span 3; }
@media (max-width: 900px) {
  .feature-grid.n-1 > :nth-child(n),
  .feature-grid.n-2 > :nth-child(n),
  .feature-grid.n-3 > :nth-child(n),
  .feature-grid.n-8 > :nth-child(n),
  .feature-grid.n-9 > :nth-child(n),
  .feature-grid.n-10 > :nth-child(n),
  .feature-grid.n-11 > :nth-child(n),
  .feature-grid.n-12 > :nth-child(n) { grid-column: span 6; }
  .feature-grid.n-1 > :nth-child(n),
  .feature-grid.n-3 > :nth-child(3), .feature-grid.n-9 > :nth-child(9), .feature-grid.n-11 > :nth-child(11) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .feature-grid.n-1 > :nth-child(n),
  .feature-grid.n-2 > :nth-child(n),
  .feature-grid.n-3 > :nth-child(n),
  .feature-grid.n-8 > :nth-child(n),
  .feature-grid.n-9 > :nth-child(n),
  .feature-grid.n-10 > :nth-child(n),
  .feature-grid.n-11 > :nth-child(n),
  .feature-grid.n-12 > :nth-child(n) { grid-column: 1 / -1; }
}
