/* ===== 专题插件：前台栏目与专题网页 ===== */

/* 栏目列表 */
.topic-list-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
.topic-card {
  background: var(--card-solid); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.topic-card-cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--muted-bg); }
.topic-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.topic-card:hover .topic-card-cover img { transform: scale(1.05); }
.topic-card-cover .no-cover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-weight: 700; letter-spacing: 2px;
  background: linear-gradient(135deg, var(--theme) 0%, #6995ff 100%);
}
.topic-card-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.topic-card-title { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-card:hover .topic-card-title { color: var(--theme); }
.topic-card-intro {
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 19px;
}
.topic-card-meta { margin-top: auto; display: flex; gap: 12px; font-size: 11.5px; color: var(--text-muted); padding-top: 4px; }
.topic-card-meta i { margin-right: 2px; }
.topic-empty { padding: 50px 20px; text-align: center; color: var(--text-muted); }

/* 专题网页（画布等比缩放还原） */
.topic-page { padding: 16px 0 26px; }
.topic-head { margin-bottom: 12px; }
.topic-head h1 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.topic-head p { margin: 0; color: var(--text-muted); font-size: 13px; }
.topic-stage { position: relative; margin: 0 auto; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card-solid); }
.topic-canvas { position: relative; transform-origin: top left; margin: 0 auto; overflow: hidden; line-height: 1; }
.topic-canvas .tp-layer { position: absolute; box-sizing: border-box; }
.topic-canvas .tp-text-in { width: 100%; word-break: break-word; white-space: pre-wrap; }
.topic-canvas .tp-image img { user-select: none; -webkit-user-drag: none; }
.topic-canvas .tp-shape-in { width: 100%; height: 100%; }
.topic-canvas a { color: inherit; }
.topic-preview-tip {
  margin: 0 0 12px; padding: 8px 14px; border-radius: 8px; font-size: 12.5px;
  background: #fff7e6; color: #a06a00; border: 1px solid #ffe1a8;
}
.topic-related { margin-top: 26px; }
.topic-related h3 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.topic-back { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.topic-back:hover { color: var(--theme); }
.topic-noscript { overflow-x: auto; }

@media (max-width: 767.98px) {
  .topic-list-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 11px; }
  .topic-head h1 { font-size: 17px; }
  .topic-page { padding: 12px 0 20px; }
}
