div#bap-global-player button {
    background: transparent !important;
}

:root {
  --bap-bg: #0d2e2a;
  --bap-surface: #0f3530;
  --bap-surface2: #1a4037;
  --bap-primary: #e8dfc0; /* parchment/gold */
  --bap-accent: #c9b97a; /* deeper gold */
  --bap-text: #f0ebe0;
  --bap-muted: #8aada6;
  --bap-border: rgba(232, 223, 192, 0.14);
  --bap-font-serif: "palatinolinotype_roman", Sans-serif;
  --bap-font-sans: "palatinolinotype_roman", Sans-serif;
  --bap-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

div#bap-global-player * {
	font-size: var(--bap-font-serif);
}

.book-card {
  width: 220px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.3s var(--bap-ease);
}

.book-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.book-cover-wrap img.featured-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hover-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.book-card:hover .hover-play-overlay {
  opacity: 1;
}

.btn-hover-play {
  background: #fff !important;
  color: #0d2e2a !important;
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transform: translateY(16px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-card:hover .btn-hover-play {
  transform: translateY(0);
}

.book-details {
  margin-top: 14px;
}
.book-title {
  color: var(--bap-text) !important;
  font-family: var(--bap-font-serif) !important;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-author {
  color: var(--bap-muted) !important;
  font-size: 0.85rem;
  margin: 0;
}

.bookSwiper .swiper-button-next,
.bookSwiper .swiper-button-prev {
  color: var(--bap-primary);
}
.bookSwiper .swiper-pagination-bullet-active {
  background: var(--bap-primary);
}

/* ══════════════════════════════════════════════
   2. STICKY BOTTOM PLAYER  (book_reading_slider)
══════════════════════════════════════════════ */
#bap-global-player:not(.bap-hidden) {
  transform: translateY(0);
  margin-top: 29px;
  padding: 14px 32px;
  background: #042825;
}

.bap-player-container {
  display: flex;
  align-items: center;
  gap: 30px;
}

.waves-bar {
  width: 100%;
  margin-top: 13px;
}

#bap-waveform {
  width: 100%;
  height: 40px;
  pointer-events: none;
  opacity: 0.7;
}

.bap-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 30%;
  width: fit-content;
}

.bap-track-info img {
  width: 110px;
  height: 166px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.bap-meta h4 {
  margin: 5px 0 5px;
  font-size: 40px;
  font-weight: 400;
  color: #fff !important;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-transform: uppercase;
}

p#bap-author-meta {
  font-size: 16px !important;
  color: #fff;
}

.bap-meta p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--bap-muted);
}

h6#nowListing {
  font-weight: 400;
  color: #fff;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 00;
  margin: 0;
}

.bap-controls-wrapper {
  width: 100%;
}

.bap-buttons button {
  background: transparent;
  border: none;
  color: var(--bap-muted);
  font-size: 18px;
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.1s;
  display: flex;
  align-items: center;
}
.bap-buttons button:hover {
  color: var(--bap-text);
}
.bap-buttons button:active {
  transform: scale(0.92);
}
.bap-buttons .bap-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--bap-primary);
  color: var(--bap-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bap-buttons .bap-play-btn:hover {
  background: rgba(232, 223, 192, 0.1);
}

.bap-progress-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-size: 0.72rem;
  color: var(--bap-muted);
}

.bap-buttons {
    width: 100%;
    display: flex;
    justify-content: left;
}

.bap-utilities {
    width: 92%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    margin-top: 10px;
}

.bap-vol-buttons {
    display: flex;
    align-items: center;
}

.bap-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bap-muted);
}
.bap-tool-btn {
  background: transparent;
  border: none;
  color: var(--bap-muted);
  font-size: 17px;
  cursor: pointer;
  transition: color 0.2s;
}
.bap-tool-btn:hover,
.bap-tool-btn.active {
  color: var(--bap-primary);
}

