body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: #010100;
    background-color: #F5DEB3;
    margin: 0;
    padding: 10px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #edebeb;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(1, 1, 0, 0.15);
    padding-bottom: 0px;
}

h1 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #010100;
    border-bottom: 2px solid #010100;
    padding-bottom: 10px;
}

/* YYYY年 */
h1 .year-display {
    display: block;
    font-size: 1.0em;
    font-weight: normal;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #fe4600;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #010100;
    text-decoration: underline;
}

.back-link::before {
    content: "← ";
}

article {
    margin-bottom: 30px;
    padding-bottom: 10px;
}

h2.episode-title {
    background-color: #C8E6C9;
    color: #010100;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 15px;
    border-left: 4px solid #fe4600;
}

h3.summary-title {
    font-size: 1em;
    color: #010100;
    border-left: 4px solid #fe4600;
    padding-left: 10px;
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: bold;
}

h4.section-title {
    font-size: 1em;
    font-weight: normal;
    color: #010100;
    border-left: 3px solid #fe4600;
    padding-left: 10px;
    margin-top: 25px;
    margin-bottom: 10px;
}

ul {
    padding-left: 20px;
    margin: 0 0 10px 0;
}

li {
    margin-bottom: 5px;
}

.indent-list {
    list-style-type: circle;
    margin-top: 5px;
}

p {
    margin: 5px 0;
}

details {
    margin: 10px 0;
    padding: 0px;
}

summary {
    cursor: pointer;
    font-weight: bold;
    color: #010100;
    list-style-position: outside;
    margin-left: 20px;
}

summary:hover {
    opacity: 0.7;
}

.dialogue {
    margin: 15px 0px;
    padding: 15px;
    background-color: #e7e7e7;
    border-radius: 5px;
    border: 1px solid #d2b48c;
    font-size: 1em;
    line-height: 1.8;
}

footer {
    padding: 20px 0;
    border-top: 2px solid #F5DEB3;
    margin-top: auto;
    color: #010100;
    font-size: 0.9em;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

footer a {
    color: #fe4600;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* 最上部に戻るボタン */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 16px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top img {
    width: 64px;
    height: 64px;
    display: block;
    filter: drop-shadow(3px 4px 6px rgba(0, 0, 0, 0.7));
    transition: filter 0.2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

@media (hover: hover) {
    .back-to-top:hover img {
        filter: drop-shadow(3px 4px 10px rgba(0, 0, 0, 0.9)) brightness(1.15);
    }
}

/* PC: 常時表示 & コンテナ右横に配置 */
/* container max-width:1100px → 半幅550px、body padding:10px を考慮 */
@media (min-width: 768px) {
    .back-to-top {
        left: calc(50% + min(550px, 50vw - 10px) + 16px);
        right: auto;
        opacity: 1;
        visibility: visible;
    }
}

.year-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.year-list li {
    margin-bottom: 15px;
}

.year-link {
    display: block;
    background-color: #C8E6C9;
    color: #010100;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    border-left: 4px solid #fe4600;
}

.year-link:hover {
    background-color: #fe4600;
    color: #fff;
    transform: translateX(5px);
}

.year-link::after {
    content: " ▶";
    float: right;
}

/* ナビゲーションボックス全体の装飾 */
.navigation-box {
    padding: 5px;
    border-radius: 12px;
    margin: 20px auto !important;
    text-align: center;
    /* 中央揃えをCSSに集約 */
}

/* プルダウンメニュー自体の装飾 */
#page-episode-select {
    display: block;
    margin: 0 auto;
    padding: 10px;
    font-size: 1.05rem;
    color: #010100;
    border: 2px solid #000000;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    width: 90%;
    max-width: 400px;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #fe4600 50%),
        linear-gradient(135deg, #fe4600 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px),
        calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* ホバー（マウスを乗せた時）とフォーカス時の挙動 */
#page-episode-select:hover {
    background-color: #fff5f2;
    /* ほんのりオレンジがかった白に */
    border-color: #010100;
    /* 枠を黒にして反応を強調 */
}

#page-episode-select:focus {
    box-shadow: 0 0 0 3px rgba(254, 70, 0, 0.3);
    /* フォーカス時に光らせる */
}

.header-logo {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
    /* スマホ画面など、親要素からはみ出さないようにする */
    height: auto;
    /* 縦横比を維持したまま縮小させる */
    width: 300px;
    /* PC・スマホ共通での基本の表示サイズ */
    margin: 0px 10px 20px 10px;
    /* 上・右・下・左 */
}

@media (min-width: 768px) {
    .header-logo {
        width: 450px;
        /* PCで見るときだけこのサイズに上書き */
    }
}