/* ========================= 全体基本設定 ========================= */ html { font-size: 14px; } body { margin: 0; padding: 0; /* font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; */ font-family: "JetBrains Mono", monospace; line-height: 1.5; background: #f5f6f8; color: #222; } /* ========================= レイアウト ========================= */ #app { max-width: 900px; margin: 0 auto; padding: 12px; } .app-header { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: nowrap; /* 高さ増加を防ぐ */ } /* タイトル余白調整 */ .app-header h1 { margin: 0; white-space: nowrap; } /* 各ブロック横並び */ .mode-switch, .resume-area, .top-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 0; /* 縦余白を消す */ } /* モード表示も縦余白削除 */ .mode-indicator { margin-bottom: 0; white-space: nowrap; } /* ========================= モード切替 ========================= */ .mode-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; } .mode-btn { font-size: 0.85rem; padding: 4px 10px; border: 1px solid #bbb; background: #fff; border-radius: 4px; cursor: pointer; } .mode-btn.active { background: #3b82f6; color: #fff; border-color: #3b82f6; } .mode-indicator { font-size: 0.8rem; color: #555; margin-bottom: 6px; } /* ========================= ナビゲーションボタン ========================= */ .nav-buttons { display: flex; justify-content: center; gap: 12px; margin: 8px 0; } .nav-buttons button { min-width: 110px; padding: 6px 12px; font-size: 0.85rem; border-radius: 6px; border: 1px solid #aaa; background: #ffffff; cursor: pointer; transition: background 0.2s, opacity 0.2s; } .nav-buttons button:hover:not(:disabled) { background: #e8f0ff; } .nav-buttons button:disabled { opacity: 0.4; cursor: default; } .top-nav { margin-bottom: 6px; display: inline; position: relative; left: 160px; } .bottom-nav { margin-top: 10px; } /* ========================= 問題表示 ========================= */ .question-header { font-size: 0.85rem; color: #666; margin-bottom: 6px; } #question-text { font-size: 1rem; margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; } /* ========================= 選択肢 ========================= */ #choices-container label { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; margin-bottom: -4px; padding: 3px 5px; border-radius: 4px; cursor: pointer; } .choice-text { flex: 1; } /* バリデーションメッセージ */ #validation-msg { margin-top: 6px; color: #dc2626; font-weight: 600; font-size: 0.85rem; } /* 不正解時:正解選択肢をハイライト */ .correct-choice { background: #dcfce7; border-left: 4px solid #22c55e; padding-left: 6px; font-weight: 600; } /* ========================= 回答ボタン ========================= */ #submit-btn-container { display: flex; justify-content: center; } #submit-btn { margin-top: 8px; padding: 8px 18px; font-size: 0.9rem; font-weight: 600; border-radius: 8px; border: none; background: #2563eb; color: #fff; cursor: pointer; transition: background 0.2s, transform 0.05s; } #submit-btn:hover { background: #1d4ed8; } #submit-btn:active { transform: translateY(1px); } #submit-btn:disabled { background: #9ca3af; cursor: default; } #reset-score-btn { margin-top: 2px; padding: 8px 18px; font-size: 0.9rem; font-weight: 600; border-radius: 8px; border: none; background: #2563eb; color: #fff; cursor: pointer; transition: background 0.2s, transform 0.05s; } #reset-score-btn:hover { background: #1d4ed8; } #reset-score-btn:active { transform: translateY(1px); } #reset-score-btn:disabled { background: #9ca3af; cursor: default; } /* ========================= メッセージ ========================= */ #message { margin-top: 6px; color: #dc2626; font-weight: 600; font-size: 0.85rem; } /* ========================= 解説表示 ========================= */ #explanation-container { margin-top: 8px; padding: 8px; border-radius: 6px; font-size: 0.85rem; white-space: normal; } .correct-ui { background: #ecfdf5; border: 2px solid #22c55e; color: #166534; font-weight: 600; } .wrong-ui { background: #fef2f2; border: 2px solid #ef4444; color: #7f1d1d; font-weight: 600; } /* 解説本文は少し落ち着かせる */ #explanation-container p, #explanation-container div { font-weight: 400; } /* ========================= スコア表示 ========================= */ #score-panel { margin-top: 10px; display: flex; gap: 12px; font-size: 0.8rem; } .score-item { color: #444; } .score-item.highlight { font-weight: bold; } /* ========================= 共通 ========================= */ .hidden { display: none; } .question-number { font-size: 0.85rem; color: #666; margin-bottom: 6px; } /* 前回から再開ボタン配置 */ .resume-area { margin-bottom: 6px; } .resume-area .mode-btn:disabled { opacity: 0.4; cursor: default; } /* ========================= データセット切替 ========================= */ .dataset-switch { display: flex; align-items: center; gap: 6px; } #dataset-select { font-size: 0.85rem; padding: 4px 8px; border: 1px solid #bbb; border-radius: 4px; background: #fff; cursor: pointer; height: 28px; } #dataset-select:focus { outline: none; border-color: #3b82f6; } /* ========================= スマホ用(768px以下) ========================= */ @media (max-width: 768px) { html { font-size: 16px; } body { line-height: 1.6; } #app { padding: 14px; } /* ヘッダー縦並び */ .app-header { flex-direction: column; align-items: flex-start; gap: 8px; } .app-header h1 { font-size: 1.3rem; } /* モード・再開・ナビは折り返し */ .mode-switch, .resume-area, .top-nav, .dataset-switch { flex-wrap: wrap; gap: 8px; } .top-nav { position: static; left: auto; } /* ボタン全体を押しやすく */ .mode-btn, .nav-buttons button, #submit-btn { font-size: 1rem; padding: 10px 14px; min-height: 44px; } /* ナビボタン縦並び */ .nav-buttons { flex-direction: column; align-items: stretch; gap: 8px; } .nav-buttons button { width: 100%; } /* 問題文 */ #question-text { font-size: 1.1rem; } /* 画像横いっぱい */ #question-text img, #explanation-container img { width: 100%; height: auto; display: block; } /* 選択肢をタップ向けに拡張 */ #choices-container label { font-size: 1.05rem; padding: 10px 12px; margin-bottom: 8px; border-radius: 8px; min-height: 44px; display: flex; align-items: center; } /* 解説 */ #explanation-container { font-size: 0.95rem; } /* スコア折り返し */ #score-panel { flex-wrap: wrap; gap: 8px; font-size: 0.9rem; } .dataset-switch { width: 100%; } #dataset-select { width: 100%; font-size: 1rem; padding: 10px 12px; min-height: 44px; } }