/* ===== CMS（动态）输出的固定结构：列表 .v3-cases / 详情 .cms-post-body。类名由 legacy/v3/cms/render.py 决定，这里只做样式。 ===== */
.v3-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.v3-cases:empty { display: none; }
.v3-case {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color 0.25s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.v3-case:hover { border-color: rgba(184, 255, 79, 0.45); transform: translateY(-3px); box-shadow: var(--shadow); }
.v3-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #050608; }
.v3-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.v3-case:hover .v3-cover img { transform: scale(1.04); }
.v3-cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 -80px 100px -60px rgba(0, 0, 0, 0.8); }
.v3-case-copy { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 22px; }
.v3-case-copy time { font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--faint); }
.v3-case-copy h3 { font-size: 1.12rem; font-weight: 800; line-height: 1.3; }
.v3-case-copy h3 a { color: inherit; text-decoration: none; }
.v3-case-copy h3 a:hover { color: var(--accent); }
.v3-case-copy p { color: var(--dim); font-size: 0.95rem; line-height: 1.6; }

/* 文章详情：CMS 用 case-h1.html 做壳，正文落在 .d-sec > .wrap.cms-post-body > article */
.d-sec:not(.sec) { padding-bottom: clamp(56px, 8vw, 104px); }
.cms-post-body article { max-width: 780px; font-size: 1.05rem; line-height: 1.9; color: var(--ink); }
.cms-post-body article p { margin: 0 0 1.25em; }
.cms-post-body .btn { margin-top: 8px; }
.v3-section-end { margin-top: 14px; }
.v3-case-state { display: inline-block; margin-top: 14px; font: 600 11px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--accent); }
.cms-preview-banner {
  position: sticky; top: var(--head-h); z-index: 5; margin: 0;
  padding: 10px 16px; background: #ffd24d; color: #0b0d10; text-align: center;
  font: 600 12px/1.4 var(--font-mono); letter-spacing: 0.06em;
}

/* 窄屏：网格列不得小于容器（minmax(320px) 在 320 视口会撑破） */
@media (max-width: 480px) {
  .v3-cases, .res-grid, .gallery, .works-grid { grid-template-columns: minmax(0, 1fr); }
}
