@charset "UTF-8";

/* ==================================================
   日本史 人物事典 専用スタイル (華やかな黄金・茶色テーマ)
   ================================================== */

/* PC版の場合、ボタン等のフォントをメイリオに指定 */
@media screen and (min-width: 601px) {
    .dp-idx-btn,
    .dp-period-btn,
    .dp-kw-tag,
    .dp-quiz-gold-btn,
    .dp-scroll-top-btn,
    .dp-search-input,
    .dp-load-more-btn {
        font-family: "Meiryo", "メイリオ", sans-serif;
    }
}

.dp-header-section {
    text-align: center;
    background: linear-gradient(135deg, #8B5A2B 0%, #DAA520 100%);
    color: #fff;
    padding: 25px 15px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
    border: 2px solid #FFD700;
}

.dp-main-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #FFF8E1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.dp-main-desc {
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* キーワード検索ボックス */
.dp-search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 20px;
}

.dp-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px 12px 40px;
    font-size: 16px;
    border: 2px solid #FFCA28;
    border-radius: 30px;
    background: #FFFDE7;
    color: #3E2723;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.dp-search-input:focus {
    outline: none;
    border-color: #FF8F00;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 143, 0, 0.3);
}

.dp-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #FF8F00;
}

/* 時代ごとの絞り込みボタン */
.dp-period-filter-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.dp-period-btn {
    padding: 8px 14px;
    background: #fff;
    color: #5D4037;
    border: 1px solid #D7CCC8;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dp-period-btn:hover {
    background: #FFF8E1;
    border-color: #FFCA28;
}

