/* ================================================================
   Album Carousel Gallery — Premium
   iTunes-style: active = sharp & large; sides = glassy transparent
   ================================================================ */

/* ── Theme Variables ─────────────────────────────────────────── */


.lceap-acg-section[data-theme="light"] {
  --acg-bg:           #f0f2f8;
  --acg-text-primary: #1a1a2e;
  --acg-text-sec:     #4a5568;
  --acg-text-muted:   #9ca3af;
  --acg-info-bg:      rgba(0,0,0,0.03);
  --acg-info-border:  rgba(0,0,0,0.07);
  --acg-slide-bg:     rgba(0,0,0,0.03);
  --acg-slide-border: rgba(0,0,0,0.09);
  --acg-glass-color:  rgba(240,242,248,0.78);
  --acg-arrow-bg:     rgba(0,0,0,0.07);
  --acg-arrow-color:  #4a5568;
  --acg-dot-color:    rgba(0,0,0,0.15);
  --acg-dot-active:   var(--acg-accent, #3b82f6);
  --acg-divider:      rgba(0,0,0,0.07);
  --acg-lb-bg:        #ffffff;
  --acg-lb-header-bg: #f8f9fd;
  --acg-lb-text:      #1a1a2e;
  --acg-lb-date:      #6b7280;
  --acg-label-color:  #1a1a2e;
  --acg-count-color:  #6b7280;
  --acg-count-bg:     rgba(0,0,0,0.07);
}

/* ── Section Shell ───────────────────────────────────────────── */
.lceap-acg-section {
  padding: 70px 0 60px;
  background: var(--acg-bg);
  overflow: hidden;
  position: relative;
}

/* ── Track Wrapper ───────────────────────────────────────────── */
.lceap-acg-track-wrap {
  /* Single source of truth for slides-per-view; overridden at breakpoints.
     JS reads this value to compute deterministic translate steps. */
  --acg-per-view: 3;
  position: relative;
  background: var(--acg-track-bg);
  padding: 40px 0 20px;
  overflow: hidden;
}

/* ── Arrow Buttons ───────────────────────────────────────────── */
.lceap-acg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--acg-arrow-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--acg-arrow-color);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}
.lceap-acg-arrow:hover {
  background: var(--acg-accent, #f5c842);
  color: #1a1a2e;
  transform: translateY(-50%) scale(1.1);
}
.lceap-acg-arrow-prev { left: 20px; }
.lceap-acg-arrow-next { right: 20px; }

/* ── Track ───────────────────────────────────────────────────────
   Deterministic translate slider. The track is a non-wrapping flex row
   that is moved with transform: translateX(<whole-slide steps>%). No
   scrollLeft, no justify-content:center (both made scroll targets
   unstable as slide sizes/margins changed). Percentage translate is
   resize-stable and identical in the editor and on the live frontend. */
.lceap-acg-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  padding: 20px 0;
  /* transition is set dynamically by JS using cfg.transSpeed */
  will-change: transform;
  position: relative;
  min-height: 320px;
}

/* ── Slide ───────────────────────────────────────────────────────
   Width is exactly 100% / per-view (border-box includes the gutter
   padding), so N slides fill the viewport with no partial neighbours
   and no width:auto fighting the layout. No scale / no margin changes
   that would shift layout and cause jumping. */
.lceap-acg-slide {
  position: relative;
  flex: 0 0 calc(100% / var(--acg-per-view));
  max-width: calc(100% / var(--acg-per-view));
  box-sizing: border-box;
  padding: 0 12px;
  margin: 0;
  cursor: pointer;
  border-radius: 18px;
  transition: opacity 0.4s ease;
  outline: none;
}

/* Non-active slides are gently dimmed for focus (opacity only — no blur
   or filters, which are costly on mobile). On mobile (per-view:1) only
   the active slide is visible, so it is always full and sharp. */
.lceap-acg-slide:not(.lceap-acg-active) {
  opacity: 0.6;
}
.lceap-acg-slide.lceap-acg-active {
  opacity: 1;
  z-index: 2;
}

/* Glass overlay retained in markup but no longer used for the coverflow
   dim effect; kept transparent so it never intercepts pointer events. */
.lceap-acg-glass-overlay {
  display: none;
}

/* Single album (external single-collection mode, or one WP album):
   the lone slide spans the full width and navigation chrome is hidden. */
