.dmd-gallery-dialog { position: fixed; inset: 0; width: min(1200px, 96vw); max-width: 96vw; height: 92vh; height: 92dvh; max-height: 92dvh; margin: auto; padding: 0; border: 0; border-radius: 16px; background: #10241f; color: #fff; box-sizing: border-box; }
.dmd-gallery-dialog::backdrop { background: rgba(6, 18, 14, .88); }
.dmd-gallery-dialog[open] { display: flex; flex-direction: column; }
.dmd-gallery-dialog__bar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; padding: 12px 16px; }
.dmd-gallery-dialog button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #60776e; border-radius: 50%; background: #203c32; color: #fff; font-size: 24px; cursor: pointer; }
.dmd-gallery-dialog button[hidden] { display: none; }
.dmd-gallery-dialog button:hover { background: #375e4e; }
.dmd-gallery-dialog button:focus-visible { outline: 3px solid #a7eed3; outline-offset: 3px; }
.dmd-gallery-dialog__stage { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 1; min-height: 0; padding: 0 16px 16px; }
.dmd-gallery-dialog__stage img { flex: 1; min-width: 0; width: 0; height: 100%; object-fit: contain; }
@media (max-width: 600px) {
  .dmd-gallery-dialog__stage { position: relative; padding: 0 8px 72px; gap: 0; }
  .dmd-gallery-dialog__stage button { position: absolute; bottom: 14px; }
  .dmd-gallery-dialog__stage [data-prev] { left: calc(50% - 56px); }
  .dmd-gallery-dialog__stage [data-next] { right: calc(50% - 56px); }
}
