/* LANHS Library Catalog — clean editorial redesign. Load after library.css. */
.library-page {
  --lr-wine: #79243b;
  --lr-deep: #4d172a;
  --lr-ink: #29262b;
  --lr-muted: #77727b;
  --lr-line: #eee6e9;
  --lr-soft: #faf6f7;
  color: var(--lr-ink);
  font-family: 'Sora', sans-serif
}

.library-page,
.library-page * {
  box-sizing: border-box
}

.library-page.page-content {
  padding-top: 20px
}

.library-page .catalog-hero {
  position: relative;
  overflow: hidden;
  min-height: 0 !important;
  padding: 46px 48px !important;
  border-radius: 20px !important;
  background: linear-gradient(112deg, #491426 0%, #72213b 60%, #963d53 100%) !important;
  box-shadow: 0 14px 34px rgba(89, 29, 47, .12);
  margin-bottom: 30px !important
}

.library-page .catalog-hero:before {
  content: '';
  position: absolute;
  right: -100px;
  top: -170px;
  width: 490px;
  height: 490px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  pointer-events: none
}

.library-page .catalog-hero:after {
  content: '';
  position: absolute;
  right: 30px;
  bottom: -250px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  pointer-events: none
}

.library-page .catalog-hero-content {
  position: relative;
  z-index: 1;
  max-width: 850px !important;
  margin: 0 !important;
  text-align: left !important
}

.library-page .catalog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f6d8df !important;
  font-size: 10px !important;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 14px
}

.library-page .catalog-hero h1 {
  font-size: clamp(29px, 3vw, 42px) !important;
  line-height: 1.2;
  letter-spacing: -.045em;
  font-weight: 800;
  color: #fff !important;
  margin: 0 0 10px !important
}

.library-page .catalog-hero p {
  color: #f2dce3 !important;
  font-size: 13px !important;
  line-height: 1.75;
  max-width: 610px;
  margin: 0 0 24px !important
}

.library-page .catalog-hero-search {
  display: flex !important;
  align-items: stretch;
  gap: 9px;
  max-width: 760px;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important
}

.library-page .catalog-search {
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  background: #fff !important;
  border-radius: 11px !important;
  padding: 0 17px !important;
  min-height: 51px;
  box-shadow: 0 5px 15px rgba(31, 13, 20, .08)
}

.library-page .catalog-search i {
  color: #8d7e86 !important;
  font-size: 15px
}

.library-page .catalog-search input {
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  min-width: 0;
  width: 100%;
  font: inherit;
  font-size: 12px !important;
  color: #30282d !important;
  padding: 12px 0 !important
}

.library-page .catalog-submit {
  border: 1px solid #fff !important;
  background: #fff !important;
  color: var(--lr-deep) !important;
  border-radius: 11px !important;
  padding: 0 25px !important;
  font: inherit;
  font-weight: 750;
  font-size: 12px !important;
  min-height: 51px;
  cursor: pointer;
  transition: transform .15s, background .15s
}

.library-page .catalog-submit:hover {
  background: #f9e8ee !important;
  transform: translateY(-1px)
}

.library-page .catalog-popular {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 17px !important
}

.library-page .catalog-popular>span {
  color: #f4dce3 !important;
  font-size: 10px !important;
  margin-right: 2px
}

.library-page .catalog-popular a {
  display: inline-flex;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
  text-decoration: none;
  font-size: 10px !important;
  transition: background .15s
}

.library-page .catalog-popular a:hover {
  background: rgba(255, 255, 255, .22) !important
}

.library-page .catalog-layout {
  display: grid !important;
  grid-template-columns: 245px minmax(0, 1fr) !important;
  gap: 25px !important;
  align-items: start
}

.library-page .catalog-filters {
  position: sticky;
  top: 24px;
  background: #fff !important;
  border: 1px solid var(--lr-line) !important;
  border-radius: 16px !important;
  padding: 23px 20px !important;
  box-shadow: 0 4px 18px rgba(42, 25, 32, .025) !important;
  min-width: 0
}

.library-page .filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 19px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--lr-line)
}

.library-page .filter-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  font-size: 14px !important;
  color: var(--lr-ink) !important;
  font-weight: 800
}

.library-page .filter-head h2 i {
  color: var(--lr-wine);
  font-size: 13px
}

.library-page .filter-head a {
  font-size: 10px;
  color: var(--lr-wine);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap
}

.library-page .filter-form {
  display: flex !important;
  flex-direction: column;
  gap: 18px
}

.library-page .filter-form>label {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  font-size: 11px !important;
  font-weight: 750;
  color: #494049 !important;
  margin: 0 !important
}

.library-page .filter-form select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 0 12px;
  background: #fff !important;
  border: 1px solid #e6e0e4 !important;
  border-radius: 9px !important;
  color: #4d4650 !important;
  font: inherit;
  font-size: 11px !important;
  font-weight: 500;
  outline: none;
  cursor: pointer
}

.library-page .filter-form select:focus,
.library-page .catalog-sort select:focus {
  border-color: var(--lr-wine) !important;
  box-shadow: 0 0 0 3px rgba(121, 36, 59, .09)
}

.library-page .filter-form>button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 43px;
  border: 0 !important;
  border-radius: 9px !important;
  background: var(--lr-wine) !important;
  color: #fff !important;
  font: inherit;
  font-size: 11px !important;
  font-weight: 750;
  cursor: pointer;
  margin-top: 5px
}

