/* Library per production (15 Nov 2026, client/library-page.js). Flat cards: no shadows, no one-sided accent edges, no movement on
   hover; every colour is a theme token (client/theme.css), so light and dark both follow the person's appearance. */
.library-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.library-card{display:flex;flex-direction:column;color:var(--ink);text-decoration:none;background:var(--surface);box-shadow:none}
.library-card:hover{transform:none;box-shadow:none;border-color:var(--hair-2)}
.library-card:focus-visible{outline:2px solid var(--iris);outline-offset:2px}
.library-cover{display:block;aspect-ratio:4/5;overflow:hidden;background:var(--surface-2)}
.library-cover img{display:block;width:100%;height:100%;object-fit:cover}
.library-blank{display:block;width:100%;height:100%;background:var(--surface-2)}
.library-card .card-body{display:flex;flex-direction:column;gap:4px;flex:1 1 auto}
.library-card-title{font-size:13px;font-weight:600;line-height:1.4;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px;overflow-wrap:anywhere}
.library-card-meta{font-size:11px;color:var(--ink-2)}
.library-card-kinds{font-size:11px;color:var(--ink-3);min-height:16px}
.library-card-foot{display:flex;margin-top:auto;padding-top:10px}
/* The count and Show more sit under the grid from the same left edge as the cards and the search box (Badal, 15 Nov 2026: "Showing 1 of 1"
   was hanging in the centre of the page, far from a single card). */
.library-more{display:flex;align-items:center;justify-content:flex-start;gap:14px;margin:24px 0 8px;font-size:12px;color:var(--ink-3)}
.library-more[hidden],.library-more .btn[hidden]{display:none}
#library-earlier{margin-top:32px}
/* My work: saved drafts in their own group above the productions; each opens its chat with the draft restored. */
.library-drafts{margin:0 0 4px}
.library-drafts .section-title,#work-drafts .library-productions-title{font:500 14px/1.4 var(--ui);color:var(--ink-3);margin:0 0 10px}
#work-drafts .library-productions-title{margin-top:26px}
.library-draft{display:flex;flex-direction:column;gap:4px;min-width:0;padding:12px 14px;border:1px solid var(--hair);border-radius:10px;background:var(--surface);color:var(--ink);text-decoration:none;box-shadow:none}
.library-draft:hover{border-color:var(--hair-2)}
.library-draft:focus-visible{outline:2px solid var(--iris);outline-offset:2px}
.library-draft-title{font-size:13px;font-weight:600;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
#library-earlier .section-title{font:500 14px/1.4 var(--ui);color:var(--ink-3);margin:0 0 10px}
/* One production */
.library-back{margin-bottom:18px}
.library-loading{font-size:13px;color:var(--ink-3);padding:24px 0}
.library-production-title h1{overflow-wrap:anywhere}
.library-production{display:flex;flex-wrap:wrap;align-items:flex-start;gap:16px}
.library-family{flex:0 1 auto;max-width:100%;min-width:0;border:1px solid var(--hair);border-radius:10px;padding:16px;background:transparent}
.library-family-note{margin:0 0 10px;font-size:12px;color:var(--ink-3);max-width:520px}
.library-family-items{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-start}
.library-item{--library-ratio:.8;width:250px;display:flex;flex-direction:column;min-width:0;border:1px solid var(--hair-soft);border-radius:8px;overflow:hidden;background:var(--surface)}
.library-media{aspect-ratio:var(--library-ratio);max-height:460px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;overflow:hidden}
.library-picture{display:block;width:100%;height:100%;cursor:zoom-in}
.library-media img,.library-video{display:block;width:100%;height:100%;object-fit:contain;background:var(--surface-2)}
.library-item-body{display:flex;flex-direction:column;gap:4px;padding:12px}
.library-item-body .pill{align-self:flex-start}
.library-item-body h3{margin:4px 0 0;font-size:13px;font-weight:600;line-height:1.4;color:var(--ink);overflow-wrap:anywhere}
.library-from,.library-item-meta{font-size:11px;color:var(--ink-3);overflow-wrap:anywhere}
.library-item .card-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.library-item .card-actions .btn{margin:0}
.library-item .card-actions .btn[hidden]{display:none}
@media(max-width:740px){
 .library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .library-card-title{font-size:12px}
 .library-family{padding:12px;flex-basis:100%}
 .library-item{width:100%}
 .library-media{max-height:none}
 .library-more{flex-direction:column;align-items:flex-start;gap:8px}
}
