.mg.js {
  --manga-reserve: 176px;
  scroll-margin-top: 84px;
  scroll-margin-bottom: 28px;
}
.mg.js .mg-pages {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  height: max(180px, calc(100svh - var(--manga-reserve)));
}
.mg.js .mg-pages img.on {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@media (max-width: 767px) {
  .mg.js {
    --manga-reserve: calc(232px + env(safe-area-inset-bottom, 0px));
    scroll-margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}