.lceap-acg-single .lceap-acg-slide {
  flex: 0 0 100%;
  max-width: 100%;
}
.lceap-acg-single .lceap-acg-arrow,
.lceap-acg-single .lceap-acg-dots {
  display: none;
}

/* ── Album Cover (image stack) ───────────────────────────────── */
.lceap-acg-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: visible;
  background: var(--acg-slide-bg);
  border: 1px solid var(--acg-slide-border);
}

.lceap-acg-cover-img {
  position: absolute;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  transition: transform 0.5s cubic-bezier(0.34,1.1,0.64,1);
}

/* ──── FAN STACK ─────────────────────────────────────────────── */
.lceap-acg-stack-fan .lceap-acg-ci-0 { width:88%;height:88%;top:6%;left:6%;z-index:4;box-shadow:0 8px 32px rgba(0,0,0,0.45); }
.lceap-acg-stack-fan .lceap-acg-ci-1 { width:82%;height:82%;top:8%;left:1%;transform:rotate(-9deg);z-index:3;filter:brightness(0.72); }
.lceap-acg-stack-fan .lceap-acg-ci-2 { width:82%;height:82%;top:10%;right:1%;transform:rotate(9deg);z-index:2;filter:brightness(0.58); }
.lceap-acg-stack-fan .lceap-acg-ci-3 { width:78%;height:78%;top:12%;left:11%;z-index:1;filter:brightness(0.40); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-fan .lceap-acg-ci-1 { transform:rotate(-20deg) translate(-12px,-4px);filter:brightness(0.80); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-fan .lceap-acg-ci-2 { transform:rotate(20deg) translate(12px,-4px);filter:brightness(0.70); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-fan .lceap-acg-ci-3 { transform:rotate(-32deg) translate(-20px,0);filter:brightness(0.55); }

/* ──── CASCADE STACK ─────────────────────────────────────────── */
.lceap-acg-stack-cascade .lceap-acg-ci-0 { width:80%;height:80%;bottom:4%;left:10%;z-index:4;box-shadow:0 8px 32px rgba(0,0,0,0.50); }
.lceap-acg-stack-cascade .lceap-acg-ci-1 { width:80%;height:80%;bottom:12%;left:10%;z-index:3;filter:brightness(0.75); }
.lceap-acg-stack-cascade .lceap-acg-ci-2 { width:80%;height:80%;bottom:20%;left:10%;z-index:2;filter:brightness(0.58); }
.lceap-acg-stack-cascade .lceap-acg-ci-3 { width:80%;height:80%;bottom:28%;left:10%;z-index:1;filter:brightness(0.42); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-cascade .lceap-acg-ci-1 { transform:translateY(-22px);filter:brightness(0.82); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-cascade .lceap-acg-ci-2 { transform:translateY(-42px);filter:brightness(0.67); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-cascade .lceap-acg-ci-3 { transform:translateY(-60px);filter:brightness(0.52); }

/* ──── SCATTER STACK ─────────────────────────────────────────── */
.lceap-acg-stack-scatter .lceap-acg-ci-0 { width:75%;height:75%;top:12%;left:12%;z-index:4;box-shadow:0 8px 32px rgba(0,0,0,0.45); }
.lceap-acg-stack-scatter .lceap-acg-ci-1 { width:65%;height:65%;top:5%;left:2%;transform:rotate(-12deg);z-index:3;filter:brightness(0.72); }
.lceap-acg-stack-scatter .lceap-acg-ci-2 { width:60%;height:60%;top:22%;right:3%;transform:rotate(15deg);z-index:2;filter:brightness(0.58); }
.lceap-acg-stack-scatter .lceap-acg-ci-3 { width:55%;height:55%;bottom:5%;left:20%;transform:rotate(-6deg);z-index:1;filter:brightness(0.40); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-scatter .lceap-acg-ci-1 { transform:rotate(-24deg) translate(-10px,-8px);filter:brightness(0.8); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-scatter .lceap-acg-ci-2 { transform:rotate(28deg) translate(10px,4px);filter:brightness(0.7); }
.lceap-acg-slide.lceap-acg-active .lceap-acg-stack-scatter .lceap-acg-ci-3 { transform:rotate(-14deg) translate(-4px,10px);filter:brightness(0.55); }

/* ──── FLAT GRID ─────────────────────────────────────────────── */
.lceap-acg-stack-flat { display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:6px;box-sizing:border-box; }
.lceap-acg-stack-flat .lceap-acg-cover-img { position:relative;width:100%;height:auto;aspect-ratio:1;border-radius:6px;transform:none !important; }
.lceap-acg-stack-flat .lceap-acg-ci-0 { z-index:4;box-shadow:none; }
.lceap-acg-stack-flat .lceap-acg-ci-1,
.lceap-acg-stack-flat .lceap-acg-ci-2,

.lceap-acg-stack-flat .lceap-acg-ci-3 { grid-column:1/-1;aspect-ratio:2/1; }

/* Empty cover */
.lceap-acg-cover-empty {
  width:100%;height:100%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  color:var(--acg-text-muted);
  font-size:12px;
}

/* ── Slide Label ─────────────────────────────────────────────── */
.lceap-acg-slide-label {
  padding: 10px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(0,0,0,0.18);
}
.lceap-acg-slide-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--acg-label-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.lceap-acg-slide-count {
  font-size: 11px;
  color: var(--acg-count-color);
  background: var(--acg-count-bg);
  padding: 2px 6px;
  border-radius: 8px;
  flex-shrink: 0;
  font-weight: 600;
}

/* ── Info Panel ──────────────────────────────────────────────── */
.lceap-acg-info-panel {
  margin: 48px auto 0;
  max-width: 760px;
  padding: 0 24px;
  text-align: center;
}
.lceap-acg-info-inner {
  background: var(--acg-info-bg);
  border: 1px solid var(--acg-info-border);
  border-radius: 20px;
  padding: 36px 40px 32px;
  position: relative;
  overflow: hidden;
}
.lceap-acg-info-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--acg-accent, #f5c842);
  transition: background 0.4s;
}
.lceap-acg-info-text { margin-bottom: 24px; }
.lceap-acg-album-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--acg-text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  /* opacity/transform controlled entirely by JS to avoid CSS animation conflict */
  will-change: opacity, transform;
}
.lceap-acg-album-sub {
  display: block;
  font-size: 13px;
  color: var(--acg-text-sec);
  margin-bottom: 12px;
  will-change: opacity, transform;
}
.lceap-acg-album-desc {
  font-size: 14px;
  color: var(--acg-text-sec);
  line-height: 1.75;
  margin: 0;
  max-width: 560px;
  margin-inline: auto;
  will-change: opacity, transform;
}

.lceap-acg-info-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.lceap-acg-photo-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--acg-text-muted);
  background: var(--acg-count-bg);
  padding: 5px 14px;
  border-radius: 20px;
}
.lceap-acg-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: var(--acg-accent, #f5c842);
  color: #1a1a2e;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: filter 0.2s, transform 0.2s;
}
.lceap-acg-view-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

/* ── Dot Indicators ──────────────────────────────────────────── */
.lceap-acg-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding-bottom: 4px;
}
.lceap-acg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--acg-dot-color);
  cursor: pointer;
  transition: background 0.3s, width 0.3s, border-radius 0.3s;
  padding: 0;
}
.lceap-acg-dot.lceap-acg-dot-active {
  background: var(--acg-dot-active);
  width: 24px;
  border-radius: 4px;
}

/* ── Lightbox ────────────────────────────────────────────────── */
.lceap-acg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}
.lceap-acg-lightbox.acg-lb-open { display: flex; }
.lceap-acg-lb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(8px);
}
.lceap-acg-lb-dialog {
  position: relative;
  background: var(--acg-lb-bg);
  width: 100%;
  max-width: 1100px;
  border-radius: 0 0 20px 20px;
  margin: 0 auto;
  z-index: 1;
  max-height: 95vh;
  overflow-y: auto;
  animation: acg-lb-in 0.38s cubic-bezier(0.4,0,0.2,1);
}
@keyframes acg-lb-in {
  from { opacity:0; transform:translateY(-22px); }
  to   { opacity:1; transform:translateY(0); }
}
.lceap-acg-lb-header {
  position: sticky;
  top: 0;
  background: var(--acg-lb-header-bg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 10;
}
.lceap-acg-lb-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--acg-lb-text);
  margin: 0;
}
.lceap-acg-lb-date {
  font-size: 12px;
  color: var(--acg-lb-date);
  display: block;
  margin-top: 3px;
}
.lceap-acg-lb-close {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.07);
  border: none; border-radius: 50%;
  color: var(--acg-lb-text);
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.lceap-acg-lb-close:hover { background: var(--acg-accent, #f5c842); color: #1a1a2e; }

/* Grid */
.lceap-acg-lb-grid {
  display: grid;
  gap: 10px;
  padding: 20px;
}
.lceap-acg-lb-cols-2 { grid-template-columns: repeat(2,1fr); }
.lceap-acg-lb-cols-3 { grid-template-columns: repeat(3,1fr); }
.lceap-acg-lb-cols-4 { grid-template-columns: repeat(4,1fr); }

.lceap-acg-lb-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: rgba(128,128,128,0.08);
}
.lceap-acg-lb-item img {
  width:100%; height:auto; display:block;
  transition: transform 0.4s ease;
}
.lceap-acg-lb-item:hover img { transform: scale(1.04); }

/* ── Image Description styles (same pattern as Outreach) ───── */
.lceap-acg-img-caption { display:none; padding:8px 12px; background:rgba(0,0,0,0.75); }
.lceap-acg-img-caption-title { display:block; font-size:12px; font-weight:700; color:#fff; margin-bottom:2px; }
.lceap-acg-img-caption-text  { display:block; font-size:11px; color:rgba(255,255,255,0.78); line-height:1.5; }
.lceap-acg-lb-item.lceap-desc-hover-reveal .lceap-acg-img-caption {
  display:block; position:absolute; bottom:0; left:0; right:0;
  transform:translateY(100%); transition:transform 0.32s ease;
  border-radius:0 0 10px 10px; backdrop-filter:blur(6px);
}
.lceap-acg-lb-item.lceap-desc-hover-reveal:hover .lceap-acg-img-caption { transform:translateY(0); }
.lceap-acg-lb-item.lceap-desc-caption-bar .lceap-acg-img-caption { display:block; border-radius:0 0 10px 10px; }
.lceap-acg-lb-item.lceap-desc-tooltip { position:relative; }
.lceap-acg-lb-item.lceap-desc-tooltip .lceap-acg-img-tooltip {
  position:absolute; bottom:calc(100%+6px); left:50%;
  transform:translateX(-50%) translateY(4px);
  background:rgba(0,0,0,0.85); color:#fff; font-size:11px;
  padding:6px 10px; border-radius:6px; white-space:nowrap;
  max-width:180px; overflow:hidden; text-overflow:ellipsis;
  pointer-events:none; opacity:0; transition:opacity 0.2s,transform 0.2s; z-index:5;
}
.lceap-acg-lb-item.lceap-desc-tooltip:hover .lceap-acg-img-tooltip {
  opacity:1; transform:translateX(-50%) translateY(0);
}

/* ── Full viewer ─────────────────────────────────────────────── */
.lceap-acg-viewer {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 0;
}
.lceap-acg-viewer-fig {
  display: flex; flex-direction: column; align-items: center;
  max-width: 90vw; margin: 0;
}
.lceap-acg-viewer-img {
  max-width: 90vw; max-height: 75vh;
  border-radius: 8px; object-fit: contain; display: block;
}
.lceap-acg-viewer-caption {
  width:100%; max-width:90vw; padding:12px 20px;
  background:rgba(0,0,0,0.65); border-radius:0 0 8px 8px;
  display:flex; flex-direction:column; gap:3px;
  backdrop-filter:blur(8px);
}
.lceap-acg-viewer-cap-title { font-size:13px; font-weight:700; color:#fff; }
.lceap-acg-viewer-cap-text  { font-size:12px; color:rgba(255,255,255,0.75); line-height:1.5; }
.lceap-acg-viewer-close {
  /* position:absolute within full-screen viewer — avoids z-index stacking bug */
  position:absolute; top:20px; right:20px;
  background:rgba(255,255,255,0.10); border:none; color:#fff;
  width:44px; height:44px; border-radius:50%; font-size:20px;
  cursor:pointer; transition:background 0.2s;
  display:flex; align-items:center; justify-content:center; z-index:10;
}
.lceap-acg-viewer-close:hover { background:rgba(255,255,255,0.2); }
/* FIXED: changed position:fixed → position:absolute.
   position:fixed inside a stacking-context ancestor (the viewer z-index:1000001)
   caused buttons to render BEHIND the viewer background — unclickable and invisible. */
.lceap-acg-viewer-prev, .lceap-acg-viewer-next {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,0.10); border:none; color:#fff;
  width:52px; height:52px; border-radius:50%; font-size:22px;
  cursor:pointer; transition:background 0.2s, transform 0.2s;
  display:flex; align-items:center; justify-content:center; z-index:10;
}
.lceap-acg-viewer-prev { left:24px; }
.lceap-acg-viewer-next { right:24px; }
.lceap-acg-viewer-prev:hover, .lceap-acg-viewer-next:hover {
  background: var(--acg-accent, #f5c842);
  color: #1a1a2e;
  transform: translateY(-50%) scale(1.08);
}
.lceap-acg-viewer-counter {
  position:absolute; bottom:24px; left:50%; transform:translateX(-50%);
  color:rgba(255,255,255,0.45); font-size:13px;
}

/* ── Responsive ─────────────────────────────────────────────── */
/* ── Slides-per-view breakpoints ──────────────────────────────────
   Desktop 3 (default on .lceap-acg-track-wrap) · Tablet 2 · Mobile 1.
   Only the per-view variable changes; slide widths derive from it, so
   there is never an overlap, a partial slide, or a width:auto surprise. */
@media (max-width: 1024px) {
  .lceap-acg-track-wrap { --acg-per-view: 2; }   /* Tablet: 2 albums */
  .lceap-acg-info-inner { padding: 28px 24px; }
  .lceap-acg-lb-cols-4  { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .lceap-acg-track-wrap { --acg-per-view: 1; }   /* Mobile: 1 album, full width */
  .lceap-acg-track { min-height: 300px; }
  .lceap-acg-arrow { width: 40px; height: 40px; }
  .lceap-acg-arrow-prev { left: 6px; }
  .lceap-acg-arrow-next { right: 6px; }
  .lceap-acg-info-inner { padding: 24px 18px; }
  .lceap-acg-lb-grid { padding: 12px; gap: 7px; }
  .lceap-acg-lb-cols-3, .lceap-acg-lb-cols-4 { grid-template-columns: repeat(2,1fr); }
  .lceap-acg-viewer-prev { left: 8px; }
  .lceap-acg-viewer-next { right: 8px; }
  .lceap-acg-viewer-img { max-height: 58vh; }
}
@media (max-width: 420px) {
  .lceap-acg-lb-cols-2,.lceap-acg-lb-cols-3,.lceap-acg-lb-cols-4 { grid-template-columns: repeat(2,1fr); }
}

/* ================================================================
   BODY-LEVEL ACG LIGHTBOX
   Appended to <body> at runtime so position:fixed is never broken
   ================================================================ */

#lceap-acg-body-lb {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none; /* JS sets display:flex when opening */
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}
#lceap-acg-body-lb[data-theme="dark"] {
  --acg-lb-bg:         #17192a;
  --acg-lb-header-bg:  #1c1f32;
  --acg-lb-text:       #ffffff;
  --acg-lb-date:       rgba(255,255,255,0.45);
  --acg-lb-close-bg:   rgba(255,255,255,0.07);
  --acg-lb-close-text: #ffffff;
  --acg-divider:       rgba(255,255,255,0.06);
  --acg-accent:        #f5c842;
}
#lceap-acg-body-lb[data-theme="light"] {
  --acg-lb-bg:         #ffffff;
  --acg-lb-header-bg:  #f8f9fd;
  --acg-lb-text:       #1a1a2e;
  --acg-lb-date:       #6b7280;
  --acg-lb-close-bg:   rgba(0,0,0,0.06);
  --acg-lb-close-text: #1a1a2e;
  --acg-divider:       rgba(0,0,0,0.07);
  --acg-accent:        #f5c842;
}

#lceap-acg-body-lb .lceap-acg-lb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#lceap-acg-body-lb .lceap-acg-lb-dialog {
  position: relative;
  background: var(--acg-lb-bg, #17192a);
  width: 100%;
  max-width: 1100px;
  border-radius: 0 0 20px 20px;
  margin: 0 auto;
  z-index: 1;
  max-height: 95vh;
  overflow-y: auto;
  animation: acg-lb-in 0.38s cubic-bezier(0.4,0,0.2,1);
}
#lceap-acg-body-lb .lceap-acg-lb-header {
  position: sticky; top: 0;
  background: var(--acg-lb-header-bg, #1c1f32);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--acg-divider, rgba(255,255,255,0.06));
  z-index: 10;
}
#lceap-acg-body-lb .lceap-acg-lb-title {
  font-size: 1.2rem; font-weight: 800;
  color: var(--acg-lb-text, #fff); margin: 0; font-family: inherit;
}
#lceap-acg-body-lb .lceap-acg-lb-date {
  font-size: 12px; color: var(--acg-lb-date, rgba(255,255,255,0.45));
  display: block; margin-top: 3px;
}
#lceap-acg-body-lb .lceap-acg-lb-close {
  width: 38px; height: 38px;
  background: var(--acg-lb-close-bg, rgba(255,255,255,0.07));
  border: none; border-radius: 50%;
  color: var(--acg-lb-close-text, #fff);
  font-size: 17px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
#lceap-acg-body-lb .lceap-acg-lb-close:hover {
  background: var(--acg-accent, #f5c842);
  color: #1a1a2e;
}
#lceap-acg-body-lb .lceap-acg-lb-grid {
  display: grid; gap: 10px; padding: 20px;
}
#lceap-acg-body-lb .lceap-acg-lb-cols-2 { grid-template-columns: repeat(2,1fr); }
#lceap-acg-body-lb .lceap-acg-lb-cols-3 { grid-template-columns: repeat(3,1fr); }
#lceap-acg-body-lb .lceap-acg-lb-cols-4 { grid-template-columns: repeat(4,1fr); }
#lceap-acg-body-lb .lceap-acg-lb-item {
  border-radius: 10px; overflow: hidden; cursor: pointer;
  position: relative; background: rgba(128,128,128,0.1); display: block;
}
#lceap-acg-body-lb .lceap-acg-lb-item img {
  width:100%; height:auto; display:block; transition:transform 0.35s ease;
}
#lceap-acg-body-lb .lceap-acg-lb-item:hover img { transform: scale(1.04); }

