.mr-toc-content {
    width: 100%;
    font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin: 40px auto;
    box-sizing: border-box;
}

.mr-toc-content.frame1 {
    border: 0.5px solid #e2e8f0;
    border-radius: 4px;
}

.mr-toc-content.frame2 {
    position: relative;
    padding-bottom: 0.1px;
}

.mr-toc-content.frame2::before {
    position: absolute;
    content: "";
    border: 4px solid #111;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    top: 0;
    left: 0;
    opacity: 0.15;
    pointer-events: none;
}

.mr-toc-content.frame3 {
    border-top: 2px solid;
    border-bottom: 2px solid;
}

.mr-toc-content.frame4 {
    padding-bottom: 0.1px;
    border-top: 4px solid #25343e;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.mr-toc-content.frame5 {
    --mr-toc-frame5-c: #25343e;
    border-top: 2px solid var(--mr-toc-frame5-c);
    border-bottom: 2px solid var(--mr-toc-frame5-c);
    position: relative;
}

.mr-toc-content.frame5::before,
.mr-toc-content.frame5::after {
    position: absolute;
    content: "";
    top: -10px;
    width: 2px;
    height: calc(100% + 20px);
    border-radius: 1px;
    background-color: var(--mr-toc-frame5-c);
    pointer-events: none;
}

@media (min-width: 768px) {
    .mr-toc-content.frame5::before,
    .mr-toc-content.frame5::after {
        top: -16px;
        height: calc(100% + 32px);
    }
}

.mr-toc-content.frame5::before {
    left: 10px;
}

@media (min-width: 768px) {
    .mr-toc-content.frame5::before {
        left: 16px;
    }
}

.mr-toc-content.frame5::after {
    right: 10px;
}

@media (min-width: 768px) {
    .mr-toc-content.frame5::after {
        right: 16px;
    }
}

.mr-toc-content.frame6 {
    border: none !important;
    box-shadow: none !important;
}

#mr-toc-title {
    padding: 32px 28px 8px;
    font-family: "Noto Serif TC", Georgia, "Times New Roman", serif;
    font-size: 1.35em;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.8;
    color: #1a202c;
}

@media (min-width: 1024px) {
    #mr-toc-title {
        padding: 40px 64px 16px;
        font-size: 1.65em;
    }
}

#mr-toc-title.is_close {
    padding: 16px 28px;
}

@media (min-width: 1024px) {
    #mr-toc-title.is_close {
        padding: 20px 64px;
    }
}

#mr-toc-title.mr-toc-title-left {
    display: flex;
    text-align: left;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: space-between;
}

#mr-toc-title.mr-toc-title-center {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: space-between;
    padding: 32px 28px 8px;
    text-align: center;
}

#mr-toc-title.mr-toc-title-center > span {
    flex: 1;
    text-align: center;
}

@media (min-width: 1024px) {
    #mr-toc-title.mr-toc-title-center {
        padding: 40px 64px 16px;
    }
}

.mr-toc-content.frame5 #mr-toc-title {
    padding: 32px 40px 8px;
}

@media (min-width: 768px) {
    .mr-toc-content.frame5 #mr-toc-title {
        padding: 40px 64px 16px;
    }
}

.mr-toc-toggle {
    box-sizing: content-box;
    padding: 8px 12px;
    font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 400;
    height: auto;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: none;
    background-color: #f2f2f2;
    cursor: pointer;
    letter-spacing: 1px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .mr-toc-toggle {
        padding: 7px 10px;
    }
}

.mr-toc-toggle:focus {
    outline: 0;
}

.mr-toc-list {
    padding: 0;
    margin: 0;
    list-style: none;
    transition: all 0.3s;
}

.mr-toc-list.level-1 {
    margin: 0 28px 32px !important;
}

@media (min-width: 1024px) {
    .mr-toc-list.level-1 {
        margin: 0 64px 40px !important;
    }
}

.mr-toc-content.frame5 .mr-toc-list.level-1 {
    margin: 0 40px 32px !important;
}

@media (min-width: 1024px) {
    .mr-toc-content.frame5 .mr-toc-list.level-1 {
        margin: 0 64px 40px !important;
    }
}

