El día que exploté
Un cuento interactivo para aprender a regular el enojo
¿Qué hace Nico ahora?
Elige una opción para continuar la historia.
Elige una opción para continuar la historia.
${descriptions[t.id]}
Recuerda: la herramienta no hace desaparecer la emoción; te ayuda a manejarla.
`); } function showToolbox(){ setTimeout(()=>showModal('🎒 Tu mochila está lista','Elige mentalmente las herramientas que más te sirven.
Mi plan: cuando note que mi enojo está subiendo, primero haré una pausa, después elegiré una herramienta y finalmente decidiré qué hacer.
'),200); } function showModal(title,content){document.getElementById('modalTitle').textContent=title;document.getElementById('modalContent').innerHTML=content;document.getElementById('modal').classList.remove('hidden')} function closeModal(){document.getElementById('modal').classList.add('hidden')} function showHelp(){showModal('❓ ¿Cómo se juega?','Lee la historia y elige lo que haría Nico. Tu decisión cambia el camino y puede modificar su nivel de enojo.
Explora los diferentes caminos. No hay una única respuesta perfecta.
Si estás usando este recurso en terapia, conversa con tu psicólogo sobre lo que te hizo elegir cada opción.
')} function showPath(){showModal('🛤️ Tu recorrido',history.length?''+history.map((x,i)=>`${i+1}. ${scenes[x].title}`).join('
')+'
Aún no has tomado decisiones.
')} function goBack(){if(history.length){current=history.pop();anger=Math.max(1,anger-0);render()}} function restart(){current='start';history=[];anger=1;unlocked=new Set(['breathe','rest']);closeModal();render()} function toggleSound(){soundOn=!soundOn;document.getElementById('soundBtn').textContent=soundOn?'🔊':'🔇'} function beep(){if(!soundOn)return;try{const C=window.AudioContext||window.webkitAudioContext;if(!C)return;const c=new C(),o=c.createOscillator(),g=c.createGain();o.frequency.value=440;o.connect(g);g.connect(c.destination);g.gain.setValueAtTime(.035,c.currentTime);g.gain.exponentialRampToValueAtTime(.001,c.currentTime+.12);o.start();o.stop(c.currentTime+.12)}catch(e){}} render();