just a little tip for the mobile-friendly part: doing inspect element (right click -> inspect element or ctrl+shift+c) on chrome and then clicking the little screens thing next to "elements" lets you toggle mobile view on your browser. it's not completely accurate, but it works! (^人^) you can cycle through the different devices & screen sizes with the little drop-down menu at the top.
display:flex; works on border, yes! using [border=][/border] for advanced bbcoding is basically just css injection, so most of the functionalities you find when googling should work. i'd recommend you this old post that gives some useful places to get started with it. if you have any specific questions, i'd be happy to answer them (o˘◡˘o)