:is(#gallery,#recent,#favorites)>.item:not(.list){position:relative;display:block;min-width:0;min-height:110px;aspect-ratio:1;isolation:isolate}
:is(#gallery,#recent,#favorites)>.item:not(.list)>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;background:var(--card);z-index:0}
:is(#gallery,#recent,#favorites)>.item:not(.list)>.chip{position:absolute;top:7px;right:7px;max-width:calc(100% - 48px);z-index:3;padding:5px 7px;font-size:10px;line-height:1.2;background:var(--card);white-space:normal}
:is(#gallery,#recent,#favorites)>.item>.sel{z-index:4}
:is(#gallery,#recent,#favorites)>.item:not(.list)>.meta{z-index:2;pointer-events:none;max-height:45%;overflow:hidden}
#gallery>.item.list{min-height:76px}
#gallery>.item.list>img{flex:0 0 52px;order:1;object-fit:contain}
#gallery>.item.list>.meta{order:2;min-width:0}
#gallery>.item.list>.chip{order:3;margin-left:auto;max-width:110px;font-size:11px;white-space:normal}
#viewer-content{display:flex;align-items:center;justify-content:center;width:min(100%,1000px);height:80vh;min-width:0}
#viewer-content>img{display:block;max-width:100%;max-height:80vh;width:auto;height:auto;object-fit:contain}
#viewer-content>video{display:block;max-width:100%;max-height:80vh}
#md-preview-status{font-size:14px;overflow-wrap:anywhere}