/* ========== 共通スタイル ========== */

/* --- 基本設定 --- */
body {
  font-family: "メイリオ", Meiryo, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  font-size: 16px;
  background: #f4f6f9;
  margin: 0;
  padding: 0;
  line-height: 1.7;
}
.header {
  background-color: #333;
  padding: 10px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}
body.with-header > .container {
  padding-top: 75px;
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

h1, h2, h3, h4 {
  color: #333;
  text-align: center;
}
h1 { font-size: 1.8em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }
p { color: #555; }

/* --- ヘッダーナビゲーション --- */
.header-nav {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}
.header-nav a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
  font-size: 0.92rem;
  white-space: nowrap; /* 不自然な途中改行を絶対に防止 */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.header-nav a:hover { background-color: #555; }
.header-nav a.active { background-color: #4a90e2; }

/* --- カード --- */
.card {
  background: white;
  padding: 20px;
  margin: 15px 0;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  position: relative;
}

/* --- ボタン --- */
button {
  background: #4a90e2;
  color: white;
  padding: 10px 20px;
  margin: 10px 5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1em;
}
button:hover { background: #357ABD; }
button:disabled { background-color: #ccc; cursor: not-allowed; opacity: 0.6; }

/* ========== index.html（トップページ）用 ========== */
.icon-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 120px;
  margin: 10px;
  border: none;
  background: #E6F3FF;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: 0.3s;
  color: black;
  text-decoration: none;
  white-space: nowrap;
}
.icon-button:hover { background: #4a90e2; color: white; transform: translateY(-5px); }
.icon-button i { font-size: 48px; margin-bottom: 10px; }
.icon-container { display: flex; flex-wrap: wrap; justify-content: center; }
.category-menu { display: flex; flex-direction: column; gap: 20px; }
.category-card { background: #f8f9fa; padding: 15px; border-radius: 8px; border-left: 4px solid #4a90e2; }
.category-title { font-size: 1.1em; font-weight: bold; margin-bottom: 10px; color: #333; }
.mode-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.mode-button { flex: 1; min-width: 140px; padding: 10px 18px; background: #fffaf0; color: #b7791f; border: 1.5px solid #ecc94b; border-radius: 8px; cursor: pointer; transition: all 0.25s ease; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 600; }
.mode-button:hover { background: #ecc94b; color: #744210; border-color: #d69e2e; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(214, 158, 46, 0.2); }

/* ========== toeic-overview.html / other-exams.html用 ========== */
.overview-title { border-bottom: 2px solid #4a90e2; padding-bottom: 10px; }
.section-title { border-left: 5px solid #4a90e2; padding-left: 10px; margin-top: 40px; text-align: left; }
.icon { margin-right: 8px; }
/* コラムページへのパート別リンク用 */
.part-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --- TOEIC概要ページの追加コンテンツ --- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 15px;
}
.summary-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.summary-item .label {
  display: block;
  font-size: 0.9em;
  color: #6c757d;
}
.summary-item .value {
  display: block;
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  margin-top: 2px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 0.95em;
}
.mini-table th, .mini-table td {
  border: 1px solid #e9ecef;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.mini-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed #e9ecef;
}
.checklist input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}
.note-text {
  font-size: 0.95em;
  color: #6c757d;
  text-align: left;
  margin-top: 10px;
}

.faq {
  margin-top: 10px;
}
.faq-item {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  background: #fff;
}

/* <details><summary> を使ったFAQにも対応 */
.faq-item summary {
  width: 100%;
  text-align: left;
  background: #f8f9fa;
  color: #333;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
}
.faq-item summary:hover { background: #e9ecef; }

/* デフォルトの三角マーカーを消す（Chrome/Safari/Firefox） */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }

/* details が open のときは回答を表示 */
.faq-item[open] .faq-answer { display: block; }

/* 右側の矢印（summary の末尾） */
.faq-item summary::after {
  content: "\25B6"; /* ▶ */
  font-size: 0.9em;
  color: #6c757d;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(90deg); }
.faq-question {
  width: 100%;
  text-align: left;
  background: #f8f9fa;
  color: #333;
  padding: 12px 14px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question:hover { background: #e9ecef; }
.faq-answer {
  display: none;
  padding: 12px 14px;
  color: #555;
  text-align: left;
}
.faq-item.open .faq-answer { display: block; }
.faq-icon { font-size: 0.9em; color: #6c757d; }

@media (max-width: 768px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .summary-grid { grid-template-columns: 1fr; }
}


/* ========== column.html用 ========== */
.tabs { display: flex; justify-content: center; border-bottom: 2px solid #ddd; margin-bottom: 20px; }
.tab-link { background-color: #f1f1f1; border: none; outline: none; cursor: pointer; padding: 14px 20px; transition: background-color 0.3s, color 0.3s; font-size: 1em; font-weight: 600; border-radius: 8px 8px 0 0; margin-right: 5px; color: #333; }
.tab-link:hover { background-color: #e0e0e0; }
.tab-link.active { background-color: #4a90e2; color: white; }
.tab-content-item { display: none; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.article-card { background: white; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform 0.3s, box-shadow 0.3s; }
.article-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.article-card img { width: 100%; height: 150px; object-fit: cover; }
.article-card-content { padding: 15px; flex-grow: 1; }
.article-card-content h3 { margin-top: 0; font-size: 1.1em; }
.article-card-content p { font-size: 1em; color: #555; line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; mask-image: linear-gradient(to bottom, black 85%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%); }

/* サブタブ用のスタイル */
.sub-tabs {
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.sub-tab-link {
  background-color: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9em;
  margin: 0;
  font-family: inherit;
}
.sub-tab-link:hover {
  background-color: #d1d9e6;
}
.sub-tab-link.active {
  background-color: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

@media (max-width: 768px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .article-grid { grid-template-columns: 1fr; } }

/* ========== クイズ・ブックマーク・統計ページ共通 ========== */
.hidden { display: none !important; }
.choices { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.bookmark { position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 24px; color: #ccc; z-index: 10; }
.bookmarked { color: gold; }
.result { background: #f8f9fa; padding: 20px; border-radius: 10px; margin-top: 20px; }
.result-item { padding: 15px; margin: 10px 0; border-radius: 8px; text-align: left; border-left: 5px solid; position: relative; }
.result-item .bookmark { top: 15px; right: 15px; }
.result-item.correct { background-color: #d4edda; border-color: #28a745; }
.result-item.incorrect { background-color: #f8d7da; border-color: #dc3545; }
.quit-quiz-btn { position: absolute; top: 20px; left: 20px; background: #6c757d; color: white; padding: 8px 15px; margin: 0; border-radius: 8px; text-decoration: none; font-size: 14px; z-index: 10; }
.quit-quiz-btn:hover { background: #5a6268; color: white; }
.feedback { margin-top: 10px; padding: 15px; border-radius: 8px; border-left: 5px solid; }
.feedback.correct { background-color: #d4edda; border-color: #c3e6cb; }
.feedback.incorrect { background-color: #f8d7da; border-color: #f5c6cb; }
.tab-container { margin-bottom: 20px; }
.tab-buttons { display: flex; border-bottom: 1px solid #dee2e6; margin-bottom: 20px; }
.tab-button { flex: 1; padding: 12px; border: none; background: #e9ecef; color: #495057; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.3s; }
.tab-button.active { background: #4a90e2; color: white; border-bottom-color: #357ABD; font-weight: bold; }
.level-button { margin: 5px; padding: 5px 10px; background-color: #4a90e2; color: white; border: none; border-radius: 5px; cursor: pointer; }
.level-button.active { background-color: #3536bd; font-weight: bold; }
.popup { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #333; color: white; padding: 10px 20px; border-radius: 5px; z-index: 1001; opacity: 0; transition: opacity 0.3s; }
.popup.show { opacity: 1; }

/* --- リスニングページ専用 --- */
.question-header { text-align: center; margin-bottom: 10px; position: relative; padding-top: 10px; }
#speak-btn { font-size: 48px; cursor: pointer; color: #4a90e2; background: none; border: none; padding: 0 20px; }
#speak-btn:hover { color: #357ABD; }
.speak-note { font-size: 0.8em; color: #6c757d; margin: 0; }
.q-section { margin-top: 25px; }
.q-label { font-weight: bold; color: #555; margin-bottom: 8px; font-size: 0.9em; }
#question { font-weight: bold; font-size: 1.2em; margin-top: 5px; }
#sentence-container { background-color: #f8f9fa; border: 1px solid #e9ecef; padding: 15px; border-radius: 8px; margin-top: 10px; }
#toggle-sentence-btn { background-color: #6c757d; font-size: 14px; padding: 8px 15px; margin: 0; }
.speech-controls-container { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; gap: 5px; z-index: 5; }
.rate-controls, .voice-controls { display: flex; gap: 5px; }
.rate-controls button { background: #e9ecef; color: #495057; border-radius: 20px; padding: 0; margin: 0; width: 40px; height: 25px; font-size: 12px; border: 1px solid #dee2e6; }
.rate-controls button.selected { background: #007bff; color: white; border-color: #007bff; }
.voice-controls button { width: 35px; height: 35px; border-radius: 50%; font-size: 16px; padding: 0; margin: 0; display: flex; justify-content: center; align-items: center; background: #e9ecef; color: #495057; border: 1px solid #dee2e6; }
#voice-female.selected { background-color: #E91E63; color: white; border-color: #E91E63; }
#voice-male.selected { background-color: #2196F3; color: white; border-color: #2196F3; }

/* --- result.html / bookmark.html 専用 --- */
.card-icon-button { position: absolute; top: 20px; color: white; width: 40px; height: 40px; padding: 0; margin: 0; border-radius: 50%; font-size: 16px; display: flex; align-items: center; justify-content: center; border: none; text-decoration: none; cursor: pointer; transition: background-color 0.3s; }
#back-to-top-btn { left: 20px; background: #6c757d; width: auto; height: auto; padding: 8px 15px; border-radius: 8px; font-size: 14px; text-decoration: none; }
#back-to-top-btn:hover { background: #5a6268; }
#delete-history-btn { right: 20px; background: #dc3545; }
#delete-history-btn:hover { background: #c82333; }
.mistake-card { background-color: #f8f9fa; border: 1px solid #dee2e6; border-radius: 0.25rem; padding: 1rem; margin-bottom: 1rem; text-align: left;}
.mistake-item { position: relative; padding-right: 30px; border-bottom: 1px solid #ddd; padding-bottom: 10px; margin-bottom: 10px; }
.mistake-item:last-child { border-bottom: none; }
.bookmark-icon { position: absolute; top: 5px; right: 5px; cursor: pointer; font-size: 24px; color: #ccc; }
.bookmark-icon.bookmarked { color: #ffd700; }
.bookmarked-question { position: relative; padding: 20px; margin-bottom: 20px; border: 1px solid #ddd; border-radius: 8px; }
.delete-bookmark { position: absolute; top: 10px; right: 10px; cursor: pointer; font-size: 20px; color: #ff4d4d; }
.confirmation-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); z-index: 1000; }
.confirmation-dialog button { margin: 0 10px; }

/* --- レベル選択画面のボタン配置調整 --- */
.level-buttons-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px; /* ボタンと「トップに戻る」ボタンの間に余白を追加 */
}
.back-to-level-select { /* 新しいスタイル */
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1em;
    display: block; /* ボタンのサイズを内容に合わせる */
    width: fit-content; /* ボタンのサイズを内容に合わせる */
    margin: 0 0 0 20px; /* 左寄せにし、左側の余白を20pxに設定（カードのpaddingに合わせる） */
    text-decoration: none; /* 下線を削除 */
}
.back-to-level-select:hover {
    background: #5a6268;
}

/* ========== toeic-overview.html 用の追加スタイル ========== */

/* --- ページ上部のメインビジュアル --- */
.hero-header {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #4a90e2, #357ABD);
    border-radius: 12px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* h1とpは既存のスタイルがあるので、色のみ上書き */
.hero-header h1, .hero-header p {
    color: white;
}

.hero-header h1 {
    font-size: 1.8em;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.hero-header p {
    font-size: 1em;
    opacity: 0.9;
    margin-top: 10px;
}

/* --- 「TOEICとは？」カード内の特徴グリッド --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    text-align: center;
}

.feature-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.feature-item i {
    font-size: 2.5em;
    color: #4a90e2; /* テーマカラー */
    margin-bottom: 15px;
}

.feature-item h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* --- テスト構成セクション --- */
.test-format-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.test-section-card {
    padding: 25px;
    text-align: center;
    border-top: 5px solid;
    transition: transform 0.3s, box-shadow 0.3s;
}

.test-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.test-section-card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3em;
    margin-top: 0;
}

.listening-card { border-color: #5cb85c; } /* 緑 */
.reading-card { border-color: #f0ad4e; }  /* オレンジ */


/* --- 各パート詳細セクション --- */
.part-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* cardクラスのスタイルを継承しつつ、一部変更 */
.part-card {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: 100%;
    box-sizing: border-box;
}

.part-card:hover {
    border-color: #4a90e2;
}

.part-card h4 {
    font-size: 1.2em;
    color: #4a90e2;
    margin-top: 0;
    text-align: center;
}

.part-card p {
    flex-grow: 1; /* p要素がカードの高さを埋めるように */
    text-align: left;
    margin-bottom: 15px;
}

.part-focus-tag {
    display: inline-block;
    background-color: #e6f3ff;
    color: #357ABD;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    align-self: flex-start; /* 左寄せ */
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    .hero-header h1 {
        font-size: 1.8em;
    }
    .test-format-container {
        grid-template-columns: 1fr;
    }
}

/* ========== toeic-overview.html パート別解説カード用 ========== */

.part-card.listening {
    border-top: 5px solid #5cb85c; /* 緑 */
    padding-top: 15px; /* 上ボーダーとのバランス調整 */
}

.part-card.reading {
    border-top: 5px solid #f0ad4e; /* オレンジ */
    padding-top: 15px; /* 上ボーダーとのバランス調整 */
}

/* ========== 説明アコーディオン用スタイル ========== */
.description-accordion {
    margin-top: 25px;
}

.description-accordion details {
    border: 1px solid #d1d9e6;
    border-radius: 10px;
    background: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.description-accordion details[open] {
    background: white;
}

.description-accordion summary {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    list-style: none;
    color: #333;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.description-accordion summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.description-accordion summary > i:first-of-type,
.description-accordion summary > span {
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
}

.description-accordion summary > i:first-of-type {
    margin-right: 10px;
}


.description-accordion summary::-webkit-details-marker {
    display: none;
}

.description-accordion .accordion-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #4a90e2;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
}

.description-accordion details[open] .accordion-icon {
    transform: rotate(180deg);
}

.description-content {
    padding: 0px 25px 20px 25px;
    text-align: left;
    border-top: 1px solid #d1d9e6;
    background-color: white;
    border-radius: 0 0 10px 10px;
}

.description-content dl {
    padding: 0;
    margin: 0;
}

.description-content dt {
    font-weight: bold;
    margin-top: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-content dt:first-child {
    margin-top: 1em;
}

.description-content dd {
    margin-left: 0;
    padding-top: 0.5em;
    padding-left: 27px;
    color: #555;
}


/* Score path (600/730/860) */
.score-path-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 14px;
}

.score-path-item {
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 12px;
    padding: 16px;
}

.score-path-badge {
    display: inline-block;
    font-weight: 700;
    font-size: 0.9em;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2b6cb0;
    margin-bottom: 8px;
}

.score-path-item h3 {
    margin: 6px 0 10px;
}

.score-path-list {
    margin: 0;
    padding-left: 1.1em;
    color: #555;
    line-height: 1.7;
}

.score-path-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.btn {
    display: inline-block;
    text-decoration: none;
    border: 1px solid #d1d9e6;
    background: #f7f9fc;
    color: #1f2937;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.btn.small {
    padding: 7px 10px;
    font-size: 0.9em;
}

@media (max-width: 900px) {
    .score-path-grid { grid-template-columns: 1fr; }
}


/* ===== SEO/回遊導線：更新日表示 ===== */
.last-updated {
  margin: 6px 0 18px;
  font-size: 0.9rem;
  color: #666;
  text-align: right;
}

/* ===== SEO/回遊導線：内部リンクボックス ===== */
.internal-link-box {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.02);
}
.internal-link-title {
  margin: 0 0 6px;
  font-weight: 700;
}
.internal-link-box a {
  font-weight: 700;
}

/* ===== TOEICおすすめ教材（toeic-books.html） ===== */
.book-picks { margin-top: 14px; }
.book-picks .subhead { margin: 10px 0 12px; }

/* 1冊 = 1行（横長カード） */
.book-pick-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.book-pick-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: #fff;
}

.book-cover {
  flex: 0 0 120px;
}

.book-cover img {
  width: 120px;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(0,0,0,0.04);
}

.book-body {
  flex: 1;
  min-width: 0;
}

.book-kicker {
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.85;
  margin-bottom: 6px;
}

.book-name {
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.book-meta {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: 8px;
}

.book-desc {
  margin: 0 0 12px;
  line-height: 1.65;
}

.book-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .book-pick-card { flex-direction: column; }
  .book-cover { flex-basis: auto; }
  .book-cover img { width: 150px; margin: 0 auto; }
}

/* ========== モバイル：ハンバーガーメニュー ========== */
/* 目的：スマホでヘッダーが縦に伸びないように、初期は折りたたみ（ドロワー）にする */

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none; /* PCでは非表示 */
  position: absolute;
  right: 14px;
  top: 10px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  z-index: 1100; /* コンテンツに埋もれない */
}

.nav-toggle-label span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111; /* 白背景でも見える色 */
  border-radius: 2px;
}

.nav-overlay {
  display: none; /* PCでは非表示 */
}

@media (max-width: 768px) {
  .header {
    padding: 8px 0;
  }

  /* トグルボタンを表示 */
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    /* どんな背景でも見えるように濃い背景＋枠 */
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  }

  .nav-toggle-label:hover {
    background: rgba(255,255,255,0.98);
  }

  /* ナビをドロワー化 */
  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 86vw;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 74px 14px 16px;
    gap: 6px;
    background: #222;
    box-shadow: -12px 0 24px rgba(0,0,0,0.25);
    /* 初期は完全に画面外へ（"黒いチラ見え"を防止） */
    transform: translateX(110%);
    transition: transform 0.22s ease;
    overflow-y: auto;
    margin: 0;
    z-index: 1090; /* オーバーレイより上に */
  }

  .header-nav a {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 1rem;
    white-space: nowrap;
  }

  /* 背景オーバーレイ */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 1080; /* メニューの下 */
  }

  /* 開いた状態 */
  .nav-toggle:checked ~ .header-nav {
    transform: translateX(0);
  }

  .nav-toggle:checked ~ .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* コンテンツの上余白：ヘッダーが少し薄くなった分だけ調整 */
  body.with-header > .container {
    padding-top: 64px;
  }
}

/* =========================
   TOEICおすすめ教材：スコア別ジャンプ（level-nav / level-pill）
   ========================= */
.level-nav{
  position: sticky;
  top: 64px; /* ヘッダーの下に固定 */
  z-index: 900;

  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin:14px 0 18px;

  /* スクロール中も読みやすくする */
  padding:10px 0;
  background:rgba(248, 249, 251, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom:1px solid rgba(0,0,0,0.08);
}

.level-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.12);
  background:#fff;
  color:inherit;
  text-decoration:none;
  box-shadow:0 1px 0 rgba(0,0,0,0.03);
  transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.level-pill:visited{
  color:inherit; /* visitedで紫になるのを防ぐ */
}

.level-pill:hover{
  background:rgba(0,0,0,0.03);
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(0,0,0,0.08);
}

.level-pill:active{
  transform:translateY(0);
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

.pill-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:48px;
  height:24px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(0,0,0,0.06);
  font-weight:700;
  font-size:.9rem;
  line-height:1;
}

@media (max-width: 768px){
  .level-nav{
    gap:8px;
  }
  .level-pill{
    padding:10px 10px;
  }
}

/* ========== 総合資格ポータル & 統一資格テンプレート ========== */
.portal-hero {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 40px 20px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 25px;
  box-shadow: 0 8px 24px rgba(30, 60, 114, 0.2);
}
.portal-hero h1 {
  color: white;
  font-size: 2.2rem;
  margin: 0 0 12px 0;
  font-weight: 700;
}
.portal-hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto;
}

/* 資格グリッド */
.shikaku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 25px 0;
}
.shikaku-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1px solid #eef0f3;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.shikaku-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  border-color: #4a90e2;
}
.shikaku-card-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-bottom: 10px;
  align-self: flex-start;
}
.badge-english { background: #e3f2fd; color: #1976d2; }
.badge-finance { background: #e8f5e9; color: #2e7d32; }
.badge-realestate { background: #fff3e0; color: #e65100; }
.badge-it { background: #f3e5f5; color: #7b1fa2; }
.badge-business { background: #e0f2f1; color: #00796b; }

.shikaku-card h3 {
  text-align: left;
  margin: 0 0 8px 0;
  font-size: 1.3rem;
  color: #2c3e50;
}
.shikaku-card p {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 16px 0;
  line-height: 1.5;
}
.shikaku-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #7f8c8d;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.shikaku-card-btn {
  display: block;
  text-align: center;
  background: #4a90e2;
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s;
}
.shikaku-card-btn:hover {
  background: #2a5298;
}

/* 統一サブナビゲーション (5大メニュー) */
.subnav-tabs {
  display: flex;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 25px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
}
.subnav-tab {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 14px 10px;
  text-decoration: none;
  color: #4a5568;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.subnav-tab i {
  font-size: 1.1rem;
}
.subnav-tab:hover {
  color: #3182ce;
  background: #f7fafc;
}
.subnav-tab.active {
  color: #3182ce;
  border-bottom-color: #3182ce;
  background: #ebf8ff;
}

/* 資格ヘッダーカード（後方互換対応） */
.qualification-header {
  display: none;
}


/* 練習問題・過去問 インタラクティブUI */
.quiz-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid #edf2f7;
}
.quiz-num-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #4a5568;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.quiz-question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 20px;
  line-height: 1.6;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}
.quiz-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
  font-size: 0.98rem;
  text-align: left;
  color: #2d3748;
}
.quiz-option:hover {
  background: #f7fafc;
  border-color: #4a90e2;
}
.quiz-option.selected {
  border-color: #3182ce;
  background: #ebf8ff;
  font-weight: 600;
}
.quiz-option.correct-choice {
  border-color: #38a169 !important;
  background: #f0fff4 !important;
  color: #22543d !important;
  font-weight: bold;
}
.quiz-option.wrong-choice {
  border-color: #e53e3e !important;
  background: #fff5f5 !important;
  color: #742a2a !important;
  font-weight: bold;
}
.quiz-option.locked {
  cursor: default;
}
.quiz-explanation-area {
  display: none;
  background: #f8fafc;
  border-radius: 12px;
  padding: 18px;
  margin-top: 15px;
  border: 1px solid #e2e8f0;
}
.quiz-explanation-area.is-correct {
  background: #eef8f2;
  border: 1px solid #c6e6d4;
}
.quiz-explanation-area.is-wrong {
  background: #fff5f5;
  border: 1px solid #fed7d7;
}
.quiz-result-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.is-correct .quiz-result-title { color: #216a48; }
.is-wrong .quiz-result-title { color: #c53030; }

/* コラム・記事グリッド */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #edf2f7;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}
.article-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}
.article-card-body h3 {
  text-align: left;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  line-height: 1.5;
}
.article-card-body p {
  font-size: 0.88rem;
  color: #718096;
  margin-bottom: 15px;
}
.article-meta {
  font-size: 0.8rem;
  color: #a0aec0;
  display: flex;
  justify-content: space-between;
}

/* 用語集テーブル */
.glossary-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.glossary-table th, .glossary-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
}
.glossary-table th {
  background: #f7fafc;
  color: #4a5568;
  font-weight: 600;
  font-size: 0.9rem;
}
.glossary-term {
  font-weight: bold;
  color: #2b6cb0;
  font-size: 1rem;
}
.glossary-desc {
  font-size: 0.92rem;
  color: #4a5568;
}
.badge-star {
  color: #d69e2e;
}

/* パンくずリスト */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
  font-size: 0.85rem;
  color: #718096;
}
.breadcrumb li + li:before {
  content: "/\00a0";
  padding: 0 8px;
  color: #cbd5e0;
}
.breadcrumb a {
  color: #4a90e2;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* フッター */
.site-footer {
  background: #2d3748;
  color: #cbd5e0;
  padding: 40px 20px 20px;
  margin-top: 50px;
}
.footer-container {
  max-width: 1000px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h4 {
  color: white;
  text-align: left;
  margin-bottom: 15px;
  font-size: 1rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover {
  color: white;
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #4a5568;
  font-size: 0.85rem;
  color: #a0aec0;
}

/* 過去問 - 実施回・年度セレクターUI */
.session-selector-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  border: 1px solid #edf2f7;
}
.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
  margin-top: 15px;
}
.session-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.session-btn:hover {
  border-color: #4a90e2;
  background: #ebf8ff;
  transform: translateY(-2px);
}
.session-btn.active {
  border-color: #3182ce;
  background: #ebf8ff;
  box-shadow: 0 0 0 2px rgba(49,130,206,0.2);
}
.session-name {
  font-weight: bold;
  font-size: 1.05rem;
  color: #2d3748;
}
.session-meta {
  font-size: 0.82rem;
  color: #718096;
}

/* ブックマークアイコン & トグル */
.quiz-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.bookmark-toggle-btn {
  background: none;
  border: 1px solid #e2e8f0;
  color: #a0aec0;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  transition: all 0.2s;
}
.bookmark-toggle-btn:hover {
  color: #d69e2e;
  border-color: #d69e2e;
  background: #fffff0;
}
.bookmark-toggle-btn.is-bookmarked {
  color: #d69e2e;
  background: #fefcbf;
  border-color: #ecc94b;
  font-weight: bold;
}

/* 練習問題・トレーニング・ブックマーク切り替えタブ */
.mode-switch-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.mode-switch-btn {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: white;
  color: #4a5568;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin: 0;
}
.mode-switch-btn:hover {
  border-color: #4a90e2;
  color: #3182ce;
}
.mode-switch-btn.active {
  background: #3182ce;
  color: white;
  border-color: #3182ce;
}

/* 正答率・学習進捗バー */
.progress-card {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}
.progress-bar-bg {
  flex: 1;
  min-width: 180px;
  height: 12px;
  background: #edf2f7;
  border-radius: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: #48bb78;
  width: 0%;
  transition: width 0.3s ease;
}

/* 6大分野バッジ (FP) */
.badge-cat-life { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }
.badge-cat-risk { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.badge-cat-finance { background: #e6fffa; color: #234e52; border: 1px solid #b2f5ea; }
.badge-cat-tax { background: #fefcbf; color: #744210; border: 1px solid #faf089; }
.badge-cat-realestate { background: #fffaf0; color: #9c4221; border: 1px solid #feebc8; }
.badge-cat-inheritance { background: #faf5ff; color: #553c9a; border: 1px solid #e9d8fd; }

/* 簿記 14分野バッジ */
.badge-cat-cash { background: #f0fff4; color: #22543d; border: 1px solid #9ae6b4; }
.badge-cat-trade { background: #fff5f5; color: #742a2a; border: 1px solid #feb2b2; }
.badge-cat-bad-debt { background: #fffff0; color: #744210; border: 1px solid #f6e05e; }
.badge-cat-loan { background: #ebf8ff; color: #2a4365; border: 1px solid #90cdf4; }
.badge-cat-fixed { background: #faf5ff; color: #44337a; border: 1px solid #d6bcfa; }
.badge-cat-supplies { background: #fffaf0; color: #7b341e; border: 1px solid #fbd38d; }
.badge-cat-travel { background: #e6fffa; color: #234e52; border: 1px solid #81e6d9; }
.badge-cat-real-estate { background: #fffff0; color: #5f370e; border: 1px solid #ecc94b; }
.badge-cat-salary { background: #edf2f7; color: #2d3748; border: 1px solid #cbd5e0; }
.badge-cat-selling-expenses { background: #fff5f7; color: #702459; border: 1px solid #fbb6ce; }
.badge-cat-voucher { background: #ebf8ff; color: #1a365d; border: 1px solid #bee3f8; }
.badge-cat-settlement { background: #e6fffa; color: #1d4044; border: 1px solid #4fd1c5; }
.badge-cat-capital { background: #fffaf0; color: #652b19; border: 1px solid #f6ad55; }

.category-filter-card {
  background: white;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  border: 1px solid #edf2f7;
}
.category-filter-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cat-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #cbd5e0;
  background: #f7fafc;
  color: #4a5568;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0;
}
.cat-filter-btn:hover {
  border-color: #3182ce;
  color: #3182ce;
}
.cat-filter-btn.active {
  background: #3182ce;
  color: white;
  border-color: #3182ce;
}

/* 分野・問題数選択ウィザードUI */
.wizard-step-card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 25px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border: 1px solid #edf2f7;
}
.wizard-step-card h2 {
  text-align: left;
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.35rem;
  color: #2d3748;
}
.wizard-desc {
  font-size: 0.92rem;
  color: #718096;
  margin-bottom: 20px;
}
.category-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.category-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s;
  font-weight: 600;
  color: #4a5568;
  font-size: 0.95rem;
}
.category-check-item:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.category-check-item.selected {
  border-color: #9bb5a8;
  background: #f4f8f5;
  color: #2d3748;
}
.category-check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #345d4d;
  cursor: pointer;
}

/* 問題数ボタングリッド */
.count-button-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.count-btn {
  flex: 1;
  min-width: 90px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #cbd5e0;
  background: #fff;
  color: #2d3748;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  margin: 0;
}
.count-btn:hover {
  border-color: #3182ce;
  color: #3182ce;
  background: #f7fafc;
}
.count-btn.selected {
  border-color: #3182ce;
  background: #3182ce;
  color: white;
}

.start-quiz-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 8px;
  background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.start-quiz-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2b6cb0 0%, #2c5282 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(49, 130, 206, 0.45);
}
.start-quiz-btn:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 1問ずつ集中演習モード (1画面1問UI) */
.single-question-container {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.single-quiz-card {
  background: white;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid #edf2f7;
  display: flex;
  flex-direction: column;
}
.single-quiz-card.hidden {
  display: none !important;
}
.single-quiz-card .quiz-question-text {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #1a202c;
  margin: 15px 0 25px 0;
}
.single-quiz-card .quiz-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.single-quiz-card .quiz-option {
  padding: 18px 20px;
  font-size: 1.1rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  background: #f8fafc;
}
.single-quiz-card .quiz-option:hover:not(.locked) {
  border-color: #3182ce;
  background: #ebf8ff;
  transform: translateY(-1px);
}
.single-quiz-card .quiz-option.correct-choice {
  border-color: #38a169 !important;
  background: #f0fff4 !important;
  color: #22543d !important;
  font-weight: bold;
}
.single-quiz-card .quiz-option.wrong-choice {
  border-color: #e53e3e !important;
  background: #fff5f5 !important;
  color: #742a2a !important;
  font-weight: bold;
}
.single-quiz-card .quiz-explanation-area {
  margin-top: 25px;
  padding: 24px;
  border-radius: 14px;
  font-size: 1.05rem;
  animation: fadeIn 0.25s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.next-question-bar {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end;
}
.next-question-btn {
  padding: 14px 32px;
  font-size: 1.15rem;
  font-weight: bold;
  border-radius: 10px;
  background: #3182ce;
  color: white;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(49,130,206,0.3);
  margin: 0;
}
.next-question-btn:hover {
  background: #2b6cb0;
  transform: translateY(-1px);
}

/* 練習問題・演習画面のプリントアウトボタン用スタイル */
.print-quiz-btn {
  padding: 16px;
  font-size: 1.15rem;
  font-weight: bold;
  border-radius: 8px;
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%) !important;
  color: white !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3) !important;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.print-quiz-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2f855a 0%, #276749 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(56, 161, 105, 0.45) !important;
}
.print-quiz-btn:disabled {
  background: #cbd5e0 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}
