.lib-page {
  background: radial-gradient(ellipse 70% 36rem at 85% 4rem, #0a3041 0, transparent 74%), #051726;
}
.lib-page .main-nav [aria-current="page"] { text-decoration: underline; text-decoration-color: #8ad5e7; }
.lib-main { padding-block: clamp(2.6rem, 5.5vw, 6rem) clamp(3rem, 5.5vw, 6rem); }
.lib-main .wide { max-width: 1500px; }
.lib-intro { max-width: 50rem; }
.lib-intro h1 { font-size: clamp(3.15rem, 6.5vw, 6.4rem); line-height: 1.05; }
.lib-intro > p {
  max-width: 39em; margin-top: .65em; color: #bfd3df; text-wrap: pretty;
  font-size: clamp(1.08rem, 1.55vw, 1.45rem); line-height: 1.48;
}
.lib-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  margin: clamp(1.5rem, 3.3vw, 3rem) 0 clamp(1.1rem, 2.1vw, 1.85rem);
}
.lib-toolbar[hidden], .lib-grid [hidden] { display: none; }
.lib-filters {
  display: flex; align-items: center; gap: .45rem; min-width: 0;
  margin: -.35rem; padding: .35rem; overflow-x: auto; overscroll-behavior-inline: contain;
  scrollbar-width: thin; scrollbar-color: #456478 transparent;
}
.lib-filters button {
  min-height: 44px; flex: none; padding: .5rem 1rem; color: #d7e6ed; cursor: pointer;
  border: 1px solid #456172; border-radius: 3rem; background: rgb(12 37 52 / 62%);
  font-size: .95rem; line-height: 1.1; white-space: nowrap;
}
.lib-filters button[aria-pressed="true"] { border-color: #c0effa; color: #071a26; background: #c0effa; font-weight: 650; }
.lib-count { flex: none; color: #bcd1dc; font-size: .92rem; font-variant-numeric: tabular-nums; }
.lib-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch;
  gap: clamp(1.2rem, 2.1vw, 2.3rem) clamp(1rem, 1.65vw, 1.8rem);
}
.lib-toolbar[hidden] + .lib-grid { margin-top: 2rem; }
.lib-feature {
  position: relative; isolation: isolate; grid-column: 1 / -1; display: flex; align-items: end;
  min-height: clamp(20rem, 28vw, 29rem); overflow: hidden;
  border-radius: clamp(1rem, 2vw, 1.6rem); border: 1px solid #546574; background: #102332;
}
.lib-feature-art {
  display: block; position: absolute; z-index: -3; inset: 0 0 0 auto;
  width: min(61%, clamp(31rem, 48vw, 48rem)); height: 100%; object-fit: cover; object-position: 50% 40%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 23%);
  mask-image: linear-gradient(90deg, transparent, #000 23%);
}
.lib-feature::after {
  content: ""; position: absolute; z-index: -2; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, #091d2b 6%, #102330ed 25%, #0b1d2960 46%, transparent 73%),
              linear-gradient(0deg, #06162270, transparent 50%);
}
.lib-feature-copy { padding: clamp(1.55rem, 4.2vw, 4rem); max-width: 43rem; }
.lib-feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .58em; color: #cbe1ed; font-size: .94rem; font-weight: 560; }
.lib-feature-copy h2 { margin: .19em 0; font-size: clamp(3rem, 5.4vw, 5.4rem); font-weight: 620; line-height: 1; letter-spacing: -.062em; }
.lib-feature-copy > p { max-width: 34ch; color: #e3edf3; font-size: clamp(1.03rem, 1.4vw, 1.3rem); line-height: 1.43; text-wrap: pretty; }
.lib-feature-link {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 46px;
  margin-top: 1.25rem; padding: .7rem 1.05rem; border-radius: 13px; color: #061b27;
  background: #c5efff; line-height: 1.15; font-weight: 690;
}
.lib-play-symbol {
  display: block; width: .75em; height: .82em; background: currentColor;
  clip-path: polygon(8% 0, 100% 50%, 8% 100%);
}
.lib-card {
  position: relative; min-width: 0; overflow: clip;
  border: 1px solid #344e60; border-radius: clamp(.95rem, 1.4vw, 1.3rem);
  background: linear-gradient(155deg, #102739, #0c1f2e 85%); transition: border-color .18s;
}
.lib-thumb { position: relative; aspect-ratio: 2.14; overflow: hidden; background: #112c3c; }
.lib-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lib-arrow {
  position: absolute; right: .85rem; bottom: .8rem; display: grid; place-items: center;
  width: 2.1rem; aspect-ratio: 1; border: 1px solid #c7d8e480; border-radius: 50%;
  background: #081825c9; color: white; font-size: 1.15rem; line-height: 1; font-weight: 500;
}
.lib-card-copy { padding: clamp(1rem, 1.55vw, 1.5rem); }
.lib-duration { color: #b9d8e6; font-size: .88rem; font-weight: 560; font-variant-numeric: tabular-nums; }
.lib-card h2 { margin: .2rem 0 .42rem; font-size: clamp(1.3rem, 1.8vw, 1.95rem); font-weight: 600; line-height: 1.16; letter-spacing: -.044em; }
.lib-open { color: #f4f9fc; }
.lib-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lib-card:has(.lib-open:focus-visible) { outline: 3px solid #a9f0ff; outline-offset: 4px; }
.lib-card .lib-open:focus-visible { outline: 0; }
.lib-card p { color: #bbcfda; line-height: 1.45; font-size: 1rem; text-wrap: pretty; }
.lib-license { width: fit-content; max-width: 44rem; color: #b6cbd8; margin-top: clamp(2rem,4vw,3.6rem); }
.lib-license summary { width: fit-content; padding: .55rem .25rem; cursor: pointer; font-size: .92rem; }
.lib-license [data-music-credit] { padding: .4rem .25rem; font-size: .9rem; line-height: 1.5; }
.lib-license [data-music-credit] a { text-decoration: underline; text-underline-offset: .16em; color: var(--ice); }
@media (hover: hover) {
  .lib-card:hover { border-color: #7ea2b5; }
  .lib-card:hover .lib-arrow { background: #113548; border-color: #d2f1fa; }
  .lib-feature-link:hover { background: #e2f7ff; }
  .lib-filters button[aria-pressed="false"]:hover { background: #16394a; }
}
@media (max-width: 58rem) {
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-count { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 39rem) {
  .lib-grid { grid-template-columns: 1fr; }
  .lib-filters button { padding-inline: .85rem; }
  .lib-feature { min-height: 23rem; }
  .lib-feature-art { inset: 0; width: 100%; object-position: 55% 45%; -webkit-mask-image: none; mask-image: none; }
  .lib-feature::after {
    background: linear-gradient(0deg, #081b29 2%, #091c2aed 23%, #0a1a27b5 45%, #0a1a273d 71%, transparent),
                linear-gradient(90deg, #091b292e, transparent 80%);
  }
  .lib-feature-copy { padding: 1.3rem; }
  .lib-thumb { aspect-ratio: 2.28; }
}
@media (forced-colors: active) {
  .lib-play-symbol { background: LinkText; }
  .lib-filters button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}