.library-page .filter-form>button:hover {
  background: var(--lr-deep) !important
}

.library-page .catalog-results {
  min-width: 0
}

.library-page .catalog-results-head {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 0 0 18px !important;
  margin: 0 0 19px !important;
  border-bottom: 1px solid var(--lr-line) !important;
  background: transparent !important
}

.library-page .catalog-results-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em
}

.library-page .catalog-results-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #f8e9ee;
  color: var(--lr-wine);
  font-size: 13px
}

.library-page .catalog-count {
  font-size: 11px !important;
  color: var(--lr-muted) !important;
  margin: 0 !important
}

.library-page .catalog-sort {
  margin-left: auto
}

.library-page .catalog-sort label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--lr-muted);
  font-size: 11px;
  font-weight: 600
}

.library-page .catalog-sort select {
  border: 1px solid #e6e0e4 !important;
  border-radius: 9px !important;
  background: #fff !important;
  min-height: 36px;
  padding: 0 10px;
  color: #3e363c;
  font: inherit;
  font-size: 11px;
  outline: none
}

.library-page .books-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 19px !important
}

.library-page .book-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--lr-line) !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: 0 4px 18px rgba(37, 24, 29, .035) !important;
  transition: transform .2s, box-shadow .2s, border-color .2s
}

.library-page .book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(68, 28, 41, .10) !important;
  border-color: #e6d0d7 !important
}

.library-page .book-cover-link {
  display: block !important;
  text-decoration: none;
  padding: 13px 13px 0 !important
}

.library-page .book-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  aspect-ratio: 4/4.4 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: 240px;
  overflow: hidden;
  border-radius: 10px !important;
  background: #f5f0f1 !important
}

.library-page .book-cover img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block
}

.library-page .book-cover .no-cover {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #a28b95;
  font-size: 32px
}

.library-page .book-cover-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .94) !important;
  color: #603449 !important;
  font-size: 9px !important;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.library-page .book-pdf-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff !important;
  color: var(--lr-wine) !important;
  border-radius: 6px !important;
  padding: 5px 8px !important;
  font-size: 9px !important;
  font-weight: 800
}

.library-page .btn-fav {
  position: absolute !important;
  z-index: 2;
  top: 22px !important;
  right: 22px !important;
  left: auto !important;
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center;
  border: 1px solid #f1e9ec !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #806f78 !important;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .05);
  cursor: pointer
}

.library-page .btn-fav.saved {
  color: #b82e52 !important
}

.library-page .book-body {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  padding: 16px 15px 15px !important;
  min-width: 0
}

.library-page .book-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #8c7b84 !important;
  font-size: 9px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .055em;
  margin-bottom: 10px !important
}

.library-page .book-meta-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.library-page .book-title {
  font-size: 13px !important;
  line-height: 1.5 !important;
  min-height: 39px;
  color: #30272d !important;
  font-weight: 800 !important;
  letter-spacing: -.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 6px !important
}

.library-page .book-author {
  font-size: 10px !important;
  color: #8c8087 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 17px !important
}

.library-page .book-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto !important
}

.library-page .book-actions a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px !important;
  padding: 8px 5px !important;
  text-decoration: none;
  border-radius: 8px !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  white-space: nowrap
}

.library-page .btn-read {
  background: var(--lr-wine) !important;
  color: #fff !important;
  border: 1px solid var(--lr-wine) !important
}

.library-page .btn-read:hover {
  background: var(--lr-deep) !important
}

.library-page .btn-details {
  background: #fff !important;
  color: var(--lr-wine) !important;
  border: 1px solid #e8d9df !important
}

.library-page .btn-details:hover {
  background: #fbf3f5 !important
}

.library-page .empty-library {
  padding: 45px 18px !important;
  border: 1px dashed #e4d8dd;
  border-radius: 15px;
  background: #fff
}

.library-page .empty-box {
  text-align: center
}

@media(max-width:1200px) {
  .library-page .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important
  }

  .library-page .catalog-layout {
    grid-template-columns: 220px minmax(0, 1fr) !important
  }
}

@media(max-width:760px) {
  .library-page .catalog-hero {
    padding: 32px 24px !important;
    border-radius: 15px !important
  }

  .library-page .catalog-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important
  }

  .library-page .catalog-filters {
    position: static;
    padding: 20px !important
  }

  .library-page .filter-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px
  }

  .library-page .filter-form>button {
    margin: 0;
    align-self: end
  }

  .library-page .catalog-results-title {
    flex-basis: 100%
  }
}

@media(max-width:480px) {
  .library-page .catalog-hero {
    padding: 27px 18px !important
  }

  .library-page .catalog-hero-search {
    flex-direction: column !important
  }

  .library-page .catalog-submit {
    width: 100%
  }

  .library-page .filter-form {
    grid-template-columns: 1fr
  }

  .library-page .books-grid {
    gap: 12px !important
  }

  .library-page .book-cover-link {
    padding: 9px 9px 0 !important
  }

  .library-page .book-body {
    padding: 12px 10px !important
  }

  .library-page .book-actions {
    grid-template-columns: 1fr
  }

  .library-page .book-title {
    font-size: 12px !important
  }

  .library-page .btn-fav {
    top: 16px !important;
    right: 16px !important
  }
}