/* ===== 基本スタイル ===== */ body { background-color: #4c6cb3; color: #f0f0f0; /* 日本語対応のシステムフォントを優先 */ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Sans Japanese", "ヒラギノ角ゴシック ProN", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, "MS ゴシック", "MS Gothic"; margin: 1em; } h1 { text-align: center; color: #ffffff; } .juyo { color: #ffb84c; font-weight: bold; } /* ===== リンク(aタグ) ===== */ a { color: #ffd6f7; /* 通常時:やさしいピンク */ text-decoration: none; } a:hover { color: #ffffff; /* ホバー時:白で視認性UP */ text-decoration: underline; } a:visited { color: #ffb3e6; /* 訪問済み:少し濃いピンク */ } a:focus { outline: 2px solid #ffffff; outline-offset: 2px; } /* ===== テーブル(選択肢用) ===== */ table.choices { margin: 1em auto; border-collapse: collapse; width: 90%; text-align: center; } table.choices td { padding: 0.6em; vertical-align: middle; } /* ===== ラジオボタン ===== */ input[type="radio"] { transform: scale(1.4); margin-right: 0.4em; vertical-align: middle; } /* ===== ボタン(送信・リセット) ===== */ input[type="submit"], input[type="reset"] { background-color: #ffcc00; color: #000000; font-size: 1.1em; padding: 0.6em 1em; border: none; border-radius: 10px; cursor: pointer; margin: 0.5em 0.25em; box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3); transition: background-color 0.3s ease, transform 0.2s ease; } input[type="submit"]:hover, input[type="reset"]:hover { background-color: #ffaa00; transform: scale(1.05); } input[type="submit"]:focus, input[type="reset"]:focus { outline: 3px solid #ffffff; outline-offset: 2px; } /* ファイルの一番最後に追加 */ /* スマートフォン向けのスタイル */ /* 画面幅が600px以下のデバイスに適用されます */ @media screen and (max-width: 600px) { body { /* モバイルでは余白を少し調整 */ margin: 0.5em; } /* クイズの問題文の文字サイズを小さく */ table.quizTable td { font-size: 0.9em; } /* 選択肢の文字サイズを調整 */ .radio-group label { font-size: 0.95em; min-width: 6em; /* 選択肢が複数行になっても見やすいように調整 */ } /* ボタンの文字サイズとパディングを調整 */ input[type="submit"], input[type="reset"] { font-size: 1em; padding: 0.5em 0.8em; } }