.pma-s26-gallery {
  --pma-s26-green: #21483b;
  --pma-s26-gold: #c9a45d;
  --pma-s26-ink: #15231e;
  width: 100%;
}

.pma-s26-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.8vw, 1.25rem);
  align-items: start;
}

.pma-s26-item {
  min-width: 0;
  margin: 0;
}

.pma-s26-open {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pma-s26-green) 24%, transparent);
  border-radius: 12px;
  background: #f2eee5;
  box-shadow: 0 8px 24px rgba(21, 35, 30, 0.1);
  cursor: zoom-in;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.pma-s26-open:hover {
  transform: translateY(-2px);
  border-color: var(--pma-s26-gold);
  box-shadow: 0 12px 30px rgba(21, 35, 30, 0.16);
}

.pma-s26-open:focus-visible,
.pma-s26-lightbox button:focus-visible,
.pma-s26-download:focus-visible {
  outline: 3px solid var(--pma-s26-gold);
  outline-offset: 3px;
}

.pma-s26-open img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.pma-s26-empty-gallery {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px dashed rgba(33, 72, 59, 0.35);
  border-radius: 14px;
  background: #f7f3ea;
  color: var(--pma-s26-ink);
  text-align: center;
}

.pma-s26-empty-gallery p { margin: 0; }

.pma-s26-lightbox {
  width: min(1120px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #0f1714;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.pma-s26-lightbox[open] {
  display: flex;
  flex-direction: column;
}

.pma-s26-lightbox::backdrop {
  background: rgba(4, 12, 9, 0.88);
  backdrop-filter: blur(5px);
}

.pma-s26-lightbox-bar,
.pma-s26-lightbox-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

.pma-s26-lightbox-bar { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.pma-s26-lightbox-actions { justify-content: center; border-top: 1px solid rgba(255, 255, 255, 0.14); }

.pma-s26-close,
.pma-s26-prev,
.pma-s26-next {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.pma-s26-lightbox-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 0.5rem;
  min-height: 280px;
  padding: 1rem;
}

.pma-s26-lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 170px);
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
}

.pma-s26-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--pma-s26-gold);
  color: #14211c;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 860px) {
  .pma-s26-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .pma-s26-grid { grid-template-columns: 1fr; }
  .pma-s26-lightbox { width: calc(100vw - 0.75rem); max-height: calc(100vh - 0.75rem); }
  .pma-s26-lightbox-stage { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 0.5rem; }
  .pma-s26-lightbox-stage img { max-height: calc(100vh - 180px); }
}

@media (prefers-reduced-motion: reduce) {
  .pma-s26-open { transition: none; }
}
