/* Leitor online das edições (ler.php). Fundo escuro, barra fina no topo, a página no centro. */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.leitor { display: flex; flex-direction: column; background: #1b2227; color: #e9eef1; font: 400 15px/1.4 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

.lt-barra { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); background: #11171b; border-bottom: 1px solid rgba(255, 255, 255, .08); flex-shrink: 0; }
.lt-voltar { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px 8px 6px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.lt-voltar:hover { background: rgba(255, 255, 255, .08); }
.lt-titulo { display: grid; line-height: 1.2; min-width: 0; }
.lt-titulo strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-titulo span { font-size: .8rem; color: #9fb0b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-nav { display: flex; align-items: center; gap: 6px; margin: 0 auto; }
.lt-pag { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: #b8c6cd; }
.lt-pag input { width: 56px; height: 36px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; text-align: center; font: 600 .95rem/1 inherit; }
.lt-acoes { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lt-nav + .lt-acoes { margin-left: 0; }
.lt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 9px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .07); }
.lt-btn:hover { background: rgba(255, 255, 255, .15); }
.lt-btn:disabled { opacity: .35; cursor: default; }
.lt-baixar { background: var(--accent, #0E8A8C); font-weight: 600; font-size: .88rem; padding: 0 14px; }
.lt-baixar:hover { background: var(--accent-dark, #0b6f71); }

.lt-palco { position: relative; flex: 1; overflow: hidden; display: flex; touch-action: pan-y pinch-zoom; }
.lt-palco.is-zoom { overflow: auto; touch-action: auto; }
.lt-paginas { margin: auto; padding: 16px; display: flex; gap: 0; align-items: center; justify-content: center; }
.lt-paginas canvas { display: block; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); border-radius: 3px; }
.lt-paginas--dupla canvas:first-child { border-radius: 3px 0 0 3px; box-shadow: -8px 10px 40px rgba(0, 0, 0, .45), inset -20px 0 30px rgba(0, 0, 0, .1); }
.lt-paginas--dupla canvas:last-child { border-radius: 0 3px 3px 0; box-shadow: 8px 10px 40px rgba(0, 0, 0, .45); }
.lt-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); z-index: 2; }
.lt-seta:hover { background: var(--accent, #0E8A8C); }
.lt-seta:disabled { opacity: 0; pointer-events: none; }
.lt-seta--ant { left: 14px; }
.lt-seta--prox { right: 14px; }
.lt-palco.is-zoom .lt-seta { position: fixed; top: 50%; }

.lt-carregando { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: #b8c6cd; z-index: 3; }
.lt-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent, #0E8A8C); animation: lt-gira .8s linear infinite; }
@keyframes lt-gira { to { transform: rotate(360deg); } }
.lt-erro { margin: auto; max-width: 420px; padding: 24px; text-align: center; color: #d6e0e4; }
.lt-erro a { color: #7fd6d8; text-decoration: underline; }

.lt-palco--externo iframe { flex: 1; width: 100%; height: 100%; border: 0; background: #1b2227; }

@media (max-width: 700px) {
  .lt-barra { flex-wrap: wrap; gap: 8px; padding: 6px 10px; }
  .lt-voltar span, .lt-baixar span, .lt-so-pc { display: none; }
  .lt-titulo { flex: 1; }
  .lt-nav { order: 3; width: 100%; justify-content: center; margin: 0; }
  .lt-seta { width: 40px; height: 40px; background: rgba(0, 0, 0, .3); }
  .lt-seta--ant { left: 6px; }
  .lt-seta--prox { right: 6px; }
  .lt-paginas { padding: 10px; }
}
