Same here: if you do -4, then the width of the #thumbnails container is too wide.  

Also, I just noticed that you're using pixels here so that the space between thumbnails is 1px on all devices.  So if you leave this as -4, then the width of the #thumbnails container should change to just 100%.  But if you change it to -3, then you should change the container width to 100%+1px instead of 100%+.1rem  (Or use nth-child to just remove the right margin for every 4th child and use a width of 100%)