.image-viewer {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: #080808;
  color: #fff;
  overflow: auto;
}
.image-viewer::backdrop { background: #000; }
.image-viewer-controls {
  position: sticky;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  background: #080808;
}
.image-viewer-controls button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #999;
  background: #222;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.image-viewer-controls a { color: #fff; text-decoration: underline; }
.image-viewer img:not([hidden]) {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px auto;
}
.image-viewer img:not([src]) { visibility: hidden; }
