@charset "UTF-8";

/* =========================================================
   江戸幕府将軍 徳川15代一覧用 スタイル
========================================================= */

/* 全体コンテナ */
.tokugawa-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
}

/* =========================================
   テキスト・見出し
========================================= */
.page-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.page-description {
    font-size: 1rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* パンくずリスト */
.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}
.breadcrumb a {
    color: #1a0dab; 
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* =========================================
   タイムライン本体
========================================= */
.timeline {
    position: relative;
    padding-left: 40px;
    margin-top: 40px;
}

/* 縦線 */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 4px;
    background-color: #cda966; 
}

/* =========================================
   各将軍のブロック・カード
========================================= */
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

/* 学習済み状態 */
.timeline-item.is-learned .timeline-card {
    border-color: #4CAF50;
    background-color: #f0fdf4;
}

/* 代数バッジ */
.timeline-badge {
    position: absolute;
    top: -19px; 
    left: -53px;
    padding: 6px 16px;
    border-radius: 6px;
    background-color: #6b4423 !important; 
    color: #ffffff !important;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

/* カード本体 */
.timeline-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* 肖像画エリア */
.card-left {
    flex-shrink: 0;
}
.shogun-img {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

/* テキストエリア */
.card-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.shogun-header {
    margin-bottom: 8px;
    border-bottom: 2px solid #cda966;
    padding-bottom: 4px;
}
.shogun-kana {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-bottom: -5px;
}
.shogun-name {
    margin: 0;
    font-size: 1.4rem;
    color: #333;
    line-height: 1.2;
}
.shogun-period {
    font-size: 0.9rem;
    font-weight: bold;
    color: #d35400;
    margin: 0 0 8px 0;
}
.shogun-desc {
    font-size: 0.95rem;
    color: #444;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

/* =========================================
   各種ボタン共通リファクタリング
========================================= */
.card-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ★ 全ボタン共通設定（フォントをメイリオに強制統一） */
.btn-dictionary,
.btn-learn,
.btn-exam,
.btn-boss-locked,
.btn-boss-active {
    font-family: 'Meiryo', 'メイリオ', sans-serif; /* buttonタグのデフォルトを上書き */
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease; /* ホバー時のアニメーションを共通化 */
}

/* --- カード内ボタン（PC時は160pxで統一） --- */
.btn-dictionary,
.btn-learn,
.btn-exam {
    width: 160px;
    padding: 8px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-dictionary {
    background-color: #3498db;
    color: white;
}
.btn-dictionary:hover { background-color: #2980b9; }

.btn-learn {
    background-color: #e0e0e0;
    color: #333;
}
.btn-learn:hover { background-color: #d5d5d5; }

/* 学習済み状態のボタン色 */
.timeline-item.is-learned .btn-learn {
    background-color: #4CAF50;
    color: white;
}
.timeline-item.is-learned .btn-learn:hover { background-color: #45a049; }

.btn-exam {
    background-color: #f39c12;
    color: white;
}
.btn-exam:hover { background-color: #e67e22; }

/* =========================================
   総合まとめ検定（ボス検定）エリア
========================================= */
.boss-exam-area {
    margin-top: 50px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 2px solid #cfd9df;
    font-family: 'Meiryo', 'メイリオ', sans-serif;
}

.boss-exam-title {
    font-size: 1.4rem; 
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}
.boss-exam-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* --- ボス検定用ボタン --- */
.btn-boss-locked,
.btn-boss-active {
    padding: 12px 28px;
    border-radius: 30px; /* カプセル型の丸み */
    font-weight: bold;
}

/* 未解放状態 */
.btn-boss-locked {
    background-color: #9e9e9e;
    color: #fff;
    font-size: 1rem; 
    cursor: not-allowed;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* 解放状態 */
.btn-boss-active {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 1.1rem; 
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}
.btn-boss-active:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.5);
}

/* =========================================
   スマホ対応（縦積みにする・文字サイズ調整）
========================================= */
@media (max-width: 600px) {
    .timeline-badge {
        padding: 4px 10px;
        font-size: 0.95rem;
    }
    .timeline-card {
        flex-direction: column;
    }
    .shogun-img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .btn-dictionary, .btn-learn {
        width: 108px;
    }
    .btn-exam {
        width: 150px;
    }
}