.renshu-app-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    color: #333;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
}

.renshu-header {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.325em;
    font-weight: bold;
    color: #555;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.renshu-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.renshu-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.renshu-question-text {
    font-size: 1.225em;
    line-height: 2.2;
    /* ルビのために行間を広く設定 */
    margin-bottom: 25px;
    text-align: left;
}

/* ルビのスタイル */
ruby rt {
    font-size: 0.725em;
}

.renshu-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.renshu-option {
    padding: 14px 0;
    width: 160px;
    border-radius: 50px;
    border: none;
    background: #e0e0e0;
    color: #555;
    font-size: 2.2em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* マルの線を太くする */
.renshu-option[data-ans="maru"] {
    -webkit-text-stroke: 2.5px currentColor;
}

/* バツの線の太さも微調整してバランスをとる */
.renshu-option[data-ans="batsu"] {
    -webkit-text-stroke: 1.2px currentColor;
}

/* 未選択時はグレー（color は変えない） */
.renshu-option[data-ans="maru"],
.renshu-option[data-ans="batsu"] {
    background: #e0e0e0;
    color: #555;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ホバー時：グレーのまま少し明るく */
.renshu-option:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.renshu-option:active {
    transform: translateY(0);
}

/* 選択後：マルは赤、バツは青 */
.renshu-option[data-ans="maru"].selected {
    background: linear-gradient(135deg, #ff6b6b, #cc0000);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(204, 0, 0, 0.4);
    transform: scale(0.96);
    filter: none;
}

.renshu-option[data-ans="batsu"].selected {
    background: linear-gradient(135deg, #4a90e2, #0056b3);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.4);
    transform: scale(0.96);
    filter: none;
}

.renshu-submit-btn,
.renshu-next-btn,
.renshu-retry-btn {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.225em;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* 「答える」ボタンは緑 */
.renshu-submit-btn {
    background: #28a745;
    color: #fff;
}

.renshu-submit-btn:hover {
    background: #218838;
}

.renshu-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.renshu-next-btn {
    background: #28a745;
    color: #fff;
    margin-top: 15px;
}

.renshu-next-btn:hover {
    background: #218838;
}

.renshu-retry-btn {
    background: #ffc107;
    color: #333;
    margin-top: 20px;
}

.renshu-retry-btn:hover {
    background: #e0a800;
}

.renshu-result-area {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    background: #f9f9f9;
    animation: fadeIn 0.5s ease;
}

.renshu-result-status {
    font-size: 1.625em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.renshu-status-correct {
    color: #28a745;
    font-size: 3em;
}

.renshu-status-incorrect {
    color: #dc3545;
}

.renshu-explanation-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.renshu-explanation-text {
    line-height: 2.0;
    font-size: 1.075em;
}

.renshu-final-screen {
    text-align: center;
    padding: 30px 10px;
}

.renshu-final-title {
    font-size: 1.625em;
    color: #333;
    margin-bottom: 15px;
}

.renshu-final-score {
    font-size: 1.325em;
    margin-bottom: 25px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 教本ページ表示エリア */
.renshu-textbook-pages-area {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 14px;
    background: #eef4ff;
    border-left: 4px solid #4a90e2;
    border-radius: 6px;
    font-size: 1.045em;
    color: #2c5fa8;
}

.renshu-textbook-pages-label {
    font-weight: bold;
    white-space: nowrap;
}

.renshu-textbook-page-num {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #4a90e2;
    color: #fff;
    border-radius: 4px;
    padding: 2px 10px;
    font-weight: bold;
    font-size: 1em;
}

.renshu-textbook-page-num ruby rt {
    color: rgba(255, 255, 255, 0.85);
}

/* 全問正解時のおめでとう画像 */
.renshu-congrats-image-wrap {
    margin: 10px auto 20px;
    text-align: center;
}

.renshu-congrats-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    animation: renshu-congrats-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

@keyframes renshu-congrats-pop {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================================
   スタートページ
   ======================================================== */
.renshu-start-page {
    text-align: center;
    padding: 30px 20px;
}

.renshu-start-image-wrap {
    margin: 0 auto 20px;
    text-align: center;
}

.renshu-start-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    animation: fadeIn 0.6s ease both;
}

.renshu-start-notice {
    background: #fffbe6;
    border-left: 4px solid #f5a623;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 0 auto 20px;
    text-align: left;
    font-size: 1em;
    line-height: 1.8;
    color: #5a4a00;
    max-width: 500px;
}

.renshu-start-count {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 24px;
}

/* 「始める」ボタンは緑 */
.renshu-start-btn {
    display: inline-block;
    padding: 16px 60px;
    font-size: 1.4em;
    font-weight: bold;
    background: linear-gradient(135deg, #34c759, #28a745);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
}

.renshu-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(40, 167, 69, 0.5);
}

.renshu-start-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}