/* Thư viện sách — học thuật, trang nghiêm */
.lb-page {
  --lb-ink: #1a2f4a;
  --lb-muted: #5a6570;
  --lb-border: #d4dce6;
  --lb-paper: #f7f9fc;
  --lb-accent: #1e3a5f;
  color: var(--lb-ink);
  font-family: "Gentium Plus", "Gentium Book Plus", Georgia, serif;
}

.lb-hero {
  border-bottom: 1px solid var(--lb-border);
  padding: 2rem 0 1.5rem;
  margin-bottom: 1.75rem;
}
.lb-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 0.5rem;
}
.lb-hero p {
  margin: 0;
  color: var(--lb-muted);
  font-size: 1.05rem;
  max-width: 42rem;
}

.lb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.lb-toolbar form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.lb-toolbar input[type="search"],
.lb-toolbar select {
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--lb-border);
  border-radius: 4px;
  background: #fff;
}
.lb-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--lb-accent);
  background: var(--lb-accent);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
}
.lb-btn--ghost {
  background: #fff;
  color: var(--lb-accent) !important;
}

.lb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.lb-card {
  border: 1px solid var(--lb-border);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}
.lb-card:hover {
  box-shadow: 0 8px 24px rgba(26, 47, 74, 0.08);
}
.lb-card__cover {
  aspect-ratio: 3 / 4;
  background: var(--lb-paper) linear-gradient(180deg, #eef2f7, #f7f9fc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lb-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}
.lb-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lb-card__body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lb-card__title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.lb-card__title a {
  color: var(--lb-ink) !important;
  text-decoration: none !important;
}
.lb-card__title a:hover {
  color: var(--lb-accent) !important;
}
.lb-card__meta {
  font-size: 0.88rem;
  color: var(--lb-muted);
  margin: 0;
}

.lb-pagination {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2rem;
  font-size: 0.95rem;
}
.lb-pagination a {
  color: var(--lb-accent);
  font-weight: 600;
}

.lb-detail {
  max-width: min(52rem, 100%);
}
.lb-detail__layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
}
@media (max-width: 720px) {
  .lb-detail__layout {
    grid-template-columns: 1fr;
  }
}
.lb-cover-lg {
  border: 1px solid var(--lb-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--lb-paper);
}
.lb-cover-lg img {
  width: 100%;
  display: block;
}

.lb-reader {
  min-height: 70vh;
}
.lb-reader__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 1rem;
  border-bottom: 1px solid var(--lb-border);
  margin-bottom: 1rem;
}
.lb-reader__canvas-wrap {
  background: #525659;
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  min-height: 60vh;
}
.lb-reader canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.lb-reader iframe {
  width: 100%;
  min-height: 75vh;
  border: none;
  border-radius: 6px;
  background: #111;
}

.lb-bc {
  font-size: 0.9rem;
  color: var(--lb-muted);
  margin-bottom: 1rem;
}
.lb-bc a {
  color: var(--lb-accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 1rem;
}

.lb-section {
  margin-bottom: 2.5rem;
}
.lb-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.lb-section__more {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}
.lb-section__more a {
  color: var(--lb-accent);
  font-weight: 600;
}

.lb-search-hero {
  margin-bottom: 2rem;
}
.lb-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.lb-search-form input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--lb-border);
  border-radius: 4px;
}
.lb-search-form--wide select {
  min-width: 160px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--lb-border);
  border-radius: 4px;
}

.lb-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.lb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--lb-border);
  border-radius: 999px;
  background: #fff;
  color: var(--lb-accent) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.92rem;
}
.lb-chip__count {
  font-size: 0.8rem;
  color: var(--lb-muted);
  font-weight: 500;
}

.lb-filters {
  margin-bottom: 1.5rem;
}
.lb-filters--inline {
  margin-bottom: 1.25rem;
}
.lb-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}
.lb-filters__row label {
  font-size: 0.88rem;
  color: var(--lb-muted);
}
.lb-filters select {
  min-width: 200px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--lb-border);
  border-radius: 4px;
  background: #fff;
}

.lb-empty {
  color: var(--lb-muted);
  font-style: italic;
  padding: 1rem 0;
}
.lb-results-count {
  color: var(--lb-muted);
  margin-bottom: 1rem;
}

