#tourGalleryDialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 12px 24px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border: 0;
    box-sizing: border-box;
    overflow: hidden;
    color: #fff;
    background: rgba(15, 18, 20, .97);
}

#tourGalleryDialog[open] {
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr) 44px;
    gap: 12px;
}

#tourGalleryDialog::backdrop { background: #0f1214; }

#tourGalleryDialog .tour-gallery-toolbar {
    display: flex;
    justify-content: flex-end;
}

#tourGalleryDialog .tour-gallery-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

#tourGalleryDialog #tourGalleryImage {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0;
}

#tourGalleryDialog .tour-gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

#tourGalleryDialog button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: 22px/1 Arial, sans-serif;
    cursor: pointer;
    box-shadow: none;
}

#tourGalleryDialog button:hover { background: rgba(255, 255, 255, .2); }
#tourGalleryDialog button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#tourGalleryDialog button:disabled { opacity: .35; cursor: default; }
#tourGalleryDialog [data-gallery-close] { font-size: 30px; }
#tourGalleryDialog [data-gallery-counter] { min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }

#galleryMobile .tour-gallery-mobile-open {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
}

html.tour-gallery-open { overflow: hidden; }

@media (max-width: 600px) {
    #tourGalleryDialog { padding-left: 12px; padding-right: 12px; }
}
