/* A top-aligned filmstrip, adapted from the supplied editorial component.
   All color belongs to the shared shader; there is no second backdrop. */
.agent-library {
  position:relative;
  box-sizing:border-box;
  width:100%;
  margin:64px auto 0;
  padding:76px 0 68px;
  scroll-margin-top:0;
  overflow:hidden;
  --library-card-height:clamp(240px,32svh,320px);
}
.library-filters,.library-detail,.library-footer {
  box-sizing:border-box;
  width:min(100%,1352px);
  margin-inline:auto;
  padding-inline:36px;
}
.library-filters { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:48px; }
.library-filter { appearance:none; border:1px solid transparent; border-radius:999px; padding:10px 17px; min-height:42px; background:transparent; color:#ffffffa6; font:500 14px/1.2 Figtree,Inter,-apple-system,sans-serif; cursor:pointer; transition:background .2s,color .2s,transform .2s; }
.library-filter:hover { background:#ffffff14; color:white; }
.library-filter[aria-pressed='true'] { background:#fff; color:#171717; }
.library-filter:active { transform:scale(.96); }
.library-filter:focus-visible { outline:2px solid white; outline-offset:3px; }
.library-card[hidden] { display:none; }
.library-detail { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:64px; align-items:start; min-height:202px; margin-bottom:32px; }
.library-model-name { margin:0 0 14px; max-width:15ch; font-size:clamp(42px,5.7vw,76px); line-height:.99; letter-spacing:-.045em; font-weight:500; text-wrap:balance; }
.library-model-creator { margin:0; font-size:14px; line-height:1.5; color:#ffffffab; }
.library-description { margin:0 0 22px; max-width:44ch; font-size:18px; line-height:1.5; color:#ffffffe0; text-wrap:pretty; }
.library-facts { display:flex; flex-wrap:wrap; gap:8px 18px; list-style:none; padding:0; margin:0 0 22px; }
.library-facts li { display:flex; align-items:center; gap:7px; font-size:12px; line-height:1.5; color:#ffffffb8; }
.library-facts li::before { content:''; width:3px; height:3px; flex:none; background:currentColor; border-radius:50%; }
.library-source { display:inline-flex; align-items:center; gap:9px; font-size:12px; line-height:1.6; color:#ffffffb8; text-decoration:none; border-bottom:1px solid #ffffff40; padding-bottom:3px; transition:color .2s,border-color .2s; }
.library-source:hover { color:#fff; border-color:#fff; }
.library-source svg { transition:transform .2s; }
.library-source:hover svg { transform:translate(2px,-2px); }
.library-source:focus-visible { outline:2px solid white; outline-offset:5px; }
.library-viewport { position:relative; height:calc(var(--library-card-height) + 12px); touch-action:pan-y pinch-zoom; user-select:none; -webkit-user-select:none; cursor:grab; }
.library-viewport.is-dragging,.library-viewport.is-dragging button { cursor:grabbing; }
.library-track { display:flex; align-items:flex-start; gap:8px; width:max-content; padding-top:6px; will-change:transform; }
.library-card {
  position:relative; appearance:none; display:block; flex:none; box-sizing:border-box;
  width:calc(var(--library-card-height)*.75); height:calc(var(--library-card-height)/2);
  padding:0; overflow:hidden; border:1px solid #ffffff38; border-radius:4px;
  background:#ffffff0d; color:white; font-family:inherit; text-align:left; cursor:pointer;
  transition:background .3s,border-color .3s,color .3s;
}
.library-card:hover { background:#ffffff1f; border-color:#ffffff80; }
.library-card[aria-selected='true'] { height:var(--library-card-height); color:#151515; border-color:#fff; background:#fafafa; }
.library-card:focus-visible { outline:2px solid white; outline-offset:4px; }
.library-card-top { display:flex; justify-content:space-between; gap:8px; position:absolute; inset:14px 16px auto; font-size:12px; line-height:1.2; }
.library-card-logo { display:block; position:absolute; top:calc(var(--library-card-height)*.26); left:50%; transform:translate(-50%,-50%); width:54px; height:54px; object-fit:contain; pointer-events:none; filter:brightness(0) invert(1); transition:filter .25s; }
.library-card[aria-selected='true'] .library-card-logo { filter:none; }
.library-card[data-model-id='wan-animate-2'] .library-card-logo { width:70px; height:70px; }
.library-card-bottom { position:absolute; inset:auto 16px 19px; display:grid; gap:7px; opacity:0; transform:translateY(8px); transition:opacity .25s,transform .35s; }
.library-card-bottom strong { max-width:16ch; font-size:20px; line-height:1.07; letter-spacing:-.025em; font-weight:500; }
.library-card-bottom small { font-size:11px; color:#777; }
.library-card[aria-selected='true'] .library-card-bottom { opacity:1; transform:none; }
.library-footer { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-top:28px; }
.library-position { display:flex; align-items:center; gap:20px; }
.library-count { font:11px/1.4 'IBM Plex Mono',monospace; color:#ffffffb3; white-space:nowrap; }
.library-progress { display:flex; gap:4px; width:clamp(80px,18vw,220px); height:2px; }
.library-progress span { flex:1; background:#ffffff30; transition:background .25s; }
.library-progress span[aria-current='true'] { background:white; }
.library-navigation { display:flex; align-items:center; gap:10px; }
.library-help { margin:0 14px 0 0; font-size:12px; color:#ffffff9c; }
.library-navigation .carousel-arrow:disabled { opacity:.3; cursor:default; transform:none; background:transparent; }
@media(max-width:760px) {
  .agent-library { margin-top:32px; padding:48px 0 52px; --library-card-height:248px; }
  .library-filters,.library-detail,.library-footer { padding-inline:24px; }
  .library-filters { gap:4px; margin-bottom:32px; }
  .library-filter { padding:10px 13px; font-size:12px; }
  .library-detail { grid-template-columns:minmax(0,1fr); gap:22px; min-height:298px; margin-bottom:20px; }
  .library-model-name { font-size:44px; max-width:16ch; margin-bottom:10px; }
  .library-model-creator { font-size:12px; }
  .library-description { font-size:16px; margin-bottom:14px; }
  .library-facts { gap:6px 14px; margin-bottom:14px; }
  .library-facts li { font-size:11px; }
  .library-footer { margin-top:24px; gap:16px; }
  .library-position { gap:12px; }
  .library-help { display:none; }
  .library-navigation { gap:8px; }
}
@media(prefers-reduced-motion:reduce) {
 .library-filter,.library-card,.library-card-logo,.library-card-bottom,.library-progress span,.library-source,.library-source svg { transition:none; }
 .library-filter:active,.library-card-bottom,.library-source:hover svg { transform:none; }
 .library-track { will-change:auto; }
}
