/* リスニングイラスト: 解答画面はカード幅いっぱい（専用メニュー・模擬・ランダムで共通） */
.listening-illustration-img-wrap {
    width: 100%;
    min-height: 240px;
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.listening-illustration-img-wrap .listening-illustration-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 回答結果・解説では参照用に小さく表示 */
.listening-illustration-img-wrap--results {
    width: 100%;
    max-width: 320px;
    min-height: 0;
    aspect-ratio: auto;
    margin: 0 auto 1rem;
}

.listening-illustration-img-wrap--results .listening-illustration-img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
}

.listening-illustration-audio-wrap {
    margin-bottom: 1rem;
    width: 100%;
}

.listening-illustration-audio-wrap audio {
    width: 100%;
    max-width: none;
}

.listening-choice-img {
    max-width: 120px;
    max-height: 120px;
    display: block;
    margin-top: 0.25rem;
}

/* 2列表示時: 横並びカードの高さを揃える */
@media (min-width: 768px) {
    .question-list-row > .question-list-col {
        display: flex;
    }

    .question-list-row > .question-list-col > .question-card {
        width: 100%;
    }
}

/* リスニング: ネイティブ audio コントロールのタップ領域を確保 */
.listening-audio-wrap {
    position: relative;
    z-index: 2;
}

.listening-native-audio {
    min-height: 48px;
}

/* 模擬試験の大問・部見出し（空の card+header だと base のグラデと重なって二重に見える） */
.mock-section-banner {
    background: linear-gradient(135deg, var(--brand-primary, #5b6cff), var(--brand-primary-soft, #7b88ff));
    color: #fff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(26, 31, 54, 0.12);
}

.mock-section-banner h5 {
    margin: 0;
    font-weight: 600;
    color: #fff;
}


/* デフォルトスタイル */
.card-body {
    overflow: visible !important;
}

.form-check {
    padding-left: 1.25em;
    margin-bottom: 0.5rem;
}

.listening-choices .form-check-input {
    position: relative !important;
    left: 0 !important;
    margin-left: 0 !important;
    margin-top: 0.3em;
}

/* リスニング選択肢だけ、他カテゴリと同程度のラベル間隔に揃える */
.listening-choices .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.listening-choices .form-check-label {
    padding-left: 0;
    margin-bottom: 0;
}

/* 選択肢のレイアウト - Bootstrapのform-checkを完全に無視 */
.choices-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.choice-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.choice-radio {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.choice-label {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
    flex: 1;
}

/* モバイル最適化 */
@media (max-width: 768px) {
    .listening-illustration-img-wrap {
        min-height: 200px;
        aspect-ratio: 4 / 3;
    }

    .listening-illustration-img-wrap--results {
        max-width: 260px;
        min-height: 0;
        aspect-ratio: auto;
    }

    .listening-illustration-img-wrap--results .listening-illustration-img {
        max-height: 200px;
    }

    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
        overflow: visible !important;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .form-check {
        padding: 0.75rem 0 0.75rem 2rem;
        margin-bottom: 0.5rem;
    }
    
    .listening-choices .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.3rem;
        position: relative !important;
        left: 0 !important;
        margin-left: 0 !important;
    }

    .listening-choices .form-check {
        gap: 0.5rem;
    }
    
    .form-check-label {
        font-size: 1rem;
        padding-left: 0.5rem;
        line-height: 1.5;
    }
    
    .choices-list {
        gap: 0.5rem;
    }
    
    .choice-item {
        padding: 0.5rem 0;
    }
    
    .choice-radio {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .choice-label {
        font-size: 1rem;
    }
    
    .btn-lg {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .form-control {
        font-size: 1rem;
        padding: 0.6rem;
        min-height: 44px;
    }
    
    label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    audio {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    img.img-fluid {
        max-width: 100% !important;
        height: auto;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.3rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .form-check {
        padding: 0.6rem 0 0.6rem 2rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
    }
    
    .form-control {
        font-size: 0.95rem;
        padding: 0.5rem;
    }
    
    .choice-radio {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .choice-label {
        font-size: 0.95rem;
    }
}

@media (max-width: 414px) {
    .choice-radio {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .choice-label {
        font-size: 0.95rem;
    }
}

