.gallery a.tile { border: 0; padding: 0; background: transparent; cursor: zoom-in }
#photo-viewer:not([open]) { display: none }
#photo-viewer[open] {
  position: fixed; inset: 0; margin: 0; width: 100%; height: 100%;
  max-width: none; max-height: none; border: 0; padding: .75rem;
  display: flex; align-items: center; justify-content: center;
  background: transparent; overflow: hidden;
}
#photo-viewer::backdrop { background: rgba(0,0,0,.9) }
#photo-viewer img { display: block; max-width: 100%; max-height: 100%; object-fit: contain }
#photo-viewer button {
  position: absolute; top: 1rem; right: 1rem; z-index: 1;
  padding: .7rem 1rem; border: 1px solid white; border-radius: .25rem;
  background: #222; color: white; font: inherit; cursor: pointer;
}