/* Description styles */
#lceap-acg-body-lb .lceap-acg-img-caption { display:none; padding:8px 12px; background:rgba(0,0,0,0.75); }
#lceap-acg-body-lb .lceap-acg-img-caption-title { display:block; font-size:12px; font-weight:700; color:#fff; margin-bottom:2px; }
#lceap-acg-body-lb .lceap-acg-img-caption-text  { display:block; font-size:11px; color:rgba(255,255,255,0.78); line-height:1.5; }
#lceap-acg-body-lb .lceap-acg-lb-item.lceap-desc-caption-bar .lceap-acg-img-caption { display:block; border-radius:0 0 10px 10px; }
#lceap-acg-body-lb .lceap-acg-lb-item.lceap-desc-hover-reveal .lceap-acg-img-caption {
  display:block; position:absolute; bottom:0; left:0; right:0;
  transform:translateY(100%); transition:transform 0.32s ease;
  border-radius:0 0 10px 10px; backdrop-filter:blur(6px);
}
#lceap-acg-body-lb .lceap-acg-lb-item.lceap-desc-hover-reveal:hover .lceap-acg-img-caption { transform:translateY(0); }
#lceap-acg-body-lb .lceap-acg-lb-item.lceap-desc-tooltip .lceap-og-img-tooltip,
#lceap-acg-body-lb .lceap-acg-lb-item.lceap-desc-tooltip .lceap-acg-img-tooltip {
  position:absolute; bottom:calc(100% + 6px); left:50%;
  transform:translateX(-50%) translateY(4px);
  background:rgba(0,0,0,0.85); color:#fff; font-size:11px;
  padding:6px 10px; border-radius:6px; white-space:nowrap;
  pointer-events:none; opacity:0; transition:opacity 0.2s,transform 0.2s; z-index:5;
}
#lceap-acg-body-lb .lceap-acg-lb-item.lceap-desc-tooltip:hover .lceap-acg-img-tooltip {
  opacity:1; transform:translateX(-50%) translateY(0);
}

