Soft Steps Home

body { background: linear-gradient(#fdf6ec, #f4efe6); color: #5a4a42; font-family: "Georgia", serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } #game { background-color: #fffaf3; padding: 30px; border-radius: 20px; max-width: 550px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); } h1 { text-align: center; font-weight: normal; margin-bottom: 20px; } #story-text { font-size: 1.1em; line-height: 1.6; margin-bottom: 20px; } button { background-color: #e6d8c3; color: #5a4a42; border: none; border-radius: 999px; padding: 12px 20px; margin: 8px 0; width: 100%; font-size: 1em; cursor: pointer; transition: background-color 0.2s; } button:hover { background-color: #d9cbb4; } const story = { start: { text: "You wake up to soft morning light. The day feels unhurried.", choices: [ { text: "Sit by the window for a moment", next: "window" }, { text: "Step outside into the fresh air", next: "outside" } ] }, window: { text: "You watch clouds drift slowly by. You feel a little calmer.", choices: [ { text: "Make some warm tea", next: "tea" }, { text: "Stretch and start the day", next: "outside" } ] }, outside: { text: "Birds sing nearby. The world feels kind today.", choices: [ { text: "Walk down the quiet path", next: "path" }, { text: "Sit under a tree", next: "tree" } ] }, tea: { text: "The tea is warm and comforting. You smile.", choices: [ { text: "Enjoy the moment", next: "ending" } ] }, path: { text: "Each step feels light. You’re exactly where you need to be.", choices: [ { text: "Keep walking", next: "ending" } ] }, tree: { text: "The shade is cool and peaceful. Time slows down.", choices: [ { text: "Rest here a while", next: "ending" } ] }, ending: { text: "Nothing special happens. And somehow, that’s perfect.", choices: [] } }; function showScene(scene) { document.getElementById("story-text").innerText = story[scene].text; const choicesDiv = document.getElementById("choices"); choicesDiv.innerHTML = ""; story[scene].choices.forEach(choice => { const button = document.createElement("button"); button.innerText = choice.text; button.onclick = () => showScene(choice.next); choicesDiv.appendChild(button); }); } showScene("start");