@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

#subpage-main {
    display: flex;
    width: min(2000px, calc(100% - 30px));
    margin: 0 auto;
    padding-top: 70px;
}

#subpage-sidebar {
    width: 22%;
}

#subpage-body {
    width: 75%;
    min-width: 0;
}

#sidebar-box {
    width: 100%;
}

#sidebar-box ul {
    padding: 0;
    margin: 0;
}

#sidebar-box li {
    margin: 6px 0;
    list-style: circle;
}

#sidebar-box a {
    display: inline-block;
    padding: 0.5em;
    color: var(--color-text-neutral);
    text-decoration: underline;
    border-radius: 6px;
    transition: .2s;
}

#sidebar-box a:hover {
    color: var(--page-accent);
}

.sidebar-item-active {
    list-style-type: disc !important;
}

.sidebar-item-active span {
    font-weight: 700;
    padding-left: 5px;
}

@media (max-width: 940px) {
    #subpage-main {
        display: block;
    }

    #subpage-sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        height: 45px;
        z-index: 100;
    }

    #sidebar-box {
        width: 100%;
        height: 53px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    #sidebar-box::-webkit-scrollbar {
        display: none;
    }

    #sidebar-box ul {
        padding: 0;
        text-align: center;
    }

    #sidebar-box li {
        display: inline-block;
        margin: 0 5px;
        list-style: none;
    }

    #sidebar-box a {
        display: inline-block;
        padding: 8px 15px;
        border-radius: 20px;
        text-decoration: none;
        color: var(--color-text-neutral);
        background: var(--color-background-neutral);
        font-size: .92rem;
    }

    .sidebar-item-active a {
        outline: 2px solid var(--page-accent);
        color: var(--page-accent);
    }

    #subpage-body {
        width: 100%;
    }
}

#subpage-title {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

#subpage-title img {
    width: min(65%, 650px);
    max-height: 150px;
    object-fit: contain;
    margin-top: 10px;
    margin-bottom: 30px;
}

@media (max-width: 940px) {
    #subpage-title img {
        width: 100%;
    }
}

#subpage-contents section {
    margin-bottom: clamp(50px, 10vh, 100px);
    scroll-margin-top: 70px;
}

.page-title {
    display: grid;
    gap: 20px;
    justify-items: center;
    margin-bottom: 32px;
}

.page-title img {
    max-width: 100%;
    height: auto;
}

.page-illust {
    width: 140px;
}

.content-subtitle {
    font-size: clamp(1.5rem, 2.1vw, 2rem);
    font-weight: 700;
    color: #3f3225;
    margin-bottom: 24px;
}

.content-subtitle+.news-list {
    margin-top: 16px;
}

.content-backTop {
    display: inline-block;
    margin-bottom: 32px;
    color: #381f09;
    text-decoration: none;
    border-bottom: 1px dotted #381f09;
}

.content-backTop:hover {
    color: #94541c;
    border-bottom: 1px solid #94541c;
}

.news-list {
    max-width: 1000px;
    display: grid;
    gap: 20px;
}

.news-item {
    border-left: 3px solid #d3a98d;
    padding: 0.8rem 1rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(130, 90, 60, 0.08);
}

.news-highlight {
    border: 1px solid #d3a98d;
    background: #fffcfa;
    border-left-color: #ad8b74;
    border-left-width: 3px;
}

.news-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ad8b74;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.news-content {
    color: #5a4a42;
    font-size: 1rem;
    line-height: 1.8;
}

.news-content b {
    display: block;
    color: #413b36;
}

.news-content p {
    margin: 0;
}

.news-content a {
    display: inline-block;
    margin-top: 12px;
    color: #a56833;
    text-decoration: none;
    border-bottom: 1px dashed #a56833;
}

.news-content a:hover {
    color: #d35400;
    border-bottom: 1px solid #d35400;
}

.news-empty {
    color: #5a4a42;
    font-size: 1rem;
    padding: 1rem;
    background: #fffbf7;
    border: 1px solid #e0d0c0;
    border-radius: 12px;
}

@media (max-width: 980px) {
    #main-centered {
        flex-direction: column;
    }

    #main-sidebar {
        width: 100%;
    }
}

@media (max-width: 640px) {
    #main-centered {
        padding: 24px 16px 40px;
    }

    #sidebar-box {
        padding: 18px;
    }

    .page-illust {
        width: 120px;
    }

    .news-item {
        padding: 18px;
    }
}