#libraryDialog{width:min(900px,calc(100% - 48px));max-width:900px;height:min(800px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);padding:24px;overflow:hidden;box-sizing:border-box}
#libraryDialog[open]{display:flex;flex-direction:column;gap:0}
#libraryDialog .dialog-heading{flex-shrink:0}
#libraryDialog .dialog-heading .eyebrow{display:none}
#libraryDialog .dialog-heading h3{margin:0;font-size:22px}
#libraryDialog>p{font-size:14px;line-height:1.6;margin:8px 0 18px;color:#68756d}
#libraryOptions{display:flex;flex-direction:column;flex:1;min-height:0;gap:12px;margin-top:0}
#libraryOptions [hidden]{display:none!important}
.box-selection-modes{display:flex;gap:24px;border-bottom:1px solid #e1e5e2;flex-shrink:0}
.box-selection-modes button{padding:10px 2px 12px;border:0;border-bottom:2px solid transparent;background:none;color:#68756d;font-size:14px;font-weight:600;border-radius:0}
.box-selection-modes button[aria-pressed=true]{border-bottom-color:#255e4b;color:#255e4b}
.box-gallery-filters{display:grid;grid-template-columns:160px minmax(0,1fr) auto;gap:8px;flex-shrink:0}
.box-gallery-filters input,.box-gallery-filters select,.box-gallery-filters button{min-height:40px;min-width:0;border:1px solid #dce2de;border-radius:7px;background:#fff;color:#34483f;padding:8px 12px;font:inherit;font-size:13px}
.box-gallery-filters button{padding-inline:18px}
#libraryOptions .box-gallery-status{font-size:13px;line-height:1.5;color:#68756d;margin:0;flex-shrink:0}
.box-gallery-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:2px 4px 4px 2px;scrollbar-gutter:stable}
.box-gallery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-content:start}
.box-gallery-card{display:flex;flex-direction:column;width:100%;min-width:0;padding:0;border:1px solid #e1e5e2;border-radius:10px;background:#fff;text-align:left;color:#263e34;overflow:hidden}
.box-gallery-card:hover{border-color:#91a69b;box-shadow:0 2px 8px #233e3210}
.box-gallery-card[aria-pressed=true]{border-color:#386c56;box-shadow:inset 0 0 0 1px #386c56}
.box-gallery-picture{display:grid;place-items:center;position:relative;width:100%;aspect-ratio:280/208;background:#f5f6f5;border-bottom:1px solid #eef0ee}
.box-gallery-picture img{display:block;width:100%;height:100%;object-fit:contain;filter:grayscale(1);mix-blend-mode:multiply}
.box-image-placeholder{font-size:13px;color:#7b8780}
.box-gallery-selected{position:absolute;top:8px;left:8px;padding:3px 7px;border-radius:4px;background:#fff;color:#255e4b;font-size:11px}
.box-gallery-copy{display:flex;flex:1;flex-direction:column;gap:6px;padding:12px;width:100%;box-sizing:border-box}
.box-gallery-copy strong{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.box-gallery-copy small{font-size:12px;line-height:1.5;color:#77817b;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.box-gallery-choice{font-size:12px;color:#436351;margin-top:auto;padding-top:6px}
.box-gallery-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:12px;border-top:1px solid #e1e5e2;font-size:13px;color:#68756d;flex-shrink:0}
.box-gallery-pagination{display:flex;gap:8px}
.box-gallery-pagination button{background:#fff;border:1px solid #dce2de;border-radius:7px;padding:8px 14px;min-height:38px;color:#34483f;font-size:13px}
.box-gallery-pagination button:disabled{opacity:.4;cursor:default}
.box-gallery-more{grid-column:1/-1;border:1px dashed #dce2de;border-radius:8px;background:#fff;padding:16px;color:#436351;font-size:14px}
#libraryOptions button:focus-visible,#libraryOptions input:focus-visible,#libraryOptions select:focus-visible,.box-gallery-scroll:focus-visible{outline:2px solid #477860;outline-offset:2px}
#libraryOptions button:disabled{cursor:wait}
#libraryOptions .box-gallery-pagination button:disabled{cursor:default}
.box-other-option{margin-bottom:8px}
@media(min-width:601px) and (max-width:840px){.box-gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){
 #libraryDialog{padding:18px 14px;width:calc(100% - 24px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}
 #libraryDialog>p{font-size:13px;margin-bottom:12px}
 #libraryOptions{gap:10px}
 .box-gallery-filters{grid-template-columns:minmax(0,1fr) auto}
 .box-gallery-filters select{grid-column:1/-1}
 .box-gallery-filters input,.box-gallery-filters select{font-size:16px}
 .box-gallery-filters input,.box-gallery-filters select,.box-gallery-filters button,.box-gallery-pagination button{min-height:44px}
 .box-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .box-gallery-copy{padding:10px;gap:4px}
 .box-gallery-copy strong{font-size:13px}
 .box-gallery-copy small{font-size:11px}
 .box-gallery-footer{padding-top:10px;font-size:12px}
 .box-gallery-pagination button{padding-inline:12px}
}

.box-usage-tags{display:flex;flex-wrap:wrap;gap:4px}.box-usage-tags>span{font-size:11px;line-height:1.5;padding:2px 7px;border-radius:4px;background:#f0f3f2;color:#5d7067}