.lb-btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
}
.lb-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--lb-muted);
  margin: 0.25rem 0 0.35rem;
  flex: 1;
}
.lb-card__meta--cat {
  color: var(--lb-accent);
  font-weight: 600;
}
.lb-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.lb-pagination__status {
  color: var(--lb-muted);
}

.lb-cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.lb-cat-tile__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--lb-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  text-decoration: none !important;
  color: inherit !important;
  transition: box-shadow 0.2s ease;
}
.lb-cat-tile__link:hover {
  box-shadow: 0 8px 24px rgba(26, 47, 74, 0.1);
}
.lb-cat-tile__cover {
  aspect-ratio: 16 / 10;
  background: var(--lb-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lb-cat-tile__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lb-cat-tile__placeholder {
  font-size: 2.5rem;
  color: var(--lb-border);
  font-weight: 700;
}
.lb-cat-tile__body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lb-cat-tile__title {
  font-size: 1.1rem;
  margin: 0;
  color: var(--lb-ink);
}
.lb-cat-tile__desc {
  font-size: 0.9rem;
  color: var(--lb-muted);
  margin: 0;
  line-height: 1.45;
}
.lb-cat-tile__count {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--lb-accent);
  font-weight: 600;
}

.lb-hero__meta {
  margin: 0.5rem 0 0;
  color: var(--lb-muted);
  font-size: 0.95rem;
}

.lb-page--detail .lb-detail {
  max-width: 56rem;
}
.lb-cover-lg--hero {
  max-width: 320px;
  margin: 0 auto;
}
.lb-cover-lg__empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--lb-muted);
}
.lb-detail__main h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 0;
  line-height: 1.25;
}
.lb-detail__cat,
.lb-detail__meta {
  font-size: 0.95rem;
  margin: 0.35rem 0;
}
.lb-detail__label {
  color: var(--lb-muted);
  font-weight: 500;
}
.lb-detail__lead {
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 1rem 0;
}
.lb-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1.25rem 0 0;
}
.lb-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.lb-detail__content {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lb-border);
}
.lb-detail__section-title {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--lb-accent);
}
.lb-prose {
  line-height: 1.75;
  font-size: 1.02rem;
}
.lb-related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lb-border);
}

/* Chia sẻ — trang chi tiết (nền sáng) */
.lb-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.lb-share-bar__url-row {
  flex: 1 0 100%;
  width: 100%;
  margin-bottom: 0.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--lb-border);
}
.lb-share-bar__url-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lb-muted);
  margin-bottom: 0.35rem;
}
.lb-share-bar__url-field-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
.lb-share-bar__url-input {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--lb-border);
  border-radius: 6px;
  background: #fff;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--lb-ink);
}
.lb-share-bar__url-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--lb-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}
.lb-share-bar__label {
  font-size: 0.85rem;
  color: var(--lb-muted);
  margin-right: 0.25rem;
}
.lb-share-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--lb-border);
  border-radius: 4px;
  background: #fff;
  color: var(--lb-accent) !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.lb-share-btn:hover {
  background: var(--lb-paper);
  border-color: var(--lb-accent);
}
.lb-share-btn--copy {
  background: #fff;
}

