html.gallery-open { overflow: hidden; scrollbar-gutter: stable; }
.gallery-dialog {
  width: min(1160px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  height: min(880px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border: 1px solid #a9bdd2;
  background: #fff;
  overflow: hidden;
}
.gallery-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; }
.gallery-dialog::backdrop { background: #101820c9; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-toolbar > div:first-child { min-width: 0; }
.gallery-dialog h2 { font-size: 22px; margin: 0 0 6px; overflow-wrap: anywhere; }
.gallery-toolbar p { font-size: 13px; color: var(--muted); min-height: 21px; }
.gallery-controls { display: flex; gap: 8px; flex: none; }
.gallery-controls .icon-button { width: 44px; height: 44px; color: var(--blue); border-color: #8196b1; }
.gallery-controls .icon-button:hover { background: var(--tint-blue); }
.gallery-controls [aria-disabled="true"], .gallery-controls button:disabled { opacity: .4; cursor: default; }
.gallery-controls [aria-pressed="true"] { background: var(--blue); color: #fff; }
.gallery-controls [aria-pressed="true"]:hover { background: var(--blue-hover); color: #fff; }
.gallery-zoom-in, .gallery-zoom-out { display: grid; place-items: center; }
.gallery-zoom-out, [aria-pressed="true"] .gallery-zoom-in { display: none; }
[aria-pressed="true"] .gallery-zoom-out { display: grid; }
.gallery-stage {
  min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain;
  display: flex; align-items: center; justify-content: center; background: #eef3f7;
  border: 1px solid #c4d1df;
}
.gallery-stage img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0; }
.gallery-stage.is-zoomed { display: block; }
.gallery-stage.is-zoomed img { width: auto; height: auto; max-width: none; max-height: none; margin: 0; }
.gallery-stage:focus-visible { outline-offset: -4px; }
.gallery-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.gallery-footer > div { min-width: 0; }
.gallery-footer p { font-size: 14px; line-height: 1.5; }
.gallery-footer > .text-link { flex: none; font-size: 14px; }
#gallery-status { color: var(--muted); margin-top: 4px; }
.gallery-retry { background: none; border: 0; padding: 0; }
.service-capture-switch { display: none; }

@media (max-width: 760px) {
  .service-capture-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--tint-blue); border-radius: 4px; margin-bottom: 14px; }
  .service-capture-switch button { min-height: 44px; border: 0; border-radius: 3px; background: transparent; color: var(--petrol); font-size: 14px; }
  .service-capture-switch [aria-pressed="true"] { background: var(--petrol); color: #fff; font-weight: 600; }
  .service-capture-switch button:hover { background: var(--blue-hover-surface); }
  .service-capture-switch [aria-pressed="true"]:hover { background: var(--blue-hover); color: #fff; }
  .service-captures.is-enhanced { display: block; height: 380px; }
  .service-captures.is-enhanced .service-capture { display: flex; flex-direction: column; justify-content: center; height: 100%; }
  .service-captures.is-enhanced .service-capture:not(.is-current) { display: none; }
  .service-captures.is-enhanced img { width: auto; height: auto; max-height: 330px; max-width: 100%; object-fit: contain; margin-inline: auto; }
  .service-captures.is-enhanced .service-capture > span { width: 100%; margin-top: auto; }
  .gallery-dialog { padding: 12px; width: calc(100% - 16px); max-width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .gallery-dialog[open] { gap: 12px; }
  .gallery-toolbar { flex-wrap: wrap; gap: 10px; }
  .gallery-dialog h2 { font-size: 19px; }
  .gallery-controls { width: 100%; }
  .gallery-controls [data-gallery-close] { margin-left: auto; }
  .gallery-footer { display: block; }
  .gallery-footer > .text-link { margin-top: 4px; }
}
@media (max-height: 480px) and (min-width: 761px) {
  .gallery-dialog { padding: 12px; }
  .gallery-dialog[open] { gap: 8px; }
  .gallery-dialog h2 { font-size: 18px; }
}
