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

/* Viewer */

.viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  touch-action: pan-y;
  overflow-x: hidden;
}

.caja {
height: 100vh;
  background: #000;
  overflow: hidden;	
}

/* Stage */

.viewer-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition:
    transform 0.35s ease,
    opacity 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.d-none {
    display: none !important;
}

.vertical-container {

    overflow-y: auto;
    overflow-x: hidden;
    background: #000;
}

.snap {height: 100vh;scroll-snap-type: y mandatory;}
.snap-none{ height: auto;scroll-snap-type: none;}
.vertical-page {

    width: 100%;
    height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    scroll-snap-align: start;
}


.iscroll-page{
	width: 100%;
    height: auto;

    display: flex;
    justify-content: center;
    align-items: center;

    
}

.vertical-page img {

    width: 100%;
    height: 100%;

    object-fit: contain;
}
.iscroll-page img {
    width: auto;
	max-width:100%;
    height: auto;
    display: block;
	
}

/* =========================
   PROGRESS BAR
========================= */

.progress-bar-container {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  display: flex;
  gap: 4px;

  padding: 10px;

  z-index: 50;
}

.progress-segment {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.25);
  overflow: hidden;
  border-radius: 20px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  transition: width .25s ease;
}

/* =========================
   TOP BAR
========================= */

.comic-bar {
  position: absolute;
  top: 22px;
  left: 0;

  width: 100%;

  padding: 12px 36px 12px 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(0,0,0,.5);

  z-index: 40;

  transition:
    opacity .3s ease,
    transform .3s ease;
}

.comic-bar.hide {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.comic-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  max-width: 100%;
}

.comic-progress {
  color: rgba(255,255,255,.85);
  font-size: 13px;
}

/* =========================
   COMIC BAR
========================= */

.comic-left {  display: flex;  flex-direction: column;  gap: 2px;}

/* =========================
   READING MODE
========================= */

.reading-mode-switch {display: flex; flex-direction: column; gap: 6px; margin-right:30px;color:#fff;}
.reading-mode{display: flex; flex-direction: column; }
.reading-horizontal, .reading-vertical{display: flex; gap: 6px; }

.mode-btn {
  border: 1px solid #f2f2f2;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);

  padding: 5px 10px;

  border-radius: 20px;

  font-size: 12px;
  font-weight: 600;

  transition:
    background .2s ease,
    color .2s ease;
}

.mode-btn:hover {
  background: rgba(255,255,255,.25);
}

.mode-btn.active {
  background: #fff;
  color: #000;
}

/* =========================
   NAVIGATION
========================= */

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 54px;
  height: 54px;

  border: none;
  border-radius: 50%;

  background: rgba(0,0,0,.45);
  color: #fff;

  font-size: 22px;

  z-index: 30;

  transition:
    background .2s ease,
    opacity .2s ease;
}

.nav-btn:hover {
  background: rgba(0,0,0,.7);
}

.nav-left {
  left: 16px;
}

.nav-right {
  right: 16px;
}

/* =========================
   END BAR
========================= */

.end-bar {
  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;

  padding: 18px;

  background: rgba(0,0,0,.85);

  display: flex;
  justify-content: center;

  transform: translateY(100%);
  transition: transform .35s ease;

  z-index: 60;
}

.end-bar.show {
  transform: translateY(0);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .nav-btn {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .comic-title {
    font-size: 14px;
  }

}