@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700;900&display=swap');

:root {
    --waka-color: #4CAF50; /* メインカラー：若草色 */
    --waka-bg: #F1F8E9;    /* 背景色：薄い緑 */
    --waka-accent: #FFC107; /* アクセント：太陽の黄色 */
    --text-color: #3E2723;   /* 文字色：こげ茶 */
}

body {
    font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
    background-color: var(--waka-bg);
    background-image: linear-gradient(135deg, #DCEDC8 25%, transparent 25%), 
                      linear-gradient(225deg, #DCEDC8 25%, transparent 25%),
                      linear-gradient(315deg, #DCEDC8 25%, transparent 25%),
                      linear-gradient(45deg, #DCEDC8 25%, transparent 25%);
    background-position: 10px 0, 10px 0, 0 0, 0 0;
    background-size: 20px 20px; /* 元気な格子柄 */
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
    min-height: 100vh;
    border: 5px solid #fff;
    border-radius: 10px;
}

/* ヒーローエリア */
.hero { text-align: center; margin-bottom: 60px; padding-top: 40px; }
.hero-image img { 
    width: 200px; height: auto; 
    filter: drop-shadow(0 5px 10px rgba(76, 175, 80, 0.3));
    transition: transform 0.3s;
}
.hero-image img:hover { transform: scale(1.1); }
.hero h1 { font-size: 3.5rem; font-weight: 900; color: var(--waka-color); margin: 0; }
.hero p { font-size: 1.1rem; font-weight: 700; color: #616161; margin-top: 10px; }
.hero-voice {
    background: #fff; border: 2px solid var(--waka-color); color: var(--waka-color);
    display: inline-block; padding: 10px 20px; border-radius: 10px;
    margin-top: 20px; font-weight: bold; position: relative;
}

/* 目次 */
.toc {
    background: #fff; padding: 30px; border-radius: 10px;
    border: 2px dashed #AED581; margin-bottom: 80px;
}
.toc h2 { margin-top: 0; font-weight: 900; color: var(--waka-color); text-align: center; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.toc li a {
    display: block; background: #F1F8E9; padding: 10px 15px; border-radius: 5px;
    text-decoration: none; color: #33691E; font-weight: 700; transition: all 0.2s; text-align: center;
}
.toc li a:hover { background: var(--waka-color); color: #fff; }
.back-link { text-align: center; margin-top: 20px; }
.back-link a { color: #8D6E63; text-decoration: none; font-size: 0.9rem; font-weight: bold; }

/* 章のデザイン */
.chapter { margin-bottom: 80px; }
.chapter h2 {
    font-size: 2rem; font-weight: 900; color: var(--waka-color);
    border-bottom: 3px solid var(--waka-accent);
    padding-bottom: 5px; display: inline-block; margin-bottom: 30px;
}
.chapter h3 {
    font-size: 1.5rem; font-weight: 700; color: #558B2F;
    border-left: 5px solid var(--waka-color);
    padding-left: 15px; margin-top: 50px;
}

/* プロフィールテーブル */
.profile-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: #fff; border-radius: 10px; border: 2px solid #DCEDC8;
}
.profile-table th, .profile-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #DCEDC8; }
.profile-table th { width: 30%; white-space: nowrap; background: #F1F8E9; color: #33691E; font-weight: 700; }
.profile-table tr:last-child th, .profile-table tr:last-child td { border-bottom: none; }

/* 詳細ブロック */
.detail-block {
    background: #fff; padding: 20px; border-radius: 10px; margin-bottom: 20px;
    border: 1px solid #DCEDC8; box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.detail-block h4 { color: var(--waka-color); margin-top: 0; font-size: 1.2rem; }

.character-quote {
    background: #F1F8E9; border-left: 5px solid var(--waka-color);
    margin: 20px 0; padding: 15px;
}

/* 関係性リスト */
.relation-box { background: #fff; padding: 20px; border-radius: 10px; border: 2px dotted #AED581; }
.relation-list dt { font-weight: bold; color: #558B2F; margin-top: 15px; font-size: 1.1rem; }
.relation-list dt::before { content: '🌱 '; }
.relation-list dd { margin-left: 0; padding-left: 1.5em; color: #666; }

/* 図鑑 */
.expression-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 25px; }
.expression-item { text-align: center; transition: transform 0.3s; }
.expression-item:hover { transform: scale(1.1); }
.expression-item img {
    width: 100%; height: auto;
    background: #fff; border-radius: 10px;
    border: 3px solid #F1F8E9;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.15);
    margin-bottom: 10px;
}
.expression-item p { font-weight: bold; font-size: 0.9rem; color: #558B2F; margin: 0; }

/* レスポンシブ */
@media (max-width: 600px) {
    .container { padding: 20px 10px; }
    .hero h1 { font-size: 2.5rem; }
}