Spa City Ink
Edward
Marvin
Timmy
Kevin
Joshua
Kris
Services
Credits
Edward
Marvin
Timmy
Kevin
Joshua
Kris
Services
%3Cb%20class%3D%22title%22%3ECredits%3C%2Fb%3E%3Cbr%2F%3ESpecial%20thanks%20to%20these%20talented%20creators%20for%20the%20Creative%20Commons%20media%20used%20in%20this%20tour.%20Assets%20are%20used%20with%20permission%20via%20CC%20Attribution%3A%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22chicken%20gun%20rooster%20rudy%20cel-shaded%22%20%28https%3A%2F%2Fskfb.ly%2FoQ7JO%29%20by%20amogusstrikesback2%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22Medium%20%7C%20Rooster-Balloon%22%20%28https%3A%2F%2Fskfb.ly%2F6wQYp%29%20by%20smeerws%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22Realistic%20Rooster%22%20%28https%3A%2F%2Fskfb.ly%2FoSwIA%29%20by%20Jungle%20Jim%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22Rooster%22%20%28https%3A%2F%2Fskfb.ly%2F69R8Q%29%20by%20VitSh%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22rooster%20twemoji%20prototype%20%2B%20animation%22%20%28https%3A%2F%2Fskfb.ly%2FoKYZB%29%20by%20Spoopedman%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22Rooster%20Rudy%22%20%28https%3A%2F%2Fskfb.ly%2FoPB9q%29%20by%20Huh%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22Rooster%20from%20Poly%20by%20Google%22%20%28https%3A%2F%2Fskfb.ly%2F6XR9J%29%20by%20IronEqual%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0ARooster%20Crow%202%20by%20BenjaminNelan%20--%20https%3A%2F%2Ffreesound.org%2Fs%2F435507%2F%20--%20License%3A%20Creative%20Commons%200%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0ALightMachineGun3.wav%20by%20SuperPhat%20--%20https%3A%2F%2Ffreesound.org%2Fs%2F417686%2F%20--%20License%3A%20Creative%20Commons%200%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0AES_Slot%20Machine%2041%20-%20SFX%20Producer.mp3%20by%20simbakademzeb1%20--%20https%3A%2F%2Ffreesound.org%2Fs%2F681107%2F%20--%20License%3A%20Creative%20Commons%200%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0APigs%20oinking%20by%20zachrau%20--%20https%3A%2F%2Ffreesound.org%2Fs%2F449577%2F%20--%20License%3A%20Creative%20Commons%200%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%22Full%20Skeleton%22%20%28https%3A%2F%2Fskfb.ly%2FooLXy%29%20by%20Oregon%20State%20University%20%7C%20Ecampus%20is%20licensed%20under%20Creative%20Commons%20Attribution%20%28http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby%2F4.0%2F%29.%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%C2%A0
%0D%0A%3Cdiv%20%20class%3D%22audio-player-wrap%22%3E%0D%0A%3Cdiv%20class%3D%22wrap%22%3E%0D%0A%20%20%20%20%3Caudio%20controls%20class%3D%22audio%22%20preload%3D%22none%22%20%3E%0D%0A%20%20%20%20%20%20%20%20%3Csource%20src%3D%22https%3A%2F%2Ffile.mpskin.com%2Fimg%2Fcrm%2Fc831e9b5f6c9bab6b23c26c2dab2a29c%2F20251224-004106-machinegun.mp3%22%20%3E%0D%0A%20%20%20%20%3C%2Faudio%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A
%3Cstyle%20type%3D%22text%2Fcss%22%3E.popup-panel%20%7B%20display%3A%20none%3B%20%7D%0D%0A%20%20.popup-active%20%7B%20display%3A%20block%20%21important%3B%20%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3Cdiv%20id%3D%22popup-item1%22%20style%3D%22text-align%3A%20center%3B%20font-family%3A%20Arial%2C%20sans-serif%3B%20padding%3A%2010px%3B%22%3E%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-prompt%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20found%20a%20Secret%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E.%3Cbr%20%2F%3E%0D%0AStart%20the%20Scavenger%20Hunt%20to%20collect%2020%20points%21%3C%2Fp%3E%0D%0A%0D%0A%3Cdiv%20style%3D%22margin-top%3A%2015px%3B%22%3E%3Cbutton%20class%3D%22btn-start%22%20style%3D%22background%3A%20%23d63031%3B%20color%3A%20white%3B%20border%3A%20none%3B%20padding%3A%2010px%2020px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%22%3ESTART%20GAME%3C%2Fbutton%3E%3Cbutton%20class%3D%22btn-cancel%22%20style%3D%22background%3A%20transparent%3B%20border%3A%201px%20solid%20%23999%3B%20color%3A%20%23555%3B%20padding%3A%2010px%2015px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%20margin-left%3A%205px%3B%22%3ECancel%3C%2Fbutton%3E%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-success%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20Found%20It%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E%21%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%3Cb%20style%3D%22color%3A%23d63031%3B%20font-size%3A16px%3B%22%3E%2B20%20Points%3C%2Fb%3E%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-already%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23888888%3B%22%3EAlready%20Collected%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20have%20already%20found%20the%20%3Cspan%20class%3D%22name-insert%22%3E...%3C%2Fspan%3E.%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3Cscript%3E%0D%0A%28function%28%29%20%7B%0D%0A%20%20%20%20%2F%2F%20---%20CONFIGURATION%20---%0D%0A%20%20%20%20var%20currentItemId%20%3D%20%27item1%27%3B%20%0D%0A%20%20%20%20var%20friendlyName%20%3D%20%27Fractal%20Rooster%27%3B%0D%0A%20%20%20%20%2F%2F%20---------------------%0D%0A%0D%0A%20%20%20%20%2F%2F%20SETUP%3A%20Find%20specific%20wrapper%20based%20on%20ID%0D%0A%20%20%20%20var%20rootId%20%3D%20%27popup-%27%20%2B%20currentItemId%3B%0D%0A%20%20%20%20var%20root%20%3D%20document.getElementById%28rootId%29%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%2F%2F%20Safety%20check%0D%0A%20%20%20%20if%20%28%21root%29%20%7B%0D%0A%20%20%20%20%20%20%20%20console.error%28%22Popup%20Error%3A%20HTML%20ID%20%27%22%20%2B%20rootId%20%2B%20%22%27%20not%20found.%20Update%20the%20top%20line%20of%20HTML.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%20AUTO-FILL%20NAME%0D%0A%20%20%20%20var%20inserts%20%3D%20root.querySelectorAll%28%27.name-insert%27%29%3B%0D%0A%20%20%20%20for%28var%20i%3D0%3B%20i%3Cinserts.length%3B%20i%2B%2B%29%20inserts%5Bi%5D.innerText%20%3D%20friendlyName%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%201.%20HELPERS%0D%0A%20%20%20%20function%20getMainWin%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.top%20%26%26%20window.top.gameState%29%20return%20window.top%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.parent%20%26%26%20window.parent.gameState%29%20return%20window.parent%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.gameState%29%20return%20window%3B%0D%0A%20%20%20%20%20%20%20%20return%20null%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20showPanel%28className%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20Scoped%20to%20this%20root%20only%0D%0A%20%20%20%20%20%20%20%20var%20active%20%3D%20root.querySelector%28%27.popup-active%27%29%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28active%20%26%26%20active.classList.contains%28className%29%29%20return%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-prompt%27%29.className%20%3D%20%27popup-panel%20p-prompt%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-success%27%29.className%20%3D%20%27popup-panel%20p-success%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-already%27%29.className%20%3D%20%27popup-panel%20p-already%27%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20var%20target%20%3D%20root.querySelector%28%27.%27%20%2B%20className%29%3B%0D%0A%20%20%20%20%20%20%20%20if%28target%29%20target.className%20%3D%20%27popup-panel%20%27%20%2B%20className%20%2B%20%27%20popup-active%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20closePopup%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20win%20%3D%20window.top%20%7C%7C%20window.parent%20%7C%7C%20window%3B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.jQuery%20%26%26%20win.jQuery.fancybox%29%20%7B%20win.jQuery.fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.Fancybox%29%20%7B%20win.Fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20closeBtns%20%3D%20win.document.querySelectorAll%28%27.fancybox-close-small%2C%20.fancybox-button--close%2C%20.mpskin-popup-close%2C%20.close%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3CcloseBtns.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28closeBtns%5Bi%5D.offsetParent%20%21%3D%3D%20null%29%20%7B%20closeBtns%5Bi%5D.click%28%29%3B%20return%3B%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20root.style.display%20%3D%20%27none%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%202.%20BIND%20BUTTONS%20%28Scoped%29%0D%0A%20%20%20%20setTimeout%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20bStart%20%3D%20root.querySelector%28%27.btn-start%27%29%3B%0D%0A%20%20%20%20%20%20%20%20var%20bCancel%20%3D%20root.querySelector%28%27.btn-cancel%27%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bStart%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20bStart.onclick%20%3D%20function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win%20%26%26%20win.startGame%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.startGame%28%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win.foundItem%29%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20MARKER%3A%20We%20just%20clicked%20start%2C%20so%20allow%20Success%20screen%20to%20show%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert%28%22Game%20Engine%20not%20found.%20Reload%20page.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bCancel%29%20bCancel.onclick%20%3D%20closePopup%3B%0D%0A%20%20%20%20%7D%2C%20100%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%203.%20LOGIC%20LOOP%20%28Exact%20logic%20from%20your%20working%20snippet%29%0D%0A%20%20%20%20if%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%20clearInterval%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%3B%0D%0A%0D%0A%20%20%20%20window%5B%27loop_%27%20%2B%20currentItemId%5D%20%3D%20setInterval%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%3A%20Did%20we%20just%20click%20start%3F%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20recentlyClicked%20%3D%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%3D%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20we%20just%20clicked%20start%2C%20keep%20showing%20Success.%20Don%27t%20override%20it.%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28recentlyClicked%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20gameData%20%3D%20null%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20STRATEGY%3A%20Try%20Parent%20LocalStorage%20then%20Memory%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win%20%26%26%20win.localStorage%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20raw%20%3D%20win.localStorage.getItem%28%27spaCityInk_Game%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28raw%29%20gameData%20%3D%20JSON.parse%28raw%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%20%26%26%20win%20%26%26%20win.gameState%29%20gameData%20%3D%20win.gameState%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20no%20data%2C%20show%20prompt%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%20MATCH%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20isFound%20%3D%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20list%20%3D%20gameData.foundItems%20%7C%7C%20%5B%5D%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20cleanId%20%3D%20currentItemId.trim%28%29.toLowerCase%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3Clist.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28String%28list%5Bi%5D%29.trim%28%29.toLowerCase%28%29%20%3D%3D%3D%20cleanId%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20isFound%20%3D%20true%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20DECISION%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28isFound%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20found%20AND%20we%20didn%27t%20just%20click%20start%20-%3E%20Already%20Found%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-already%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28gameData.isPlaying%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Auto-claim%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win.foundItem%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20We%20treat%20auto-claim%20same%20as%20clicking%20start%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20console.error%28e%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%7D%2C%20500%29%3B%0D%0A%0D%0A%7D%29%28%29%3B%0D%0A%3C%2Fscript%3E
%0D%0A%3Cdiv%20%20class%3D%22audio-player-wrap%22%3E%0D%0A%3Cdiv%20class%3D%22wrap%22%3E%0D%0A%20%20%20%20%3Caudio%20controls%20class%3D%22audio%22%20preload%3D%22none%22%20%3E%0D%0A%20%20%20%20%20%20%20%20%3Csource%20src%3D%22https%3A%2F%2Ffile.mpskin.com%2Fimg%2Fcrm%2Fc831e9b5f6c9bab6b23c26c2dab2a29c%2F20251224-004225-rooster.mp3%22%20%3E%0D%0A%20%20%20%20%3C%2Faudio%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A
%3Cstyle%20type%3D%22text%2Fcss%22%3E.popup-panel%20%7B%20display%3A%20none%3B%20%7D%0D%0A%20%20.popup-active%20%7B%20display%3A%20block%20%21important%3B%20%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3Cdiv%20id%3D%22popup-item3%22%20style%3D%22text-align%3A%20center%3B%20font-family%3A%20Arial%2C%20sans-serif%3B%20padding%3A%2010px%3B%22%3E%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-prompt%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20found%20a%20Secret%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E.%3Cbr%20%2F%3E%0D%0AStart%20the%20Scavenger%20Hunt%20to%20collect%2020%20points%21%3C%2Fp%3E%0D%0A%0D%0A%3Cdiv%20style%3D%22margin-top%3A%2015px%3B%22%3E%3Cbutton%20class%3D%22btn-start%22%20style%3D%22background%3A%20%23d63031%3B%20color%3A%20white%3B%20border%3A%20none%3B%20padding%3A%2010px%2020px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%22%3ESTART%20GAME%3C%2Fbutton%3E%3Cbutton%20class%3D%22btn-cancel%22%20style%3D%22background%3A%20transparent%3B%20border%3A%201px%20solid%20%23999%3B%20color%3A%20%23555%3B%20padding%3A%2010px%2015px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%20margin-left%3A%205px%3B%22%3ECancel%3C%2Fbutton%3E%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-success%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20Found%20It%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E%21%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%3Cb%20style%3D%22color%3A%23d63031%3B%20font-size%3A16px%3B%22%3E%2B20%20Points%3C%2Fb%3E%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-already%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23888888%3B%22%3EAlready%20Collected%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20have%20already%20found%20the%20%3Cspan%20class%3D%22name-insert%22%3E...%3C%2Fspan%3E.%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3Cscript%3E%0D%0A%28function%28%29%20%7B%0D%0A%20%20%20%20%2F%2F%20---%20CONFIGURATION%20---%0D%0A%20%20%20%20var%20currentItemId%20%3D%20%27item3%27%3B%20%0D%0A%20%20%20%20var%20friendlyName%20%3D%20%27Realistic%20Rooster%27%3B%0D%0A%20%20%20%20%2F%2F%20---------------------%0D%0A%0D%0A%20%20%20%20%2F%2F%20SETUP%3A%20Find%20specific%20wrapper%20based%20on%20ID%0D%0A%20%20%20%20var%20rootId%20%3D%20%27popup-%27%20%2B%20currentItemId%3B%0D%0A%20%20%20%20var%20root%20%3D%20document.getElementById%28rootId%29%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%2F%2F%20Safety%20check%0D%0A%20%20%20%20if%20%28%21root%29%20%7B%0D%0A%20%20%20%20%20%20%20%20console.error%28%22Popup%20Error%3A%20HTML%20ID%20%27%22%20%2B%20rootId%20%2B%20%22%27%20not%20found.%20Update%20the%20top%20line%20of%20HTML.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%20AUTO-FILL%20NAME%0D%0A%20%20%20%20var%20inserts%20%3D%20root.querySelectorAll%28%27.name-insert%27%29%3B%0D%0A%20%20%20%20for%28var%20i%3D0%3B%20i%3Cinserts.length%3B%20i%2B%2B%29%20inserts%5Bi%5D.innerText%20%3D%20friendlyName%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%201.%20HELPERS%0D%0A%20%20%20%20function%20getMainWin%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.top%20%26%26%20window.top.gameState%29%20return%20window.top%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.parent%20%26%26%20window.parent.gameState%29%20return%20window.parent%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.gameState%29%20return%20window%3B%0D%0A%20%20%20%20%20%20%20%20return%20null%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20showPanel%28className%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20Scoped%20to%20this%20root%20only%0D%0A%20%20%20%20%20%20%20%20var%20active%20%3D%20root.querySelector%28%27.popup-active%27%29%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28active%20%26%26%20active.classList.contains%28className%29%29%20return%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-prompt%27%29.className%20%3D%20%27popup-panel%20p-prompt%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-success%27%29.className%20%3D%20%27popup-panel%20p-success%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-already%27%29.className%20%3D%20%27popup-panel%20p-already%27%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20var%20target%20%3D%20root.querySelector%28%27.%27%20%2B%20className%29%3B%0D%0A%20%20%20%20%20%20%20%20if%28target%29%20target.className%20%3D%20%27popup-panel%20%27%20%2B%20className%20%2B%20%27%20popup-active%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20closePopup%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20win%20%3D%20window.top%20%7C%7C%20window.parent%20%7C%7C%20window%3B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.jQuery%20%26%26%20win.jQuery.fancybox%29%20%7B%20win.jQuery.fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.Fancybox%29%20%7B%20win.Fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20closeBtns%20%3D%20win.document.querySelectorAll%28%27.fancybox-close-small%2C%20.fancybox-button--close%2C%20.mpskin-popup-close%2C%20.close%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3CcloseBtns.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28closeBtns%5Bi%5D.offsetParent%20%21%3D%3D%20null%29%20%7B%20closeBtns%5Bi%5D.click%28%29%3B%20return%3B%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20root.style.display%20%3D%20%27none%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%202.%20BIND%20BUTTONS%20%28Scoped%29%0D%0A%20%20%20%20setTimeout%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20bStart%20%3D%20root.querySelector%28%27.btn-start%27%29%3B%0D%0A%20%20%20%20%20%20%20%20var%20bCancel%20%3D%20root.querySelector%28%27.btn-cancel%27%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bStart%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20bStart.onclick%20%3D%20function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win%20%26%26%20win.startGame%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.startGame%28%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win.foundItem%29%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20MARKER%3A%20We%20just%20clicked%20start%2C%20so%20allow%20Success%20screen%20to%20show%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert%28%22Game%20Engine%20not%20found.%20Reload%20page.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bCancel%29%20bCancel.onclick%20%3D%20closePopup%3B%0D%0A%20%20%20%20%7D%2C%20100%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%203.%20LOGIC%20LOOP%20%28Exact%20logic%20from%20your%20working%20snippet%29%0D%0A%20%20%20%20if%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%20clearInterval%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%3B%0D%0A%0D%0A%20%20%20%20window%5B%27loop_%27%20%2B%20currentItemId%5D%20%3D%20setInterval%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%3A%20Did%20we%20just%20click%20start%3F%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20recentlyClicked%20%3D%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%3D%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20we%20just%20clicked%20start%2C%20keep%20showing%20Success.%20Don%27t%20override%20it.%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28recentlyClicked%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20gameData%20%3D%20null%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20STRATEGY%3A%20Try%20Parent%20LocalStorage%20then%20Memory%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win%20%26%26%20win.localStorage%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20raw%20%3D%20win.localStorage.getItem%28%27spaCityInk_Game%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28raw%29%20gameData%20%3D%20JSON.parse%28raw%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%20%26%26%20win%20%26%26%20win.gameState%29%20gameData%20%3D%20win.gameState%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20no%20data%2C%20show%20prompt%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%20MATCH%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20isFound%20%3D%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20list%20%3D%20gameData.foundItems%20%7C%7C%20%5B%5D%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20cleanId%20%3D%20currentItemId.trim%28%29.toLowerCase%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3Clist.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28String%28list%5Bi%5D%29.trim%28%29.toLowerCase%28%29%20%3D%3D%3D%20cleanId%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20isFound%20%3D%20true%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20DECISION%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28isFound%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20found%20AND%20we%20didn%27t%20just%20click%20start%20-%3E%20Already%20Found%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-already%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28gameData.isPlaying%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Auto-claim%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win.foundItem%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20We%20treat%20auto-claim%20same%20as%20clicking%20start%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20console.error%28e%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%7D%2C%20500%29%3B%0D%0A%0D%0A%7D%29%28%29%3B%0D%0A%3C%2Fscript%3E
%0D%0A%3Cdiv%20%20class%3D%22audio-player-wrap%22%3E%0D%0A%3Cdiv%20class%3D%22wrap%22%3E%0D%0A%20%20%20%20%3Caudio%20controls%20class%3D%22audio%22%20preload%3D%22none%22%20%3E%0D%0A%20%20%20%20%20%20%20%20%3Csource%20src%3D%22https%3A%2F%2Ffile.mpskin.com%2Fimg%2Fcrm%2Fc831e9b5f6c9bab6b23c26c2dab2a29c%2F20251224-004320-timmyoddparents.mp3%22%20%3E%0D%0A%20%20%20%20%3C%2Faudio%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A
%3Cstyle%20type%3D%22text%2Fcss%22%3E.popup-panel%20%7B%20display%3A%20none%3B%20%7D%0D%0A%20%20.popup-active%20%7B%20display%3A%20block%20%21important%3B%20%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3Cdiv%20id%3D%22popup-item2%22%20style%3D%22text-align%3A%20center%3B%20font-family%3A%20Arial%2C%20sans-serif%3B%20padding%3A%2010px%3B%22%3E%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-prompt%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20found%20a%20Secret%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E.%3Cbr%20%2F%3E%0D%0AStart%20the%20Scavenger%20Hunt%20to%20collect%2020%20points%21%3C%2Fp%3E%0D%0A%0D%0A%3Cdiv%20style%3D%22margin-top%3A%2015px%3B%22%3E%3Cbutton%20class%3D%22btn-start%22%20style%3D%22background%3A%20%23d63031%3B%20color%3A%20white%3B%20border%3A%20none%3B%20padding%3A%2010px%2020px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%22%3ESTART%20GAME%3C%2Fbutton%3E%3Cbutton%20class%3D%22btn-cancel%22%20style%3D%22background%3A%20transparent%3B%20border%3A%201px%20solid%20%23999%3B%20color%3A%20%23555%3B%20padding%3A%2010px%2015px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%20margin-left%3A%205px%3B%22%3ECancel%3C%2Fbutton%3E%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-success%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20Found%20It%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E%21%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%3Cb%20style%3D%22color%3A%23d63031%3B%20font-size%3A16px%3B%22%3E%2B20%20Points%3C%2Fb%3E%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-already%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23888888%3B%22%3EAlready%20Collected%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20have%20already%20found%20the%20%3Cspan%20class%3D%22name-insert%22%3E...%3C%2Fspan%3E.%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3Cscript%3E%0D%0A%28function%28%29%20%7B%0D%0A%20%20%20%20%2F%2F%20---%20CONFIGURATION%20---%0D%0A%20%20%20%20var%20currentItemId%20%3D%20%27item2%27%3B%20%0D%0A%20%20%20%20var%20friendlyName%20%3D%20%27Cartoon%20Rooster%27%3B%0D%0A%20%20%20%20%2F%2F%20---------------------%0D%0A%0D%0A%20%20%20%20%2F%2F%20SETUP%3A%20Find%20specific%20wrapper%20based%20on%20ID%0D%0A%20%20%20%20var%20rootId%20%3D%20%27popup-%27%20%2B%20currentItemId%3B%0D%0A%20%20%20%20var%20root%20%3D%20document.getElementById%28rootId%29%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%2F%2F%20Safety%20check%0D%0A%20%20%20%20if%20%28%21root%29%20%7B%0D%0A%20%20%20%20%20%20%20%20console.error%28%22Popup%20Error%3A%20HTML%20ID%20%27%22%20%2B%20rootId%20%2B%20%22%27%20not%20found.%20Update%20the%20top%20line%20of%20HTML.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%20AUTO-FILL%20NAME%0D%0A%20%20%20%20var%20inserts%20%3D%20root.querySelectorAll%28%27.name-insert%27%29%3B%0D%0A%20%20%20%20for%28var%20i%3D0%3B%20i%3Cinserts.length%3B%20i%2B%2B%29%20inserts%5Bi%5D.innerText%20%3D%20friendlyName%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%201.%20HELPERS%0D%0A%20%20%20%20function%20getMainWin%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.top%20%26%26%20window.top.gameState%29%20return%20window.top%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.parent%20%26%26%20window.parent.gameState%29%20return%20window.parent%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.gameState%29%20return%20window%3B%0D%0A%20%20%20%20%20%20%20%20return%20null%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20showPanel%28className%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20Scoped%20to%20this%20root%20only%0D%0A%20%20%20%20%20%20%20%20var%20active%20%3D%20root.querySelector%28%27.popup-active%27%29%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28active%20%26%26%20active.classList.contains%28className%29%29%20return%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-prompt%27%29.className%20%3D%20%27popup-panel%20p-prompt%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-success%27%29.className%20%3D%20%27popup-panel%20p-success%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-already%27%29.className%20%3D%20%27popup-panel%20p-already%27%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20var%20target%20%3D%20root.querySelector%28%27.%27%20%2B%20className%29%3B%0D%0A%20%20%20%20%20%20%20%20if%28target%29%20target.className%20%3D%20%27popup-panel%20%27%20%2B%20className%20%2B%20%27%20popup-active%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20closePopup%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20win%20%3D%20window.top%20%7C%7C%20window.parent%20%7C%7C%20window%3B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.jQuery%20%26%26%20win.jQuery.fancybox%29%20%7B%20win.jQuery.fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.Fancybox%29%20%7B%20win.Fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20closeBtns%20%3D%20win.document.querySelectorAll%28%27.fancybox-close-small%2C%20.fancybox-button--close%2C%20.mpskin-popup-close%2C%20.close%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3CcloseBtns.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28closeBtns%5Bi%5D.offsetParent%20%21%3D%3D%20null%29%20%7B%20closeBtns%5Bi%5D.click%28%29%3B%20return%3B%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20root.style.display%20%3D%20%27none%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%202.%20BIND%20BUTTONS%20%28Scoped%29%0D%0A%20%20%20%20setTimeout%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20bStart%20%3D%20root.querySelector%28%27.btn-start%27%29%3B%0D%0A%20%20%20%20%20%20%20%20var%20bCancel%20%3D%20root.querySelector%28%27.btn-cancel%27%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bStart%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20bStart.onclick%20%3D%20function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win%20%26%26%20win.startGame%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.startGame%28%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win.foundItem%29%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20MARKER%3A%20We%20just%20clicked%20start%2C%20so%20allow%20Success%20screen%20to%20show%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert%28%22Game%20Engine%20not%20found.%20Reload%20page.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bCancel%29%20bCancel.onclick%20%3D%20closePopup%3B%0D%0A%20%20%20%20%7D%2C%20100%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%203.%20LOGIC%20LOOP%20%28Exact%20logic%20from%20your%20working%20snippet%29%0D%0A%20%20%20%20if%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%20clearInterval%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%3B%0D%0A%0D%0A%20%20%20%20window%5B%27loop_%27%20%2B%20currentItemId%5D%20%3D%20setInterval%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%3A%20Did%20we%20just%20click%20start%3F%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20recentlyClicked%20%3D%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%3D%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20we%20just%20clicked%20start%2C%20keep%20showing%20Success.%20Don%27t%20override%20it.%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28recentlyClicked%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20gameData%20%3D%20null%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20STRATEGY%3A%20Try%20Parent%20LocalStorage%20then%20Memory%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win%20%26%26%20win.localStorage%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20raw%20%3D%20win.localStorage.getItem%28%27spaCityInk_Game%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28raw%29%20gameData%20%3D%20JSON.parse%28raw%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%20%26%26%20win%20%26%26%20win.gameState%29%20gameData%20%3D%20win.gameState%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20no%20data%2C%20show%20prompt%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%20MATCH%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20isFound%20%3D%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20list%20%3D%20gameData.foundItems%20%7C%7C%20%5B%5D%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20cleanId%20%3D%20currentItemId.trim%28%29.toLowerCase%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3Clist.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28String%28list%5Bi%5D%29.trim%28%29.toLowerCase%28%29%20%3D%3D%3D%20cleanId%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20isFound%20%3D%20true%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20DECISION%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28isFound%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20found%20AND%20we%20didn%27t%20just%20click%20start%20-%3E%20Already%20Found%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-already%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28gameData.isPlaying%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Auto-claim%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win.foundItem%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20We%20treat%20auto-claim%20same%20as%20clicking%20start%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20console.error%28e%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%7D%2C%20500%29%3B%0D%0A%0D%0A%7D%29%28%29%3B%0D%0A%3C%2Fscript%3E
%0D%0A%3Cdiv%20%20class%3D%22audio-player-wrap%22%3E%0D%0A%3Cdiv%20class%3D%22wrap%22%3E%0D%0A%20%20%20%20%3Caudio%20controls%20class%3D%22audio%22%20preload%3D%22none%22%20%3E%0D%0A%20%20%20%20%20%20%20%20%3Csource%20src%3D%22https%3A%2F%2Ffile.mpskin.com%2Fimg%2Fcrm%2Fc831e9b5f6c9bab6b23c26c2dab2a29c%2F20251224-004936-slotmachine.mp3%22%20%3E%0D%0A%20%20%20%20%3C%2Faudio%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A
%3Cstyle%20type%3D%22text%2Fcss%22%3E.popup-panel%20%7B%20display%3A%20none%3B%20%7D%0D%0A%20%20.popup-active%20%7B%20display%3A%20block%20%21important%3B%20%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3Cdiv%20id%3D%22popup-item4%22%20style%3D%22text-align%3A%20center%3B%20font-family%3A%20Arial%2C%20sans-serif%3B%20padding%3A%2010px%3B%22%3E%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-prompt%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20found%20a%20Secret%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E.%3Cbr%20%2F%3E%0D%0AStart%20the%20Scavenger%20Hunt%20to%20collect%2020%20points%21%3C%2Fp%3E%0D%0A%0D%0A%3Cdiv%20style%3D%22margin-top%3A%2015px%3B%22%3E%3Cbutton%20class%3D%22btn-start%22%20style%3D%22background%3A%20%23d63031%3B%20color%3A%20white%3B%20border%3A%20none%3B%20padding%3A%2010px%2020px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%22%3ESTART%20GAME%3C%2Fbutton%3E%3Cbutton%20class%3D%22btn-cancel%22%20style%3D%22background%3A%20transparent%3B%20border%3A%201px%20solid%20%23999%3B%20color%3A%20%23555%3B%20padding%3A%2010px%2015px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%20margin-left%3A%205px%3B%22%3ECancel%3C%2Fbutton%3E%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-success%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20Found%20It%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E%21%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%3Cb%20style%3D%22color%3A%23d63031%3B%20font-size%3A16px%3B%22%3E%2B20%20Points%3C%2Fb%3E%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-already%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23888888%3B%22%3EAlready%20Collected%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20have%20already%20found%20the%20%3Cspan%20class%3D%22name-insert%22%3E...%3C%2Fspan%3E.%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3Cscript%3E%0D%0A%28function%28%29%20%7B%0D%0A%20%20%20%20%2F%2F%20---%20CONFIGURATION%20---%0D%0A%20%20%20%20var%20currentItemId%20%3D%20%27item4%27%3B%20%0D%0A%20%20%20%20var%20friendlyName%20%3D%20%27Animated%20Rooster%27%3B%0D%0A%20%20%20%20%2F%2F%20---------------------%0D%0A%0D%0A%20%20%20%20%2F%2F%20SETUP%3A%20Find%20specific%20wrapper%20based%20on%20ID%0D%0A%20%20%20%20var%20rootId%20%3D%20%27popup-%27%20%2B%20currentItemId%3B%0D%0A%20%20%20%20var%20root%20%3D%20document.getElementById%28rootId%29%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%2F%2F%20Safety%20check%0D%0A%20%20%20%20if%20%28%21root%29%20%7B%0D%0A%20%20%20%20%20%20%20%20console.error%28%22Popup%20Error%3A%20HTML%20ID%20%27%22%20%2B%20rootId%20%2B%20%22%27%20not%20found.%20Update%20the%20top%20line%20of%20HTML.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%20AUTO-FILL%20NAME%0D%0A%20%20%20%20var%20inserts%20%3D%20root.querySelectorAll%28%27.name-insert%27%29%3B%0D%0A%20%20%20%20for%28var%20i%3D0%3B%20i%3Cinserts.length%3B%20i%2B%2B%29%20inserts%5Bi%5D.innerText%20%3D%20friendlyName%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%201.%20HELPERS%0D%0A%20%20%20%20function%20getMainWin%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.top%20%26%26%20window.top.gameState%29%20return%20window.top%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.parent%20%26%26%20window.parent.gameState%29%20return%20window.parent%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.gameState%29%20return%20window%3B%0D%0A%20%20%20%20%20%20%20%20return%20null%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20showPanel%28className%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20Scoped%20to%20this%20root%20only%0D%0A%20%20%20%20%20%20%20%20var%20active%20%3D%20root.querySelector%28%27.popup-active%27%29%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28active%20%26%26%20active.classList.contains%28className%29%29%20return%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-prompt%27%29.className%20%3D%20%27popup-panel%20p-prompt%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-success%27%29.className%20%3D%20%27popup-panel%20p-success%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-already%27%29.className%20%3D%20%27popup-panel%20p-already%27%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20var%20target%20%3D%20root.querySelector%28%27.%27%20%2B%20className%29%3B%0D%0A%20%20%20%20%20%20%20%20if%28target%29%20target.className%20%3D%20%27popup-panel%20%27%20%2B%20className%20%2B%20%27%20popup-active%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20closePopup%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20win%20%3D%20window.top%20%7C%7C%20window.parent%20%7C%7C%20window%3B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.jQuery%20%26%26%20win.jQuery.fancybox%29%20%7B%20win.jQuery.fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.Fancybox%29%20%7B%20win.Fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20closeBtns%20%3D%20win.document.querySelectorAll%28%27.fancybox-close-small%2C%20.fancybox-button--close%2C%20.mpskin-popup-close%2C%20.close%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3CcloseBtns.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28closeBtns%5Bi%5D.offsetParent%20%21%3D%3D%20null%29%20%7B%20closeBtns%5Bi%5D.click%28%29%3B%20return%3B%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20root.style.display%20%3D%20%27none%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%202.%20BIND%20BUTTONS%20%28Scoped%29%0D%0A%20%20%20%20setTimeout%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20bStart%20%3D%20root.querySelector%28%27.btn-start%27%29%3B%0D%0A%20%20%20%20%20%20%20%20var%20bCancel%20%3D%20root.querySelector%28%27.btn-cancel%27%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bStart%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20bStart.onclick%20%3D%20function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win%20%26%26%20win.startGame%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.startGame%28%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win.foundItem%29%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20MARKER%3A%20We%20just%20clicked%20start%2C%20so%20allow%20Success%20screen%20to%20show%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert%28%22Game%20Engine%20not%20found.%20Reload%20page.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bCancel%29%20bCancel.onclick%20%3D%20closePopup%3B%0D%0A%20%20%20%20%7D%2C%20100%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%203.%20LOGIC%20LOOP%20%28Exact%20logic%20from%20your%20working%20snippet%29%0D%0A%20%20%20%20if%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%20clearInterval%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%3B%0D%0A%0D%0A%20%20%20%20window%5B%27loop_%27%20%2B%20currentItemId%5D%20%3D%20setInterval%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%3A%20Did%20we%20just%20click%20start%3F%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20recentlyClicked%20%3D%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%3D%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20we%20just%20clicked%20start%2C%20keep%20showing%20Success.%20Don%27t%20override%20it.%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28recentlyClicked%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20gameData%20%3D%20null%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20STRATEGY%3A%20Try%20Parent%20LocalStorage%20then%20Memory%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win%20%26%26%20win.localStorage%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20raw%20%3D%20win.localStorage.getItem%28%27spaCityInk_Game%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28raw%29%20gameData%20%3D%20JSON.parse%28raw%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%20%26%26%20win%20%26%26%20win.gameState%29%20gameData%20%3D%20win.gameState%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20no%20data%2C%20show%20prompt%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%20MATCH%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20isFound%20%3D%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20list%20%3D%20gameData.foundItems%20%7C%7C%20%5B%5D%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20cleanId%20%3D%20currentItemId.trim%28%29.toLowerCase%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3Clist.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28String%28list%5Bi%5D%29.trim%28%29.toLowerCase%28%29%20%3D%3D%3D%20cleanId%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20isFound%20%3D%20true%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20DECISION%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28isFound%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20found%20AND%20we%20didn%27t%20just%20click%20start%20-%3E%20Already%20Found%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-already%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28gameData.isPlaying%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Auto-claim%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win.foundItem%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20We%20treat%20auto-claim%20same%20as%20clicking%20start%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20console.error%28e%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%7D%2C%20500%29%3B%0D%0A%0D%0A%7D%29%28%29%3B%0D%0A%3C%2Fscript%3E
%0D%0A%3Cdiv%20%20class%3D%22audio-player-wrap%22%3E%0D%0A%3Cdiv%20class%3D%22wrap%22%3E%0D%0A%20%20%20%20%3Caudio%20controls%20class%3D%22audio%22%20preload%3D%22none%22%20%3E%0D%0A%20%20%20%20%20%20%20%20%3Csource%20src%3D%22https%3A%2F%2Ffile.mpskin.com%2Fimg%2Fcrm%2Fc831e9b5f6c9bab6b23c26c2dab2a29c%2F20251224-005926-pigsounds.mp3%22%20%3E%0D%0A%20%20%20%20%3C%2Faudio%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A
%3Cstyle%20type%3D%22text%2Fcss%22%3E.popup-panel%20%7B%20display%3A%20none%3B%20%7D%0D%0A%20%20.popup-active%20%7B%20display%3A%20block%20%21important%3B%20%7D%0D%0A%3C%2Fstyle%3E%0D%0A%3Cdiv%20id%3D%22popup-item5%22%20style%3D%22text-align%3A%20center%3B%20font-family%3A%20Arial%2C%20sans-serif%3B%20padding%3A%2010px%3B%22%3E%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-prompt%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20found%20a%20Secret%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E.%3Cbr%20%2F%3E%0D%0AStart%20the%20Scavenger%20Hunt%20to%20collect%2020%20points%21%3C%2Fp%3E%0D%0A%0D%0A%3Cdiv%20style%3D%22margin-top%3A%2015px%3B%22%3E%3Cbutton%20class%3D%22btn-start%22%20style%3D%22background%3A%20%23d63031%3B%20color%3A%20white%3B%20border%3A%20none%3B%20padding%3A%2010px%2020px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%22%3ESTART%20GAME%3C%2Fbutton%3E%3Cbutton%20class%3D%22btn-cancel%22%20style%3D%22background%3A%20transparent%3B%20border%3A%201px%20solid%20%23999%3B%20color%3A%20%23555%3B%20padding%3A%2010px%2015px%3B%20border-radius%3A%204px%3B%20font-weight%3A%20bold%3B%20cursor%3A%20pointer%3B%20margin-left%3A%205px%3B%22%3ECancel%3C%2Fbutton%3E%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-success%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23d63031%3B%22%3EYou%20Found%20It%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20found%20the%20%3Cb%20class%3D%22name-insert%22%3E...%3C%2Fb%3E%21%3Cbr%20%2F%3E%0D%0A%3Cbr%20%2F%3E%0D%0A%3Cb%20style%3D%22color%3A%23d63031%3B%20font-size%3A16px%3B%22%3E%2B20%20Points%3C%2Fb%3E%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%0D%0A%3Cdiv%20class%3D%22popup-panel%20p-already%22%3E%0D%0A%3Ch3%20style%3D%22margin%3A%200%200%2010px%200%3B%20color%3A%20%23888888%3B%22%3EAlready%20Collected%21%3C%2Fh3%3E%0D%0A%0D%0A%3Cp%20style%3D%22font-size%3A%2014px%3B%20color%3A%20%23333%3B%20line-height%3A%201.5%3B%22%3EYou%20have%20already%20found%20the%20%3Cspan%20class%3D%22name-insert%22%3E...%3C%2Fspan%3E.%3C%2Fp%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%0D%0A%3Cscript%3E%0D%0A%28function%28%29%20%7B%0D%0A%20%20%20%20%2F%2F%20---%20CONFIGURATION%20---%0D%0A%20%20%20%20var%20currentItemId%20%3D%20%27item5%27%3B%20%0D%0A%20%20%20%20var%20friendlyName%20%3D%20%27Balloon%20Rooster%27%3B%0D%0A%20%20%20%20%2F%2F%20---------------------%0D%0A%0D%0A%20%20%20%20%2F%2F%20SETUP%3A%20Find%20specific%20wrapper%20based%20on%20ID%0D%0A%20%20%20%20var%20rootId%20%3D%20%27popup-%27%20%2B%20currentItemId%3B%0D%0A%20%20%20%20var%20root%20%3D%20document.getElementById%28rootId%29%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%2F%2F%20Safety%20check%0D%0A%20%20%20%20if%20%28%21root%29%20%7B%0D%0A%20%20%20%20%20%20%20%20console.error%28%22Popup%20Error%3A%20HTML%20ID%20%27%22%20%2B%20rootId%20%2B%20%22%27%20not%20found.%20Update%20the%20top%20line%20of%20HTML.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%20AUTO-FILL%20NAME%0D%0A%20%20%20%20var%20inserts%20%3D%20root.querySelectorAll%28%27.name-insert%27%29%3B%0D%0A%20%20%20%20for%28var%20i%3D0%3B%20i%3Cinserts.length%3B%20i%2B%2B%29%20inserts%5Bi%5D.innerText%20%3D%20friendlyName%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%201.%20HELPERS%0D%0A%20%20%20%20function%20getMainWin%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.top%20%26%26%20window.top.gameState%29%20return%20window.top%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.parent%20%26%26%20window.parent.gameState%29%20return%20window.parent%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28window.gameState%29%20return%20window%3B%0D%0A%20%20%20%20%20%20%20%20return%20null%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20showPanel%28className%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20Scoped%20to%20this%20root%20only%0D%0A%20%20%20%20%20%20%20%20var%20active%20%3D%20root.querySelector%28%27.popup-active%27%29%3B%0D%0A%20%20%20%20%20%20%20%20if%20%28active%20%26%26%20active.classList.contains%28className%29%29%20return%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-prompt%27%29.className%20%3D%20%27popup-panel%20p-prompt%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-success%27%29.className%20%3D%20%27popup-panel%20p-success%27%3B%0D%0A%20%20%20%20%20%20%20%20root.querySelector%28%27.p-already%27%29.className%20%3D%20%27popup-panel%20p-already%27%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20var%20target%20%3D%20root.querySelector%28%27.%27%20%2B%20className%29%3B%0D%0A%20%20%20%20%20%20%20%20if%28target%29%20target.className%20%3D%20%27popup-panel%20%27%20%2B%20className%20%2B%20%27%20popup-active%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20function%20closePopup%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20win%20%3D%20window.top%20%7C%7C%20window.parent%20%7C%7C%20window%3B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.jQuery%20%26%26%20win.jQuery.fancybox%29%20%7B%20win.jQuery.fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20if%28win.Fancybox%29%20%7B%20win.Fancybox.close%28%29%3B%20return%3B%20%7D%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20try%20%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20closeBtns%20%3D%20win.document.querySelectorAll%28%27.fancybox-close-small%2C%20.fancybox-button--close%2C%20.mpskin-popup-close%2C%20.close%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3CcloseBtns.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28closeBtns%5Bi%5D.offsetParent%20%21%3D%3D%20null%29%20%7B%20closeBtns%5Bi%5D.click%28%29%3B%20return%3B%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%7B%7D%0D%0A%20%20%20%20%20%20%20%20root.style.display%20%3D%20%27none%27%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%202.%20BIND%20BUTTONS%20%28Scoped%29%0D%0A%20%20%20%20setTimeout%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20var%20bStart%20%3D%20root.querySelector%28%27.btn-start%27%29%3B%0D%0A%20%20%20%20%20%20%20%20var%20bCancel%20%3D%20root.querySelector%28%27.btn-cancel%27%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bStart%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20bStart.onclick%20%3D%20function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win%20%26%26%20win.startGame%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.startGame%28%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28win.foundItem%29%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20MARKER%3A%20We%20just%20clicked%20start%2C%20so%20allow%20Success%20screen%20to%20show%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert%28%22Game%20Engine%20not%20found.%20Reload%20page.%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20if%28bCancel%29%20bCancel.onclick%20%3D%20closePopup%3B%0D%0A%20%20%20%20%7D%2C%20100%29%3B%0D%0A%0D%0A%20%20%20%20%2F%2F%203.%20LOGIC%20LOOP%20%28Exact%20logic%20from%20your%20working%20snippet%29%0D%0A%20%20%20%20if%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%20clearInterval%28window%5B%27loop_%27%20%2B%20currentItemId%5D%29%3B%0D%0A%0D%0A%20%20%20%20window%5B%27loop_%27%20%2B%20currentItemId%5D%20%3D%20setInterval%28function%28%29%20%7B%0D%0A%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%3A%20Did%20we%20just%20click%20start%3F%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20recentlyClicked%20%3D%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%3D%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20we%20just%20clicked%20start%2C%20keep%20showing%20Success.%20Don%27t%20override%20it.%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28recentlyClicked%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20win%20%3D%20getMainWin%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20gameData%20%3D%20null%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20STRATEGY%3A%20Try%20Parent%20LocalStorage%20then%20Memory%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win%20%26%26%20win.localStorage%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20raw%20%3D%20win.localStorage.getItem%28%27spaCityInk_Game%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28raw%29%20gameData%20%3D%20JSON.parse%28raw%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%20%26%26%20win%20%26%26%20win.gameState%29%20gameData%20%3D%20win.gameState%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20no%20data%2C%20show%20prompt%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%21gameData%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20CHECK%20MATCH%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20isFound%20%3D%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20list%20%3D%20gameData.foundItems%20%7C%7C%20%5B%5D%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20cleanId%20%3D%20currentItemId.trim%28%29.toLowerCase%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28var%20i%3D0%3B%20i%3Clist.length%3B%20i%2B%2B%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%28String%28list%5Bi%5D%29.trim%28%29.toLowerCase%28%29%20%3D%3D%3D%20cleanId%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20isFound%20%3D%20true%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20DECISION%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28isFound%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20found%20AND%20we%20didn%27t%20just%20click%20start%20-%3E%20Already%20Found%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-already%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28gameData.isPlaying%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Auto-claim%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28win.foundItem%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20win.foundItem%28currentItemId%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20We%20treat%20auto-claim%20same%20as%20clicking%20start%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20true%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setTimeout%28function%28%29%7B%20window%5B%27just_clicked_%27%20%2B%20currentItemId%5D%20%3D%20false%3B%20%7D%2C%205000%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-success%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20showPanel%28%27p-prompt%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20%7D%20catch%28e%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20console.error%28e%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%7D%2C%20500%29%3B%0D%0A%0D%0A%7D%29%28%29%3B%0D%0A%3C%2Fscript%3E
