Securing vertical hinge
I would remove last two plates since they ruin the geometry here. And instead I can suggest using any modified brick with two studs facing towards hinged brick (white colored bricks). Technic, Pin Connector Round 2/3 L (seen in red) could then be used to attach studs on both sides. Orange plate below confirms all of this fit in required space.

A bit of background on the logic with my solution. With cases like this it is helpful when you measure everything in standard units. Here, brick height is 6 units, plate height is 2 units and stud is 5 units. From here you can clearly see you have a gap of 3 studs=15 units and your assembly is 14 units. The difference in 1 unit makes things more complicated. So my suggestion is to simplify it and make use of more common pieces.