/* ==================================================
   Frosted Lightbox (no page jump)
================================================== */

.pokelightbox{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.pokelightbox[hidden]{ display: none; }

.pokelightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
}

.pokelightbox__panel{
  position: relative;
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;

  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.60);
  background: rgba(255,255,255,0.42);

  backdrop-filter: blur(8px) saturate(1.05);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.45) inset,
    0 18px 40px rgba(0,0,0,0.22);
}

.pokelightbox__imgwrap{
  display: grid;
  place-items: center;
  padding: 18px;
}

.pokelightbox__img{
  max-width: 100%;
  max-height: calc(100vh - 160px);
  height: auto;
  width: auto;
  display: block;

  /* transparent PNGs look nicer with a soft “stage” */
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0));
  border-radius: 14px;
}

.pokelightbox__caption{
  padding: 0 18px 16px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--pm-ink-soft);
}

.pokelightbox__close{
  position: absolute;
  top: 10px;
  right: 10px;

  font-family: 'Press Start 2P', monospace;
  font-size: 10px;

  border-radius: 12px;
  padding: 10px 10px;

  color: var(--pm-ink);
  background: rgba(255,255,255,0.60);
  border: 2px solid rgba(255,255,255,0.60);

  box-shadow: 0 0 0 1px rgba(255,255,255,0.45) inset;
  cursor: pointer;
}

.pokelightbox__close:hover{
  filter: brightness(1.02) saturate(1.05);
}

.pokelightbox__close:focus-visible{
  outline: 3px solid rgba(131,203,255,0.65);
  outline-offset: 3px;
}

/* ==================================================
   Lightbox nav arrows
================================================== */

.pokelightbox__nav{
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pokelightbox__arrow{
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  font-family: 'Press Start 2P', monospace;
  font-size: 12px;

  width: 44px;
  height: 44px;
  border-radius: 14px;

  display: grid;
  place-items: center;

  color: var(--pm-ink);
  background: rgba(255,255,255,0.55);
  border: 2px solid rgba(255,255,255,0.60);

  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.45) inset,
    0 10px 22px rgba(0,0,0,0.12);

  cursor: pointer;
}

.pokelightbox__arrow:hover{
  filter: brightness(1.03) saturate(1.05);
}

.pokelightbox__arrow:focus-visible{
  outline: 3px solid rgba(131,203,255,0.65);
  outline-offset: 3px;
}

.pokelightbox__arrow--prev{ left: 10px; }
.pokelightbox__arrow--next{ right: 10px; }

/* Hide arrows on very small screens (swipe still works) */
@media (max-width: 420px){
  .pokelightbox__arrow{ display: none; }
}

/* Make the image area feel swipe-ready */
.pokelightbox__imgwrap{
  touch-action: pan-y; /* allow vertical scroll gestures outside swipe */
}