Beat the butter and sugar together for 3 minutes until pale and fluffy, then beat in the eggs one at a time and the vanilla.
Sift in the flour, baking powder and salt and mix on low until the dough comes together and pulls cleanly away from the side of the bowl.
Divide the dough in two, flatten each into a disc, wrap and chill for 45 minutes, or until firm enough to roll without sticking to the pin.
Heat the oven to 180C (350F) and line two baking sheets with parchment.
Roll one disc out on a lightly floured surface to 5 mm thick and cut out shapes, onesies, bows or bowties work well for this theme, re-rolling scraps once.
Repeat with the second disc, then transfer all the cut shapes to the lined sheets, leaving 3 cm between each.
Bake for 9 to 11 minutes, until the edges are just turning gold but the centres still look pale and slightly soft; they firm up fully as they cool.
Cool on the tray for 5 minutes, then move to a rack and cool completely, about 30 minutes, before icing.
Split the royal icing into two bowls and tint one pink and one blue, then thin each with a few drops of water until it runs off a spoon in a slow ribbon.
Outline each cookie with the matching colour using a piping bag, let it firm for 2 minutes, then flood the centre and tilt gently to fill right to the outline.
Scatter sanding sugar over the wet icing on each colour and leave the cookies flat for at least 2 hours, or overnight, until the icing sets hard enough to stack.