.photo-viewer{
  width:100vw;
  height:100vh;
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  background:#081522f2;
  color:white;
  overflow:hidden;
}
.photo-viewer::backdrop{
  background:#081522eb;
}
.photo-viewer-frame{
  display:flex;
  flex-direction:column;
  width:100%;
  height:100%;
  min-height:0;
}
.photo-viewer-stage{
  flex:1 1 auto;
  min-height:0;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  touch-action:none;
  cursor:zoom-in;
  padding:.5rem;
}
.photo-viewer-stage img{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  transform-origin:center center;
  user-select:none;
  -webkit-user-drag:none;
  pointer-events:auto;
  background:transparent;
}
.photo-viewer-stage.is-zoomed{
  cursor:grab;
}
.photo-viewer-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  padding:.55rem .6rem calc(.55rem + env(safe-area-inset-bottom,0px));
  background:#081522;
  border-top:1px solid #ffffff35;
}
.photo-viewer-toolbar button{
  min-width:44px;
  min-height:44px;
  font:inherit;
  font-size:.9rem;
  color:white;
  background:transparent;
  border:1px solid #ffffff80;
  padding:.45rem .7rem;
}
.photo-viewer-toolbar button:disabled{
  opacity:.4;
  cursor:not-allowed;
}
.photo-viewer-toolbar button:focus-visible{
  outline:3px solid white;
  outline-offset:2px;
}
.photo-viewer-count{
  min-width:4.5rem;
  text-align:center;
  font-size:.9rem;
}
@media(max-width:420px){
  .photo-viewer-toolbar{
    gap:.3rem;
    padding:.45rem .4rem calc(.45rem + env(safe-area-inset-bottom,0px));
  }
  .photo-viewer-toolbar button{
    padding:.4rem .55rem;
    font-size:.85rem;
  }
  .photo-viewer-count{
    min-width:3.6rem;
    font-size:.8rem;
  }
}