Dynamic card size

I was wondering if anyone knows of a way to have the size of button cards change according to available space on the screen.

I am using fully kiosk on a Amazon Fire 7 tablet mounted by my front door. I have my alarm panel setup to auto hide. This creates extra space on the screen when collapsed. When the alarm panel expands it takes up a large portion of the screen.

Below are a few screen shots I’ve taken by manually adjusting the button card size (using the custom:button-card mod). I’m wondering if there is any way to have the buttons automatically increase in size when my alarm panel is collapsed and decrease in size when the alarm panel is expanded.

The first screen shot shows how it currently looks. Lots of available screen real estate when alarm panel is collapsed.
The second screen shot shows how I’d like the button cards to be sized when the alarm panel is expanded.
The third screen shot shows how I’d like the button cards to be sized when the alarm panel is collapsed.

You might be able to do this using panel mode and the layout card:

Thanks for the direction Tom, the Grid layout looks promising.