3838# share-button {position : absolute;top : max (128px , calc (106px + env (safe-area-inset-top)));right : max (22px , env (safe-area-inset-right));z-index : 20 ;display : none;width : 34px ;height : 34px ;border : 1px solid # D4A030 ;border-radius : 4px ;background : rgba (10 , 10 , 10 , .82 );color : # E8C040 ;font : 18px monospace;cursor : pointer}
3939# share-button .show {display : block}
4040# share-button : focus-visible {outline : 3px solid # E8E0D0 ;outline-offset : 2px }
41+ # briefing-button {position : absolute;top : max (22px , env (safe-area-inset-top));left : max (22px , env (safe-area-inset-left));z-index : 20 ;width : 34px ;height : 34px ;border : 1px solid # 5A8848 ;border-radius : 4px ;background : rgba (10 , 10 , 10 , .82 );color : # A8C088 ;font : 700 16px 'Silkscreen' , monospace;cursor : pointer}
42+ # briefing-button : focus-visible , # briefing-start : focus-visible {outline : 3px solid # E8E0D0 ;outline-offset : 2px }
4143# journal-button {position : absolute;top : max (48px , calc (26px + env (safe-area-inset-top)));right : max (22px , env (safe-area-inset-right));z-index : 20 ;width : 42px ;height : 30px ;border : 1px solid # 5A8848 ;border-radius : 4px ;background : rgba (10 , 10 , 10 , .82 );color : # A8C088 ;font : 10px 'Silkscreen' , monospace;cursor : pointer}
4244# journal-button : focus-visible , # journal-close : focus-visible {outline : 3px solid # E8E0D0 ;outline-offset : 2px }
4345# sound-button {position : absolute;right : max (20px , env (safe-area-inset-right));bottom : max (20px , env (safe-area-inset-bottom));z-index : 20 ;width : 38px ;height : 34px ;border : 1px solid # 5A8848 ;border-radius : 4px ;background : rgba (10 , 10 , 10 , .82 );color : # A8C088 ;font : 18px monospace;cursor : pointer}
5052.journal-entry {padding-bottom : 7px ;border-bottom : 1px solid # 383030 ;color : # B0A890 }
5153.journal-entry .found {color : # E8E0D0 }
5254# journal-close {margin-top : 16px ;padding : 8px 12px ;border : 1px solid # D4A030 ;border-radius : 4px ;background : # 181820 ;color : # E8C040 ;font : 11px 'Silkscreen' , monospace;cursor : pointer}
55+ # briefing-dialog {width : min (480px , calc (100vw - 32px ));padding : 0 ;border : 2px solid # 5A8848 ;border-radius : 4px ;background : # 181820 ;color : # E8E0D0 ;font-family : 'Silkscreen' , monospace}
56+ # briefing-dialog ::backdrop {background : rgba (10 , 10 , 10 , .84 )}
57+ # briefing-header {padding : 16px 18px 12px ;border-bottom : 1px solid # 383030 }
58+ # briefing-header span {display : block;margin-bottom : 7px ;color : # 6B9848 ;font-size : 9px }
59+ # briefing-header h2 {color : # E8C040 ;font-size : 18px }
60+ # briefing-body {padding : 18px }
61+ # briefing-objective {margin-bottom : 18px ;color : # E8E0D0 ;font-size : 12px ;line-height : 1.8 }
62+ # briefing-controls {display : grid;grid-template-columns : 88px 1fr ;gap : 10px 14px ;padding : 14px 0 ;border-top : 1px solid # 383030 ;border-bottom : 1px solid # 383030 ;font-size : 10px ;line-height : 1.5 }
63+ .briefing-input {color : # E8C040 }
64+ .briefing-action {color : # B0A890 }
65+ # briefing-note {margin-top : 14px ;color : # 8A9870 ;font-size : 9px ;line-height : 1.7 }
66+ # briefing-start {width : 100% ;margin-top : 18px ;padding : 11px 14px ;border : 2px solid # D4A030 ;border-radius : 4px ;background : # 242018 ;color : # E8C040 ;font : 700 12px 'Silkscreen' , monospace;cursor : pointer}
5367.sr-only {position : absolute!important ;width : 1px !important ;height : 1px !important ;padding : 0 !important ;margin : -1px !important ;overflow : hidden!important ;clip : rect (0 , 0 , 0 , 0 )!important ;white-space : nowrap!important ;border : 0 !important }
5468@media (max-width : 600px ){
5569 # ui-overlay {justify-content : flex-start;padding : calc (10px + env (safe-area-inset-top)) 10px 10px }
6175 # journal-button {top : calc (74px + env (safe-area-inset-top));right : 12px }
6276 # quest-reset {top : calc (112px + env (safe-area-inset-top));right : 12px }
6377 # share-button {top : calc (152px + env (safe-area-inset-top));right : 12px }
78+ # briefing-button {top : calc (50px + env (safe-area-inset-top));left : 12px }
6479 # hint {bottom : max (88px , calc (68px + env (safe-area-inset-bottom)));width : 70vw ;font-size : 10px ;text-align : center}
6580 # action-button {display : block}
6681 # sound-button {right : max (104px , calc (104px + env (safe-area-inset-right)));bottom : max (28px , calc (28px + env (safe-area-inset-bottom)))}
91106 < div id ="emote "> </ div >
92107 < div id ="status " role ="status " aria-live ="polite "> </ div >
93108 < div id ="quest " aria-live ="polite "> SIGNALS 0/3</ div >
109+ < button id ="briefing-button " type ="button " aria-label ="Open mission briefing " title ="Mission briefing "> ?</ button >
94110 < button id ="journal-button " type ="button " aria-label ="Open signal log "> LOG</ button >
95111 < button id ="quest-reset " type ="button " aria-label ="Restart signal quest " title ="Restart signal quest "> ↻</ button >
96112 < button id ="share-button " type ="button " aria-label ="Share completion " title ="Share completion "> ↗</ button >
97113 < button id ="action-button " type ="button " aria-label ="Scan or interact "> SCAN</ button >
98114 < button id ="sound-button " type ="button " aria-label ="Mute sound " title ="Toggle sound "> ♪</ button >
99115 < p class ="sr-only " id ="game-instructions "> Move with WASD, arrow keys, or by selecting a destination. Press Space or Enter, or use the Scan button, to scan nearby residents or interact with the character you face.</ p >
116+ < dialog id ="briefing-dialog " aria-labelledby ="briefing-title ">
117+ < div id ="briefing-header ">
118+ < span > UNIT-01 // DAILY ASSIGNMENT</ span >
119+ < h2 id ="briefing-title "> RESTORE THE LINK</ h2 >
120+ </ div >
121+ < div id ="briefing-body ">
122+ < p id ="briefing-objective "> Three signal carriers are dark. Explore the river factory, scan for their locations, and recover all three before the cycle resets.</ p >
123+ < div id ="briefing-controls " aria-label ="Game controls ">
124+ < span class ="briefing-input "> WASD</ span > < span class ="briefing-action "> MOVE</ span >
125+ < span class ="briefing-input "> CLICK / TAP</ span > < span class ="briefing-action "> WALK TO A LOCATION</ span >
126+ < span class ="briefing-input "> SPACE / SCAN</ span > < span class ="briefing-action "> SEARCH OR INTERACT</ span >
127+ </ div >
128+ < p id ="briefing-note "> Residents remember what you discover. Progress is saved on this device.</ p >
129+ < button id ="briefing-start " type ="button "> BEGIN</ button >
130+ </ div >
131+ </ dialog >
100132 < dialog id ="journal-dialog " aria-labelledby ="journal-title ">
101133 < h2 id ="journal-title "> SIGNAL LOG</ h2 >
102134 < div id ="journal-list "> </ div >
@@ -121,6 +153,9 @@ <h2 id="journal-title">SIGNAL LOG</h2>
121153const actionButton = document . getElementById ( 'action-button' ) ;
122154const questEl = document . getElementById ( 'quest' ) ;
123155const questResetButton = document . getElementById ( 'quest-reset' ) ;
156+ const briefingButton = document . getElementById ( 'briefing-button' ) ;
157+ const briefingDialog = document . getElementById ( 'briefing-dialog' ) ;
158+ const briefingStart = document . getElementById ( 'briefing-start' ) ;
124159const journalButton = document . getElementById ( 'journal-button' ) ;
125160const journalDialog = document . getElementById ( 'journal-dialog' ) ;
126161const journalList = document . getElementById ( 'journal-list' ) ;
@@ -1139,6 +1174,19 @@ <h2 id="journal-title">SIGNAL LOG</h2>
11391174 performAction ( ) ;
11401175} ) ;
11411176questResetButton . addEventListener ( 'click' , ( ) => requestQuestReset ( ) ) ;
1177+ const BRIEFING_SEEN_KEY = 'littleandroid.briefingSeen' ;
1178+ function rememberBriefing ( ) {
1179+ try { window . localStorage . setItem ( BRIEFING_SEEN_KEY , '1' ) ; } catch { }
1180+ }
1181+ function openBriefing ( ) {
1182+ if ( ! briefingDialog . open ) briefingDialog . showModal ( ) ;
1183+ }
1184+ briefingButton . addEventListener ( 'click' , openBriefing ) ;
1185+ briefingStart . addEventListener ( 'click' , ( ) => briefingDialog . close ( ) ) ;
1186+ briefingDialog . addEventListener ( 'close' , ( ) => {
1187+ rememberBriefing ( ) ;
1188+ canvas . focus ( { preventScroll : true } ) ;
1189+ } ) ;
11421190journalButton . addEventListener ( 'click' , ( ) => {
11431191 updateJournal ( ) ;
11441192 journalDialog . showModal ( ) ;
@@ -1601,6 +1649,9 @@ <h2 id="journal-title">SIGNAL LOG</h2>
16011649} else {
16021650 showStatus ( 'OBJECTIVE: LOCATE 3 SIGNALS' , 4 ) ;
16031651}
1652+ let hasSeenBriefing = false ;
1653+ try { hasSeenBriefing = window . localStorage . getItem ( BRIEFING_SEEN_KEY ) === '1' ; } catch { }
1654+ if ( ! hasSeenBriefing ) openBriefing ( ) ;
16041655requestAnimationFrame ( ( t ) => { lastTime = t ; gameLoop ( t ) ; } ) ;
16051656</ script >
16061657</ body >
0 commit comments