Build a small but functional **2D fighting game** in the spirit of Street Fighter / King of Fighters. Static web app.

SCOPE — REALISTIC:
- **2 characters with distinct movesets.** Pick personalities (e.g. brawler vs ninja, or grappler vs zoner). Each has: 4 normal moves (jab/strong punch/light kick/heavy kick), 1 special move (motion input or button combo), 1 super move (requires meter)
- Player vs CPU. CPU has at least 3 difficulty behaviors: defensive (block/counter), aggressive (rush in), random (mixed). Pick one and tune it well.
- Best of 3 rounds, 99-second timer per round, health bars + super meter for both fighters
- Stage: ONE stage with painted background. Floor stays flat. No stage transitions.
- HUD: P1 health bar (left), P2 health bar (right mirrored), timer center top, super meters under health bars, round indicator
- Win/lose screens with rematch
- Controls (keyboard): A/D move, W jump, S crouch, J/K/U/I attacks, L for super. Mobile gets on-screen D-pad + buttons.

THE COMBAT — THIS IS THE WHOLE GAME:
- Hitboxes + hurtboxes per character per animation frame
- Each attack has startup + active + recovery frames. Active frames check hitbox vs opponent hurtbox
- Hit reactions: light hit (stagger), heavy hit (knockback), launcher (juggle), block (chip damage)
- Cancel rules: normals → special, special → super (loose chain, not too strict)
- Damage values balanced so a clean special does ~15-25%, a super ~30-40%
- Whiff recovery so you can punish missed specials
- Block mechanic: hold back while opponent attacks = block (no damage on normals, chip on specials)

ART:
- Use gpt-image-2 for character full-body reference portraits + the stage background (≤$0.50 budget, ~10 images max at $0.04 each). MAGENTA chroma key like Lumen Vale. 1024² for portraits, 1024x768 for stage.
- For in-game movement: simple frame-by-frame procgen sprite animation IF you can't get gpt-image-2 to give consistent character poses across frames (it can't reliably). Build the fighters out of generated PORTRAIT + procgen limb composition for movement, or just animate the portrait with squash/stretch + slide. **Be opinionated. Don't try to fight gpt-image-2 for animation consistency.**
- OPENAI_API_KEY is in env. Use the same chroma-key + trim approach Lumen Vale used.
- HUD: hand-drawn canvas (clean and readable). Glow effects on health-low and super-ready.

TECH:
- Vite + TS. Canvas-based rendering. `base: './'`. `npm run build` → dist serves cleanly.
- expose `window.__game` debug hook (phase, p1 state, p2 state, round, time)

VERIFY:
- playwright e2e: title loads, character select (skip if only 2 chars no select), match starts, p1 can move + attack, CPU reacts, hit registers, round can be won

QUALITY BAR: a real fighting game *feels heavy*. Even one character that hits and reacts correctly is more impressive than two that flail. If you can only fully build one character, build one — but the brief asks for two distinct ones.

KNOWN HARD: MGS has tried this genre multiple times and shipped weak demos. The bar is *playable, satisfying single-round*. Don't try to ship combos, parries, throws, supers, AND multi-stage. Pick the smallest version of a real fighter and make it work.
