# Component Inventory

`App`

- Composes the game shell and global overlays.
- No routing. All app states are component/store state.

`Hud`

- Header/masthead with brand, timer/status, sound toggle, leaderboard, account, reset, and conditional continue.
- Important entry point for the leaderboard.

`ScoreBoard`

- Shows swaps and score.
- Uses Framer Motion controls for score scaling, count-up, and floaters.
- Also animates extra-swap limit changes.

`Board`

- Renders the puzzle grid and tiles.
- Owns cell refs, hit testing, selected/drag state, win tile wave, loss reveal sequence, and swap-driven sounds.

`Tile`

- Framer Motion button with layout animation.
- Handles visual state classes: absent, present, correct, selected, dragging, loss reveal.
- Delegates pointer/click logic to `useTileGesture`.

`SplashScreen`

- Initial game start surface.
- Shows difficulty toggle, Start, sign-in link or welcome-back copy.
- Uses the same tile-title visual language.

`LeaderboardDialog`

- Current leaderboard UI.
- Modal overlay with fetch/refresh, account button, close button, login callout, loading/error/empty/data states, and scrollable score rows.
- Uses `fetchLeaderboard()` with default `all` range only.

`AccountDialog`

- Auth/profile modal.
- Handles email login/signup, Google login, local dev login, display-name save, and sign out.
- Uses shared `SwappleApple` SVG for visual identity.

`VictoryOverlay`

- Win sequence and score ledger.
- Confetti, delayed reveal, tap-to-skip, score count-up, Start Over, Continue, View leaderboard.
- Builds and submits a leaderboard score payload while visible.

`LoseOverlay`

- Loss score story.
- Waits for board loss reveal, then shows Play Again and View leaderboard.
- Submits positive scores while visible.

`BonusBough`

- Branch plus bonus apples.
- Renders extra-swap and shuffle bonuses.
- Uses Framer Motion particles/sparkles/shockwave and shared apple SVG.

`BonusRescueOverlay`

- Appears when the player is out of moves but has an extra-swap bonus.
- Lets player spend the bonus or end the game.

`ThemeToggle`

- Floating dark/light toggle using lucide icons.

`SwappleApple`

- Shared inline SVG apple with unique gradient ids via `useId`.
- Used by account, bonus bough, and splash watermark contexts.

`GrowthDecoration`

- Sprout/growth decorative system exists but `growth-decoration-control` is hidden in current CSS.

`StatusAudio`

- Watches status transitions and plays win/lose sounds.

`DevHotkeys`

- Dev-only keyboard helpers. `F1` force-solves for capture/testing; `F2` force-loses.
