/* Four destinations, one quiet library language. */
.sidebar-library { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; margin:4px 14px 12px; }
.sidebar-library-label { grid-column:1/-1; padding:3px 9px 5px; color:var(--work-muted); font-size:10px; font-weight:500; letter-spacing:.1em; text-transform:uppercase; }
.sidebar-library .library-link { display:flex; align-items:center; gap:8px; min-width:0; min-height:44px; padding:10px 9px; border:1px solid transparent; border-radius:11px; background:transparent; color:var(--work-muted); font:500 12px/1.4 var(--ff-heading,inherit); text-decoration:none; cursor:pointer; transition:background-color .16s ease,color .16s ease,border-color .16s ease; }
.sidebar-library .library-link svg { flex:0 0 16px; opacity:.85; }
.sidebar-library .library-link:hover { color:var(--work-ink); background:var(--work-soft); border-color:var(--work-line); }
.sidebar-library .library-link:focus-visible { outline:2px solid var(--work-accent); outline-offset:2px; color:var(--work-accent); }
.library-page {
  --work-ground:#131022; --work-card:#1c182e; --work-ink:#f2eef8; --work-muted:#b3a9c4;
  --work-line:#383045; --work-accent:#d9c19a; --work-soft:#9889c00d;
  --s0:var(--work-ground); --s1:var(--work-card); --s2:var(--work-card); --s3:var(--work-soft);
  --text:var(--work-ink); --text-mute:var(--work-muted); --text-dim:var(--work-muted);
  --line:var(--work-line); --gold-text:var(--work-accent); --ff-heading:"Inter Variable",Inter,sans-serif;
  background:var(--work-ground); color:var(--work-ink);
}
[data-theme="light"] .library-page {
  --work-ground:#f8f6f2; --work-card:#fffdfa; --work-ink:#30283e; --work-muted:#70677b;
  --work-line:#e4dfe5; --work-accent:#624b7d; --work-soft:#5c477508;
}
/* Browsing uses creation-gallery.css itself, shared with Images and Processes.
   Only document-specific preview content and menus are defined here. */
