.fsd-gal { margin: 18px 0 26px; }
.fsd-gal-viewport {
  overflow: hidden; background: #f7f8fa; border: 1px solid #e6e8eb;
  border-radius: 8px; padding: 12px 0; touch-action: pan-y; user-select: none;
}
.fsd-gal-track { display: flex; width: max-content; will-change: transform; }
.fsd-gal-group { display: flex; flex: 0 0 auto; padding-right: 12px; }
.fsd-gal-cell {
  position: relative; display: block; flex: 0 0 auto; width: 220px; height: 150px;
  margin-right: 12px; border-radius: 6px; overflow: hidden; background: #eee;
}
.fsd-gal-cell img { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.fsd-gal-num {
  position: absolute; left: 6px; bottom: 6px; min-width: 20px; height: 20px; line-height: 20px;
  text-align: center; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; border-radius: 10px;
}
.fsd-gal-tip { margin: 8px 0 0; text-align: center; color: #888; font-size: 12px; }

.fsd-gal-lb {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.88);
}
.fsd-gal-lb[hidden] { display: none; }
.fsd-gal-lb-figure { max-width: 92vw; max-height: 88vh; margin: 0; text-align: center; }
.fsd-gal-lb-figure img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.fsd-gal-lb-figure figcaption { color: #ddd; font-size: 13px; margin-top: 10px; }
.fsd-gal-lb-close, .fsd-gal-lb-nav {
  position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff;
  cursor: pointer; line-height: 1;
}
.fsd-gal-lb-close { top: 18px; right: 24px; width: 40px; height: 40px; font-size: 26px; border-radius: 50%; }
.fsd-gal-lb-nav { top: 50%; width: 48px; height: 72px; margin-top: -36px; font-size: 40px; }
.fsd-gal-lb-prev { left: 16px; border-radius: 6px; }
.fsd-gal-lb-next { right: 16px; border-radius: 6px; }
.fsd-gal-lb-close:hover, .fsd-gal-lb-nav:hover { background: rgba(255,255,255,.28); }

.fsd-gal-grid { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.fsd-gal-card {
  box-sizing: border-box; width: 33.333%; padding: 0 8px 18px;
}
.fsd-gal-card a { display: block; text-decoration: none; color: inherit; }
.fsd-gal-card img {
  display: block; width: 100%; height: 170px; object-fit: cover;
  border-radius: 6px; background: #f0f0f0; border: 0;
}
.fsd-gal-card h2 { font-size: 16px; line-height: 1.5; margin: 10px 0 6px; }
.fsd-gal-card p { color: #666; font-size: 13px; line-height: 1.7; margin: 0 0 6px; }
.fsd-gal-meta-line { color: #999; font-size: 12px; }
.fsd-gal-noimg { height: 170px; line-height: 170px; text-align: center; background: #f2f2f2; color: #999; border-radius: 6px; }
.fsd-gal-pages { text-align: center; margin: 10px 0 28px; }
.fsd-gal-pages .page-numbers { display: inline-block; padding: 5px 12px; margin: 0 3px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; }
.fsd-gal-pages .current { background: #2271b1; color: #fff; border-color: #2271b1; }

@media (max-width: 900px) { .fsd-gal-card { width: 50%; } }
@media (max-width: 640px) {
  .fsd-gal-cell { width: 150px; height: 106px; margin-right: 8px; }
  .fsd-gal-group { padding-right: 8px; }
  .fsd-gal-viewport { padding: 8px 0; }
  .fsd-gal-card { width: 100%; }
  .fsd-gal-card img { height: 200px; }
  .fsd-gal-lb-nav { width: 36px; height: 56px; margin-top: -28px; font-size: 30px; }
  .fsd-gal-lb-prev { left: 4px; }
  .fsd-gal-lb-next { right: 4px; }
}
