Whisk the dry ingredients: in a medium bowl, whisk the flour, baking powder and salt together until evenly combined. This dough has no baking soda on purpose — soda is what makes cut-outs spread and puff, and these are built to hold a sharp edge.
Cream the butter and sugar: in a large bowl, beat the butter and granulated sugar with an electric mixer on medium speed for 2 minutes, until pale, fluffy and noticeably lighter in color. Beat in the egg, vanilla and almond extract (if using) for about 30 seconds, until smooth, scraping the bowl down once.
Make the dough: add the flour mixture and mix on low speed just until no dry streaks remain and the dough pulls together — about 1 minute. Do not keep mixing once it comes together; overworked dough bakes up tough. The dough should be soft and smooth, like play dough, not sticky.
Chill the dough for 1 hour: divide it in half, shape each half into a flat disk about 1 inch thick, wrap well, and refrigerate for 1 hour. Flat disks chill faster and more evenly than a ball, and they roll out without a wrestling match. Cold dough is the second half of the no-spread secret — warm dough melts before it sets in the oven.
Heat the oven to 350°F (175°C) and line two large baking sheets with parchment paper. Work with one disk at a time and keep the other in the fridge.
Roll and cut: on a lightly floured surface, roll the dough to an even 1/4 inch thick — thinner cookies bake crisp and brown at the edges, thicker ones stay soft but need another minute. Cut out shapes with 3-inch cutters, dipping the cutter in flour between cuts, and place the cookies 1 1/2 inches apart on the prepared sheets. Gather the scraps, press them together gently, re-roll once, and cut again.
Bake at 350°F (175°C) for 9 to 11 minutes. The cookies are done when the edges look set and matte and the centers look just slightly pale and soft — there should be almost no browning. If the bottoms are golden, they are perfect; if the edges are golden too, they will be crisp rather than soft once cool. That pale finish is what you want under bright icing.
Cool completely: let the cookies rest on the hot sheet for 5 minutes — they are fragile straight out of the oven — then move them to a wire rack to cool for at least 15 more minutes, 20 minutes in total, until completely cool. Icing a warm cookie melts the icing off the edges, so do not rush this.
Make the royal icing: whisk the sifted powdered sugar, meringue powder, vanilla and salt together in a large bowl. Add 9 tablespoons of water and beat on low for 2 to 3 minutes, until smooth, glossy and ribbon-like. You are aiming for 15-second icing: drag a knife through it and the line should melt back smooth in about 15 seconds. Too thick, add water 1 teaspoon at a time; too thin, whisk in powdered sugar 1 tablespoon at a time. This one consistency outlines and floods, which keeps decorating simple.
Color and decorate: divide the icing between small bowls, tint with gel coloring (gel, not liquid — liquid thins the icing), and cover each bowl with a damp towel while you work so it does not crust. Spoon into piping bags or squeeze bottles. Outline each cookie, then flood the center and nudge the icing to the edges with a toothpick or scribe. Add sprinkles or a second color while the base is still wet if you like. Work one cookie at a time — the surface starts to set within minutes.
Let the icing set for at least 30 minutes at room temperature (the decorating and setting together account for about 50 minutes of the total time) until the surface is dry and glossy to a light touch. For stacking and packing, let them dry a full 6 hours or overnight — see the storage notes below. Serve on a big plate and watch the plainest shapes go first; they always do.