:root {
    --primary-teal: #008b8b;   /* ダークシアン */
    --steel-blue: #4682b4;     /* スチールブルー */
    --slate-gray: #708090;     /* スレートグレー */
    --bg-slate: #778899;       /* ライトスレートグレー */
    --card-bg: #ffffff;
    --book-bg: #ffffe0;        /* ライトイエロー */
    --link-color: #005f5f;     /* 深みのあるティール */
}

body { 
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    line-height: 1.6; 
    max-width: 700px; 
    margin: 0 auto; 
    padding: 10px; 
    background-color: var(--bg-slate); 
    color: #ffffff;
}

.card { 
    background: var(--card-bg); 
    color: var(--slate-gray);
    padding: 25px; 
    border-radius: 20px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); 
}

h1 { 
	color: var(--steel-blue); 
	text-align: center; 
	margin-bottom: 30px; 
	font-size: 1.8em; 
	width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 10px; /* 左右に少し余白を作るとスマホで見やすくなります */
}

h1 img {
max-width: 100%;
height: auto;
display: block; /* 下部の余計な隙間を消す場合 */
margin: 0 auto; /* 中央寄せにする場合 */
}

.question { margin-bottom: 20px; display: none; }
.question.active { display: block; animation: fadeIn 0.5s; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.options button { 
    display: block; width: 100%; padding: 16px; margin: 12px 0; 
    border: 2px solid #f0f0f0; border-radius: 12px; 
    background: #fff; cursor: pointer; text-align: left; 
    font-size: 16px; transition: all 0.3s;
    color: var(--slate-gray);
    font-weight: 500;
}

.options button:hover { 
    background: var(--steel-blue); 
    color: #fff;
    border-color: var(--steel-blue);
    transform: translateX(5px);
}

#result { display: none; text-align: left; animation: fadeIn 0.8s; }

.result-title { 
    font-size: 1.6em; font-weight: bold; color: var(--primary-teal); 
    text-align: center; margin: 25px 0; 
    border-bottom: 2px solid #f0f0f0; padding-bottom: 15px;
}

.book-section { 
    margin-top: 30px; 
    background: var(--book-bg); 
    padding: 25px; 
    border-radius: 12px; 
    border-left: 6px solid var(--primary-teal); 
}

/* 見出しの下に35pxのスペースを追加 */
.book-section h3 { 
    margin-top: 0; 
    margin-bottom: 35px; 
    color: var(--steel-blue); 
    font-size: 1.2em; 
}

.book-list { list-style: none; padding: 0; }
.book-item { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px dashed #dcdcdc; }
.book-item:last-child { border-bottom: none; }

.book-title { font-weight: bold; font-size: 1.05em; margin-bottom: 4px; }
.book-title a { 
    color: var(--link-color); 
    text-decoration: none; 
    border-bottom: 1px solid rgba(0, 95, 95, 0.3);
    transition: all 0.2s ease;
}
.book-title a:hover { 
    color: var(--steel-blue);
    border-bottom-color: var(--steel-blue);
    background-color: rgba(70, 130, 180, 0.05);
}

.book-author { font-size: 0.85em; color: #555; margin-left: 24px; }

.reset-btn { 
    display: block; width: 220px; margin: 35px auto 0;
    background: var(--steel-blue); color: white; 
    border: none; padding: 14px; border-radius: 30px; cursor: pointer; 
    font-weight: bold; font-size: 16px; transition: background 0.3s;
}
.reset-btn:hover { background: #35668d; }

.header{
	margin: 3px;
}
.footer{
	font-size: 0.85rem;
	text-align: center;
	margin: 55px 0 15px 0;
}
.memo{
	font-size: 0.85rem;
	margin: 35px 0 50px 0; 
	color: steelblue;
}

/* 画面幅が768px以下（スマホ・タブレット）の場合に適用 */
@media (max-width: 768px) {
    /* 1. ページ全体のメインコンテナの左右余白を詰める */
    .container, main, article {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 2. 質問(Q)と回答(A)のブロックの左右余白をリセット */
    /* dl, dt, dd タグ、または .question, .answer といったクラスを想定 */
    dt, dd, .question, .answer {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        width: 100% !important; /* 横幅いっぱいに広げる */
        box-sizing: border-box; /* パディングを含めた幅計算にする */
    }

    /* 3. 回答（ddなど）に付いているデフォルトのインデント（左余白）を消す */
    dd {
        padding-left: 10px !important;
    }
}
