/* World Library: Option A, flat covers in the shared dark application shell. */
.library-page { display:flex; flex-direction:column; gap:1.5rem; padding:.5rem 0 3rem; color:#e2e8f0; }
.library-page h1 { font-size:2rem; line-height:1.2; color:#e9d5ff; }
.library-page h2 { font-size:1.2rem; font-weight:600; }
.library-page h3 { font-weight:600; }
.library-heading,.library-actions,.library-toolbar,.library-pagination { display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }
.library-heading { justify-content:space-between; }
.library-eyebrow { color:#c4b5fd; font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; margin-bottom:.35rem; }
.library-muted { color:#94a3b8; font-size:.85rem; }
.library-button { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; border:1px solid #475569; border-radius:.6rem; padding:.55rem .85rem; background:#1e293b; color:#e2e8f0; font-size:.85rem; cursor:pointer; }
.library-button:hover { background:#334155; border-color:#94a3b8; }
.library-primary { color:#e9d5ff; border-color:#a78bfa80; }
.library-button:disabled { opacity:.4; cursor:default; }
.library-page :is(a,button,input,textarea,select):focus-visible,.library-dialog :is(a,button,input,textarea,select):focus-visible { outline:2px solid #c4b5fd; outline-offset:3px; }
.library-page input,.library-page select,.library-page textarea { background:#0d1117; color:#e2e8f0; border:1px solid #475569; border-radius:.5rem; padding:.6rem .75rem; max-width:100%; }
.library-page label { display:flex; flex-direction:column; gap:.4rem; font-size:.8rem; }
.library-search { flex:1; min-width:180px; }
.library-view-switch { display:flex; border:1px solid #334155; border-radius:.6rem; overflow:hidden; }
.library-view-switch button { font-size:.8rem; padding:.6rem .75rem; }
.library-view-switch button[aria-pressed="true"] { color:#e9d5ff; background:#312e49; }
.library-categories { display:flex; gap:.5rem; flex-wrap:wrap; }
.library-categories a { font-size:.8rem; padding:.45rem .75rem; border-radius:2rem; border:1px solid #334155; color:#cbd5e1; }
.library-categories a[aria-current] { color:#e9d5ff; background:#30263f; border-color:#a78bfa80; }
.library-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); gap:1.5rem; }
.library-card { min-width:0; }
.library-cover { position:relative; aspect-ratio:2/3; border:1px solid #475569; border-radius:.45rem; overflow:hidden; background:#1c2736; }
.library-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.library-cover-fallback { padding:1.2rem; height:100%; display:flex; flex-direction:column; justify-content:space-between; border-top:5px solid #a78bfa; }
.library-cover-fallback span { font-size:.7rem; color:#c4b5fd; letter-spacing:.04em; }
.library-cover-fallback strong { font-family:Georgia,serif; font-size:1.5rem; line-height:1.2; overflow-wrap:anywhere; }
.library-cover-link:hover .library-cover { border-color:#c4b5fd; }
.library-card-copy { padding:.75rem 0; }
.library-card-copy h2 { font-size:1rem; margin:.2rem 0; }
.library-cover-small { width:140px; flex-shrink:0; }
.library-badges { display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.5rem; }
.library-badge { display:inline-block; border:1px solid #334155; border-radius:.35rem; padding:.15rem .35rem; font-size:.65rem; color:#cbd5e1; background:#18212f; }
.library-shelf { display:flex; flex-direction:column; gap:1rem; }
.library-panel,.library-empty { background:#161b22; border:1px solid #303b4d; border-radius:.8rem; padding:1.25rem; }
.library-empty { padding:3rem 1rem; display:flex; flex-direction:column; gap:1rem; align-items:center; text-align:center; color:#94a3b8; }
.library-empty i { font-size:2rem; color:#c4b5fd; }
.library-pagination { justify-content:flex-end; font-size:.8rem; }
.library-pagination span { margin-right:auto; color:#94a3b8; }
.library-table-wrap { overflow-x:auto; }
.library-table { width:100%; font-size:.85rem; text-align:left; border-collapse:collapse; }
.library-table :is(th,td) { padding:1rem .6rem; border-bottom:1px solid #334155; }
.library-table th { color:#94a3b8; font-weight:500; }
.library-table td:first-child { min-width:180px; }
.library-table a { color:#e9d5ff; }
.library-table small { display:block; color:#94a3b8; margin-top:.35rem; }
.library-dialog { width:min(760px,calc(100vw - 2rem)); max-height:90vh; border:1px solid #475569; border-radius:1rem; padding:1.5rem; background:#161b22; color:#e2e8f0; }
.library-dialog::backdrop { background:#000c; backdrop-filter:blur(5px); }
.library-dialog .library-page { padding:0; }
.library-dialog ul { padding-left:1rem; list-style:disc; font-size:.85rem; }
.library-reading-layout { display:grid; grid-template-columns:220px minmax(0,1fr); gap:2rem; align-items:start; }
.library-contents { position:sticky; top:1rem; display:flex; flex-direction:column; gap:.5rem; max-height:80vh; overflow:auto; }
.library-contents a { padding:.5rem; color:#cbd5e1; font-size:.85rem; border-left:2px solid #475569; }
.library-contents a[aria-current] { color:#e9d5ff; border-color:#c4b5fd; }
.library-manuscript { width:100%; max-width:850px; margin:auto; line-height:1.8; }
.library-manuscript h2 { font-family:Georgia,serif; font-size:1.8rem; margin-bottom:1rem; }
.library-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.library-form-grid .library-full { grid-column:1/-1; }
.library-editor-sections { display:flex; flex-wrap:wrap; gap:.5rem; }
.library-comment { border-top:1px solid #334155; padding:1rem 0; }
.library-comment blockquote { border-left:2px solid #a78bfa; padding-left:.75rem; color:#cbd5e1; white-space:pre-wrap; }
.library-review-json { overflow:auto; white-space:pre-wrap; font-size:.8rem; padding:1rem; background:#0d1117; }
@media(max-width:640px) { .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; } .library-cover-fallback { padding:.8rem; } .library-cover-fallback strong { font-size:1.2rem; } .library-heading h1 { font-size:1.65rem; } .library-reading-layout { grid-template-columns:1fr; } .library-contents { position:static; max-height:200px; } .library-form-grid { grid-template-columns:1fr; } }
