﻿/* ==============================
   基本
============================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        sans-serif;

    background: #f5f6f8;
    color: #333;
}


/* ==============================
   アプリ全体
============================== */

.app {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 50px;
}


/* ==============================
   ヘッダー
============================== */

.appHeader {
    text-align: center;
    margin-bottom: 40px;
}

.appHeader h1 {
    margin: 0 0 10px;
    font-size: 32px;
}

.appHeader p {
    margin: 0;
    font-size: 16px;
    color: #666;
}


/* ==============================
   学習セクション
============================== */

.studySection {
    margin-bottom: 40px;
}

.studySection h2 {
    margin: 0 0 18px;
    padding-left: 12px;

    font-size: 22px;

    border-left: 6px solid #555;
}


/* ==============================
   メニュー
============================== */

.menuGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}


/* ==============================
   メニューカード
============================== */

.menuCard {
    width: 100%;

    padding: 24px 20px;

    border: 1px solid #d8d8d8;
    border-radius: 12px;

    background: #fff;

    text-align: left;
    cursor: pointer;

    transition:
        transform 0.15s,
        box-shadow 0.15s;
}

.menuCard:hover {
    transform: translateY(-2px);

    box-shadow:
        0 4px 12px
        rgba(0, 0, 0, 0.08);
}


/* ==============================
   カード内文字
============================== */

.menuTitle {
    display: block;

    margin-bottom: 8px;

    font-size: 21px;
    font-weight: bold;
}

.menuText {
    display: block;

    font-size: 15px;
    line-height: 1.6;

    color: #666;
}


/* ==============================
   スマホ
============================== */

@media (max-width: 650px) {

    .app {
        padding: 22px 14px 40px;
    }

    .appHeader {
        margin-bottom: 30px;
    }

    .appHeader h1 {
        font-size: 25px;
    }

    .appHeader p {
        font-size: 14px;
    }

    .studySection h2 {
        font-size: 19px;
    }

    .menuGrid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .menuCard {
        padding: 20px 16px;
    }

    .menuTitle {
        font-size: 19px;
    }

    .menuText {
        font-size: 14px;
    }

}


/* ==============================
   要点画面
============================== */

.summaryScreen {
    max-width: 760px;
    margin: 0 auto;
}

.backButton {
    margin-bottom: 20px;

    padding: 10px 16px;

    border: 1px solid #ccc;
    border-radius: 8px;

    background: #fff;

    font-size: 15px;
    cursor: pointer;
}


.summaryCard {
    padding: 30px;

    background: #fff;

    border: 1px solid #ddd;
    border-radius: 14px;
}


.summaryLabel {
    display: inline-block;

    margin-bottom: 10px;

    padding: 5px 12px;

    border-radius: 20px;

    background: #eee;

    font-size: 14px;
    font-weight: bold;
}


.summaryCard h2 {
    margin: 0 0 22px;

    font-size: 28px;
}


.summaryLead {
    margin-bottom: 26px;

    font-size: 18px;
    line-height: 1.8;
}


.summaryExamples {
    margin-bottom: 28px;

    padding: 20px;

    background: #f7f7f7;

    border-radius: 10px;

    font-size: 20px;
    line-height: 2;
}


.summaryExamples span {
    display: inline-block;

    margin: 0 12px;
}


/* ==============================
   要点・覚えるポイント
============================== */

.summaryPoint {
    margin-bottom: 30px;
    padding: 20px 22px;

    background: #fafafa;

    border: 1px solid #dce4ea;
    border-left: 5px solid #8fa9bd;
    border-radius: 12px;
}


/* 要点全体の見出し */

.summaryPoint > h3 {
    display: inline-block;

    margin: 0 0 18px;
    padding: 8px 14px;

    background: #ffffff;

    border: 2px solid #8fa9bd;
    border-radius: 8px;

    font-size: 21px;
    color: #384a59;
}

/* チェック項目 */

.summaryCheck {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin: 10px 0;
    padding: 12px 14px;

    background: #f5f7f9;

    border: 1px solid #d8e0e6;
    border-radius: 9px;

    font-size: 16px;
    line-height: 1.7;

    cursor: pointer;
}

.summaryCheck span {
    flex: 1;
}


/* ①・②の間を区切る */

.summaryCheck + .summaryCheck {
    border-top: 1px solid #e3e8ec;
}


/* ①・②の見出し */

.summaryCheck strong {
    display: inline-block;

    margin-bottom: 4px;

    font-size: 19px;
    color: #384a59;
}


/* チェックボックス */

.summaryCheck input {
    flex-shrink: 0;

    width: 20px;
    height: 20px;

    cursor: pointer;
}


/* ==============================
   覚えるポイント
============================== */

.rememberPoint {
    margin-top: 16px;
    padding: 16px 18px;

    background: #fff8df;

    border: 1px solid #eadba3;
    border-left: 5px solid #d6aa35;
    border-radius: 9px;
}

.rememberPoint span {
    font-size: 17px;
    font-weight: bold;
    color: #5f521f;
}


.startButton {
    width: 100%;

    padding: 8px 12px;

    border: none;
    border-radius: 8px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}

.startButton:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.synonymGroupButtons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.synonymGroupButton {
    margin: 0;
}


/* ==============================
   同義語・類義語
   一覧
============================== */

.synonymList {
    column-count: 2;
    column-gap: 28px;

    margin-bottom: 24px;
}

.synonymListItem {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: 8px;

    padding: 5px 0;

    break-inside: avoid;
}

.synonymListItem .importantMark {
    grid-column: 1;

    font-size: 14px;
    font-weight: bold;
}

.synonymListItem strong {
    grid-column: 2;

    font-size: 18px;
}

/* ==============================
   要点画面 スマホ
============================== */

@media (max-width: 650px) {

    .summaryCard {
        padding: 22px 18px;
    }

    .summaryCard h2 {
        font-size: 23px;
    }

    .summaryLead {
        font-size: 16px;
    }

    .summaryExamples {
        font-size: 18px;
    }

    .synonymList {
        column-count: 1;
    }

    /* ①・②ボタンはスマホでは縦に並べる */
    .synonymGroupButtons {
        grid-template-columns: 1fr;
        gap: 10px;
    }

}

/* ==============================
   問題画面
============================== */

.questionScreen {
    max-width: 760px;
    margin: 0 auto;
}

.questionCard {
    padding: 30px;

    background: #fff;

    border: 1px solid #ddd;
    border-radius: 14px;
}

.questionHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 14px;
}