.library-page .creation-gallery { --s1:#121214; --ff-heading:'Inter Variable',system-ui,-apple-system,'Segoe UI',sans-serif; }
.library-page.library-browsing { overflow:hidden; }
.library-page.library-browsing .ws-pagehead { display:none; }
.library-page:not(.doc-open):not(.library-browsing) .ws-shell { max-width:1320px; padding:40px clamp(20px,4vw,56px) 60px; }
.library-page .creation-preview { text-decoration:none; }
.library-search, .library-create { position:relative; }
.library-search:has(.library-filter:not([hidden])) input { padding-right:48px; }
.library-filter { position:absolute; right:7px; top:6px; }
.library-filter > summary { display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:7px; color:var(--work-muted); background:transparent; cursor:pointer; font-size:12px; }
.library-filter > summary:hover { background:var(--work-soft); }
:is(.library-create,.library-filter) > summary { list-style:none; }
:is(.library-create,.library-filter) > summary::-webkit-details-marker { display:none; }
.library-menu { position:absolute; right:0; top:calc(100% + 8px); z-index:4; min-width:180px; padding:6px; background:var(--work-card); border:1px solid var(--work-line); border-radius:12px; box-shadow:0 12px 32px #0002; }
.library-menu .creation-btn { width:100%; justify-content:flex-start; border-color:transparent; white-space:nowrap; }
.library-menu em { margin-left:auto; font-style:normal; color:var(--work-muted); }
.library-menu [aria-pressed="true"] { background:var(--work-soft); }
.library-paper { aspect-ratio:3/4; height:91%; max-width:80%; display:flex; flex-direction:column; gap:12px; overflow:hidden; padding:clamp(14px,2vw,24px); border:1px solid var(--work-line); border-radius:5px; background:var(--work-card); color:var(--work-ink); box-shadow:0 6px 16px #00000008; text-align:left; }
.library-paper-kind { font-size:9px; letter-spacing:.1em; text-transform:uppercase; color:var(--work-accent); }
.library-paper-title { font:500 12px/1.5 var(--ff-heading); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.library-paper-meta { font-size:9px; color:var(--work-muted); }
.library-paper-lines { display:grid; gap:8px; margin-top:auto; padding-top:8px; }
.library-paper-lines i { height:3px; border-radius:2px; background:var(--work-line); }
.library-paper-lines i:nth-child(2) { width:87%; }
.library-paper-lines i:last-child { width:65%; }
.library-page .ws-btn { min-height:40px; padding:9px 12px; border:1px solid var(--work-line); border-radius:10px; background:transparent; color:var(--work-accent); font-weight:500; font-size:12px; line-height:1.4; box-shadow:none; }
.library-page .ws-btn:hover { background:var(--work-soft); filter:none; }
.library-page .ws-btn.gold { background:var(--work-soft); }
.library-page :is(button,a,input,select,textarea,[tabindex]):focus-visible { outline:2px solid var(--work-accent); outline-offset:3px; }
.library-page .library-new { margin-bottom:24px; border:1px solid var(--work-line); border-radius:18px; background:var(--work-card); }
.library-new > summary { padding:16px 20px; color:var(--work-accent); font-size:13px; font-weight:500; cursor:pointer; }
.library-new > .ws-card { margin:0; border:0; padding-top:4px; }
#wsOverlay { position:fixed; inset:0; z-index:490; display:flex; flex-direction:column; background:var(--work-ground); overflow:hidden; }
body.workspace-open aristos-support { visibility:hidden; }
#wsOverlay.hidden { display:none; }
#wsOverlay:is(.library-browsing,.document-workspace) .maps-overlay-toolbar { display:none; }
#wsOverlay .maps-overlay-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px clamp(16px,3vw,32px); background:var(--work-ground); border-bottom:1px solid var(--work-line); }
#wsOverlay .maps-overlay-label { color:var(--work-muted); font-size:13px; font-weight:500; letter-spacing:normal; text-transform:none; }
#wsOverlay .overlay-tool-btn { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 12px; border:1px solid var(--work-line); border-radius:10px; background:transparent; color:var(--work-accent); font:500 12px/1.4 system-ui,sans-serif; cursor:pointer; }
#wsOverlay .overlay-tool-btn:hover { background:var(--work-soft); }
#wsOverlay .overlay-tool-btn:focus-visible { outline:2px solid var(--work-accent); outline-offset:3px; }
#wsOverlay .maps-overlay-iframe { flex:1; width:100%; min-height:0; border:0; background:var(--work-ground); }
.library-page .ws-pagehead { background:var(--work-ground); border-color:var(--work-line); }
.library-page .ws-pagehead :is(.brand,nav a,.back) { color:var(--work-ink); }
.library-page .ws-pagehead .back { background:transparent; border:1px solid var(--work-line); font-weight:500; }
.live-return-status { display:flex; align-items:center; gap:12px; padding:10px 22px; color:var(--work-muted); background:var(--work-soft); border-bottom:1px solid var(--work-line); font-size:12px; line-height:1.5; }
.live-return-status[hidden] { display:none; }
.live-return-status > span { flex:1; min-width:0; overflow-wrap:anywhere; }
.live-return-status .creation-btn { flex-shrink:0; min-height:36px; }
@media(max-width:600px) {
  .library-page:not(.doc-open):not(.library-browsing) .ws-shell { padding:24px 16px 40px; }
  .library-page .ws-pagehead { padding:10px 16px; flex-wrap:wrap; gap:8px; }
  .library-page .ws-pagehead nav { order:2; width:100%; }
}
@media(prefers-reduced-motion:reduce) { .sidebar-library .library-link { transition:none; } }
