In a medium bowl, whisk together 2.5 cups (300g) all-purpose flour, 1/2 tsp baking powder, and 1/4 tsp salt until evenly combined with no lumps. This takes about 2 minutes. Set the bowl aside. Checkpoint: You are ready to move on when the dry mixture looks uniform with no visible streaks.
Place 1 cup (226g) softened unsalted butter (should feel cool to the touch, about 65°F — you can press a finger in but it is not shiny or greasy) and 3/4 cup (149g) granulated sugar in the bowl of a stand mixer fitted with the paddle attachment. Beat on medium-high speed for 3–5 minutes. Checkpoint: You are ready to move on when the mixture turns pale, almost white, and looks noticeably fluffy and doubled in volume.
Add 1 large room-temperature egg, 1 tsp pure vanilla extract, and 1/4 tsp almond extract (if using). Beat on medium speed for about 1 minute, stopping to scrape down the bowl sides halfway through. Checkpoint: You are ready to move on when the mixture is smooth and uniform with no visible egg streaks.
Add all of the dry flour mixture to the wet ingredients at once. Switch the mixer to low speed and mix for only 30–45 seconds — stop the moment no dry flour streaks remain. The dough will pull away from the bowl sides and feel soft but not sticky. Do not overmix. Checkpoint: You are ready to move on when the dough just comes together with no visible dry patches.
Turn the dough out onto a clean surface, divide it in half, and press each half into a flat disc about 1 inch thick. Wrap each disc tightly in plastic wrap and refrigerate for a minimum of 1 hour and up to 2 days. If your refrigerator runs warm, place the discs on the top shelf where it is coldest. Checkpoint: You are ready to move on when the dough feels firm and cold throughout and holds its shape when you press it.
Preheat your oven to 350°F (177°C) with a rack positioned in the center. Line two large baking sheets with parchment paper. Remove one dough disc from the refrigerator and let it sit at room temperature for 5 minutes so it does not crack when rolled.
Place the dough disc between two sheets of parchment paper. Use a rolling pin to roll it out evenly to about 1/8-inch thickness (roughly the thickness of two stacked quarters). Roll from the center outward, rotating the parchment occasionally to keep the thickness even. Checkpoint: You are ready to move on when the dough is even with no thick or thin spots and no cracks at the edges.
Dip your Halloween cookie cutters (ghosts, pumpkins, bats) lightly in flour and press them firmly into the dough. Transfer the cut shapes to the prepared baking sheets, spacing them about 2 inches apart. For the sharpest edges, slide the baking sheet into the refrigerator and chill the cut shapes for 15 minutes before baking. Checkpoint: You are ready to move on when the shapes have clean, defined edges and feel cold and firm.
Bake on the center rack at 350°F for 10–12 minutes. Rotate the pan halfway through (at the 5–6 minute mark) to ensure even baking. Watch carefully — the cookies are done when the edges show just a faint golden color and the centers look matte and set, not shiny or wet. Do not wait for deep browning. Checkpoint: You are ready to move on when the edges have a very light golden ring and the center looks dry, not glossy.
Remove the baking sheet from the oven and let the cookies cool on the pan for 5 minutes — they will be too fragile to move right away. Then use a flat spatula to transfer them to a wire rack. Allow cookies to cool completely for at least 30 minutes at room temperature before decorating. Checkpoint: You are ready to decorate when cookies are firm to the touch and feel no warmer than room temperature.
Make the royal icing: sift 3 cups (340g) confectioners' sugar into the bowl of a stand mixer. Add 3 tbsp meringue powder and 5 tbsp water. Beat on high speed for 7–10 minutes until the icing forms stiff, glossy peaks and holds its shape when you lift the beater. If too thick, add water 1/2 tsp at a time. Checkpoint: You are ready to move on when the icing is bright white, glossy, and holds stiff peaks that do not droop.
Divide the icing into bowls and tint each portion with a few drops of orange or black gel food coloring, stirring well. For flooding (filling in larger areas), thin the icing slightly with water — add 1/2 tsp at a time — until it drips off a spoon in a slow, steady ribbon. Use a piping bag or zip-lock bag with a tiny corner snipped off to pipe an outline around each cookie first. Let the outline set for 5 minutes, then fill in (flood) the center with the thinned icing using a spoon or squeeze bottle. Add sprinkles immediately after flooding. Allow decorated cookies to dry uncovered at room temperature for 8–12 hours before stacking. Checkpoint: Icing is fully dry when it feels completely hard and smooth and does not smear when touched.