.questionCategory {
    font-size: 16px;
    font-weight: bold;
}

.questionNumber {
    font-size: 15px;
    color: #666;
}

.importantLabel {
    display: inline-block;

    margin-bottom: 22px;

    font-size: 14px;
    font-weight: bold;
}

.questionInstruction {
    margin: 0 0 18px;

    font-size: 17px;
}

.questionWord {
    margin-bottom: 28px;

    text-align: center;

    font-size: 34px;
    font-weight: bold;
}

.choiceList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.choiceButton {
    padding: 18px;

    border: 1px solid #ccc;
    border-radius: 10px;

    background: #fff;

    font-size: 19px;

    cursor: pointer;
}

.choiceButton:hover {
    background: #f5f5f5;
}


/* ==============================
   問題画面 スマホ
============================== */

@media (max-width: 650px) {

    .questionCard {
        padding: 22px 18px;
    }

    .questionWord {
        font-size: 29px;
    }

    .choiceList {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .choiceButton {
        padding: 15px;
        font-size: 18px;
    }

}


/* ==============================
   解答・解説画面
============================== */

.answerScreen {
    max-width: 760px;
    margin: 0 auto;
}

.answerCard {
    padding: 30px;

    background: #fff;

    border: 1px solid #ddd;
    border-radius: 14px;
}

.answerResult {
    margin-bottom: 12px;

    font-size: 26px;
    font-weight: bold;
}

.answerResult.correctResult {
    color: #2f6f4e;
}

.answerResult.wrongResult {
    color: #a94442;
}

.answerSelected {
    margin-bottom: 22px;

    font-size: 16px;
}

.correctAnswer {
    margin-bottom: 28px;
    padding: 16px;

    border-radius: 10px;
    background: #f5f5f5;

    font-size: 21px;
}

.correctLabel {
    display: inline-block;

    margin-right: 12px;

    font-size: 14px;
    font-weight: bold;
}

.wordExplanation,
.choiceExplanation,
.answerPoint {
    margin-bottom: 18px;
    padding: 18px;

    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.wordExplanation h3,
.choiceExplanation h3,
.answerPoint h3 {
    margin: 0 0 8px;

    font-size: 19px;
}

.wordExplanation p,
.choiceExplanation p,
.answerPoint p {
    margin: 6px 0;

    line-height: 1.7;
}

.correctChoice {
    background: #f7f7f7;
}

.exampleSentence {
    margin-top: 8px;

    font-size: 15px;
    color: #666;
}

.wrongReason {
    margin-top: 10px !important;

    color: #a94442;
    font-weight: bold;
}

.nextButton {
    width: 100%;

    margin-top: 10px;
    padding: 16px;

    border: none;
    border-radius: 10px;

    font-size: 18px;
    font-weight: bold;

    cursor: pointer;
}

.kanjiMeaning {
    margin: 0 0 8px;

    line-height: 1.7;
}

.wordMeaning {
    margin: 0 0 8px;

    font-weight: bold;
    line-height: 1.7;
}

.answerPoint {
    background: #f7f7f7;
}

/* ==============================
   解答・解説画面 スマホ
============================== */

@media (max-width: 650px) {

    .answerCard {
        padding: 22px 18px;
    }

    .answerResult {
        font-size: 23px;
    }

    .correctAnswer {
        font-size: 19px;
    }

    .wordExplanation,
    .choiceExplanation,
    .answerPoint {
        padding: 15px;
    }

}


/* ==============================
   正解ペア
============================== */

.correctPair {
    margin-bottom: 24px;
    padding: 20px;

    background: #f0f8f2;

    border: 1px solid #d2e5d7;
    border-radius: 10px;
}

.correctPairTitle {
    margin-bottom: 18px;

    font-size: 21px;
}

.correctWord + .correctWord {
    margin-top: 18px;
    padding-top: 18px;

    border-top: 1px solid #e5e5e5;
}

.correctWord h3 {
    margin: 0 0 6px;

    font-size: 19px;
}

.correctWord p {
    margin: 0;

    line-height: 1.7;
}


/* ==============================
   不正解の選択肢
============================== */

.wrongChoices {
    margin-bottom: 24px;
    padding: 20px;

    border: 1px solid #ddd;
    border-radius: 10px;

    background: #f7f7f7;
}

.wrongChoicesTitle {
    margin: 0 0 16px;

    font-size: 18px;
}

.wrongChoiceItem {
    padding: 14px 0;
}

.wrongChoiceItem + .wrongChoiceItem {
    border-top: 1px solid #ddd;
}

.wrongChoiceItem h4 {
    margin: 0 0 6px;

    font-size: 18px;
}

.wrongChoiceItem p {
    margin: 5px 0;

    line-height: 1.7;
}


/* ==============================
   同義語・類義語
   グループ② 共通する字
============================== */

.commonKanjiMark {
    color: #d35400;
    font-weight: bold;
}

.synonymPatternHint {
    margin-top: 8px;
    font-size: 15px;
}

.synonymPatternPair {
    margin-top: 6px;
}

/* ==============================
   対義語
   グループ② 対になる字
============================== */

.oppositeKanjiMark {
    color: #d35400;
    font-weight: bold;
}


/* ==============================
   同義語・類義語
   グループ② 問題
============================== */

.synonymKanjiQuestion {
    margin: 28px 0;
    font-size: 34px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.08em;
}

.synonymEqual {
    display: inline-block;
    margin: 0 18px;
}

.kanjiBlank {
    display: inline-block;
    font-size: 50px;
    line-height: 1;
}

/* ==============================
   グループ② 問題画面 スマホ
============================== */

@media (max-width: 650px) {

    .synonymKanjiQuestion {
        font-size: 29px;
    }

}

/* ==============================
   同音異義語・問題文
============================== */

.questionWord.homophoneSentence {
    font-size: 24px;
    line-height: 1.8;
}

@media (max-width: 650px) {

    .questionWord.homophoneSentence {
        font-size: 21px;
    }

}

/* 同音異義語・間違えたときに選んだ語 */

.homophoneWrongWord {
    color: #b42318;
}


/* ==============================
   同音異義語・学習一覧
============================== */

.homophoneList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px 20px;
    margin-bottom: 24px;
}

.homophoneListItem {
    min-width: 0;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
}

.homophoneListHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.homophoneListReading {
    font-size: 15px;
    color: #555;
}

.homophoneListWords {
    display: block;
    font-size: 18px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.homophoneLearnedLabel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    white-space: nowrap;
    cursor: pointer;
}

.homophoneLearnedCheck {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.homophoneLearnedItem {
    border-color: #8ab99a;
    background: #f3faf5;
}

.homophoneListItem > .importantMark {
    display: block;
    margin-top: 5px;
    font-size: 14px;
}

.homophoneReview {
    margin-top: 10px;
}

.homophoneReview > summary {
    padding: 6px 0;
    font-size: 15px;
    cursor: pointer;
}

.homophoneReview .correctWord h3 {
    font-size: 18px;
    line-height: 1.8;
}

@media (max-width: 650px) {

    .homophoneList {
        grid-template-columns: minmax(0, 1fr);
    }

}


/* 同音異義語・練習設定と覚えたチェック */

.homophonePracticeOption {
    margin: 20px 0;
}


/* ==============================
   同訓異字・問題と解説
============================== */

.questionWord.kunSentence {
    font-size: 24px;
    line-height: 1.8;
}

.kunReadingHint {
    margin-top: 10px;
    font-size: 18px;
    font-weight: normal;
}

.kunWrongWord {
    color: #b42318;
}

@media (max-width: 650px) {

    .questionWord.kunSentence {
        font-size: 21px;
    }

}


/* ==============================
   同音異義語・同訓異字
   コンパクトな一覧
============================== */

.vocabCompactList {
    column-count: 2;
    column-gap: 28px;
    margin-bottom: 24px;
}

.vocabCompactItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 7px 0;
    break-inside: avoid;
}

.vocabCompactWords {
    min-width: 0;
    font-size: 18px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.vocabCompactControls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.vocabReviewButton {
    padding: 4px 10px;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.vocabReviewButton:hover {
    background: #f2f2f2;
}

.vocabPracticeButtons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.vocabPracticeButtons .startButton {
    width: 100%;
    margin: 0;
}

@media (max-width: 650px) {

    .vocabCompactList {
        column-count: 1;
    }

    .vocabPracticeButtons {
        grid-template-columns: 1fr;
    }

}


/* ==============================
   同訓異字
   中級問題の選択肢
============================== */

.kunIntermediateChoiceButton {
    display: grid;
    grid-template-columns: 2em 1fr;
    column-gap: 0.4em;
    align-items: start;

    width: 100%;
    text-align: left;
}

.kunIntermediateChoiceLabel {
    text-align: left;
    white-space: nowrap;
}

.kunIntermediateChoiceText {
    min-width: 0;
    text-align: left;
    line-height: 1.7;
}


/* ==============================
   同訓異字
   中級問題・正解文
============================== */

.kunIntermediateCorrectSentence {
    font-size: 1.15em;
}


/* ==============================
   同訓異字
   中級問題・誤答説明の下余白
============================== */

.kunIntermediateWrongBlock {
    margin-bottom: 28px;
}


/* ==============================
   正解の枠内のポイント
============================== */

.correctPair .answerPoint,
.correctPair .summaryPoint {
    margin: 20px 0 0;
    padding: 16px 0 0;

    background: transparent;

    border: none;
    border-top: 1px solid #d2e5d7;
    border-radius: 0;
}

.correctPair .answerPoint h3,
.correctPair .summaryPoint h3 {
    margin: 0 0 8px;

    font-size: 19px;
    font-weight: bold;
}

.correctPair .answerPoint p,
.correctPair .summaryPoint p {
    margin: 6px 0 0;

    line-height: 1.7;
}


/* ==============================
   解答画面の文字サイズを統一
============================== */

/* 説明文 */
.answerCard {
    font-size: 16px;
    line-height: 1.7;
}

/* あなたの答え */
.answerCard .answerSelected {
    font-size: 16px;
}

/* 正解の見出し */
.answerCard .correctPairTitle {
    font-size: 21px;
    font-weight: bold;
}

/* 言葉と読み・ポイントの見出し */
.answerCard .correctWord h3,
.answerCard .synonymWordDetail h3,
.answerCard .answerPoint h3,
.answerCard .summaryPoint h3 {
    font-size: 19px;
    font-weight: bold;
}

/* 漢字の意味・語義・ポイント */
.answerCard .kanjiMeaning,
.answerCard .wordMeaning,
.answerCard .answerPoint p,
.answerCard .summaryPoint p {
    font-size: 16px;
    line-height: 1.7;
}

/* 補足の例文 */
.answerCard .exampleSentence {
    font-size: 16px;
    line-height: 1.7;
}

/* 同音異義語・同訓異字の正解文 */
.answerCard .correctPair > .exampleSentence {
    margin-bottom: 18px;

    font-size: 19px;
    line-height: 1.8;
    color: #222;
}

/* 正解文の中の答え */
.answerCard .correctPair > .exampleSentence strong {
    font-weight: bold;
}


/* 書き取り①・復習ボタン */
#kunWritingReviewButton {
    display: block;
    width: 100%;
    margin: 14px 0 0;
}

/* ==============================
   同音異義語・文章訂正問題
   ============================== */

.homophoneCorrectionPassage {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #f8fafc;
    color: #222;
    font-size: 20px;
    font-weight: normal;
    line-height: 2;
    text-align: left;
    overflow-wrap: anywhere;
}

.homophoneCorrectionPassage mark {
    padding: 0 2px;
    background: #fff0aa;
    color: #222;
    font-weight: bold;
}

.homophoneCorrectionItem {
    margin-top: 16px;
}

@media (max-width: 650px) {

    .homophoneCorrectionPassage {
        padding: 14px;
        font-size: 18px;
        line-height: 1.9;
    }

}


/* ========================================
   デザイン調整
   落ち着いて読みやすい学習画面
======================================== */

/* 基本の色 */
:root {
    --main-blue: #486b8a;
    --main-blue-dark: #35546f;

    --soft-blue: #eef5fa;
    --soft-green: #eef7f0;
    --soft-yellow: #fff8df;
    --soft-orange: #fff2df;

    --border-light: #d9e1e8;

    --text-main: #2f3740;
    --text-sub: #66727d;
}


/* ==============================
   全体
============================== */

body {
    background: #f4f7f9;
    color: var(--text-main);
}


/* ==============================
   トップ見出し
============================== */

.appHeader h1 {
    color: var(--main-blue-dark);
}

.appHeader p {
    color: var(--text-sub);
}


/* ==============================
   分野見出し
============================== */

.studySection h2 {
    border-left-color: var(--main-blue);
    color: var(--main-blue-dark);
}


/* ==============================
   トップメニュー
============================== */

.menuCard {
    border-color: var(--border-light);

    box-shadow:
        0 2px 8px
        rgba(50, 70, 90, 0.05);
}

.menuCard:hover {
    border-color: #b7c9d8;

    background: #fbfdff;

    box-shadow:
        0 6px 16px
        rgba(50, 70, 90, 0.10);
}

.menuTitle {
    color: var(--main-blue-dark);
}

.menuText {
    color: var(--text-sub);
}


/* ==============================
   要点・学習カード
============================== */

.summaryCard {
    border-color: var(--border-light);

    box-shadow:
        0 3px 12px
        rgba(50, 70, 90, 0.06);
}

.summaryLabel {
    background: var(--soft-blue);
    color: var(--main-blue-dark);
}



/* ==============================
   覚え方・学習ポイント
============================== */

.groupLearningPoint {
    margin: 18px 0;
    padding: 8px 12px;

    background: #fff8df;

    border: 1px solid #eadba3;
    border-left: 5px solid #d6aa35;
    border-radius: 10px;
}

.groupLearningPoint h3 {
    margin-top: 0;

    color: #5f521f;
}

.groupLearningPoint p {
    margin: 6px 0;
    font-size: 18px;
    line-height: 1.6;
}

/* ==============================
   ★重要
============================== */

.importantMark,
.importantLabel {
    color: #a45b16;
    font-weight: bold;
}


/* ==============================
   基本ボタン
============================== */

.startButton,
.nextButton {
    background: var(--main-blue);
    color: #fff;

    transition:
        background 0.15s,
        transform 0.15s,
        box-shadow 0.15s;
}

.startButton:hover:not(:disabled),
.nextButton:hover {
    background: var(--main-blue-dark);

    box-shadow:
        0 4px 10px
        rgba(50, 70, 90, 0.15);
}

.startButton:active:not(:disabled),
.nextButton:active {
    transform: translateY(1px);
}


/* ==============================
   戻るボタン
============================== */

.backButton {
    color: #4d6375;

    border-color: #cbd6df;
}

.backButton:hover {
    background: var(--soft-blue);
}


/* ==============================
   やり方
============================== */

.groupHowTo {
    margin: 18px 0;
    padding: 8px 12px;

    background: #f5f7f9;

    border: 1px solid #d8e0e6;
    border-left: 5px solid #8fa9bd;
    border-radius: 10px;
}

.groupHowTo h3 {
    margin-top: 0;
    color: #384a59;
}

.groupHowTo p {
    margin: 6px 0;
    font-size: 18px;
    line-height: 1.6;
}


/* ==============================
   問題画面
============================== */

.questionCard {
    border-color: var(--border-light);

    box-shadow:
        0 3px 12px
        rgba(50, 70, 90, 0.06);
}

.questionCategory {
    color: var(--main-blue-dark);
}

.questionNumber {
    color: var(--text-sub);
}


/* ==============================
   選択肢
============================== */

.choiceButton {
    border-color: #cfd9e1;
}

.choiceButton:hover {
    background: var(--soft-blue);
    border-color: #a9bfd0;
}


.questionCard .nextButton,
.answerCard .nextButton,
.questionCard .startButton,
.answerCard .startButton {
    width: 70%;
    max-width: 420px;

    padding: 9px 14px;

    margin-left: auto;
    margin-right: auto;

    display: block;
}


/* ==============================
   例
============================== */

.groupExample {
    margin: 18px 0;
    padding: 8px 12px;

    background: #f5f7f9;

    border: 1px solid #d8e0e6;
    border-left: 5px solid #8fa9bd;
    border-radius: 10px;
}

.groupExample h3 {
    margin-top: 0;
    color: #384a59;
}

.groupExample p {
    margin: 6px 0;
    font-size: 18px;
    line-height: 1.6;
}


/* ==============================
   解答画面
============================== */

.answerCard {
    border-color: var(--border-light);

    box-shadow:
        0 3px 12px
        rgba(50, 70, 90, 0.06);
}


/* 正解 */
.correctPair {
    background: var(--soft-green);

    border-color: #c7dfcd;
}


/* 解答画面のポイント */
.answerPoint {
    background: var(--soft-yellow);
    border-color: #eadba3;
}


/* ==============================
   スマホ
============================== */

@media (max-width: 650px) {

    .groupLearningPoint,
    .summaryPoint {
        padding: 15px 16px;
    }

}


.groupLearningPoint p {
    font-size: 16px;
}





/* ==============================
   同義語・類義語／対義語
   共通の要点画面
============================== */

.vocabSummaryScreen {
    max-width: 860px;
    margin: 0 auto;
}

.vocabSummaryScreen .summaryCard {
    padding: 28px 32px;
    background: #fff;
    border: 1px solid #d9e1e8;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(50, 70, 90, 0.06);
}

.vocabSummaryScreen .summaryLabel {
    margin-bottom: 12px;
    background: #eef5fa;
    color: #35546f;
}

.vocabSummaryScreen .summaryCard h2 {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.4;
    color: #35546f;
}

.vocabSummaryScreen .summaryLead {
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 1.8;
}

/* 二つのグループをまとめる部分 */

.vocabSummaryScreen .summaryPoint {
    margin: 0 0 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.vocabSummaryScreen .summaryPoint > h3 {
    display: block;
    margin: 0 0 14px;
    padding: 0 0 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #d9e1e8;
    border-radius: 0;
    font-size: 20px;
    line-height: 1.5;
    color: #35546f;
}

/* 確認する項目 */

.vocabSummaryScreen .summaryCheck {
    gap: 16px;
    margin: 0 0 12px;
    padding: 16px 18px;
    background: #f5f8fa;
    border: 1px solid #d9e1e8;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.8;
}

.vocabSummaryScreen .summaryCheck span {
    min-width: 0;
}

.vocabSummaryScreen .summaryCheck strong {
    margin-bottom: 5px;
    font-size: 18px;
    line-height: 1.6;
    color: #35546f;
}

.vocabSummaryScreen .pointCheck {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #486b8a;
}

/* 覚えるポイント */

.vocabSummaryScreen .rememberPoint {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;

    margin: 16px 0 0;

    background: #fffbc7;

    border: 1px solid #e6d95c;
    border-left: 5px solid #d4bd20;
}

.vocabSummaryScreen .rememberPoint span {
    font-size: 16px;
    color: #514b20;
}

/* ①・②へ進むボタン */

.vocabSummaryScreen .synonymGroupButtons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.vocabSummaryScreen .synonymGroupButton {
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.6;
}

.vocabSummaryScreen button:focus-visible,
.vocabSummaryScreen input:focus-visible {
    outline: 3px solid #35546f;
    outline-offset: 3px;
}

/* スマホ */

@media (max-width: 650px) {

    .vocabSummaryScreen .summaryCard {
        padding: 22px 18px;
    }

    .vocabSummaryScreen .summaryCard h2 {
        font-size: 24px;
    }

    .vocabSummaryScreen .summaryLead {
        font-size: 16px;
    }

    .vocabSummaryScreen .summaryPoint > h3 {
        font-size: 18px;
    }

    .vocabSummaryScreen .summaryCheck {
        gap: 12px;
        padding: 14px 12px;
    }

    .vocabSummaryScreen .summaryCheck strong {
        font-size: 17px;
    }

    .vocabSummaryScreen .synonymGroupButtons {
        grid-template-columns: 1fr;
    }

}

/* ==============================
   同義語・類義語
   覚え方
============================== */

.synonymMemory {
    margin: 20px 0;
    padding: 16px 18px;

    background: #fff0f0;

    border: 1px solid #efcaca;
    border-left: 5px solid #ed8585;
    border-radius: 10px;

    box-shadow:
        0 4px 10px
        rgba(150, 65, 65, 0.18);
}

.synonymMemory h3 {
    margin: 0 0 8px;

    font-size: 19px;
    color: #874343;
}

.synonymMemory p {
    margin: 0;

    font-size: 16px;
    line-height: 1.8;
    color: #493b3b;
}

/* 応用・答えるときの決まり */

.synonymWritingGuide {
    margin: 18px 0 24px;
    font-size: 16px;
    line-height: 1.8;
}

.synonymWritingGuide p {
    margin: 8px 0;
}

/* ==============================
   同義語・類義語
   中級・読みのヒント
============================== */

.synonymReadingHint {
    margin: 28px 0 24px;
    padding: 16px 18px;

    background: #eef7fc;

    border: 1px solid #c6dfea;
    border-radius: 10px;

    box-shadow: none;
}

.synonymReadingHint h3 {
    margin: 0 0 8px;

    font-size: 19px;
    color: #35546f;
}

/* 同音異義語・中級と応用の問題文 */

.questionWord.homophoneWritingSentence {
    font-size: 22px;
}

@media (max-width: 650px) {

    .questionWord.homophoneWritingSentence {
        font-size: 20px;
    }

}

/* ==============================
   同訓異字・応用
   漢字・例文・選択欄
============================== */

/* 上に並ぶ漢字 */

.kunMixedChoiceBank {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
}

.kunMixedChoiceKanji {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;

    font-size: 28px;
    font-weight: bold;

    background: #eef7fc;
    border: 1px solid #c6dfea;
    border-radius: 8px;
}

/* 問題を一つずつ並べる */

.kunMixedQuestionRow {
    display: grid;
    grid-template-columns: 1.5em minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;

    margin: 22px 0;
    font-size: 22px;
}

.kunMixedSentence {
    min-width: 0;
    font-size: 22px;
    line-height: 1.8;
}

/* 空欄 */

.kunMixedBlank {
    display: inline-block;
    font-size: 1.8em;
    line-height: 1;
    vertical-align: baseline;
    margin: 0 0.1em;
    text-align: center;
}

/* 選ぶ漢字 */

.kunMixedSelect {
    min-width: 96px;
    padding: 8px 10px;

    font-family: inherit;
    font-size: 24px;

    color: #333;
    background: #fff;
    border: 1px solid #bccbd6;
    border-radius: 8px;
}

/* スマホでは選択欄を文の下に置く */

@media (max-width: 650px) {

    .kunMixedQuestionRow {
        grid-template-columns: 1.5em minmax(0, 1fr);
        font-size: 20px;
    }

    .kunMixedSentence {
        font-size: 20px;
    }

    .kunMixedSelect {
        grid-column: 2;
        justify-self: start;
    }

}

/* ==============================
   同訓異字・応用の解答
============================== */

.kunMixedAnswerList {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin: 24px 0;
}

.kunMixedAnswerItem {
    min-width: 0;
    margin: 0;
    padding: 20px;

    border: 1px solid #d9e1e8;
    border-radius: 10px;
}

/* 正解は薄い緑 */

.kunMixedAnswerCorrect {
    background: #eef7f0;
    border-color: #c7dfcd;
}

/* 間違いは白 */

.kunMixedAnswerWrong {
    background: #fff;
    border-color: #d9e1e8;
}

/* 問題番号と正誤 */

.kunMixedAnswerTitle {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;

    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.5;
}

/* あなたの答え */

.kunMixedSelected {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

/* 正しい漢字 */

.kunMixedCorrectKanji {
    margin: 0 0 4px;
    font-size: 19px;
    line-height: 1.7;
}

/* 完成した文 */

.kunMixedCompletedSentence {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}


/* ==============================
   四字熟語
   問題の空欄
============================== */

.fourCharacterBlank {
    display: inline-block;
    font-size: 1.8em;
    line-height: 1;
    vertical-align: baseline;
    margin: 0 0.1em;
}


/* ==============================
   四字熟語
   説明文の空欄
============================== */

.fourCharacterInlineBlank {
    display: inline-block;
    font-size: 1.25em;
    line-height: 1;
    vertical-align: 0.08em;
}


/* ==============================
   四字熟語・中級
   開始画面のボタン配置
============================== */

.fourCharacterIntermediateMenuCard .vocabPracticeButtons {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;

    margin-top: 16px;
    margin-bottom: 20px;
}

.fourCharacterIntermediateMenuCard .vocabPracticeButtons .startButton {
    box-sizing: border-box;

    width: auto;
    max-width: 100%;
    min-width: 0;

    margin: 0;
    padding: 10px 20px;

    line-height: 1.5;
    white-space: normal;
}





/* ==============================
   学習ボタン共通：開始・復習・解答
============================== */
:root {
    --study-button-width: 320px;
    --study-button-gap: 12px;
    --study-button-height: 48px;
}

.startButton,
.nextButton {
    box-sizing: border-box;
    min-height: var(--study-button-height);
    font-size: 16px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* 通常練習：左が続きから、右が初めから */
.summaryCard .unifiedStartButtons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--study-button-gap) !important;
    width: 100%;
    max-width: calc(2 * var(--study-button-width) + var(--study-button-gap)) !important;
    margin: 24px auto 0 !important;
    align-items: stretch;
}

.summaryCard .unifiedStartButtons > .startButton,
.summaryCard .unifiedReviewButtons > .startButton {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    white-space: normal;
}

/* 復習は通常練習の後に独立した一行で表示 */
.summaryCard .unifiedReviewSection {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}

.summaryCard .unifiedReviewButtons {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--study-button-gap) !important;
    max-width: calc(2 * var(--study-button-width) + var(--study-button-gap)) !important;
    margin: 20px auto 0 !important;
}

.summaryCard .unifiedStartButtons > .unifiedReviewButton {
    grid-column: 1 / -1;
    margin-top: 8px !important;
}

.summaryCard .unifiedStandaloneReview {
    display: block;
    width: 100%;
    max-width: calc(2 * var(--study-button-width) + var(--study-button-gap));
    margin: 20px auto 0;
}

/* 問題・解答画面：単独ボタンは中央、二つなら等幅 */
.questionCard .startButton,
.answerCard .startButton,
.questionCard .nextButton,
.answerCard .nextButton {
    width: 100%;
    max-width: var(--study-button-width);
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 12px;
}

:is(.questionCard, .answerCard) .vocabPracticeButtons {
    display: grid;
    gap: var(--study-button-gap);
    max-width: calc(2 * var(--study-button-width) + var(--study-button-gap));
    margin-left: auto;
    margin-right: auto;
}

:is(.questionCard, .answerCard) .vocabPracticeButtons:has(> button:only-child) {
    grid-template-columns: minmax(0, 1fr) !important;
}

:is(.questionCard, .answerCard) .vocabPracticeButtons:has(> button:first-child:nth-last-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

:is(.questionCard, .answerCard) .vocabPracticeButtons > .startButton,
:is(.questionCard, .answerCard) .vocabPracticeButtons > .nextButton {
    width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}


/* ==============================
   共通：問題・解答画面の上部
============================== */
:is(.questionCard, .answerCard, .studyExerciseCard) {
    padding: 30px;
}
.questionHeader {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 16px;
    row-gap: 6px;
    margin: 0 0 20px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border-light, #ddd);
}
.questionCategory {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--main-blue-dark);
    overflow-wrap: anywhere;
}
.questionNumber {
    flex: 0 1 auto;
    margin-left: auto;
    text-align: right;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-sub);
    font-variant-numeric: tabular-nums;
}
.questionInstruction,
.studyExerciseCard > .summaryLead {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.7;
}
@media (max-width: 650px) {
    :is(.questionCard, .answerCard, .studyExerciseCard) {
        padding: 22px 18px;
    }
    .questionHeader {
        column-gap: 10px;
        margin-bottom: 16px;
    }
    .questionNumber { font-size: 14px; }
    .questionInstruction,
    .studyExerciseCard > .summaryLead { font-size: 16px; }
}


/* ==============================
   共通：問題文・指示文・語句の大きさ
   意味・場面／文章／短い語句は別々に管理する
============================== */
:root {
    --study-instruction-size: 17px;
    --study-prompt-size: 19px;
    --study-sentence-size: 22px;
    --study-passage-size: 20px;
    --study-word-size: 34px;
    --study-set-term-size: 28px;
    --study-choice-size: 19px;
    --study-content-gap: 24px;
}
:is(.questionCard, .answerCard, .studyExerciseCard) .questionInstruction,
.studyExerciseCard > .summaryLead {
    margin: 0 0 18px;
    font-size: var(--study-instruction-size);
    line-height: 1.8;
    font-weight: normal;
}
.studyExerciseCard > h2 {
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.5;
}
.studyPromptBox {
    box-sizing: border-box;
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid var(--border-light, #ddd);
    border-radius: 8px;
    background: #fff;
    font-size: var(--study-prompt-size);
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.studyPromptLabel { display: block; font-size: 16px; }
.studyPromptBox > p { margin: 6px 0 0; font-size: inherit; line-height: inherit; }
.questionCard .questionWord,
.questionCard .synonymKanjiQuestion,
.studyTargetWord {
    margin: var(--study-content-gap) 0;
    font-size: var(--study-word-size);
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}
.questionCard .studyFillWord { letter-spacing: 0.12em; }
.questionCard .studySetWord { margin: 0; letter-spacing: 0.12em; }
.questionCard .questionWord:is(.homophoneSentence, .kunSentence),
.questionCard .studyWritingLine,
.questionCard .kunMixedSentence {
    font-size: var(--study-sentence-size);
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.questionCard .studyWritingLine { margin: var(--study-content-gap) 0; }
.questionCard .homophoneCorrectionPassage {
    margin: var(--study-content-gap) 0;
    font-size: var(--study-passage-size);
    line-height: 1.9;
}
.questionCard .kunMixedQuestionRow { font-size: var(--study-sentence-size); }
.studyTargetKanji { font-size: 1.4em; }
.studyTargetWord .studyTargetKanji { font-size: inherit; }
.studySentenceRow {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 var(--study-content-gap);
    font-size: var(--study-passage-size);
    line-height: 1.9;
}
.studySentenceNumber { flex-shrink: 0; font-weight: bold; font-size: inherit; }
.studySentenceText { min-width: 0; margin: 0; font-size: inherit; line-height: inherit; overflow-wrap: anywhere; }
.studySetTerm {
    margin: 18px 0;
    font-size: var(--study-set-term-size);
    line-height: 1.7;
    font-weight: bold;
    overflow-wrap: anywhere;
}
.studyShortTermRow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: var(--study-set-term-size);
    line-height: 1.6;
}
.studySetTermLabel { font-size: var(--study-set-term-size); font-weight: bold; min-width: 0; }
.studyCompoundRow {
    display: grid;
    grid-template-columns: 2em minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    font-size: var(--study-passage-size);
}
.studyCompoundRow > .studySentenceNumber { text-align: right; }
.studyCompoundTerms {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--study-set-term-size);
    line-height: 1.6;
}
.studyCompoundTerms > span { flex-shrink: 0; }
.questionCard .choiceList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.questionCard .choiceButton {
    box-sizing: border-box;
    min-width: 0;
    min-height: 52px;
    padding: 14px 12px;
    font-size: var(--study-choice-size);
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
}
@media (max-width: 650px) {
    :root {
        --study-instruction-size: 16px;
        --study-prompt-size: 18px;
        --study-sentence-size: 20px;
        --study-passage-size: 18px;
        --study-word-size: 29px;
        --study-set-term-size: 24px;
        --study-choice-size: 18px;
        --study-content-gap: 20px;
    }
    .studyExerciseCard > h2 { font-size: 22px; }
    .studyPromptBox { padding: 12px 14px; }
    .studySentenceRow { gap: 8px; }
    .studyCompoundRow { grid-template-columns: 1.6em minmax(0, 1fr); gap: 8px; }
    .studyCompoundTerms { gap: 6px; }
    .questionCard .choiceList { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}


/* ==============================
   共通：解答・読み・意味・例文
   解説欄、図、複数問の構成は既存のまま
============================== */
:root {
    --study-answer-title: 24px;
    --study-answer-term: 20px;
    --study-answer-body: 17px;
    --study-answer-reading: 16px;
    --study-answer-example: 17px;
    --study-answer-sentence: 20px;
    --study-answer-result: 24px;
    --study-answer-padding: 20px;
}
.answerCard {
    font-size: var(--study-answer-body);
    line-height: 1.75;
}
:is(.answerCard, .studyExerciseCard) .answerResult {
    margin: 0 0 12px;
    font-size: var(--study-answer-result);
    line-height: 1.5;
}
:is(.answerCard, .studyExerciseCard) .answerSelected {
    margin-bottom: 18px;
    font-size: var(--study-answer-reading);
    line-height: 1.7;
    overflow-wrap: anywhere;
}
:is(.answerCard, .studyExerciseCard) .correctPair {
    box-sizing: border-box;
    min-width: 0;
    padding: var(--study-answer-padding);
    margin-bottom: 24px;
    overflow-wrap: anywhere;
}
/* 個別セットの背景や図の配置は上書きしない */
:is(.answerCard, .studyExerciseCard) .correctPairTitle {
    margin: 0 0 14px;
    font-size: var(--study-answer-title);
    font-weight: bold;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
:is(.answerCard, .studyExerciseCard) .correctPairTitle:has(> .correctLabel + strong) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 10px;
}
:is(.answerCard, .studyExerciseCard) .correctLabel {
    margin-right: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #355b40;
}
:is(.answerCard, .studyExerciseCard) :is(.correctWord, .synonymWordDetail) {
    min-width: 0;
    overflow-wrap: anywhere;
}
:is(.answerCard, .studyExerciseCard) :is(.correctWord, .synonymWordDetail) h3 {
    margin: 0 0 8px;
    font-size: var(--study-answer-term);
    line-height: 1.6;
}
:is(.answerCard, .studyExerciseCard) :is(.correctWord, .synonymWordDetail) p {
    margin: 0 0 8px;
    line-height: 1.75;
}
:is(.answerCard, .studyExerciseCard) .studyAnswerReading {
    font-size: var(--study-answer-reading);
    font-weight: normal;
    color: #414a51;
}
:is(.answerCard, .studyExerciseCard) .kanjiMeaning,
:is(.answerCard, .studyExerciseCard) .wordMeaning {
    font-size: var(--study-answer-body);
    line-height: 1.75;
}
:is(.answerCard, .studyExerciseCard) .wordMeaning { font-weight: 600; }
:is(.answerCard, .studyExerciseCard) .exampleSentence {
    margin: 8px 0 0;
    font-size: var(--study-answer-example);
    line-height: 1.8;
    color: #414a51;
    overflow-wrap: anywhere;
}
:is(.answerCard, .studyExerciseCard) .correctPair > .exampleSentence,
:is(.answerCard, .studyExerciseCard) .studyCompletedSentence,
:is(.answerCard, .studyExerciseCard) .kunMixedCompletedSentence {
    margin: 10px 0 16px;
    font-size: var(--study-answer-sentence);
    line-height: 1.8;
    color: #222;
}
:is(.answerCard, .studyExerciseCard) .correctWord + .correctWord,
:is(.answerCard, .studyExerciseCard) .synonymWordDetail + .synonymWordDetail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d2e5d7;
}
:is(.answerCard, .studyExerciseCard) .wrongChoiceItem h4 {
    font-size: var(--study-answer-term);
    line-height: 1.6;
}
:is(.answerCard, .studyExerciseCard) .wrongChoiceItem p {
    font-size: var(--study-answer-body);
    line-height: 1.75;
}
:is(.answerCard, .studyExerciseCard) :is(.correctWord, .synonymWordDetail) > :last-child { margin-bottom: 0; }
@media (max-width: 650px) {
    :root {
        --study-answer-title: 21px;
        --study-answer-term: 19px;
        --study-answer-body: 16px;
        --study-answer-reading: 15px;
        --study-answer-example: 16px;
        --study-answer-sentence: 18px;
        --study-answer-result: 22px;
        --study-answer-padding: 16px;
    }
    :is(.answerCard, .studyExerciseCard) .correctPairTitle:has(> .correctLabel + strong) { gap: 8px; }
}

:is(.answerCard, .studyExerciseCard) .correctPairTitle > strong {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
@media (max-width: 360px) {
    :is(.answerCard, .studyExerciseCard) .correctPairTitle:has(> .correctLabel + strong) {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
}

@media (max-width: 650px) {
    .correctPairTitle > strong > .studyAnswerReading { display: block; }
}


/* ==============================
   共通：要点・覚え方・解答のポイント
   正解の中の解説は別枠にせず、区切り線のみ
============================== */
:root {
    --study-point-heading: 19px;
    --study-point-text: 17px;
    --study-point-gap: 18px;
    --study-point-padding: 16px;
    --study-point-yellow: #fff8df;
    --study-point-yellow-border: #eadba3;
    --study-point-yellow-accent: #d6aa35;
    --study-point-yellow-text: #5f521f;
}
/* 要点のまとめ：見出しを二重の枠で囲まない */
.summaryCard .summaryPoint:not(.answerPoint) > h3 {
    display: block;
    margin: 0 0 12px;
    padding: 0 0 8px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #d9e1e8;
    border-radius: 0;
    font-size: var(--study-point-heading);
    line-height: 1.6;
    color: #35546f;
}
.summaryCard .summaryPoint > p {
    font-size: var(--study-point-text);
    line-height: 1.8;
    overflow-wrap: anywhere;
}
/* 覚えるポイント：黄色。チェック欄の配置は維持する */
.summaryCard .rememberPoint {
    margin-top: 16px;
    padding: var(--study-point-padding);
    background: var(--study-point-yellow);
    border: 1px solid var(--study-point-yellow-border);
    border-left: 5px solid var(--study-point-yellow-accent);
    border-radius: 9px;
    line-height: 1.8;
    color: var(--study-point-yellow-text);
}
.summaryCard .rememberPoint span,
.summaryCard .rememberPoint strong {
    font-size: var(--study-point-text);
    color: var(--study-point-yellow-text);
    overflow-wrap: anywhere;
}
.summaryCard .rememberPoint.summaryCheck {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.summaryCard .rememberPoint.summaryCheck > span { min-width: 0; }
.summaryCard .rememberPoint:not(.summaryCheck) {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.summaryCard .rememberPoint [aria-hidden="true"] { flex-shrink: 0; }
/* 覚え方：従来の薄赤を維持し、影と余白を整理 */
.groupLearningPoint.synonymMemory {
    margin: 20px 0;
    padding: var(--study-point-padding);
    background: #fff0f0;
    border: 1px solid #efcaca;
    border-left: 5px solid #ed8585;
    border-radius: 10px;
    box-shadow: none;
}
.groupLearningPoint.synonymMemory h3 {
    margin: 0 0 8px;
    font-size: var(--study-point-heading);
    line-height: 1.6;
    color: #874343;
}
.groupLearningPoint.synonymMemory p {
    margin: 6px 0 0;
    font-size: var(--study-point-text);
    line-height: 1.8;
    overflow-wrap: anywhere;
    color: #493b3b;
}
/* 独立した参考・復習のポイントだけ黄色い枠 */
.answerPoint {
    margin: var(--study-point-gap) 0;
    padding: var(--study-point-padding);
    background: var(--study-point-yellow);
    border: 1px solid var(--study-point-yellow-border);
    border-radius: 9px;
    overflow-wrap: anywhere;
}
/* 正解の枠内：見出し・文章をそのまま表示 */
.correctPair .answerPoint,
.correctPair .summaryPoint {
    margin: var(--study-point-gap) 0 0;
    padding: 14px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid #d2e5d7;
    border-radius: 0;
    box-shadow: none;
}
.answerPoint > h3,
.correctPair .summaryPoint > h3,
.answerCard .answerPoint > h3 {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    background: transparent;
    border: 0;
    font-size: var(--study-point-heading);
    font-weight: bold;
    line-height: 1.6;
    color: #384a59;
    overflow-wrap: anywhere;
}
.answerPoint > p,
.correctPair .summaryPoint > p,
.answerCard .answerPoint > p {
    margin: 6px 0 0;
    font-size: var(--study-point-text);
    line-height: 1.8;
    overflow-wrap: anywhere;
}
/* 分解した漢字など、個別に大きく表示する箇所はそのまま */
@media (max-width: 650px) {
    :root {
        --study-point-heading: 18px;
        --study-point-text: 16px;
        --study-point-gap: 16px;
        --study-point-padding: 14px;
    }
    .correctPair .answerPoint,
    .correctPair .summaryPoint { padding-top: 12px; }
}
/* 音訓の解説は漢字ごとにまとまりを残して折り返す */
.studyReadingPart { display: inline-block; max-width: 100%; }


/* ==============================
   共通：学習終了・復習終了
============================== */
.studyFinishCard {
    text-align: center;
    overflow-wrap: anywhere;
}
.studyFinishCard .summaryLabel {
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.6;
}
.studyFinishCard h2 {
    margin: 6px 0 16px;
    font-size: 28px;
}
.studyFinishLead {
    margin: 0 0 20px;
    font-size: 18px;
    line-height: 1.8;
}
.studyFinishResults, .studyFinishStatus {
    box-sizing: border-box;
    max-width: 440px;
    margin: 16px auto 0;
    border: 1px solid #c7dfcd;
    border-radius: 10px;
    background: #eef7f0;
    color: #334c3a;
    padding: 12px 16px;
    font-size: 17px;
    line-height: 1.7;
}
.studyFinishStatus { text-align: center; }
.studyFinishRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    padding: 6px 0;
}
.studyFinishRow + .studyFinishRow { border-top: 1px solid #d2e5d7; }
.studyFinishRow strong { white-space: nowrap; font-size: 20px; }
.studyFinishNote { margin: 16px 0 0; line-height: 1.8; text-align: left; }
.studyFinishCard .studyFinishButtons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: var(--study-button-width);
    gap: var(--study-button-gap);
    margin: 24px auto 0;
}
.studyFinishCard .studyFinishButtons > .startButton {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 10px 12px;
}
@media (max-width: 650px) {
    .studyFinishCard h2 { font-size: 24px; }
    .studyFinishLead { font-size: 16px; }
    .studyFinishResults, .studyFinishStatus { font-size: 16px; padding: 10px 12px; }
    .studyFinishRow strong { font-size: 18px; }
}


/* ==============================
   スマートフォン：自己評価ボタンの押しやすさ
   読み方と記号は狭い画面では上下に並べる
============================== */
@media (max-width: 500px) {
    .studyReadingResultGrid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
    }
    .studyReadingResultGrid button[data-reading-result] {
        min-height: 44px !important;
        font-size: 14px !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
}


/* ==============================
   同義語・類義語 グループ①・②の選択肢
   PC：4列 ／ スマホ：2列
============================== */
.questionCard .choiceList.synonymCompactChoices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.questionCard .synonymCompactChoices .choiceButton {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    padding: 12px 6px;
}
@media (max-width: 650px) {
    .questionCard .choiceList.synonymCompactChoices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}


/* ==============================
   同義語・類義語 中級の解答
   熟語の上にルビを付け、1行で表示する
============================== */
.answerCard .synonymIntermediateCompletedLine {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 10px;
    font-size: 26px;
    font-weight: bold;
    line-height: 1.5;
    white-space: nowrap;
}
.synonymIntermediateNumber {
    flex: 0 0 1.25em;
    font-variant-numeric: tabular-nums;
    font-weight: normal;
    font-size: 0.8em;
}
.synonymIntermediateRuby {
    ruby-position: over;
    ruby-align: center;
    white-space: nowrap;
}
.synonymIntermediateRuby rt {
    font-size: 0.52em;
    font-weight: normal;
    line-height: 1.35;
    color: #414a51;
}
.synonymIntermediateAnswerHint {
    margin: 8px 0 0 2em;
    font-size: 18px;
    line-height: 1.7;
}
@media (max-width: 650px) {
    .answerCard .synonymIntermediateCompletedLine {
        font-size: 22px;
        gap: 8px;
    }
    .synonymIntermediateAnswerHint { font-size: 16px; }
}
@media (max-width: 360px) {
    .answerCard .synonymIntermediateCompletedLine {
        font-size: 20px;
        gap: 6px;
    }
}
