# Staged Trails · version 1.11

The existing storybook artwork now has a staged approach-and-response rhythm. This update uses the owner’s classic side-scrolling references for broad pacing ideas: threats appear ahead, readable patrols establish a danger zone, companions react, and the trail continues after the obstacle is resolved. No graphics from those games were used. All 316 pre-existing files in `assets/` are byte-for-byte unchanged.

## Encounter progression

1. The party arrives at a stretch of trail. Fixed hazards are visible in the world as the camera approaches.
2. A villain enters from ahead and settles into a bounded patrol. Abby crouches at the edge; Mei watches the arrival. Flying enemies have a separate flight pattern.
3. The player arranges the spell. Patrols do not collide with the player, steal on a timer or create a deadline. The written warning, spoken warning, Calm motion and Quiet trail remain available.
4. An incorrect arrangement triggers a short wind-up, a bounded advance and a hold. Mei braces with her existing casting pose; Abby hops back. Recovery remains an explicit player action.
5. The actual companion performs the recovery. Abby moves toward a safe bank and returns; Luma flies toward the stones and back; Mei steps into her defensive spell. The old duplicate rescue-cat overlay is hidden. The placed rune images follow the recovery rather than disappearing permanently.
6. A resolved scene sends the villain off to the right. On **Follow Abby**, remaining companions vault a cleared hazard as part of the continuous camera journey, then keep walking toward the next encounter. Characters already beyond that hazard do not jump backward. Chapter changes, the optional duet, skipped travel and calm motion use the existing immediate/safe transition.

## Direction by villain

| Villain | Approach and patrol | Party response |
| --- | --- | --- |
| Goblin | Quick entrance, short back-and-forth walk, turns at the ends of its lane. | Abby crouches; a setback produces a feint and short advance. Abby fetches stolen stones. |
| Crocodile | Low entrance and slow bank patrol, using its existing jaw-cycle frames. | The party holds clear of the bank. Abby retrieves the pouch from the safe side. |
| Monster | Slow, heavy arrival and shorter pacing steps. | Mei braces and frees stones from the tar; Abby stays ready beside her. |
| Witch | Broom entrance, sweeping horizontal movement and a shallow vertical arc. | Mei braces; Luma flies toward the spell and returns. |
| Giant bat | Faster entry and a wider, repeated swooping route. | Abby stays low; Luma follows the rune lights through the mist. |

Later-trail entrances are slightly quicker. Movement is clamped to the available space; phone patrols are deliberately smaller to keep the sprites and controls readable. Extra artwork, platform buttons, health bars, lives and timed spell failure were not added.

## Hazards and traversal

Quicksand, swamp and tar remain anchored in native trail coordinates rather than following changes in party position. A cleared patch is temporarily retained behind the departing camera. Mei and Abby jump over that patch at different times because Abby walks ahead. The vertical arc is bounded to keep the complete sprite inside the scene, including when crossing a raised bridge.

This is automatic travel after a successful language choice, not a manual jumping challenge. The language engine, rune inventory, story prerequisites, completed-place rules and save schema remain unchanged. Existing completed scenes remain peaceful; use **Begin a new journey** to see their encounters again.

## Motion and interface safeguards

- Calm motion selects still graphics, suppresses trajectories and completes a requested rescue immediately.
- Menus and hidden tabs pause the new enemy movement. Menus retain the current party pose rather than restarting the reaction behind the overlay.
- Quiet trail removes the encounter and safely restores any held runes.
- A rescue lasts about 2.8 seconds and can be skipped with **Return the stones now**.
- On phones, the recovery card temporarily takes the place of the duplicate mission/location copy. The party’s reaction remains visible below it; the normal mission view returns after recovery.
- Approach/retreat movement is a presentation effect. Only an incorrect arrangement can start the existing setback; proximity alone cannot change story or inventory state.

## Verification

- The new staging suite checks approach profiles, bounded patrols, tell-before-lunge order, companion return paths, slow-render timing, continuous traversal, jump headroom, already-passed hazards and reduced motion.
- The full existing suite also passes, including both trails’ complete engine-level solution routes, recovery, alternate valid spells, atomicity, vocabulary, original poses, panorama geometry and syntax.
- Browser checks in Cloud Chrome observed all five villain patterns on desktop and at a 390 × 844 phone viewport. Their patrol silhouettes stayed clear of the warning and spell controls.
- Browser recovery checks covered the actual Abby actor, Luma’s flight/cast pose, Mei’s defensive pose, restored casting, and immediate calm-mode recovery. The duplicate rescue-cat image stayed hidden.
- A cleared tar-pit departure produced the expected live jump marker during camera travel. Mathematical trajectory checks cover the full arcs and both companions; not every midpoint was captured in a browser screenshot.
- The new encounter controller uses elapsed time, so a slow render frame cannot stretch the entry into a long wait. The clock pauses while the presentation is hidden or a menu is open.
- SHA-256 comparison confirmed that all 316 pre-existing asset files are unchanged.

This is functional and expert QA. Physical Safari/VoiceOver, touch hardware, sustained frame-rate/battery testing and learner playtests remain unverified. The inherited compact-height phone layout still scrolls. Browser scene coverage used developer fixtures built from valid engine states; both complete story routes were verified at engine level rather than replaying every start-to-finish UI transition in this pass.

For research use, record version 1.11 as a changed presentation condition. Added motion and staging do not themselves demonstrate learning gains.

## Implementation map

- `encounter-staging-model.js`: pure timing, movement, response and traversal directions.
- `encounters.js`: bounded enemy director, explicit recovery, rune-following and temporary departure hazard.
- `character-poses-model.js` / `character-poses.js`: reuse the existing poses for guards, reactions, rescues and jump/landing frames.
- `panorama-view.js`: apply traversal arcs inside the existing continuous journey.
- `encounters.css`: preserve sprite layering, hide the duplicate rescue overlay and keep phone recovery copy clear of the action.

Run `npm test --prefix dist`. The developer scene fixture generator remains `tools/qa-sprite-fixtures.cjs`; its generated `qa-game.html`, `qa-pilot.js` and `qa-responsive.html` are excluded from publication.

## Hotfix · 1.11.1 — restart and carried-item separation

Restart now uses an in-game prompt instead of `window.confirm`. Both Options and Begin a new journey call the same restart routine, cancel old presentation/encounter timers, clear the current story and placed spell, close overlays and open the first playable scene. Collected vocabulary, comfort settings and observation records remain on the device. Cancel/Escape returns to the previous dialog.

The flower always occupies the backpack slot, including the moon-light route where Mei has not picked up a lantern. The lantern has a separate, explicit asset and hand slot. The title illustration displays the approved lantern independently of the resumed inventory. No artwork was redrawn.

Verification: 65 focused state/item checks, the full regression suite, and browser checks from title Options, an active encounter and the completed ending. The restarted scene persisted after reload and accepted new spells. The moon-light → crossing → flower-only route and both-items state were exercised. Browser QA used isolated scene fixtures in Chrome; physical Safari was not available.