/* ── Playlist Drawer ── */
#bap-playlist-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: calc(100vh - 90px);
  background: var(--bap-surface);
  z-index: 99998;
  transition: right 0.4s var(--bap-ease);
  box-shadow: -5px 0 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  font-family: var(--bap-font-sans);
}
#bap-playlist-drawer.bap-open {
  right: 0;
}
.bap-drawer-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--bap-border);
  color: var(--bap-text);
}
.bap-drawer-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--bap-font-serif);
  letter-spacing: 0.06em;
}
.bap-drawer-header button {
  background: none;
  border: none;
  color: var(--bap-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.bap-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
#bap-playlist-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
#bap-playlist-items li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--bap-text);
}
#bap-playlist-items li:hover {
  background: rgba(255, 255, 255, 0.06);
}
#bap-playlist-items li.bap-playing {
  background: rgba(232, 223, 192, 0.08);
}
#bap-playlist-items li.bap-playing .bap-list-title {
  color: var(--bap-primary);
}
.bap-list-img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.bap-list-meta {
  flex: 1;
  overflow: hidden;
}
.bap-list-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bap-list-author {
  font-size: 0.78rem;
  color: var(--bap-muted);
  margin: 0;
}

/* ══════════════════════════════════════════════
   3. LIBRARY BOOK GRID  (book_reading_library)
══════════════════════════════════════════════ */
.nr-library {
  font-family: var(--bap-font-sans);
}

.nr-books-grid {
  display: grid;
  grid-template-columns: repeat(var(--nr-cols, 3), 1fr);
  gap: 24px;
  padding: 20px 0;
}

.nr-book-card {
  background: var(--bap-surface);
  border: 1px solid var(--bap-border);
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.3s var(--bap-ease),
    box-shadow 0.3s var(--bap-ease);
  cursor: pointer;
}
.nr-book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.nr-book-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
}
.nr-book-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.nr-book-card:hover .nr-book-image {
  transform: scale(1.05);
}
.nr-book-image--placeholder {
  background: var(--bap-surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bap-muted);
  font-size: 0.85rem;
  width: 100%;
  height: 100%;
}

.nr-play-trigger {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.nr-book-card:hover .nr-play-trigger {
  opacity: 1;
}
.nr-play-trigger__circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--bap-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bap-primary);
  font-size: 18px;
  transform: translateY(10px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nr-book-card:hover .nr-play-trigger__circle {
  transform: translateY(0);
}

.nr-book-meta {
  padding: 16px;
  color: var(--bap-text);
}
.nr-book-title {
  font-family: var(--bap-font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 5px;
  color: var(--bap-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nr-book-author {
  font-size: 0.82rem;
  color: var(--bap-muted);
  margin: 0 0 3px;
}
.nr-book-reader {
  font-size: 0.78rem;
  color: var(--bap-accent);
  margin: 0 0 6px;
}
.nr-book-reader i {
  margin-right: 4px;
  font-size: 0.7rem;
}
.nr-book-description {
  font-size: 0.8rem;
  color: var(--bap-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   4. INLINE PANEL PLAYER — matches screenshot
   Dark teal card · text left · waveform right
   Full-width progress · controls bottom
══════════════════════════════════════════════ */
.nr-player-panel {
  background: var(--bap-surface);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 28px;
  padding: 32px 36px 22px;
  position: relative;
  font-family: var(--bap-font-sans);
  color: var(--bap-text);
  /* gold shimmer on top edge */
  border-top: 1px solid rgba(232, 223, 192, 0.3);
  border-left: 1px solid var(--bap-border);
  border-right: 1px solid var(--bap-border);
  border-bottom: 1px solid var(--bap-border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.nr-player-panel[hidden] {
  display: none;
}

/* ── TOP ROW: info left | waveform right ── */
.nr-panel-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  margin-bottom: 14px;
}

/* Info block */
.nr-panel-info {
}
.nr-now-listening-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bap-primary);
  margin: 0 0 8px;
  font-weight: 500;
}
.nr-active-book-title {
  font-family: var(--bap-font-serif);
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bap-text);
  line-height: 1;
  margin: 0 0 8px;
}
.nr-active-book-narrator {
  font-size: 13px;
  font-weight: 300;
  color: var(--bap-muted);
  letter-spacing: 0.03em;
  margin: 0;
}

/* Waveform canvas */
.nr-panel-wave-wrap {
  width: 100%;
  height: 64px;
  position: relative;
}
.nr-waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  border-radius: 2px;
}

/* ── PROGRESS LINE ── */
.nr-panel-seek {
  margin-bottom: 20px;
}
.nr-seek-track {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  cursor: pointer;
}
.nr-seek-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--bap-primary);
  border-radius: 999px;
  width: 0;
  pointer-events: none;
  transition: width 0.1s linear;
}
.nr-seek-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  background: var(--bap-text);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(232, 223, 192, 0.25);
  pointer-events: none;
  transition: left 0.1s linear;
}
.nr-seek-input {
  position: absolute;
  inset: -12px 0;
  height: 28px;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ── BOTTOM ROW ── */
.nr-panel-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Left: play circle + next episode */
.nr-panel-left-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nr-circle-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--bap-text);
  background: transparent;
  color: var(--bap-text);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.1s;
  flex-shrink: 0;
}
.nr-circle-play:hover {
  background: rgba(255, 255, 255, 0.1);
}
.nr-circle-play:active {
  transform: scale(0.93);
}
.nr-circle-play i {
  margin-left: 2px;
} /* optical centre */

