/* 帖子目录大纲 */
.to-panel .to-panel-body {
    max-height: 60vh;
    overflow: auto;
}

.to-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.to-list li {
    margin: 0;
}

.to-link {
    display: block;
    padding: 4px 0 4px 10px;
    border-left: 2px solid transparent;
    color: var(--mn-text-muted, #6b7280);
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.to-link:hover {
    color: var(--mn-text, #1f2328);
    border-left-color: var(--mn-border, #e5e7eb);
}

.to-link.is-active {
    color: var(--mn-primary, #2563eb);
    border-left-color: var(--mn-primary, #2563eb);
    font-weight: 600;
}

.to-level-2 .to-link { padding-left: 22px; }
.to-level-3 .to-link { padding-left: 34px; }
.to-level-4 .to-link { padding-left: 46px; }
.to-level-5 .to-link { padding-left: 58px; }
.to-level-6 .to-link { padding-left: 70px; }

.to-empty {
    display: none;
    margin: 8px 0 0;
    color: var(--mn-text-muted, #6b7280);
    font-size: 13px;
}

.to-panel.is-empty .to-empty {
    display: block;
}

.to-panel.is-empty .to-list {
    display: none;
}

/* 移动端悬浮目录 */
.to-fab {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 88px;
    z-index: 60;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 50%;
    background: var(--mn-bg-elevated, #fff);
    color: var(--mn-text, #1f2328);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    cursor: pointer;
}

.to-drawer {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 62;
    max-height: 65vh;
    overflow: auto;
    padding: 14px 16px 22px;
    background: var(--mn-bg-elevated, #fff);
    border-radius: var(--mn-radius-lg, 10px) var(--mn-radius-lg, 10px) 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
}

.to-drawer.is-open {
    display: block;
}

.to-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.to-drawer-title {
    font-size: 14px;
    font-weight: 600;
}

.to-drawer-close {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mn-text-muted, #6b7280);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.to-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 61;
    background: rgba(0, 0, 0, .38);
}

.to-mask.is-open {
    display: block;
}

.to-fab.is-available {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1025px) {
    .to-fab,
    .to-drawer,
    .to-mask {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .to-panel {
        display: none;
    }
}
