.iapp-gallery { margin: 2.5rem 0; }
.iapp-gallery__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.iapp-gallery .iapp-gallery__item { margin: 0; min-width: 0; }
.iapp-gallery__link { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; border: 1px solid #d8dfd9; border-radius: 5px; background: #f7f8f6; }
.iapp-gallery .iapp-gallery__link img { display: block; width: 100%; height: 100%; object-fit: contain; margin: 0; }
.iapp-gallery .iapp-gallery__item figcaption { margin-top: 8px; font-size: .84rem; line-height: 1.45; color: #3f4a43; overflow-wrap: anywhere; }
.iapp-gallery__zoom { position: absolute; bottom: 6px; right: 6px; padding: 3px 7px; border-radius: 3px; background: #203c30; color: #fff; font-size: .7rem; }
.iapp-gallery__link:focus-visible, .iapp-lightbox button:focus-visible { outline: 3px solid #be8a45; outline-offset: 3px; }
.iapp-gallery__hint, .iapp-gallery__credit { font-size: .9rem; line-height: 1.5; }
.iapp-lightbox { box-sizing: border-box; width: min(1100px,calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 14px; border: 0; border-radius: 8px; color: #f6f7f5; background: #17221c; overflow: auto; }
.iapp-lightbox::backdrop { background: rgb(0 0 0 / .86); }
.iapp-lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.iapp-lightbox__count { font-size: .9rem; }
.iapp-lightbox button { min-width: 44px; min-height: 44px; border: 1px solid #849889; border-radius: 4px; padding: 8px 12px; color: #fff; background: #264a38; font: inherit; cursor: pointer; }
.iapp-lightbox button:disabled { opacity: .45; cursor: default; }
.iapp-lightbox__stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 180px; background: #101913; touch-action: pan-y pinch-zoom; }
.iapp-lightbox__image { display: block; max-width: 100%; max-height: calc(100dvh - 260px); width: auto; height: auto; object-fit: contain; margin: 0 auto; }
.iapp-lightbox__navigation { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.iapp-lightbox__caption { margin: 12px 0 6px; font-size: .95rem; line-height: 1.45; }
.iapp-lightbox__credit { margin: 0; font-size: .8rem; line-height: 1.45; color: #d6e0d7; }
.iapp-lightbox__error { position: absolute; padding: 12px; background: #17221c; text-align: center; }
html.iapp-lightbox-open { overflow: hidden; }
@media (max-width: 600px) {
  .iapp-gallery__grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .iapp-lightbox { padding: 10px; }
  .iapp-lightbox__image { max-height: calc(100dvh - 285px); }
  .iapp-lightbox__caption { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) { .iapp-gallery a, .iapp-lightbox button { transition: none; } }
