/* Approved library palette and spacing. Scoped to the plugin, not the WP theme. */
#bs-wrapper {
  --bs-blue:#3d2914; --bs-blue-light:#5c4433; --bs-blue-lighter:#7a6250;
  --bs-orange:#7a5727; --bs-orange-hover:#3d2914; --bs-orange-light:#faf4e5;
  --bs-text:#2d1f14; --bs-text-light:#7a6250; --bs-bg:#faf8f3;
  --bs-border:#e0d5c8; --bs-radius:12px; --bs-shadow:none; --bs-shadow-hover:none;
  background:#faf8f3; max-width:1320px!important; padding:28px 24px 40px!important;
  font-size:16px!important;
}
#bs-wrapper :focus-visible{outline:2px solid #7a6250!important;outline-offset:4px}
#bs-wrapper .bs-book-layout{grid-template-columns:280px minmax(0,1fr);gap:32px}
#bs-wrapper .bs-book-main{min-width:0}
#bs-wrapper .bs-book-header,#bs-wrapper .bs-book-nav-bottom{
  width:100%;padding:16px!important;border:1px solid var(--bs-border);border-radius:12px;
  background:#fff;box-shadow:none;margin:0 0 16px;gap:16px;
}
#bs-wrapper .bs-book-header{align-items:center}
#bs-wrapper .bs-book-nav-bottom{margin-block:16px 0}
#bs-wrapper .bs-book-nav{gap:8px}
#bs-wrapper .bs-nav-btn,#bs-wrapper .bs-back-link{
  min-height:44px;display:inline-flex;align-items:center;justify-content:center;
  padding:10px 16px!important;background:#f0ebe4!important;color:#3d2914!important;
  border-radius:8px!important;line-height:1.4;font-size:14px!important;box-shadow:none;
}
#bs-wrapper .bs-nav-btn:hover,#bs-wrapper .bs-back-link:hover{background:#e6ded3!important;transform:none;color:#2d1f14!important}
#bs-wrapper .bs-page-display{font-size:14px;font-variant-numeric:tabular-nums}
#bs-wrapper .bs-book-info h1{font-family:var(--bs-font-book)!important;font-size:28px!important;line-height:1.5!important}
#bs-wrapper .bs-book-meta{font-size:14px}
#bs-wrapper .bs-book-tools{flex-wrap:wrap;gap:8px}
#bs-wrapper .bs-book-tools button{min-width:44px;width:auto;height:44px;padding:8px 12px;color:#3d2914;line-height:1.4}
#bs-wrapper .bs-book-content{width:100%;padding:40px!important;font-size:calc(22px * var(--bs-reader-scale,1))!important;overflow-wrap:anywhere}
#bs-wrapper .bs-book-content p{max-width:none;text-align:right;line-height:1.9!important}
#bs-wrapper .bs-book-content p,#bs-wrapper .bs-book-content span,#bs-wrapper .bs-book-content a{font-family:var(--bs-font-book)!important}
#bs-wrapper .bs-book-sidebar{border-radius:12px;box-shadow:none}
#bs-wrapper .bs-book-sidebar-header{background:#fff!important;color:#3d2914!important;text-align:right!important;font-size:18px!important}
#bs-wrapper .bs-book-sidebar-section h4{font-size:15px}
#bs-wrapper .bs-toc-filter input{font-size:14px;min-height:44px;background:#fff}
#bs-wrapper .bs-toc-item{font-size:14px;border:0;min-height:40px;align-items:center}
#bs-wrapper .bs-toc-item.active{background:#faf0d6;border:0}
#bs-wrapper .bs-sidebar-other{font-size:14px}
#bs-wrapper .bs-breadcrumb{background:transparent;border:0;padding:0;gap:8px}
#bs-wrapper .bs-hero{background:transparent!important;color:#2d1f14!important;box-shadow:none;padding:24px 0!important;border:0}
#bs-wrapper .bs-hero h1,#bs-wrapper .bs-hero p{color:#3d2914!important}
#bs-wrapper .bs-section-title{border:0!important}
#bs-wrapper .bs-books-grid,#bs-wrapper .bs-covers-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
#bs-wrapper .bs-book-card,#bs-wrapper .bs-cover{background:#fff!important;border:1px solid #e0d5c8!important;border-radius:12px;box-shadow:none;min-height:150px;aspect-ratio:auto;transform:none!important}
#bs-wrapper .bs-cover-wrap{text-align:right}
#bs-wrapper .bs-cover-wrap:hover .bs-cover{transform:none;box-shadow:none}
#bs-wrapper .bs-cover-spine,#bs-wrapper .bs-cover-border,#bs-wrapper .bs-cover-border-inner,#bs-wrapper .bs-cover-corner,#bs-wrapper .bs-book-spine{display:none}
#bs-wrapper .bs-cover *{color:#3d2914!important;text-shadow:none!important}
#bs-wrapper .bs-cover-ornament-top,#bs-wrapper .bs-cover-ornament-bottom,#bs-wrapper .bs-cover-col-r,#bs-wrapper .bs-cover-col-l,#bs-wrapper .bs-cover-sep,#bs-wrapper .bs-cover-ornament-star{display:none}
#bs-wrapper .bs-cover-inner{position:static;align-items:flex-start;text-align:right;padding:24px;min-height:150px}
#bs-wrapper .bs-cover-title{font-family:var(--bs-font-book)!important;font-size:24px!important}
#bs-wrapper .bs-cover-badge{position:static;transform:none;background:#f0ebe4;border:0;padding:4px 8px;font-size:12px;margin-top:12px;white-space:normal}
#bs-wrapper .bs-cover-meta{font-size:14px}
#bs-wrapper .bs-cover::before,#bs-wrapper .bs-cover::after,#bs-wrapper .bs-book-content::before,#bs-wrapper .bs-book-header::before{display:none!important}
/* Override theme/plugin resets that previously flattened the conversation form. */
#bs-wrapper #ai-answer-block.ai-block{background:#faf8f3;border:0;border-radius:12px;box-shadow:none;padding:28px;margin-block:0 24px}
#bs-wrapper .ai-chat h3{font-size:15px!important;color:#7a6250!important;margin:0 0 20px!important}
#bs-wrapper .ai-chat h4{font-family:var(--bs-font-book)!important;font-size:28px!important;line-height:1.5!important;margin:0 0 20px!important}
#bs-wrapper .ai-chat-answer{font-family:var(--bs-font-book)!important;font-size:22px!important;line-height:1.9!important}
#bs-wrapper .ai-chat-sources blockquote{font-family:var(--bs-font-book)!important;font-size:19px!important;line-height:1.8!important;border:0!important;background:none!important;padding:0!important;margin:14px 0!important;box-shadow:none!important}
#bs-wrapper .ai-chat-sources blockquote::before,#bs-wrapper .ai-chat-sources blockquote::after{display:none!important}
#bs-wrapper .ai-chat-sources summary{font-size:15px!important;line-height:1.7!important;color:#3d2914}
#bs-wrapper .ai-chat-sources a,#bs-wrapper .ai-chat-ref{color:#5c4433!important;text-decoration:underline!important;font-size:14px!important}
#bs-wrapper .ai-chat form{display:grid!important;gap:12px;padding:0;border:0;margin-top:16px}
#bs-wrapper .ai-chat form[hidden]{display:none!important}
#bs-wrapper .ai-chat label{font-size:14px!important;color:#5c4433!important}
#bs-wrapper .ai-chat textarea{display:block;width:100%;min-height:100px;background:#fff!important;border:1px solid #e0d5c8!important;border-radius:10px!important;padding:16px!important;font:inherit!important;box-shadow:none!important;color:#2d1f14!important}
#bs-wrapper .ai-chat button{width:auto!important;min-height:44px;padding:12px 20px!important;border:0!important;border-radius:8px!important;background:#e4be5a!important;color:#2d1f14!important;font:inherit!important;line-height:1.5!important;justify-self:start;box-shadow:none!important}
#bs-wrapper .ai-chat mark.ai-match{background:#f5e3a8!important;color:inherit!important;border:0!important;border-radius:3px;padding:0 .08em!important;font:inherit!important;box-shadow:none!important}
@media(max-width:1000px){#bs-wrapper .bs-book-layout{grid-template-columns:240px minmax(0,1fr);gap:20px}#bs-wrapper .bs-books-grid,#bs-wrapper .bs-covers-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:768px){
  #bs-wrapper{padding:16px!important}#bs-wrapper .bs-book-layout{grid-template-columns:minmax(0,1fr);gap:16px}
  #bs-wrapper .bs-book-header{display:block}#bs-wrapper .bs-book-header .bs-book-nav{margin-top:12px}
  #bs-wrapper .bs-book-nav{justify-content:center}#bs-wrapper .bs-book-nav .bs-page-display{order:-1;flex-basis:100%;text-align:center}
  #bs-wrapper .bs-book-content{padding:24px 20px!important;font-size:calc(20px * var(--bs-reader-scale,1))!important}
  #bs-wrapper .bs-book-sidebar{position:static}#bs-wrapper .bs-toc-list{max-height:200px}
  #bs-wrapper #ai-answer-block.ai-block{padding:20px 14px}#bs-wrapper .ai-chat h4{font-size:24px!important}
  #bs-wrapper .ai-chat-answer{font-size:20px!important}
}
@media(max-width:600px){#bs-wrapper .bs-books-grid,#bs-wrapper .bs-covers-grid{grid-template-columns:minmax(0,1fr)}}
@media print{#bs-wrapper{background:white;padding:0!important}#bs-wrapper .bs-book-content{border:0!important}}
