# Pantry Pendulum — UX Architecture

## Screen Inventory

**[UX-SCREEN-ONBOARD] Onboarding.** Three swipe-free cards demonstrate Pull the Handle, Touch the Pictured Station, and Cooking Changes the Swing. Skip is always available; Continue is primary; page dots expose position; the third card launches Level 1.

**[UX-SCREEN-HOME] Cookbook home.** A compact countertop cookbook shows five recipe trays, the next playable card, copper-spoon progress, Settings, and Legal. Continue enters the next recipe; a tray card opens its level strip without a separate full-screen navigation layer.

**[UX-SCREEN-GAMEPLAY] Gameplay.** The top order rail shows level, recipe sequence, tug count, three scorch mitts, and Pause. The uninterrupted center shows the complete mobile and stations. The lower safe zone shows the tug handle, prediction arc, and contextual one-line hint.

**[UX-SCREEN-PAUSE] Pause sheet.** A clipped cloth ticket overlays a dim but still readable frozen board. Resume is primary; Retry, Settings, and Recipe Map are secondary. It never replaces the board with a blank page.

**[UX-SCREEN-SUCCESS] Success.** Prepared ingredients settle on a plate; recipe stamp, earned copper spoons, tug result, Replay, Recipe Map, and Next appear without covering the plated transformation.

**[UX-SCREEN-FAILURE] Failure.** The frozen board remains visible behind a short soot-edged ticket that identifies the decisive contact or missing recipe step. Retry is primary and Recipe Map secondary.

**[UX-SCREEN-SETTINGS] Settings.** Separate Music and SFX sliders, haptic switch, accessibility entry, restore-purchases placeholder, privacy, and back. Unsupported commerce remains hidden until enabled.

**[UX-SCREEN-ACCESS] Accessibility.** Text scale, high contrast, reduced motion, captions, haptic toggle, and symbol legend are grouped with immediate previews and a Restore Defaults action.

**[UX-SCREEN-LEGAL] Legal and support.** Privacy, terms, credits, support contact, version/build identity, and restore-purchases information use a scrollable ticket with a persistent Back action and an explicit local-content error treatment.

## State Inventory

**[UX-STATE-FRESH] Fresh.** Board is settled; handle, next step, tug budget, stations, and first-use hint are ready before input.

**[UX-STATE-ACTIVE] Active.** Dragging displays the cloth pull ring, bounded handle displacement, short dotted prediction arc, projected first-contact ring, and locked nonessential actions. Resolution hides the finger guide, locks new tugs, and preserves Pause.

**[UX-STATE-PAUSED] Paused.** Simulation, timers, effects, and haptics stop at the fixed-step boundary; the frozen mobile remains visible and Resume owns focus.

**[UX-STATE-SUCCESS] Success.** Controls lock, mobile damps, ingredients plate, then the result ticket enters. Reduced motion skips travel and uses state swaps plus the finished plate.

**[UX-STATE-FAILURE] Failure.** The first decisive wrong contact or incomplete final step is ringed, the third mitt burns or final tug empties, and Retry receives initial focus.

**[UX-STATE-ERROR] Error.** An offline-safe local content error keeps the cookbook shell, names the unavailable recipe, offers Retry Load and Back to Cookbook, and never implies network dependence.

## Transitions and Back Behavior

**[UX-TRANSITION-1]** First launch enters Onboarding; Skip or final Continue enters Gameplay Level 1. Later normal launches enter Cookbook Home. Prototype reloads, if later authorized, always start Onboarding and persist no gameplay or FTUE state.

**[UX-TRANSITION-2]** Home Continue or tray-level selection enters Gameplay through a 250 ms cloth-wipe transition. Gameplay Pause opens the Pause sheet. Android Back from Gameplay opens Pause; Back from Pause resumes; Back from Settings, Accessibility, or Legal returns to its exact parent and focus origin.

**[UX-TRANSITION-3]** Success Next enters the next level, Replay restarts the same level, and Recipe Map returns Home with the completed card focused. Failure Retry restarts instantly; Recipe Map returns Home with the failed card focused. Destructive reset, if later added, requires a separate confirmation not specified in this run.

**[UX-TRANSITION-4]** Interruption pauses at the next fixed-step boundary. Resume returns to the Pause sheet with “Kitchen paused while away” once; it never resumes moving physics beneath a system overlay.

## Overlays, Loading, and Errors

**[UX-OVERLAY-1]** Pause, hints, success, and failure are the only gameplay overlays. They preserve enough of the board to explain state. No spinner exists for local gameplay. A small stitched progress bar belongs only to an explicitly initiated restore-purchases call if commerce is enabled later.

