/* A film browser, using the existing Kept palette and original Remotion posters. */
.library { width: min(1240px, calc(100% - 64px)); margin: 0 auto; color: #111827; }
.library [hidden] { display: none !important; }
.library a { color: inherit; text-decoration: none; }
.library button, .library input, .library select { font: inherit; color: inherit; }
.library button { cursor: pointer; }
.library :is(button, a, input, select):focus-visible { outline: 3px solid #994619; outline-offset: 4px; }
.library .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.library-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.library-hero { display: grid; grid-template-columns: 1.35fr .8fr; align-items: center; gap: 72px; padding: 5px 0 52px; }
.library-intro h1 { max-width: 630px; font-size: clamp(34px, 4vw, 56px); line-height: 1.08; font-weight: 500; letter-spacing: -.045em; margin: 22px 0 20px; text-wrap: balance; }
.library-intro > p { max-width: 430px; color: #565961; font-size: 16px; line-height: 1.65; }
.library-facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 27px; font-size: 12px; color: #62636a; }
.library-facts strong { color: #111827; font-weight: 700; }
.library-facts span + span { padding-left: 22px; border-left: 1px solid #d7d3cc; }
.library-feature { display: block; padding: 18px; border: 1px solid #d9ab8a; border-radius: 18px; background: radial-gradient(ellipse at 20% 10%, #fff2dc, transparent 70%), linear-gradient(135deg, #f1c6a7, #e89b69); transition: transform 180ms ease; }
.library-feature:hover { transform: translateY(-3px); }
.library-feature .library-kicker { margin-bottom: 12px; }
.feature-cover { position: relative; overflow: hidden; border-radius: 9px; aspect-ratio: 16 / 9; background: #111827; }
.feature-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feature-play { display: grid; place-items: center; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: #fff7ed; box-shadow: 0 3px 20px #11182725; }
.feature-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; }
.feature-label strong { font-weight: 600; }
.library-back { display: inline-block; font-size: 13px; font-weight: 600; }

.library-browser { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 40px; padding-top: 32px; border-top: 1px solid #dedbd4; }
.library-browser--team { grid-template-columns: minmax(0, 1fr); }
.library-sidebar { min-width: 0; align-self: start; position: sticky; top: 110px; }
.library-sidebar h2 { margin: 4px 0 17px; }
.library-collections { display: grid; gap: 5px; }
.library-collections button { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; width: 100%; border: 0; border-radius: 8px; background: transparent; padding: 11px 12px; font-size: 12px; font-weight: 600; }
.library-collections button:hover { background: #efebe5; }
.library-collections button[aria-pressed="true"] { background: #111827; color: #fff; }
.collection-count { opacity: .8; font-size: 11px; }
.library-team-label { display: block; font-size: 11px; margin: 27px 0 9px; color: #565961; }
.library-sidebar select { width: 100%; min-height: 43px; border: 1px solid #d7d3cc; border-radius: 8px; background: #fff; padding: 8px; font-size: 12px; }
.library-aside-note { padding: 24px 0 0; margin-top: 29px; border-top: 1px solid #dedbd4; }
.library-aside-note .library-kicker { font-size: 10px; }
.library-aside-note p { font-size: 12px; line-height: 1.7; color: #565961; margin: 10px 0; }
.library-aside-note a { font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.library-results { min-width: 0; }
.library-filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.library-search { display: flex; align-items: center; gap: 9px; flex: 1 1 220px; border: 1px solid #d7d3cc; padding: 0 12px; border-radius: 9px; background: #fff; }
.library-search svg { flex: 0 0 18px; color: #62636a; }
.library-search input { background: transparent; border: 0; min-width: 0; width: 100%; min-height: 43px; font-size: 12px; }
.library-search input::placeholder { color: #64666d; }
.library-roles { display: flex; flex-wrap: wrap; gap: 3px; border: 1px solid #dedbd4; border-radius: 10px; padding: 4px; background: #f1eee8; }
.library-roles button { border: 0; border-radius: 6px; padding: 9px 10px; background: transparent; font-size: 11px; font-weight: 600; }
.library-roles button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 4px #11182715; }
.library-roles button:hover { background: #fff8f0; }
.library-result-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; padding: 27px 0 17px; }
.library-result-bar h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.library-result-bar p { font-size: 11px; color: #62636a; margin: 0; }
.library-reset { margin-left: auto; padding: 4px 0; font-size: 11px !important; font-weight: 600 !important; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.film-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e0dcd5; border-radius: 12px; overflow: hidden; background: #fff; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.film-card:hover { transform: translateY(-4px); border-color: #cd9671; box-shadow: 0 12px 24px #3f2d1c0a; }
.film-cover { position: relative; aspect-ratio: 16 / 9; background: #111827; overflow: hidden; }
.film-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-time { position: absolute; right: 9px; bottom: 9px; padding: 3px 6px; border-radius: 4px; background: #111827e8; color: #fff; font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 600; }
.film-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; height: 38px; width: 38px; border-radius: 50%; color: #111827; background: #fff4e8ed; opacity: 0; transition: opacity 140ms ease; }
.film-card:is(:hover, :focus-visible) .film-play { opacity: 1; }
.film-copy { display: flex; flex-direction: column; flex: 1; padding: 15px; }
.film-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; justify-content: space-between; color: #64636a; font-size: 11px; font-weight: 600; line-height: 1.45; }
.film-meta span:first-child { color: #914015; }
.film-copy h3 { font-size: 14px; font-weight: 600; letter-spacing: -.015em; line-height: 1.5; margin: 10px 0 18px; text-wrap: pretty; }
.film-action { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; margin-top: auto; }
.library-more { text-align: center; margin-top: 32px; }
.library-more p { color: #62636a; font-size: 11px; margin: 0 0 12px; }
.library-more button, .library-empty button { background: #fff; border: 1px solid #ccc5bd; padding: 12px 24px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.library-more button:hover, .library-empty button:hover { background: #fff1e6; border-color: #b26c3e; }
.library-empty { padding: 68px 22px; text-align: center; border: 1px dashed #cfc5ba; border-radius: 12px; background: #f6f0e9; }
.library-empty h3 { font-size: 22px; font-weight: 500; }
.library-empty p { font-size: 14px; margin: 12px 0 22px; }
.library-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: center; margin-top: 68px; border-top: 1px solid #d7c4b3; border-radius: 16px; padding: 32px; background: linear-gradient(115deg, #fae8d4, #eec4a5); }
.library-next h2 { max-width: 360px; font-size: 26px; line-height: 1.3; font-weight: 500; letter-spacing: -.025em; margin-top: 12px; }
.library-next > div:last-child { display: grid; gap: 12px; }
.library-next a { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 44px; }
.library-next a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .library-hero { gap: 40px; }
  .library-browser { gap: 25px; grid-template-columns: 175px minmax(0, 1fr); }
  .library-browser--team { grid-template-columns: minmax(0, 1fr); }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-roles { width: 100%; justify-content: space-between; }
}
@media (max-width: 760px) {
  .library { width: calc(100% - 36px); }
  .library-hero { grid-template-columns: 1fr; gap: 20px; padding-bottom: 22px; }
  .library-intro h1 { max-width: 510px; margin: 15px 0; }
  .library-intro > p { font-size: 14px; }
  .library-feature { max-width: none; width: 100%; padding: 12px; display: grid; grid-template-columns: 112px 1fr; gap: 5px 14px; align-items: center; }
  .library-feature .feature-cover { grid-column: 1; grid-row: 1 / 3; }
  .library-feature .library-kicker { grid-column: 2; font-size: 9px; margin: 0; align-self: end; }
  .library-feature .feature-label { margin: 0; font-size: 12px; align-self: start; }
  .library-feature .feature-play { width: 32px; height: 32px; }
  .library-feature .film-time { right: 3px; bottom: 3px; font-size: 8px; }
  .library-facts { gap: 12px; font-size: 10px; margin-top: 20px; }
  .library-facts span + span { padding-left: 12px; }
  .library-browser { grid-template-columns: 1fr; gap: 16px; padding-top: 18px; }
  .library-sidebar { position: static; }
  .library-sidebar h2 { margin: 0 0 12px; }
  .library-collections { display: flex; overflow-x: auto; gap: 7px; padding: 3px 3px 8px; }
  .library-collections button { width: auto; flex-shrink: 0; border: 1px solid #dedbd4; padding: 10px 12px; }
  .library-team-label { margin: 12px 0 6px; }
  .library-aside-note { display: none; }
  .library-roles { width: auto; }
  .library-filters { gap: 12px; }
  .library-next { margin-top: 44px; padding: 25px; }
}
@media (max-width: 480px) {
  .library-grid { grid-template-columns: 1fr; gap: 20px; }
  .library-roles { width: 100%; }
  .library-roles button { font-size: 10px; padding: 9px 7px; }
  .film-meta { font-size: 11px; }
  .film-copy h3 { font-size: 17px; }
  .film-action { font-size: 12px; }
  .film-play { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .library-feature, .film-card, .film-play { transition: none; }
  .library-feature:hover, .film-card:hover { transform: none; }
}
