/**
 * 受講生ダッシュボード＆カリキュラム詳細ページ
 */

/* === ダッシュボード: ヒーロー === */
.mg-hero {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}
.mg-hero__greeting {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.mg-hero__progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.mg-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.mg-progress-bar__fill {
    height: 100%;
    background: var(--brand);
    border-radius: 4px;
    transition: width 0.6s ease;
}
.mg-progress-bar__text {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 60px;
    text-align: right;
    white-space: nowrap;
}

/* === サマリーカード === */
.mg-stats {
    display: flex;
    gap: 10px;
}
.mg-stat {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 12px 14px;
    flex: 1;
    text-align: center;
}
.mg-stat__num {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand);
}
.mg-stat__label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* === カリキュラム一覧 === */
.mg-curriculum {
    padding: 20px 24px;
}
.mg-cat-group {
    margin-bottom: 20px;
}
.mg-cat-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 4px;
}

/* === ステップ行 === */
.mg-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 6px;
    font-size: 13px;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--text-primary);
}
.mg-step:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}
.mg-step--done {
    opacity: 0.6;
}
.mg-step--locked {
    opacity: 0.35;
    cursor: default;
}
.mg-step--locked:hover {
    background: transparent;
}
.mg-step--current {
    border-color: var(--brand);
    background: var(--brand-bg);
}

/* ステップアイコン */
.mg-step__icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.mg-step__icon--done {
    background: var(--brand-light);
    color: var(--brand);
}
.mg-step__icon--current {
    background: #FFF3E0;
    color: #E65100;
}
.mg-step__icon--locked {
    background: #f0f0f0;
    color: #bbb;
}
.mg-step__num {
    font-size: 12px;
    color: #bbb;
    min-width: 22px;
}
.mg-step__title {
    flex: 1;
}
.mg-step--current .mg-step__title {
    font-weight: 600;
}

/* バッジ */
.mg-badge {
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}
.mg-badge--video {
    background: #E3F2FD;
    color: #1565C0;
}
.mg-badge--image {
    background: #F3E5F5;
    color: #7B1FA2;
}

/* 解放ノート */
.mg-unlock-note {
    font-size: 11px;
    color: var(--text-muted);
    padding: 2px 16px 2px 54px;
}

/* === カリキュラム詳細 === */
.mg-detail-breadcrumb {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}
.mg-detail-breadcrumb a {
    color: var(--text-muted);
}
.mg-detail-breadcrumb a:hover {
    color: var(--brand);
}
.mg-detail-breadcrumb__current {
    color: var(--text-primary);
    font-weight: 600;
}

.mg-detail-body {
    padding: 24px;
}
.mg-detail-body__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.mg-detail-body__title {
    font-size: 18px;
    font-weight: 700;
}
.mg-detail-body__sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* メディアブロック */
.mg-media-block {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}
.mg-media-block__label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.mg-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
}
.mg-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius);
}
.mg-text-content {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 24px;
    color: var(--text-secondary);
}
.mg-text-content p {
    margin-bottom: 12px;
}
.mg-ref-image {
    border-radius: var(--radius);
    max-width: 100%;
}

/* 完了ボタンエリア */
.mg-complete-area {
    margin-top: 24px;
}
.mg-complete-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.mg-complete-hint--after {
    margin-top: 10px;
    color: var(--brand);
}

/* 完了済みバナー */
.mg-completed-banner {
    background: var(--brand-light);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    margin-top: 24px;
}
.mg-completed-banner__text {
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: 8px;
}
.mg-completed-banner__link {
    display: inline-block;
    padding: 10px 24px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
}
.mg-completed-banner__link:hover {
    background: var(--brand-dark);
    color: #fff;
}

/* === レスポンシブ === */

/* タブレット */
@media (max-width: 768px) {
    .mg-stats {
        flex-wrap: wrap;
    }
    .mg-stat {
        min-width: calc(50% - 8px);
    }
}

/* スマートフォン */
@media (max-width: 600px) {
    .mg-hero {
        padding: 16px;
    }
    .mg-hero__greeting {
        font-size: 15px;
    }
    .mg-stats {
        gap: 6px;
    }
    .mg-stat {
        padding: 10px 8px;
        min-width: calc(50% - 4px);
    }
    .mg-stat__num {
        font-size: 17px;
    }
    .mg-curriculum {
        padding: 12px;
    }
    .mg-step {
        padding: 12px;
        gap: 8px;
        min-height: 48px; /* タッチ領域確保 */
    }
    .mg-step__num {
        display: none; /* 狭い画面ではステップ番号非表示 */
    }
    .mg-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    .mg-unlock-note {
        padding-left: 42px;
        font-size: 10px;
    }
    .mg-detail-body {
        padding: 16px;
    }
    .mg-detail-body__title {
        font-size: 16px;
    }
    .mg-detail-body__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .mg-completed-banner__link {
        width: 100%;
        text-align: center;
    }
}

/* 極小デバイス (iPhone SE等) */
@media (max-width: 375px) {
    .mg-hero__greeting {
        font-size: 14px;
    }
    .mg-step__title {
        font-size: 12px;
    }
    .mg-cat-header {
        font-size: 12px;
    }
}
