#sb-toc {
	position: fixed;
	bottom: 0;
	left: 50%;
	right: auto;
	width: 100%;
	max-width: var(--sb-toc-max-width, var(--content-width, 1080px));
	margin: 0 auto;
	box-sizing: border-box;
	z-index: 9999;
	background: #ffffff;
	color: #111;
	padding: 6px 12px;
	border-top: 1px solid rgba(177, 183, 196, 0.5);
	transform: translate(-50%, 100%);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

#sb-toc.sb-toc--visible {
	transform: translate(-50%, 0);
	opacity: 1;
	visibility: visible;
}

#sb-toc ul {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

#sb-toc a {
	color: rgba(80, 90, 105, 0.9);
	text-decoration: none;
	padding: 5px 9px;
	font-size: 13px;
	border-radius: 4px;
	background: none;
	transition: color 0.2s ease, background 0.2s ease;
}

#sb-toc a:hover,
#sb-toc a:focus {
	color: rgba(80, 90, 105, 1);
}

#sb-toc a.active {
	color: #fff;
	background: color-mix(in srgb, var(--accent) 60%, transparent);
}

#sb-toc ul::-webkit-scrollbar {
	display: none;
}

@media (max-width: 1024px) {
	#sb-toc {
		padding-left: 0;
		padding-right: 0;
		margin-left: 0;
		margin-right: 0;
		width: 100%;
		max-width: calc(100% - 40px);
		transform: translate(-50%, 100%);
	}

	#sb-toc a {
		white-space: nowrap;
	}
}

@media (max-width: 768px) {
	#sb-toc {
		max-width: calc(100% - 20px);
	}
}
