html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
}

#gallery {
  position: fixed;
  inset: 0;
  background: #000;
}

/* Two stacked image layers that crossfade via opacity. */
.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 600ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.layer.active {
  opacity: 1;
}

/* Transparent click/tap zones sitting above the images. */
.zone {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  z-index: 10;
  background: transparent;
  border: 0;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.zone-prev {
  left: 0;
  cursor: w-resize;
}

.zone-next {
  right: 0;
  cursor: e-resize;
}

/* Shown only when there are no images to display. */
#empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #666;
  font: 16px/1.4 system-ui, sans-serif;
  text-align: center;
  padding: 1rem;
}
