/**************** COMMON ****************/
#page-top {
    position: fixed;
    bottom: 50px;
    right: 50px;
    z-index: 10000;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    appearance: none;
}

#page-top a {
    display: block;
    color: #333;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease;
}

#page-top a:hover {
    transform: translateY(-10px);
}

#page-top a img {
    width: 75px;
    height: auto;
}

/* アニメーション共通 */
.slide-top, .slide-bottom, .slide-left, .slide-right, 
.slide-right02, .slide-right03, .slide-right04 {
    opacity: 0;
    transition: all 0.5s ease-out;
}
.slide-top    { transform: translateY(-20px); }
.slide-bottom { transform: translateY(20px); }
.slide-left   { transform: translateX(-20px); }
.slide-right, .slide-right02, .slide-right03, .slide-right04 { transform: translateX(20px); }

.slide-right03 { transition-duration: 1.5s; }
.slide-right04 { transition-duration: 2s; }

/**************** STORY TAB ****************/
input[type="radio"] { display: none; }

.tab_area {
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: flex-start;
    gap: 7px;
    margin-bottom: 1rem;
}

/* ラベル基本設定 */
.tab_area label {
    position: relative;
    z-index: 1;
    display: inline-block;
    line-height: 1.3;
    text-align: center;
    color: #333;
    font-family: 'YasashisaGothic', 'Noto Sans JP', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border-radius: 5px;
}

.tab_area label:hover{
    color: #fff;
    background: #0091d9;
}

/* 選択状態（色変化） 1-54維持 */
#tab1:checked ~ .tab_area .tab1_label, #tab2:checked ~ .tab_area .tab2_label,
#tab3:checked ~ .tab_area .tab3_label, #tab4:checked ~ .tab_area .tab4_label,
#tab5:checked ~ .tab_area .tab5_label, #tab6:checked ~ .tab_area .tab6_label,
#tab7:checked ~ .tab_area .tab7_label, #tab8:checked ~ .tab_area .tab8_label,
#tab9:checked ~ .tab_area .tab9_label, #tab10:checked ~ .tab_area .tab10_label,
#tab11:checked ~ .tab_area .tab11_label, #tab12:checked ~ .tab_area .tab12_label,
#tab13:checked ~ .tab_area .tab13_label, #tab14:checked ~ .tab_area .tab14_label,
#tab15:checked ~ .tab_area .tab15_label, #tab16:checked ~ .tab_area .tab16_label,
#tab17:checked ~ .tab_area .tab17_label, #tab18:checked ~ .tab_area .tab18_label,
#tab19:checked ~ .tab_area .tab19_label, #tab20:checked ~ .tab_area .tab20_label,
#tab21:checked ~ .tab_area .tab21_label, #tab22:checked ~ .tab_area .tab22_label,
#tab23:checked ~ .tab_area .tab23_label, #tab24:checked ~ .tab_area .tab24_label,
#tab25:checked ~ .tab_area .tab25_label {
    color: #fff;
    background: #2151b0;
    border-radius: 5px;
}

/**************** パネルエリア ****************/
.tab_panel {
    width: 100%;
    padding: 0;
    display: none;
    box-sizing: border-box;
}

.tab_panel p {
    font-size: 14px;
    letter-spacing: 1px;
    text-align: center;
}

#tab1:checked ~ .panel_area #panel1, #tab2:checked ~ .panel_area #panel2,
#tab3:checked ~ .panel_area #panel3, #tab4:checked ~ .panel_area #panel4,
#tab5:checked ~ .panel_area #panel5, #tab6:checked ~ .panel_area #panel6,
#tab7:checked ~ .panel_area #panel7, #tab8:checked ~ .panel_area #panel8,
#tab9:checked ~ .panel_area #panel9, #tab10:checked ~ .panel_area #panel10,
#tab11:checked ~ .panel_area #panel11, #tab12:checked ~ .panel_area #panel12,
#tab13:checked ~ .panel_area #panel13, #tab14:checked ~ .panel_area #panel14,
#tab15:checked ~ .panel_area #panel15, #tab16:checked ~ .panel_area #panel16,
#tab17:checked ~ .panel_area #panel17, #tab18:checked ~ .panel_area #panel18,
#tab19:checked ~ .panel_area #panel19, #tab20:checked ~ .panel_area #panel20,
#tab21:checked ~ .panel_area #panel21, #tab22:checked ~ .panel_area #panel22,
#tab23:checked ~ .panel_area #panel23, #tab24:checked ~ .panel_area #panel24,
#tab25:checked ~ .panel_area #panel25 {
    display: block;
}

/**************** slickやbox ****************/
.slick-track { margin: 0; }
.slick-initialized .slick-slide { margin: 0; }
button.slick-next { display: block; }
.box { box-sizing: border-box; padding: 0; position: relative; }
.box img { width: 100%; height: auto; display: block; margin: 0 auto; }

/**************** RESPONSIVE ****************/

/* --- Mobile (767px以下) --- */
@media only screen and (max-width: 767px) {
    #page-top { bottom: 100px; right: 10px; }
    #page-top a img { width: 50px; }
    
    .tab_area label { font-size: 18px; margin: 0 7px 15px; padding: 5px; }

}

/* --- Tablet / Desktop (768px以上) --- */
@media only screen and (min-width: 768px) {
    .panel_area { padding-top: 1em; margin-bottom: 2em; }
    .tab_area label { font-size: 30px; margin: 0 10px 10px 0; padding: 10px; }
}

/* --- Specific Adjustments (768px - 1024px) --- */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    #page-top { right: 20px; }
    /* タブレット用のサイズ調整を統合 */
    .tab_area label {
        font-size: 22px;
        margin: 0 11px 10px 0;
        padding: 12px 14px;
    }
}