#right-sidebar {
    top: 0;
    float: right;
    width: 15%;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

div#right-sidebar p {
    padding: 1rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    margin-left: 0;
    line-height: 1.6;
    color: #4a5568;
}

#right-sidebar p img {
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#right-sidebar p img:hover {
    transform: scale(1.05);
}

#right-sidebar p a {
    display: block;
    color: #5591af;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#right-sidebar p a:hover {
    color: #3e6b82;
}

#left-sidebar {
    position: sticky;
    top: 0;
    float: left;
    width: 17%;
    margin-bottom: 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

ul {
    padding: 0;
}

ul.left-sidemenu {
    padding-left: 0;
    margin: 1rem 0 1em;
    margin-left: 0;
    line-height: 0;
}

ul.left-sidemenu:first-child {
    margin-top: 1rem; /* Align with main content h1 */
    margin-left: 0;
    margin-right: 0; /* Remove right margin for home button container */
    padding-left: 0;
    padding-right: 0; /* Remove right padding for home button container */
}

ul.left-sidemenu li {
    list-style-type: none;
}

ul.left-sidemenu li a {
    display: block;
    padding: 0.6rem 1rem 0.6rem 1.5rem; /* Indent items under titles */
    line-height: 1.5;
    color: #4a5568;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
    font-weight: 500;
}

ul.left-sidemenu li.home-button a {
    background-color: #e0e6ed; /* Light background for home button */
    border-radius: 8px; /* Rounded corners for home button */
    margin: 0.5rem 0.5rem; /* Reduce margin around the button */
    padding: 0.8rem 1.5rem; /* Adjust padding for button feel */
    text-align: center;
    border-bottom: none; /* Remove bottom border for button */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: calc(100% - 1rem); /* Full width minus smaller left and right margins */
    box-sizing: border-box;
    font-weight: bold; /* Make home button text bold */
}

ul.left-sidemenu li.home-button a:hover {
    background-color: #d1d8e0; /* Slightly darker on hover */
    color: #3e6b82;
    transform: translateY(-1px); /* Slight lift on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
    border-left: none; /* Remove hover border-left for home button */
}

ul.left-sidemenu li a:hover {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
    color: #3e6b82;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(85, 145, 175, 0.15);
    border-left: 4px solid #5591af;
}

.sidebar-group-title {
    font-size: 0.9rem; /* Adjust size as needed */
    font-weight: 600;
    color: #4C8196; /* Darker color for title */
    padding: 0.8rem 1rem 0.4rem; /* Adjust padding */
    margin-top: 1rem; /* Space above title */
    margin-bottom: 0.2rem; /* Space below title */
    border-bottom: 1px solid #e2e8f0; /* Subtle separator */
    background-color: #E0E6ED; /* Light background for the title */
}

/* チェックボックスを非表示にする */
.drawer-hidden {
    display: none;
}

/* ハンバーガーメニューアイコンはデフォルトで非表示 */
.drawer-open {
    display: none;
}

/* モバイル表示時のハンバーガーアイコン */
@media screen and (max-width: 959px) {
    /* サイドバー全体を非表示にして、ハンバーガーメニューとして動作させる */
    #left-sidebar {
        position: static;
        float: none;
        width: auto;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        overflow: visible;
    }

    .drawer-open {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        z-index: 1000 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }

    .drawer-open:hover {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    /* ハンバーガーメニューのアイコン */
    .drawer-open span,
    .drawer-open span::before,
    .drawer-open span::after {
        position: absolute;
        display: block;
        width: 25px;
        height: 3px;
        content: "";
        background: #5591af;
        border-radius: 3px;
        transition: 0.3s ease;
    }

    /* 三本線の一番上の棒の位置調整 */
    .drawer-open span::before {
        bottom: 8px;
    }

    /* 三本線の一番下の棒の位置調整 */
    .drawer-open span::after {
        top: 8px;
    }

    /* アイコンがクリックされたら真ん中の線を透明にする */
    #drawer-input:checked ~ .drawer-open span {
        background: rgba(255, 255, 255, 0);
    }

    /* アイコンがクリックされたらアイコンが×印になるように上下の線を回転 */
    #drawer-input:checked ~ .drawer-open span::before {
        bottom: 0;
        transform: rotate(45deg);
        background: #3e6b82;
    }

    #drawer-input:checked ~ .drawer-open span::after {
        top: 0;
        transform: rotate(-45deg);
        background: #3e6b82;
    }

    /* サイドバー本体（メニュー部分）のみ非表示にする */
    .nav-content {
        display: none;
        position: fixed;
        top: 0;
        left: 100%;
        z-index: 999;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transition: 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

    /* ハンバーガーアイコンがONのときはメニューを表示 */
    #drawer-input:checked ~ .nav-content {
        display: block;
        left: calc(100% - 280px);
    }

    /* 右サイドバーを非表示 */
    #right-sidebar {
        display: none;
    }

    /* サイドバーのレイアウト調整 */
    ul.left-sidemenu {
        margin: 0 0 1em;
        margin-left: 0;
        line-height: 0;
        text-align: center;
    }

    /* メニューアイテムのスタイル */
    .nav-content ul.left-sidemenu li a {
        display: block;
        padding: 1rem 1.5rem;
        color: #4a5568;
        text-decoration: none;
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .nav-content ul.left-sidemenu li a:hover {
        background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
        color: #3e6b82;
        border-left: 4px solid #5591af;
    }
}
