.viewer-media { position: relative; }
.viewer-toolbar { display: contents; }
.viewer-toolbar-label, .zoom-reset-icon { display: none; }

.zoom-viewport {
  position: relative;
  height: min(65vh, 650px);
  overflow: hidden;
  background: #0b0a0e;
}

.zoom-stage {
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  cursor: zoom-in;
}

.zoom-stage.is-zoomed { cursor: grab; }
.zoom-stage.is-dragging { cursor: grabbing; }

.zoom-stage .modal-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
  -webkit-user-drag: none;
}

.zoom-controls {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border: 1px solid #ffffff40;
  border-radius: 32px;
  background: #1b1723dc;
  box-shadow: 0 4px 20px #0005;
  color: white;
  touch-action: manipulation;
}

.zoom-controls button {
  width: 39px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #ffffff18;
  color: white;
  font-size: 21px;
  line-height: 1;
  touch-action: manipulation;
}

.zoom-controls button:disabled { opacity: .35; cursor: default; }
.zoom-controls button:not(:disabled):hover { background: #ffffff35; }
.zoom-controls #zoom-reset {
  width: 65px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.zoom-controls .zoom-hint { font-size: 12px; color: #ffffffbd; padding: 0 8px; white-space: nowrap; }
dialog .close { z-index: 4; }

@media (max-width: 700px) {
  .zoom-viewport { height: min(64vh, 580px); }
  .zoom-controls { bottom: 10px; right: 10px; padding: 5px; }
  .zoom-controls .zoom-hint { display: none; }
  .zoom-controls button { width: 40px; height: 40px; }
}
