Cream butter and sugar until pale and fluffy, about 3 minutes, then beat in egg and vanilla until fully combined.
Sift flour, baking powder and salt together, then mix into the butter mixture just until the dough pulls away clean from the side of the bowl.
Divide the dough in two, flatten into discs, wrap and chill at least 1 hour; this is the step people skip, and warm dough spreads into puddles instead of holding its shape.
Roll chilled dough to 1 cm thickness and cut into simple shapes that read clearly once iced, hearts and rings work better than fine detail.
Space cookies 3 cm apart on a lined baking sheet and bake at 175°C (350°F) on the middle rack for 10-12 minutes, until edges turn pale gold while centres still look slightly underbaked.
Cool on the sheet 5 minutes, then move to a wire rack and cool completely, at least 30 minutes, before any icing touches them.
Divide royal icing among bowls and tint each a different colour, keeping one bowl thick for outlining and thinning the rest with a few drops of water for flooding.
Fill small piping bags with icing, snip a tiny opening, and pack two cooled cookies plus a few bags per colour into each box.
Seal boxes only once cookies are fully cooled and icing bags are tied off, so nothing cracks or leaks in transit.