Implement Peft daily leaderboard victory reporting in this game. First check whether this feature is already implemented. Verify existing behavior against the requirements and acceptance cases below, using tests and available runtime checks. If it already satisfies them, leave working code unchanged and report the verification evidence. If it is partial or broken, implement only missing behavior or fixes; do not duplicate integrations, callbacks, or state. Report anything you could not verify instead of assuming success. Prerequisites: Peft room links and active-table reporting must already work. Preserve gameplay, networking, screen-name seat recovery, and other integrations. Do not replace the networking protocol or weaken the Peft sandbox. Report missing prerequisites explicitly. After the authoritative host confirms a match has finished, report its actual final standings: if (window.PEFT && typeof window.PEFT.reportVictory === "function") { const result = await window.PEFT.reportVictory(stableMatchId, [ {name: firstPlaceScreenName, place: 1}, {name: secondPlaceScreenName, place: 2}, {name: thirdPlaceScreenName, place: 3} ]); } - Await a successful hostRoom(actualRoomCode) before reporting. Only that advertised host page may report; participants, spectators, previews, and mere button clicks must not submit victories. - Report BEFORE closing or joining another room. Missing/expired hosting must be explicitly restored through the existing confirmed networking lifecycle, never faked just to post results. - standings contains one to three actual finishers, one per place, with distinct names. Omit nonexistent second/third places rather than sending empty names. Places are integers 1, 2, or 3. - Use actual game screen names, 1-64 characters, with no control characters. Peft normalizes Unicode, trims whitespace, and merges names case-insensitively. Names are trust-based, not Google identities; anyone using the same name contributes to the same tally. Do not send email addresses, account credentials, or private tokens as names. - stableMatchId contains 1-64 ASCII letters, digits, underscores, or hyphens. Generate or retrieve it ONCE per actual match in the authoritative networking state, not on each report, callback, reconnect, or retry. - Match IDs must be unique across the lifetime of this game room, not just this host page or local round counter. Use a network-retained UUID or equivalent. All players and a migrated host should retain the same match identity and final standings. - Duplicate protection is scoped to game + room + match ID, across versions and days. A repeated matching report by the same Peft reporter succeeds with {saved: true, duplicate: true} without adding medals. A conflicting report returns an error. Do not work around a conflict by inventing a new ID. - A new accepted report resolves to {saved: true, duplicate: false}. Catch errors visibly; distinguish gameplay victory from successful Peft reporting. On timeout or network error, retry the SAME ID and SAME standings, not a new match. Do not spam retries. - Report at the final authoritative result once, not at each player's disconnect or on loading a saved end screen. Preserve the ID/results if the existing protocol supports host recovery; document limitations if it does not. - Peft orders names by medal score: gold is 3 points, silver 2, and bronze 1. Equal scores are displayed alphabetically. This is a tally of reported placements, not verified identity or a competitive anti-cheat system. - The daily display window rolls over at noon America/Los_Angeles, including daylight saving. Awards use SERVER acceptance time, not client clocks. Historical reports remain for duplicate protection. A late first report counts in the current window; retrying an old report does not create medals in a new day. - Administrators can clear medals for testing. Retrying a cleared match still must not add them back. - Standalone games and networkless screenshots must remain usable when PEFT or reportVictory is absent. Do not pretend that an absent bridge successfully submitted medals. Do not make game completion depend on Peft availability. - Call the bridge only; do not call the Peft HTTP endpoint directly or access parent DOM, hub cookies, CSRF tokens, or private capabilities. - In a genuine tied result, do not arbitrarily fabricate one winner per medal. Ask for a game-specific tiebreak policy or explicitly document that the current Peft API cannot record same-place ties. Add focused tests and exercise: host completes a real match and reports actual placements; homepage tallies change; retry adds no medals; conflicting duplicate fails; participants cannot report; reports after host closure fail; optional places can be omitted; names/places/IDs validate; errors are visible; standalone play remains functional. Test the existing game over multiple matches so IDs never repeat. Do not claim live Peft acceptance without exercising it. Report changed files, authoritative completion hook, match ID lifetime, retry behavior, test commands/results, external requirements, and actual host-migration or tie limitations.