/* PG music mini player bar + popovers - extracted verbatim from
   pristinegrace.org floating_stack_template.php so pgsongs looks IDENTICAL. */
#bookMusicBottomBar { display: grid; grid-template-columns: 1fr 2fr 1fr; position: fixed; bottom: 0; left: 0; right: 0; height: 72px; z-index: 9500; background: rgba(26, 26, 46, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(139, 92, 246, 0.25); box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25); align-items: center; gap: 0.75rem; padding: 0 0.9rem; }
#bookMusicBottomBar .bmbb-aux { justify-self: end; }
#bookMusicBottomBar .bmbb-meta { min-width: 0; max-width: 100%; }
body.music-modal-open #bookMusicBottomBar { z-index: 10000; }
#bookMusicBottomBar.bmbb-vol-open { z-index: 10001; }
@media (max-width: 991.98px) {
  #bookMusicBottomBar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.35rem; row-gap: 4px; padding: 6px 0.5rem 4px; height: auto; min-height: 84px; align-items: center; }
  #bookMusicBottomBar .bmbb-center { display: contents; }
  #bookMusicBottomBar .bmbb-meta { grid-row: 1; grid-column: 1; min-width: 0; max-width: none; gap: 0.4rem; padding-right: 0.1rem; }
  #bookMusicBottomBar .bmbb-controls { grid-row: 1; grid-column: 2; justify-self: center; gap: 0.1rem; }
  #bookMusicBottomBar .bmbb-aux { grid-row: 1; grid-column: 3; gap: 0.2rem; justify-self: stretch; justify-content: space-between; }
  #bookMusicBottomBar .bmbb-progress-row { grid-row: 2; grid-column: 1 / -1; flex: initial; max-width: none; gap: 0.5rem; }
  #bookMusicBottomBar .bmbb-ctrl { width: 30px; height: 30px; font-size: 0.85rem; }
  #bookMusicBottomBar #bmbbPrev, #bookMusicBottomBar #bmbbNext { width: 40px; height: 40px; font-size: 1.4rem; }
  #bookMusicBottomBar .bmbb-play { width: 44px; height: 44px; font-size: 1.3rem; }
  #bookMusicBottomBar .bmbb-expand { width: auto; height: 28px; padding: 0 0.5rem; font-size: 0.74rem; }
  #bookMusicBottomBar .bmbb-cover { width: 36px; height: 36px; }
  #bookMusicBottomBar .bmbb-track { font-size: 0.82rem; }
  #bookMusicBottomBar .bmbb-album { font-size: 0.7rem; }
  #bookMusicBottomBar .bmbb-aux-sep { display: none; }
  #bookMusicBottomBar .bmbb-vol-wrap { display: none; }
  #bookMusicBottomBar .bmbb-progress-row .bmbb-time { font-size: 0.62rem; min-width: 28px; }
}
@media (max-width: 480px) {
  #bookMusicBottomBar #bmbbShuffle, #bookMusicBottomBar #bmbbRepeat { display: none; }
}
@media (min-width: 1100px) {
  body:has(.chapter-sidebar:not(.collapsed)) #bookMusicBottomBar { left: 280px; }
}
html[data-theme="light"] #bookMusicBottomBar { background: rgba(246, 249, 255, 0.95); border-top-color: rgba(139, 92, 246, 0.2); color: #1a1a2e; }
.bmbb-meta { display: flex; align-items: center; gap: 0.6rem; background: none; border: none; padding: 0.25rem 0.5rem 0.25rem 0; margin: 0; cursor: pointer; border-radius: 8px; min-width: 0; text-align: left; transition: background 0.15s; }
.bmbb-meta:hover { background: rgba(139, 92, 246, 0.12); }
.bmbb-cover { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; cursor: pointer; transition: transform 0.18s ease-out; }
.bmbb-cover:hover { transform: scale(1.08); }
.bmbb-cover:active { transform: scale(0.96); }
.bmbb-info { flex: 1 1 auto; min-width: 0; max-width: 240px; overflow: hidden; }
.bmbb-meta { flex-shrink: 1; min-width: 0; }
.bmbb-track { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.85rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmbb-track .bmbb-track-inner { display: inline-block; will-change: transform; }
.bmbb-track.is-overflowing { text-overflow: clip; -webkit-mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.bmbb-track.is-overflowing .bmbb-track-inner { animation: bmbb-marquee var(--bmbb-marquee-duration, 8s) ease-in-out 1.2s infinite alternate; }
@keyframes bmbb-marquee {
    
    0%   { transform: translateX(12px); }
    10%  { transform: translateX(12px); }
    90%  { transform: translateX(calc(-1 * var(--bmbb-overflow, 0px) - 12px)); }
    100% { transform: translateX(calc(-1 * var(--bmbb-overflow, 0px) - 12px)); }
}
@media (prefers-reduced-motion: reduce) {
  .bmbb-track.is-overflowing .bmbb-track-inner { animation: none; }
}
html[data-theme="light"] .bmbb-track { color: #1a1a2e; }
.bmbb-album { font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmbb-album .bmbb-album-inner { display: inline-block; will-change: transform; }
.bmbb-album.is-overflowing { text-overflow: clip; -webkit-mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.bmbb-album.is-overflowing .bmbb-album-inner { animation: bmbb-marquee var(--bmbb-marquee-duration, 8s) ease-in-out 1.2s infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  .bmbb-album.is-overflowing .bmbb-album-inner { animation: none; }
}
html[data-theme="light"] .bmbb-album { color: rgba(26, 26, 46, 0.6); }
.bmbb-center { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; }
.bmbb-progress-row { display: flex; align-items: center; gap: 0.6rem; width: 100%; max-width: 560px; min-width: 0; }
.bmbb-progress-row .bmbb-time { font-size: 0.7rem; color: rgba(255, 255, 255, 0.55); flex-shrink: 0; font-variant-numeric: tabular-nums; min-width: 34px; }
.bmbb-progress-row .bmbb-time-right { text-align: right; }
html[data-theme="light"] .bmbb-progress-row .bmbb-time { color: rgba(26, 26, 46, 0.55); }
.bmbb-progress { flex: 1 1 auto; min-width: 0; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255, 255, 255, 0.15); border-radius: 2px; outline: none; cursor: pointer; }
html[data-theme="light"] .bmbb-progress { background: rgba(0, 0, 0, 0.12); }
.bmbb-progress::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #a78bfa; cursor: pointer; }
.bmbb-aux { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.bmbb-aux-sep { display: inline-block; width: 1px; height: 20px; background: rgba(255, 255, 255, 0.15); margin: 0 0.15rem; flex-shrink: 0; }
html[data-theme="light"] .bmbb-aux-sep { background: rgba(26, 26, 46, 0.15); }
.bmbb-vol-wrap { position: relative; flex-shrink: 0; }
.bmbb-vol-popup { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); background: rgba(26, 26, 46, 0.98); border: 1px solid rgba(139, 92, 246, 0.3); border-radius: 10px; padding: 14px 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4); z-index: 9600; display: flex; align-items: center; justify-content: center; }
html[data-theme="light"] .bmbb-vol-popup { background: rgba(246, 249, 255, 0.98); border-color: rgba(139, 92, 246, 0.25); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15); }
.bmbb-vol-popup[hidden] { display: none !important; }
.bmbb-vol-popup .bmbb-volume { -webkit-appearance: slider-vertical; appearance: slider-vertical; writing-mode: vertical-lr; direction: rtl; width: 6px; height: 120px; padding: 0; margin: 0; }
.bmbb-controls { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.bmbb-ctrl { width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; }
html[data-theme="light"] .bmbb-ctrl { color: rgba(26, 26, 46, 0.7); }
.bmbb-ctrl:hover { background: rgba(139, 92, 246, 0.18); color: #fff; }
html[data-theme="light"] .bmbb-ctrl:hover { color: #1a1a2e; }
.bmbb-ctrl.active { color: #a78bfa; }
.bmbb-ctrl#bmbbShuffle, .bmbb-ctrl#bmbbPrev, .bmbb-ctrl#bmbbNext, .bmbb-ctrl#bmbbRepeat { width: 38px; height: 38px; font-size: 1.15rem; }
.bmbb-play { width: 44px; height: 44px; background: rgba(139, 92, 246, 0.85); color: #fff; font-size: 1.3rem; }
.bmbb-play:hover { background: rgba(139, 92, 246, 1); }
.bmbb-volume { width: 140px; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255, 255, 255, 0.18); border-radius: 2px; outline: none; cursor: pointer; }
html[data-theme="light"] .bmbb-volume { background: rgba(0, 0, 0, 0.15); }
.bmbb-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #a78bfa; cursor: pointer; }
.bmbb-expand { height: 32px; padding: 0 0.7rem; border-radius: 16px; border: 1px solid rgba(167, 139, 250, 0.55); background: rgba(124, 58, 237, 0.18); color: #c4b5fd; cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.bmbb-expand .bmbb-expand-label { white-space: nowrap; }
html[data-theme="light"] .bmbb-expand { color: #6d28d9; background: rgba(124, 58, 237, 0.1); border-color: rgba(124, 58, 237, 0.4); }
.bmbb-expand:hover { color: #fff; background: rgba(124, 58, 237, 0.55); border-color: rgba(167, 139, 250, 0.85); }
html[data-theme="light"] .bmbb-expand:hover { color: #fff; background: #7c3aed; border-color: #7c3aed; }
.bmbb-expand.active { color: #fff; background: #7c3aed; border-color: #7c3aed; }
@media (max-width: 991.98px) {
  .bmbb-expand { padding: 0 0.5rem; gap: 0; font-size: 0.78rem; }
  .bmbb-expand .bmbb-expand-label { display: none; }
  .bmbb-expand i { font-size: 1rem; }
}
.bmbb-song-page { text-decoration: none; color: rgba(255, 255, 255, 0.6); flex-shrink: 0; }
html[data-theme="light"] .bmbb-song-page { color: rgba(26, 26, 46, 0.55); }
.bmbb-song-page:hover { color: #a78bfa; }
@media (max-width: 991.98px) {
  .bmbb-song-page { display: none; }
}
.bmbb-share-btn { flex-shrink: 0; }
.bmbb-share-btn.copied { color: #22c55e !important; }
html[data-theme="light"] .bmbb-share-btn.copied { color: #16a34a !important; }
.bmbb-upnext-panel { position: fixed; left: 12px; bottom: 84px; z-index: 9997; width: 354px; max-width: calc(100vw - 24px); background: #17151f; border: 1px solid #34303f; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,0.55); overflow: hidden; color: #e7e4ee; }
html[data-theme="light"] .bmbb-upnext-panel { background: #fff; border-color: #e2dff0; color: #1a1a2e; }
.bmbb-upnext-cell { position: relative; width: 32px; height: 32px; flex-shrink: 0; border-radius: 4px; overflow: hidden; background: rgba(139, 92, 246, 0.10); }
.bmbb-upnext-cell .bmbb-upnext-art { display: block; width: 100%; height: 100%; object-fit: cover; }
.bmbb-upnext-cell .bmbb-upnext-dur { position: absolute; right: 1px; bottom: 1px; font-size: 0.52rem; line-height: 1; color: #fff; background: rgba(0, 0, 0, 0.65); padding: 1px 2px; border-radius: 2px; font-variant-numeric: tabular-nums; opacity: 0.55; pointer-events: none; }
.bmbb-upnext-row.now .bmbb-upnext-cell .bmbb-upnext-dur { opacity: 1; }
.bmbb-upnext-cell .bmbb-upnext-eq { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 2px; background: rgba(0, 0, 0, 0.55); }
.bmbb-upnext-row.now:not(.is-paused) .bmbb-upnext-cell .bmbb-upnext-eq { display: flex; }
.bmbb-upnext-row.now:not(.is-paused) .bmbb-upnext-cell:hover .bmbb-upnext-eq { display: none; }
.bmbb-upnext-cell .bmbb-upnext-eq i { width: 2.5px; height: 11px; background: #fff; border-radius: 1px; animation: album-eqbar 0.9s ease-in-out infinite; }
.bmbb-upnext-cell .bmbb-upnext-eq i:nth-child(3) { animation-delay: 0s; }
.bmbb-upnext-cell .bmbb-upnext-eq i:nth-child(2), .bmbb-upnext-cell .bmbb-upnext-eq i:nth-child(4) { animation-delay: 0.18s; }
.bmbb-upnext-cell .bmbb-upnext-eq i:nth-child(1), .bmbb-upnext-cell .bmbb-upnext-eq i:nth-child(5) { animation-delay: 0.36s; }
.bmbb-upnext-cell .bmbb-upnext-play-icon, .bmbb-upnext-cell .bmbb-upnext-pause-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.12s; pointer-events: none; }
.bmbb-upnext-row:not(.now) .bmbb-upnext-cell:hover .bmbb-upnext-play-icon { opacity: 1; }
.bmbb-upnext-row.now.is-paused .bmbb-upnext-cell .bmbb-upnext-play-icon { opacity: 1; }
.bmbb-upnext-row.now:not(.is-paused) .bmbb-upnext-cell:hover .bmbb-upnext-pause-icon { opacity: 1; }
.bmbb-upnext-header { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid #2e2a3d; }
.bmbb-upnext-ctx { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.bmbb-upnext-ctx-art { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.bmbb-upnext-ctx-icon { width: 26px; height: 26px; border-radius: 5px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(139, 92, 246, 0.16); }
.bmbb-upnext-ctx-icon i { font-size: 0.9rem; color: #a78bfa; }
.bmbb-upnext-ctx-icon.is-fav i { color: #f43f5e; }
.bmbb-upnext-ctx-name { font-size: 0.85rem; font-weight: 700; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmbb-upnext-shuffle-strip { display: flex; align-items: center; gap: 5px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #a78bfa; padding: 4px 9px 7px; }
.bmbb-upnext-shuffle-strip i { font-size: 0.78rem; }
.bmbb-upnext-reshuffle { text-align: center; font-size: 0.68rem; color: #8b8696; font-style: italic; padding: 7px 9px 3px; }
.bmbb-upnext-full { display: inline-flex; align-items: center; gap: 5px; background: rgba(139,92,246,0.18); color: #a78bfa; border: none; border-radius: 999px; padding: 4px 10px; font-size: 0.72rem; font-weight: 600; cursor: pointer; }
.bmbb-upnext-full i { font-size: 0.8rem; }
.bmbb-upnext-full:hover { background: rgba(139,92,246,0.3); }
.bmbb-upnext-close { background: transparent; border: none; color: inherit; opacity: 0.6; cursor: pointer; font-size: 1.05rem; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; margin: -6px -7px -6px 0; border-radius: 8px; }
.bmbb-upnext-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.07); }
@media (max-width: 600px) {
  .bmbb-upnext-close { width: 46px; height: 46px; font-size: 1.2rem; }
}
.bmbb-upnext-body { max-height: 312px; overflow-y: auto; padding: 6px; }
.bmbb-upnext-row { display: flex; gap: 9px; align-items: center; padding: 7px 9px; font-size: 0.8rem; border-radius: 6px; }
.bmbb-upnext-row .ti { flex: 1; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: inherit; }
.bmbb-upnext-row.now { background: #7c3aed; }
.bmbb-upnext-row.now .ti { color: #fff; font-weight: 700; }
.bmbb-upnext-row { cursor: pointer; }
.bmbb-upnext-row:not(.now):hover { background: rgba(139,92,246,0.16); }
.bmbb-upnext-row.now:hover { background: #8b5cf6; }
.bmbb-upnext-row.now { transition: background 0.15s ease; }
.bmbb-upnext-empty { padding: 16px; text-align: center; color: #8b8696; font-size: 0.82rem; }
@keyframes bmbb-row-just-queued {
    0%   { background: rgba(34, 197, 94, 0.55); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45) inset; }
    100% { background: transparent;             box-shadow: 0 0 0 0 rgba(34, 197, 94, 0)   inset; }
}
@keyframes bmbb-row-just-queued-dark {
    0%   { background: rgba(74, 222, 128, 0.42); box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.40) inset; }
    100% { background: transparent;              box-shadow: 0 0 0 0 rgba(74, 222, 128, 0)    inset; }
}
.bmbb-upnext-row.is-just-queued { animation: bmbb-row-just-queued 1.6s ease-out 1; }
[data-theme="dark"] .bmbb-upnext-row.is-just-queued { animation: bmbb-row-just-queued-dark 1.6s ease-out 1; }
@media (prefers-reduced-motion: reduce) {
  .bmbb-upnext-row.is-just-queued { animation: none; background: rgba(34, 197, 94, 0.20); }
}
@media (min-width: 992px) {
  #bookMusicBottomBar #bmbbMore { display: none; }
}
@media (max-width: 991.98px) {
  #bookMusicBottomBar #bmbbSongPage, #bookMusicBottomBar #bmbbShare, #bookMusicBottomBar #bmbbQueueBtn { display: none; }
}
@media (min-width: 992px) {
  #bmbbMoreQueue { display: none; }
}
@media (max-width: 429px) {
  #bookMusicBottomBar #bmbbAdd { display: none; }
}
@media (min-width: 430px) {
  #bmbbMoreAdd { display: none; }
}
.bmbb-more-panel { position: fixed; z-index: 10001; width: 192px; background: #17151f; border: 1px solid #34303f; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,0.55); overflow: hidden; padding: 5px; }
html[data-theme="light"] .bmbb-more-panel { background: #fff; border-color: #e2dff0; }
.bmbb-more-item { display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; border: none; color: #e7e4ee; cursor: pointer; padding: 10px 11px; border-radius: 7px; font-size: 0.9rem; text-align: left; }
html[data-theme="light"] .bmbb-more-item { color: #1a1a2e; }
.bmbb-more-item:hover { background: rgba(139,92,246,0.16); }
.bmbb-more-item i { font-size: 1rem; width: 18px; text-align: center; }
.bmbb-more-item .bmbb-more-state { margin-left: auto; opacity: 0.55; font-size: 0.8rem; }
.bmbb-more-item.is-on { color: #a78bfa; }
.bmbb-more-item.is-on .bmbb-more-state { opacity: 0.9; color: #a78bfa; }
.bmbb-lyrics-panel { position: fixed; right: 16px; bottom: 76px; width: 380px; max-width: calc(100vw - 32px); max-height: 60vh; background: rgba(14, 10, 30, 0.96); border: 1px solid rgba(139, 92, 246, 0.35); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; flex-direction: column; z-index: 9997; color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; }
html[data-theme="light"] .bmbb-lyrics-panel { background: rgba(255, 255, 255, 0.98); border-color: rgba(124, 58, 237, 0.3); color: #1a1a2e; }
.bmbb-lyrics-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(139, 92, 246, 0.2); flex-shrink: 0; }
.bmbb-lyrics-titleblock { min-width: 0; flex: 1; }
.bmbb-lyrics-title-link, .bmbb-lyrics-subtitle-link { display: block; text-decoration: none; color: inherit; min-width: 0; }
.bmbb-lyrics-title-link:hover .bmbb-lyrics-title, .bmbb-lyrics-subtitle-link:hover .bmbb-lyrics-subtitle { color: #a78bfa; }
html[data-theme="light"] .bmbb-lyrics-title-link:hover .bmbb-lyrics-title, html[data-theme="light"] .bmbb-lyrics-subtitle-link:hover .bmbb-lyrics-subtitle { color: #7c3aed; }
.bmbb-lyrics-title-link, .bmbb-lyrics-subtitle-link { transition: color 0.15s; }
.bmbb-lyrics-cover-link { display: inline-block; flex-shrink: 0; line-height: 0; border-radius: 8px; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.bmbb-lyrics-cover-link:hover { transform: translateY(-1px); }
.bmbb-lyrics-cover-link:hover .bmbb-lyrics-cover { box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 0 0 1px rgba(167,139,250,0.55); }
.bmbb-lyrics-cover { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; display: block; box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(139,92,246,0.25); transition: box-shadow 0.15s ease; }
.bmbb-lyrics-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmbb-lyrics-subtitle { font-size: 0.78rem; opacity: 0.65; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmbb-lyrics-close { background: transparent; border: none; color: inherit; opacity: 0.6; cursor: pointer; font-size: 1rem; padding: 0.25rem 0.5rem; border-radius: 4px; flex-shrink: 0; }
.bmbb-lyrics-close:hover { opacity: 1; background: rgba(255,255,255,0.08); }
html[data-theme="light"] .bmbb-lyrics-close:hover { background: rgba(0,0,0,0.06); }
.bmbb-lyrics-copy { background: transparent; border: none; color: inherit; opacity: 0.6; cursor: pointer; font-size: 1rem; padding: 0.25rem 0.5rem; border-radius: 4px; flex-shrink: 0; }
.bmbb-lyrics-copy:hover { opacity: 1; background: rgba(255,255,255,0.08); }
html[data-theme="light"] .bmbb-lyrics-copy:hover { background: rgba(0,0,0,0.06); }
.bmbb-lyrics-copy.copied { opacity: 1; color: #4ade80; background: transparent; }
.bmbb-lyrics-body { padding: 0.9rem 1rem 1rem; overflow-y: auto; line-height: 1.55; white-space: pre-wrap; }
.bmbb-lyrics-toggle { display: flex; justify-content: center; padding: 0.55rem 1rem 0.1rem; flex-shrink: 0; }
.bmbb-notes-body { white-space: normal; }
.bmbb-lyrics-body .bmbb-lyrics-section { font-weight: 600; color: #a78bfa; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0.75rem 0 0.25rem; }
.bmbb-lyrics-body .bmbb-lyrics-section:first-child { margin-top: 0; }
.bmbb-lyrics-body .bmbb-lyrics-line { transition: color 0.2s ease, transform 0.25s ease, opacity 0.2s ease; transform-origin: left center; }
.bmbb-lyrics-body.is-synced .bmbb-lyrics-line { opacity: 0.55; }
.bmbb-lyrics-body.is-synced .bmbb-lyrics-line.active { opacity: 1; color: #c4b5fd; font-weight: 600; transform: scale(1.08); transform-origin: left center; }
html[data-theme="light"] .bmbb-lyrics-body.is-synced .bmbb-lyrics-line.active { color: #6d28d9; }
@media (max-width: 600px) {
  .bmbb-lyrics-panel { right: 8px; left: 8px; width: auto; bottom: 72px; max-height: 55vh; }
}

/* Inline-SVG icon shim: replaces the bootstrap-icons FONT with the same MIT
   glyphs as inline SVGs, sized/aligned exactly like the font renders. */
svg.bi { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: -0.125em; }

/* fav heart states - from PG music-favorites.css */
.music-fav-btn, .music-add-btn, .music-info-btn, .music-row-menu-btn { background: transparent; border: none; color: inherit; cursor: pointer; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; opacity: 0.6; flex-shrink: 0; transition: opacity .12s, background .12s, color .12s, transform .1s; }
.music-fav-btn:hover, .music-add-btn:hover, .music-info-btn:hover, .music-row-menu-btn:hover { opacity: 1; background: rgba(139, 92, 246, 0.16); }
.music-fav-btn i, .music-add-btn i, .music-info-btn i, .music-row-menu-btn i { font-size: 1rem; pointer-events: none; }
.music-fav-btn.is-fav { opacity: 1; }
.music-fav-btn.is-fav i { color: #f43f5e; }
.music-fav-btn.is-busy, .music-add-btn.is-busy { opacity: 0.35; pointer-events: none; }
.music-fav-btn:active, .music-add-btn:active, .music-info-btn:active, .music-row-menu-btn:active { transform: scale(0.84); }
#musicModal .msr-actions .music-info-btn, #musicModal .msr-actions .music-fav-btn, #musicModal .msr-actions .music-add-btn, #musicModal .msr-actions .msr-remove, #musicModal .book-music-track-actions .music-info-btn, #musicModal .book-music-track-actions .music-fav-btn, #musicModal .book-music-track-actions .music-add-btn, #bmbbUpNextPanel .msr-actions .music-info-btn, #bmbbUpNextPanel .msr-actions .music-fav-btn, #bmbbUpNextPanel .msr-actions .music-add-btn { display: none; }
#musicModal .msr-actions .music-row-menu-btn, #musicModal .book-music-track-actions .music-row-menu-btn, #bmbbUpNextPanel .msr-actions .music-row-menu-btn, .album-track .music-row-menu-btn { display: inline-flex; align-self: center; }
.music-fav-btn-lg, .music-add-btn-lg { width: auto; height: auto; border-radius: 999px; gap: 0.45rem; padding: 0.6rem 1.15rem; font-size: 0.9rem; font-weight: 600; border: 1px solid rgba(139, 92, 246, 0.4); opacity: 1; }
.music-fav-btn-lg:hover, .music-add-btn-lg:hover { background: rgba(139, 92, 246, 0.14); }
.music-fav-btn-lg.is-fav { border-color: rgba(244, 63, 94, 0.55); }
.music-fav-btn-lg.is-fav i { color: #f43f5e; }
.msr-actions .music-fav-btn, .msr-actions .music-add-btn, .msr-actions .music-info-btn, .msr-actions .msr-remove { width: 28px; height: 28px; }
.msr-actions .music-fav-btn i, .msr-actions .music-add-btn i, .msr-actions .music-info-btn i, .msr-actions .msr-remove i { font-size: 0.92rem; }

/* resume banner - extracted verbatim from PG floating stack */
#bookMusicResumeBackdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 9999; animation: resumeBackdropIn 0.25s ease-out; -webkit-tap-highlight-color: transparent; }
@keyframes resumeBackdropIn { from { opacity: 0; } to { opacity: 1; } }
#bookMusicResumeBanner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10000; background: linear-gradient(180deg, #1f1235 0%, #1a1a2e 100%); border-top: 1px solid rgba(167, 139, 250, 0.4); border-radius: 18px 18px 0 0; padding: 1.25rem 1.25rem 1.6rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.5); animation: resumeBannerIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
@keyframes resumeBannerIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
#bookMusicResumeBanner .resume-grab-handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); margin: -0.5rem auto 0.25rem; }
#bookMusicResumeBanner .resume-banner-info { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
#bookMusicResumeBanner img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
#bookMusicResumeBanner .resume-banner-text { flex: 1; min-width: 0; }
#bookMusicResumeBanner .resume-banner-label { font-size: 0.7rem; color: rgba(167, 139, 250, 1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.15rem; }
#bookMusicResumeBanner .resume-banner-track { font-size: 1rem; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
#bookMusicResumeBanner .resume-banner-album { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.1rem; }
#bookMusicResumeBanner .resume-banner-actions { display: flex; gap: 0.6rem; align-items: stretch; }
#bookMusicResumeBanner .resume-banner-play { flex: 1; border-radius: 999px; border: none; background: #7c3aed; color: #fff; font-size: 1rem; font-weight: 700; padding: 0.85rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; cursor: pointer; box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4); }
#bookMusicResumeBanner .resume-banner-play:active { background: #6d28d9; transform: scale(0.98); }
#bookMusicResumeBanner .resume-banner-play i { font-size: 1.15rem; }
#bookMusicResumeBanner .resume-banner-close { width: 48px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.75); font-size: 1.15rem; cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
#bookMusicResumeBanner .resume-banner-close:active { background: rgba(255, 255, 255, 0.1); }
@media (min-width: 769px) {
  #bookMusicResumeBanner { left: 50%; right: auto; bottom: 96px; width: min(440px, 92vw); border-radius: 18px; padding: 1.4rem 1.5rem 1.5rem; transform: translateX(-50%); animation: resumeBannerInDesktop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
  @keyframes resumeBannerInDesktop {
        from { opacity: 0; transform: translate(-50%, 16px); }
        to   { opacity: 1; transform: translate(-50%, 0); }
    }
  #bookMusicResumeBanner .resume-grab-handle { display: none; }
}