/* ========== Bìa 3D (hover mở như sách thật) ========== */
.lb-book-scene {
  position: relative;
  aspect-ratio: 3 / 4.05;
  border-radius: 10px;
  perspective: 1100px;
  transform-style: preserve-3d;
  box-shadow:
    0 16px 48px rgba(30, 58, 95, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.06);
}
.lb-book-pages {
  position: absolute;
  inset: 3px 5px 3px 14px;
  border-radius: 0 7px 7px 0;
  background: repeating-linear-gradient(
    180deg,
    #fafafa 0px,
    #fafafa 4px,
    #ececec 4px,
    #ececec 8px
  );
  box-shadow: inset -3px 0 12px rgba(0, 0, 0, 0.07);
  z-index: 0;
}
.lb-book-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: left center;
  transform-style: preserve-3d;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #2a4a6f 0%, #1a2f4a 100%);
  box-shadow:
    3px 6px 20px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
}
.lb-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lb-book-cover__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(160deg, #3d5a80 0%, #1e3a5f 55%, #152a45 100%);
}
.lb-book-cover__ph-text {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  font-weight: 700;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.lb-book-scene--hero {
  max-width: 300px;
  margin: 0 auto;
  outline: none;
}
.lb-book-scene--hero:focus-visible {
  box-shadow:
    0 16px 48px rgba(30, 58, 95, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 0 0 3px rgba(30, 58, 95, 0.35);
}
@media (hover: hover) and (pointer: fine) {
  .lb-card--book:hover .lb-book-cover,
  .lb-book-scene--hero:hover .lb-book-cover {
    transform: rotateY(-62deg);
  }
}
.lb-card--book:focus-within .lb-book-cover,
.lb-book-scene--hero:focus-within .lb-book-cover {
  transform: rotateY(-62deg);
}

/* Thẻ sách — bìa tách khỏi phần text */
.lb-card.lb-card--book {
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.7) inset,
    0 12px 40px rgba(30, 58, 95, 0.08);
  overflow: visible;
}
.lb-card__book-hit {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
  border-radius: 12px;
  margin: -2px -2px 0;
  padding: 2px 2px 0;
}
.lb-card__book-hit:focus-visible {
  outline: 3px solid var(--lb-accent);
  outline-offset: 4px;
}
.lb-card--book .lb-card__body {
  padding-top: 1.15rem;
}

/* Lưới danh mục / liên quan */
.lb-grid--catalog,
.lb-grid--related {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(1.25rem, 3vw, 1.75rem);
}
@media (min-width: 1200px) {
  .lb-grid--related {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Trang chi tiết — premium */
.lb-detail.lb-detail--premium {
  max-width: 72rem;
  margin: 0 auto;
}
.lb-detail__hero-sheet {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(247, 249, 252, 0.96) 45%,
    rgba(236, 242, 250, 0.92) 100%
  );
  border: 1px solid rgba(212, 220, 230, 0.9);
  border-radius: 18px;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2.25rem;
  box-shadow:
    0 4px 24px rgba(30, 58, 95, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.lb-detail__hero-inner {
  display: grid;
  grid-template-columns: minmax(200px, 290px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.lb-detail__cover-wrap {
  position: relative;
}
.lb-detail__headline {
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  color: var(--lb-ink);
}
.lb-detail__cat .lb-detail__label,
.lb-detail__meta .lb-detail__label {
  display: inline-block;
  min-width: 5.5rem;
  margin-right: 0.35rem;
}
.lb-detail__meta-dot {
  margin: 0 0.35rem;
  opacity: 0.5;
}
.lb-btn--lg {
  padding: 0.65rem 1.35rem;
  font-size: 1rem;
}
@media (max-width: 768px) {
  .lb-detail__hero-inner {
    grid-template-columns: 1fr;
  }
  .lb-detail__cover-wrap {
    max-width: 260px;
    margin: 0 auto;
  }
  .lb-detail__main {
    text-align: center;
  }
  .lb-detail__actions,
  .lb-share-bar {
    justify-content: center;
  }
}

/* Tiêu đề section */
.lb-section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.lb-section-head__title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0;
}
.lb-section-head__line {
  display: block;
  width: 4rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lb-accent), rgba(30, 58, 95, 0.2));
}
.lb-section-head--related {
  margin-bottom: 0.35rem;
}

/* Nội dung HTML từ TinyMCE */
.lb-detail__content.lb-prose--detail {
  border-top: none;
  padding-top: 0;
  margin-top: 2.25rem;
}
.lb-prose--detail {
  margin-top: 0;
  padding: 1.75rem clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--lb-border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.04);
}
.lb-prose__inner {
  max-width: 52rem;
}
.lb-prose.lb-prose--detail .lb-prose__inner > p:first-of-type {
  font-size: 1.06rem;
}
.lb-prose.lb-prose--detail .lb-prose__inner p {
  margin: 0 0 1rem;
}
.lb-prose.lb-prose--detail .lb-prose__inner h2,
.lb-prose.lb-prose--detail .lb-prose__inner h3 {
  margin: 1.5rem 0 0.65rem;
  color: var(--lb-accent);
  font-weight: 700;
}
.lb-prose.lb-prose--detail .lb-prose__inner ul,
.lb-prose.lb-prose--detail .lb-prose__inner ol {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}
.lb-prose.lb-prose--detail .lb-prose__inner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.5rem 0;
}
.lb-prose.lb-prose--detail .lb-prose__inner blockquote {
  margin: 1rem 0;
  padding: 0.65rem 0 0.65rem 1rem;
  border-left: 4px solid var(--lb-accent);
  background: rgba(247, 249, 252, 0.9);
  color: var(--lb-muted);
}
/* TinyMCE: giữ xuống dòng trong đoạn, đậm / nghiêng */
.lb-prose__inner p,
.lb-prose__inner li,
.lb-prose__inner td,
.lb-prose__inner th {
  white-space: pre-line;
}
.lb-prose__inner strong,
.lb-prose__inner b {
  font-weight: 700;
  color: var(--lb-ink);
}
.lb-prose__inner em,
.lb-prose__inner i {
  font-style: italic;
}
.lb-prose__inner u {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.lb-prose__inner a {
  color: var(--lb-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.lb-prose__inner h2,
.lb-prose__inner h3,
.lb-prose__inner h4 {
  white-space: normal;
}

/* Sách liên quan */
.lb-related.lb-related--shelf {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--lb-border);
}
.lb-related__hint,
.lb-catalog-hint {
  font-size: 0.88rem;
  color: var(--lb-muted);
  margin: 0 0 1.25rem;
  font-style: italic;
}

/* Trang danh mục */
.lb-page--category .lb-cat-hero {
  margin-bottom: 2rem;
}
.lb-cat-hero__panel {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(247, 249, 252, 0.95) 100%
  );
  border: 1px solid var(--lb-border);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 40px rgba(30, 58, 95, 0.07);
}
.lb-cat-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 0.5rem;
  opacity: 0.85;
}
.lb-cat-hero__title {
  font-size: clamp(2.35rem, 6.5vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 0.85rem;
  line-height: 1.08;
}
.lb-cat-hero__desc {
  margin: 0 0 1rem;
  font-size: clamp(1.08rem, 2.2vw, 1.22rem);
  line-height: 1.7;
  color: var(--lb-muted);
  max-width: 48rem;
  font-weight: 500;
}
.lb-cat-hero__count {
  margin: 0;
  font-size: 1.05rem;
  color: var(--lb-muted);
  font-weight: 600;
}
.lb-cat-hero__count strong {
  color: var(--lb-accent);
  font-size: 1.35rem;
  font-weight: 800;
}
.lb-cat-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--lb-border);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(30, 58, 95, 0.04);
}
.lb-search-form--cat {
  flex: 1 1 280px;
  margin: 0;
}
.lb-search-form--cat input[type="search"] {
  flex: 1 1 200px;
  min-width: 160px;
}
.lb-filters--cat {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.lb-filters--cat label {
  font-size: 0.88rem;
  color: var(--lb-muted);
  margin: 0;
}
.lb-filters--cat select {
  min-width: 160px;
}

.lb-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed var(--lb-border);
  border-radius: 14px;
  margin-top: 1rem;
}
.lb-empty-state__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--lb-accent);
  margin: 0 0 0.5rem;
}
.lb-empty-state__text {
  margin: 0;
  color: var(--lb-muted);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* --- /thu-vien-sach/danh-muc — danh sách danh mục --- */
.lb-catlist-hero {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.lb-bc--catlist {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.lb-catlist-hero__panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(236, 242, 250, 0.92));
  border: 1px solid var(--lb-border);
  border-radius: 20px;
  padding: clamp(1.75rem, 5vw, 3rem);
  box-shadow: 0 12px 48px rgba(30, 58, 95, 0.08);
}
.lb-catlist-hero__eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 0.65rem;
  opacity: 0.9;
}
.lb-catlist-hero__title {
  font-size: clamp(2.4rem, 7vw, 4.35rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 1rem;
}
.lb-catlist-hero__lead {
  margin: 0;
  font-size: clamp(1.06rem, 2.2vw, 1.28rem);
  line-height: 1.65;
  color: var(--lb-muted);
  max-width: 42rem;
  font-weight: 500;
}
.lb-catlist-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.lb-catlist-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(212, 220, 230, 0.95);
  box-shadow: 0 6px 28px rgba(30, 58, 95, 0.07);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lb-catlist-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 48px rgba(30, 58, 95, 0.12);
}
.lb-catlist-card__visual {
  aspect-ratio: 16 / 11;
  background: linear-gradient(160deg, #e8eef6 0%, #d0dce8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lb-catlist-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lb-catlist-card__glyph {
  font-size: clamp(3rem, 8vw, 4.75rem);
  font-weight: 800;
  color: rgba(30, 58, 95, 0.22);
  line-height: 1;
}
.lb-catlist-card__body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.lb-catlist-card__title {
  font-size: clamp(1.38rem, 2.8vw, 1.85rem);
  font-weight: 800;
  line-height: 1.22;
  color: var(--lb-accent);
  margin: 0;
  letter-spacing: 0.02em;
}
.lb-catlist-card__desc {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--lb-muted);
  flex: 1;
}
.lb-catlist-card__count {
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--lb-accent);
  letter-spacing: 0.04em;
}

