/* Biblioteca Editorial 3.6 — visual enhancement limited to marked cards. */
body.jf-lib-editorial {
  --jf-editorial-wine: #6b1e3b;
  --jf-editorial-plum: #8b5e6e;
  --jf-editorial-mauve: #a67c8a;
  --jf-editorial-gold: #c79665;
  --jf-editorial-text: #543b42;
  --jf-editorial-cream: #ede6dd;
}
body.jf-lib-editorial .jf-lib-intro-card {
  --jf-bg: #f2e5ea;
  --jf-border: #d9bec8;
  box-sizing: border-box !important;
  padding: 14px 17px !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 7px 0 !important;
  border: 1px solid var(--jf-border) !important;
  border-radius: 14px !important;
  background: var(--jf-bg) !important;
  box-shadow: none !important;
}
body.jf-lib-editorial .jf-lib-intro-diario { --jf-bg: #f7efe4; --jf-border: #e1c8aa; }
body.jf-lib-editorial .jf-lib-intro-card .jf-lib-intro-title {
  font-size: clamp(17px, 2.1vw, 21px) !important;
  line-height: 1.18 !important;
  font-weight: 600 !important;
  letter-spacing: -0.012em;
  margin: 3px 0 7px !important;
  color: var(--jf-editorial-wine) !important;
}
body.jf-lib-editorial .jf-lib-intro-card p {
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: var(--jf-editorial-text) !important;
  margin: 5px 0 9px !important;
}
body.jf-lib-editorial .jf-lib-intro-card :is(a,button) {
  box-sizing: border-box !important;
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}
/* 1. Reduce editorial interstitials above the real shelf */
body.jf-lib-editorial .jf-lib-support-heading {
  font-size: clamp(18px, 3.4vw, 24px) !important;
  line-height: 1.18 !important;
  margin: 9px 0 6px !important;
  letter-spacing: -.015em;
}
body.jf-lib-editorial .jf-lib-support-panel { margin-block: 5px 10px !important; padding-block: 0 !important; }
body.jf-lib-editorial .jf-lib-support-panel > p { margin-block: 4px 8px !important; line-height: 1.4 !important; }
body.jf-lib-editorial .jf-lib-support-panel :is(a,button) { font-size: 13px !important; }
/* 2. Collection headings behave as concise dividers; leave underlying slider untouched */
body.jf-lib-editorial .jf-lib-collection-title {
  --jf-accent: #a67c8a;
  color: var(--jf-editorial-wine) !important;
  padding-left: 10px !important;
  border-left: 3px solid var(--jf-accent) !important;
  margin: 16px 0 9px !important;
  line-height: 1.18 !important;
  letter-spacing: -.012em;
}
body.jf-lib-editorial .jf-lib-header-essencia { --jf-accent: #a67c8a; }
body.jf-lib-editorial .jf-lib-header-autoconhecimento { --jf-accent: #8b5e6e; }
body.jf-lib-editorial .jf-lib-header-estilo { --jf-accent: #c79665; }
body.jf-lib-editorial .jf-lib-header-dicas { --jf-accent: #ba967b; }
body.jf-lib-editorial .jf-lib-header-gratuitos { --jf-accent: #9b8d78; }
body.jf-lib-editorial .jf-lib-header-classicos { --jf-accent: #6b1e3b; }
/* 3. A function-oriented color system: all categories retain readable burgundy type */
body.jf-lib-editorial .jf-lib-tone-essencia {
  --jf-card-bg:#f8edf1; --jf-card-stroke:#dec9d1; --jf-cover-bg:#f3e4ea;
}
body.jf-lib-editorial .jf-lib-tone-autoconhecimento {
  --jf-card-bg:#f2e4e9; --jf-card-stroke:#d6b8c4; --jf-cover-bg:#ebd8df;
}
body.jf-lib-editorial .jf-lib-tone-estilo {
  --jf-card-bg:#f8f0e5; --jf-card-stroke:#dfc9ae; --jf-cover-bg:#f0e4d4;
}
body.jf-lib-editorial .jf-lib-tone-dicas {
  --jf-card-bg:#f6e9e0; --jf-card-stroke:#e0c5b3; --jf-cover-bg:#f1ddcf;
}
body.jf-lib-editorial .jf-lib-tone-gratuitos {
  --jf-card-bg:#f2ede5; --jf-card-stroke:#dacebc; --jf-cover-bg:#e9e1d5;
}
body.jf-lib-editorial .jf-lib-tone-classicos {
  --jf-card-bg:#f4e9ed; --jf-card-stroke:#d4bcc6; --jf-cover-bg:#eedde4;
}
body.jf-lib-editorial .jf-lib-book-card {
  box-sizing: border-box !important;
  min-width: 0;
  padding-bottom: 8px !important;
  border: 1px solid var(--jf-card-stroke, #dfcfd3) !important;
  background-color: var(--jf-card-bg, #f5eeeb) !important;
  border-radius: 13px !important;
  box-shadow: 0 2px 9px rgba(65,29,43,.035) !important;
  color: var(--jf-editorial-text) !important;
  overflow: hidden;
}
body.jf-lib-editorial .jf-lib-book-card .jf-lib-cover-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background-color: var(--jf-cover-bg, #f1e6e8) !important;
  padding: 9px !important;
  max-height: 260px !important;
}
body.jf-lib-editorial .jf-lib-book-card .jf-lib-cover-image {
  display: block;
  max-width: 100% !important;
  max-height: 235px !important;
  width: auto;
  height: auto;
  object-fit: contain !important;
  margin-inline: auto;
}
body.jf-lib-editorial .jf-lib-book-card .jf-lib-book-title {
  font-size: clamp(14px, 1.55vw, 17px) !important;
  line-height: 1.28 !important;
  font-weight: 600 !important;
  color: var(--jf-editorial-wine) !important;
  overflow-wrap: break-word;
}
/* 4. CTA hierarchy, preserve original text, events and tab order */
body.jf-lib-editorial .jf-lib-book-card :is(a,button) { border-radius: 8px !important; }
body.jf-lib-editorial .jf-lib-book-card .jf-lib-action-primary {
  background: #6b1e3b !important;
  border: 1px solid #6b1e3b !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  padding: 10px 12px !important;
  min-height: 40px !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
body.jf-lib-editorial .jf-lib-book-card .jf-lib-action-secondary {
  border: 0 !important;
  color: #6b1e3b !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 7px 5px !important;
  min-height: 32px !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.jf-lib-editorial .jf-lib-book-card .jf-lib-action-save {
  border: 1px solid #dfcbd2 !important;
  background: rgba(255,255,255,.65) !important;
  color: #6b1e3b !important;
  box-shadow: none !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  padding: 8px 7px !important;
  min-height: 38px !important;
}
/* 5. Existing navigation anchors are the immediate reader shortcut */
body.jf-lib-editorial .jf-lib-nav-reading { font-weight: 700 !important; }
body.jf-lib-editorial .jf-lib-nav-classics { text-decoration-thickness: 1.5px; }
body.jf-lib-editorial :is(.jf-lib-book-card,.jf-lib-intro-card) :is(a,button):focus-visible,
body.jf-lib-editorial :is(.jf-lib-nav-reading,.jf-lib-nav-classics):focus-visible {
  outline: 3px solid #c79665 !important;
  outline-offset: 3px !important;
}
body.jf-lib-editorial .jf-lib-collection-title { scroll-margin-top: 82px; }
@media (max-width: 767px) {
  body.jf-lib-editorial .jf-lib-intro-card {
    padding: 10px 12px !important;
    margin: 5px 0 !important;
    border-radius: 12px !important;
  }
  body.jf-lib-editorial .jf-lib-intro-card .jf-lib-intro-title {
    font-size: 16px !important;
    line-height: 1.17 !important;
    margin: 2px 0 4px !important;
  }
  body.jf-lib-editorial .jf-lib-intro-card p {
    margin: 3px 0 7px !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  body.jf-lib-editorial .jf-lib-intro-card :is(a,button) {
    min-height: 37px !important;
    padding: 7px 11px !important;
    font-size: 12px !important;
  }
  body.jf-lib-editorial .jf-lib-support-heading { font-size: 18px !important; margin-block: 8px 5px !important; }
  body.jf-lib-editorial .jf-lib-collection-title { font-size: clamp(20px, 5.1vw, 24px) !important; margin-block: 12px 7px !important; }
  body.jf-lib-editorial .jf-lib-book-card { border-radius: 11px !important; }
  body.jf-lib-editorial .jf-lib-book-card .jf-lib-cover-frame { max-height: 190px !important; padding: 7px !important; }
  body.jf-lib-editorial .jf-lib-book-card .jf-lib-cover-image { max-height: 170px !important; }
  body.jf-lib-editorial .jf-lib-book-card .jf-lib-book-title { font-size: 13px !important; line-height: 1.3 !important; }
  body.jf-lib-editorial .jf-lib-book-card .jf-lib-action-primary { min-height: 40px !important; padding: 8px 9px !important; font-size: 11px !important; }
  body.jf-lib-editorial .jf-lib-book-card .jf-lib-action-secondary { font-size: 12px !important; padding: 5px 3px !important; }
  body.jf-lib-editorial .jf-lib-book-card .jf-lib-action-save { min-height: 36px !important; font-size: 11.5px !important; padding: 7px 5px !important; }
}
@media (prefers-reduced-motion:reduce) {
  body.jf-lib-editorial .jf-lib-book-card,
  body.jf-lib-editorial .jf-lib-intro-card { transition: none !important; animation: none !important; }
}
