Also, if you compute the thumbnail width this way then the three thumbnails plus their three 1px margin-right amounts will fit in the 100% width of the screen, and it is no longer necessary to have width: calc(100% + .1rem) in the styles for #thumbnails.  It also means that the screen will appear one pixel too narrow because the margin-right of every 3rd thumbnail will be right up against the edge of the screen.  Perhaps you could do a -2 here instead of -3 and combine it with a :nth-child style?  This is something that I had never worked out to my satisfaction for the 320x480 resolution.  I don't think you need to do the nth-child thing in order to land this, but I do think you should fix the width of the parent, at least.