.dp-period-btn.is-active {
    background: #DAA520;
    color: #fff;
    border-color: #B8860B;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.period-jomon, .period-yayoi, .period-kofun { border-left: 4px solid #8D6E63; }
.period-asuka, .period-nara { border-left: 4px solid #AB47BC; }
.period-heian { border-left: 4px solid #EC407A; }
.period-kamakura, .period-muromachi { border-left: 4px solid #5C6BC0; }
.period-sengoku, .period-azuchi { border-left: 4px solid #EF5350; }
.period-edo { border-left: 4px solid #29B6F6; }
.period-bakumatsu { border-left: 4px solid #26A69A; }
.period-meiji, .period-taisho, .period-showa, .period-heisei, .period-reiwa { border-left: 4px solid #66BB6A; }

/* インデックス（五十音）ボタン */
.dp-index-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
    background: #FFF8E1;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #FFECB3;
}

.dp-idx-btn {
    padding: 8px 16px;
    background: #fff;
    color: #5D4037;
    border: 1px solid #D7CCC8;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dp-idx-btn:hover {
    background: #FFECB3;
    border-color: #FFCA28;
}

.dp-idx-btn.is-active {
    background: #5D4037;
    color: #fff;
    border-color: #3E2723;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 検索結果の件数表示 */
.dp-result-info {
    text-align: right;
    font-size: 14px;
    color: #5D4037;
    margin-bottom: 10px;
    font-weight: bold;
    padding-right: 5px;
}

#dp-result-count {
    font-size: 18px;
    color: #E65100;
    margin: 0 4px;
}

/* 人物カード全体 */
.dp-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dp-card {
    background: #FFFAFA; 
    border-radius: 16px;
    border: 1px solid #D7CCC8;
    border-left: 6px solid #DAA520; 
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    background: #fff;
    transition: background 0.3s;
}

.dp-card-header:hover {
    background: #FFFDF4;
}

.dp-card-header.is-open {
    background: #FFF8E1;
    border-bottom: 1px dashed #FFCA28;
}

/* ★修正点①：左寄せの徹底とルビ調整 */
.dp-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 左端に揃える */
    text-align: left;
}

.dp-title {
    font-size: 20px;
    font-weight: bold;
    color: #3E2723;
    margin: 0 0 4px 0;
    text-align: left;
}

.dp-title ruby {
    ruby-align: start; /* ルビを左側から開始させる */
}

.dp-title rt {
    font-size: 12px;
    color: #795548;
    font-weight: normal;
}

/* 生没年と時代バッジ */
.dp-lifespan-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dp-lifespan {
    font-size: 13px;
    color: #5D4037;
    background: #FFECB3;
    padding: 2px 8px;
    border-radius: 4px;
}

.dp-period-badge {
    font-size: 12px;
    color: #fff;
    background: #DAA520;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: normal;
}

.dp-toggle-icon {
    font-size: 16px;
    color: #DAA520;
    transition: transform 0.4s ease;
}

/* アコーディオン ボディ */
.dp-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #FFFAFA;
}

.dp-card-inner {
    padding: 20px;
}

/* ★追加：詳細な生没年月日のデザイン */
.dp-detail-dates {
    font-size: 14px;
    color: #5D4037;
    background: #FFFAFA;
    padding: 8px 12px;
    border-left: 4px solid #FFCA28;
    border-radius: 4px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.dp-date-label {
    font-weight: bold;
    color: #8B5A2B;
    margin-right: 4px;
}

/* 国、出身、職業のタグ情報 */
.dp-profile-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.dp-info-tag {
    font-size: 13px;
    background: #FFF8E1;
    color: #5D4037;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #FFE082;
}

/* 人物紹介文 */
.dp-desc-box {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #FFE082;
    color: #3E2723;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(255, 213, 79, 0.1);
}

/* エピソードタイムライン風 */
.dp-episode-timeline {
    border-left: 2px solid #FFCA28;
    margin-left: 10px;
    padding-left: 20px;
    margin-bottom: 25px;
}

.dp-episode-item {
    position: relative;
    margin-bottom: 20px;
}

.dp-episode-item:last-child {
    margin-bottom: 0;
}

.dp-episode-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.dp-episode-icon {
    position: absolute;
    left: -33px; 
    background: #FFFAFA;
    padding: 2px 0;
    font-size: 18px;
}

.dp-episode-title {
    font-size: 16px;
    font-weight: bold;
    color: #4E342E;
    margin: 0;
}

.dp-episode-text {
    font-size: 14px;
    color: #5D4037;
    margin: 0;
    line-height: 1.6;
}

/* キーワードタグ */
.dp-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.dp-kw-tag {
    background: #FFF8E1;
    color: #5D4037;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
    border: 1px solid #FFE082;
}

.dp-kw-tag:hover {
    background: #FFECB3;
}

/* 関連クイズリンク */
.dp-quiz-links {
    background: #fff;
    border: 2px solid #FFD54F;
    border-radius: 8px;
    padding: 15px;
}

.dp-quiz-head {
    font-size: 15px;
    font-weight: bold;
    color: #F57F17;
    margin-bottom: 12px;
    text-align: left;
}

.dp-quiz-btn-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.dp-quiz-gold-btn {
    display: inline-block;
    text-align: center;
    background: linear-gradient(180deg, #FFF8E1, #FFECB3);
    color: #5D4037;
    padding: 10px 18px;
    border-radius: 6px;
    border: 1px solid #FFCA28;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}

.dp-quiz-gold-btn:hover {
    background: linear-gradient(180deg, #FFECB3, #FFE082);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* エラー / データなし */
.system-error-msg, .dp-no-data {
    padding: 40px;
    text-align: center;
    color: #5D4037;
    font-weight: bold;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #D7CCC8;
}

/* 「もっと見る」ボタンエリア */
.dp-load-more-wrap {
    text-align: center;
    margin: 20px 0 40px;
}

.dp-load-more-btn {
    display: inline-block;
    background: linear-gradient(180deg, #FFF8E1, #FFECB3);
    color: #5D4037;
    padding: 14px 40px;
    border-radius: 30px;
    border: 2px solid #FFCA28;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.dp-load-more-btn:hover {
    background: linear-gradient(180deg, #FFECB3, #FFE082);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.1);
}

/* フッターボタントップ */
.dp-footer-actions {
    margin-top: 30px;
    text-align: left;
}

.dp-scroll-top-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #ffffff;
    color: #DAA520; 
    text-decoration: none;
    border-radius: 30px;
    border: 2px solid #DAA520; 
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.dp-scroll-top-btn:hover {
    background: #FFF8E1;
    color: #B8860B;
    border-color: #B8860B;
}

/* 強調キーワード（赤字） */
.dp-keyword-red {
    color: #D84315;
    font-weight: bold;
}