I was going to suggest something similar to @Sgian Dubh above, except I was thinking of a full height lining to the reveal - depending on height/no of shelves, you could probably get away with 1/2” ply for the reveals.
(I would probably then go OTT with an architrave strip to cover any wonky...