.search-input-wrap{
  position:relative;
  min-width: 0;
}

.search-input-wrap #searchInput{
  padding-right:2.6rem;
}
.book-menu-wrap{
 position: absolute;
  top:50%;
  right:.35rem;
  transform:translateY(-50%);
    display:flex;
  align-items:center;
}

.book-menu-toggle{
  width:2.1rem;
  height:2.1rem;
  border:none;
  border-radius:.55rem;
  background:transparent;
  color:#6b7280;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background-color .2s ease, color .2s ease;
}

.book-menu-toggle:hover,
.book-menu-toggle:focus-visible{
  background:rgba(107,114,128,.16);
  color:#1f2937;
  outline:none;
}

.book-menu-dropdown{
  position:absolute;
  top:calc(100% + .55rem);
  left:50%;
  transform:translateX(-50%);
  width:min(760px,92vw);
  background:#fff;
  border:1px solid #d1d5db;
  border-radius:.85rem;
  box-shadow:0 16px 38px rgba(15,23,42,.18);
  padding:.75rem;
  z-index:1200;
}

.book-menu-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:.85rem;
}

.book-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.65rem;
  min-height:350px;
}

.book-column{
  border:1px solid #e5e7eb;
  border-radius:.7rem;
  padding:.55rem;
  overflow:auto;
  max-height:52vh;
}

.book-column-title,
.chapter-title{
  font-size:.75rem;
  font-weight:700;
  color:#6b7280;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:.45rem;
}

.book-list,
.chapter-list{
  display:flex;
  flex-wrap:wrap;
  gap:.3rem;
}

.book-chip,
.chapter-chip{
  border:1px solid #d1d5db;
  background:#f9fafb;
  color:#111827;
  border-radius:.55rem;
  font-size:.8rem;
  line-height:1.1;
  padding:.3rem .45rem;
}

.book-chip:hover,
.chapter-chip:hover{
  background:#eef2f7;
}

.book-chip.is-active,
.chapter-chip.is-active{
  background:#4b2743;
  border-color:#4b2743;
  color:#fff;
}

.chapter-panel{
  border:1px solid #e5e7eb;
  border-radius:.7rem;
  padding:.55rem;
  max-height:52vh;
  overflow:auto;
}

.chapter-empty{
  color:#6b7280;
  font-size:.85rem;
}

@media (max-width: 992px){
  .book-menu-grid{ grid-template-columns:1fr; }
    .book-menu-dropdown{ width:min(760px,96vw); }
}