.mr-toc-list.level-1.is_close {
    display: none !important;
}

.mr-toc-list li {
    position: relative;
    margin: 0 !important;
    line-height: 1.55;
}

.mr-toc-list li > a {
    display: inline-block;
    position: relative;
    text-decoration: none;
    transition: all 0.3s;
    color: #334155;
}

.mr-toc-list li > a:hover {
    text-decoration: underline;
}

.mr-toc-list.level-1 li {
    font-size: 0.95em;
    list-style: none;
    padding: 16px 0 0 0;
}

.mr-toc-list.level-2 {
    padding-left: 1.2em;
    padding-bottom: 4px !important;
    padding-top: 4px !important;
    margin-bottom: 0 !important;
}

@media (min-width: 1024px) {
    .mr-toc-list.level-2 {
        padding-bottom: 0.75em !important;
    }
}

.mr-toc-list.level-2 li {
    font-size: 0.9em;
    padding-top: 6px;
}

.mr-toc-list.level-3 {
    padding-top: 2px;
    padding-bottom: 8px;
    padding-left: 1.1em;
}

.mr-toc-list.level-3 li {
    font-size: 0.9em;
}

.mokuji_ul > .mr-toc-item::before {
    width: 9px;
    height: 9px;
    position: absolute;
    content: "";
    border-radius: 50%;
    background-color: #94a3b8;
    top: 23px;
    left: -1.2em;
}

@media (max-width: 767px) {
    .mokuji_ul > .mr-toc-item::before {
        top: 21px;
    }
}

.mokuji_ul .mokuji_ul .mr-toc-item::before {
    position: absolute;
    content: "";
    width: 6px;
    height: 6px;
    top: 14px;
    left: -1.2em;
    border-radius: 50%;
    background-color: #cbd5e1;
}

.mokuji_ul.level-1 {
    padding-left: 1.3em;
}

@media (max-width: 767px) {
    .mokuji_ul.level-1 {
        padding-left: 1.5em;
    }
}

.mokuji_ul.level-2 {
    padding-left: 1.2em;
}

.mokuji_ul.level-2 > .mr-toc-item::before {
    width: 6px;
    height: 6px;
    top: 12px;
    background-color: #cbd5e1;
}

.mokuji_ul.level-3 > .mr-toc-item::before {
    width: 5px;
    height: 5px;
    top: 10px;
    background-color: #d1d5db;
}

.decimal_ol .mokuji_ul > .mr-toc-item::before,
.mokuji_ol .mokuji_ul > .mr-toc-item::before {
    left: -1.15em;
}

.mokuji_ul .mokuji_ul .mokuji_ul .mr-toc-item::before {
    width: 5px;
    height: 5px;
    top: 10px;
    left: -1.2em;
}

.mokuji_ol {
    padding-left: 0;
    counter-reset: mr-toc-li;
    list-style: none;
    border: none;
}

.mokuji_ol > .mr-toc-item {
    position: relative;
}

.mokuji_ol > .mr-toc-item::before {
    display: inline-block;
    position: absolute;
    top: 15px;
    left: -2.5em;
    width: 32px;
    height: auto;
    font-size: 1.1em;
    font-weight: normal;
    counter-increment: mr-toc-li;
    content: counter(mr-toc-li) ". ";
    background: transparent;
    box-shadow: none;
    text-align: right;
    color: #64748b;
}

@media (max-width: 767px) {
    .mokuji_ol > .mr-toc-item::before {
        left: -2.1em;
    }
}

.mokuji_ol.level-1 {
    padding-left: 2em;
}

@media (max-width: 767px) {
    .mokuji_ol.level-1 {
        padding-left: 1.3em;
    }
}

.mokuji_ol .mokuji_ol {
    counter-reset: mr-toc-li2;
}

.mokuji_ol .mokuji_ol > .mr-toc-item::before {
    display: inline-block;
    counter-increment: mr-toc-li2;
    content: counter(mr-toc-li2) ". ";
    position: absolute;
    top: 7px;
    left: -1.5em;
    width: auto;
    height: auto;
    font-size: 0.9em;
    font-weight: normal;
    background: transparent;
    box-shadow: none;
    color: #94a3b8;
}

