/* Leitor "Banca da Vó" — chrome escuro sobre as páginas (spec §6 do briefing) */

.bl-root {
  --bl-fundo: #181411;
  --bl-creme: #f4ead8;
  --bl-secundario: #a89a86;
  --bl-hint: #7a6e5d;
  --bl-acento: #d97b2e;
  --bl-acento-hover: #f0a35c;
  --bl-sobre-acento: #1c1610;
  --bl-traco: #e8dcc6;
  --bl-superficie: rgba(244, 234, 216, 0.07);
  --bl-borda: rgba(244, 234, 216, 0.12);
  --bl-borda-forte: rgba(244, 234, 216, 0.14);
  position: fixed;
  inset: 0;
  z-index: 200; /* acima do header do site (vd-hd usa 90) */
  display: flex;
  flex-direction: column;
  background: var(--bl-fundo);
  color: var(--bl-creme);
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
}
.bl-root a { color: var(--bl-acento); }
.bl-root a:hover { color: var(--bl-acento-hover); }
.bl-root button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ---- barra superior ---- */
.bl-topbar {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(244, 234, 216, 0.08);
}
.bl-brand { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.bl-wordmark {
  font-family: 'Bodoni Moda', Didot, Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.08em;
}
.bl-brand-sep { width: 1px; height: 18px; background: rgba(244, 234, 216, 0.2); align-self: center; }
.bl-rotulo {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-secundario);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bl-controls { display: flex; align-items: center; gap: 10px; }
.bl-pill {
  font-size: 13px;
  letter-spacing: 0.05em;
  background: var(--bl-superficie);
  border: 1px solid var(--bl-borda-forte);
  border-radius: 999px;
  padding: 7px 16px;
  white-space: nowrap;
}
.bl-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bl-superficie);
  border: 1px solid var(--bl-borda);
}
.bl-btn:hover { background: rgba(244, 234, 216, 0.13); }
.bl-btn svg { stroke: var(--bl-traco); }
.bl-btn[aria-pressed="true"] { outline: 2px solid var(--bl-acento); }

/* ---- palco ---- */
.bl-stage {
  flex-grow: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 12px;
  position: relative;
}
.bl-arrow {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(244, 234, 216, 0.08);
  border: 1px solid var(--bl-borda-forte);
  z-index: 5;
}
.bl-arrow:hover { background: rgba(244, 234, 216, 0.15); }
.bl-arrow svg { stroke: var(--bl-creme); }
.bl-zoomview {
  flex-grow: 1;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bl-zoomview.bl-zoomed { overflow: auto; }
.bl-bookbox {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.bl-pagina {
  background: #fdf8ee;
  overflow: hidden;
}
.bl-pagina img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* sombra grande do bloco (a lombada/virada é do StPageFlip) */
.stf__parent { filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55)); }

/* ---- rodapé ---- */
.bl-bottom {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 8px 120px 14px;
}
.bl-progress {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(244, 234, 216, 0.12);
}
.bl-progress-fill {
  height: 4px;
  border-radius: 2px;
  background: var(--bl-acento);
  width: 0;
  transition: width 0.3s ease;
}
.bl-hintrow { display: flex; align-items: center; gap: 14px; }
.bl-pill-mobile { display: none; }
.bl-hint {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bl-hint);
  text-align: center;
}
.bl-toast {
  position: absolute;
  top: 74px;
  right: 24px;
  font-size: 12px;
  letter-spacing: 0.06em;
  background: var(--bl-acento);
  color: var(--bl-sobre-acento);
  border-radius: 999px;
  padding: 8px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 30;
}
.bl-toast.bl-visivel { opacity: 1; }

/* ---- miniaturas (overlay) ---- */
.bl-thumbs {
  position: absolute;
  inset: 0;
  background: var(--bl-fundo);
  display: none;
  flex-direction: column;
  z-index: 20;
}
.bl-thumbs.bl-aberto { display: flex; }
.bl-thumbs-topo {
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}
.bl-thumbs-titulo {
  font-family: 'Bodoni Moda', Didot, Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
}
.bl-thumbs-sub {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-secundario);
  margin-left: 16px;
}
.bl-thumbs-grade {
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 48px 24px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
  align-content: start;
}
.bl-thumb { display: flex; flex-direction: column; gap: 8px; }
.bl-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  background: #efe6d4;
}
.bl-thumb-num {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--bl-hint);
  text-align: center;
}
.bl-thumb.bl-atual img { outline: 3px solid var(--bl-acento); outline-offset: 2px; }
.bl-thumb.bl-atual .bl-thumb-num { color: var(--bl-acento); font-weight: 600; }

/* ---- mobile (retrato / telas estreitas) ---- */
@media (max-width: 767px) {
  .bl-topbar { height: 56px; padding: 0 12px; }
  .bl-wordmark { font-size: 15px; }
  .bl-rotulo { font-size: 10px; letter-spacing: 0.12em; }
  .bl-pill { display: none; }
  .bl-zoom-out, .bl-zoom-in, .bl-link { display: none; }
  /* setas viram botões flutuantes compactos — navegação garantida mesmo sem swipe */
  .bl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(24, 20, 17, 0.55);
    border-color: var(--bl-borda);
  }
  .bl-arrow.bl-prev { left: 6px; }
  .bl-arrow.bl-next { right: 6px; }
  .bl-stage { padding: 16px 10px; gap: 0; }
  .bl-bottom { padding: 8px 24px 14px; }
  .bl-pill-mobile {
    display: block;
    font-size: 12px;
    padding: 6px 14px;
  }
  .bl-thumbs-topo { padding: 0 16px; }
  .bl-thumbs-sub { display: none; }
  .bl-thumbs-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px 16px 24px; gap: 14px; }
  .stf__parent { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5)); }
}
