
		/* No html/body rules here - dashboard/superadmin load this file and must not be affected.
		   Library page scroll is handled by .book_shelf_container below. */

		.book_shelf_container#book_shelf {
			margin: 0;
			padding: 20px 30px 0;
			background-size: cover;
		}

		.book_shelf_container .shelf {

			position: relative;

			border-bottom: 30px solid #584940;

			border-left: 20px solid transparent;

			border-right: 20px solid transparent;

			top: -15px;

			margin-bottom:25px;

			z-index: -10;

		}

		/* Shelf full-bleed so edge aligns with background (Bootstrap 5 row gutters) */
		.book_shelf_container .row > .col-12.shelf {
			padding-left: 0 !important;
			padding-right: 0 !important;
			margin-left: -30px;
			margin-right: -30px;
			width: calc(100% + 60px);
			max-width: none;
			box-sizing: content-box;
		}

		.book_shelf_container .shelf:after {

			content: '';


			height: 20px;

			width: calc(100% + 40px);

			position: absolute;

			top: 30px;

			left: 0;

			right: 0;

			z-index: 1;

			margin: 0 -20px

		}



		.book_shelf_container {
			min-height: 100vh;
			background-repeat: no-repeat;
			background-position: center center;
			background-size: cover;
			background-color: #fff;
			overflow-y: auto;
			-webkit-overflow-scrolling: touch;
		}



.book_shelf_container .book,
.book_shelf_container .book img,
.book_shelf_container .book::after,
.book_shelf_container .book::before {
  border-top-right-radius: 5px;

  border-bottom-right-radius: 5px;

}

.book_shelf_container ul {
  display: table-cell;
  vertical-align: middle;
}

.book_shelf_container .list-inline {
  padding-left: 0;
  list-style: none;
}

.book_shelf_container .list-inline > li {
  display: inline-block;
  margin-left: 2em;
}

.book_shelf_container .list-inline > li:first-child {
  margin-left: 0;
}

.book_shelf_container .book a {
	padding: 0;
	margin: 0;
	display: block;
	width: 213px;
	height: 271px;
}

.book_shelf_container .book {
  cursor: pointer;

  display: block;

  width: 100%;

  max-width: 320px;

  height: auto;

  position: relative;

  background: white;

  z-index: 1;

  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 9px 20px 0 rgba(0, 0, 0, 0.25);

  overflow: hidden;

  -webkit-transition: box-shadow .3s linear;

  transition: box-shadow .3s linear;

}


.book_shelf_container .book img {
  width: 100%;

  height: auto;

  -webkit-transform-origin: 0 50%;

          transform-origin: 0 50%;

  -webkit-transform: rotateY(0);

          transform: rotateY(0);

  -webkit-transition: all .45s ease;

  transition: all .45s ease;

}

.book_shelf_container .book:hover {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25), 0 9px 20px 0 rgba(0, 0, 0, 0.45);
}

.book_shelf_container .book:hover img {
  -webkit-transform: rotateY(-18deg);

          transform: rotateY(-18deg);

  box-shadow: 1px 1px 5px 5px rgba(0, 0, 0, 0.2);

}


.book_shelf_container .book::after,
.book_shelf_container .book::before {
  content: '';

  display: block;

  width: inherit;

  height: inherit;

  position: absolute;

  z-index: -1;

  top: 0;

  background: white;

  border: 1px solid #d9d9d9;

}

.book_shelf_container .book::before {
  left: -3px;
}

.book_shelf_container .book::after {
  left: -6px;
}

.book_shelf_container .library-shelf {
  --shelf-side-pad: 2.5rem;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--shelf-side-pad);
  padding-right: var(--shelf-side-pad);
  box-sizing: content-box;
  overflow: visible;
}
.book_shelf_container .library-shelf > .row:not(.library-row) {
  position: relative;
  z-index: 1;
  width: calc(100% + (var(--shelf-side-pad) * 2));
  max-width: none;
  margin-left: calc(var(--shelf-side-pad) * -1);
  margin-right: calc(var(--shelf-side-pad) * -1);
}
.book_shelf_container .library-shelf .row > .col-12.shelf,
.book_shelf_container .library-shelf .row > [class*="col-"].shelf {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .book_shelf_container .library-shelf {
    --shelf-side-pad: 1.5rem;
  }
}
.book_shelf_container .library-row {
  position: relative;
  z-index: 4;
  overflow: visible;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  --books-per-row: 1;
  --book-gap: 12px;
  gap: var(--book-gap);
}
.book_shelf_container .library-row > [class*="col-"] {
  float: none;
  display: grid;
  justify-items: center;
  align-items: end;
  align-self: flex-end;
  height: max-content;
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 320px;
  box-sizing: border-box;
  padding-left: 4px;
  padding-right: 4px;
  overflow: visible;
}
.book_shelf_container .library-book-col .book {
  grid-area: 1 / 1;
}
.book_shelf_container .library-book-col::after {
  content: '';
  grid-area: 1 / 1;
  place-self: center;
  position: relative;
  top: auto;
  left: auto;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.88);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 4H4v5M15 4h5v5M4 15v5h5M20 15v5h-5' stroke='%230a5c28' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  transform: none;
  animation: pf-shelf-click-pulse 2.6s ease-in-out infinite;
}
.book_shelf_container .library-book-col:hover::after {
  opacity: 0.55;
}
.book_shelf_container .library-book-col:has(.book-play-icon)::after,
.book_shelf_container .library-book-col:has(.landing-shelf-click)::after {
  display: none;
}
@keyframes pf-shelf-click-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .book_shelf_container .library-book-col::after {
    animation: none;
    opacity: 0.82;
  }
}
.book_shelf_container .library-row .book {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: 320px;
  background: transparent;
}

