.project-shelf-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.project-shelf-controls label { display: inline-flex; align-items: center; gap: 4px; }
.project-shelf-controls select, .project-folder-dialog select { max-width: 150px; background: var(--pan2, #1d252e); color: inherit; border: 1px solid var(--line, #526174); }
.project-shelf-menu { z-index: 120; width: 188px; padding: 4px; border: 1px solid var(--line, #526174); border-radius: 8px; background: var(--pan, #161c23); color: var(--tx, #dfe6ee); box-shadow: 0 6px 16px #0005; }
.project-shelf-menu button { display: block; width: 100%; text-align: left; border: 0; border-radius: 4px; padding: 6px 8px; background: transparent; color: inherit; }
.project-shelf-menu button:hover, .project-shelf-menu button:focus-visible { outline: 2px solid var(--acc, #ff7a1a); }
.project-folder-dialog { width: min(360px, 90vw); padding: 16px; background: var(--pan, #161c23); color: var(--tx, #dfe6ee); border: 1px solid var(--line, #526174); border-radius: 8px; }
.project-folder-dialog label { display: flex; align-items: center; gap: 8px; }
.project-folder-dialog menu { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 0; }
/* owner 2026-11-24 "I don't like the library layout, redesign it": Windfire Admin */
#drawer { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 10px; }
#drawer .dh { margin: 0; font-size: 15px; letter-spacing: .01em; }
#drawer .dh b { font-weight: 650; }
#drawer > .dact:has(#pNew) { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#drawer > .dact:has(#pNew) .btn { justify-content: center; text-align: center; padding: 7px 8px; border-radius: 8px; }
#drawer > .dact:has(#pNew) .btn:first-child { grid-column: 1 / -1; background: var(--acc, #ff7a1a); border-color: var(--acc, #ff7a1a); color: #1a0f06; font-weight: 650; }
#drawer .hint { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--mut, #8d9aa8); }
#drawer .project-shelf-controls { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 2px 0 0; }
.shelf-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: #0000002e; border: 1px solid var(--line, #2b3744); }
.shelf-tab { flex: 1; min-width: 0; padding: 5px 6px; border: 0; border-radius: 6px; background: none; color: var(--mut, #8d9aa8); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-tab:hover { color: var(--tx, #dfe6ee); }
.shelf-tab[aria-selected="true"] { background: var(--pan, #161c23); color: var(--tx, #dfe6ee); box-shadow: 0 1px 3px #0006; }
.shelf-tab:focus-visible { outline: 2px solid var(--acc, #ff7a1a); outline-offset: -2px; }
.shelf-search { position: relative; display: block; }
.shelf-search svg { position: absolute; left: 9px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); fill: none; stroke: var(--mut, #8d9aa8); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.shelf-search input { width: 100%; box-sizing: border-box; padding: 7px 10px 7px 30px; border-radius: 8px; border: 1px solid var(--line, #2b3744); background: #00000033; color: inherit; font: inherit; font-size: 13px; }
.shelf-search input:focus { outline: none; border-color: var(--acc, #ff7a1a); }
.shelf-folders { display: flex; gap: 6px; align-items: center; }
.shelf-folders select { flex: 1; min-width: 0; max-width: none; padding: 6px 8px; border-radius: 8px; font: inherit; font-size: 12.5px; }
.shelf-icon { flex: none; width: 32px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line, #2b3744); background: none; color: var(--tx, #dfe6ee); cursor: pointer; }
.shelf-icon:hover, .shelf-icon:focus-visible { border-color: var(--acc, #ff7a1a); outline: none; }
.shelf-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shelf-note { margin: 0; font-size: 12px; color: var(--mut, #8d9aa8); }
#drawer #projList, #drawer #cloudList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
#drawer #projList:empty, #drawer #cloudList:empty { display: none; }
#drawer .shelf-head { padding: 8px 4px 4px; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mut, #8d9aa8); background: none !important; box-shadow: none !important; }
#drawer .shelf-row { position: relative; display: flex; align-items: center; gap: 2px; border-radius: 8px; background: none; }
#drawer .shelf-row:hover { background: #ffffff0d; }
#drawer .shelf-row.cur { background: #ff7a1a1f; box-shadow: inset 3px 0 var(--acc, #ff7a1a); }
#drawer .shelf-row .po { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
#drawer .shelf-row .po:focus-visible { outline: 2px solid var(--acc, #ff7a1a); outline-offset: -2px; }
.shelf-ico { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: #ffffff0f; }
.shelf-ico svg { width: 17px; height: 17px; fill: none; stroke: var(--mut, #8d9aa8); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shelf-ico.cloud svg { stroke: #7fb6ff; }
.shelf-row.cur .shelf-ico svg { stroke: var(--acc, #ff7a1a); }
.shelf-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.shelf-name { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#drawer .shelf-text small { display: block; font-size: 11px; color: var(--mut, #8d9aa8); }
#drawer .shelf-row .project-actions { flex: none; width: 28px; height: 28px; margin-right: 4px; border: 0; border-radius: 6px; background: none; color: var(--mut, #8d9aa8); opacity: 0; cursor: pointer; }
#drawer .shelf-row:hover .project-actions, #drawer .shelf-row:focus-within .project-actions, #drawer .shelf-row.cur .project-actions { opacity: 1; }
#drawer .shelf-row .project-actions:hover, #drawer .shelf-row .project-actions:focus-visible { background: #ffffff14; color: var(--tx, #dfe6ee); outline: none; }
#drawer li.empty { margin-top: 6px; padding: 22px 12px; text-align: center; font-style: normal; color: var(--mut, #8d9aa8); font-size: 12.5px; border: 1px dashed var(--line, #2b3744); border-radius: 10px; }
#drawer > .dact:has(#pHist) { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line, #2b3744); }
#drawer > .dact:has(#pHist) .btn { flex: 1; justify-content: center; border-radius: 8px; }
#drawer #cloudInfo { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 11px; color: var(--mut, #8d9aa8); }
.shelf-meter { flex: 1; height: 5px; border-radius: 3px; background: #ffffff14; overflow: hidden; }
.shelf-meter i { display: block; height: 100%; border-radius: 3px; background: var(--acc, #ff7a1a); }
.shelf-meter.full i { background: #e5484d; }
@media (prefers-reduced-motion: no-preference) { #drawer .shelf-row, .shelf-tab { transition: background .12s ease, color .12s ease; } }

/* Saved-project cards reuse the WindFire part library palette and image ratio. */
.shelf-search-view { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.shelf-search-view .shelf-search { flex: 1 1 125px; min-width: 0; }
.project-view-toggle { display: inline-flex; align-items: center; gap: 2px; flex: none; padding: 2px; border: 1px solid var(--line,#2b3744); border-radius: 8px; }
.project-view-toggle button { color: inherit; background: transparent; border: 0; border-radius: 5px; padding: 5px 7px; font: inherit; font-size: 12px; cursor: pointer; }
.project-view-toggle button[aria-pressed="true"] { background: #ff7a1a26; }
.project-view-toggle button:focus-visible, .wflib-surface-shelf .lib-actions:focus-visible { outline: 2px solid var(--acc,#ff7a1a); outline-offset: -2px; }
#drawer #projList.project-cards, #drawer #cloudList.project-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,132px),1fr)); gap: 8px; }
#drawer .project-cards :is(.shelf-head,.empty) { grid-column: 1 / -1; }
#drawer .project-cards .shelf-row { min-width: 0; border: 1px solid var(--line,#2b3744); background: var(--pan2,#1d252e); }
#drawer .project-cards .shelf-row[hidden], #drawer .shelf-head[hidden] { display: none; }
#drawer .project-cards .shelf-row .po { flex-direction: column; align-items: stretch; gap: 5px; padding: 6px 6px 8px; }
#drawer .project-card-image { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 7px; background: #8090a01a; }
#drawer .project-cards .shelf-text { padding-right: 17px; }
#drawer .project-cards .project-actions { display: block; position: absolute; right: 2px; bottom: 3px; opacity: 1; }
.project-location { align-self: flex-start; border: 1px solid var(--line,#2b3744); border-radius: 4px; padding: 0 3px; }
.project-version-list ul { padding: 0; list-style: none; max-height: 45vh; overflow: auto; }
.project-version-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.project-version-list img { width: 44px; height: 44px; object-fit: contain; background: #8090a01a; border-radius: 5px; }