/* Full viewer */
#lceap-acg-body-lb .lceap-acg-viewer {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 2;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
#lceap-acg-body-lb .lceap-acg-viewer-fig {
  display:flex; flex-direction:column; align-items:center; max-width:90vw; margin:0;
}
#lceap-acg-body-lb .lceap-acg-viewer-img {
  max-width:90vw; max-height:75vh; border-radius:8px; object-fit:contain; display:block;
}
#lceap-acg-body-lb .lceap-acg-viewer-caption {
  width:100%; max-width:90vw; padding:12px 20px;
  background:rgba(0,0,0,0.65); border-radius:0 0 8px 8px;
  display:flex; flex-direction:column; gap:3px; backdrop-filter:blur(8px);
}
#lceap-acg-body-lb .lceap-acg-viewer-cap-title { font-size:13px; font-weight:700; color:#fff; }
#lceap-acg-body-lb .lceap-acg-viewer-cap-text  { font-size:12px; color:rgba(255,255,255,0.75); line-height:1.5; }
#lceap-acg-body-lb .lceap-acg-viewer-close {
  /* position:absolute — viewer is already full-screen fixed, absolute is safer */
  position:absolute; top:20px; right:20px;
  background:rgba(255,255,255,0.10); border:none; color:#fff;
  width:44px; height:44px; border-radius:50%; font-size:20px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background 0.2s; z-index:10;
}
#lceap-acg-body-lb .lceap-acg-viewer-close:hover { background:var(--acg-accent,#f5c842); color:#1a1a2e; }
/* FIXED: position:fixed → position:absolute.
   position:fixed with z-index:1 placed buttons BEHIND the viewer overlay stacking context
   making them invisible and unclickable. */
