# Global Client Rules and Shared Contracts ## Global Persistent UI (All Scenes) - `Settings` button is present in every scene. - `Report Bug` button is present in every scene. - Placement and interaction pattern must remain consistent across scenes. ## Global Scene Transition Rules - Ordered startup/auth flow: `ClientLaunch` -> `Login` -> `MainMenu`. - `Register` is reachable from `Login` and returns to `Login` unless server returns immediate auth tokens. - Gameplay scenes are reachable from lobby scenes (`RankedPlay`, `CustomPlay`) only after server-authoritative match start. ## Shared Transport Notes - Persistent real-time session to relay/hub for presence + notifications. - HTTPS API calls for auth/account/content operations. - Auth model: short-lived access token + refresh token. - Device/session id tracked by server. - Every payload includes `requestId` and `serverTimeUtc`. - List endpoints support paging (`page`, `pageSize`) and sorting. ## Global Input Consistency Rules - Multi-touch support is required for touch-capable devices. - Core camera gestures and selection semantics are shared across all scenes. - Scene-specific controls may add actions, but must not override baseline navigation behavior. - Input remapping and accessibility options should apply globally, not per-scene. ## Global Social/Chat Rules - Baseline channels: `System`, `General`, `Friends`. - Friend moderation actions where identity is visible: `Add Friend`, `Remove Friend`, `Block`. - Lobby-specific channel sections are context-sensitive and shown only inside the active lobby scene. ## Security and Validation Baseline - Server authoritative for identity/session, ownership, deck legality, and entitlements. - Client authoritative for rendering and non-authoritative UI state (filters/sorts). - Every mutating request requires: - valid access token - account ownership check - anti-replay safeguards (`requestId`, timestamp window)