.sheet-album {
  position:relative;
  width:100%;
  box-sizing:border-box;
  margin:0 auto;
  --sa-columns:3;
  --sa-radius:0px;
  --sa-popup-max-width:1500px;
  --sa-gap:18px;
}
.sheet-album *,
.sheet-album *::before,
.sheet-album *::after { box-sizing:border-box; }
.sheet-album__grid {
  display:grid;
  grid-template-columns:repeat(var(--sa-columns, 3), minmax(0, 1fr));
  gap:var(--sa-gap);
  align-items:start;
}
.sheet-album--masonry .sheet-album__grid {
  display:block;
  columns:var(--sa-columns, 3);
  column-gap:var(--sa-gap);
}
.sheet-album__figure {
  position:relative;
  margin:0;
  break-inside:avoid;
}
.sheet-album--masonry .sheet-album__figure { margin:0 0 var(--sa-gap); }
.sheet-album__link {
  display:block;
  color:inherit;
  text-decoration:none;
}
.sheet-album__img,
.sheet-album__figure img,
.sheet-album__main img,
.sheet-album__slide img {
  display:block;
  width:100%;
  height:auto;
  border-radius:var(--sa-radius);
}
.sheet-album--classic .sheet-album__img {
  aspect-ratio:4 / 3;
  object-fit:cover;
}
.sheet-album figcaption {
  margin-top:8px;
  font-size:15px;
  line-height:1.35;
}
.sheet-album__thumbs-view {
  display:grid;
  gap:14px;
}
.sheet-album__main {
  overflow:hidden;
  border-radius:var(--sa-radius);
}
.sheet-album__main img {
  max-height:72vh;
  object-fit:contain;
  background:#111;
}
.sheet-album__thumbs {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(92px,1fr));
  gap:10px;
}
.sheet-album__thumb {
  display:block;
  border:0;
  border-radius:var(--sa-radius);
  padding:0;
  background:transparent;
  opacity:.62;
  cursor:pointer;
  overflow:hidden;
}
.sheet-album__thumb.is-active,
.sheet-album__thumb:hover { opacity:1; }
.sheet-album__thumb img {
  display:block;
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
}
.sheet-album__slider {
  position:relative;
  overflow:hidden;
  min-height:280px;
  border-radius:var(--sa-radius);
  background:#111;
}
.sheet-album__slide {
  position:absolute;
  inset:0;
  margin:0;
  opacity:0;
  pointer-events:none;
  transition:opacity 520ms ease;
}
.sheet-album__slide.is-active {
  position:relative;
  opacity:1;
  pointer-events:auto;
}
.sheet-album--slide .sheet-album__slide {
  transform:translateX(100%);
  opacity:1;
  transition:transform 520ms ease;
}
.sheet-album--slide .sheet-album__slide.is-active {
  transform:translateX(0);
}
.sheet-album__slide img {
  width:100%;
  max-height:78vh;
  object-fit:cover;
}
.sheet-album__slide figcaption {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  margin:0;
  padding:14px 18px;
  color:#fff;
  background:linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0));
}
.sheet-album__nav {
  position:absolute;
  top:50%;
  z-index:3;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.86);
  color:#1f1f1f;
  font-size:32px;
  line-height:1;
  transform:translateY(-50%);
  cursor:pointer;
}
.sheet-album__nav:hover { opacity:.82; }
.sheet-album__nav--prev { left:14px; }
.sheet-album__nav--next { right:14px; }
.sheet-album-lightbox {
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(0,0,0,.86);
}
.sheet-album-lightbox img {
  display:block;
  max-width:min(100%, var(--sa-popup-max-width, 1500px));
  max-height:calc(100vh - 90px);
  object-fit:contain;
}
.sheet-album-lightbox__frame {
  display:grid;
  justify-items:center;
}
.sheet-album-lightbox__caption {
  margin-top:12px;
  color:#fff;
  text-align:center;
}
.sheet-album-lightbox__close {
  position:absolute;
  top:14px;
  right:14px;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:#fff;
  color:#111;
  font-size:26px;
  cursor:pointer;
}
.sheet-album-lightbox__nav {
  position:absolute;
  top:50%;
  z-index:2;
  width:48px;
  height:48px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.88);
  color:#111;
  font-size:36px;
  line-height:1;
  transform:translateY(-50%);
  cursor:pointer;
}
.sheet-album-lightbox__nav:hover,
.sheet-album-lightbox__close:hover { opacity:.8; }
.sheet-album-lightbox__nav--prev { left:18px; }
.sheet-album-lightbox__nav--next { right:18px; }
@media (max-width:760px) {
  .sheet-album { --sa-gap:12px; }
  .sheet-album__grid,
  .sheet-album--masonry .sheet-album__grid {
    display:grid;
    grid-template-columns:1fr;
    columns:auto;
  }
  .sheet-album__thumbs { grid-template-columns:repeat(auto-fill,minmax(70px,1fr)); }
  .sheet-album__nav {
    width:36px;
    height:36px;
    font-size:28px;
  }
  .sheet-album-lightbox { padding:18px 62px; }
  .sheet-album-lightbox__nav {
    width:38px;
    height:38px;
    font-size:30px;
  }
  .sheet-album-lightbox__nav--prev { left:10px; }
  .sheet-album-lightbox__nav--next { right:10px; }
}