**[UX-ERROR-1]** A drag under 12 pixels springs the handle back, consumes no tug, and displays “Pull a little farther” beside the ring. An unavailable station shows its physical flip tab and “Resting this turn”; wrong contact uses soot, mitt loss, and a dry clack. Content-load errors remain local and recoverable.

## Orientation and Safe Areas

**[UX-SAFE-1]** Portrait only. At 360×800 and 393×852 logical canvases, top controls sit below the dynamic-island/notch inset, bottom controls sit above home indicators and browser gesture bars, and no gameplay body enters the reserved outer 16-pixel gutter. Larger phones add breathing room around the central set, not blank hero space above it.

**[UX-SAFE-2]** The mobile scales uniformly until every body, cord, and station fits the central 58%; UI type never drops below 15 logical pixels and touch targets never below 44×44. Device rotation displays a lightweight “Turn upright” card without rebuilding or advancing simulation.

## Touch and Reachability

**[UX-TOUCH-1]** The lower handle may be acquired anywhere inside a 64×64 hit region and dragged within the 92-pixel cloth ring. Left and right thumbs are equivalent. Moving outside the ring clamps force; returning under 12 pixels cancels. Release commits only when the game is ready. Scroll views never share a surface with the tug gesture.

**[UX-TOUCH-2]** All enamel actions and switches are at least 44×44, with 8 pixels between neighbors. Pause remains top-right but has a 52×52 hit region. Critical retry and continue actions remain within the lower thumb band; utility and legal actions may sit higher.

## Control Families and Interaction States

**[UX-CONTROL-ACTION] Enamel Action (`enamel-action`).** A reusable native button family with `tomato-primary`, `oat-secondary`, and `line-utility` visual variants. Normal has a 3-pixel aubergine edge and 4-pixel lower enamel lip; Highlighted adds a butter focus halo and lifts one pixel; Pressed removes the lip, moves down 3 pixels, and darkens the face; Disabled becomes warm gray with a dashed inner seam, retains readable text, and is noninteractive. Variants are roles, never states.

**[UX-CONTROL-SWITCH] Cloth Switch (`cloth-switch`).** A native semantic toggle with `standard` and `safety` variants. Off shows an oat track, left aubergine stitched knob, and explicit Off word; On shows herb track, right flour knob, check stitch, and On word; Focused adds the butter halo without changing value; Disabled reduces contrast, adds diagonal stitch texture, and is noninteractive. The selected value is state, not a button variant.

**[UX-CONTROL-HANDLE] Tug Handle (`tug-handle`).** A gesture control with `ready-handle` and `final-tug` variants. Ready rests at center with a woven ring; Acquired thickens the cord and shows the 92-pixel bound; Aiming stretches the cord, shows the short dotted arc and first-contact ring; Resolving locks new input and animates a traveling stitch; Disabled removes the arc and uses a tied-knot icon. Final-tug adds a paprika edge but does not change physics.

## Input Methods and Feedback Ownership

**[UX-INPUT-1]** Touch is primary: direct contact targets controls and drag/release operates the handle. Mouse is prototype parity: hover maps to Highlighted, primary press to Pressed/Acquired, and release-inside activates. Keyboard supports Tab/Shift+Tab, arrows within grouped controls, Enter/Space activation, Escape/Android Back parity, and a persistent butter focus ring. Controller is not supported in production because the product is one-thumb mobile; no hidden controller affordance is promised.

**[UX-FEEDBACK-1]** Visual state belongs to the component family; motion belongs to the component or physical gameplay actor that changes; audio belongs to the confirmed action or resolved contact; haptic belongs only to committed gameplay outcomes. Navigation never triggers haptics. Muted, disabled, backgrounded, and reduced-motion conditions suppress their channel without removing the static visual cue.

## Accessibility Matrix

**[UX-ACCESS-1]** Every ingredient and station uses silhouette plus a unique stamped symbol and recipe ordinal, never color alone. **[UX-ACCESS-2]** Text supports 100%, 115%, and 130% without clipping or shrinking targets. **[UX-ACCESS-3]** High contrast replaces material subtleties with solid faces and 3-pixel outlines. **[UX-ACCESS-4]** Reduced motion replaces swing previews, ticket wipes, squash, and ingredient travel with static arcs, rings, and two-frame swaps. **[UX-ACCESS-5]** Captions name meaningful station sounds and scorch cues. **[UX-ACCESS-6]** Focus order follows title, current content, primary action, secondary actions, then utility. **[UX-ACCESS-7]** Errors name the affected recipe and recovery action in text. **[UX-ACCESS-8]** All touch targets meet 44×44 and thumb-side equivalence.
