/* Desktop-only idle reading gag. Added only to home, biographies, and reader menu.
   The zoom lasts a full minute and accelerates from a very slow start, like a distant figure rushing closer. */
.reading-prank-overlay {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: rgba(0, 0, 0, 0);
  cursor: pointer;
  animation: reading-prank-darken 4s ease-out forwards;
}

.reading-prank-overlay:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: -6px;
}

.reading-prank-overlay img {
  display: block;
  flex: 0 0 auto;
  width: 120px;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform-origin: center center;
  animation: reading-prank-zoom 60s cubic-bezier(0.42, 0, 1, 1) forwards;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes reading-prank-darken {
  from { background-color: rgba(0, 0, 0, 0); }
  to { background-color: rgba(0, 0, 0, 0.98); }
}

@keyframes reading-prank-zoom {
  from { width: 120px; }
  to { width: max(100vw, 166.6667vh); }
}

@media (prefers-reduced-motion: reduce) {
  .reading-prank-overlay,
  .reading-prank-overlay img {
    animation-duration: 1ms;
  }
}
