/* ============ 作品长廊 · 全屏灯箱 ============ */
.lb[hidden] { display: none !important; }
.lb:focus { outline: none; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: block;
  color: #f5f5f6;
  font-family: inherit;
  animation: lb-in .22s ease both;
}

@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, .93);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.lb__frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 76px 108px 112px;
  box-sizing: border-box;
}

.lb__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.lb__img,
.lb__video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #141416;
  box-shadow: 0 30px 90px -30px rgba(0, 0, 0, .9);
  animation: lb-pop .26s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes lb-pop {
  from { opacity: 0; transform: scale(.975); }
  to { opacity: 1; transform: scale(1); }
}

.lb__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .55);
  pointer-events: none;
}

/* 左上角 / 左右切换按钮 */
.lb__btn {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  font-family: inherit;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.lb__btn:hover {
  background: rgba(255, 81, 69, .9);
  border-color: rgba(255, 81, 69, .9);
  transform: scale(1.06);
}

.lb__btn:focus-visible { outline: 2px solid #ff5145; outline-offset: 3px; }

.lb__close { top: 24px; right: 28px; font-size: 17px; }
.lb__prev  { top: 50%; left: 28px; transform: translateY(-50%); font-size: 30px; }
.lb__next  { top: 50%; right: 28px; transform: translateY(-50%); font-size: 30px; }
.lb__prev:hover, .lb__next:hover { transform: translateY(-50%) scale(1.06); }

/* 底部信息条 */
.lb__bar {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px 26px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.lb__meta { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lb__title { font-size: 17px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.lb__sub  { font-size: 13px; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.lb__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lb__count { font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .1em; color: #ff6b5e; }
.lb__hint { font-size: 11px; color: rgba(255, 255, 255, .42); white-space: nowrap; }

/* 灯箱打开时：恢复系统指针、隐藏自定义准星，避免出现「两个鼠标」。
   这条规则的特异性高于自定义光标动态注入的 html *{cursor:none!important}。 */
html.lightbox-open,
html.lightbox-open * { cursor: auto !important; }
html.lightbox-open .lb__btn,
html.lightbox-open .lb__backdrop,
html.lightbox-open .lb__frame { cursor: pointer !important; }
html.lightbox-open .lb__img,
html.lightbox-open .lb__video { cursor: auto !important; }
html.lightbox-open .target-cursor { display: none !important; }

@media (max-width: 780px) {
  .lb__frame { padding: 64px 20px 104px; }
  .lb__btn { width: 38px; height: 38px; font-size: 18px; }
  .lb__close { top: 16px; right: 16px; }
  .lb__prev { left: 10px; }
  .lb__next { right: 10px; }
  .lb__bar { padding: 16px 18px 20px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .lb__side { align-items: flex-start; }
  .lb__hint { display: none; }
  .lb__title { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .lb, .lb__img, .lb__video { animation: none; }
}
