﻿body { font-family: sans-serif; max-width: 800px; margin: 20px auto; padding: 0 5px; color: #333; line-height: 1.5; }
a { color: #0073aa; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.3rem; border-bottom: 2px solid #0073aa; padding-bottom: 8px; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
tr { border-bottom: 1px dashed #999999; }
td { padding: 1.1em 0.25em; vertical-align: middle; }
th { border: 1px solid #dddddd; padding: 0.5em; background: #f4f4f4; font-weight: bold; text-align: center; }

/* ナビゲーションリンク 全体 */
#nav-link {
    margin: 0 0 1.2em 0;
    padding: 0;
}

#nav-link summary {
	display: block;
    cursor: pointer;
    padding: 0.6em 1em;
    font-weight: bold;
    color: #0073aa;
    background: #eef1f5;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    user-select: none;
    list-style: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#nav-link summary::before {
    content: "▶";
    margin-right: 0.5em;
}
#nav-link[open] summary::before {
    content: "▼";
    margin-right: 0.5em;
}

#nav-link summary:hover {
    background: #e2e8f0;
    border-color: #bcbac2;
}

#nav-link[open] summary {
	color: #666666;
    background: transparent;
    border: 1px solid transparent;
    padding: 0.6em 1em;
	opacity:0.7;
}

#nav-link ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    border: 1px solid #dddddd;
    border-radius: 4px;
    overflow: hidden;
}

#nav-link li {
    flex: 1;
    text-align: center;
    border-right: 1px solid #dddddd;
}

#nav-link li:last-child {
    border-right: none;
}

#nav-link li a {
    display: block;
    padding: 0.75em 0;
    color: #ffffff;
    background: #0073aa;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background 0.3s ease;
    text-decoration: none;
}

#nav-link li a:hover,
#nav-link li a:active {
    background: #003d5c;
    transform: translateY(1px);
}

#nav-link li a.current-page {
    color: #777777;
    background: #e4e4e4;
    font-weight: normal;
}

/* ナビゲーションリンク スマホ用 */
@media screen and (max-width: 400px) {
    #nav-link ul {
        flex-direction: column;
        background: #ffffff;
        border: 1px solid #dddddd;
        border-radius: 4px;
    }
    #nav-link li {
        border-right: none;
        border-bottom: 1px solid #eeeeee;
    }
    #nav-link li:last-child {
        border-bottom: none;
    }
    #nav-link li a {
        background: #ffffff;
        color: #0073aa;
        font-weight: bold;
        padding: 0.7em 1em;
        text-align: left;
    }
    #nav-link li a:hover,
    #nav-link li a:active {
        background: #f9f9f9;
        color: #005b87;
        transform: none;
    }
    #nav-link li a.current-page {
        color: #666666;
        background: #fafafa;
        font-weight: normal;
    }
}



/* 3列の幅と配置の調整 */
td:nth-child(1) { text-align: center; }
td:nth-child(2) a { font-size: 0.9rem; font-weight: bold; }
td:nth-child(3) { text-align: center; }

/* 順位・スコア変動 */
.stay { display:block; color:#FF8C00; font-size:0.85rem; }
.rank-up { display:block; color:#008000; font-size:0.85rem; }
.rank-down { display:block; color:#e60000; font-size:0.85rem; }
.score-up { display:block; color:#008000; }
.score-down { display:block; color:#e60000; }

/* ザ・平均くん */
.avg { display:block; color:#800000;}

/* 放送曜日バッジ */
.weekday {
    display: inline-block;
    padding: 0.15em 0.5em;
    font-size: 0.75rem;
    color: #555555;
    background: #f4f4f4;
    border: 1px solid #dddddd;
    border-radius: 3px;
}

/* 集計期間表示用スタイル */
.period-text,.update-time,.source-link {
    font-size: 0.9rem;
    color: #555;
	margin-top:0.1em;
}
.update-time {
	margin-top:0.5em;
}

/* モード切替フォームのスタイル */
.mode-form {
    margin: 15px 0;
    padding: 10px 15px 12px 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    position: relative;
}
.mode-form-title {
    font-size: 0.8rem;
    color: #666;
    background: #f9f9f9;
    padding: 0 5px;
    position: absolute;
    top: -9px;
    left: 12px;
    font-weight: bold;
}
.mode-form label {
    cursor: pointer;
    margin-right: 15px;
    font-size: 0.95rem;
}
.mode-form label:last-child {
    margin-right: 0;
}

/* キービジュアルとタイトルのレイアウト */
.anime-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.anime-thumb {
    width: 50px;
    height: auto;
    border-radius: 3px;
    flex-shrink: 0;
    object-fit: cover;
}
.anime-title-text {
    word-break: break-all;
}

/* アーカイブ用アコーディオン・スタイル */
.archive-container { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.archive-box { margin-top: 10px; padding: 15px; background: #fafafa; border: 1px solid #e5e5e5; border-radius: 4px; }
.archive-season-details { margin-bottom: 10px; }
.archive-season-details summary { font-weight: bold; color: #333; cursor: pointer; padding: 6px 10px; background: #eef2f5; border-radius: 3px; font-size: 0.95rem; }
.archive-file-list { list-style: none; padding-left: 20px; margin: 8px 0 12px 0; }
.archive-file-list li { margin: 6px 0; font-size: 0.9rem; }
.archive-file-list a { color: #0073aa; text-decoration: none; }
.archive-file-list a.current-page { color:#999999; text-decoration: line-through; opacity: 0.8; }
.archive-file-list a:hover { text-decoration: underline; }

.analyze {
			margin:2.25em 0em 0em 0em;
}
.memo-box {
    margin-top: 25px;
    padding: 15px 20px;
    background: #fdfdfd;
    border-left: 4px solid #0073aa;
    border-top: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    border-radius: 4px;
    color: #555;
    line-height: 1.6;
}
.memo-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

/* TOP10チャートここまで開閉ボタン */
#chart-top.ranking:not(.is-expanded) tr.show-all ~ tr {
	display:		none;
}
#chart-top.ranking .show-all {
	cursor:			pointer;
}