/* Visor de páginas con zoom/arrastre */
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header-spacer { height: 60px; }

.page-viewer {
  position: relative;
  height: calc(100vh - 60px - 70px);
  overflow: hidden;
  background: #0e0e0e;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 160ms ease;
}

.page-viewer.fading { opacity: 0; }

.page-viewer img.aeh-page-img {
  width: auto !important;
  height: 100%;
  max-width: none;
  image-rendering: auto;
  cursor: grab;
}

/* Doble página (spreads) pegadas sin separación */
.aeh-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.aeh-spread img {
  display: block;
  height: 100%;
  width: auto;
  margin: 0;
  padding: 0;
}

.page-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  height: 70px;
  background: #2D2E45;
  border-top: 1px solid #2D2E45;
  padding: 0 12px;
}

.page-nav a.btn-nav {
  text-decoration: none;
  background: #2D2E45;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.25);
}

.page-nav a.btn-nav:hover { background: #3a3b59; }

.page-nav span { color: #fff; }

/* Separador flexible para empujar elementos a la derecha */
/* .spacer no usado cuando todo va centrado */
.page-nav .spacer { display: none; }

/* Barra de salto en nav */
.page-nav .page-jump { display: flex; gap: 8px; align-items: center; }
.page-nav .page-jump input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px; width: 120px; }
.page-nav .page-jump button { padding: 6px 12px; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; background: #2D2E45; color: #fff; font-weight: 600; }
.page-nav .page-jump button:hover { background: #3a3b59; }

/* Audio UI */
.audio-toggle {
  text-decoration: none;
  background: #2D2E45;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.25);
}
.audio-toggle:hover { background: #3a3b59; }

.audio-panel {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  min-width: 280px;
  max-width: 90vw;
  background: #2D2E45;
  color: #fff;
  border: 1px solid #3a3b59;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 10px;
  display: none;
  z-index: 2000;
}
.audio-panel.open { display: block; }
.audio-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.audio-header .title { font-size: 16px; font-weight: 600; cursor: move; user-select: none; }
.audio-header .actions { display: flex; gap: 6px; }
.audio-anchor { background: #2D2E45; border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 6px; padding: 4px 8px; font-weight: 600; cursor: pointer; }
.audio-anchor:hover { background: #3a3b59; }
.audio-list { display: grid; gap: 6px; }
.audio-item { display: flex; align-items: center; gap: 8px; }
.audio-item button { background: #2D2E45; border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 6px; padding: 4px 8px; font-weight: 600; }
.audio-item button:hover { background: #3a3b59; }
.audio-item .title { flex: 1; }
.audio-panel audio { width: 100%; margin-top: 8px; }
