Paper mascot pattern

The prompt

Write a Node.js script (no dependencies) that generates a seamless, tileable 3200x3200 SVG pattern in a hand-drawn paper-doodle style.

Look
- Cream paper background #fbfaf7 with ~900 tiny warm-gray speckles (#d9d2c3, 55% opacity, radius 1.2-3.2 px) for a paper feel.
- Ink outlines in near-black green #1f2a24, 9 px stroke, round caps and joins.
- Colors: emerald #059669, mint #10b981, sky #0ea5e9, amber #f59e0b. No other colors.
- Every line must look hand-drawn: subdivide each straight segment every ~26 px, nudge the points sideways with seeded noise (about ±3 px plus a gentle sine wave) and draw a smooth Catmull-Rom curve through them.

Motifs (each about 190x240 px, a dog-eared file shape with a folded top-right corner)
- The file body is filled with a light tint of its color (84% toward the paper). Behind it, the same shape in the full color is offset by (13, 14) px like a misregistered risograph print.
- Variants: text document (four ruled lines), image file (mint hills and an amber sun), code file (< / > with the slash in sky blue), video file (mint play triangle), zip file (zipper teeth and an amber pull tab), GIF file (an amber tag with hand-lettered "GIF" drawn as strokes, not a font), a folder (emerald shadow, amber or mint fill), and file mascots: plain files with a tiny face (two dot eyes, a smile, open mouth or wink, and soft amber cheeks at 55% opacity).
- Fillers between them: four-point sparkles, small solid dots, open rings, wavy squiggles and little plus signs, in the accent colors.

Layout
- Place the main motifs on a 6x6 grid (533 px cells), offset every other row by half a cell, jitter positions by ±38 px, rotate each by ±18° and scale 0.9-1.1. Put two fillers in the gaps of each cell, rotated ±30°.
- Make it seamless: wrap every position into the tile and also draw each item shifted by ±3200 px horizontally and/or vertically whenever it crosses an edge.
- Use a seeded PRNG (mulberry32) for everything so the output is identical on every run.

Output files/pattern.svg, then render it to a 3200x3200 PNG with a headless browser and also export a 1600 px version.

Tip: If you prefer an image model, describe the same thing: 'seamless tileable pattern, hand-drawn doodle file icons with cute faces, risograph offset color, emerald, sky blue and amber on cream paper, thick wobbly ink outlines, flat, no shading' — then check the tile edges in an editor. The exact generator used here is in the download (source/generate-pattern.mjs); change the seed for a new arrangement. The SVG scales to any size.