#lceap-acg-body-lb .lceap-acg-viewer-prev,
#lceap-acg-body-lb .lceap-acg-viewer-next {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,0.10); border:none; color:#fff;
  width:52px; height:52px; border-radius:50%; font-size:22px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background 0.2s,transform 0.2s; z-index:10;
}
#lceap-acg-body-lb .lceap-acg-viewer-prev { left:24px; }
#lceap-acg-body-lb .lceap-acg-viewer-next { right:24px; }
#lceap-acg-body-lb .lceap-acg-viewer-prev:hover,
#lceap-acg-body-lb .lceap-acg-viewer-next:hover {
  background:var(--acg-accent,#f5c842); color:#1a1a2e;
  transform:translateY(-50%) scale(1.08);
}
#lceap-acg-body-lb .lceap-acg-viewer-counter {
  position:absolute; bottom:24px; left:50%; transform:translateX(-50%);
  color:rgba(255,255,255,0.50); font-size:13px;
}

@media (max-width:620px) {
  #lceap-acg-body-lb .lceap-acg-lb-cols-3,
  #lceap-acg-body-lb .lceap-acg-lb-cols-4 { grid-template-columns: repeat(2,1fr); }
  #lceap-acg-body-lb .lceap-acg-lb-header { flex-direction:column; align-items:flex-start; }
  #lceap-acg-body-lb .lceap-acg-viewer-prev { left:8px; }
  #lceap-acg-body-lb .lceap-acg-viewer-next { right:8px; }
  #lceap-acg-body-lb .lceap-acg-viewer-img { max-height:60vh; }
}

