.bookshelf-wrap{margin-bottom:70px}
.shelf-title{font-size:22px;margin-bottom:12px}
.wood-shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:22px;padding:25px;background:linear-gradient(180deg,#e6c89f,#caa06c);border-radius:8px;box-shadow:inset 0 -8px 0 #a97946}
.book-cover{position:relative;cursor:pointer}
.book-front{height:200px;border-radius:4px;overflow:hidden;box-shadow:0 6px 14px rgba(0,0,0,.25);display:flex;align-items:center;justify-content:center}
.book-front img{width:100%;height:100%;object-fit:cover}
.fallback-title{color:#fff;padding:12px;font-size:14px;text-align:center;font-weight:600}
.book-hover{position:absolute;inset:0;background:#fff;border-radius:4px;display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px;opacity:0;transition:.25s}
.book-cover:hover .book-hover{opacity:1}
.author{font-style:italic;color:#666;font-size:13px}
#book-modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;z-index:9999}
#book-modal .modal-content{background:#fff;padding:20px;border-radius:6px;max-width:90%;max-height:90%;overflow:auto}
#book-modal .close{position:absolute;right:20px;top:15px;font-size:26px;cursor:pointer}
@media (max-width:768px){
  .desktop-only{display:none}
}
/* ===== HOVER PANEL BELOW SHELF ===== */

.shelf-hover-panel {
  display: none;
  margin-top: 18px;
  background: #fff;
  border-radius: 8px;
  padding: 22px 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  border-left: 8px solid #caa06c;
}

.shelf-hover-panel.active {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

/* Left content */
.shelf-hover-left {
  font-size: 15px;
  line-height: 1.6;
}

.shelf-hover-left h3 {
  margin-top: 0;
  font-size: 20px;
}

/* Right content */
.shelf-hover-right {
  font-size: 14px;
  background: #faf7f2;
  padding: 16px;
  border-radius: 6px;
}

.shelf-hover-right pre {
  white-space: pre-wrap;
  font-family: inherit;
}

/* Disable old hover overlay */
.book-hover {
  display: none !important;
}

/* Hover effect on book */
.book-cover:hover .book-front {
  transform: translateY(-4px);
  transition: .2s ease;
}

/* Mobile */
@media (max-width: 768px) {
  .shelf-hover-panel {
    display: none !important;
  }
}
