body.mch-listing-page,
body.single-post {
    --mch-sidebar-ink: #10264b;
    --mch-sidebar-blue: #1554d1;
    --mch-sidebar-line: #dfe8f5;
}

body.mch-listing-page #sidebar,
body.single-post #sidebar {
    align-self: start;
}

body.mch-listing-page #sidebar .widget,
body.single-post #sidebar .widget {
    margin: 0 0 14px !important;
    padding: 17px 18px !important;
    border: 1px solid var(--mch-sidebar-line) !important;
    border-radius: 14px !important;
    background: linear-gradient(145deg, #fff, #f8fbff) !important;
    box-shadow: 0 10px 28px rgba(25, 61, 112, .07) !important;
}

body.mch-listing-page #sidebar .widget h2,
body.mch-listing-page #sidebar .widget h3,
body.mch-listing-page #sidebar .widget .widgettitle,
body.mch-listing-page #sidebar .widget .wp-block-search__label,
body.single-post #sidebar .widget h2,
body.single-post #sidebar .widget h3,
body.single-post #sidebar .widget .widgettitle,
body.single-post #sidebar .widget .wp-block-search__label {
    display: block;
    margin: 0 0 11px !important;
    padding: 0 0 9px 13px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--mch-sidebar-line) !important;
    color: var(--mch-sidebar-ink) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: .05em !important;
    position: relative;
}

body.mch-listing-page #sidebar .widget h2::before,
body.mch-listing-page #sidebar .widget h3::before,
body.mch-listing-page #sidebar .widget .widgettitle::before,
body.mch-listing-page #sidebar .widget .wp-block-search__label::before,
body.single-post #sidebar .widget h2::before,
body.single-post #sidebar .widget h3::before,
body.single-post #sidebar .widget .widgettitle::before,
body.single-post #sidebar .widget .wp-block-search__label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #1c6de6, #1ab9d6);
}

body.mch-listing-page #sidebar ul,
body.single-post #sidebar ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body.mch-listing-page #sidebar li,
body.single-post #sidebar li {
    margin: 0 !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #eaf0f8 !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

body.mch-listing-page #sidebar li:last-child,
body.single-post #sidebar li:last-child {
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

body.mch-listing-page #sidebar li a,
body.single-post #sidebar li a {
    color: #2c405e !important;
    text-decoration: none !important;
}

body.mch-listing-page #sidebar li a:hover,
body.single-post #sidebar li a:hover {
    color: var(--mch-sidebar-blue) !important;
}

body.mch-listing-page #sidebar .wp-block-search__inside-wrapper,
body.single-post #sidebar .wp-block-search__inside-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 7px;
    padding: 0 !important;
    border: 0 !important;
}

body.mch-listing-page #sidebar .wp-block-search__input,
body.single-post #sidebar .wp-block-search__input {
    min-width: 0;
    height: 42px;
    padding: 8px 10px !important;
    border: 1px solid #ccd9eb !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #243752 !important;
    font-size: 13px !important;
}

body.mch-listing-page #sidebar .wp-block-search__input:focus,
body.single-post #sidebar .wp-block-search__input:focus {
    border-color: #6ca8ed !important;
    outline: 3px solid rgba(21, 84, 209, .12) !important;
}

body.mch-listing-page #sidebar .wp-block-search__button,
body.single-post #sidebar .wp-block-search__button {
    width: 44px;
    height: 42px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: linear-gradient(145deg, #17345c, #10264b) !important;
    color: #fff !important;
    font-size: 0 !important;
}

body.mch-listing-page #sidebar .wp-block-search__button::after,
body.single-post #sidebar .wp-block-search__button::after {
    content: "検索";
    font-size: 11px;
}

body.mch-listing-page #sidebar .wp-block-categories-list,
body.single-post #sidebar .wp-block-categories-list {
    display: flex !important;
    flex-wrap: wrap;
    gap: 7px;
}

body.mch-listing-page #sidebar .wp-block-categories-list li,
body.single-post #sidebar .wp-block-categories-list li {
    padding: 0 !important;
    border: 0 !important;
}

body.mch-listing-page #sidebar .wp-block-categories-list a,
body.single-post #sidebar .wp-block-categories-list a {
    display: inline-block;
    padding: 6px 9px;
    border: 1px solid #dce7f5;
    border-radius: 999px;
    background: #fff;
    color: #29486f !important;
    font-size: 11px;
    line-height: 1.3;
}

body.mch-listing-page #sidebar .wp-block-categories-list a:hover,
body.single-post #sidebar .wp-block-categories-list a:hover {
    border-color: #9dc3ef;
    background: #eef6ff !important;
}

@media (max-width: 767px) {
    body.mch-listing-page #sidebar,
    body.single-post #sidebar {
        margin-top: 20px !important;
    }

    body.mch-listing-page #sidebar .widget,
    body.single-post #sidebar .widget {
        padding: 15px !important;
    }

    body.mch-listing-page #sidebar .wp-block-categories-list,
    body.single-post #sidebar .wp-block-categories-list {
        gap: 6px;
    }
}
