Challenge N3: Nihongo
// ------------------- App State ------------------- let currentQuestions = []; // 実際に使用する問題リスト (シャッフル済み) let currentIndex = 0; // 現在の問題番号 (0から) let userScore = 0; // 正解数 let answerLocked = false; // 回答済みで選択不可か let selectedOptionIndex = null; // 現在の問題で選んだ選択肢インデックス let currentQuestionObj = null;
.option-btn background: #ffffff; border: 2px solid #eeddaa; border-radius: 60px; padding: 1rem 1.2rem; font-size: 1rem; font-weight: 500; text-align: left; display: flex; align-items: center; gap: 1rem; transition: all 0.2s; cursor: pointer; color: #2e241f; font-family: inherit; nihongo challenge n3
// フィードバックメッセージ let feedbackMsg = ""; if (answerLocked) if (isUserCorrect) feedbackMsg = `✅ 正解! $escapeHtml(explanation)`; else const correctAnswerText = q.options[correctIdx]; feedbackMsg = `❌ 不正解... 正解は「$escapeHtml(correctAnswerText)」です。 $escapeHtml(explanation)`; else feedbackMsg = "🤔 選択肢をクリックして答えましょう!"; // 正解数 let answerLocked = false
if (isCorrect) userScore++; updateScoreUI(); .option-btn background: #ffffff

