.bpmc-gallery {
  --gallery-ink: #304661;
  --gallery-gap: 15px;
  --gallery-arrow-width: 44px;
  max-width: 1160px;
  margin: 1.75rem auto 0;
}
.bpmc-gallery__rail {
  display: grid;
  grid-template-columns: var(--gallery-arrow-width) minmax(0, 860px) var(--gallery-arrow-width);
  align-items: center;
  justify-content: space-between;
  column-gap: clamp(6px, 2vw, 26px);
}
.bpmc-gallery__track {
  grid-area: 1 / 2;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * var(--gallery-gap)) / 4);
  gap: var(--gallery-gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  list-style: none;
  margin: 0;
  padding: 0 0 .3rem;
}
.bpmc-gallery.is-enhanced .bpmc-gallery__track { scrollbar-width: none; }
.bpmc-gallery__track li { min-width: 0; scroll-snap-align: start; }
.bpmc-gallery__track figure { margin: 0; }
.bpmc-gallery__track a { display: block; overflow: hidden; background: #e9edf3; }
.bpmc-gallery__track img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.bpmc-gallery__track figcaption {
  margin: clamp(.65rem, 2vw, 1.45rem) .35rem 0;
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.6;
}
.bpmc-gallery__controls { display: contents; }
.bpmc-gallery__controls[hidden], .bpmc-gallery__dots[hidden] { display: none; }
.bpmc-gallery__controls button,
.bpmc-gallery__dots button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gallery-ink);
  cursor: pointer;
}
.bpmc-gallery__controls button { width: 100%; min-height: 44px; }
.bpmc-gallery__controls button[data-step="-1"] { grid-area: 1 / 1; }
.bpmc-gallery__controls button[data-step="1"] { grid-area: 1 / 3; }
.bpmc-gallery__controls button::before {
  content: "";
  width: 14px;
  height: 14px;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  transform: rotate(-45deg);
}
.bpmc-gallery__controls button[data-step="-1"]::before { transform: rotate(135deg); }
.bpmc-gallery:dir(rtl) .bpmc-gallery__controls button::before { transform: rotate(135deg); }
.bpmc-gallery:dir(rtl) .bpmc-gallery__controls button[data-step="-1"]::before { transform: rotate(-45deg); }
.bpmc-gallery__controls button[aria-disabled="true"] { opacity: .38; cursor: default; }
.bpmc-gallery__dots { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 1.15rem; }
.bpmc-gallery__dots button { width: 24px; height: 24px; }
.bpmc-gallery__dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #c7c9cc; }
.bpmc-gallery__dots button[aria-current="true"]::before { background: currentColor; }
.bpmc-gallery :focus-visible { outline: 2px solid var(--blue, #1b48a6); outline-offset: -2px; }
@media (768px < width <= 1024px) {
  .bpmc-gallery__track { grid-auto-columns: calc((100% - 2 * var(--gallery-gap)) / 3); }
}
@media (425px < width <= 768px) {
  .bpmc-gallery__track { grid-auto-columns: calc((100% - var(--gallery-gap)) / 2); }
}
@media (width <= 425px) {
  .bpmc-gallery { --gallery-arrow-width: 44px; --gallery-gap: 12px; }
  .bpmc-gallery__track { grid-auto-columns: 100%; }
}

.bpmc-album-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: var(--navy, #162851);
  border: 1px solid #d1ddec;
  border-radius: 10px;
  text-decoration: none;
}
.bpmc-album-card:is(:hover, :focus-visible) { border-color: var(--blue, #1b48a6); }
.bpmc-album-card:focus-visible { outline: 3px solid var(--blue, #1b48a6); outline-offset: 3px; }
.bpmc-album-card__photos { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 3px; }
.bpmc-album-card__photos img { display: block; width: 100%; height: auto; min-width: 0; aspect-ratio: 4 / 5; object-fit: cover; }
.bpmc-album-card__photos[data-count="2"] img { aspect-ratio: 4 / 3; }
.bpmc-album-card__photos[data-count="1"] img { aspect-ratio: 16 / 9; }
.bpmc-album-card__copy { display: grid; gap: .45rem; padding: clamp(14px, 2vw, 24px); }
.bpmc-album-card__copy strong { font-size: clamp(1.1rem, 1.7vw, 1.5rem); line-height: 1.4; }
.bpmc-album-card__copy > span { color: var(--blue, #1b48a6); font-weight: 600; }
.bpmc-album-card:hover .bpmc-album-card__copy > span { text-decoration: underline; text-underline-offset: .2em; }

ul.bpmc-photo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,180px),1fr)); gap: clamp(8px,1.2vw,18px); padding: 0; margin: 1rem 0 0; list-style: none; }
.bpmc-photo-grid li, .bpmc-photo-grid figure { min-width: 0; margin: 0; padding: 0; }
.bpmc-photo-grid figure > a { display: block; border-radius: 6px; overflow: hidden; cursor: zoom-in; }
.bpmc-photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; }
.bpmc-photo-grid figure figcaption { margin: .4rem 0 0; }
@media (max-width: 425px) { ul.bpmc-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
html:has(.bpmc-viewer[open]) { overflow: hidden; }
dialog.bpmc-viewer { padding: 0; margin: auto; width: min(1040px,94vw); max-width: 100%; border: 0; border-radius: 10px; background: #101b2e; color: #fff; }
dialog.bpmc-viewer::backdrop { background: rgb(5 13 28 / 90%); }
.bpmc-viewer header, .bpmc-viewer footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px clamp(10px,2vw,20px); }
.bpmc-viewer__stage { height: min(67vh,740px); height: min(67dvh,740px); background: #080f1c; touch-action: pan-y pinch-zoom; }
.bpmc-viewer__stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bpmc-viewer button { flex: none; display: grid; place-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid #8193b2; border-radius: 50%; background: #203454; color: white; font: 28px/1 sans-serif; cursor: pointer; }
.bpmc-viewer button:focus-visible { outline: 3px solid #bed9ff; }
.bpmc-viewer footer div { text-align: center; font-size: .95rem; line-height: 1.4; }
.bpmc-viewer [data-counter] { display: block; color: #c5d8ef; font-variant-numeric: tabular-nums; }
