.library-browser-open{overflow:hidden}
dialog.expanded-library{position:fixed;inset:0;box-sizing:border-box;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#101d23;color:#dce7e5;font:14px/1.45 Arial,sans-serif;overflow:hidden}
dialog.expanded-library[open]{display:flex;flex-direction:column}
.expanded-library::backdrop{background:#081115}
.expanded-library-heading{padding:22px 32px 16px;display:flex;gap:24px;align-items:center;justify-content:space-between;border-bottom:1px solid #334b53}
.expanded-library-heading h2{margin:4px 0;font:30px Georgia,serif;color:#f0e7d6}
.expanded-library-heading p{margin:5px 0;color:#a7bfc3;font-size:12px}
.expanded-library-heading>.button{flex-shrink:0}
.expanded-library-tools{padding:0 32px 12px;background:#13242b}
.expanded-library-tabs{display:flex;gap:28px;border-bottom:1px solid #334b53}
.expanded-library-tabs button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;padding:14px 2px 12px;color:#b5c9cb;font-size:14px}
.expanded-library-tabs button[aria-selected=true]{border-color:#d0ae75;color:#f4d7a4}
.expanded-library-tabs button:disabled{opacity:.4}
.expanded-library-filters{display:flex;gap:16px;align-items:flex-end;margin:14px 0 6px}
.expanded-library-filters label{display:flex;flex-direction:column;gap:5px;min-width:0;flex:0 1 270px}
.expanded-library-filters label:first-child{flex:1}
.expanded-library-filters label>span{font-size:11px;color:#b6cbcc}
.expanded-library-filters input,.expanded-library-filters select{box-sizing:border-box;width:100%;min-width:0;min-height:43px;padding:10px 12px;background:#0c1a21;color:#e5eeeb;border:1px solid #3c5862;border-radius:7px;font:14px Arial,sans-serif}
#expandedLibraryCount{margin:0 0 12px auto;color:#b5c9cb;white-space:nowrap;font-size:12px}
#expandedLibraryContext{margin:8px 0 0;color:#90afb4;font-size:11px}
.expanded-library-grid{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:22px 32px;display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:15px;align-content:start;scrollbar-color:#54717a #13242b}
.expanded-library-card{position:relative;min-width:0;display:flex;flex-direction:column;text-align:left;gap:6px;padding:10px;background:#172b33;border:1px solid #354f58;border-radius:10px;color:#e6eeeb;font:13px/1.35 Arial,sans-serif;cursor:pointer}
/* Keep the complete searchable/keyboard-accessible catalogue in the DOM while
 * letting the browser skip layout and paint inside off-screen thumbnails. */
.expanded-library-card{content-visibility:auto;contain-intrinsic-block-size:auto 280px}
.expanded-library-card:hover{border-color:#91b6ba;background:#1b333c}
.expanded-library-card.selected{border-color:#d0ae75;box-shadow:inset 0 0 0 1px #d0ae75;background:#303c3b}
.expanded-library-card.selected::after{content:"✓";position:absolute;top:16px;right:16px;width:25px;height:25px;border-radius:50%;background:#d0ae75;color:#13242b;text-align:center;line-height:25px;font-weight:bold}
.expanded-library-card img,.expanded-library-card>.library-natural-preview{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:5px;background:#0d1e25}
.expanded-library-card strong{font-weight:500}
.expanded-library-card small{color:#9db8bc;font-size:11px;margin-top:auto}
.library-natural-preview{background:#a28b63!important;border-radius:5px}
.expanded-library-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 32px;border-top:1px solid #3c535b;background:#17282f;min-height:78px;box-sizing:border-box}
#expandedLibrarySelection{display:flex;gap:14px;align-items:center;color:#b7c9ca;font-size:12px;min-width:0}
#expandedLibrarySelection img,#expandedLibrarySelection>.library-natural-preview{width:64px;height:64px;object-fit:contain;background:#0c1a21;border-radius:5px;flex:0 0 64px}
#expandedLibrarySelection strong{display:block;color:#eee4d2;font-size:16px;margin-bottom:4px}
#expandedLibrarySelection small{display:block;font-size:11px}
.expanded-library-footer>.button{flex-shrink:0;min-height:44px}
.expanded-library-empty{grid-column:1/-1;text-align:center;padding:35px 12px}
.expanded-library :focus-visible{outline:2px solid #a4dee1;outline-offset:3px}
.shelf-expand-button{white-space:nowrap;padding:7px 10px;border:1px solid #52727a;background:#20363e;border-radius:6px;color:#d5e8e7;font-size:11px;flex-shrink:0;min-height:32px}
.library-pending{display:flex;align-items:center;gap:10px;padding:7px 10px;margin:0 0 7px;border:1px solid #d0ae75;border-radius:7px;background:#273938;flex:0 0 auto}
.library-pending[hidden]{display:none}
.library-pending img{width:38px;height:38px;object-fit:contain;background:#0d1e25;border-radius:4px}
.library-pending-copy{min-width:0;flex:1;font-size:11px}
.library-pending-copy strong{display:block;color:#f4dfb8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.library-pending-copy small{display:block;color:#acc8c8;font-size:10px}
.library-pending button{padding:7px 10px;font-size:11px;white-space:nowrap}
.asset-card.library-ready{outline:2px solid #d0ae75;outline-offset:-2px}
@media(max-width:700px){
 .expanded-library-heading{padding:14px 16px;gap:10px;align-items:flex-start}
 .expanded-library-heading h2{font-size:23px}
 .expanded-library-heading p{font-size:11px}
 .expanded-library-heading>.button{font-size:11px;padding:9px;min-height:40px}
 .expanded-library-tools{padding:0 16px 10px}
 .expanded-library-tabs{gap:20px}
 .expanded-library-tabs button{font-size:12px;padding:12px 0}
 .expanded-library-filters{flex-wrap:wrap;gap:10px;margin-top:10px}
 .expanded-library-filters label:first-child{flex:1 0 100%}
 .expanded-library-filters label{flex:1}
 .expanded-library-filters input,.expanded-library-filters select{font-size:16px}
 #expandedLibraryCount{font-size:11px;margin-bottom:12px}
 #expandedLibraryContext{font-size:10px}
 .expanded-library-grid{padding:14px 16px;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .expanded-library-card{font-size:12px;padding:8px}
 .expanded-library-footer{padding:10px 16px;gap:10px;align-items:center}
 #expandedLibrarySelection{gap:8px;font-size:11px}
 #expandedLibrarySelection strong{font-size:12px}
 #expandedLibrarySelection small{font-size:10px}
 #expandedLibrarySelection small:last-child{display:none}
 #expandedLibrarySelection img,#expandedLibrarySelection>.library-natural-preview{width:40px;height:40px;flex-basis:40px}
 .expanded-library-footer>.button{padding:9px;font-size:11px}
 .studio-dock-active .shelf-header{flex-wrap:wrap;gap:5px}
 .shelf-expand-button{margin-left:auto}
 .library-pending{flex-wrap:wrap;gap:5px;padding:6px}
 .library-pending img{width:28px;height:28px}
 .library-pending-copy{flex:1}
 .finish-dock-active .finish-workbench:has(#libraryPending:not([hidden])){grid-template-rows:auto minmax(0,1fr)}
 .asset-shelf:has(#libraryPending:not([hidden])) #assetCards{display:none}
 .library-pending button{min-height:33px}
}
@media(max-height:550px) and (orientation:landscape){
 .expanded-library-heading{padding:8px 18px;gap:12px}
 .expanded-library-heading .eyebrow,.expanded-library-heading p{display:none}
 .expanded-library-heading h2{font-size:22px;margin:0}
 .expanded-library-heading>.button{padding:7px 10px;min-height:34px;font-size:12px}
 .expanded-library-tools{padding:0 18px 8px}
 .expanded-library-tabs button{padding:7px 0;font-size:12px}
 .expanded-library-filters{margin:8px 0 0;gap:10px;flex-wrap:nowrap}
 .expanded-library-filters label>span,#expandedLibraryContext{display:none}
 .expanded-library-filters label:first-child{flex:1}
 .expanded-library-filters label{flex:0 1 220px}
 .expanded-library-filters input,.expanded-library-filters select{min-height:34px;padding:6px 9px;font-size:13px}
 #expandedLibraryCount{margin-bottom:8px}
 .expanded-library-grid{padding:10px 18px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
 .expanded-library-footer{padding:7px 18px;min-height:54px}
 #expandedLibrarySelection img,#expandedLibrarySelection>.library-natural-preview{width:40px;height:40px;flex-basis:40px}
 #expandedLibrarySelection strong{font-size:13px;margin-bottom:0}
 #expandedLibrarySelection small:last-child{display:none}
 .expanded-library-footer>.button{min-height:36px;padding:7px 10px;font-size:12px}
}
@media(max-width:700px) and (max-height:650px) and (orientation:portrait){
 .expanded-library-heading{padding:8px 14px;gap:8px}
 .expanded-library-heading .eyebrow,.expanded-library-heading p,#expandedLibraryContext{display:none}
 .expanded-library-heading h2{font-size:21px;margin:0}
 .expanded-library-tools{padding:0 14px 8px}
 .expanded-library-filters{margin-top:8px;gap:7px}
 .expanded-library-filters label>span{display:none}
 .expanded-library-grid{padding:10px 14px}
 .expanded-library-footer{min-height:64px;padding:8px 14px}
}