/* --- Trang chủ /thu-vien-sach --- */
.lb-home-hero {
  margin-bottom: 2.5rem;
}
.lb-bc--home {
  margin-bottom: 1rem;
}
.lb-home-hero__panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(240, 245, 252, 0.92));
  border: 1px solid var(--lb-border);
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.85rem);
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 40px rgba(30, 58, 95, 0.07);
}
.lb-home-hero__eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 0.6rem;
}
.lb-home-hero__title {
  font-size: clamp(2.25rem, 6vw, 3.85rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0 0 0.85rem;
}
.lb-home-hero__lead {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.65;
  color: var(--lb-muted);
  max-width: 44rem;
  font-weight: 500;
}
.lb-home-search {
  background: #fff;
  border: 1px solid var(--lb-border);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.05);
}
.lb-home-search__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}
.lb-home-search__input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  border: 1px solid var(--lb-border);
  border-radius: 10px;
  font-family: inherit;
}
.lb-btn--search {
  padding: 0.75rem 1.5rem;
  font-size: 1.02rem;
  border-radius: 10px;
}
.lb-home-section {
  margin-bottom: 2.75rem;
}
.lb-home-section__head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.lb-home-section__title {
  font-size: clamp(1.55rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lb-accent);
  margin: 0;
  line-height: 1.2;
}
.lb-home-section__rule {
  width: 5rem;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lb-accent), rgba(30, 58, 95, 0.2));
}
.lb-home-section__more {
  margin: 1rem 0 0;
  font-size: 1.02rem;
}
.lb-home-section__more a {
  color: var(--lb-accent);
  font-weight: 700;
  text-decoration: none;
}
.lb-home-section__more a:hover {
  text-decoration: underline;
}
.lb-cat-chips--home {
  gap: 0.65rem;
}
.lb-chip--home {
  padding: 0.55rem 1.15rem;
  font-size: 1.03rem;
  font-weight: 700;
  border-radius: 999px;
  border-width: 2px;
}
.lb-chip--home .lb-chip__count {
  font-size: 0.88rem;
}
.lb-home-toolbar {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--lb-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 18px rgba(30, 58, 95, 0.05);
}
.lb-home-toolbar__form {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  align-items: flex-end;
}
.lb-home-toolbar__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lb-home-toolbar__group label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lb-muted);
}
.lb-home-toolbar__group select {
  min-width: 220px;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--lb-border);
  background: #fff;
}
.lb-empty--home {
  padding: 2rem 0;
  font-size: 1.05rem;
}

/* Thẻ sách: tiêu đề đậm hơn; chỉ hiện lượt xem (ẩn nguồn Drive/Upload) */
.lb-card--book .lb-card__title {
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  font-weight: 800;
  line-height: 1.3;
}
.lb-card--book .lb-card__meta--cat {
  font-size: 1.02rem;
  font-weight: 700;
}
.lb-card__meta--views {
  font-size: 0.95rem;
  color: var(--lb-muted);
}
.lb-card__views {
  font-weight: 800;
  color: var(--lb-accent);
}
.lb-detail__meta--stats .lb-detail__view-count {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--lb-accent);
}

@media (prefers-reduced-motion: reduce) {
  .lb-book-cover {
    transition: none;
  }
  .lb-card--book:hover .lb-book-cover,
  .lb-card--book:focus-within .lb-book-cover,
  .lb-book-scene--hero:hover .lb-book-cover,
  .lb-book-scene--hero:focus-within .lb-book-cover {
    transform: none;
  }
}
