/* Biblioteca Página Direta 3.10.1 — acabamento responsivo isolado.
   Mantém intactos produtos, preços, permissões, checkout e leitores externos. */
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail {
  min-width:0!important;max-width:100%!important;
}
/* Capas em proporção de livro, sem cortar títulos e sem distorcer imagens. */
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-card .jf-pe-cover,
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-free-card .jf-pe-guide-cover {
  aspect-ratio:5 / 8!important;height:auto!important;min-height:0!important;
  overflow:hidden!important;background:#f7f0ed!important;
  border:1px solid #eadce0!important;border-radius:6px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:0!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-card .jf-pe-cover img,
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-free-card .jf-pe-guide-cover img {
  display:block!important;width:100%!important;height:100%!important;
  aspect-ratio:5 / 8!important;object-fit:contain!important;
  object-position:center center!important;margin:0!important;padding:0!important;
}
/* Uma categoria com uma obra ganha card horizontal editorial sem vazio lateral. */
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single {
  overflow-x:hidden!important;scroll-snap-type:none!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card {
  flex:0 0 min(100%,760px)!important;width:min(100%,760px)!important;
  display:grid!important;grid-template-columns:minmax(140px,35%) minmax(0,1fr)!important;
  gap:clamp(14px,2.4vw,26px)!important;align-items:center!important;
  padding:clamp(12px,2.2vw,20px)!important;
  border:1px solid #eadde1!important;border-radius:15px!important;
  background:#fffdfb!important;box-shadow:none!important;
  margin:0!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card .jf-pe-cover {
  width:100%!important;max-width:none!important;margin:0!important;align-self:start!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card .jf-pe-card-body {
  min-width:0!important;min-height:0!important;align-self:center!important;
  display:flex!important;flex-direction:column!important;
  padding:0!important;margin:0!important;gap:5px!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card h4 {
  font-size:clamp(18px,2vw,24px)!important;line-height:1.25!important;
  margin:0 0 8px!important;min-height:0!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card .jf-pe-card-price {
  margin:0 0 8px!important;font-size:16px!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card .jf-pe-buy {
  margin:0!important;
}
/* Favoritar sem ocupar duas linhas de informação comercial. */
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-save.jf-pe-save-icon {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 44px!important;align-self:flex-start!important;
  width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;
  margin:7px 0 0!important;padding:0!important;border:1px solid #e0ccd4!important;
  border-radius:50%!important;background:#fffdfb!important;color:#6b1e3b!important;
  line-height:1!important;cursor:pointer!important;box-shadow:none!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-save.jf-pe-save-icon > span {
  font-size:27px!important;line-height:1!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-save.jf-pe-save-icon[aria-pressed="true"] {
  background:#f4e8ed!important;border-color:#ad7d8f!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-save.jf-pe-save-icon[aria-busy="true"] {opacity:.6}
/* Leitura prévia REAL só é impressa pelo plugin quando páginas estão cadastradas. */
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-prev-shortcode {
  display:flex!important;align-items:center;justify-content:center;gap:7px;
  width:100%!important;min-height:40px!important;margin:4px 0 0!important;
  padding:8px 9px!important;border:1px solid #a67c8a!important;
  border-radius:9px!important;background:#f9f1f4!important;color:#6b1e3b!important;
  font:700 12px/1.3 system-ui,sans-serif!important;cursor:pointer!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-prev-shortcode:hover {
  background:#efdee5!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-product-link {
  min-height:34px!important;padding:6px 0!important;
  font-size:12px!important;line-height:1.35!important;
}
/* A Constituição deixa de exibir título e botões apertados ao lado de uma capa grande. */
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-card {
  max-width:100%!important;min-width:0!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-info {
  min-width:0!important;overflow-wrap:break-word!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-preview {
  max-width:100%!important;min-width:0!important;
}
body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-preview summary {
  overflow-wrap:anywhere!important;
}
@media(max-width:700px){
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail-section {
    margin:14px 0 23px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail-top h3 {
    font-size:clamp(21px,5vw,26px)!important;line-height:1.2!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail:not(.jf-pe-rail--single) > .jf-pe-card,
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail:not(.jf-pe-rail--single) > .jf-pe-free-card {
    flex:0 0 calc((100% - 14px)/2.07)!important;
    width:calc((100% - 14px)/2.07)!important;
    min-width:0!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-card .jf-pe-card-body{
    padding:8px 0 5px!important;min-height:0!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-card h4,
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-free-card h4 {
    min-height:0!important;font-size:clamp(14px,3.7vw,17px)!important;
    line-height:1.32!important;margin:4px 0 8px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-card .jf-pe-card-price {
    margin:0 0 8px!important;font-size:13px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail .jf-pe-card .jf-pe-buy {
    margin:0!important;min-height:42px!important;
    padding:9px 8px!important;font-size:12px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card {
    grid-template-columns:minmax(0,38%) minmax(0,1fr)!important;
    gap:12px!important;padding:10px!important;align-items:start!important;
    width:100%!important;flex-basis:100%!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card .jf-pe-card-body{
    padding:3px 0!important;min-height:0!important;gap:3px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card h4 {
    font-size:clamp(16px,4.1vw,19px)!important;line-height:1.26!important;margin:0 0 5px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card .jf-pe-card-price{
    margin:0 0 5px!important;font-size:14px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-card {
    display:grid!important;grid-template-columns:1fr!important;
    justify-items:stretch!important;align-items:start!important;
    gap:16px!important;padding:16px!important;
    background:#fffdfb!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-cover {
    width:min(48%,175px)!important;max-width:175px!important;
    aspect-ratio:5 / 8!important;justify-self:start!important;
    padding:13px 8px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-cover strong {
    font-size:clamp(17px,4.7vw,25px)!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-info h4 {
    font-size:clamp(20px,5.2vw,25px)!important;line-height:1.28!important;
    overflow-wrap:break-word!important;margin:5px 0 10px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-info p {
    font-size:13px!important;line-height:1.55!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-links {
    display:flex!important;flex-direction:column!important;
    align-items:stretch!important;gap:8px!important;margin:12px 0!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-links>a {
    width:100%!important;min-height:44px!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    text-align:center!important;margin:0!important;padding:10px 12px!important;
    border-radius:9px!important;font-size:13px!important;line-height:1.35!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-links>a:not(.jf-pe-btn) {
    border:1px solid #e0d1d7!important;background:#fff!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-preview summary {
    font-size:14px!important;line-height:1.4!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-preview object{
    height:60dvh!important;min-height:300px!important;max-height:640px!important;
  }
  /* Distância suficiente para o menu fixo sem alterar a barra de navegação. */
  body.jf-pe-template-active .jf-pe-reading-hub{padding-bottom:110px!important;}
}
@media(max-width:360px){
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card {
    grid-template-columns:minmax(0,36%) minmax(0,1fr)!important;gap:10px!important;padding:8px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail.jf-pe-rail--single > .jf-pe-card h4 {
    font-size:15px!important;
  }
  body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-document-cover {width:min(54%,165px)!important;}
}
@media(prefers-reduced-motion:reduce){body.jf-pe-template-active .jf-pe-reading-hub .jf-pe-rail{scroll-behavior:auto!important}}