.mokuji_ol .mokuji_ol .mokuji_ol {
    counter-reset: mr-toc-li3;
}

.mokuji_ol .mokuji_ol .mokuji_ol > .mr-toc-item::before {
    counter-increment: mr-toc-li3;
    content: counter(mr-toc-li3) ". ";
    top: 4px;
    left: -1.3em;
    font-size: 0.85em;
    color: #94a3b8;
}

.decimal_ol {
    padding-left: 0;
    counter-reset: mr-toc-decimal-1;
    list-style: none;
}

.decimal_ol > .mr-toc-item {
    position: relative;
    counter-increment: mr-toc-decimal-1;
}

.decimal_ol > .mr-toc-item::before {
    display: inline-block;
    content: counter(mr-toc-decimal-1, decimal-leading-zero) "";
    position: absolute;
    left: -1.3em;
    top: 16px;
    width: auto;
    height: auto;
    font-size: 1.05em;
    font-weight: normal;
    background: transparent;
    box-shadow: none;
    color: #64748b;
}

.decimal_ol > .mr-toc-item::after {
    content: "" !important;
    position: absolute;
    top: 18px;
    left: 12px;
    height: 17px;
    width: 1px;
    border-radius: 1px;
    background-color: #cbd5e1;
}

@media (min-width: 768px) {
    .decimal_ol > .mr-toc-item::after {
        top: 19px;
    }
}

.decimal_ol > .mr-toc-item > a {
    padding-left: 1.35em;
}

@media (min-width: 1024px) {
    .decimal_ol > .mr-toc-item > a {
        padding-left: 1.65em;
    }
}

.decimal_ol.level-1 {
    padding-left: 1.3em;
}

.decimal_ol .decimal_ol {
    counter-reset: none;
}

.decimal_ol.level-2 > .mr-toc-item {
    counter-increment: mr-toc-decimal-2;
}

.decimal_ol.level-2 > .mr-toc-item::before {
    display: inline-block;
    content: counter(mr-toc-decimal-2, decimal-leading-zero) "";
    top: 7px;
    left: -1.2em;
    font-weight: normal;
    font-size: 0.95em;
    box-shadow: none;
    background: transparent;
    color: #94a3b8;
}

.decimal_ol.level-2 > .mr-toc-item::after {
    width: 1px;
    height: 14px;
    top: 10px;
    left: 0.75em;
}

.decimal_ol.level-2 > .mr-toc-item > a {
    padding-left: 1.65em;
}

.decimal_ol .mr-toc-list.level-2 {
    padding-left: 2.4em;
}

@media (min-width: 768px) {
    .decimal_ol .mr-toc-list.level-2 {
        padding-left: 2.55em;
    }
}

.decimal_ol.level-2 .level-3 {
    padding-left: 2.3em;
}

.decimal_ol .decimal_ol.level-3 {
    counter-reset: mr-toc-decimal-3;
}

.decimal_ol.level-3 > .mr-toc-item {
    counter-increment: mr-toc-decimal-3;
}

.decimal_ol.level-3 > .mr-toc-item::before {
    content: counter(mr-toc-decimal-3, decimal-leading-zero) "";
    top: 4px;
    left: -1.2em;
    font-size: 0.85em;
    color: #94a3b8;
}

.decimal_ol.level-3 > .mr-toc-item::after {
    height: 12px;
    top: 7px;
    left: 0.7em;
}

.decimal_ol.level-3 > .mr-toc-item > a {
    padding-left: 1.65em;
}

.mokuji_none.level-1 {
    padding-left: 0;
}

.mokuji_none.level-1 .mokuji_ul,
.mokuji_none.level-1 .mokuji_ol {
    padding-left: 2.2em;
}

.mokuji_none.level-2 {
    padding-left: 1em;
}

.mokuji_none.level-3 > .mr-toc-item::before {
    display: none;
}