.nr-next-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nr-next-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bap-primary);
  font-weight: 500;
}
.nr-next-title {
  font-size: 13px;
  color: var(--bap-text);
  font-weight: 400;
}

/* Right: skip + time + volume + close */
.nr-panel-right-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nr-ghost-btn {
  background: none;
  border: none;
  color: var(--bap-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nr-ghost-btn:hover {
  color: var(--bap-primary);
}

.nr-time-row {
  font-size: 11px;
  color: var(--bap-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.nr-time-sep {
  opacity: 0.5;
}

/* Volume */
.nr-vol-track {
  width: 90px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.nr-vol-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--bap-primary);
  border-radius: 999px;
  width: 80%;
  pointer-events: none;
}
.nr-vol-input {
  position: absolute;
  inset: -12px 0;
  height: 28px;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ══════════════════════════════════════════════
   SHARED: Custom range inputs
══════════════════════════════════════════════ */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.12);
  height: 3px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  width: 100%;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bap-text);
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}
input[type="range"]:hover::-webkit-slider-thumb {
  opacity: 1;
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bap-text);
  border: none;
  cursor: pointer;
}

/* ══════════════════════════════════════════════
   UTILITY
══════════════════════════════════════════════ */
.bap-hidden {
  display: none !important;
}
.nr-empty-state {
  color: var(--bap-muted);
  font-family: var(--bap-font-sans);
  padding: 24px;
  text-align: center;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 800px) {
  .nr-panel-top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .nr-panel-wave-wrap {
    height: 52px;
  }
  .nr-player-panel {
    padding: 24px 20px 18px;
  }
}

@media (max-width: 640px) {
.bap-track-info, .bap-utilities {
    width: 100%;
    min-width: auto;
}
.bap-player-container {
        display: flex;
        align-items: center;
        padding: 14px 0px !important;
        background: #042825;
        margin: 0 auto;
        gap: 30px;
        flex-direction: column !important;
    }
  .nr-books-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }
  .nr-panel-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .nr-panel-right-controls {
    flex-wrap: wrap;
    gap: 10px;
  }
  .nr-vol-track {
    width: 70px;
  }

/*   .bap-player-container {
    display: flex;
    align-items: center;
    padding: 14px 32px;
    background: #042825;
    margin: 0 auto;
    gap: 30px;
  } */

  .bap-track-info,
  .bap-utilities {
    width: 100%;
    min-width: auto;
  }
  .bap-controls-wrapper {
    width: 100%;
    order: 3;
    margin-top: 10px;
  }
  .bap-volume {
    display: none;
  }
  #bap-playlist-drawer {
    width: 100%;
    right: -100%;
    height: calc(100vh - 130px);
  }
}

@media (max-width: 420px) {
  .nr-books-grid {
    grid-template-columns: 1fr !important;
  }
}
