// リスタートボタン (常に有効) const restartBtn = document.getElementById('restartButton'); if (restartBtn) restartBtn.addEventListener('click', () => initGame(); );
const nextDisabled = !answerLocked ? 'disabled' : '';
currentQuestionObj = currentQuestions[currentIndex]; answerLocked = false; selectedOptionIndex = null; const q = currentQuestionObj; nihongo challenge n3
// 回答後のフィードバック & スコア加算 function evaluateAndLock(selectedIdx, correctIdx, explanationText) if (answerLocked) return; // 既に回答済み
.question-text background: #fef3da; padding: 1.2rem; border-radius: 2rem; font-size: 1.6rem; font-weight: 600; text-align: center; margin-bottom: 2rem; box-shadow: inset 0 1px 4px #ede0c2, 0 4px 8px rgba(0,0,0,0.05); word-break: break-word; color: #2c221b; line-height: 1.4; if (restartBtn) restartBtn.addEventListener('click'
// UI スコア更新 function updateScoreUI() scoreSpan.innerText = userScore;
// 初期ロード initGame(); </script> </body> </html> currentQuestionObj = currentQuestions[currentIndex]
.score-box, .question-counter background: white; padding: 0.3rem 1rem; border-radius: 40px; box-shadow: inset 0 0 0 1px #ede3c8, 0 2px 4px rgba(0,0,0,0.02);
.header h1 font-size: 2rem; letter-spacing: 2px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;