.widget-toc-container {
    padding-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.toc-headings { min-height: 0; min-width: 0; max-width: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
#articles, #comments { scroll-margin-top: 16px; }

.widget-toc-container li {
    line-height: 1.8;
}

.widget-toc-container ol{
    list-style-type: square;
}

.widget-toc-container ol ol {
    list-style-type: circle;
}

.widget-toc-container ol ol ol {
    list-style-type: decimal;
}

.widget-toc-container ol, #mobile-toc-panel ol {
    box-sizing: border-box;
    margin: 0;
    padding-left: 14px;
    min-width: 0;
    max-width: 100%;
}

.widget-toc-container li > ol, #mobile-toc-panel li > ol {
    margin: 0;
    padding-left: 10px;
}

.widget-toc-container a, #mobile-toc-panel nav a {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 0;
    max-width: 100%;
}

.code-copy-block {
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding-top: 34px;
    margin-bottom: 21px;
    background: #f6f8fa;
}

.code-copy-block > pre, .code-copy-block > figure {
    margin-bottom: 0;
}

.code-copy-button {
    position: absolute;
    top: 4px;
    right: 6px;
    padding: 4px 10px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    background: #fff;
    color: #665985;
    font-size: 12px;
    cursor: pointer;
}

@media print {
    .code-copy-block { padding-top: 0; }
    .code-copy-button { display: none; }
}

#sb #sb-toc.is-floating {
    position: fixed;
    z-index: 20;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: calc(100vh - 32px);
    margin: 0;
}

#sb-toc.is-floating .widget-title {
    flex-shrink: 0;
}

#sb-toc.is-floating .textwidget {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wc {
    width: calc(100% - 28px);
    max-width: 1200px;
    box-sizing: border-box;
}

.fw, #content, .post-content-basic, #footer .info {
    box-sizing: border-box;
}

#content, #breadcrumbs, #footer .info {
    min-width: 0;
    overflow-wrap: anywhere;
}

.post-content-basic img, .post-content-basic iframe, .post-content-basic video {
    max-width: 100%;
}

.post-content-basic pre, .post-content-basic table {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: auto;
}

#sb .category-list, #sb .archive-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 0 10px;
    gap: 0 12px;
}

#sb .category-list > li, #sb .archive-list > li {
    min-width: 0;
    padding: 0;
    margin: 0;
    white-space: normal;
    overflow: visible;
}

#sb .category-list > li {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

#sb .category-list > li::before, #sb .archive-list > li::before {
    content: none;
}

#sb .category-list a, #sb .archive-list a {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

#sb .category-list .category-list-count {
    float: none;
    flex-shrink: 0;
    margin-left: auto;
}

#archive-toggle {
    display: block;
    border: 0;
    background: transparent;
    padding: 8px 14px;
    color: inherit;
    cursor: pointer;
}

#mobile-sidebar, #mobile-toc-toggle, #mobile-toc-panel, #mobile-toc-backdrop {
    display: none;
}

@media (min-width: 1028px) {
    .wp { width: calc(100% - 300px); }
}

@media not all and (min-width: 800px) {
    #container { min-height: 0 !important; }
    #mobile-sidebar { display: block; clear: both; padding-top: 21px; }
    #mobile-sidebar #sb { width: auto; height: auto; margin: 0; overflow: visible; visibility: visible; }
    #mobile-sidebar #sb-toc { display: none; }
    #mobile-sidebar .category-list, #mobile-sidebar .archive-list {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, max(100px, calc((100% - 28px) / 3))), 1fr));
    }
    #mobile-toc-toggle:not([hidden]) {
        display: grid;
        place-items: center;
        position: fixed;
        right: 16px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 50%;
        background: #fff;
        color: #665985;
        box-shadow: 0 2px 8px #0003;
        z-index: 1003;
        cursor: pointer;
    }
    #mobile-toc-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; background: #0006; z-index: 1001; }
    #mobile-toc-panel:not([hidden]) {
        display: flex;
        flex-direction: column;
        position: fixed;
        right: 16px;
        left: 16px;
        bottom: calc(132px + env(safe-area-inset-bottom, 0px));
        max-height: 70vh;
        max-height: min(70vh, calc(100dvh - 164px));
        padding: 16px;
        box-sizing: border-box;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 20px #0003;
        z-index: 1002;
    }
    .mobile-toc-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .mobile-toc-heading button { background: transparent; border: 0; color: #665985; padding: 8px; cursor: pointer; }
    #mobile-toc-panel nav { display: flex; flex-direction: column; overflow: hidden; min-height: 0; overflow-wrap: anywhere; }
    #mobile-toc-panel li { line-height: 1.8; }
    #mobile-toc-backdrop { touch-action: none; }
}

.code-language {
    position: absolute;
    top: 7px;
    left: 12px;
    max-width: calc(100% - 90px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #665985;
    font: 12px/20px sans-serif;
}
.markdown-body .post-readmore {
    clear: both;
    margin-top: 18px !important;
}
@media not all and (min-width: 800px) {
    #header { width: 100%; max-width: none; }
    .logo img { max-width: 100%; }
}
@media print {
    .code-language { display: none; }
}

#gotop { border: 0; padding: 0; }

.pagination .mobile-page-picker { display: none; }
@media not all and (min-width: 800px) {
    .pagination.page-picker-ready .page-number:not(.prev):not(.next),
    .pagination.page-picker-ready .space { display: none; }
    .pagination.page-picker-ready .mobile-page-picker {
        display: inline-flex;
        align-items: center;
        height: 48px;
        max-width: calc(100% - 104px);
    }
    .mobile-page-select {
        box-sizing: border-box;
        max-width: 100%;
        min-height: 38px;
        padding: 6px 28px 6px 12px;
        border: 1px solid #e5dfed;
        border-radius: 8px;
        background-color: #faf8fc;
        color: #75608f;
        font-family: inherit;
        font-size: 16px;
        cursor: pointer;
    }
    .mobile-page-select:focus-visible { outline: 2px solid #9380b1; outline-offset: 2px; }
}
