/* Shared photo viewer. Gallery layouts and image crops stay in their own pages. */
.bdc-lightbox-figure{position:relative}
.bdc-gallery-link{cursor:zoom-in}
.bdc-gallery-link:focus-visible{outline:3px solid #e3cd99!important;outline-offset:-5px}
.bdc-gallery-overlay{position:absolute;inset:0;z-index:4;display:block;border:0!important;background:transparent}
.bdc-lightbox-figure>figcaption{pointer-events:none}

#bdc-photo-dialog{
  position:fixed;inset:0;z-index:2147483647;box-sizing:border-box;
  width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;
  margin:0;border:0;padding:16px;background:rgba(9,9,8,.97);color:#fff;
  grid-template-columns:56px minmax(0,1fr) 56px;
  grid-template-rows:48px minmax(0,1fr) 52px;gap:12px;
  font:15px/1.5 system-ui,sans-serif;overscroll-behavior:contain;
}
#bdc-photo-dialog:not([open]){display:none}
#bdc-photo-dialog[open]{display:grid}
#bdc-photo-dialog::backdrop{background:rgba(0,0,0,.8)}
#bdc-photo-dialog [hidden]{display:none!important}
#bdc-photo-dialog button{
  display:grid;place-items:center;width:48px;height:48px;min-width:48px;
  margin:0;padding:0;border:1px solid rgba(255,255,255,.4);border-radius:50%;
  background:#242421;color:#fff;cursor:pointer;touch-action:manipulation;
  font:inherit;box-shadow:none;transform:none;
}
#bdc-photo-dialog button:hover{background:#41413b}
#bdc-photo-dialog button:focus-visible{outline:3px solid #e3cd99;outline-offset:4px}
#bdc-photo-dialog button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;pointer-events:none}
#bdc-photo-dialog .bdc-lightbox-close{grid-column:3;grid-row:1;justify-self:end}
#bdc-photo-dialog .bdc-lightbox-prev{grid-column:1;grid-row:2;align-self:center}
#bdc-photo-dialog .bdc-lightbox-next{grid-column:3;grid-row:2;align-self:center;justify-self:end}
#bdc-photo-dialog .bdc-lightbox-counter{grid-column:2;grid-row:1;align-self:center;justify-self:center;margin:0;color:#e9e6de;font-size:14px;font-variant-numeric:tabular-nums}
#bdc-photo-dialog .bdc-lightbox-stage{grid-column:2;grid-row:2;position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;width:100%;height:100%;margin:0;touch-action:pan-y pinch-zoom}
#bdc-photo-dialog .bdc-lightbox-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;filter:none;transform:none;user-select:none;-webkit-user-select:none}
#bdc-photo-dialog .bdc-lightbox-status{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;text-align:center;color:#e9e6de;pointer-events:none}
#bdc-photo-dialog .bdc-lightbox-caption{grid-column:2;grid-row:3;align-self:center;justify-self:center;max-width:960px;margin:0;color:#e9e6de;text-align:center;font-size:14px;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
@media(max-width:650px){
  #bdc-photo-dialog{padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));grid-template-columns:48px minmax(0,1fr) 48px;grid-template-rows:48px minmax(0,1fr) 48px 44px;gap:8px}
  #bdc-photo-dialog .bdc-lightbox-stage{grid-column:1/-1}
  #bdc-photo-dialog .bdc-lightbox-prev,#bdc-photo-dialog .bdc-lightbox-next{grid-row:3}
  #bdc-photo-dialog .bdc-lightbox-caption{grid-column:1/-1;grid-row:4;font-size:12px}
}
@media(max-height:450px) and (orientation:landscape){
  #bdc-photo-dialog{padding:8px;grid-template-columns:48px minmax(0,1fr) 48px;grid-template-rows:40px minmax(0,1fr) 26px;gap:4px}
  #bdc-photo-dialog .bdc-lightbox-stage{grid-column:2}
  #bdc-photo-dialog .bdc-lightbox-prev,#bdc-photo-dialog .bdc-lightbox-next{grid-row:2}
  #bdc-photo-dialog .bdc-lightbox-caption{grid-column:2;grid-row:3;-webkit-line-clamp:1;font-size:12px}
}