.mr-toc-content .decimal_ol > .mr-toc-item::before,
.mr-toc-content .decimal_ol.level-2 > .mr-toc-item::before,
.mr-toc-content .decimal_ol.level-3 > .mr-toc-item::before,
.mr-toc-content .mokuji_ol > .mr-toc-item::before,
.mr-toc-content .mokuji_ol .mokuji_ol > .mr-toc-item::before,
.mr-toc-content .mokuji_ol .mokuji_ol .mokuji_ol > .mr-toc-item::before {
    font-weight: 400 !important;
}

@media (min-width: 1024px) {
    .mr-toc-mobile-only {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .mr-toc-desktop-only {
        display: none !important;
    }
}

.mr-toc-sidebar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    width: 220px;
    max-height: 70vh;
    overflow: visible;
    background: #fff;
    border-radius: 6px;
    padding: 16px 0;
    font-size: 13px;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.mr-toc-sidebar {
    scrollbar-width: none;
}

.mr-toc-sidebar::-webkit-scrollbar {
    width: 0;
    display: none;
}

.mr-toc-sidebar-arrow {
    display: none;
    position: absolute;
    width: 24px;
    height: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background 0.15s, border-color 0.15s;
}

.mr-toc-sidebar-arrow:hover {
    background: #e0e5eb;
    border-color: #cbd5e1;
}

.mr-toc-sidebar-arrow svg {
    width: 12px;
    height: 12px;
    stroke: #94a3b8;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mr-toc-sidebar-arrow-up {
    top: 32px;
    right: 8px;
    left: auto;
    transform: none;
}

.mr-toc-sidebar-arrow-down {
    bottom: -12px;
    right: 8px;
    left: auto;
    transform: none;
}

.mr-toc-sidebar-arrow.visible {
    display: flex;
}

.mr-toc-sidebar-right {
    right: 12px;
}

.mr-toc-sidebar-left {
    left: 12px;
}

.mr-toc-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
    padding: 0 16px 10px;
    border-bottom: 1px solid #e0e5eb;
    margin-bottom: 6px;
}

.mr-toc-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    max-height: calc(70vh - 60px);
    overflow-y: auto;
    scrollbar-width: none;
}

.mr-toc-sidebar-list::-webkit-scrollbar {
    width: 0;
    display: none;
}

.mr-toc-sidebar-list::before {
    display: none;
}

.mr-toc-sidebar::after {
    position: absolute;
    content: "";
    width: 2px;
    top: 44px;
    bottom: 8px;
    left: 16px;
    background-color: #e0e5eb;
    border-radius: 2px;
    pointer-events: none;
    z-index: 0;
}

.mr-toc-sidebar-item {
    position: relative;
    margin: 0;
}

.mr-toc-sidebar-item a {
    display: block;
    padding: 5px 16px 5px 28px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mr-toc-sidebar--title-wrap .mr-toc-sidebar-item a {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.45;
    word-break: break-word;
}

.mr-toc-sidebar-item a:hover {
    color: #334155;
}

.mr-toc-sidebar-item::before {
    position: absolute;
    content: "";
    width: 8px;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 50%;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    z-index: 1;
    transition: all 0.2s ease;
}

.mr-toc-sidebar-item.mr-toc-current::before {
    background-color: #3b82f6;
    width: 10px;
    height: 10px;
    left: 12px;
}

.mr-toc-sidebar-item.mr-toc-current a {
    color: #1e293b;
    font-weight: 600;
}

.mr-toc-sidebar-h3 a {
    font-size: 0.92em;
}

.mr-toc-sidebar-h4 a {
    font-size: 0.85em;
}

.mr-toc-sidebar-top a {
    font-size: 0.88em;
    font-weight: 500;
    color: #64748b !important;
}

.mr-toc-sidebar-top::before {
    width: 6px !important;
    height: 6px !important;
    left: 14px !important;
    background-color: #94a3b8 !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #94a3b8 !important;
}

@media (max-width: 1440px) {
    .mr-toc-sidebar {
        width: 180px;
        font-size: 12px;
    }
}

@media (max-width: 1200px) {
    .mr-toc-sidebar {
        display: none;
    }
}
