.gallery-explorer {
    --gex-route-hover: var(--gallery-route-hover-color, #c2410c);
    --gex-route-outline: var(--gallery-route-outline-color, #fff);
    --gex-accent: var(--brand-primary-color, currentColor);
    --gex-selected: var(--brand-secondary-color, var(--gex-accent));
    --gex-on-accent: var(--button-text-color, #fff);
    --gex-control-bg: var(--button-bg-color, var(--gex-accent));
    --gex-control-hover: var(--button-hover-bg-color, var(--gex-selected));
    --gex-control-hover-ink: var(--button-hover-text-color, var(--gex-on-accent));
    --gex-ink: var(--brand-text-primary-color, #222);
    --gex-paper: var(--brand-bg-header, var(--brand-bg-primary, #fff));
    --gex-border: color-mix(in srgb, var(--gex-ink) 18%, var(--gex-paper));
    color: var(--gex-ink);
    background: var(--gex-paper);
    font-family: var(--brand-font-family, sans-serif);
    padding: var(--theme-content-box-padding, 20px);
    font-size: var(--theme-font-size, 15px);
    width: 100%;
    max-width: 1800px;
    margin: auto;
}
.gallery-explorer h1, .gallery-explorer h2, .gallery-explorer h3 { color: var(--theme-heading-color, var(--gex-ink)); font-family: inherit; }
.gallery-explorer [hidden] { display: none !important; }
.gallery-explorer :where(button, input, select, summary):not(.gm-style *) {
    font: inherit;
    color: inherit;
    border: 1px solid var(--gex-border);
    background: var(--gex-paper);
    border-radius: var(--brand-radius, 6px);
    min-height: 44px;
    padding: 9px 13px;
}
.gallery-explorer button, .gallery-explorer summary { cursor: pointer; }
.gallery-explorer button:not(.gm-style *):hover { background: color-mix(in srgb, var(--gex-accent) 9%, var(--gex-paper)); }
.gallery-explorer button:disabled { opacity: .55; cursor: default; }
.gallery-explorer :focus-visible { outline: 3px solid var(--gex-accent); outline-offset: 3px; }
.gallery-explorer a { color: var(--brand-link-primary-color, var(--gex-accent)); }
.gallery-explorer__header { background: transparent; display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 16px; }
.gallery-explorer__header h1 { margin: 0 0 5px; font-size: var(--theme-heading-h1-size, 28px); }
.gallery-explorer__header p { margin: 0; }
.gallery-explorer__toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; float: right; position: relative; z-index: 6; margin-left: 8px; }
.gallery-explorer__search { flex: 1; margin: 0; }
.gallery-explorer__search input { width: 100%; }
.gallery-explorer__filters > div { position: absolute; right: 0; top: 100%; display: grid; gap: 12px; padding: 20px; background: var(--gex-paper); border: 1px solid var(--gex-border); box-shadow: 0 6px 24px color-mix(in srgb, var(--gex-ink) 14%, transparent); width: min(340px, calc(100vw - 32px)); }
.gallery-explorer__filters label { display: grid; gap: 4px; }
.gallery-explorer__location { position: absolute; bottom: 20px; left: 12px; right: 70px; z-index: 4; display: flex; gap: 6px; align-items: center; width: fit-content; max-width: calc(100% - 82px); padding: 5px; background: var(--gex-paper); border-radius: var(--brand-radius, 6px); box-shadow: 0 2px 8px var(--gex-border); }
.gallery-explorer__location .map-location-panel { left: 0; right: auto; top: auto; bottom: calc(100% + 8px); width: min(380px, calc(100vw - 48px)); min-width: 0; max-height: 50svh; overflow: auto; }
.gallery-explorer__types { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.gallery-explorer :is(.gallery-explorer__types button, .gallery-explorer__filters > summary, .gallery-explorer__compact, .gallery-explorer__header > button) { min-height: 32px; padding: 5px 10px; font-size: 13px; line-height: 20px; border-radius: var(--brand-radius, 4px); border: 1px solid var(--gex-border); background: var(--gex-paper); color: var(--gex-accent); }
.gallery-explorer :is(.gallery-explorer__types button, .gallery-explorer__compact)[aria-pressed="true"], .gallery-explorer__mobile-switch [aria-pressed="true"] { border-color: var(--gex-control-bg); background: var(--gex-control-bg); color: var(--gex-on-accent); }
.gallery-explorer :is(.gallery-explorer__types button, .gallery-explorer__filters > summary, .gallery-explorer__compact, .gallery-explorer__header > button):is(:hover, :focus-visible, :active) { background: var(--gex-control-hover); color: var(--gex-control-hover-ink); border-color: var(--gex-control-hover); }
.gallery-explorer__route-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 12px; }
.gallery-explorer__route-facts { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.gallery-explorer__route-facts > span { white-space: nowrap; }
.gallery-explorer__route-facts > small { flex-basis: 100%; }
.gallery-explorer__route-facts i { color: var(--gex-accent); }
.gallery-explorer__workspace { position: relative; display: grid; grid-template-columns: minmax(340px, 38%) 1fr; height: min(760px, 72svh); min-height: 500px; border: 1px solid var(--gex-border); border-radius: var(--brand-radius, 8px); overflow: hidden; }
.gallery-explorer__browse { background: var(--gex-paper); overflow: auto; overscroll-behavior: contain; padding: 16px; }
.gallery-explorer__count { margin: 0 0 12px; }
.gallery-explorer__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.gallery-explorer .gallery-explorer__card { display: block; width: 100%; text-align: left; padding: 0; overflow: hidden; color: inherit; text-decoration: none; border: 1px solid var(--gex-border); border-radius: var(--brand-radius, 6px); background: var(--gex-paper); }
.gallery-explorer__card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.gallery-explorer__card-body { padding: 12px; display: grid; gap: 6px; }
.gallery-explorer__card-body strong { font-size: 16px; line-height: 1.3; }
.gallery-explorer__card-body small { font-size: 12px; }
.gallery-explorer__card-body p { margin: 0; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gallery-explorer__card.is-selected { outline: 3px solid var(--gex-accent); outline-offset: -3px; }
.gallery-explorer__map-wrap { position: relative; background: color-mix(in srgb, var(--gex-accent) 8%, var(--gex-paper)); }
.gallery-explorer__map { width: 100%; height: 100%; }
.gallery-explorer__map-message { padding: 24px; position: absolute; top: 20%; left: 0; }

.gallery-explorer__detail { position: absolute; inset: 0 auto 0 0; width: 38%; min-width: 340px; background: var(--gex-paper); display: flex; flex-direction: column; border-right: 1px solid var(--gex-border); z-index: 3; }
.gallery-explorer__detail-tools { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--gex-border); }
.gallery-explorer__detail-tools [data-close-detail] { margin-left: auto; }
.gallery-explorer__detail-tools [data-expand] { display: none; }
.gallery-explorer__detail-body { padding: 20px; overflow: auto; overscroll-behavior: contain; }
.gallery-explorer__detail-body h2 { margin-top: 0; font-size: 24px; line-height: 1.3; }
.gallery-explorer__detail-body h3 { font-size: 18px; margin: 24px 0 12px; }
.gallery-explorer__description { white-space: pre-line; line-height: 1.6; }
.gallery-explorer__actions, .gallery-explorer__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 12px; }
.gallery-explorer__stats > span { padding: 10px; background: color-mix(in srgb, var(--gex-accent) 8%, var(--gex-paper)); border-radius: var(--brand-radius, 4px); }
.gallery-explorer__photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gallery-explorer__photos button { padding: 0; overflow: hidden; }
.gallery-explorer__photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.gallery-explorer__profile { width: 100%; margin-block: 16px; }
.gallery-explorer__profile canvas { display: block; width: 100%; height: 220px; cursor: crosshair; touch-action: pan-y; }
.gallery-explorer__profile [data-profile-value] { min-height: 22px; margin: 4px 0 8px; font-size: 13px; }
.gallery-explorer__loading { display: flex; align-items: center; gap: 8px; color: var(--gex-accent); min-height: 32px; }
.gallery-explorer__related { display: grid; gap: 8px; }
.gallery-explorer__viewer { position: fixed; inset: 0; max-width: none; max-height: none; width: 100%; height: 100dvh; margin: 0; border: 0; padding: 16px; color: var(--gex-ink); background: var(--gex-paper); z-index: 10000; }
.gallery-explorer__viewer[open] { display: flex; flex-direction: column; gap: 12px; }
.gallery-explorer__viewer::backdrop { background: var(--gex-paper); }
.gallery-explorer .gallery-explorer__viewer button { color: var(--gex-on-accent); background: var(--gex-control-bg); border-color: var(--gex-control-bg); }
.gallery-explorer .gallery-explorer__viewer button:is(:hover, :focus-visible, :active) { color: var(--gex-control-hover-ink); background: var(--gex-control-hover); border-color: var(--gex-control-hover); }
.gallery-explorer__viewer-tools { display: flex; justify-content: space-between; }
.gallery-explorer__stage { flex: 1; min-height: 0; display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; }
.gallery-explorer__stage > div { height: 100%; min-height: 0; display: flex; justify-content: center; align-items: center; }
.gallery-explorer__stage img, .gallery-explorer__stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-explorer__viewer [data-photo-caption] { text-align: center; margin: 0; }
.gallery-explorer__thumbnails { display: flex; gap: 8px; overflow: auto; justify-content: safe center; min-height: 64px; }
.gallery-explorer__thumbnails button { flex: 0 0 64px; padding: 0; }
.gallery-explorer__thumbnails img { width: 64px; height: 56px; object-fit: cover; }
.gallery-explorer__mobile-switch { display: none; }
@media (max-width: 900px) {
    .gallery-explorer { padding: 12px; }
    .gallery-explorer__header { align-items: flex-start; }
    .gallery-explorer__header p { display: none; }
    .gallery-explorer__header h1 { font-size: 24px; }
    .gallery-explorer__toolbar { float: none; margin: 0 0 10px; }
    .gallery-explorer__location { right: 12px; max-width: calc(100% - 24px); }
    .gallery-explorer__workspace:has([data-detail]:not([hidden])) .gallery-explorer__location { bottom: calc(60% + 12px); }
    .gallery-explorer__location .map-location-panel { position: fixed; left: 12px; right: 12px; bottom: 12px; width: auto; top: auto; max-height: 65svh; }
    .gallery-explorer__search { min-width: 60%; }
    .gallery-explorer__types button { flex-shrink: 0; }
    .gallery-explorer__mobile-switch { display: flex; gap: 8px; margin-bottom: 10px; }
    .gallery-explorer__workspace { display: block; min-height: 520px; height: 72svh; }
    .gallery-explorer__browse, .gallery-explorer__map-wrap { height: 100%; width: 100%; }
    .gallery-explorer__workspace[data-view-mode="results"] .gallery-explorer__map-wrap { visibility: hidden; position: absolute; inset: 0; pointer-events: none; }
    .gallery-explorer__workspace[data-view-mode="map"] .gallery-explorer__browse { display: none; }
    .gallery-explorer__workspace[data-view-mode="results"] .gallery-explorer__detail { display: none; }
    .gallery-explorer__detail { inset: auto 0 0; width: 100%; min-width: 0; max-height: 60%; border: 1px solid var(--gex-border); border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px color-mix(in srgb, var(--gex-ink) 14%, transparent); }
    .gallery-explorer__detail.is-expanded { max-height: 100%; height: 100%; border-radius: 0; }
    .gallery-explorer__detail-tools [data-expand] { display: block; }
    .gallery-explorer__detail-body { padding: 16px; }
    .gallery-explorer__stage { grid-template-columns: 44px 1fr 44px; gap: 0; }
    .gallery-explorer__viewer { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-explorer * { scroll-behavior: auto !important; }
}

.gallery-explorer .map-location-panel { color: var(--gex-ink); background: var(--gex-paper); border-color: var(--gex-border); border-radius: var(--brand-radius, 8px); }
.gallery-explorer .map-location-panel__close { color: var(--gex-ink); min-width: 44px; }
.gallery-explorer .map-location-panel__actions, .gallery-explorer .map-location-panel__manual-actions { background: var(--gex-paper); border-color: var(--gex-border); }
.gallery-explorer .map-location-panel__header { border-color: var(--gex-border); }

.gallery-explorer__map-search { position: absolute; top: 12px; left: 69%; transform: translateX(-50%); width: min(420px, calc(62% - 120px)); z-index: 5; margin: 0; }
.gallery-explorer__search-row { display: flex; width: 100%; background: var(--gex-paper); border-radius: var(--brand-radius, 6px); box-shadow: 0 2px 8px var(--gex-border); }
.gallery-explorer__search-row input { border-radius: var(--brand-radius, 6px) 0 0 var(--brand-radius, 6px); }
.gallery-explorer__search-row > button { flex: 0 0 44px; border-radius: 0 var(--brand-radius, 6px) var(--brand-radius, 6px) 0; }
.gallery-explorer__suggestions { background: var(--gex-paper); border: 1px solid var(--gex-border); border-radius: var(--brand-radius, 6px); box-shadow: 0 4px 14px var(--gex-border); max-height: min(380px, 45svh); overflow: auto; margin-top: 4px; }
.gallery-explorer__suggestions button { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 0; width: 100%; text-align: left; }
.gallery-explorer__suggestions button > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gallery-explorer__suggestions button > i { color: var(--gex-accent); flex: 0 0 18px; text-align: center; }
.gallery-explorer__suggestions small { flex: 0 0 auto; max-width: 35%; font-size: 12px; opacity: .75; }
.gallery-explorer__suggestions button + button { border-top: 1px solid var(--gex-border); }
.gallery-explorer__suggestions [aria-selected="true"] { background: color-mix(in srgb, var(--gex-accent) 12%, var(--gex-paper)); }
.gallery-explorer .gallery-explorer__card { box-shadow: 0 2px 5px var(--gex-border); }
.gallery-explorer__card-title { display: block; padding: 12px; font-size: 16px; line-height: 1.3; color: var(--gex-accent); }
.gallery-explorer button.gallery-explorer__card-image { display: block; border: 0; padding: 0 12px; width: 100%; border-radius: 0; }
.gallery-explorer__card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.gallery-explorer .gallery-explorer__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; min-height: 36px; padding: 6px; color: var(--gex-on-accent); background: var(--gex-control-bg); border: 1px solid var(--gex-control-bg); border-radius: var(--brand-radius, 4px); text-decoration: none; }
.gallery-explorer .gallery-explorer__location > .btn[data-location]:hover { color: var(--gex-control-hover-ink); background: var(--gex-control-hover); }
.gallery-explorer__distance { flex: 1 1 100%; color: var(--gex-accent); }
.gallery-explorer .gallery-explorer__location > .btn[data-location] { flex-shrink: 0; color: var(--gex-on-accent); background: var(--gex-control-bg); border-color: var(--gex-control-bg); }
.gallery-explorer__location > span { font-size: 12px; line-height: 1.35; padding-right: 5px; }
.gallery-explorer__popup { color: var(--gex-ink); background: var(--gex-paper); width: 290px; max-width: 100%; text-align: center; padding: 4px 8px 12px; }
.gallery-explorer__popup h4 { font: inherit; font-size: 17px; color: var(--gex-accent); margin: 8px 0 12px; }
.gallery-explorer__popup .gallery-explorer__actions { justify-content: center; margin: 8px 0; }
.gallery-explorer :is(.gallery-explorer__popup, .gallery-explorer__actions--detail) .gallery-explorer__icon { background: var(--gex-paper); color: var(--gex-accent); border-color: var(--gex-border); }
.gallery-explorer__popup-image { border: 0; padding: 0; background: transparent; width: 100%; cursor: pointer; }
.gallery-explorer__popup-image img { width: 100%; max-height: 210px; object-fit: contain; }
.gallery-explorer__popup p { font-size: 13px; line-height: 1.5; max-height: 100px; overflow: auto; margin: 10px 0; }
.gallery-explorer__popup [data-popup-related] { font: inherit; color: var(--gex-accent); background: var(--gex-paper); border: 1px solid var(--gex-border); border-radius: var(--brand-radius, 6px); padding: 8px; }
.gallery-explorer details.gallery-explorer__description { border: 1px solid var(--gex-border); border-radius: var(--brand-radius, 6px); padding: 10px 12px; overflow-wrap: anywhere; }
.gallery-explorer .gallery-explorer__description > summary { padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; white-space: pre-line; }
.gallery-explorer__description > p { margin: 10px 0 0; }
.gallery-explorer__description-expand, .gallery-explorer__description-collapse { color: var(--gex-accent); }
.gallery-explorer__description-collapse { display: none; }
.gallery-explorer__description[open] > summary { display: none; }
.gallery-explorer .gallery-explorer__description > [data-collapse-description] { display: block; border: 0; background: transparent; color: var(--gex-accent); padding: 0; min-height: 32px; margin-top: 10px; text-align: left; }
.gallery-explorer__description[open] :is(.gallery-explorer__description-preview, .gallery-explorer__description-expand) { display: none; }
.gallery-explorer :is(button, a).gallery-explorer__icon:is(:hover, :focus-visible, :active) { background: var(--gex-control-hover); color: var(--gex-control-hover-ink); border-color: var(--gex-control-hover); }
.gallery-explorer .gallery-explorer__icon > i { color: inherit; }
@media (max-width: 900px) {
    .gallery-explorer :is(.gm-style-mtc, .gm-svpc) { margin-top: 66px !important; }
    .gallery-explorer__map-search { left: 50%; width: calc(100% - 24px); }
    .gallery-explorer__browse { padding-top: 76px; }
    .gallery-explorer__workspace:has(.gallery-explorer__detail.is-expanded) :is(.gallery-explorer__map-search, .gallery-explorer__location) { display: none; }
    .gallery-explorer .gallery-explorer__icon { min-height: 44px; width: 44px; flex-basis: 44px; }
    .gallery-explorer :is(.gallery-explorer__types button, .gallery-explorer__filters > summary, .gallery-explorer__compact, .gallery-explorer__header > button) { min-height: 44px; }
}

.gallery-explorer__map-route { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); z-index: 4; }
.gallery-explorer__map-route button { white-space: nowrap; box-shadow: 0 2px 8px var(--gex-border); }
.gallery-explorer__fullscreen-tools { display: none; }
@media (max-width: 900px) {
    .gallery-explorer .gm-fullscreen-control { display: none; }
    body:has(.gallery-explorer__workspace.is-map-expanded) { overflow: hidden; }
    .gallery-explorer__workspace.is-map-expanded { position: fixed; inset: 0; width: 100%; height: 100dvh; min-height: 0; z-index: 9999; border: 0; border-radius: 0; }
    .gallery-explorer__workspace.is-map-expanded .gallery-explorer__detail { display: none; }
    .gallery-explorer__workspace.is-map-expanded .gallery-explorer__map-search { display: block; }
    .gallery-explorer .gallery-explorer__workspace.is-map-expanded .gallery-explorer__location { display: flex; bottom: max(20px, env(safe-area-inset-bottom)); }
    .gallery-explorer__workspace.is-map-expanded .gallery-explorer__fullscreen-tools { position: absolute; bottom: calc(86px + env(safe-area-inset-bottom)); left: 12px; right: 12px; z-index: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
    .gallery-explorer__fullscreen-tools button { box-shadow: 0 2px 8px var(--gex-border); }
}

.gallery-explorer .gm-style-iw-c, .gallery-explorer .info-window { min-height: 0; }
.gallery-explorer__location { top: auto; }
@media (max-width: 900px) {
    .gallery-explorer .gm-style-iw-d { max-height: min(220px, 27svh) !important; overflow: auto !important; }
    .gallery-explorer .info-window { padding: 4px 8px; }
    .gallery-explorer__map-wrap:has(.gm-style-iw-c) .gallery-explorer__location { display: none; }
}

.gallery-explorer__member { overflow-wrap: anywhere; }
.gallery-explorer__member .row { margin: 0; }
.gallery-explorer__member [class*="col-"] { width: 100%; float: none; padding: 0; }
.gallery-explorer__member img, .gallery-explorer__member video, .gallery-explorer__member iframe { max-width: 100%; height: auto; }
.gallery-explorer__member table { max-width: 100%; }
.gallery-explorer__member a { display: inline-block; margin: 3px; }
.gallery-explorer__member .working-hours-widget { margin-block: 12px; }
.gallery-explorer__member .div-inline { display: inline-flex; vertical-align: middle; margin: 3px; }
.gallery-explorer__member .working-hours-widget { margin: 0; }
.gallery-explorer .gallery-explorer__member :is(button, .btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 5px 8px;
    font-size: 13px;
    line-height: 20px;
    color: var(--gex-accent);
    background: var(--gex-paper);
    border: 1px solid var(--gex-border);
}
.gallery-explorer .gallery-explorer__member :is(button, .btn):is(:hover, :focus-visible) {
    background: var(--brand-secondary-color);
    border-color: var(--brand-secondary-color);
    color: var(--gex-on-accent);
}
.gallery-explorer .gallery-explorer__member :is(button, .btn) i { color: inherit; }

.gallery-explorer__share-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.gallery-explorer__phone { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid var(--gex-border); border-radius: var(--brand-radius, 6px); color: var(--gex-ink); background: var(--gex-paper); margin: auto; }
.gallery-explorer__phone::backdrop { background: color-mix(in srgb, var(--gex-ink) 55%, transparent); }
.gallery-explorer__phone-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.gallery-explorer__phone-header h2 { margin: 0; font-size: var(--theme-heading-h3-size, 22px); }
.gallery-explorer__phone-code { display: block; width: min(320px, 100%); height: auto; margin: 16px auto; image-rendering: pixelated; }
.gallery-explorer__phone-copy { display: block; margin: 0 auto; }
@media (max-width: 600px) { .gallery-explorer__header { flex-wrap: wrap; } }
