/* Gallery lightbox styles — with a loading indicator. */
.bg-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 20, 0.94);
  padding: 4vh 4vw;
}
.bg-lb.is-open { display: flex; }

.bg-lb-stage {
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* 固定比例的画框：图片未到时也有占位，避免布局跳动 */
.bg-lb-frame {
  position: relative;
  width: min(86vw, 860px);
  height: min(70vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-lb-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.bg-lb-frame img.is-shown { opacity: 1; }

/* 加载提示：转圈 + 文字 */
.bg-lb-loading {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #dfe8ef;
  font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}
.bg-lb-loading.is-on { display: flex; }

.bg-lb-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  animation: bg-lb-spin 0.8s linear infinite;
}
@keyframes bg-lb-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .bg-lb-spinner { animation-duration: 2s; }
}

.bg-lb-stage figcaption {
  color: #e8eef2;
  font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.bg-lb-close,
.bg-lb-prev,
.bg-lb-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.bg-lb-close:hover,
.bg-lb-prev:hover,
.bg-lb-next:hover { background: rgba(255, 255, 255, 0.26); }

.bg-lb-close { top: 18px; right: 18px; font-size: 30px; }
.bg-lb-prev { left: 2vw; top: 50%; transform: translateY(-50%); }
.bg-lb-next { right: 2vw; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .bg-lb-frame { width: 92vw; height: 62vh; }
  .bg-lb-close { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 24px; }
  .bg-lb-prev, .bg-lb-next { width: 40px; height: 40px; font-size: 22px; }
  .bg-lb-prev { left: 6px; }
  .bg-lb-next { right: 6px; }
}

/* 卡片上"查看更多"的提示 */
.card .shot-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font: 500 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6b78;
}
.card .shot-count::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.7;
}
.card .ph { position: relative; }
.card:hover .ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.05);
}
