.gallery-only-page {
  min-height: 100vh;
  background: var(--base);
  color: var(--t-medium);
  overflow-x: hidden;
}

.gallery-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.gallery-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  backdrop-filter: blur(14px);
}

.gallery-page-wrap {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 5rem 0 8rem;
}

.gallery-hero {
  margin-bottom: 4rem;
}

.gallery-hero h1 {
  max-width: 980px;
}

.gallery-hero__text {
  max-width: 760px;
  margin-top: 2rem;
  line-height: 1.8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.gallery-card {
  position: relative;
  margin: 0;
}

.gallery-card__button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--_radius-xl);
  background: var(--base-tint);
  cursor: pointer;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.10);
}

.gallery-card__button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform .45s var(--_animbezier), filter .45s ease;
}

.gallery-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.44));
  opacity: .7;
  pointer-events: none;
}

.gallery-card figcaption {
  position: absolute;
  right: 1.6rem;
  bottom: 1.6rem;
  max-width: calc(100% - 3.2rem);
  padding: .8rem 1.4rem;
  border-radius: var(--_radius-s);
  background: rgba(0,0,0,.48);
  color: #fff;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.gallery-card__button:hover img {
  transform: scale(1);
}

.gallery-empty {
  padding: 4rem;
  border: 1px solid var(--stroke-elements);
  border-radius: var(--_radius-xl);
  background: var(--base-tint);
  text-align: center;
  font-size: 2rem;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 6rem;
  background: rgba(0,0,0,.88);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 2rem;
  box-shadow: 0 30px 120px rgba(0,0,0,.55);
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.gallery-lightbox__close {
  top: 2rem;
  left: 2rem;
  width: 5rem;
  height: 5rem;
  font-size: 4rem;
  line-height: 1;
}

.gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 5.4rem;
  height: 5.4rem;
  font-size: 5rem;
  line-height: 1;
}

.gallery-lightbox__prev { right: 2rem; }
.gallery-lightbox__next { left: 2rem; }

.gallery-lightbox__caption {
  position: absolute;
  right: 50%;
  bottom: 2rem;
  transform: translateX(50%);
  max-width: min(700px, calc(100% - 4rem));
  padding: 1rem 1.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.6rem;
  text-align: center;
  backdrop-filter: blur(12px);
}

@media only screen and (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 2.6rem; }
  .gallery-page-wrap { width: min(1280px, calc(100% - 8rem)); padding-top: 7rem; }
  .gallery-topbar { width: min(1280px, calc(100% - 8rem)); padding: 2.4rem 0; }
}

@media only screen and (min-width: 1200px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}

@media only screen and (max-width: 575px) {
  .gallery-topbar { align-items: stretch; flex-direction: column; }
  .gallery-topbar .btn { width: 100%; }
  .gallery-lightbox__nav { top: auto; bottom: 8rem; transform: none; }
  .gallery-lightbox img { max-height: 68vh; }
}