.book_shelf_container .library-row .book .book-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  pointer-events: none;
}

.book_shelf_container .library-row .book .book-play-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid #ffffff;
}
.book_shelf_container .library-row .book::before,
.book_shelf_container .library-row .book::after {
  width: 100%;
  height: 100%;
}
.book_shelf_container .library-row .book img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(12.8rem, 26svh, 17.2rem);
  object-fit: contain;
  display: block;
}
.book_shelf_container .library-book-col .library-book-title,
.book_shelf_container .library-row .book .library-book-title {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 8;
  max-width: calc(100% - 0.45rem);
  margin: 0;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #1a2a22;
  font-size: clamp(0.55rem, 1.25vw, 0.65rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  pointer-events: none;
  transform: translate(-50%, 40%);
}
/* When embedded in another page, modal may be moved to body by JS; high z-index and full viewport ensure it covers everything */
html.library-modal-open,
body.library-modal-open {
  overflow: hidden;
}
.book_shelf_container .library-modal,
.library-modal {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  background: rgba(50, 50, 50, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;
  box-sizing: border-box;
}

.book_shelf_container .library-modal.show,
.library-modal.show {
  display: flex;
}
.book_shelf_container .library-modal-content,
.library-modal-content {
  margin: 0;
  position: fixed;
  inset: 2vh 2vw;
  background: #1a1c1f;
  border-radius: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  clip-path: inset(0 round 25px);
  box-sizing: border-box;
}
.book_shelf_container .library-modal-frame,
.library-modal-frame {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  border: 0;
  display: block;
  background: #1a1c1f;
  position: absolute;
  top: -1px;
  left: -1px;
  z-index: 1;
  box-sizing: border-box;
  border-radius: 25px;
}
.book_shelf_container .library-modal-frame.is-loading,
.library-modal-frame.is-loading {
  opacity: 0;
  visibility: hidden;
}
.book_shelf_container .library-modal-back,
.library-modal-back {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.85);
  color: #1f2937;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (max-width: 576px) {
  .book_shelf_container .library-modal-back,
  .library-modal-back {
    left: 50%;
    transform: translateX(-50%);
  }
}
@media (max-width: 768px), (max-height: 700px) {
  .book_shelf_container .library-modal-content,
  .library-modal-content {
    inset: 1.5vh 1.5vw;
    border-radius: 16px;
    clip-path: inset(0 round 16px);
  }
  .book_shelf_container .library-modal.show .library-modal-frame,
  .library-modal.show .library-modal-frame {
    top: -1px;
    left: -1px;
    right: auto;
    bottom: auto;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border-radius: 16px;
  }
  .book_shelf_container .library-modal.show .library-modal-back,
  .library-modal.show .library-modal-back {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
  }
}
.book_shelf_container .library-access-overlay,
.library-access-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.78) 48%, rgba(15, 23, 42, 0.32) 100%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.book_shelf_container .library-access-overlay.show,
.library-access-overlay.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.book_shelf_container .library-access-card,
.library-access-card {
  position: relative;
  width: min(22rem, 100%);
  margin: 0;
  padding: 1.65rem 1.5rem 1.45rem;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 1px 2px rgba(17, 24, 39, 0.04),
    0 22px 48px rgba(17, 24, 39, 0.16);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #475569;
  text-align: center;
  box-sizing: border-box;
  transform: none;
  top: auto;
  left: auto;
}
.book_shelf_container .library-access-mark,
.library-access-mark {
  width: 2.75rem;
  height: 2.75rem;
  max-width: 2.75rem;
  max-height: 2.75rem;
  margin: 0 auto 0.95rem;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.book_shelf_container .library-access-mark svg,
.library-access-mark svg {
  width: 1.2rem !important;
  height: 1.2rem !important;
  max-width: 1.2rem;
  max-height: 1.2rem;
  display: block;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.book_shelf_container .library-access-title,
.library-access-title {
  margin: 0 0 0.4rem;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  text-align: center;
}
.book_shelf_container .library-access-text,
.library-access-text {
  margin: 0 auto 1.1rem;
  max-width: 18rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
  font-weight: 500;
  text-align: center;
}
.book_shelf_container .library-access-input,
.library-access-input {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: 500 0.9rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}
.book_shelf_container .library-access-input:focus,
.library-access-input:focus {
  outline: none;
  border-color: rgba(15, 23, 42, 0.45);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}
.book_shelf_container .library-access-error,
.library-access-error {
  min-height: 1.15em;
  margin: 0.55rem 0 0;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}
.book_shelf_container .library-access-btn,
.library-access-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 1.1rem 0 0 !important;
  min-width: 0;
  padding: 0.75rem 1.25rem !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #0f172a !important;
  color: #fff !important;
  font: 700 0.9rem/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
}
.book_shelf_container .library-access-btn:hover,
.library-access-btn:hover {
  filter: brightness(1.08);
}