/* Accessibility: focus-visible for interactive elements */
.lceap-acg-dot:focus-visible, .lceap-acg-prev:focus-visible, .lceap-acg-next:focus-visible {
  outline: 2px solid var(--lceap-primary, #e94560);
  outline-offset: 3px;
}

/* ── Focus-visible accessibility ─────────────────────────────────── */
.lceap-acg-lb-close:focus-visible,
.lceap-acg-viewer-close:focus-visible,
.lceap-acg-viewer-prev:focus-visible,
.lceap-acg-viewer-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.lceap-acg-lb-item:focus-visible {
  outline: 2px solid var(--acg-accent, #e94560);
  outline-offset: 2px;
}
/* Viewer loading/error states */
.lceap-acg-viewer-loading .lceap-acg-viewer-img { opacity: 0 !important; }
.lceap-acg-viewer-error   .lceap-acg-viewer-fig::after {
  content: 'Image unavailable';
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-size: 14px;
  min-height: 120px;
}

/* ── External JSON gallery — loading / error status ──────────────── */
.lceap-acg-ext-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  padding: 40px;
  text-align: center;
  border-radius: 16px;
  background: rgba(127, 127, 127, 0.06);
  color: var(--acg-status-color, #6b7280);
  font-size: 15px;
  font-weight: 500;
}
.lceap-acg-ext-status.lceap-acg-status-error {
  background: rgba(245, 200, 66, 0.10);
  color: #b45309;
}
.lceap-acg-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(127, 127, 127, 0.25);
  border-top-color: var(--acg-accent, #f5c842);
  border-radius: 50%;
  animation: lceap-acg-spin 0.75s linear infinite;
  flex: 0 0 auto;
}
@keyframes lceap-acg-spin { to { transform: rotate(360deg); } }
